2. 创建 jffs2 文件系统镜像 :sudo ~/bin/mkfs.jffs2 -e 0x4000 -s 0x200 -d filesystem -o filesystem.jffs2 -p 1400000
3. 复制文件系统镜像到/tftpboot/目录
4. tftp下载 jffs2文件系统镜像:
fs2410# tftp 30800000 filesystem.jffs2
TFTP from server 192.168.20.192; our IP address is 192.168.20.253
Filename 'filesystem.jffs2'.
Load address: 0x30800000
Loading: #################################################################
####################
done
Bytes transferred = 5062656 (4d4000 hex)
5. 擦写nand flash 擦除跟文件系统分区部分的flash空间
fs2410# nand erase 400000 1400000
NAND erase: device 0 offset 4194304, size 20971520 ...
OK
6. 写jffs2文件系统镜像到nandflash 根文件系统分区
fs2410# nand write.jffs2 30800000 400000 4d4000 //烧写jffs2文件系统镜像,文件系统下载是多大,这里的烧录大小就写多大,否则会出现如下错误提示:
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x003f0000: 0x80b0 instead
NAND write: device 0 offset 4194304, size 5062656 ...
5062656 bytes written: OK
7. 烧录ok,设置启动参数
setenv bootargs root=/dev/mtdblock2 rootfstype=jffs2 rw console=ttySAC0,115200 init=/linuxrc mem=64M
saveenv