关闭

How to use Cramfs as linux rootfs?

标签: Cramfsrootfs
189人阅读 评论(0) 收藏 举报
分类:
@author:mingliang.lu
@date  :2015112010:51:58
@email :mingllu@163.com

1. Background


  • cramfs is a readonly-system,you can not write any data in this system.

  • if you want to use cramfs. you should config your linux kernel support your rootfs. You can find config place here :
    ->File system
    —–>Miscellaneous filesystems (MISC_FILESYSTEMS [=y])
    ———>Compressed ROM file system support(cramfs)

2. How to make cramfs?


mkfs.cramfs rootfs rootfs.cramfs

3. How to write Cramfs?


Step1. Enter U-boot console

1).reset/reboot your system and enter into uboot console

Step2. Tftp download rootfs image

2).tftp c0008000 rootfs.cramfs

Step3. nand erase rootfs sector

3).nand erase rootfs/ nand erase nand_flash_rootfs_sector_start rootfs_sector_size

Step4. nand write rootfs into sector

4).nand write c0008000 nand_flash_rootfs_sector_start rootfs_size

4. How to set u-boot bootargs to guide Cramfs as rootfs?


setenv bootargs noinitrd mem=128m root=/dev/mtdblock4 init=/linuxrc console=ttySAC2,115200 
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:53254次
    • 积分:1250
    • 等级:
    • 排名:千里之外
    • 原创:68篇
    • 转载:0篇
    • 译文:1篇
    • 评论:2条