Gentoo Archives: gentoo-embedded

From: Marcel Romijn <MRomijn@×××××××××××××××.com>
To: gentoo-embedded@l.g.o
Subject: RE: [gentoo-embedded] GNAP Media Formatting Error?
Date: Fri, 19 Aug 2005 15:35:16
Message-Id: AAEDC66F6A58E34CA4553712A2FC80F5393B78@ns1018.seagull.nl
1 I'm using a CF of 1 Gb, but I only format 16 Mb of it for testing.
2 I have not seen the timing problem you experienced (although my
3 gnap_overlay runs on a slow machine ;-) ).
4
5 I'll try to format the full 1Gb one of these days and report what
6 happens...
7
8 Marcel Romijn
9
10 > -----Original Message-----
11 > From: Ross Carlson [mailto:rcarlson@××××××.com]
12 > Sent: Friday, 19 August, 2005 15:55
13 > To: gentoo-embedded@l.g.o
14 > Subject: RE: [gentoo-embedded] GNAP Media Formatting Error?
15 >
16 > Okay! We figured this thing out...
17 >
18 > Our compact flash disk is too slow essentially. If we
19 > formatted the media
20 > manually, that worked. If we then mounted the disk manually,
21 > that worked as
22 > well. But if we let gnap_overlay perform those exact same
23 > commands, it
24 > failed. After hacking at gnap_overlay a bit we discovered
25 > that it seemed
26 > like a timing issue. Ian (Ennis) put a couple of simple
27 > "sleep" statements
28 > in gnap_overlay before and after the formatting code chunk.
29 > 10 seconds was
30 > not enough after the format, but it was sufficient before the
31 > format. He
32 > bumped the sleep up to 20 seconds after the format and before
33 > the mounting
34 > and it worked perfectly! Our CompactFlash was just too slow,
35 > apparently. I
36 > wonder if anyone else has seen this? Seems like it could
37 > possibly be the
38 > size of the CF Disk (256MB)? Perhaps with a smaller 16 or
39 > 32mb disk the
40 > format happens fast enough to allow proper mounting? I don't
41 > have a smaller
42 > CF Disk here so I can't test this.
43 >
44 > Here is the output of "hdparm -Tt" for the SanDisk for those
45 > interested in
46 > the speed of the media:
47 >
48 > /dev/hdc1:
49 > Timing cached reads: 1032 MB in 2.01 seconds = 514.53 MB/sec
50 > Timing buffered disk reads: 8 MB in 3.01 seconds = 2.66 MB/sec
51 >
52 > We can simply hack gnap_overlay ourselves for now. But I
53 > wonder if others
54 > have experienced this, and if so, perhaps there should be a
55 > config option to
56 > the effect of "DIRT_SLOW_DISK" that toggles some sleep
57 > statements for those
58 > of us writing to disk on speed-challenged boxen.
59 >
60 > Thanks for the help, Koon and Sune!
61 >
62 > Ross Carlson
63 > Ian Ennis
64 > Corvus Technologies
65 >
66 >
67 > -----Original Message-----
68 > From: Ross Carlson [mailto:rcarlson@××××××.com]
69 > Sent: Friday, August 19, 2005 8:57 AM
70 > To: gentoo-embedded@l.g.o
71 > Subject: RE: [gentoo-embedded] GNAP Media Formatting Error?
72 >
73 > Koon, Thanks for the suggestion.
74 >
75 > Unfortunately, it seems not to be the formatting process (as
76 > seen below) but
77 > perhaps the mounting of the disk. I will dig around some
78 > more in the source
79 > and see if I can find something.
80 >
81 > # mkfs.msdos /dev/hdc1
82 > mkfs.msdos 2.11 (12 Mar 2005)
83 >
84 > Successful format!
85 >
86 > # gnap_overlay -c overlays/project/etc/overlay.conf -d
87 > /dev/hdc1 -r hda1 -o
88 > overlays/project/ -n -m -s 9600
89 >
90 > GNAP overlay tool gnap_overlay 1.8
91 > * Checking parameters...
92 > [ ok ]
93 > * Warning : you have selected disk install
94 > * Make sure you are root or have full access to /dev/hdc1
95 > * /dev/hdc must have an MBR installed, run:
96 > * dd if=/usr/lib/gnap/mbr/mbr.bin of=/dev/hdc bs=512 count=1
97 > if needed
98 > * /dev/hdc1 must contain an active partition:
99 > * use fdisk /dev/hdc if needed
100 > * Current data on /dev/hdc1 will be destroyed !
101 > * Are your sure you want to continue [N]: Y
102 > * Expanding /usr/lib/gnap/gnap-core.tar core...
103 > [ ok ]
104 > * Preparing overlay...
105 > [ ok ]
106 > * Adding baudrate for serial console...
107 > [ ok ]
108 > * Adding overlays/project/ (directory overlay)...
109 > [ ok ]
110 > * Adding overlays/project/etc/overlay.conf (overlay.conf file)...
111 > [ ok ]
112 > * Creating overlay tarball...
113 > [ ok ]
114 > * Formatting /dev/hdc1...
115 > [ !! ]
116 > * Cleaning temporary directories...
117 > [ ok ]
118 > Overlay failed, try gnap_overlay -h for more help
119 >
120 > Here's the output of mount, so it doesn't appear to be related to an
121 > automounting issue (suggested by Sune):
122 >
123 > # mount
124 > /dev/hda3 on / type ext3 (rw,noatime)
125 > proc on /proc type proc (rw)
126 > sysfs on /sys type sysfs (rw)
127 > udev on /dev type tmpfs (rw,nosuid)
128 > devpts on /dev/pts type devpts (rw)
129 > shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev) usbfs on
130 > /proc/bus/usb
131 > type usbfs (rw)
132 >
133 >
134 >
135 > Thanks for the help. I'll keep poking at it.
136 >
137 >
138 > Ross Carlson
139 > Corvus Technologies
140 >
141 >
142 > -----Original Message-----
143 > From: Thierry Carrez [mailto:koon@g.o]
144 > Sent: Friday, August 19, 2005 5:08 AM
145 > To: gentoo-embedded@l.g.o
146 > Subject: Re: [gentoo-embedded] GNAP Media Formatting Error?
147 >
148 > Ross Carlson wrote:
149 >
150 > > * Creating overlay tarball...
151 > > [ ok ]
152 > > * Formatting /dev/hdc1...
153 > > [ !! ]
154 > >
155 > > I had GNAP running on 1.7.1 (syslinux 2.13) but can't seem
156 > to get it
157 > > running now with 1.8. The box that I'm using to build on has been
158 > > reloaded in the past few days. Perhaps I am missing
159 > something in the
160 > > kernel (2.6.12-gentoo-r9)? The target disk (SanDisk Compact Flash
161 > > 256MB) has been re-partitioned with a single, bootable
162 > partition. The
163 > > gnap MBR has been copied using dd. And then gnap_overlay as shown
164 > > above. Can't seem to figure this out. Thierry? Anyone?
165 >
166 > Here is the code snippet that gnap_overlay runs on the "Formatting..."
167 > part :
168 >
169 > gbegin "Formatting ${OUTPUT}"
170 > mkfs.msdos "${OUTPUT}" > /dev/null 2>&1
171 > gtest $?
172 >
173 > The [ !! ] is written by gtest if an error code is set by the previous
174 > command. So it's the mkfs.msdos that failed. I suppressed the
175 > output (might
176 > not be a good idea) so you obviously miss the message. Try "mkfs.msdos
177 > /dev/hdc1" directly and see what happens.
178 >
179 > My wild guess : a required msdos/fat/vfat module is missing in your
180 > brand-new kernel.
181 >
182 > --
183 > Koon
184 > --
185 > gentoo-embedded@g.o mailing list
186 >
187 >
188 > --
189 > gentoo-embedded@g.o mailing list
190 >
191 >
192 > --
193 > gentoo-embedded@g.o mailing list
194 >
195 >
196 >
197
198 --
199 gentoo-embedded@g.o mailing list