Gentoo Archives: gentoo-embedded

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

Replies

Subject Author
{MCP?} Re: [gentoo-embedded] GNAP Media Formatting Error? Chan Min Wai <dcmwai@×××××××××.my>