From: Nate W <del...@gm...> - 2005-09-09 06:25:25
|
I'm trying to put a new root file system onto my gumstix (basix 400-xm-bt) but I get a CRC error when I try to boot. I've pasted in my u-boot session below and would appreciate any suggestions. (I did this successfully when I first got the gumstix, but that was quite a while ago.) Is there a way to check the CRC of root_fs_arm_nofpu and/or the boot/uImage inside, before copying to the gumstix and trying to boot? If I run "build_arm_nofpu/staging_dir/sbin/jffs2dump root_fs_arm_nofpu -c" I get a bunch of data, and no errors messages, so I don't think the root_fs is corrupt. It's hard to say though... are there any other good JFFS2 utilities I should try? Or any likely ways that the image could be getting corrupted in transit? Here's my u-boot session log: GUM> fatload mmc 1 a2000000 root_fs_arm_nofpu reading root_fs_arm_nofpu 3151668 bytes read GUM> era 1:2-127 Erase Flash Sectors 2-127 in Bank # 1 ...........................................................................= ......................................e GUM> cp.b a2000000 40000 ${filesize} Copy to Flash... done GUM> fsload a2000000 boot/uImage ### JFFS2 loading 'boot/uImage' to 0xa2000000 ### JFFS2 load complete: 710796 bytes loaded to 0xa2000000 GUM> bootm a2000000 ## Booting image at a2000000 ... Image Name: uImage Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 710732 Bytes =3D 694.1 kB Load Address: a0008000 Entry Point: a0008000 Verifying Checksum ... Bad Data CRC |
From: Craig H. <cr...@gu...> - 2005-09-09 15:23:18
|
On Sep 8, 2005, at 11:18 PM, Nate W wrote: > Is there a way to check the CRC of root_fs_arm_nofpu and/or the > boot/uImage inside, before copying to the gumstix and trying to boot? on the linux command line, crc filename -- on a 64-bit machine, ignore the first 4 bytes. > If I run "build_arm_nofpu/staging_dir/sbin/jffs2dump root_fs_arm_nofpu > -c" I get a bunch of data, and no errors messages, so I don't think > the root_fs is corrupt. It's hard to say though... are there any > other good JFFS2 utilities I should try? Or any likely ways that the > image could be getting corrupted in transit? How are you transfering the image across? Could easily be getting messed up if you're doing a serial transfer. C |
From: Nate W <del...@gm...> - 2005-09-10 07:45:12
|
Given the value from the crc utility, what can I compare that value to, to know if the image is good or bad? I mean, I see how I can get a value to tell me if the CRC of two files differ, but I don't see how u-boot decides if a single file's CRC is good or bad. I don't have "crc" by the way, but I do have "cksum" which reports the CRC. Where can I find the crc utility? apt-get install crc didn't help. Yesterday I had only tried booting from a u-boot command line after copying the image from MMC. Today I accidentally missed the interval to break into u-boot and oddly enough, the CRC passed and it booted into the image that I installed yesterday. Go figure. I have some new issues now, but I'll start a new thread for those. On 9/9/05, Craig Hughes <cr...@gu...> wrote: > On Sep 8, 2005, at 11:18 PM, Nate W wrote: >=20 > > Is there a way to check the CRC of root_fs_arm_nofpu and/or the > > boot/uImage inside, before copying to the gumstix and trying to boot? >=20 > on the linux command line, crc filename -- on a 64-bit machine, > ignore the first 4 bytes. >=20 > > If I run "build_arm_nofpu/staging_dir/sbin/jffs2dump root_fs_arm_nofpu > > -c" I get a bunch of data, and no errors messages, so I don't think > > the root_fs is corrupt. It's hard to say though... are there any > > other good JFFS2 utilities I should try? Or any likely ways that the > > image could be getting corrupted in transit? >=20 > How are you transfering the image across? Could easily be getting > messed up if you're doing a serial transfer. >=20 > C >=20 >=20 > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practic= es > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & Q= A > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users >=20 --=20 Nate Waddoups Redmond WA USA http://www.natew.com/ <=3D=3D for nerds http://www.featherforum.com/ <=3D=3D for birds |
From: Craig H. <cr...@gu...> - 2005-09-10 20:11:41
|
On Sep 10, 2005, at 12:38 AM, Nate W wrote: > Given the value from the crc utility, what can I compare that value > to, to know if the image is good or bad? I mean, I see how I can get > a value to tell me if the CRC of two files differ, but I don't see how > u-boot decides if a single file's CRC is good or bad. There are a couple of ways that u-boot uses CRCs. The first is to check the saved environment variables, ie when you do a "saveenv" in u-boot, it will re-write part of flash to store the values of all the u-boot global environment variables you have defined at the time. As it's saving, it calculates a CRC of the data, which is write to the flash. Then, when you reboot, u-boot reads the space from flash, and checks the CRC -- if the saved CRC doesn't match the calculated CRC, then u-boot throws out the data it just read, and uses its compiled-in default env vars instead. Second, u-boot likes to deal with specially wrapped binaries, inside a special u-boot wrapper which describes what the contents of the package are. So, for example, the uImage file is actually an executable kernel wrapped inside one of these u-boot husks. The wrapper includes a CRC for the data, and then info like "kernel" vs "script" vs "ramdisk" etc, and some information about where in memory to load the data to before executing it, etc. It's a little bit like a really really simple ELF header. The CRC in this case is calculated when you use the "mkimage" program to generate the u-boot file (eg the buildroot calls mkimage to turn the kernel into a uImage file). When u-boot loads the uImage or other u-boot file from flash, it reads the stored CRC then compares it to the one it calculates when it reads in the data chunk. Mismatch will give the error that Richard reported earlier in this thread. Generally, this happens when you transfer a new file and somehow it gets mangled. Not sure what happened in Richard's case, could be that while in linux something scribbled on /boot/uImage and corrupted it... Or maybe just cosmic rays... Third, u-boot includes a "crc" command which can be used to generate a CRC for any chunk of memory. This 3rd method is what I was referring to for checking integrity of a transfered file. You do a CRC calculation on the source machine first, then transfer the file, then check the CRC of the received file under u-boot, eg: (on host) crc filename.foo (on gumstix in u-boot) loadb (now send file) crc a2000000 $filesize Then, if the crc matches, you can copy the data from RAM to flash. > I don't have "crc" by the way, but I do have "cksum" which reports the > CRC. Where can I find the crc utility? apt-get install crc didn't > help. crc on my gentoo box seems to belong to a package called "xc": net-dialup/xc (4.3.2-r1): unix dialout program cksum will work, but it spits out the CRC in decimal instead of hex, and though the manpage says it's a "CRC", it's a diffent number than what the crc util or the u-boot CRC app generates, so it's not hugely useful in this context. > Yesterday I had only tried booting from a u-boot command line after > copying the image from MMC. Today I accidentally missed the interval > to break into u-boot and oddly enough, the CRC passed and it booted > into the image that I installed yesterday. Go figure. Sunspots. C |
From: Dominic J. E. <sa...@th...> - 2005-09-10 20:21:21
|
I'm trying to find a place on the Breakout-TH that'll give me access to 3.3V, for logic supply voltage for this LCD screen I'm playing with. The current requirements are 36mA typical, 64mA max. thanks, - d. -- Dominic J. Eidson "Baruk Khazad! Khazad ai-menu!" - Gimli ------------------------------------------------------------------------------- http://www.the-infinite.org/ |
From: Dave H. <dhy...@gm...> - 2005-09-10 22:02:11
|
Hi Dominic, On 9/10/05, Dominic J. Eidson <sa...@th...> wrote: >=20 > I'm trying to find a place on the Breakout-TH that'll give me access to > 3.3V, for logic supply voltage for this LCD screen I'm playing with. The breakout-TH (the one with all of the holes on one edge of the board) doesn't have a 3.3v regulator on it, so there isn't anyplace to get it from. The breakout-GS, however, does have a 3.3v regulator. --=20 Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ |
From: Dominic J. E. <do...@th...> - 2005-09-10 22:09:31
|
On Sat, 10 Sep 2005, Dave Hylands wrote: > On 9/10/05, Dominic J. Eidson <sa...@th...> wrote: > > > > I'm trying to find a place on the Breakout-TH that'll give me access to > > 3.3V, for logic supply voltage for this LCD screen I'm playing with. > > The breakout-TH (the one with all of the holes on one edge of the > board) doesn't have a 3.3v regulator on it, so there isn't anyplace to > get it from. > > The breakout-GS, however, does have a 3.3v regulator. So, anyone want to trade a lightly used breakout-th for a breakout-gs? (It's even got the harness soldered up for an LCD screen.. :) ;) - d. -- Dominic J. Eidson "Baruk Khazad! Khazad ai-menu!" - Gimli ------------------------------------------------------------------------------- http://www.the-infinite.org/ |
From: Richard A. <ri...@ra...> - 2005-09-10 02:10:39
|
Hi Nate, > ## Booting image at a2000000 ... > Image Name: uImage > Image Type: ARM Linux Kernel Image (uncompressed) > Data Size: 710732 Bytes = 694.1 kB > Load Address: a0008000 > Entry Point: a0008000 > Verifying Checksum ... Bad Data CRC Today I started getting this at boot, but I haven't touched the flash. I've got a connex-400-bt with a cfstix attached. Until today, I didn't actually have a cf card in the connector. I plugged it in, started up the gumstix, and started getting the dreaded Bad Data CRC. I don't know if this has any relationship at all to your problem, but thought I'd throw it out there. --Rick |