diff --git a/documentation/ref-manual/migration.xml b/documentation/ref-manual/migration.xml
index 7c78c9dd50..984485ede2 100644
--- a/documentation/ref-manual/migration.xml
+++ b/documentation/ref-manual/migration.xml
@@ -1413,6 +1413,35 @@
it encounters the variable.
+
+
+ Preprocess and Post Process Command Variable Behavior
+
+
+ The following variables now expect a semicolon separated
+ list of functions to call and not arbitrary shell commands:
+
+ ROOTFS_PREPROCESS_COMMAND
+ ROOTFS_POSTPROCESS_COMMAND
+ SDK_POSTPROCESS_COMMAND
+ POPULATE_SDK_POST_TARGET_COMMAND
+ POPULATE_SDK_POST_HOST_COMMAND
+ IMAGE_POSTPROCESS_COMMAND
+ IMAGE_PREPROCESS_COMMAND
+ ROOTFS_POSTUNINSTALL_COMMAND
+ ROOTFS_POSTINSTALL_COMMAND
+
+ For migration purposes, you can simply wrap shell commands in
+ a shell function and then call the function.
+ Here is an example:
+
+ my_postprocess_function() {
+ echo "hello" > ${IMAGE_ROOTFS}/hello.txt
+ }
+ ROOTFS_POSTPROCESS_COMMAND += "my_postprocess_function; "
+
+
+
diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml
index dfe775b23f..e70445762f 100644
--- a/documentation/ref-manual/ref-variables.xml
+++ b/documentation/ref-manual/ref-variables.xml
@@ -5433,24 +5433,50 @@
IMAGE_POSTPROCESS_COMMAND
- IMAGE_POSTPROCESS_COMMAND[doc] = "Added by classes to run post processing commands once the OpenEmbedded build system has created the image."
+ IMAGE_POSTPROCESS_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system has created the final image output files."
- Added by classes to run post processing commands once the
- OpenEmbedded build system has created the image.
- You can specify shell commands separated by semicolons:
+ Specifies a list of functions to call once the
+ OpenEmbedded build system has created the final image
+ output files.
+ You can specify functions separated by semicolons:
- IMAGE_POSTPROCESS_COMMAND += "shell_command; ... "
+ IMAGE_POSTPROCESS_COMMAND += "function; ... "
- If you need to pass the path to the root filesystem within
- the command, you can use
+ If you need to pass the root filesystem path to a command
+ within the function, you can use
${IMAGE_ROOTFS}, which points to
- the root filesystem image.
+ the directory that becomes the root filesystem image.
+
+
+
+
+ IMAGE_PREPROCESS_COMMAND
+
+ IMAGE_PREPROCESS_COMMAND[doc] = "Specifies a list of functions to call before the OpenEmbedded build system has created the final image output files."
+
+
+
+
+ Specifies a list of functions to call before the
+ OpenEmbedded build system has created the final image
+ output files.
+ You can specify functions separated by semicolons:
+
+ IMAGE_PREPROCESS_COMMAND += "function; ... "
+
+
+
+
+ If you need to pass the root filesystem path to a command
+ within the function, you can use
+ ${IMAGE_ROOTFS}, which points to
+ the directory that becomes the root filesystem image.
@@ -8948,6 +8974,64 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
+ POPULATE_SDK_POST_HOST_COMMAND
+
+ POPULATE_SDK_POST_HOST_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system has created host part of the SDK."
+
+
+
+
+ Specifies a list of functions to call once the
+ OpenEmbedded build system has created the host part of
+ the SDK.
+ You can specify functions separated by semicolons:
+
+ POPULATE_SDK_POST_HOST_COMMAND += "function; ... "
+
+
+
+
+ If you need to pass the SDK path to a command
+ within a function, you can use
+ ${SDK_DIR}, which points to
+ the parent directory used by the OpenEmbedded build
+ system when creating SDK output.
+ See the
+ SDK_DIR
+ variable for more information.
+
+
+
+
+ POPULATE_SDK_POST_TARGET_COMMAND
+
+ POPULATE_SDK_POST_TARGET_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system has created target part of the SDK."
+
+
+
+
+ Specifies a list of functions to call once the
+ OpenEmbedded build system has created the target part of
+ the SDK.
+ You can specify functions separated by semicolons:
+
+ POPULATE_SDK_POST_TARGET_COMMAND += "function; ... "
+
+
+
+
+ If you need to pass the SDK path to a command
+ within a function, you can use
+ ${SDK_DIR}, which points to
+ the parent directory used by the OpenEmbedded build
+ system when creating SDK output.
+ See the
+ SDK_DIR
+ variable for more information.
+
+
+
+
PR
PR[doc] = "The revision of the recipe. The default value for this variable is 'r0'."
@@ -9691,26 +9775,113 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
- ROOTFS_POSTPROCESS_COMMAND
+ ROOTFS_POSTINSTALL_COMMAND
- ROOTFS_POSTPROCESS_COMMAND[doc] = "Added by classes to run post processing commands once the OpenEmbedded build system has created the root filesystem."
+ ROOTFS_POSTINSTALL_COMMAND[doc] = "Specifies a list of functions to call after installing packages."
- Added by classes to run post processing commands once the
- OpenEmbedded build system has created the root filesystem.
- You can specify shell commands separated by semicolons:
+ Specifies a list of functions to call after the
+ OpenEmbedded build system has installed packages.
+ You can specify functions separated by semicolons:
- ROOTFS_POSTPROCESS_COMMAND += "shell_command; ... "
+ ROOTFS_POSTINSTALL_COMMAND += "function; ... "
- If you need to pass the path to the root filesystem within
- the command, you can use
+ If you need to pass the root filesystem path to a command
+ within a function, you can use
${IMAGE_ROOTFS}, which points to
- the root filesystem image.
+ the directory that becomes the root filesystem image.
+ See the
+ IMAGE_ROOTFS
+ variable for more information.
+
+
+
+
+ ROOTFS_POSTPROCESS_COMMAND
+
+ ROOTFS_POSTPROCESS_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system has created the root filesystem."
+
+
+
+
+ Specifies a list of functions to call once the
+ OpenEmbedded build system has created the root filesystem.
+ You can specify functions separated by semicolons:
+
+ ROOTFS_POSTPROCESS_COMMAND += "function; ... "
+
+
+
+
+ If you need to pass the root filesystem path to a command
+ within a function, you can use
+ ${IMAGE_ROOTFS}, which points to
+ the directory that becomes the root filesystem image.
+ See the
+ IMAGE_ROOTFS
+ variable for more information.
+
+
+
+
+ ROOTFS_POSTUNINSTALL_COMMAND
+
+ ROOTFS_POSTUNINSTALL_COMMAND[doc] = "Specifies a list of functions to call after removal of unneeded packages."
+
+
+
+
+ Specifies a list of functions to call after the
+ OpenEmbedded build system has removed unnecessary
+ packages.
+ When runtime package management is disabled in the
+ image, several packages are removed including
+ base-passwd,
+ shadow, and
+ update-alternatives.
+ You can specify functions separated by semicolons:
+
+ ROOTFS_POSTUNINSTALL_COMMAND += "function; ... "
+
+
+
+
+ If you need to pass the root filesystem path to a command
+ within a function, you can use
+ ${IMAGE_ROOTFS}, which points to
+ the directory that becomes the root filesystem image.
+ See the
+ IMAGE_ROOTFS
+ variable for more information.
+
+
+
+
+ ROOTFS_PREPROCESS_COMMAND
+
+ ROOTFS_PREPROCESS_COMMAND[doc] = "Specifies a list of functions to call before the OpenEmbedded build system has created the root filesystem."
+
+
+
+
+ Specifies a list of functions to call before the
+ OpenEmbedded build system has created the root filesystem.
+ You can specify functions separated by semicolons:
+
+ ROOTFS_PREPROCESS_COMMAND += "function; ... "
+
+
+
+
+ If you need to pass the root filesystem path to a command
+ within a function, you can use
+ ${IMAGE_ROOTFS}, which points to
+ the directory that becomes the root filesystem image.
See the
IMAGE_ROOTFS
variable for more information.
@@ -10182,6 +10353,34 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
+ SDK_POSTPROCESS_COMMAND
+
+ SDK_POSTPROCESS_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system has created the SDK."
+
+
+
+
+ Specifies a list of functions to call once the
+ OpenEmbedded build system has created the SDK.
+ You can specify functions separated by semicolons:
+
+ SDK_POSTPROCESS_COMMAND += "function; ... "
+
+
+
+
+ If you need to pass an SDK path to a command within a
+ function, you can use
+ ${SDK_DIR}, which points to
+ the parent directory used by the OpenEmbedded build system
+ when creating SDK output.
+ See the
+ SDK_DIR
+ variable for more information.
+
+
+
+
SDK_PREFIX
SDK_PREFIX[doc] = "The toolchain binary prefix used for nativesdk recipes."