]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
wic: add --extra-partition-space option to set unused space
authorPierre-Loup GOSSE <pierre-loup.gosse@smile.fr>
Wed, 3 Sep 2025 14:45:27 +0000 (16:45 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 8 Sep 2025 17:02:37 +0000 (18:02 +0100)
commit22fd1702aedf40257aa53963b62b5ef1bbd2818a
treec2d34e73f1dcdb4165414831b79bb9c44665bc93
parent7fc9f49262379442503f010933047e421efcf5f3
wic: add --extra-partition-space option to set unused space

By default, the content of the partition is filled by the filesystem
without leaving any unused free space. The --extra-space flag adds
extra space to the filesystem size, not to the partition.

Unused free space after the filesystem can be useful for some cases,
such as encrypting a partition at runtime.
With --extra-partition-space 32M, we ensure that the last 32M of the
partition is unused: this space does not contain filesystem data and
can store the LUKS2 header.

The implementation sets a difference between the partition and
filesystem size:
  - With --fixed-size, the extra part space is removed from the
    filesystem size.
  - Otherwise (with or without --size flag), the extra part space is
    added to the partition size.

Signed-off-by: Pierre-Loup GOSSE <pierre-loup.gosse@smile.fr>
CC: Alexander Kanavin <alex.kanavin@gmail.com>
CC: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/wic.py
scripts/lib/wic/help.py
scripts/lib/wic/ksparser.py
scripts/lib/wic/partition.py