Skip to contentSkip to conversation

fs/ubi: UBI/UBIFS option sharing

Buildroot Gero Schwäricke 1 participant 1 message Jul 16, 2025

lore
Share & tools
lore
#0 lore raw

Hi,

I stumbled upon the following inconsistency regarding UBI/UBIFS:

fs/ubi/ubi.mk uses the option BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE from fs/ubifs/Config.in. This assumes that if you're building a UBI image, you are also building a ubifs rootfs. That's not always the case. I stumbled upon this when building a ubi image with a squashfs rootfs.

There are:

- PEBSIZE (in ubi)
- SUBSIZE (in ubi)
- MINIOSIZE (in ubifs)
- LEBSIZE (in ubifs)

PEBSIZE, SUBSIZE, MINIOSIZE are all inputs from the flash layout. LEBSIZE is based on these inputs and is the block size for all FS that need to fit into the UBI image (rootfs or not).

I think this is a leftover from the migration from a combined ubifs-in-ubi-image approach to the separate ubi and ubifs filesystems in

9fc21664e8 (fs/ubifs: spin-off ubi to be its own filesystem, 2017-12-28)

Currently we're just building the ubifs rootfs und don't use. It's not a huge deal, it clutters the config a little and takes a few seconds longer to build.

I wonder what a better solution could look like. Here are some ideas:

1. Move MINIOSIZE and LEBSIZE to ubi/Config.in.
2. Create a NAND support option in fs/Config.in with the NAND parameters that ubi and ubifs can depend on.
3. Remove fs/ubi entirely and use ubinize like genimage.

Granted, any of these would require all users of fs/ubi and/or fs/ubifs to do a major migration. So maybe option 4. leave everything as is? :)

Any thoughts on this?

Best,
Gero
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot