移植yaffs文件系统: (linux-3.4.2内核)
1.git clone git:// //用此获得yaffs2源码包
1.1 解压源码包
2. 打补丁
cd yaffs-dir
./patch-ker.sh c m linux-tree 比如 ./patch-ker.sh c m /work/system/linux-3.4.2
3. 配置内核支持yaffs
-> file systems |
| -> miscellaneous filesystems (misc_filesystems [=y]) |
| -> yaffs2 file system support (yaffs_fs [=n]) |
| -> 512 byte / page devices (yaffs_yaffs1 [=n]) |
| -> use older-style on-nand data format with pagestatus byte
选上,使用默认值
4. 编译、使用uimage
编译出现错误:
fs/yaffs2/yaffs_vfs.c: in function 'yaffs_mtd_put_super':
fs/yaffs2/yaffs_vfs.c:2514: error: 'struct mtd_info' has no member named 'sync'
fs/yaffs2/yaffs_vfs.c:2515: error: 'struct mtd_info' has no member named 'sync'
fs/yaffs2/yaffs_vfs.c: in function 'yaffs_internal_read_super':
fs/yaffs2/yaffs_vfs.c:2702: error: 'struct mtd_info' has no member named 'erase'
在新版本中sync要加下划线即:_sync 等。
fs/yaffs2/yaffs_vfs.c:2967: error: implicit declaration of function 'd_alloc_root'
此处改为:d_make_root(inode);
5. 制作、烧写yaffs映象
mkyaffs2image fs_mini_mdev_new fs_mini_mdev_new.yaffs2
uboot:
nfs 30000000 172.17.28.159:/work/nfs_root/fs_mini_mdev_new.yaffs2
nand erase.part rootfs /* 注:1.1.6的uboot 擦出命令不一样 .part 要去掉,即:
nand erase rootfs */
nand write.yaffs 30000000 260000 $(filesize)
6. 启动
set bootargs console=ttysac0,115200 root=/dev/mtdblock3
nfs 32000000 172.17.28.159:/work/nfs_root/uimage_yaffs
bootm 32000000
阅读(1198) | 评论(0) | 转发(0) |