From 78026640e6be9343fb9bce07b352c9da02d0c43f Mon Sep 17 00:00:00 2001 From: Pierre-Loup GOSSE Date: Fri, 24 Oct 2025 10:44:45 +0200 Subject: [PATCH] ref-manual/variables.rst: document IMAGE_EXTRA_PARTITION_FILES Added by commit 3892912bd7e0 ("wic: extra partition plugin") in OE-Core. [AG: formatting tweaks] (From yocto-docs rev: 3d2aaec8218a7cad5653face152e9cd45257aefe) Signed-off-by: Pierre-Loup GOSSE Signed-off-by: Antonin Godard Signed-off-by: Richard Purdie --- documentation/ref-manual/variables.rst | 64 ++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index b6d4fc523f..1c4689343d 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst @@ -3956,6 +3956,70 @@ system and gives an overview of their function and contents. material for Wic is located in the ":doc:`/ref-manual/kickstart`" chapter. + :term:`IMAGE_EXTRA_PARTITION_FILES` + A space-separated list of files installed into the extra partition(s) + when preparing an image using the Wic tool with the + ``extra_partition`` source plugin. By default, + the files are + installed under the same name as the source files. To change the + installed name, separate it from the original name with a semi-colon + (;). Source files need to be located in + :term:`DEPLOY_DIR_IMAGE`. Here is an + example:: + + IMAGE_EXTRA_PARTITION_FILES = "foobar file.conf;config" + + In the above example, the file ``foobar`` is installed with its original name + ``foobar``, while the file ``file.conf`` is installed and renamed to ``config``. + + Alternatively, source files can be picked up using a glob pattern. + However, hidden files are ignored, and the pattern is non-recursive + (subdirectories are ignored). + The destination file will have the same name as the base + name of the source file path. To install files into a renamed directory + within the target location, pass its name after a semi-colon (;). + Here are two examples:: + + IMAGE_EXTRA_PARTITION_FILES = "foo/*" + IMAGE_EXTRA_PARTITION_FILES = "foo/*;bar/" + + The first line in this example + installs all files from ``foo`` directory + into the root of the target partition. The second line in this example installs + the same files into a ``bar`` directory within the target partition. + The ``bar/`` directory is automatically created if it does not exist. + + You can also specify the target by label, UUID or partition name if multiple + extra partitions coexist. Let's take the following example. This would be + the WKS file for the image currently being built:: + + part --source extra_partition --fstype=ext4 --label foo + part --source extra_partition --fstype=ext4 --uuid e7d0824e-cda3-4bed-9f54-9ef5312d105d + part --source extra_partition --fstype=ext4 --part-name config + + And the following configuration:: + + IMAGE_EXTRA_PARTITION_FILES_label-foo = "foo/*" + IMAGE_EXTRA_PARTITION_FILES_uuid-e7d0824e-cda3-4bed-9f54-9ef5312d105d = "foo/*;bar/" + IMAGE_EXTRA_PARTITION_FILES_part-name-config = "config" + + Then: + + - The partition labeled "foo" would get all files from the ``foo`` + directory. + + - The partition whose UUID is "e7d0824e-cda3-4bed-9f54-9ef5312d105d" + would get all files from the ``foo`` directory, installed into a + ``bar`` directory. + + - The partition named "config" would get the file ``config``. + + You can find information on how to use the Wic tool in the + ":ref:`dev-manual/wic:creating partitioned images using wic`" + section of the Yocto Project Development Tasks Manual. Reference + material for Wic is located in the + ":doc:`/ref-manual/kickstart`" chapter. + :term:`IMAGE_FEATURES` The primary list of features to include in an image. Typically, you configure this variable in an image recipe. Although you can use this