前面已经制作好工具mkyaffsimage,现在就可以使用它来制作根文件系统的映象文件,具体如下:
1、huanghuang@huanghuang-desktop:/work/nfs_root$ mkyaffsimage fs_mini fs_mini.yaffsmkyaffsimage: image building tool for YAFFS built Dec 13 2009
Processing directory fs_mini into image file fs_mini.yaffs
Object 257, fs_mini/bin is a directory
Object 258, fs_mini/bin/rmdir is a symlink to "busybox"
Object 259, fs_mini/bin/lsattr is a symlink to "busybox"
。。。。。。。。。。。。。。。。
。。。。。。。。。。。。。。。。
huanghuang@huanghuang-desktop:/work/nfs_root$ ls
fs_mini fs_mini.tar.bz2 fs_qtopia.tar.bz2
fs_mini_mdev.tar.bz2 fs_mini.yaffs fs_xwindow.tar.bz2
huanghuang@huanghuang-desktop:/work/nfs_root$ ls -l
总计 68124
drwxr-xr-x 13 root root 4096 2009-12-12 15:15 fs_mini
-rwxr-xr-x 1 root root 2832504 2009-11-17 03:53 fs_mini_mdev.tar.bz2
-rwxr-xr-x 1 root root 2748536 2009-11-17 03:53 fs_mini.tar.bz2
-rw------- 1 huanghuang huanghuang 20755680 2009-12-13 14:18 fs_mini.yaffs
-rwxr-xr-x 1 root root 16331984 2009-11-17 03:53 fs_qtopia.tar.bz2
-rwxr-xr-x 1 root root 27072948 2009-11-17 03:53 fs_xwindow.tar.bz2
huanghuang@huanghuang-desktop:/work/nfs_root$ sudo chmod 777 fs_mini.yaffs
huanghuang@huanghuang-desktop:/work/nfs_root$ sudo cp fs_mini.yaffs /var/lib/tftpboot
2、Open> tftp 0x30000000 fs_mini.yaffs
Open> nand erase 0xA00000 0x3600000
Open> write.yaffs 0x30000000 0xA00000 $(filesize)
3、修改命令行参数以MTD2分区作为根文件系统,
Open> save bootargs noinitrd console=ttySAC0 root=/dev/mtdblock2 rootfstype=yaffs
Open>saveenv
4、再把内核重新再烧入板中,启动后如下信息:
。。。。。。。。。。。
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
mdev: /etc/mdev.conf: No such file or directory
Please press Enter to activate this console.
starting pid 741, tty '/dev/s3c2410_serial0': '/bin/sh'
# cd /
# ls
bin lib mnt sbin usr
dev linuxrc proc sys
etc lost+found root tmp
# shutdown -h now
-/bin/sh: shutdown: not found
# sudo shutdown
-/bin/sh: sudo: not found
# halt
starting pid 747, tty '': '/bin/umount'
The system is going down NOW!
Sending SIGTERM to all processes
Requesting system halt processes
System halted.
以上启动过程中,发现还有mdev: /etc/mdev.conf: No such file or directory错误信息,
这个问题,再慢慢解决,
但是重启之后发现板子没反应了。。。。只能再烧一遍u-boot。