使用initramfs的内核配置(使用initramfs做根文件系统): ------------------------------------------------------ General setup ---> [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support (/rootfs_dir) Initramfs source file(s) //输入根文件系统的所在目录
initrd and initramfs http://blog.sina.com.cn/s/blog_622013d90100fr04.html --------------------------------------------- # # General setup # ... CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="<path_to>/target_fs>" ... # # UBI - Unsorted block images # ... CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=1 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
Installation initramfs
No special installation like with initrd is necessary. The initramfs is already in the kernel. If you start the kernel, the initramfs is already there. Therefore, there is no root=/dev/ram0 rw initrd=0x87000000,8M bootargs option necessary. Remove this if you still have it!