| Message ID | 20251002144534.160791-1-pierre-loup.gosse@smile.fr |
|---|---|
| Headers | show |
| Series | wic: extra partition plugin | expand |
Hi Pierre-Loup, On Thu Oct 2, 2025 at 4:45 PM CEST, Pierre-loup GOSSE via lists.openembedded.org wrote: > From: Pierre-Loup GOSSE <pierre-loup.gosse@smile.fr> > > Some files are not part of the root filesystem and must be installed in a > separate partition. This is already handled for boot files by the > bootimg_partition plugin and its IMAGE_BOOT_FILES BitBake variable. > > This patch introduces a similar approach for generic "extra" files. A new > extra_partition plugin is added, which populates a partition with files > listed in the new IMAGE_EXTRA_PARTITION_FILES BitBake variable. Like the > bootimg_partition plugin, files should be deployed to the DEPLOY_DIR_IMAGE > directory. > > The plugin supports: > - Glob pattern matching for file selection. > - File renaming. > - Suffixes to specify the target partition (by label, UUID, or partname), > enabling multiple extra partitions to coexist, similar to the > bootimg_partition plugin. > > For example, with the following (simplified) wks file: > part / --source extra_partition --fstype=ext4 --label foo --size 5M > part / --source extra_partition --fstype=ext4 --uuid e7d0824e-cda3-4bed-9f54-9ef5312d105d --size 5M > part / --source extra_partition --fstype=ext4 --label bar --size 5M > > And this configuration: > IMAGE_EXTRA_PARTITION_FILES_label-foo = "bar.conf;foo.conf" > IMAGE_EXTRA_PARTITION_FILES_uuid-e7d0824e-cda3-4bed-9f54-9ef5312d105d = "bar.conf;foobar.conf" > IMAGE_EXTRA_PARTITION_FILES = "foo/*" > WICVARS:append = "\ > IMAGE_EXTRA_PARTITION_FILES_label-foo \ > IMAGE_EXTRA_PARTITION_FILES_uuid-e7d0824e-cda3-4bed-9f54-9ef5312d105d \ > " > > The file bar.conf is installed as foo.conf in the first partition, as > foobar.conf in the second partition, and the last partition installs all > files from the foo directory. This was merged on master. Could you send a docs patch documenting the new variable in ref-manual/variables.rst? Thanks, Antonin
From: Pierre-Loup GOSSE <pierre-loup.gosse@smile.fr> Some files are not part of the root filesystem and must be installed in a separate partition. This is already handled for boot files by the bootimg_partition plugin and its IMAGE_BOOT_FILES BitBake variable. This patch introduces a similar approach for generic "extra" files. A new extra_partition plugin is added, which populates a partition with files listed in the new IMAGE_EXTRA_PARTITION_FILES BitBake variable. Like the bootimg_partition plugin, files should be deployed to the DEPLOY_DIR_IMAGE directory. The plugin supports: - Glob pattern matching for file selection. - File renaming. - Suffixes to specify the target partition (by label, UUID, or partname), enabling multiple extra partitions to coexist, similar to the bootimg_partition plugin. For example, with the following (simplified) wks file: part / --source extra_partition --fstype=ext4 --label foo --size 5M part / --source extra_partition --fstype=ext4 --uuid e7d0824e-cda3-4bed-9f54-9ef5312d105d --size 5M part / --source extra_partition --fstype=ext4 --label bar --size 5M And this configuration: IMAGE_EXTRA_PARTITION_FILES_label-foo = "bar.conf;foo.conf" IMAGE_EXTRA_PARTITION_FILES_uuid-e7d0824e-cda3-4bed-9f54-9ef5312d105d = "bar.conf;foobar.conf" IMAGE_EXTRA_PARTITION_FILES = "foo/*" WICVARS:append = "\ IMAGE_EXTRA_PARTITION_FILES_label-foo \ IMAGE_EXTRA_PARTITION_FILES_uuid-e7d0824e-cda3-4bed-9f54-9ef5312d105d \ " The file bar.conf is installed as foo.conf in the first partition, as foobar.conf in the second partition, and the last partition installs all files from the foo directory. Pierre-Loup GOSSE (1): wic: extra partition plugin meta/classes-recipe/image_types_wic.bbclass | 1 + meta/lib/oeqa/selftest/cases/wic.py | 43 +++++- .../lib/wic/plugins/source/extra_partition.py | 134 ++++++++++++++++++ 3 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 scripts/lib/wic/plugins/source/extra_partition.py