内 核 版 本:linux-3.0
u-boot版本:u-boot-2010.09
开发板型号:FL2440
1、对根文件系统进行修改
无修改
2、添加内核对 cramfs 的支持
[lingyun@localhost linux-3.0]$ vt100
[lingyun@localhost linux-3.0]$ make menuconfig
File systems --->
Miscellaneous filesystems --->
<*> Compressed ROM file system support (cramfs)
修改Makefile
[lingyun@localhost linux-3.0]$ vim Makefile
修改195、196行
[lingyun@localhost linux-3.0]$ make
编译过程省略
[lingyun@localhost linux-3.0]$ ls
显示目录结果同移植(一)。
3、制作映像文件
[lingyun@localhost keyue]$ mkcramfs rootfs_tree ky-rootfs.cramfs
将映像文件拷贝到tftp下。
[lingyun@localhost keyue]$ cp ky-rootfs.cramfs /tftp/
4、将文件系统烧入开发板
[u-boot@keyue]# set bcramfs 'tftp 30800000 ky-rootfs.cramfs;nand erase f00000 600000;nand write 30800000 f00000 600000'
[u-boot@keyue]# set bootargs 'noinitrd root=/dev/mtdblock3 rootfstype=cramfs init=/linuxrc console=ttyS0,115200'
[u-boot@keyue]# set bootcmd_cramfs 'nand read 30008000 100000 400000;bootm 30008000'
[u-boot@keyue]# set bootcmd 'run bootcmd_cramfs'
[u-boot@keyue]#set bkr 'tftp 30008000 ky-cramfs.bin;nand erase 100000 800000;nand write 30008000 100000 800000'
[u-boot@keyue]# save
参数设置成功。
4.2、将文件系统与内核烧入开发板
[u-boot@keyue]# run bkr
运行过程略。
[u-boot@keyue]# run bcramfs
运行过程略。
[u-boot@keyue]# boot
烧录的过程省略,结果如下:
至此,文件系统已经烧入开发板,可以看到自己制作的文件系统。