您的位置:首页 > 其它

文件系统的移植(四):cramfs 文件系统的移植

2013-06-06 12:14 375 查看
内 核 版 本: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

显示目录结果同移植(一)。

ky-cramfs.bin为编译好的内核。

3、制作映像文件

[lingyun@localhost keyue]$ mkcramfs rootfs_tree ky-rootfs.cramfs

将映像文件拷贝到tftp下。

[lingyun@localhost keyue]$ cp ky-rootfs.cramfs /tftp/

4、将文件系统烧入开发板

4.1、 设置启动参数
[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

烧录的过程省略,结果如下:



至此,文件系统已经烧入开发板,可以看到自己制作的文件系统。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: