diff options
author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2015-05-05 12:57:00 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-28 18:02:28 +0100 |
commit | d9cf5753df7355b30309cc0640c2180eb3b38780 (patch) | |
tree | b4e68ad8ab8c9f984b3ea0053bade45db9044d1f /documentation | |
parent | fb82bcb989e20ea50fc683a66c39f343171d0d52 (diff) | |
download | poky-d9cf5753df7355b30309cc0640c2180eb3b38780.tar.gz |
ref-manual: Added and updated variables to support calling functions
Fixed [YOCTO #7632]
Looked for, updated, and added (if necessary) the following
variables:
* 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
Each of these variables no longer accepts arbitrary shell commands but
rather functions. The wordings now support that behavior.
Also, updated the migration section for going to 1.6 release to note
this change.
(From yocto-docs rev: e1ab48f7def9d1eb080e007b88f75172470b8007)
Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/ref-manual/migration.xml | 29 | ||||
-rw-r--r-- | documentation/ref-manual/ref-variables.xml | 229 |
2 files changed, 243 insertions, 15 deletions
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 @@ | |||
1413 | it encounters the variable. | 1413 | it encounters the variable. |
1414 | </para> | 1414 | </para> |
1415 | </section> | 1415 | </section> |
1416 | |||
1417 | <section id='migration-1.6-variable-changes-variable-entry-behavior'> | ||
1418 | <title>Preprocess and Post Process Command Variable Behavior</title> | ||
1419 | |||
1420 | <para> | ||
1421 | The following variables now expect a semicolon separated | ||
1422 | list of functions to call and not arbitrary shell commands: | ||
1423 | <literallayout class='monospaced'> | ||
1424 | <link linkend='var-ROOTFS_PREPROCESS_COMMAND'>ROOTFS_PREPROCESS_COMMAND</link> | ||
1425 | <link linkend='var-ROOTFS_POSTPROCESS_COMMAND'>ROOTFS_POSTPROCESS_COMMAND</link> | ||
1426 | <link linkend='var-SDK_POSTPROCESS_COMMAND'>SDK_POSTPROCESS_COMMAND</link> | ||
1427 | <link linkend='var-POPULATE_SDK_POST_TARGET_COMMAND'>POPULATE_SDK_POST_TARGET_COMMAND</link> | ||
1428 | <link linkend='var-POPULATE_SDK_POST_HOST_COMMAND'>POPULATE_SDK_POST_HOST_COMMAND</link> | ||
1429 | <link linkend='var-IMAGE_POSTPROCESS_COMMAND'>IMAGE_POSTPROCESS_COMMAND</link> | ||
1430 | <link linkend='var-IMAGE_PREPROCESS_COMMAND'>IMAGE_PREPROCESS_COMMAND</link> | ||
1431 | <link linkend='var-ROOTFS_POSTUNINSTALL_COMMAND'>ROOTFS_POSTUNINSTALL_COMMAND</link> | ||
1432 | <link linkend='var-ROOTFS_POSTINSTALL_COMMAND'>ROOTFS_POSTINSTALL_COMMAND</link> | ||
1433 | </literallayout> | ||
1434 | For migration purposes, you can simply wrap shell commands in | ||
1435 | a shell function and then call the function. | ||
1436 | Here is an example: | ||
1437 | <literallayout class='monospaced'> | ||
1438 | my_postprocess_function() { | ||
1439 | echo "hello" > ${IMAGE_ROOTFS}/hello.txt | ||
1440 | } | ||
1441 | ROOTFS_POSTPROCESS_COMMAND += "my_postprocess_function; " | ||
1442 | </literallayout> | ||
1443 | </para> | ||
1444 | </section> | ||
1416 | </section> | 1445 | </section> |
1417 | 1446 | ||
1418 | <section id='migration-1.6-directory-layout-changes'> | 1447 | <section id='migration-1.6-directory-layout-changes'> |
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 @@ | |||
5433 | 5433 | ||
5434 | <glossentry id='var-IMAGE_POSTPROCESS_COMMAND'><glossterm>IMAGE_POSTPROCESS_COMMAND</glossterm> | 5434 | <glossentry id='var-IMAGE_POSTPROCESS_COMMAND'><glossterm>IMAGE_POSTPROCESS_COMMAND</glossterm> |
5435 | <info> | 5435 | <info> |
5436 | IMAGE_POSTPROCESS_COMMAND[doc] = "Added by classes to run post processing commands once the OpenEmbedded build system has created the image." | 5436 | IMAGE_POSTPROCESS_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system has created the final image output files." |
5437 | </info> | 5437 | </info> |
5438 | <glossdef> | 5438 | <glossdef> |
5439 | <para role="glossdeffirst"> | 5439 | <para role="glossdeffirst"> |
5440 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> | 5440 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> |
5441 | Added by classes to run post processing commands once the | 5441 | Specifies a list of functions to call once the |
5442 | OpenEmbedded build system has created the image. | 5442 | OpenEmbedded build system has created the final image |
5443 | You can specify shell commands separated by semicolons: | 5443 | output files. |
5444 | You can specify functions separated by semicolons: | ||
5444 | <literallayout class='monospaced'> | 5445 | <literallayout class='monospaced'> |
5445 | IMAGE_POSTPROCESS_COMMAND += "<replaceable>shell_command</replaceable>; ... " | 5446 | IMAGE_POSTPROCESS_COMMAND += "<replaceable>function</replaceable>; ... " |
5446 | </literallayout> | 5447 | </literallayout> |
5447 | </para> | 5448 | </para> |
5448 | 5449 | ||
5449 | <para> | 5450 | <para> |
5450 | If you need to pass the path to the root filesystem within | 5451 | If you need to pass the root filesystem path to a command |
5451 | the command, you can use | 5452 | within the function, you can use |
5452 | <filename>${IMAGE_ROOTFS}</filename>, which points to | 5453 | <filename>${IMAGE_ROOTFS}</filename>, which points to |
5453 | the root filesystem image. | 5454 | the directory that becomes the root filesystem image. |
5455 | </para> | ||
5456 | </glossdef> | ||
5457 | </glossentry> | ||
5458 | |||
5459 | <glossentry id='var-IMAGE_PREPROCESS_COMMAND'><glossterm>IMAGE_PREPROCESS_COMMAND</glossterm> | ||
5460 | <info> | ||
5461 | IMAGE_PREPROCESS_COMMAND[doc] = "Specifies a list of functions to call before the OpenEmbedded build system has created the final image output files." | ||
5462 | </info> | ||
5463 | <glossdef> | ||
5464 | <para role="glossdeffirst"> | ||
5465 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> | ||
5466 | Specifies a list of functions to call before the | ||
5467 | OpenEmbedded build system has created the final image | ||
5468 | output files. | ||
5469 | You can specify functions separated by semicolons: | ||
5470 | <literallayout class='monospaced'> | ||
5471 | IMAGE_PREPROCESS_COMMAND += "<replaceable>function</replaceable>; ... " | ||
5472 | </literallayout> | ||
5473 | </para> | ||
5474 | |||
5475 | <para> | ||
5476 | If you need to pass the root filesystem path to a command | ||
5477 | within the function, you can use | ||
5478 | <filename>${IMAGE_ROOTFS}</filename>, which points to | ||
5479 | the directory that becomes the root filesystem image. | ||
5454 | </para> | 5480 | </para> |
5455 | </glossdef> | 5481 | </glossdef> |
5456 | </glossentry> | 5482 | </glossentry> |
@@ -8948,6 +8974,64 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" | |||
8948 | </glossdef> | 8974 | </glossdef> |
8949 | </glossentry> | 8975 | </glossentry> |
8950 | 8976 | ||
8977 | <glossentry id='var-POPULATE_SDK_POST_HOST_COMMAND'><glossterm>POPULATE_SDK_POST_HOST_COMMAND</glossterm> | ||
8978 | <info> | ||
8979 | 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." | ||
8980 | </info> | ||
8981 | <glossdef> | ||
8982 | <para role="glossdeffirst"> | ||
8983 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> | ||
8984 | Specifies a list of functions to call once the | ||
8985 | OpenEmbedded build system has created the host part of | ||
8986 | the SDK. | ||
8987 | You can specify functions separated by semicolons: | ||
8988 | <literallayout class='monospaced'> | ||
8989 | POPULATE_SDK_POST_HOST_COMMAND += "<replaceable>function</replaceable>; ... " | ||
8990 | </literallayout> | ||
8991 | </para> | ||
8992 | |||
8993 | <para> | ||
8994 | If you need to pass the SDK path to a command | ||
8995 | within a function, you can use | ||
8996 | <filename>${SDK_DIR}</filename>, which points to | ||
8997 | the parent directory used by the OpenEmbedded build | ||
8998 | system when creating SDK output. | ||
8999 | See the | ||
9000 | <link linkend='var-SDK_DIR'><filename>SDK_DIR</filename></link> | ||
9001 | variable for more information. | ||
9002 | </para> | ||
9003 | </glossdef> | ||
9004 | </glossentry> | ||
9005 | |||
9006 | <glossentry id='var-POPULATE_SDK_POST_TARGET_COMMAND'><glossterm>POPULATE_SDK_POST_TARGET_COMMAND</glossterm> | ||
9007 | <info> | ||
9008 | 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." | ||
9009 | </info> | ||
9010 | <glossdef> | ||
9011 | <para role="glossdeffirst"> | ||
9012 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> | ||
9013 | Specifies a list of functions to call once the | ||
9014 | OpenEmbedded build system has created the target part of | ||
9015 | the SDK. | ||
9016 | You can specify functions separated by semicolons: | ||
9017 | <literallayout class='monospaced'> | ||
9018 | POPULATE_SDK_POST_TARGET_COMMAND += "<replaceable>function</replaceable>; ... " | ||
9019 | </literallayout> | ||
9020 | </para> | ||
9021 | |||
9022 | <para> | ||
9023 | If you need to pass the SDK path to a command | ||
9024 | within a function, you can use | ||
9025 | <filename>${SDK_DIR}</filename>, which points to | ||
9026 | the parent directory used by the OpenEmbedded build | ||
9027 | system when creating SDK output. | ||
9028 | See the | ||
9029 | <link linkend='var-SDK_DIR'><filename>SDK_DIR</filename></link> | ||
9030 | variable for more information. | ||
9031 | </para> | ||
9032 | </glossdef> | ||
9033 | </glossentry> | ||
9034 | |||
8951 | <glossentry id='var-PR'><glossterm>PR</glossterm> | 9035 | <glossentry id='var-PR'><glossterm>PR</glossterm> |
8952 | <info> | 9036 | <info> |
8953 | PR[doc] = "The revision of the recipe. The default value for this variable is 'r0'." | 9037 | 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" | |||
9691 | </glossdef> | 9775 | </glossdef> |
9692 | </glossentry> | 9776 | </glossentry> |
9693 | 9777 | ||
9778 | <glossentry id='var-ROOTFS_POSTINSTALL_COMMAND'><glossterm>ROOTFS_POSTINSTALL_COMMAND</glossterm> | ||
9779 | <info> | ||
9780 | ROOTFS_POSTINSTALL_COMMAND[doc] = "Specifies a list of functions to call after installing packages." | ||
9781 | </info> | ||
9782 | <glossdef> | ||
9783 | <para role="glossdeffirst"> | ||
9784 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> | ||
9785 | Specifies a list of functions to call after the | ||
9786 | OpenEmbedded build system has installed packages. | ||
9787 | You can specify functions separated by semicolons: | ||
9788 | <literallayout class='monospaced'> | ||
9789 | ROOTFS_POSTINSTALL_COMMAND += "<replaceable>function</replaceable>; ... " | ||
9790 | </literallayout> | ||
9791 | </para> | ||
9792 | |||
9793 | <para> | ||
9794 | If you need to pass the root filesystem path to a command | ||
9795 | within a function, you can use | ||
9796 | <filename>${IMAGE_ROOTFS}</filename>, which points to | ||
9797 | the directory that becomes the root filesystem image. | ||
9798 | See the | ||
9799 | <link linkend='var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></link> | ||
9800 | variable for more information. | ||
9801 | </para> | ||
9802 | </glossdef> | ||
9803 | </glossentry> | ||
9804 | |||
9694 | <glossentry id='var-ROOTFS_POSTPROCESS_COMMAND'><glossterm>ROOTFS_POSTPROCESS_COMMAND</glossterm> | 9805 | <glossentry id='var-ROOTFS_POSTPROCESS_COMMAND'><glossterm>ROOTFS_POSTPROCESS_COMMAND</glossterm> |
9695 | <info> | 9806 | <info> |
9696 | ROOTFS_POSTPROCESS_COMMAND[doc] = "Added by classes to run post processing commands once the OpenEmbedded build system has created the root filesystem." | 9807 | ROOTFS_POSTPROCESS_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system has created the root filesystem." |
9808 | </info> | ||
9809 | <glossdef> | ||
9810 | <para role="glossdeffirst"> | ||
9811 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> | ||
9812 | Specifies a list of functions to call once the | ||
9813 | OpenEmbedded build system has created the root filesystem. | ||
9814 | You can specify functions separated by semicolons: | ||
9815 | <literallayout class='monospaced'> | ||
9816 | ROOTFS_POSTPROCESS_COMMAND += "<replaceable>function</replaceable>; ... " | ||
9817 | </literallayout> | ||
9818 | </para> | ||
9819 | |||
9820 | <para> | ||
9821 | If you need to pass the root filesystem path to a command | ||
9822 | within a function, you can use | ||
9823 | <filename>${IMAGE_ROOTFS}</filename>, which points to | ||
9824 | the directory that becomes the root filesystem image. | ||
9825 | See the | ||
9826 | <link linkend='var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></link> | ||
9827 | variable for more information. | ||
9828 | </para> | ||
9829 | </glossdef> | ||
9830 | </glossentry> | ||
9831 | |||
9832 | <glossentry id='var-ROOTFS_POSTUNINSTALL_COMMAND'><glossterm>ROOTFS_POSTUNINSTALL_COMMAND</glossterm> | ||
9833 | <info> | ||
9834 | ROOTFS_POSTUNINSTALL_COMMAND[doc] = "Specifies a list of functions to call after removal of unneeded packages." | ||
9835 | </info> | ||
9836 | <glossdef> | ||
9837 | <para role="glossdeffirst"> | ||
9838 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> | ||
9839 | Specifies a list of functions to call after the | ||
9840 | OpenEmbedded build system has removed unnecessary | ||
9841 | packages. | ||
9842 | When runtime package management is disabled in the | ||
9843 | image, several packages are removed including | ||
9844 | <filename>base-passwd</filename>, | ||
9845 | <filename>shadow</filename>, and | ||
9846 | <filename>update-alternatives</filename>. | ||
9847 | You can specify functions separated by semicolons: | ||
9848 | <literallayout class='monospaced'> | ||
9849 | ROOTFS_POSTUNINSTALL_COMMAND += "<replaceable>function</replaceable>; ... " | ||
9850 | </literallayout> | ||
9851 | </para> | ||
9852 | |||
9853 | <para> | ||
9854 | If you need to pass the root filesystem path to a command | ||
9855 | within a function, you can use | ||
9856 | <filename>${IMAGE_ROOTFS}</filename>, which points to | ||
9857 | the directory that becomes the root filesystem image. | ||
9858 | See the | ||
9859 | <link linkend='var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></link> | ||
9860 | variable for more information. | ||
9861 | </para> | ||
9862 | </glossdef> | ||
9863 | </glossentry> | ||
9864 | |||
9865 | <glossentry id='var-ROOTFS_PREPROCESS_COMMAND'><glossterm>ROOTFS_PREPROCESS_COMMAND</glossterm> | ||
9866 | <info> | ||
9867 | ROOTFS_PREPROCESS_COMMAND[doc] = "Specifies a list of functions to call before the OpenEmbedded build system has created the root filesystem." | ||
9697 | </info> | 9868 | </info> |
9698 | <glossdef> | 9869 | <glossdef> |
9699 | <para role="glossdeffirst"> | 9870 | <para role="glossdeffirst"> |
9700 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> | 9871 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> |
9701 | Added by classes to run post processing commands once the | 9872 | Specifies a list of functions to call before the |
9702 | OpenEmbedded build system has created the root filesystem. | 9873 | OpenEmbedded build system has created the root filesystem. |
9703 | You can specify shell commands separated by semicolons: | 9874 | You can specify functions separated by semicolons: |
9704 | <literallayout class='monospaced'> | 9875 | <literallayout class='monospaced'> |
9705 | ROOTFS_POSTPROCESS_COMMAND += "<replaceable>shell_command</replaceable>; ... " | 9876 | ROOTFS_PREPROCESS_COMMAND += "<replaceable>function</replaceable>; ... " |
9706 | </literallayout> | 9877 | </literallayout> |
9707 | </para> | 9878 | </para> |
9708 | 9879 | ||
9709 | <para> | 9880 | <para> |
9710 | If you need to pass the path to the root filesystem within | 9881 | If you need to pass the root filesystem path to a command |
9711 | the command, you can use | 9882 | within a function, you can use |
9712 | <filename>${IMAGE_ROOTFS}</filename>, which points to | 9883 | <filename>${IMAGE_ROOTFS}</filename>, which points to |
9713 | the root filesystem image. | 9884 | the directory that becomes the root filesystem image. |
9714 | See the | 9885 | See the |
9715 | <link linkend='var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></link> | 9886 | <link linkend='var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></link> |
9716 | variable for more information. | 9887 | variable for more information. |
@@ -10182,6 +10353,34 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" | |||
10182 | </glossdef> | 10353 | </glossdef> |
10183 | </glossentry> | 10354 | </glossentry> |
10184 | 10355 | ||
10356 | <glossentry id='var-SDK_POSTPROCESS_COMMAND'><glossterm>SDK_POSTPROCESS_COMMAND</glossterm> | ||
10357 | <info> | ||
10358 | SDK_POSTPROCESS_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system has created the SDK." | ||
10359 | </info> | ||
10360 | <glossdef> | ||
10361 | <para role="glossdeffirst"> | ||
10362 | <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> | ||
10363 | Specifies a list of functions to call once the | ||
10364 | OpenEmbedded build system has created the SDK. | ||
10365 | You can specify functions separated by semicolons: | ||
10366 | <literallayout class='monospaced'> | ||
10367 | SDK_POSTPROCESS_COMMAND += "<replaceable>function</replaceable>; ... " | ||
10368 | </literallayout> | ||
10369 | </para> | ||
10370 | |||
10371 | <para> | ||
10372 | If you need to pass an SDK path to a command within a | ||
10373 | function, you can use | ||
10374 | <filename>${SDK_DIR}</filename>, which points to | ||
10375 | the parent directory used by the OpenEmbedded build system | ||
10376 | when creating SDK output. | ||
10377 | See the | ||
10378 | <link linkend='var-SDK_DIR'><filename>SDK_DIR</filename></link> | ||
10379 | variable for more information. | ||
10380 | </para> | ||
10381 | </glossdef> | ||
10382 | </glossentry> | ||
10383 | |||
10185 | <glossentry id='var-SDK_PREFIX'><glossterm>SDK_PREFIX</glossterm> | 10384 | <glossentry id='var-SDK_PREFIX'><glossterm>SDK_PREFIX</glossterm> |
10186 | <info> | 10385 | <info> |
10187 | SDK_PREFIX[doc] = "The toolchain binary prefix used for nativesdk recipes." | 10386 | SDK_PREFIX[doc] = "The toolchain binary prefix used for nativesdk recipes." |