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

内 核 版 本: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

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

       至此,文件系统已经烧入开发板,可以看到自己制作的文件系统。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值