hi,all

now I want to boot from nand and using jffs2 filesystem , replace
network filesystem.  I use the davinci dvevm for this test.
I have done some work for this design, they are :

Part I-- make kernel

1.1 add nand partion
static struct mtd_partition nand_partitions[] = {
        /* bootloader (U-Boot, etc) in first sector */
        {
              .name             = "bootloader",
              .offset           = 0,
              .size             = SZ_256K,
              .mask_flags       = MTD_WRITEABLE, /* force read-only */
        },
        /* bootloader params in the next sector */
        {
              .name             = "params",
              .offset           = MTDPART_OFS_APPEND,
              .size             = SZ_128K,
              .mask_flags       = MTD_WRITEABLE, /* force read-only */
        },
        /* kernel */
        {
              .name             = "kernel",
              .offset           = MTDPART_OFS_APPEND,
              .size             = SZ_4M,
              .mask_flags       = 0
        },
        /* file system */
        {
              .name             = "filesystem",
              .offset           = MTDPART_OFS_APPEND,
              .size             = MTDPART_SIZ_FULL,
              .mask_flags       = 0
        }
}; 

1.2 add nand flash support in kernel config
1.3 add jffs2  support in kernel config

 it seems that    the current montavista 2.6.10 doesn't  support  jffs2
filesystem , only jfs . 
any suggestions?

Part II make jffs2 filesystem
1.  mkjs.jffs2  -r  rootfs  -o jffs2.img

Part III  burn kernel and filesystem  on nand
1. flash_eraseall  /dev/mtd2
2. nandwrite  -p /dev/mtd2 uImage
3. flash_eraseall /dev/mtd3
4. nandwrite -p /dev/mtd3 jffs2.img

Part IV set enviroment for nand boot
1. setenv bootcmd  'nboot 0x80200000 0 60000'
2. setenv autostart yes
3. setenv bootargs console=ttyS0,115200n8 noinitrd rw ip=off
root=/dev/mtdblock3  mem=120M rootfstype=jffs2
4. savenv

Part V boot
but the result is not right.the error is

Loading from device 0: <NULL> at 0x2000000 (offset 0x60000)
   Image Name:   Linux-2.6.10_mvl401
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1127008 Bytes =  1.1 MB
   Load Address: 80008000
   Entry Point:  80008000
Automatic boot of image at addr 0x80200000 ...
## Booting image at 80200000 ...
   Image Name:   Linux-2.6.10_mvl401
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1127008 Bytes =  1.1 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... Bad Data CRC
DaVinci EVM #

why error occur ?

thanks?



_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to