All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Load kernel from JFFS2 / Bad Data CRC
@ 2014-03-26 14:40 Sophie Bonnouvrier
  2014-03-26 15:46 ` sophie bonnouvrier
  0 siblings, 1 reply; 3+ messages in thread
From: Sophie Bonnouvrier @ 2014-03-26 14:40 UTC (permalink / raw)
  To: u-boot

hello,

I try to load from JFFS2 filesystem , the kernel,rootfs and DTB. and I 
have bad data CRC error on my file.
Have you any idea of the reason ?
I try to copy several kernel image in the filesystem i've got the same 
error, also with rootfs.
I've no problem with "raw" file and using  nand read in other MTD with 
the same kernel,rootfs, dtb.

Sophie


environnement :
     - u-boot 2013 from SDK freescale 1.4
     - linux 3.8.13 from SDK freescale 1.4
    - custom board based on P2020

  STEP 1
     - In Linux mount JFFS2 file system and copy kernel, rootfs and DTB.
STEP 2
     - In U-boot
fsload 1000000 uImage
### JFFS2 loading 'uImage' to 0x1000000
### JFFS2 load complete: 3287019 bytes loaded to 0x1000000
One9x> iminfo 1000000

## Checking Image at 01000000 ...
    Legacy image found
    Image Name:   Linux-3.8.13-rt9-00053-g939d8fd-
    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
    Data Size:    3286999 Bytes = 3.1 MiB
    Load Address: 00000000
    Entry Point:  00000000
    Verifying Checksum ...    Bad Data CRC
One9x> Bad Data CRC

configuration:
I've define :
#define CONFIG_CMD_JFFS2
#define CONFIG_JFFS2_NAND
#define CONFIG_JFFS2_CMDLINE

baudrate=9600
bootargs=root=/dev/ram rw ip=::::P2020_One9x:eth0:off console=ttyS0,9600 
ramdisk_size=700000 cache-sram-size=0x10000
bootcmd=setenv bootargs root=/dev/ram rw 
ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off 
console=$consoledev,$baudrate ramdisk_size=700000 
cache-sram-size=0x10000;nand read 1000000 $nandbootaddr 
$nandimgsize;nand read 2000000 $nandramfsaddr $nandramfssize;nand read 
c00000  $nandfdtaddr $nandfdtsize;bootm 1000000 2000000 c00000
bootdelay=10
bootfile=uImage
consoledev=ttyS0
eth1addr=00:11:22:33:44:55
ethact=eTSEC3
ethaddr=00:11:22:33:44:55
ethprime=eTSEC3
fdtaddr=0xc00000
fdtfile=p2020one91.dtb
fdtsize=100000
filesize=3227eb
hostname=P2020_One9x
ipaddr=192.168.1.10
loadaddr=1000000
loads_echo=1
mtddevname=NAND_FILE_SYSTEM
mtddevnum=1
mtdids=nand0=flash
mtdparts=mtdparts=flash:1M(uboot),256M(NAND_FILE_SYSTEM),-(User_Data)
nandbootaddr=10100000
nandfdtaddr=11d00000
nandfdtsize=100000
nandimgsize=400000
nandramfsaddr=10500000
nandramfssize=1800000
netdev=eth0
nfsboot=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath 
ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off 
console=$consoledev,$baudrate $othbootargs;tftp $loadaddr $bootfile;tftp 
$fdtaddr $fdtfile;bootm $loadaddr - $fdtaddr
partition=nand0,1
ramboot=setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate 
$othbootargs; tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr 
$bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr
readJFFS2=fsload 1000000 kernel
rootpath=/opt/nfsroot
serverip=192.168.1.1
uboot=u-boot.bin
updatenand= tftpboot $loadaddr uImage;nand erase $nandbootaddr 
$nandimgsize;nand write $loadaddr $nandbootaddr $nandimgsize;tftpboot 
1000000 rootfs;nand erase $nandramfsaddr $nandramfssize;nand write 
$loadaddr $nandramfsaddr $nandramfssize;tftpboot $loadaddr $fdtfile;nand 
erase $nandfdtaddr $nandfdtsize;nand write $loadaddr  $nandfdtaddr 
$nandfdtsize;

Environment size: 2004/131068 bytes

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] Load kernel from JFFS2 / Bad Data CRC
  2014-03-26 14:40 [U-Boot] Load kernel from JFFS2 / Bad Data CRC Sophie Bonnouvrier
@ 2014-03-26 15:46 ` sophie bonnouvrier
  2014-03-26 16:47   ` sophie bonnouvrier
  0 siblings, 1 reply; 3+ messages in thread
From: sophie bonnouvrier @ 2014-03-26 15:46 UTC (permalink / raw)
  To: u-boot

More information : when I compare the file download in ram with fsload and
nand read I have a word of difference ...
If someone have an idea ...
thanks

sophie

fsload 1000000 uImage
### JFFS2 loading 'uImage' to 0x1000000
### JFFS2 load complete: 3287019 bytes loaded to 0x1000000
One9x> nand read 2000000 $nandbootaddr $nandimgsize

NAND read: device 0 offset 0x10100000, size 0x400000
 4194304 bytes read: OK

One9x> cmp 1000000 2000000 $nandimgsize
word at 0x01013a48 (0x490daeaf) != word at 0x02013a48 (0x490d00ae)
Total of 20114 word(s) were the same
One9x> fsload c00000 rootfs
### JFFS2 loading 'rootfs' to 0xc00000
### JFFS2 load complete: 24973697 bytes loaded to 0xc00000
One9x> nand read 2000000 $nandramfsaddr $nandramfssize

NAND read: device 0 offset 0x10500000, size 0x1800000
 25165824 bytes read: OK
One9x> cmp c00000 2000000 nandramfssize
Total of 0 word(s) were the same
One9x> cmp c00000 2000000 $nandramfssize
word at 0x00c0fcd0 (0xfdf0ddf) != word at 0x0200fcd0 (0xfdf0d00)
Total of 16180 word(s) were the same
One9x> fsload c00000 dtb
### JFFS2 loading 'dtb' to 0xc00000
### JFFS2 load complete: 14843 bytes loaded to 0xc00000
One9x> nand read 2000000 $nandfdtaddr $nandfdtsize

NAND read: device 0 offset 0x11d00000, size 0x100000
 1048576 bytes read: OK
One9x> cmp c00000 2000000 $nandfdtsize
word at 0x00c01580 (0x2ab73) != word at 0x02001580 (0x2ab)
Total of 1376 word(s) were the same



--
View this message in context: http://u-boot.10912.n7.nabble.com/Load-kernel-from-JFFS2-Bad-Data-CRC-tp176605p176607.html
Sent from the U-Boot mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] Load kernel from JFFS2 / Bad Data CRC
  2014-03-26 15:46 ` sophie bonnouvrier
@ 2014-03-26 16:47   ` sophie bonnouvrier
  0 siblings, 0 replies; 3+ messages in thread
From: sophie bonnouvrier @ 2014-03-26 16:47 UTC (permalink / raw)
  To: u-boot

Ok, I've found my error ....

I don't used FTP in binary mode when I download file in filesystem.

Sorry, for the disruption.

Sophie



--
View this message in context: http://u-boot.10912.n7.nabble.com/Load-kernel-from-JFFS2-Bad-Data-CRC-tp176605p176610.html
Sent from the U-Boot mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-26 16:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-26 14:40 [U-Boot] Load kernel from JFFS2 / Bad Data CRC Sophie Bonnouvrier
2014-03-26 15:46 ` sophie bonnouvrier
2014-03-26 16:47   ` sophie bonnouvrier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.