Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] fs/ubi: UBI/UBIFS option sharing
@ 2025-07-16 13:17 Gero Schwäricke
  0 siblings, 0 replies; only message in thread
From: Gero Schwäricke @ 2025-07-16 13:17 UTC (permalink / raw)
  To: buildroot; +Cc: yann.morin.1998

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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-16 13:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-16 13:17 [Buildroot] fs/ubi: UBI/UBIFS option sharing Gero Schwäricke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox