UBI 文件系统的支持 与 有关文件系统的image的制作

背景

UBI文件系统是一种较新类型的文件系统。

内核支持

Symbol: MTD_UBI [=y]
Type  : tristate
Prompt: Enable UBI - Unsorted block images
  Location:
    -> Device Drivers
      -> Memory Technology Device (MTD) support (MTD [=y])
  Defined at drivers/mtd/ubi/Kconfig:1
  Depends on: MTD [=y]
  Selects: CRC32 [=y] 

制作

Ubuntu安装 有关工具

sudo apt-get install mtd-utils

mkfs.ubifs -r rootfs -m 2048 -e 129024 -c 812 -o ubifs.img #ubinize -o ubi.img -m 2048 -p 128KiB -s 512 /home/lht/omap3530/tools/ubinize.cfg

-r:制定文件内容的位置
-m:页面大小
-e:逻辑擦除块大小
-p:物理擦除块大小
-c:最大的逻辑擦除块数量
对我们这种情况,文件系统最多可以访问卷上的129024*812=100M空间
-s:最小的硬件输入输出页面大小,如:k9f1208为256(上下半页访问)
其中,ubinize.cfg的内容为:

[ubifs]
mode=ubi
image=ubifs.img
vol_id=0
vol_size=100MiB
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize

原文地址:https://www.cnblogs.com/schips/p/12556809.html