[U-Boot] How can I use yaffs2 in uboot

jackfriend jackfriend at 163.com
Fri Jun 11 03:30:39 CEST 2010


Change CONFIG_SYS_MALLOC_LEN ,Now I can write  a yaffs2 file system image (59M) in nand flash  (/flash/a )

but The Linux how to find the file system image?(the system  support yaffs2)
set bootargs noinitrd root=/dev/mtdblock3 rootfstype=yaffs2 rw console=ttySAC0,115200 init=/linuxrc mem=64M

this way doesn't work

I use

my2440# nand write.yaffs 30008000 0x580000 3b00000 
NAND write: device 0 offset 0x580000, size 0x3b00000
written: OK

my2440#tftp zImage.img

and then bootm  linux can find the file system image


 [*]   MTD partitioning support                           
        < >     RedBoot partition table parsing                                     
        [*]     Command line partition table parsing                      
        < >     TI AR7 partitioning support       
static struct mtd_partition mini2440_default_nand_part[] __initdata = {

              [0] = {                
                    .name   = "u-boot",
                    .size   = SZ_256K + SZ_128K,               
                    .offset = 0,
                       }, 
    
             [1] = {                
                     .name   = "u-boot-env",
                     .size   = SZ_128K,               
                     .offset = SZ_256K + SZ_128K,
                      },  
     
             [2] = {                
                     .name   = "kernel",
                     .size   = 0x00500000,               
                     .offset = SZ_512K,
                      },  
     
             [3] = {               
                      .name   = "root",
                      .offset = SZ_512K + 0x00500000,
                      .size   = MTDPART_SIZ_FULL,        
                       },
       };

in /uboot/fs/yaffs2/yaffscfg.c  flashDev->startBlock =44;
flashDev->endBlock = 800;


More information about the U-Boot mailing list