I'm using a CF of 1 Gb, but I only format 16 Mb of it for testing.
I have not seen the timing problem you experienced (although my
gnap_overlay runs on a slow machine ;-) ).

I'll try to format the full 1Gb one of these days and report what
happens...

Marcel Romijn

> -----Original Message-----
> From: Ross Carlson [mailto:[EMAIL PROTECTED] 
> Sent: Friday, 19 August, 2005 15:55
> To: [email protected]
> Subject: RE: [gentoo-embedded] GNAP Media Formatting Error?
> 
> Okay! We figured this thing out...
> 
> Our compact flash disk is too slow essentially.  If we 
> formatted the media
> manually, that worked.  If we then mounted the disk manually, 
> that worked as
> well.  But if we let gnap_overlay perform those exact same 
> commands, it
> failed.  After hacking at gnap_overlay a bit we discovered 
> that it seemed
> like a timing issue.  Ian (Ennis) put a couple of simple 
> "sleep" statements
> in gnap_overlay before and after the formatting code chunk.  
> 10 seconds was
> not enough after the format, but it was sufficient before the 
> format.  He
> bumped the sleep up to 20 seconds after the format and before 
> the mounting
> and it worked perfectly!  Our CompactFlash was just too slow, 
> apparently.  I
> wonder if anyone else has seen this?  Seems like it could 
> possibly be the
> size of the CF Disk (256MB)? Perhaps with a smaller 16 or 
> 32mb disk the
> format happens fast enough to allow proper mounting?  I don't 
> have a smaller
> CF Disk here so I can't test this.
> 
> Here is the output of "hdparm -Tt" for the SanDisk for those 
> interested in
> the speed of the media:
> 
> /dev/hdc1:
>  Timing cached reads:   1032 MB in  2.01 seconds = 514.53 MB/sec
>  Timing buffered disk reads:    8 MB in  3.01 seconds =   2.66 MB/sec
> 
> We can simply hack gnap_overlay ourselves for now.  But I 
> wonder if others
> have experienced this, and if so, perhaps there should be a 
> config option to
> the effect of "DIRT_SLOW_DISK" that toggles some sleep 
> statements for those
> of us writing to disk on speed-challenged boxen.
> 
> Thanks for the help, Koon and Sune!
> 
> Ross Carlson
> Ian Ennis
> Corvus Technologies
>  
> 
> -----Original Message-----
> From: Ross Carlson [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 19, 2005 8:57 AM
> To: [email protected]
> Subject: RE: [gentoo-embedded] GNAP Media Formatting Error?
> 
> Koon, Thanks for the suggestion.
> 
> Unfortunately, it seems not to be the formatting process (as 
> seen below) but
> perhaps the mounting of the disk.  I will dig around some 
> more in the source
> and see if I can find something.  
> 
> # mkfs.msdos /dev/hdc1
> mkfs.msdos 2.11 (12 Mar 2005) 
> 
> Successful format!
> 
> # gnap_overlay -c overlays/project/etc/overlay.conf -d 
> /dev/hdc1 -r hda1 -o
> overlays/project/ -n -m -s 9600
> 
> GNAP overlay tool gnap_overlay 1.8
>  * Checking parameters...
> [ ok ]
>  * Warning : you have selected disk install
>  * Make sure you are root or have full access to /dev/hdc1
>  * /dev/hdc must have an MBR installed, run:
>  * dd if=/usr/lib/gnap/mbr/mbr.bin of=/dev/hdc bs=512 count=1 
> if needed
>  * /dev/hdc1 must contain an active partition:
>  *  use fdisk /dev/hdc if needed
>  * Current data on /dev/hdc1 will be destroyed !
>  * Are your sure you want to continue [N]: Y
>  * Expanding /usr/lib/gnap/gnap-core.tar core...
> [ ok ]
>  * Preparing overlay...
> [ ok ]
>  * Adding baudrate for serial console...
> [ ok ]
>  * Adding overlays/project/ (directory overlay)...
> [ ok ]
>  * Adding overlays/project/etc/overlay.conf (overlay.conf file)...
> [ ok ]
>  * Creating overlay tarball...
> [ ok ]
>  * Formatting /dev/hdc1...
> [ !! ]
>  * Cleaning temporary directories...
> [ ok ]
> Overlay failed, try gnap_overlay -h for more help
> 
> Here's the output of mount, so it doesn't appear to be related to an
> automounting issue (suggested by Sune):
> 
> # mount
> /dev/hda3 on / type ext3 (rw,noatime)
> proc on /proc type proc (rw)
> sysfs on /sys type sysfs (rw)
> udev on /dev type tmpfs (rw,nosuid)
> devpts on /dev/pts type devpts (rw)
> shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev) usbfs on 
> /proc/bus/usb
> type usbfs (rw)
> 
> 
> 
> Thanks for the help.  I'll keep poking at it.
> 
> 
> Ross Carlson
> Corvus Technologies
>  
> 
> -----Original Message-----
> From: Thierry Carrez [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 19, 2005 5:08 AM
> To: [email protected]
> Subject: Re: [gentoo-embedded] GNAP Media Formatting Error?
> 
> Ross Carlson wrote:
> 
> >  * Creating overlay tarball...
> > [ ok ]
> >  * Formatting /dev/hdc1...
> > [ !! ]
> > 
> > I had GNAP running on 1.7.1 (syslinux 2.13) but can't seem 
> to get it 
> > running now with 1.8.  The box that I'm using to build on has been 
> > reloaded in the past few days.  Perhaps I am missing 
> something in the 
> > kernel (2.6.12-gentoo-r9)?  The target disk (SanDisk Compact Flash
> > 256MB) has been re-partitioned with a single, bootable 
> partition.  The 
> > gnap MBR has been copied using dd.  And then gnap_overlay as shown 
> > above.  Can't seem to figure this out.  Thierry?  Anyone?
> 
> Here is the code snippet that gnap_overlay runs on the "Formatting..."
> part :
> 
>       gbegin "Formatting ${OUTPUT}"
>       mkfs.msdos "${OUTPUT}" > /dev/null 2>&1
>       gtest $?
> 
> The [ !! ] is written by gtest if an error code is set by the previous
> command. So it's the mkfs.msdos that failed. I suppressed the 
> output (might
> not be a good idea) so you obviously miss the message. Try "mkfs.msdos
> /dev/hdc1" directly and see what happens.
> 
> My wild guess : a required msdos/fat/vfat module is missing in your
> brand-new kernel.
> 
> --
> Koon
> --
> [email protected] mailing list
> 
> 
> --
> [email protected] mailing list
> 
> 
> -- 
> [email protected] mailing list
> 
> 
> 

-- 
[email protected] mailing list

Reply via email to