[U-Boot-Users] JFFS2 CRC problem with kernel and ramdisk in U-boot 0.4.0

Maynard Cabiente Maynard at raritan.com
Fri Dec 5 16:39:54 CET 2003


Hello,

We are currently using u-boot 0.4.0 on our custom MPC8270 board with a 
Intel StrataFlash.  Everything is working fine and we can boot the Denx PPC 
Linux Kernel 2.4.4 using NFS.  Now we are trying to boot linux kernel
through 
JFFS2 and we are encountering problems similar to the problem posted by 
Vitali Martin on 7-22-2003.  (See link below.)

http://sourceforge.net/mailarchive/forum.php?thread_id=2814642&forum_id=1289
8

Not entirely sure if this was resolved because the thread just died without 
the real answer.

So, basically we did the same thing using eraseall in Denx PPC distribution.

But in this case, we are trying the ramdisk image.
bash-2.05# eraseall /dev/mtd1 
Erased 4096 Kibyte @ 0 -- 100% complete. 
bash-2.05# mount -t jffs2 /dev/mtdblock1 /mnt
bash-2.05# cp rImage /mnt
bash-2.05# cd /mnt/ 
bash-2.05# ls -l 
total 4997
-rw-r--r--    1 root     root      5116534 Dec 31  1969 rImage
bash-2.05# diff rImage /mnt/rImage
bash-2.05# cd .. 
bash-2.05# umount /mnt
Same as Martin did, we rebooted the board and went into u-boot and 
did the following:

-> ls
Scanning JFFS2 FS: . done.
 -rw-r--r--  5116534 Thu Jan 01 00:01:00 1970 rImage
-> fsload 100000 rImage
### JFFS2 loading 'rImage' to 0x100000
 ** WARNING ** rImage is version 0 (in find, ignoring)
 ** WARNING ** rImage is version 0 (in resolve, ignoring)
### JFFS2 load complete: 5116534 bytes loaded to 0x100000
-> imi 100000

## Checking Image at 00100000 ...
   Image Name:   Basit ramdisk image
   Created:      2003-12-01  18:01:23 UTC
   Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
   Data Size:    5116470 Bytes =  4.9 MB
   Load Address: fe100000
   Entry Point:  fe100000
   Verifying Checksum ...    Bad Data CRC
->

But with the same ext2 file that was copied to the JFFS2 file format, 
using tftp everything is fine.

-> tftp 800000 rImage
Bytes transferred = 5116534 (4e1276 hex)
-> imi 800000

## Checking Image at 00800000 ...
   Image Name:   Basit ramdisk image
   Created:      2003-12-01  18:01:23 UTC
   Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
   Data Size:    5116470 Bytes =  4.9 MB
   Load Address: fe100000
   Entry Point:  fe100000
   Verifying Checksum ... OK

But when comparing the files, I noticed that they are not the same.

-> cmp.b 100000 800000 4e1276
byte at 0x00106002 (0xfe) != byte at 0x00806002 (0xae)
Total of 24578 bytes were the same

I noticed that u-boot 0.4.0 are packing the JFFS2 data structures and 
in the Denx PPC 2.4.4 kernel it is not using the __attribute__((packed)) at 
all in the same data structures.

I know one post with similar problems said that going to the 2.4.19pre1
fixed 
his problem.  I know the mtd tools in the Denx PPC kernel is old but trying 
to update the Denx kernel to use the current MTD kernel, fs, utilities is
not 
trivial.

Is there someone there who knows how to resolve this problem?  I'm sure that

Wolfgang will not put a distribution out there if it is not working.  So
somehow 
there are incompatibilities between Denx PPC kernel 2.4.4 and U-boot 0.4.0.
Should we just bite the bullet and go to the current linux distribution?

We are in a crunch time right now thus, any help is greatly appreciated.

thanks,
Maynard





More information about the U-Boot mailing list