[OE-core] UBI containing multiple volumes

JH jupiter.hce at gmail.com
Sun Dec 1 21:09:45 UTC 2019


Hi,

What is the best way to create UBI multiple volumes? It seems UBI
volumes could be built using receipts from OE image_types.bbclass or
using off line command mkfs.ubifs and ubinize to set up in u-boot
bootload phase.

Secondly, most documents I found only talking about using one MTD
partition for one single UBIFS volume, appreciate if anyone could
point me documents or examples how to use one MTD partition for
multiple UBIFS volume partitions.

Correct me, but I think it is better to avoid MTD partitions if the
UBIFS volume partitions can be used. I am planing to create 4 UBIFS
volume partitions in an MTD partition and a single UBI0:

$ vi ubinize.cfg

[kernel1]
mode=ubi
image=zImage
vol_id=0
vol_size=10MiB
vol_type=static
vol_name=kernel1

[kernel2]
mode=ubi
image=zImage
vol_id=1
vol_size=10MiB
vol_type=static
vol_name=kernel2

[rootfs]
mode=ubi
image=rootfs_filesystem
vol_id=2
vol_size=150MiB
vol_type=static
vol_name=rootfs

[data]
mode=ubi
image=rootfs_data
vol_id=3
vol_size=83MiB
vol_type=dynamic
vol_name=data
vol_flags=autoresize

The most confusing issues are how to create the image contents, here
are my questions:

In the kernel volumes, should it be the image=zImage (which is kernel
image built from OE), or should it be image=rootfs_kernel from the
ubimkvol /dev/ubi0_0 -s 10MiB -N rootfs_kernel?

In rootfs volume, should it be image=rootfs_filesystem where the
rootfs_filesystem is created by ubimkvol /dev/ubi0_2 -s 160MiB -N
rootfs_filesystem?

In data volume, as the same, should it be image=rootfs_data where the
rootfs_data is created by ubimkvol /dev/ubi0_3 -s 10MiB -N
rootfs_data?

Thank you.

Kind regards,

- jh


More information about the Openembedded-core mailing list