制作UBI Filesystem

参见AM335X UBIFS NandFlash Programming Guide v1.1.pdf

1,首先安装编译环境,这里我就不细说了,文档里有。

2,找到原厂包里的filesystem目录,看到tisdk-rootfs-am335x-evm.tar.gz

输入命令:mkdir rootfs(创建一个目录,用来存放解压的rootfs)

tar zxvf tisdk-rootfs-am335x-evm-tar-gz -C rootfs(解压文件系统)

3,按文档里执行:mkfs.ubifs -r rootfs/ -F -o ubifs.img -m 2048 -e 126976 -c 1580 悲了个催的,报了个错:Error:max_leb_cnt too low(2493 needed)这个是rootfs文件夹里有过大的文件造成的。这时发现filesystem目录还有一个包base-rootfs-am335x-evm.tar.gz,改用这个吧,EVM的文件大又多,我也用不上。重来1,2,3步OK

4,按文件说明制作ubinize.cfg,下面为内容:

[ubifs]                <== Section header
  mode=ubi              <== Volume mode (other option is static)
  image=ubifs.img       <== Source image
  vol_id=0              <== Volume ID in UBI image
  vol_size=192MiB       <== Volume size
  vol_type=dynamic      <== Allow for dynamic resize
  vol_name=rootfs       <== Volume name
  vol_flags=autoresize  <== Autoresize volume at first mount

5,输入命令:ubinize -o ubi.img -m 2048 -p 128KiB -s 512 -O 2048 ubinize.cfg 这样就生成ubi.img了

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
UBI image镜像文件是指通过在u-boot中将ubi.img文件写入到nand中所生成的文件。为了配置Linux内核以支持UBI文件系统,需要在内核配置中启用UBI选项。具体配置步骤为进入Device Drivers -> Memory Technology Device (MTD) support -> UBI - Unsorted block images,以及File systems -> Miscellaneous filesystems -> UBIFS file system support。关于制作UBI镜像文件的具体过程,可以参考文章《UBI文件系统简介 与 利用mkfs.ubifs和ubinize两个工具制作UBI镜像》中的详细说明。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [嵌入式linux新手入门手记-制作UBI文件镜像](https://blog.csdn.net/weixin_39736913/article/details/111973173)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [【UBI文件系统制作】-(3)制作UBI文件系统镜像](https://blog.csdn.net/weixin_40407893/article/details/101216142)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值