b、
ops.mode = MTD_OOB_RAW;
c、
在drivers\mtd\nand\Nand_util.c文件中把:
if (!need_skip && !(flags & WITH_DROP_FFS)) {
改为
if (!need_skip && !(flags & WITH_DROP_FFS) && !(flags & WITH_YAFFS_OOB)) {
d、烧写:
更新nor flash里的UBOOT:
tftp 30000000 u-boot.bin; protect off all; erase 0 3ffff; cp.b 30000000 0 40000
reset
烧写YAFFS:
tftp 30000000 fs_mini_mdev.yaffs2
nand erase.part rootfs
nand write.yaffs 30000000 260000 889bc0 //0x00260000是往哪烧写,889bc0是文件实际的大小,
//这两个参数不能用rootfs代替,因为实际大小肯定比rootfs分区小,
//直接用rootfs分区会把不相干的东西都烧写进去。
或:tftp 30000000 fs_mini_mdev.yaffs2;nand erase.part rootfs;nand write.yaffs 30000000 260000 889bc0
set bootargs console=ttySAC0 root=/dev/mtdblock3
//yaffs文件系统不用指定rootfstype=yaffs,它会自动去找,去匹配。
set bootargs console=ttySAC0,115200 root=/dev/mtdblock3 //增加串口波特率设置
//set bootargs console=ttySAC0 root=/dev/mtdblock3 rootfstype=yaffs
//set bootargs console=ttySAC0,115200 root=/dev/mtdblock3 rootfstype=yaffs //增加串口波特率设置
boot
17、制作补丁:
make distclean
rm u-boot.dis
cd ..
mv u-boot-2012.04.01 u-boot-2012.04.01_100ask
tar xjf u-boot-2012.04.01.tar.bz2
diff --help
diff -urN u-boot-2012.04.01 u-boot-2012.04.01_100ask > u-boot-2012.04.01_100ask_colin.patch
diff -urN u-boot-2012.04.01 u-boot-2012.04.01_100ask > u-boot-2012.04.01_100ask.patch
怎么用这个补丁:
cd u-boot-2012.04.01
patch -p1 < ../u-boot-2012.04.01_100ask_colin.patch
make smdk2440_config
make
最重要的一点:
修改NFS.C里面的#define NFS_TIMEOUT (10*2000UL)