diff options
author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2021-04-16 18:27:05 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-04-23 16:39:03 +0100 |
commit | c3c6de21876aad811e08538544c8fe76d22ccd09 (patch) | |
tree | e22ee00a9c1ec588965f32050a42e05946bc9f71 | |
parent | 773536c333248214f8f41eff698d8bfd3c687249 (diff) | |
download | poky-c3c6de21876aad811e08538544c8fe76d22ccd09.tar.gz |
manuals: code insertion simplification over two lines
This simplifies paragraphs ending with a colon and followed
by code insertion.
Automatically substituted through the command:
sed -i -z "s/:\n\s*::/::/g" file.rst
This generates identical HTML output.
(From yocto-docs rev: 28e2192a7c12d64b68061138a9f6c796453eebb1)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
38 files changed, 974 insertions, 1949 deletions
diff --git a/documentation/dev-manual/common-tasks.rst b/documentation/dev-manual/common-tasks.rst index b3ee2b13b4..dcd3a11c3e 100644 --- a/documentation/dev-manual/common-tasks.rst +++ b/documentation/dev-manual/common-tasks.rst | |||
@@ -49,15 +49,13 @@ Follow these general steps to create your layer without using tools: | |||
49 | (e.g. the cloned ``poky`` repository). | 49 | (e.g. the cloned ``poky`` repository). |
50 | 50 | ||
51 | While not strictly required, prepend the name of the directory with | 51 | While not strictly required, prepend the name of the directory with |
52 | the string "meta-". For example: | 52 | the string "meta-". For example:: |
53 | :: | ||
54 | 53 | ||
55 | meta-mylayer | 54 | meta-mylayer |
56 | meta-GUI_xyz | 55 | meta-GUI_xyz |
57 | meta-mymachine | 56 | meta-mymachine |
58 | 57 | ||
59 | With rare exceptions, a layer's name follows this form: | 58 | With rare exceptions, a layer's name follows this form:: |
60 | :: | ||
61 | 59 | ||
62 | meta-root_name | 60 | meta-root_name |
63 | 61 | ||
@@ -77,8 +75,7 @@ Follow these general steps to create your layer without using tools: | |||
77 | :yocto_git:`Source Repositories </poky/tree/meta-yocto-bsp/conf>` | 75 | :yocto_git:`Source Repositories </poky/tree/meta-yocto-bsp/conf>` |
78 | demonstrates the required syntax. For your layer, you need to replace | 76 | demonstrates the required syntax. For your layer, you need to replace |
79 | "yoctobsp" with a unique identifier for your layer (e.g. "machinexyz" | 77 | "yoctobsp" with a unique identifier for your layer (e.g. "machinexyz" |
80 | for a layer named "meta-machinexyz"): | 78 | for a layer named "meta-machinexyz"):: |
81 | :: | ||
82 | 79 | ||
83 | # We have a conf and classes directory, add to BBPATH | 80 | # We have a conf and classes directory, add to BBPATH |
84 | BBPATH .= ":${LAYERDIR}" | 81 | BBPATH .= ":${LAYERDIR}" |
@@ -195,8 +192,7 @@ following list: | |||
195 | machine "one". To do so, you use an append file named | 192 | machine "one". To do so, you use an append file named |
196 | ``base-files.bbappend`` and create a dependency on "foo" by | 193 | ``base-files.bbappend`` and create a dependency on "foo" by |
197 | altering the :term:`DEPENDS` | 194 | altering the :term:`DEPENDS` |
198 | variable: | 195 | variable:: |
199 | :: | ||
200 | 196 | ||
201 | DEPENDS = "foo" | 197 | DEPENDS = "foo" |
202 | 198 | ||
@@ -209,14 +205,12 @@ following list: | |||
209 | ``foo``. | 205 | ``foo``. |
210 | 206 | ||
211 | To make sure your changes apply only when building machine "one", | 207 | To make sure your changes apply only when building machine "one", |
212 | use a machine override with the ``DEPENDS`` statement: | 208 | use a machine override with the ``DEPENDS`` statement:: |
213 | :: | ||
214 | 209 | ||
215 | DEPENDS_one = "foo" | 210 | DEPENDS_one = "foo" |
216 | 211 | ||
217 | You should follow the same strategy when using ``_append`` | 212 | You should follow the same strategy when using ``_append`` |
218 | and ``_prepend`` operations: | 213 | and ``_prepend`` operations:: |
219 | :: | ||
220 | 214 | ||
221 | DEPENDS_append_one = " foo" | 215 | DEPENDS_append_one = " foo" |
222 | DEPENDS_prepend_one = "foo " | 216 | DEPENDS_prepend_one = "foo " |
@@ -224,8 +218,7 @@ following list: | |||
224 | As an actual example, here's a | 218 | As an actual example, here's a |
225 | snippet from the generic kernel include file ``linux-yocto.inc``, | 219 | snippet from the generic kernel include file ``linux-yocto.inc``, |
226 | wherein the kernel compile and link options are adjusted in the | 220 | wherein the kernel compile and link options are adjusted in the |
227 | case of a subset of the supported architectures: | 221 | case of a subset of the supported architectures:: |
228 | :: | ||
229 | 222 | ||
230 | DEPENDS_append_aarch64 = " libgcc" | 223 | DEPENDS_append_aarch64 = " libgcc" |
231 | KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}" | 224 | KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}" |
@@ -252,8 +245,7 @@ following list: | |||
252 | file, you can use an append file to cause the build to use your | 245 | file, you can use an append file to cause the build to use your |
253 | own version of the file. For example, an append file in your layer | 246 | own version of the file. For example, an append file in your layer |
254 | at ``meta-one/recipes-core/base-files/base-files.bbappend`` could | 247 | at ``meta-one/recipes-core/base-files/base-files.bbappend`` could |
255 | extend :term:`FILESPATH` using :term:`FILESEXTRAPATHS` as follows: | 248 | extend :term:`FILESPATH` using :term:`FILESEXTRAPATHS` as follows:: |
256 | :: | ||
257 | 249 | ||
258 | FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" | 250 | FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" |
259 | 251 | ||
@@ -375,8 +367,7 @@ the COMMON and DISTRO related tests. Furthermore, if your layer is a BSP | |||
375 | layer, the layer must pass the COMMON and BSP set of tests. | 367 | layer, the layer must pass the COMMON and BSP set of tests. |
376 | 368 | ||
377 | To execute the script, enter the following commands from your build | 369 | To execute the script, enter the following commands from your build |
378 | directory: | 370 | directory:: |
379 | :: | ||
380 | 371 | ||
381 | $ source oe-init-build-env | 372 | $ source oe-init-build-env |
382 | $ yocto-check-layer your_layer_directory | 373 | $ yocto-check-layer your_layer_directory |
@@ -432,8 +423,7 @@ enable it. To enable your layer, simply add your layer's path to the | |||
432 | ``BBLAYERS`` variable in your ``conf/bblayers.conf`` file, which is | 423 | ``BBLAYERS`` variable in your ``conf/bblayers.conf`` file, which is |
433 | found in the :term:`Build Directory`. | 424 | found in the :term:`Build Directory`. |
434 | The following example shows how to enable a layer named | 425 | The following example shows how to enable a layer named |
435 | ``meta-mylayer``: | 426 | ``meta-mylayer``:: |
436 | :: | ||
437 | 427 | ||
438 | # POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf | 428 | # POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf |
439 | # changes incompatibly | 429 | # changes incompatibly |
@@ -488,8 +478,7 @@ As an example, consider the main formfactor recipe and a corresponding | |||
488 | formfactor append file both from the :term:`Source Directory`. | 478 | formfactor append file both from the :term:`Source Directory`. |
489 | Here is the main | 479 | Here is the main |
490 | formfactor recipe, which is named ``formfactor_0.0.bb`` and located in | 480 | formfactor recipe, which is named ``formfactor_0.0.bb`` and located in |
491 | the "meta" layer at ``meta/recipes-bsp/formfactor``: | 481 | the "meta" layer at ``meta/recipes-bsp/formfactor``:: |
492 | :: | ||
493 | 482 | ||
494 | SUMMARY = "Device formfactor information" | 483 | SUMMARY = "Device formfactor information" |
495 | DESCRIPTION = "A formfactor configuration file provides information about the \ | 484 | DESCRIPTION = "A formfactor configuration file provides information about the \ |
@@ -521,8 +510,7 @@ during the build. | |||
521 | 510 | ||
522 | Following is the append file, which is named ``formfactor_0.0.bbappend`` | 511 | Following is the append file, which is named ``formfactor_0.0.bbappend`` |
523 | and is from the Raspberry Pi BSP Layer named ``meta-raspberrypi``. The | 512 | and is from the Raspberry Pi BSP Layer named ``meta-raspberrypi``. The |
524 | file is in the layer at ``recipes-bsp/formfactor``: | 513 | file is in the layer at ``recipes-bsp/formfactor``:: |
525 | :: | ||
526 | 514 | ||
527 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 515 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
528 | 516 | ||
@@ -570,8 +558,7 @@ build system to calculate it based on the layer's dependencies. | |||
570 | 558 | ||
571 | To specify the layer's priority manually, use the | 559 | To specify the layer's priority manually, use the |
572 | :term:`BBFILE_PRIORITY` | 560 | :term:`BBFILE_PRIORITY` |
573 | variable and append the layer's root name: | 561 | variable and append the layer's root name:: |
574 | :: | ||
575 | 562 | ||
576 | BBFILE_PRIORITY_mylayer = "1" | 563 | BBFILE_PRIORITY_mylayer = "1" |
577 | 564 | ||
@@ -595,8 +582,7 @@ with their paths and priorities and on ``.bbappend`` files and their | |||
595 | applicable recipes can help to reveal potential problems. | 582 | applicable recipes can help to reveal potential problems. |
596 | 583 | ||
597 | For help on the BitBake layer management tool, use the following | 584 | For help on the BitBake layer management tool, use the following |
598 | command: | 585 | command:: |
599 | :: | ||
600 | 586 | ||
601 | $ bitbake-layers --help | 587 | $ bitbake-layers --help |
602 | NOTE: Starting bitbake server... | 588 | NOTE: Starting bitbake server... |
@@ -676,8 +662,7 @@ The following list describes the available commands: | |||
676 | variable values, you need to tidy these up yourself. Consider the | 662 | variable values, you need to tidy these up yourself. Consider the |
677 | following example. Here, the ``bitbake-layers`` command adds the | 663 | following example. Here, the ``bitbake-layers`` command adds the |
678 | line ``#### bbappended ...`` so that you know where the following | 664 | line ``#### bbappended ...`` so that you know where the following |
679 | lines originate: | 665 | lines originate:: |
680 | :: | ||
681 | 666 | ||
682 | ... | 667 | ... |
683 | DESCRIPTION = "A useful utility" | 668 | DESCRIPTION = "A useful utility" |
@@ -691,8 +676,7 @@ The following list describes the available commands: | |||
691 | EXTRA_OECONF += "--enable-somethingelse" | 676 | EXTRA_OECONF += "--enable-somethingelse" |
692 | 677 | ||
693 | 678 | ||
694 | Ideally, you would tidy up these utilities as follows: | 679 | Ideally, you would tidy up these utilities as follows:: |
695 | :: | ||
696 | 680 | ||
697 | ... | 681 | ... |
698 | DESCRIPTION = "Customized utility" | 682 | DESCRIPTION = "Customized utility" |
@@ -746,14 +730,12 @@ create a layer with the following: | |||
746 | 730 | ||
747 | In its simplest form, you can use the following command form to create a | 731 | In its simplest form, you can use the following command form to create a |
748 | layer. The command creates a layer whose name corresponds to | 732 | layer. The command creates a layer whose name corresponds to |
749 | "your_layer_name" in the current directory: | 733 | "your_layer_name" in the current directory:: |
750 | :: | ||
751 | 734 | ||
752 | $ bitbake-layers create-layer your_layer_name | 735 | $ bitbake-layers create-layer your_layer_name |
753 | 736 | ||
754 | As an example, the following command creates a layer named ``meta-scottrif`` | 737 | As an example, the following command creates a layer named ``meta-scottrif`` |
755 | in your home directory: | 738 | in your home directory:: |
756 | :: | ||
757 | 739 | ||
758 | $ cd /usr/home | 740 | $ cd /usr/home |
759 | $ bitbake-layers create-layer meta-scottrif | 741 | $ bitbake-layers create-layer meta-scottrif |
@@ -770,8 +752,7 @@ default, you can use the ``--example-recipe-name`` option. | |||
770 | 752 | ||
771 | The easiest way to see how the ``bitbake-layers create-layer`` command | 753 | The easiest way to see how the ``bitbake-layers create-layer`` command |
772 | works is to experiment with the script. You can also read the usage | 754 | works is to experiment with the script. You can also read the usage |
773 | information by entering the following: | 755 | information by entering the following:: |
774 | :: | ||
775 | 756 | ||
776 | $ bitbake-layers create-layer --help | 757 | $ bitbake-layers create-layer --help |
777 | NOTE: Starting bitbake server... | 758 | NOTE: Starting bitbake server... |
@@ -799,16 +780,14 @@ Once you create your general layer, you must add it to your | |||
799 | makes the OpenEmbedded build system aware of your layer so that it can | 780 | makes the OpenEmbedded build system aware of your layer so that it can |
800 | search it for metadata. | 781 | search it for metadata. |
801 | 782 | ||
802 | Add your layer by using the ``bitbake-layers add-layer`` command: | 783 | Add your layer by using the ``bitbake-layers add-layer`` command:: |
803 | :: | ||
804 | 784 | ||
805 | $ bitbake-layers add-layer your_layer_name | 785 | $ bitbake-layers add-layer your_layer_name |
806 | 786 | ||
807 | Here is an example that adds a | 787 | Here is an example that adds a |
808 | layer named ``meta-scottrif`` to the configuration file. Following the | 788 | layer named ``meta-scottrif`` to the configuration file. Following the |
809 | command that adds the layer is another ``bitbake-layers`` command that | 789 | command that adds the layer is another ``bitbake-layers`` command that |
810 | shows the layers that are in your ``bblayers.conf`` file: | 790 | shows the layers that are in your ``bblayers.conf`` file:: |
811 | :: | ||
812 | 791 | ||
813 | $ bitbake-layers add-layer meta-scottrif | 792 | $ bitbake-layers add-layer meta-scottrif |
814 | NOTE: Starting bitbake server... | 793 | NOTE: Starting bitbake server... |
@@ -851,8 +830,7 @@ variable changes are in effect for every build and consequently affect | |||
851 | all images, which might not be what you require. | 830 | all images, which might not be what you require. |
852 | 831 | ||
853 | To add a package to your image using the local configuration file, use | 832 | To add a package to your image using the local configuration file, use |
854 | the ``IMAGE_INSTALL`` variable with the ``_append`` operator: | 833 | the ``IMAGE_INSTALL`` variable with the ``_append`` operator:: |
855 | :: | ||
856 | 834 | ||
857 | IMAGE_INSTALL_append = " strace" | 835 | IMAGE_INSTALL_append = " strace" |
858 | 836 | ||
@@ -870,8 +848,7 @@ takes effect. | |||
870 | 848 | ||
871 | As shown in its simplest use, ``IMAGE_INSTALL_append`` affects all | 849 | As shown in its simplest use, ``IMAGE_INSTALL_append`` affects all |
872 | images. It is possible to extend the syntax so that the variable applies | 850 | images. It is possible to extend the syntax so that the variable applies |
873 | to a specific image only. Here is an example: | 851 | to a specific image only. Here is an example:: |
874 | :: | ||
875 | 852 | ||
876 | IMAGE_INSTALL_append_pn-core-image-minimal = " strace" | 853 | IMAGE_INSTALL_append_pn-core-image-minimal = " strace" |
877 | 854 | ||
@@ -942,8 +919,7 @@ Customizing Images Using Custom .bb Files | |||
942 | 919 | ||
943 | You can also customize an image by creating a custom recipe that defines | 920 | You can also customize an image by creating a custom recipe that defines |
944 | additional software as part of the image. The following example shows | 921 | additional software as part of the image. The following example shows |
945 | the form for the two lines you need: | 922 | the form for the two lines you need:: |
946 | :: | ||
947 | 923 | ||
948 | IMAGE_INSTALL = "packagegroup-core-x11-base package1 package2" | 924 | IMAGE_INSTALL = "packagegroup-core-x11-base package1 package2" |
949 | inherit core-image | 925 | inherit core-image |
@@ -958,8 +934,7 @@ The other method for creating a custom image is to base it on an | |||
958 | existing image. For example, if you want to create an image based on | 934 | existing image. For example, if you want to create an image based on |
959 | ``core-image-sato`` but add the additional package ``strace`` to the | 935 | ``core-image-sato`` but add the additional package ``strace`` to the |
960 | image, copy the ``meta/recipes-sato/images/core-image-sato.bb`` to a new | 936 | image, copy the ``meta/recipes-sato/images/core-image-sato.bb`` to a new |
961 | ``.bb`` and add the following line to the end of the copy: | 937 | ``.bb`` and add the following line to the end of the copy:: |
962 | :: | ||
963 | 938 | ||
964 | IMAGE_INSTALL += "strace" | 939 | IMAGE_INSTALL += "strace" |
965 | 940 | ||
@@ -990,8 +965,7 @@ in the ``packagegroup-base.bb`` recipe. | |||
990 | Here is a short, fabricated example showing the same basic pieces for a | 965 | Here is a short, fabricated example showing the same basic pieces for a |
991 | hypothetical packagegroup defined in ``packagegroup-custom.bb``, where | 966 | hypothetical packagegroup defined in ``packagegroup-custom.bb``, where |
992 | the variable ``PN`` is the standard way to abbreviate the reference to | 967 | the variable ``PN`` is the standard way to abbreviate the reference to |
993 | the full packagegroup name ``packagegroup-custom``: | 968 | the full packagegroup name ``packagegroup-custom``:: |
994 | :: | ||
995 | 969 | ||
996 | DESCRIPTION = "My Custom Package Groups" | 970 | DESCRIPTION = "My Custom Package Groups" |
997 | 971 | ||
@@ -1033,13 +1007,11 @@ configured hostname written to ``/etc/hostname`` is "qemux86". | |||
1033 | 1007 | ||
1034 | You can customize this name by altering the value of the "hostname" | 1008 | You can customize this name by altering the value of the "hostname" |
1035 | variable in the ``base-files`` recipe using either an append file or a | 1009 | variable in the ``base-files`` recipe using either an append file or a |
1036 | configuration file. Use the following in an append file: | 1010 | configuration file. Use the following in an append file:: |
1037 | :: | ||
1038 | 1011 | ||
1039 | hostname = "myhostname" | 1012 | hostname = "myhostname" |
1040 | 1013 | ||
1041 | Use the following in a configuration file: | 1014 | Use the following in a configuration file:: |
1042 | :: | ||
1043 | 1015 | ||
1044 | hostname_pn-base-files = "myhostname" | 1016 | hostname_pn-base-files = "myhostname" |
1045 | 1017 | ||
@@ -1054,8 +1026,7 @@ you can easily reset the default hostname. | |||
1054 | 1026 | ||
1055 | Another point of interest is that if you unset the variable, the image | 1027 | Another point of interest is that if you unset the variable, the image |
1056 | will have no default hostname in the filesystem. Here is an example that | 1028 | will have no default hostname in the filesystem. Here is an example that |
1057 | unsets the variable in a configuration file: | 1029 | unsets the variable in a configuration file:: |
1058 | :: | ||
1059 | 1030 | ||
1060 | hostname_pn-base-files = "" | 1031 | hostname_pn-base-files = "" |
1061 | 1032 | ||
@@ -1136,8 +1107,7 @@ To run the tool, you just need to be in your | |||
1136 | :term:`Build Directory` and have sourced the | 1107 | :term:`Build Directory` and have sourced the |
1137 | build environment setup script (i.e. | 1108 | build environment setup script (i.e. |
1138 | :ref:`structure-core-script`). | 1109 | :ref:`structure-core-script`). |
1139 | To get help on the tool, use the following command: | 1110 | To get help on the tool, use the following command:: |
1140 | :: | ||
1141 | 1111 | ||
1142 | $ recipetool -h | 1112 | $ recipetool -h |
1143 | NOTE: Starting bitbake server... | 1113 | NOTE: Starting bitbake server... |
@@ -1166,8 +1136,7 @@ locates it properly in the layer that contains your source files. | |||
1166 | Following are some syntax examples: | 1136 | Following are some syntax examples: |
1167 | 1137 | ||
1168 | - Use this syntax to generate a recipe based on source. Once generated, | 1138 | - Use this syntax to generate a recipe based on source. Once generated, |
1169 | the recipe resides in the existing source code layer: | 1139 | the recipe resides in the existing source code layer:: |
1170 | :: | ||
1171 | 1140 | ||
1172 | recipetool create -o OUTFILE source | 1141 | recipetool create -o OUTFILE source |
1173 | 1142 | ||
@@ -1180,8 +1149,7 @@ Following are some syntax examples: | |||
1180 | 1149 | ||
1181 | - Use this syntax to generate a recipe based on source. The options | 1150 | - Use this syntax to generate a recipe based on source. The options |
1182 | direct ``recipetool`` to generate debugging information. Once generated, | 1151 | direct ``recipetool`` to generate debugging information. Once generated, |
1183 | the recipe resides in the existing source code layer: | 1152 | the recipe resides in the existing source code layer:: |
1184 | :: | ||
1185 | 1153 | ||
1186 | recipetool create -d -o OUTFILE source | 1154 | recipetool create -d -o OUTFILE source |
1187 | 1155 | ||
@@ -1236,8 +1204,7 @@ the recipe. | |||
1236 | recipe through the layer's ``conf/layer.conf`` file and the | 1204 | recipe through the layer's ``conf/layer.conf`` file and the |
1237 | :term:`BBFILES` variable. This | 1205 | :term:`BBFILES` variable. This |
1238 | variable sets up a path from which the build system can locate | 1206 | variable sets up a path from which the build system can locate |
1239 | recipes. Here is the typical use: | 1207 | recipes. Here is the typical use:: |
1240 | :: | ||
1241 | 1208 | ||
1242 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ | 1209 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ |
1243 | ${LAYERDIR}/recipes-*/*/*.bbappend" | 1210 | ${LAYERDIR}/recipes-*/*/*.bbappend" |
@@ -1249,8 +1216,7 @@ the recipe. | |||
1249 | ":ref:`dev-manual/common-tasks:understanding and creating layers`" section. | 1216 | ":ref:`dev-manual/common-tasks:understanding and creating layers`" section. |
1250 | 1217 | ||
1251 | - *Naming Your Recipe:* When you name your recipe, you need to follow | 1218 | - *Naming Your Recipe:* When you name your recipe, you need to follow |
1252 | this naming convention: | 1219 | this naming convention:: |
1253 | :: | ||
1254 | 1220 | ||
1255 | basename_version.bb | 1221 | basename_version.bb |
1256 | 1222 | ||
@@ -1276,8 +1242,7 @@ Assuming you have sourced the build environment setup script (i.e. | |||
1276 | :ref:`structure-core-script`) and you are in | 1242 | :ref:`structure-core-script`) and you are in |
1277 | the :term:`Build Directory`, use | 1243 | the :term:`Build Directory`, use |
1278 | BitBake to process your recipe. All you need to provide is the | 1244 | BitBake to process your recipe. All you need to provide is the |
1279 | ``basename`` of the recipe as described in the previous section: | 1245 | ``basename`` of the recipe as described in the previous section:: |
1280 | :: | ||
1281 | 1246 | ||
1282 | $ bitbake basename | 1247 | $ bitbake basename |
1283 | 1248 | ||
@@ -1289,8 +1254,7 @@ compilation and packaging files, and so forth. | |||
1289 | 1254 | ||
1290 | The path to the per-recipe temporary work directory depends on the | 1255 | The path to the per-recipe temporary work directory depends on the |
1291 | context in which it is being built. The quickest way to find this path | 1256 | context in which it is being built. The quickest way to find this path |
1292 | is to have BitBake return it by running the following: | 1257 | is to have BitBake return it by running the following:: |
1293 | :: | ||
1294 | 1258 | ||
1295 | $ bitbake -e basename | grep ^WORKDIR= | 1259 | $ bitbake -e basename | grep ^WORKDIR= |
1296 | 1260 | ||
@@ -1299,8 +1263,7 @@ top-level folder named ``poky``, a default Build Directory at | |||
1299 | ``poky/build``, and a ``qemux86-poky-linux`` machine target system. | 1263 | ``poky/build``, and a ``qemux86-poky-linux`` machine target system. |
1300 | Furthermore, suppose your recipe is named ``foo_1.3.0.bb``. In this | 1264 | Furthermore, suppose your recipe is named ``foo_1.3.0.bb``. In this |
1301 | case, the work directory the build system uses to build the package | 1265 | case, the work directory the build system uses to build the package |
1302 | would be as follows: | 1266 | would be as follows:: |
1303 | :: | ||
1304 | 1267 | ||
1305 | poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0 | 1268 | poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0 |
1306 | 1269 | ||
@@ -1352,8 +1315,7 @@ recipe to match the new version. | |||
1352 | Here is a simple example from the | 1315 | Here is a simple example from the |
1353 | ``meta/recipes-devtools/strace/strace_5.5.bb`` recipe where the source | 1316 | ``meta/recipes-devtools/strace/strace_5.5.bb`` recipe where the source |
1354 | comes from a single tarball. Notice the use of the | 1317 | comes from a single tarball. Notice the use of the |
1355 | :term:`PV` variable: | 1318 | :term:`PV` variable:: |
1356 | :: | ||
1357 | 1319 | ||
1358 | SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \ | 1320 | SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \ |
1359 | 1321 | ||
@@ -1369,8 +1331,7 @@ you must specify :term:`SRCREV` and | |||
1369 | you should specify :term:`PV` to include | 1331 | you should specify :term:`PV` to include |
1370 | the revision with :term:`SRCPV`. Here | 1332 | the revision with :term:`SRCPV`. Here |
1371 | is an example from the recipe | 1333 | is an example from the recipe |
1372 | ``meta/recipes-kernel/blktrace/blktrace_git.bb``: | 1334 | ``meta/recipes-kernel/blktrace/blktrace_git.bb``:: |
1373 | :: | ||
1374 | 1335 | ||
1375 | SRCREV = "d6918c8832793b4205ed3bfede78c2f915c23385" | 1336 | SRCREV = "d6918c8832793b4205ed3bfede78c2f915c23385" |
1376 | 1337 | ||
@@ -1392,8 +1353,7 @@ SCM URLs), you need to provide the ``md5`` and ``sha256`` checksums for | |||
1392 | each URL. For these cases, you provide a name for each URL as part of | 1353 | each URL. For these cases, you provide a name for each URL as part of |
1393 | the ``SRC_URI`` and then reference that name in the subsequent checksum | 1354 | the ``SRC_URI`` and then reference that name in the subsequent checksum |
1394 | statements. Here is an example combining lines from the files | 1355 | statements. Here is an example combining lines from the files |
1395 | ``git.inc`` and ``git_2.24.1.bb``: | 1356 | ``git.inc`` and ``git_2.24.1.bb``:: |
1396 | :: | ||
1397 | 1357 | ||
1398 | SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \ | 1358 | SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \ |
1399 | ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages" | 1359 | ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages" |
@@ -1512,8 +1472,7 @@ variables: | |||
1512 | include ``COPYING``, ``LICENSE``, and ``README`` files. You could | 1472 | include ``COPYING``, ``LICENSE``, and ``README`` files. You could |
1513 | also find the information near the top of a source file. For example, | 1473 | also find the information near the top of a source file. For example, |
1514 | given a piece of software licensed under the GNU General Public | 1474 | given a piece of software licensed under the GNU General Public |
1515 | License version 2, you would set ``LICENSE`` as follows: | 1475 | License version 2, you would set ``LICENSE`` as follows:: |
1516 | :: | ||
1517 | 1476 | ||
1518 | LICENSE = "GPLv2" | 1477 | LICENSE = "GPLv2" |
1519 | 1478 | ||
@@ -1543,8 +1502,7 @@ variables: | |||
1543 | See the ":ref:`dev-manual/common-tasks:fetching code`" section for | 1502 | See the ":ref:`dev-manual/common-tasks:fetching code`" section for |
1544 | additional information. | 1503 | additional information. |
1545 | 1504 | ||
1546 | Here is an example that assumes the software has a ``COPYING`` file: | 1505 | Here is an example that assumes the software has a ``COPYING`` file:: |
1547 | :: | ||
1548 | 1506 | ||
1549 | LIC_FILES_CHKSUM = "file://COPYING;md5=xxx" | 1507 | LIC_FILES_CHKSUM = "file://COPYING;md5=xxx" |
1550 | 1508 | ||
@@ -1747,8 +1705,7 @@ standard mainline kernel, not your own custom one. | |||
1747 | When you use custom kernel headers you need to get them from | 1705 | When you use custom kernel headers you need to get them from |
1748 | :term:`STAGING_KERNEL_DIR`, | 1706 | :term:`STAGING_KERNEL_DIR`, |
1749 | which is the directory with kernel headers that are required to build | 1707 | which is the directory with kernel headers that are required to build |
1750 | out-of-tree modules. Your recipe will also need the following: | 1708 | out-of-tree modules. Your recipe will also need the following:: |
1751 | :: | ||
1752 | 1709 | ||
1753 | do_configure[depends] += "virtual/kernel:do_shared_workdir" | 1710 | do_configure[depends] += "virtual/kernel:do_shared_workdir" |
1754 | 1711 | ||
@@ -1779,8 +1736,7 @@ Here are some common issues that cause failures. | |||
1779 | 1736 | ||
1780 | To fix the problem, you need to either satisfy the missing dependency | 1737 | To fix the problem, you need to either satisfy the missing dependency |
1781 | in the Makefile or whatever script produced the Makefile, or (as a | 1738 | in the Makefile or whatever script produced the Makefile, or (as a |
1782 | workaround) set :term:`PARALLEL_MAKE` to an empty string: | 1739 | workaround) set :term:`PARALLEL_MAKE` to an empty string:: |
1783 | :: | ||
1784 | 1740 | ||
1785 | PARALLEL_MAKE = "" | 1741 | PARALLEL_MAKE = "" |
1786 | 1742 | ||
@@ -1889,8 +1845,7 @@ installed correctly. | |||
1889 | missing dependencies between targets that can result in race | 1845 | missing dependencies between targets that can result in race |
1890 | conditions. If you experience intermittent failures during | 1846 | conditions. If you experience intermittent failures during |
1891 | ``do_install``, you might be able to work around them by disabling | 1847 | ``do_install``, you might be able to work around them by disabling |
1892 | parallel Makefile installs by adding the following to the recipe: | 1848 | parallel Makefile installs by adding the following to the recipe:: |
1893 | :: | ||
1894 | 1849 | ||
1895 | PARALLEL_MAKEINST = "" | 1850 | PARALLEL_MAKEINST = "" |
1896 | 1851 | ||
@@ -2006,8 +1961,7 @@ take. The following list describes the process: | |||
2006 | :term:`MACHINE` value is passed | 1961 | :term:`MACHINE` value is passed |
2007 | into the configure script or a patch is applied only for a particular | 1962 | into the configure script or a patch is applied only for a particular |
2008 | machine), you should mark them as such by adding the following to the | 1963 | machine), you should mark them as such by adding the following to the |
2009 | recipe: | 1964 | recipe:: |
2010 | :: | ||
2011 | 1965 | ||
2012 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 1966 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
2013 | 1967 | ||
@@ -2016,8 +1970,7 @@ take. The following list describes the process: | |||
2016 | all (e.g. recipes that simply package script files or configuration | 1970 | all (e.g. recipes that simply package script files or configuration |
2017 | files), you should use the | 1971 | files), you should use the |
2018 | :ref:`allarch <ref-classes-allarch>` class to | 1972 | :ref:`allarch <ref-classes-allarch>` class to |
2019 | do this for you by adding this to your recipe: | 1973 | do this for you by adding this to your recipe:: |
2020 | :: | ||
2021 | 1974 | ||
2022 | inherit allarch | 1975 | inherit allarch |
2023 | 1976 | ||
@@ -2061,8 +2014,7 @@ used by the :ref:`ref-tasks-populate_sysroot` task as defined by the the | |||
2061 | :term:`SYSROOT_DIRS` variable to automatically populate the sysroot. It | 2014 | :term:`SYSROOT_DIRS` variable to automatically populate the sysroot. It |
2062 | is possible to modify the list of directories that populate the sysroot. | 2015 | is possible to modify the list of directories that populate the sysroot. |
2063 | The following example shows how you could add the ``/opt`` directory to | 2016 | The following example shows how you could add the ``/opt`` directory to |
2064 | the list of directories within a recipe: | 2017 | the list of directories within a recipe:: |
2065 | :: | ||
2066 | 2018 | ||
2067 | SYSROOT_DIRS += "/opt" | 2019 | SYSROOT_DIRS += "/opt" |
2068 | 2020 | ||
@@ -2091,8 +2043,7 @@ kernel recipe. Suppose you have three kernel recipes whose | |||
2091 | in some way uses a :term:`PROVIDES` | 2043 | in some way uses a :term:`PROVIDES` |
2092 | statement that essentially identifies itself as being able to provide | 2044 | statement that essentially identifies itself as being able to provide |
2093 | ``virtual/kernel``. Here is one way through the | 2045 | ``virtual/kernel``. Here is one way through the |
2094 | :ref:`kernel <ref-classes-kernel>` class: | 2046 | :ref:`kernel <ref-classes-kernel>` class:: |
2095 | :: | ||
2096 | 2047 | ||
2097 | PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }" | 2048 | PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }" |
2098 | 2049 | ||
@@ -2107,8 +2058,7 @@ an example, consider the :yocto_git:`x86-base.inc | |||
2107 | </poky/tree/meta/conf/machine/include/x86-base.inc>` include file, which is a | 2058 | </poky/tree/meta/conf/machine/include/x86-base.inc>` include file, which is a |
2108 | machine (i.e. :term:`MACHINE`) configuration file. This include file is the | 2059 | machine (i.e. :term:`MACHINE`) configuration file. This include file is the |
2109 | reason all x86-based machines use the ``linux-yocto`` kernel. Here are the | 2060 | reason all x86-based machines use the ``linux-yocto`` kernel. Here are the |
2110 | relevant lines from the include file: | 2061 | relevant lines from the include file:: |
2111 | :: | ||
2112 | 2062 | ||
2113 | PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto" | 2063 | PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto" |
2114 | PREFERRED_VERSION_linux-yocto ??= "4.15%" | 2064 | PREFERRED_VERSION_linux-yocto ??= "4.15%" |
@@ -2116,8 +2066,7 @@ relevant lines from the include file: | |||
2116 | When you use a virtual provider, you do not have to "hard code" a recipe | 2066 | When you use a virtual provider, you do not have to "hard code" a recipe |
2117 | name as a build dependency. You can use the | 2067 | name as a build dependency. You can use the |
2118 | :term:`DEPENDS` variable to state the | 2068 | :term:`DEPENDS` variable to state the |
2119 | build is dependent on ``virtual/kernel`` for example: | 2069 | build is dependent on ``virtual/kernel`` for example:: |
2120 | :: | ||
2121 | 2070 | ||
2122 | DEPENDS = "virtual/kernel" | 2071 | DEPENDS = "virtual/kernel" |
2123 | 2072 | ||
@@ -2125,8 +2074,7 @@ During the build, the OpenEmbedded build system picks | |||
2125 | the correct recipe needed for the ``virtual/kernel`` dependency based on | 2074 | the correct recipe needed for the ``virtual/kernel`` dependency based on |
2126 | the ``PREFERRED_PROVIDER`` variable. If you want to use the small kernel | 2075 | the ``PREFERRED_PROVIDER`` variable. If you want to use the small kernel |
2127 | mentioned at the beginning of this section, configure your build as | 2076 | mentioned at the beginning of this section, configure your build as |
2128 | follows: | 2077 | follows:: |
2129 | :: | ||
2130 | 2078 | ||
2131 | PREFERRED_PROVIDER_virtual/kernel ??= "kernel-small" | 2079 | PREFERRED_PROVIDER_virtual/kernel ??= "kernel-small" |
2132 | 2080 | ||
@@ -2178,8 +2126,7 @@ In order to ensure the versions compare properly, the recommended | |||
2178 | convention is to set :term:`PV` within the | 2126 | convention is to set :term:`PV` within the |
2179 | recipe to "previous_version+current_version". You can use an additional | 2127 | recipe to "previous_version+current_version". You can use an additional |
2180 | variable so that you can use the current version elsewhere. Here is an | 2128 | variable so that you can use the current version elsewhere. Here is an |
2181 | example: | 2129 | example:: |
2182 | :: | ||
2183 | 2130 | ||
2184 | REALPV = "0.8.16-rc1" | 2131 | REALPV = "0.8.16-rc1" |
2185 | PV = "0.8.15+${REALPV}" | 2132 | PV = "0.8.15+${REALPV}" |
@@ -2198,8 +2145,7 @@ required, specify | |||
2198 | ``${``\ :term:`PN`\ ``}`` in place of | 2145 | ``${``\ :term:`PN`\ ``}`` in place of |
2199 | PACKAGENAME. | 2146 | PACKAGENAME. |
2200 | 2147 | ||
2201 | A post-installation function has the following structure: | 2148 | A post-installation function has the following structure:: |
2202 | :: | ||
2203 | 2149 | ||
2204 | pkg_postinst_PACKAGENAME() { | 2150 | pkg_postinst_PACKAGENAME() { |
2205 | # Commands to carry out | 2151 | # Commands to carry out |
@@ -2352,13 +2298,11 @@ Otherwise, BitBake runs an empty ``do_install`` task by default. | |||
2352 | Some applications might require extra parameters to be passed to the | 2298 | Some applications might require extra parameters to be passed to the |
2353 | compiler. For example, the application might need an additional header | 2299 | compiler. For example, the application might need an additional header |
2354 | path. You can accomplish this by adding to the ``CFLAGS`` variable. The | 2300 | path. You can accomplish this by adding to the ``CFLAGS`` variable. The |
2355 | following example shows this: | 2301 | following example shows this:: |
2356 | :: | ||
2357 | 2302 | ||
2358 | CFLAGS_prepend = "-I ${S}/include " | 2303 | CFLAGS_prepend = "-I ${S}/include " |
2359 | 2304 | ||
2360 | In the following example, ``mtd-utils`` is a makefile-based package: | 2305 | In the following example, ``mtd-utils`` is a makefile-based package:: |
2361 | :: | ||
2362 | 2306 | ||
2363 | SUMMARY = "Tools for managing memory technology devices" | 2307 | SUMMARY = "Tools for managing memory technology devices" |
2364 | SECTION = "base" | 2308 | SECTION = "base" |
@@ -2403,8 +2347,7 @@ application into multiple packages. | |||
2403 | Following is an example that uses the ``libxpm`` recipe. By default, | 2347 | Following is an example that uses the ``libxpm`` recipe. By default, |
2404 | this recipe generates a single package that contains the library along | 2348 | this recipe generates a single package that contains the library along |
2405 | with a few binaries. You can modify the recipe to split the binaries | 2349 | with a few binaries. You can modify the recipe to split the binaries |
2406 | into separate packages: | 2350 | into separate packages:: |
2407 | :: | ||
2408 | 2351 | ||
2409 | require xorg-lib-common.inc | 2352 | require xorg-lib-common.inc |
2410 | 2353 | ||
@@ -2498,8 +2441,7 @@ doing the following: | |||
2498 | that replaces ``do_configure`` and ``do_compile`` with custom | 2441 | that replaces ``do_configure`` and ``do_compile`` with custom |
2499 | versions, then you can use the | 2442 | versions, then you can use the |
2500 | ``[``\ :ref:`noexec <bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]`` | 2443 | ``[``\ :ref:`noexec <bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]`` |
2501 | flag to turn the tasks into no-ops, as follows: | 2444 | flag to turn the tasks into no-ops, as follows:: |
2502 | :: | ||
2503 | 2445 | ||
2504 | do_configure[noexec] = "1" | 2446 | do_configure[noexec] = "1" |
2505 | do_compile[noexec] = "1" | 2447 | do_compile[noexec] = "1" |
@@ -2558,8 +2500,7 @@ chapter of the BitBake User Manual. | |||
2558 | supported. | 2500 | supported. |
2559 | 2501 | ||
2560 | The following example shows some of the ways you can use variables in | 2502 | The following example shows some of the ways you can use variables in |
2561 | recipes: | 2503 | recipes:: |
2562 | :: | ||
2563 | 2504 | ||
2564 | S = "${WORKDIR}/postfix-${PV}" | 2505 | S = "${WORKDIR}/postfix-${PV}" |
2565 | CFLAGS += "-DNO_ASM" | 2506 | CFLAGS += "-DNO_ASM" |
@@ -2572,8 +2513,7 @@ chapter of the BitBake User Manual. | |||
2572 | syntax, although access to OpenEmbedded variables and internal | 2513 | syntax, although access to OpenEmbedded variables and internal |
2573 | methods are also available. | 2514 | methods are also available. |
2574 | 2515 | ||
2575 | The following is an example function from the ``sed`` recipe: | 2516 | The following is an example function from the ``sed`` recipe:: |
2576 | :: | ||
2577 | 2517 | ||
2578 | do_install () { | 2518 | do_install () { |
2579 | autotools_do_install | 2519 | autotools_do_install |
@@ -2594,16 +2534,14 @@ chapter of the BitBake User Manual. | |||
2594 | from other files (``include`` and ``require``) and export variables | 2534 | from other files (``include`` and ``require``) and export variables |
2595 | to the environment (``export``). | 2535 | to the environment (``export``). |
2596 | 2536 | ||
2597 | The following example shows the use of some of these keywords: | 2537 | The following example shows the use of some of these keywords:: |
2598 | :: | ||
2599 | 2538 | ||
2600 | export POSTCONF = "${STAGING_BINDIR}/postconf" | 2539 | export POSTCONF = "${STAGING_BINDIR}/postconf" |
2601 | inherit autoconf | 2540 | inherit autoconf |
2602 | require otherfile.inc | 2541 | require otherfile.inc |
2603 | 2542 | ||
2604 | - *Comments (#):* Any lines that begin with the hash character (``#``) | 2543 | - *Comments (#):* Any lines that begin with the hash character (``#``) |
2605 | are treated as comment lines and are ignored: | 2544 | are treated as comment lines and are ignored:: |
2606 | :: | ||
2607 | 2545 | ||
2608 | # This is a comment | 2546 | # This is a comment |
2609 | 2547 | ||
@@ -2615,8 +2553,7 @@ in the BitBake User Manual. | |||
2615 | 2553 | ||
2616 | - *Line Continuation (\\):* Use the backward slash (``\``) character to | 2554 | - *Line Continuation (\\):* Use the backward slash (``\``) character to |
2617 | split a statement over multiple lines. Place the slash character at | 2555 | split a statement over multiple lines. Place the slash character at |
2618 | the end of the line that is to be continued on the next line: | 2556 | the end of the line that is to be continued on the next line:: |
2619 | :: | ||
2620 | 2557 | ||
2621 | VAR = "A really long \ | 2558 | VAR = "A really long \ |
2622 | line" | 2559 | line" |
@@ -2627,8 +2564,7 @@ in the BitBake User Manual. | |||
2627 | slash character. | 2564 | slash character. |
2628 | 2565 | ||
2629 | - *Using Variables (${VARNAME}):* Use the ``${VARNAME}`` syntax to | 2566 | - *Using Variables (${VARNAME}):* Use the ``${VARNAME}`` syntax to |
2630 | access the contents of a variable: | 2567 | access the contents of a variable:: |
2631 | :: | ||
2632 | 2568 | ||
2633 | SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/zlib-${PV}.tar.gz" | 2569 | SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/zlib-${PV}.tar.gz" |
2634 | 2570 | ||
@@ -2648,8 +2584,7 @@ in the BitBake User Manual. | |||
2648 | when you make the assignment, but this is not generally needed. | 2584 | when you make the assignment, but this is not generally needed. |
2649 | 2585 | ||
2650 | - *Quote All Assignments ("value"):* Use double quotes around values in | 2586 | - *Quote All Assignments ("value"):* Use double quotes around values in |
2651 | all variable assignments (e.g. ``"value"``). Following is an example: | 2587 | all variable assignments (e.g. ``"value"``). Following is an example:: |
2652 | :: | ||
2653 | 2588 | ||
2654 | VAR1 = "${OTHERVAR}" | 2589 | VAR1 = "${OTHERVAR}" |
2655 | VAR2 = "The version is ${PV}" | 2590 | VAR2 = "The version is ${PV}" |
@@ -2663,13 +2598,11 @@ in the BitBake User Manual. | |||
2663 | 2598 | ||
2664 | Here is an example where ``VAR1`` is set to "New value" if it is | 2599 | Here is an example where ``VAR1`` is set to "New value" if it is |
2665 | currently empty. However, if ``VAR1`` has already been set, it | 2600 | currently empty. However, if ``VAR1`` has already been set, it |
2666 | remains unchanged: | 2601 | remains unchanged:: |
2667 | :: | ||
2668 | 2602 | ||
2669 | VAR1 ?= "New value" | 2603 | VAR1 ?= "New value" |
2670 | 2604 | ||
2671 | In this next example, ``VAR1`` is left with the value "Original value": | 2605 | In this next example, ``VAR1`` is left with the value "Original value":: |
2672 | :: | ||
2673 | 2606 | ||
2674 | VAR1 = "Original value" | 2607 | VAR1 = "Original value" |
2675 | VAR1 ?= "New value" | 2608 | VAR1 ?= "New value" |
@@ -2682,8 +2615,7 @@ in the BitBake User Manual. | |||
2682 | This operator adds a space between the existing content of the | 2615 | This operator adds a space between the existing content of the |
2683 | variable and the new content. | 2616 | variable and the new content. |
2684 | 2617 | ||
2685 | Here is an example: | 2618 | Here is an example:: |
2686 | :: | ||
2687 | 2619 | ||
2688 | SRC_URI += "file://fix-makefile.patch" | 2620 | SRC_URI += "file://fix-makefile.patch" |
2689 | 2621 | ||
@@ -2695,8 +2627,7 @@ in the BitBake User Manual. | |||
2695 | This operator adds a space between the new content and the | 2627 | This operator adds a space between the new content and the |
2696 | existing content of the variable. | 2628 | existing content of the variable. |
2697 | 2629 | ||
2698 | Here is an example: | 2630 | Here is an example:: |
2699 | :: | ||
2700 | 2631 | ||
2701 | VAR =+ "Starts" | 2632 | VAR =+ "Starts" |
2702 | 2633 | ||
@@ -2708,15 +2639,13 @@ in the BitBake User Manual. | |||
2708 | 2639 | ||
2709 | The following example shows the space being explicitly added to the | 2640 | The following example shows the space being explicitly added to the |
2710 | start to ensure the appended value is not merged with the existing | 2641 | start to ensure the appended value is not merged with the existing |
2711 | value: | 2642 | value:: |
2712 | :: | ||
2713 | 2643 | ||
2714 | SRC_URI_append = " file://fix-makefile.patch" | 2644 | SRC_URI_append = " file://fix-makefile.patch" |
2715 | 2645 | ||
2716 | You can also use | 2646 | You can also use |
2717 | the ``_append`` operator with overrides, which results in the actions | 2647 | the ``_append`` operator with overrides, which results in the actions |
2718 | only being performed for the specified target or machine: | 2648 | only being performed for the specified target or machine:: |
2719 | :: | ||
2720 | 2649 | ||
2721 | SRC_URI_append_sh4 = " file://fix-makefile.patch" | 2650 | SRC_URI_append_sh4 = " file://fix-makefile.patch" |
2722 | 2651 | ||
@@ -2728,15 +2657,13 @@ in the BitBake User Manual. | |||
2728 | 2657 | ||
2729 | The following example shows the space being explicitly added to the | 2658 | The following example shows the space being explicitly added to the |
2730 | end to ensure the prepended value is not merged with the existing | 2659 | end to ensure the prepended value is not merged with the existing |
2731 | value: | 2660 | value:: |
2732 | :: | ||
2733 | 2661 | ||
2734 | CFLAGS_prepend = "-I${S}/myincludes " | 2662 | CFLAGS_prepend = "-I${S}/myincludes " |
2735 | 2663 | ||
2736 | You can also use the | 2664 | You can also use the |
2737 | ``_prepend`` operator with overrides, which results in the actions | 2665 | ``_prepend`` operator with overrides, which results in the actions |
2738 | only being performed for the specified target or machine: | 2666 | only being performed for the specified target or machine:: |
2739 | :: | ||
2740 | 2667 | ||
2741 | CFLAGS_prepend_sh4 = "-I${S}/myincludes " | 2668 | CFLAGS_prepend_sh4 = "-I${S}/myincludes " |
2742 | 2669 | ||
@@ -2746,8 +2673,7 @@ in the BitBake User Manual. | |||
2746 | value to "standard/base" for any target | 2673 | value to "standard/base" for any target |
2747 | :term:`MACHINE`, except for | 2674 | :term:`MACHINE`, except for |
2748 | qemuarm where it should be set to "standard/arm-versatile-926ejs", | 2675 | qemuarm where it should be set to "standard/arm-versatile-926ejs", |
2749 | you would do the following: | 2676 | you would do the following:: |
2750 | :: | ||
2751 | 2677 | ||
2752 | KBRANCH = "standard/base" | 2678 | KBRANCH = "standard/base" |
2753 | KBRANCH_qemuarm = "standard/arm-versatile-926ejs" | 2679 | KBRANCH_qemuarm = "standard/arm-versatile-926ejs" |
@@ -2770,8 +2696,7 @@ in the BitBake User Manual. | |||
2770 | search and replacement on a variable). | 2696 | search and replacement on a variable). |
2771 | 2697 | ||
2772 | You indicate Python code using the ``${@python_code}`` syntax for the | 2698 | You indicate Python code using the ``${@python_code}`` syntax for the |
2773 | variable assignment: | 2699 | variable assignment:: |
2774 | :: | ||
2775 | 2700 | ||
2776 | SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz | 2701 | SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz |
2777 | 2702 | ||
@@ -2861,8 +2786,7 @@ of adding a suitable ``defconfig`` file. The file needs to be added into | |||
2861 | a location similar to ``defconfig`` files used for other machines in a | 2786 | a location similar to ``defconfig`` files used for other machines in a |
2862 | given kernel recipe. A possible way to do this is by listing the file in | 2787 | given kernel recipe. A possible way to do this is by listing the file in |
2863 | the ``SRC_URI`` and adding the machine to the expression in | 2788 | the ``SRC_URI`` and adding the machine to the expression in |
2864 | ``COMPATIBLE_MACHINE``: | 2789 | ``COMPATIBLE_MACHINE``:: |
2865 | :: | ||
2866 | 2790 | ||
2867 | COMPATIBLE_MACHINE = '(qemux86|qemumips)' | 2791 | COMPATIBLE_MACHINE = '(qemux86|qemumips)' |
2868 | 2792 | ||
@@ -2889,8 +2813,7 @@ contains directories for specific machines such as ``qemuarm`` and | |||
2889 | defaults, see the ``meta/recipes-bsp/formfactor/files/config`` file | 2813 | defaults, see the ``meta/recipes-bsp/formfactor/files/config`` file |
2890 | found in the same area. | 2814 | found in the same area. |
2891 | 2815 | ||
2892 | Following is an example for "qemuarm" machine: | 2816 | Following is an example for "qemuarm" machine:: |
2893 | :: | ||
2894 | 2817 | ||
2895 | HAVE_TOUCHSCREEN=1 | 2818 | HAVE_TOUCHSCREEN=1 |
2896 | HAVE_KEYBOARD=1 | 2819 | HAVE_KEYBOARD=1 |
@@ -2961,22 +2884,19 @@ The following steps describe how to set up the AUH utility: | |||
2961 | 2. *Make Sure Git is Configured:* The AUH utility requires Git to be | 2884 | 2. *Make Sure Git is Configured:* The AUH utility requires Git to be |
2962 | configured because AUH uses Git to save upgrades. Thus, you must have | 2885 | configured because AUH uses Git to save upgrades. Thus, you must have |
2963 | Git user and email configured. The following command shows your | 2886 | Git user and email configured. The following command shows your |
2964 | configurations: | 2887 | configurations:: |
2965 | :: | ||
2966 | 2888 | ||
2967 | $ git config --list | 2889 | $ git config --list |
2968 | 2890 | ||
2969 | If you do not have the user and | 2891 | If you do not have the user and |
2970 | email configured, you can use the following commands to do so: | 2892 | email configured, you can use the following commands to do so:: |
2971 | :: | ||
2972 | 2893 | ||
2973 | $ git config --global user.name some_name | 2894 | $ git config --global user.name some_name |
2974 | $ git config --global user.email username@domain.com | 2895 | $ git config --global user.email username@domain.com |
2975 | 2896 | ||
2976 | 3. *Clone the AUH Repository:* To use AUH, you must clone the repository | 2897 | 3. *Clone the AUH Repository:* To use AUH, you must clone the repository |
2977 | onto your development host. The following command uses Git to create | 2898 | onto your development host. The following command uses Git to create |
2978 | a local copy of the repository on your system: | 2899 | a local copy of the repository on your system:: |
2979 | :: | ||
2980 | 2900 | ||
2981 | $ git clone git://git.yoctoproject.org/auto-upgrade-helper | 2901 | $ git clone git://git.yoctoproject.org/auto-upgrade-helper |
2982 | Cloning into 'auto-upgrade-helper'... remote: Counting objects: 768, done. | 2902 | Cloning into 'auto-upgrade-helper'... remote: Counting objects: 768, done. |
@@ -2992,8 +2912,7 @@ The following steps describe how to set up the AUH utility: | |||
2992 | 4. *Create a Dedicated Build Directory:* Run the | 2912 | 4. *Create a Dedicated Build Directory:* Run the |
2993 | :ref:`structure-core-script` | 2913 | :ref:`structure-core-script` |
2994 | script to create a fresh build directory that you use exclusively for | 2914 | script to create a fresh build directory that you use exclusively for |
2995 | running the AUH utility: | 2915 | running the AUH utility:: |
2996 | :: | ||
2997 | 2916 | ||
2998 | $ cd poky | 2917 | $ cd poky |
2999 | $ source oe-init-build-env your_AUH_build_directory | 2918 | $ source oe-init-build-env your_AUH_build_directory |
@@ -3010,8 +2929,7 @@ The following steps describe how to set up the AUH utility: | |||
3010 | - If you want to enable :ref:`Build | 2929 | - If you want to enable :ref:`Build |
3011 | History <dev-manual/common-tasks:maintaining build output quality>`, | 2930 | History <dev-manual/common-tasks:maintaining build output quality>`, |
3012 | which is optional, you need the following lines in the | 2931 | which is optional, you need the following lines in the |
3013 | ``conf/local.conf`` file: | 2932 | ``conf/local.conf`` file:: |
3014 | :: | ||
3015 | 2933 | ||
3016 | INHERIT =+ "buildhistory" | 2934 | INHERIT =+ "buildhistory" |
3017 | BUILDHISTORY_COMMIT = "1" | 2935 | BUILDHISTORY_COMMIT = "1" |
@@ -3024,23 +2942,20 @@ The following steps describe how to set up the AUH utility: | |||
3024 | - If you want to enable testing through the | 2942 | - If you want to enable testing through the |
3025 | :ref:`testimage <ref-classes-testimage*>` | 2943 | :ref:`testimage <ref-classes-testimage*>` |
3026 | class, which is optional, you need to have the following set in | 2944 | class, which is optional, you need to have the following set in |
3027 | your ``conf/local.conf`` file: | 2945 | your ``conf/local.conf`` file:: |
3028 | :: | ||
3029 | 2946 | ||
3030 | INHERIT += "testimage" | 2947 | INHERIT += "testimage" |
3031 | 2948 | ||
3032 | .. note:: | 2949 | .. note:: |
3033 | 2950 | ||
3034 | If your distro does not enable by default ptest, which Poky | 2951 | If your distro does not enable by default ptest, which Poky |
3035 | does, you need the following in your ``local.conf`` file: | 2952 | does, you need the following in your ``local.conf`` file:: |
3036 | :: | ||
3037 | 2953 | ||
3038 | DISTRO_FEATURES_append = " ptest" | 2954 | DISTRO_FEATURES_append = " ptest" |
3039 | 2955 | ||
3040 | 2956 | ||
3041 | 6. *Optionally Start a vncserver:* If you are running in a server | 2957 | 6. *Optionally Start a vncserver:* If you are running in a server |
3042 | without an X11 session, you need to start a vncserver: | 2958 | without an X11 session, you need to start a vncserver:: |
3043 | :: | ||
3044 | 2959 | ||
3045 | $ vncserver :1 | 2960 | $ vncserver :1 |
3046 | $ export DISPLAY=:1 | 2961 | $ export DISPLAY=:1 |
@@ -3064,45 +2979,38 @@ The following steps describe how to set up the AUH utility: | |||
3064 | This next set of examples describes how to use the AUH: | 2979 | This next set of examples describes how to use the AUH: |
3065 | 2980 | ||
3066 | - *Upgrading a Specific Recipe:* To upgrade a specific recipe, use the | 2981 | - *Upgrading a Specific Recipe:* To upgrade a specific recipe, use the |
3067 | following form: | 2982 | following form:: |
3068 | :: | ||
3069 | 2983 | ||
3070 | $ upgrade-helper.py recipe_name | 2984 | $ upgrade-helper.py recipe_name |
3071 | 2985 | ||
3072 | For example, this command upgrades the ``xmodmap`` recipe: | 2986 | For example, this command upgrades the ``xmodmap`` recipe:: |
3073 | :: | ||
3074 | 2987 | ||
3075 | $ upgrade-helper.py xmodmap | 2988 | $ upgrade-helper.py xmodmap |
3076 | 2989 | ||
3077 | - *Upgrading a Specific Recipe to a Particular Version:* To upgrade a | 2990 | - *Upgrading a Specific Recipe to a Particular Version:* To upgrade a |
3078 | specific recipe to a particular version, use the following form: | 2991 | specific recipe to a particular version, use the following form:: |
3079 | :: | ||
3080 | 2992 | ||
3081 | $ upgrade-helper.py recipe_name -t version | 2993 | $ upgrade-helper.py recipe_name -t version |
3082 | 2994 | ||
3083 | For example, this command upgrades the ``xmodmap`` recipe to version 1.2.3: | 2995 | For example, this command upgrades the ``xmodmap`` recipe to version 1.2.3:: |
3084 | :: | ||
3085 | 2996 | ||
3086 | $ upgrade-helper.py xmodmap -t 1.2.3 | 2997 | $ upgrade-helper.py xmodmap -t 1.2.3 |
3087 | 2998 | ||
3088 | - *Upgrading all Recipes to the Latest Versions and Suppressing Email | 2999 | - *Upgrading all Recipes to the Latest Versions and Suppressing Email |
3089 | Notifications:* To upgrade all recipes to their most recent versions | 3000 | Notifications:* To upgrade all recipes to their most recent versions |
3090 | and suppress the email notifications, use the following command: | 3001 | and suppress the email notifications, use the following command:: |
3091 | :: | ||
3092 | 3002 | ||
3093 | $ upgrade-helper.py all | 3003 | $ upgrade-helper.py all |
3094 | 3004 | ||
3095 | - *Upgrading all Recipes to the Latest Versions and Send Email | 3005 | - *Upgrading all Recipes to the Latest Versions and Send Email |
3096 | Notifications:* To upgrade all recipes to their most recent versions | 3006 | Notifications:* To upgrade all recipes to their most recent versions |
3097 | and send email messages to maintainers for each attempted recipe as | 3007 | and send email messages to maintainers for each attempted recipe as |
3098 | well as a status email, use the following command: | 3008 | well as a status email, use the following command:: |
3099 | :: | ||
3100 | 3009 | ||
3101 | $ upgrade-helper.py -e all | 3010 | $ upgrade-helper.py -e all |
3102 | 3011 | ||
3103 | Once you have run the AUH utility, you can find the results in the AUH | 3012 | Once you have run the AUH utility, you can find the results in the AUH |
3104 | build directory: | 3013 | build directory:: |
3105 | :: | ||
3106 | 3014 | ||
3107 | ${BUILDDIR}/upgrade-helper/timestamp | 3015 | ${BUILDDIR}/upgrade-helper/timestamp |
3108 | 3016 | ||
@@ -3127,15 +3035,13 @@ section in the Yocto Project Application Development and the Extensible | |||
3127 | Software Development Kit (eSDK) Manual. | 3035 | Software Development Kit (eSDK) Manual. |
3128 | 3036 | ||
3129 | To see all the command-line options available with ``devtool upgrade``, | 3037 | To see all the command-line options available with ``devtool upgrade``, |
3130 | use the following help command: | 3038 | use the following help command:: |
3131 | :: | ||
3132 | 3039 | ||
3133 | $ devtool upgrade -h | 3040 | $ devtool upgrade -h |
3134 | 3041 | ||
3135 | If you want to find out what version a recipe is currently at upstream | 3042 | If you want to find out what version a recipe is currently at upstream |
3136 | without any attempt to upgrade your local version of the recipe, you can | 3043 | without any attempt to upgrade your local version of the recipe, you can |
3137 | use the following command: | 3044 | use the following command:: |
3138 | :: | ||
3139 | 3045 | ||
3140 | $ devtool latest-version recipe_name | 3046 | $ devtool latest-version recipe_name |
3141 | 3047 | ||
@@ -3161,15 +3067,13 @@ could add it easily using the | |||
3161 | ":ref:`bitbake-layers <bsp-guide/bsp:creating a new bsp layer using the \`\`bitbake-layers\`\` script>`" | 3067 | ":ref:`bitbake-layers <bsp-guide/bsp:creating a new bsp layer using the \`\`bitbake-layers\`\` script>`" |
3162 | script. For example, suppose you use the ``nano.bb`` recipe from the | 3068 | script. For example, suppose you use the ``nano.bb`` recipe from the |
3163 | ``meta-oe`` layer in the ``meta-openembedded`` repository. For this | 3069 | ``meta-oe`` layer in the ``meta-openembedded`` repository. For this |
3164 | example, assume that the layer has been cloned into following area: | 3070 | example, assume that the layer has been cloned into following area:: |
3165 | :: | ||
3166 | 3071 | ||
3167 | /home/scottrif/meta-openembedded | 3072 | /home/scottrif/meta-openembedded |
3168 | 3073 | ||
3169 | The following command from your | 3074 | The following command from your |
3170 | :term:`Build Directory` adds the layer to | 3075 | :term:`Build Directory` adds the layer to |
3171 | your build configuration (i.e. ``${BUILDDIR}/conf/bblayers.conf``): | 3076 | your build configuration (i.e. ``${BUILDDIR}/conf/bblayers.conf``):: |
3172 | :: | ||
3173 | 3077 | ||
3174 | $ bitbake-layers add-layer /home/scottrif/meta-openembedded/meta-oe | 3078 | $ bitbake-layers add-layer /home/scottrif/meta-openembedded/meta-oe |
3175 | NOTE: Starting bitbake server... | 3079 | NOTE: Starting bitbake server... |
@@ -3210,8 +3114,7 @@ directory automatically upgrades the recipe for you: | |||
3210 | NOTE: New recipe is /home/scottrif/poky/build/workspace/recipes/nano/nano_2.9.3.bb | 3114 | NOTE: New recipe is /home/scottrif/poky/build/workspace/recipes/nano/nano_2.9.3.bb |
3211 | 3115 | ||
3212 | Continuing with this example, you can use ``devtool build`` to build the | 3116 | Continuing with this example, you can use ``devtool build`` to build the |
3213 | newly upgraded recipe: | 3117 | newly upgraded recipe:: |
3214 | :: | ||
3215 | 3118 | ||
3216 | $ devtool build nano | 3119 | $ devtool build nano |
3217 | NOTE: Starting bitbake server... | 3120 | NOTE: Starting bitbake server... |
@@ -3236,8 +3139,7 @@ and submit commits for the changes generated by the upgrade process. | |||
3236 | 3139 | ||
3237 | Once the tree is clean, you can clean things up in this example with the | 3140 | Once the tree is clean, you can clean things up in this example with the |
3238 | following command from the ``${BUILDDIR}/workspace/sources/nano`` | 3141 | following command from the ``${BUILDDIR}/workspace/sources/nano`` |
3239 | directory: | 3142 | directory:: |
3240 | :: | ||
3241 | 3143 | ||
3242 | $ devtool finish nano meta-oe | 3144 | $ devtool finish nano meta-oe |
3243 | NOTE: Starting bitbake server... | 3145 | NOTE: Starting bitbake server... |
@@ -3341,8 +3243,7 @@ build packages is available in the Build Directory as defined by the | |||
3341 | :term:`S` variable. Below is the default | 3243 | :term:`S` variable. Below is the default |
3342 | value for the ``S`` variable as defined in the | 3244 | value for the ``S`` variable as defined in the |
3343 | ``meta/conf/bitbake.conf`` configuration file in the | 3245 | ``meta/conf/bitbake.conf`` configuration file in the |
3344 | :term:`Source Directory`: | 3246 | :term:`Source Directory`:: |
3345 | :: | ||
3346 | 3247 | ||
3347 | S = "${WORKDIR}/${BP}" | 3248 | S = "${WORKDIR}/${BP}" |
3348 | 3249 | ||
@@ -3353,16 +3254,14 @@ usually set ``S`` to ``${WORKDIR}/git``. | |||
3353 | .. note:: | 3254 | .. note:: |
3354 | 3255 | ||
3355 | The :term:`BP` represents the base recipe name, which consists of the name | 3256 | The :term:`BP` represents the base recipe name, which consists of the name |
3356 | and version: | 3257 | and version:: |
3357 | :: | ||
3358 | 3258 | ||
3359 | BP = "${BPN}-${PV}" | 3259 | BP = "${BPN}-${PV}" |
3360 | 3260 | ||
3361 | 3261 | ||
3362 | The path to the work directory for the recipe | 3262 | The path to the work directory for the recipe |
3363 | (:term:`WORKDIR`) is defined as | 3263 | (:term:`WORKDIR`) is defined as |
3364 | follows: | 3264 | follows:: |
3365 | :: | ||
3366 | 3265 | ||
3367 | ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR} | 3266 | ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR} |
3368 | 3267 | ||
@@ -3388,8 +3287,7 @@ As an example, assume a Source Directory top-level folder named | |||
3388 | ``poky``, a default Build Directory at ``poky/build``, and a | 3287 | ``poky``, a default Build Directory at ``poky/build``, and a |
3389 | ``qemux86-poky-linux`` machine target system. Furthermore, suppose your | 3288 | ``qemux86-poky-linux`` machine target system. Furthermore, suppose your |
3390 | recipe is named ``foo_1.3.0.bb``. In this case, the work directory the | 3289 | recipe is named ``foo_1.3.0.bb``. In this case, the work directory the |
3391 | build system uses to build the package would be as follows: | 3290 | build system uses to build the package would be as follows:: |
3392 | :: | ||
3393 | 3291 | ||
3394 | poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0 | 3292 | poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0 |
3395 | 3293 | ||
@@ -3426,15 +3324,13 @@ Follow these general steps: | |||
3426 | 3324 | ||
3427 | 3. *Create a New Patch:* Before modifying source code, you need to | 3325 | 3. *Create a New Patch:* Before modifying source code, you need to |
3428 | create a new patch. To create a new patch file, use ``quilt new`` as | 3326 | create a new patch. To create a new patch file, use ``quilt new`` as |
3429 | below: | 3327 | below:: |
3430 | :: | ||
3431 | 3328 | ||
3432 | $ quilt new my_changes.patch | 3329 | $ quilt new my_changes.patch |
3433 | 3330 | ||
3434 | 4. *Notify Quilt and Add Files:* After creating the patch, you need to | 3331 | 4. *Notify Quilt and Add Files:* After creating the patch, you need to |
3435 | notify Quilt about the files you plan to edit. You notify Quilt by | 3332 | notify Quilt about the files you plan to edit. You notify Quilt by |
3436 | adding the files to the patch you just created: | 3333 | adding the files to the patch you just created:: |
3437 | :: | ||
3438 | 3334 | ||
3439 | $ quilt add file1.c file2.c file3.c | 3335 | $ quilt add file1.c file2.c file3.c |
3440 | 3336 | ||
@@ -3443,8 +3339,7 @@ Follow these general steps: | |||
3443 | 3339 | ||
3444 | 6. *Test Your Changes:* Once you have modified the source code, the | 3340 | 6. *Test Your Changes:* Once you have modified the source code, the |
3445 | easiest way to test your changes is by calling the ``do_compile`` | 3341 | easiest way to test your changes is by calling the ``do_compile`` |
3446 | task as shown in the following example: | 3342 | task as shown in the following example:: |
3447 | :: | ||
3448 | 3343 | ||
3449 | $ bitbake -c compile -f package | 3344 | $ bitbake -c compile -f package |
3450 | 3345 | ||
@@ -3481,8 +3376,7 @@ Follow these general steps: | |||
3481 | that holds the recipe (``.bb``) file or the append (``.bbappend``) | 3376 | that holds the recipe (``.bb``) file or the append (``.bbappend``) |
3482 | file. Placing the patch here guarantees that the OpenEmbedded build | 3377 | file. Placing the patch here guarantees that the OpenEmbedded build |
3483 | system will find the patch. Next, add the patch into the ``SRC_URI`` | 3378 | system will find the patch. Next, add the patch into the ``SRC_URI`` |
3484 | of the recipe. Here is an example: | 3379 | of the recipe. Here is an example:: |
3485 | :: | ||
3486 | 3380 | ||
3487 | SRC_URI += "file://my_changes.patch" | 3381 | SRC_URI += "file://my_changes.patch" |
3488 | 3382 | ||
@@ -3503,8 +3397,7 @@ this way can be helpful when debugging a build or preparing software to | |||
3503 | be used with the OpenEmbedded build system. | 3397 | be used with the OpenEmbedded build system. |
3504 | 3398 | ||
3505 | Following is an example that uses ``devshell`` on a target named | 3399 | Following is an example that uses ``devshell`` on a target named |
3506 | ``matchbox-desktop``: | 3400 | ``matchbox-desktop``:: |
3507 | :: | ||
3508 | 3401 | ||
3509 | $ bitbake matchbox-desktop -c devshell | 3402 | $ bitbake matchbox-desktop -c devshell |
3510 | 3403 | ||
@@ -3533,8 +3426,7 @@ corresponding ``run.*`` script in the | |||
3533 | directory (e.g., ``run.do_configure.``\ `pid`). If a task's script does | 3426 | directory (e.g., ``run.do_configure.``\ `pid`). If a task's script does |
3534 | not exist, which would be the case if the task was skipped by way of the | 3427 | not exist, which would be the case if the task was skipped by way of the |
3535 | sstate cache, you can create the task by first running it outside of the | 3428 | sstate cache, you can create the task by first running it outside of the |
3536 | ``devshell``: | 3429 | ``devshell``:: |
3537 | :: | ||
3538 | 3430 | ||
3539 | $ bitbake -c task | 3431 | $ bitbake -c task |
3540 | 3432 | ||
@@ -3581,8 +3473,7 @@ specified target. Then a new terminal is opened. Additionally, key | |||
3581 | Python objects and code are available in the same way they are to | 3473 | Python objects and code are available in the same way they are to |
3582 | BitBake tasks, in particular, the data store 'd'. So, commands such as | 3474 | BitBake tasks, in particular, the data store 'd'. So, commands such as |
3583 | the following are useful when exploring the data store and running | 3475 | the following are useful when exploring the data store and running |
3584 | functions: | 3476 | functions:: |
3585 | :: | ||
3586 | 3477 | ||
3587 | pydevshell> d.getVar("STAGING_DIR") | 3478 | pydevshell> d.getVar("STAGING_DIR") |
3588 | '/media/build1/poky/build/tmp/sysroots' | 3479 | '/media/build1/poky/build/tmp/sysroots' |
@@ -3602,8 +3493,7 @@ helpful when debugging a build or preparing software to be used with the | |||
3602 | OpenEmbedded build system. | 3493 | OpenEmbedded build system. |
3603 | 3494 | ||
3604 | Following is an example that uses ``devpyshell`` on a target named | 3495 | Following is an example that uses ``devpyshell`` on a target named |
3605 | ``matchbox-desktop``: | 3496 | ``matchbox-desktop``:: |
3606 | :: | ||
3607 | 3497 | ||
3608 | $ bitbake matchbox-desktop -c devpyshell | 3498 | $ bitbake matchbox-desktop -c devpyshell |
3609 | 3499 | ||
@@ -3664,8 +3554,7 @@ The following figure and list overviews the build process: | |||
3664 | 3554 | ||
3665 | 2. *Initialize the Build Environment:* Initialize the build environment | 3555 | 2. *Initialize the Build Environment:* Initialize the build environment |
3666 | by sourcing the build environment script (i.e. | 3556 | by sourcing the build environment script (i.e. |
3667 | :ref:`structure-core-script`): | 3557 | :ref:`structure-core-script`):: |
3668 | :: | ||
3669 | 3558 | ||
3670 | $ source oe-init-build-env [build_dir] | 3559 | $ source oe-init-build-env [build_dir] |
3671 | 3560 | ||
@@ -3690,8 +3579,7 @@ The following figure and list overviews the build process: | |||
3690 | and a centralized tarball download directory through the | 3579 | and a centralized tarball download directory through the |
3691 | :term:`DL_DIR` variable. | 3580 | :term:`DL_DIR` variable. |
3692 | 3581 | ||
3693 | 4. *Build the Image:* Build the image using the ``bitbake`` command: | 3582 | 4. *Build the Image:* Build the image using the ``bitbake`` command:: |
3694 | :: | ||
3695 | 3583 | ||
3696 | $ bitbake target | 3584 | $ bitbake target |
3697 | 3585 | ||
@@ -3710,8 +3598,7 @@ The following figure and list overviews the build process: | |||
3710 | Project Reference Manual. | 3598 | Project Reference Manual. |
3711 | 3599 | ||
3712 | As an example, the following command builds the | 3600 | As an example, the following command builds the |
3713 | ``core-image-minimal`` image: | 3601 | ``core-image-minimal`` image:: |
3714 | :: | ||
3715 | 3602 | ||
3716 | $ bitbake core-image-minimal | 3603 | $ bitbake core-image-minimal |
3717 | 3604 | ||
@@ -3763,8 +3650,7 @@ Follow these steps to set up and execute multiple configuration builds: | |||
3763 | 3650 | ||
3764 | Here is an example showing the minimal statements needed in a | 3651 | Here is an example showing the minimal statements needed in a |
3765 | configuration file for a "qemux86" target whose temporary build | 3652 | configuration file for a "qemux86" target whose temporary build |
3766 | directory is ``tmpmultix86``: | 3653 | directory is ``tmpmultix86``:: |
3767 | :: | ||
3768 | 3654 | ||
3769 | MACHINE = "qemux86" | 3655 | MACHINE = "qemux86" |
3770 | TMPDIR = "${TOPDIR}/tmpmultix86" | 3656 | TMPDIR = "${TOPDIR}/tmpmultix86" |
@@ -3789,8 +3675,7 @@ Follow these steps to set up and execute multiple configuration builds: | |||
3789 | variable in your ``conf/local.conf`` configuration file to specify | 3675 | variable in your ``conf/local.conf`` configuration file to specify |
3790 | each multiconfig. Continuing with the example from the previous | 3676 | each multiconfig. Continuing with the example from the previous |
3791 | figure, the ``BBMULTICONFIG`` variable needs to enable two | 3677 | figure, the ``BBMULTICONFIG`` variable needs to enable two |
3792 | multiconfigs: "x86" and "arm" by specifying each configuration file: | 3678 | multiconfigs: "x86" and "arm" by specifying each configuration file:: |
3793 | :: | ||
3794 | 3679 | ||
3795 | BBMULTICONFIG = "x86 arm" | 3680 | BBMULTICONFIG = "x86 arm" |
3796 | 3681 | ||
@@ -3804,13 +3689,11 @@ Follow these steps to set up and execute multiple configuration builds: | |||
3804 | with "". | 3689 | with "". |
3805 | 3690 | ||
3806 | - *Launch BitBake*: Use the following BitBake command form to launch | 3691 | - *Launch BitBake*: Use the following BitBake command form to launch |
3807 | the multiple configuration build: | 3692 | the multiple configuration build:: |
3808 | :: | ||
3809 | 3693 | ||
3810 | $ bitbake [mc:multiconfigname:]target [[[mc:multiconfigname:]target] ... ] | 3694 | $ bitbake [mc:multiconfigname:]target [[[mc:multiconfigname:]target] ... ] |
3811 | 3695 | ||
3812 | For the example in this section, the following command applies: | 3696 | For the example in this section, the following command applies:: |
3813 | :: | ||
3814 | 3697 | ||
3815 | $ bitbake mc:x86:core-image-minimal mc:arm:core-image-sato mc::core-image-base | 3698 | $ bitbake mc:x86:core-image-minimal mc:arm:core-image-sato mc::core-image-base |
3816 | 3699 | ||
@@ -3844,15 +3727,13 @@ essentially that the | |||
3844 | 3727 | ||
3845 | To enable dependencies in a multiple configuration build, you must | 3728 | To enable dependencies in a multiple configuration build, you must |
3846 | declare the dependencies in the recipe using the following statement | 3729 | declare the dependencies in the recipe using the following statement |
3847 | form: | 3730 | form:: |
3848 | :: | ||
3849 | 3731 | ||
3850 | task_or_package[mcdepends] = "mc:from_multiconfig:to_multiconfig:recipe_name:task_on_which_to_depend" | 3732 | task_or_package[mcdepends] = "mc:from_multiconfig:to_multiconfig:recipe_name:task_on_which_to_depend" |
3851 | 3733 | ||
3852 | To better show how to use this statement, consider the example scenario | 3734 | To better show how to use this statement, consider the example scenario |
3853 | from the first paragraph of this section. The following statement needs | 3735 | from the first paragraph of this section. The following statement needs |
3854 | to be added to the recipe that builds the ``core-image-sato`` image: | 3736 | to be added to the recipe that builds the ``core-image-sato`` image:: |
3855 | :: | ||
3856 | 3737 | ||
3857 | do_image[mcdepends] = "mc:x86:arm:core-image-minimal:do_rootfs" | 3738 | do_image[mcdepends] = "mc:x86:arm:core-image-minimal:do_rootfs" |
3858 | 3739 | ||
@@ -3862,8 +3743,7 @@ task on which the ``do_image`` task in the recipe depends is the | |||
3862 | with the "arm" multiconfig. | 3743 | with the "arm" multiconfig. |
3863 | 3744 | ||
3864 | Once you set up this dependency, you can build the "x86" multiconfig | 3745 | Once you set up this dependency, you can build the "x86" multiconfig |
3865 | using a BitBake command as follows: | 3746 | using a BitBake command as follows:: |
3866 | :: | ||
3867 | 3747 | ||
3868 | $ bitbake mc:x86:core-image-sato | 3748 | $ bitbake mc:x86:core-image-sato |
3869 | 3749 | ||
@@ -3874,8 +3754,7 @@ dependency, BitBake also executes through the ``do_rootfs`` task for the | |||
3874 | 3754 | ||
3875 | Having a recipe depend on the root filesystem of another build might not | 3755 | Having a recipe depend on the root filesystem of another build might not |
3876 | seem that useful. Consider this change to the statement in the | 3756 | seem that useful. Consider this change to the statement in the |
3877 | ``core-image-sato`` recipe: | 3757 | ``core-image-sato`` recipe:: |
3878 | :: | ||
3879 | 3758 | ||
3880 | do_image[mcdepends] = "mc:x86:arm:core-image-minimal:do_image" | 3759 | do_image[mcdepends] = "mc:x86:arm:core-image-minimal:do_image" |
3881 | 3760 | ||
@@ -4091,8 +3970,7 @@ happens, which changes the way you build them. You can also modify the | |||
4091 | filesystem itself or select a different filesystem. | 3970 | filesystem itself or select a different filesystem. |
4092 | 3971 | ||
4093 | First, find out what is hogging your root filesystem by running the | 3972 | First, find out what is hogging your root filesystem by running the |
4094 | ``dirsize.py`` script from your root directory: | 3973 | ``dirsize.py`` script from your root directory:: |
4095 | :: | ||
4096 | 3974 | ||
4097 | $ cd root-directory-of-image | 3975 | $ cd root-directory-of-image |
4098 | $ dirsize.py 100000 > dirsize-100k.log | 3976 | $ dirsize.py 100000 > dirsize-100k.log |
@@ -4107,8 +3985,7 @@ the root filesystem that take up large amounts of memory. | |||
4107 | 3985 | ||
4108 | You need to be sure that what you eliminate does not cripple the | 3986 | You need to be sure that what you eliminate does not cripple the |
4109 | functionality you need. One way to see how packages relate to each other | 3987 | functionality you need. One way to see how packages relate to each other |
4110 | is by using the Dependency Explorer UI with the BitBake command: | 3988 | is by using the Dependency Explorer UI with the BitBake command:: |
4111 | :: | ||
4112 | 3989 | ||
4113 | $ cd image-directory | 3990 | $ cd image-directory |
4114 | $ bitbake -u taskexp -g image | 3991 | $ bitbake -u taskexp -g image |
@@ -4124,8 +4001,7 @@ instead of ``udev``. | |||
4124 | 4001 | ||
4125 | Use your ``local.conf`` file to make changes. For example, to eliminate | 4002 | Use your ``local.conf`` file to make changes. For example, to eliminate |
4126 | ``udev`` and ``glib``, set the following in the local configuration | 4003 | ``udev`` and ``glib``, set the following in the local configuration |
4127 | file: | 4004 | file:: |
4128 | :: | ||
4129 | 4005 | ||
4130 | VIRTUAL-RUNTIME_dev_manager = "" | 4006 | VIRTUAL-RUNTIME_dev_manager = "" |
4131 | 4007 | ||
@@ -4153,8 +4029,7 @@ building? Which drivers do you build by default? | |||
4153 | You can modify the kernel source if you want to help with boot time. | 4029 | You can modify the kernel source if you want to help with boot time. |
4154 | 4030 | ||
4155 | Run the ``ksize.py`` script from the top-level Linux build directory to | 4031 | Run the ``ksize.py`` script from the top-level Linux build directory to |
4156 | get an idea of what is making up the kernel: | 4032 | get an idea of what is making up the kernel:: |
4157 | :: | ||
4158 | 4033 | ||
4159 | $ cd top-level-linux-build-directory | 4034 | $ cd top-level-linux-build-directory |
4160 | $ ksize.py > ksize.log | 4035 | $ ksize.py > ksize.log |
@@ -4168,8 +4043,7 @@ in a compressed kernel image. Look to reduce the areas that are large | |||
4168 | and taking up around the "90% rule." | 4043 | and taking up around the "90% rule." |
4169 | 4044 | ||
4170 | To examine, or drill down, into any particular area, use the ``-d`` | 4045 | To examine, or drill down, into any particular area, use the ``-d`` |
4171 | option with the script: | 4046 | option with the script:: |
4172 | :: | ||
4173 | 4047 | ||
4174 | $ ksize.py -d > ksize.log | 4048 | $ ksize.py -d > ksize.log |
4175 | 4049 | ||
@@ -4316,8 +4190,7 @@ your tunings to best consider build times and package feed maintenance. | |||
4316 | machine-architecture dependent, make sure your recipe enables the | 4190 | machine-architecture dependent, make sure your recipe enables the |
4317 | "machine" package architecture through the | 4191 | "machine" package architecture through the |
4318 | :term:`MACHINE_ARCH` | 4192 | :term:`MACHINE_ARCH` |
4319 | variable: | 4193 | variable:: |
4320 | :: | ||
4321 | 4194 | ||
4322 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 4195 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
4323 | 4196 | ||
@@ -4325,8 +4198,7 @@ your tunings to best consider build times and package feed maintenance. | |||
4325 | specifically enable a package architecture through the | 4198 | specifically enable a package architecture through the |
4326 | :term:`PACKAGE_ARCH`, The | 4199 | :term:`PACKAGE_ARCH`, The |
4327 | OpenEmbedded build system defaults to the | 4200 | OpenEmbedded build system defaults to the |
4328 | :term:`TUNE_PKGARCH` setting: | 4201 | :term:`TUNE_PKGARCH` setting:: |
4329 | :: | ||
4330 | 4202 | ||
4331 | PACKAGE_ARCH = "${TUNE_PKGARCH}" | 4203 | PACKAGE_ARCH = "${TUNE_PKGARCH}" |
4332 | 4204 | ||
@@ -4426,15 +4298,13 @@ to do is inherit the | |||
4426 | and then set the | 4298 | and then set the |
4427 | :term:`EXTERNALSRC` variable to | 4299 | :term:`EXTERNALSRC` variable to |
4428 | point to your external source code. Here are the statements to put in | 4300 | point to your external source code. Here are the statements to put in |
4429 | your ``local.conf`` file: | 4301 | your ``local.conf`` file:: |
4430 | :: | ||
4431 | 4302 | ||
4432 | INHERIT += "externalsrc" | 4303 | INHERIT += "externalsrc" |
4433 | EXTERNALSRC_pn-myrecipe = "path-to-your-source-tree" | 4304 | EXTERNALSRC_pn-myrecipe = "path-to-your-source-tree" |
4434 | 4305 | ||
4435 | This next example shows how to accomplish the same thing by setting | 4306 | This next example shows how to accomplish the same thing by setting |
4436 | ``EXTERNALSRC`` in the recipe itself or in the recipe's append file: | 4307 | ``EXTERNALSRC`` in the recipe itself or in the recipe's append file:: |
4437 | :: | ||
4438 | 4308 | ||
4439 | EXTERNALSRC = "path" | 4309 | EXTERNALSRC = "path" |
4440 | EXTERNALSRC_BUILD = "path" | 4310 | EXTERNALSRC_BUILD = "path" |
@@ -4451,8 +4321,7 @@ directory separate from the external source directory as specified by | |||
4451 | to have the source built in the same directory in which it resides, or | 4321 | to have the source built in the same directory in which it resides, or |
4452 | some other nominated directory, you can set | 4322 | some other nominated directory, you can set |
4453 | :term:`EXTERNALSRC_BUILD` | 4323 | :term:`EXTERNALSRC_BUILD` |
4454 | to point to that directory: | 4324 | to point to that directory:: |
4455 | :: | ||
4456 | 4325 | ||
4457 | EXTERNALSRC_BUILD_pn-myrecipe = "path-to-your-source-tree" | 4326 | EXTERNALSRC_BUILD_pn-myrecipe = "path-to-your-source-tree" |
4458 | 4327 | ||
@@ -4475,8 +4344,7 @@ Follow these steps to populate your Downloads directory: | |||
4475 | an empty location or one that does not yet exist. | 4344 | an empty location or one that does not yet exist. |
4476 | 4345 | ||
4477 | 2. *Generate Tarballs of the Source Git Repositories:* Edit your | 4346 | 2. *Generate Tarballs of the Source Git Repositories:* Edit your |
4478 | ``local.conf`` configuration file as follows: | 4347 | ``local.conf`` configuration file as follows:: |
4479 | :: | ||
4480 | 4348 | ||
4481 | DL_DIR = "/home/your-download-dir/" | 4349 | DL_DIR = "/home/your-download-dir/" |
4482 | BB_GENERATE_MIRROR_TARBALLS = "1" | 4350 | BB_GENERATE_MIRROR_TARBALLS = "1" |
@@ -4489,8 +4357,7 @@ Follow these steps to populate your Downloads directory: | |||
4489 | variable for more information. | 4357 | variable for more information. |
4490 | 4358 | ||
4491 | 3. *Populate Your Downloads Directory Without Building:* Use BitBake to | 4359 | 3. *Populate Your Downloads Directory Without Building:* Use BitBake to |
4492 | fetch your sources but inhibit the build: | 4360 | fetch your sources but inhibit the build:: |
4493 | :: | ||
4494 | 4361 | ||
4495 | $ bitbake target --runonly=fetch | 4362 | $ bitbake target --runonly=fetch |
4496 | 4363 | ||
@@ -4536,8 +4403,7 @@ directory: | |||
4536 | ``${``\ :term:`TMPDIR`\ ``}`` | 4403 | ``${``\ :term:`TMPDIR`\ ``}`` |
4537 | directory or using a new :term:`Build Directory`. | 4404 | directory or using a new :term:`Build Directory`. |
4538 | 4405 | ||
4539 | 3. *Build Your Target:* Use BitBake to build your target: | 4406 | 3. *Build Your Target:* Use BitBake to build your target:: |
4540 | :: | ||
4541 | 4407 | ||
4542 | $ bitbake target | 4408 | $ bitbake target |
4543 | 4409 | ||
@@ -4550,8 +4416,7 @@ directory: | |||
4550 | The offline build does not work if recipes attempt to find the | 4416 | The offline build does not work if recipes attempt to find the |
4551 | latest version of software by setting | 4417 | latest version of software by setting |
4552 | :term:`SRCREV` to | 4418 | :term:`SRCREV` to |
4553 | ``${``\ :term:`AUTOREV`\ ``}``: | 4419 | ``${``\ :term:`AUTOREV`\ ``}``:: |
4554 | :: | ||
4555 | 4420 | ||
4556 | SRCREV = "${AUTOREV}" | 4421 | SRCREV = "${AUTOREV}" |
4557 | 4422 | ||
@@ -4670,8 +4535,7 @@ that can help you speed up the build: | |||
4670 | - Disable static library generation for recipes derived from | 4535 | - Disable static library generation for recipes derived from |
4671 | ``autoconf`` or ``libtool``: Following is an example showing how to | 4536 | ``autoconf`` or ``libtool``: Following is an example showing how to |
4672 | disable static libraries and still provide an override to handle | 4537 | disable static libraries and still provide an override to handle |
4673 | exceptions: | 4538 | exceptions:: |
4674 | :: | ||
4675 | 4539 | ||
4676 | STATICLIBCONF = "--disable-static" | 4540 | STATICLIBCONF = "--disable-static" |
4677 | STATICLIBCONF_sqlite3-native = "" | 4541 | STATICLIBCONF_sqlite3-native = "" |
@@ -4726,8 +4590,7 @@ library files. | |||
4726 | static library files through ``${PN}-dev``. | 4590 | static library files through ``${PN}-dev``. |
4727 | 4591 | ||
4728 | Following is part of the BitBake configuration file, where you can see | 4592 | Following is part of the BitBake configuration file, where you can see |
4729 | how the static library files are defined: | 4593 | how the static library files are defined:: |
4730 | :: | ||
4731 | 4594 | ||
4732 | PACKAGE_BEFORE_PN ?= "" | 4595 | PACKAGE_BEFORE_PN ?= "" |
4733 | PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}" | 4596 | PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}" |
@@ -4833,8 +4696,7 @@ After you have set up the recipes, you need to define the actual | |||
4833 | combination of multiple libraries you want to build. You accomplish this | 4696 | combination of multiple libraries you want to build. You accomplish this |
4834 | through your ``local.conf`` configuration file in the | 4697 | through your ``local.conf`` configuration file in the |
4835 | :term:`Build Directory`. An example | 4698 | :term:`Build Directory`. An example |
4836 | configuration would be as follows: | 4699 | configuration would be as follows:: |
4837 | :: | ||
4838 | 4700 | ||
4839 | MACHINE = "qemux86-64" | 4701 | MACHINE = "qemux86-64" |
4840 | require conf/multilib.conf | 4702 | require conf/multilib.conf |
@@ -4850,14 +4712,12 @@ on this particular tuning, see | |||
4850 | 4712 | ||
4851 | The example then includes ``lib32-glib-2.0`` in all the images, which | 4713 | The example then includes ``lib32-glib-2.0`` in all the images, which |
4852 | illustrates one method of including a multiple library dependency. You | 4714 | illustrates one method of including a multiple library dependency. You |
4853 | can use a normal image build to include this dependency, for example: | 4715 | can use a normal image build to include this dependency, for example:: |
4854 | :: | ||
4855 | 4716 | ||
4856 | $ bitbake core-image-sato | 4717 | $ bitbake core-image-sato |
4857 | 4718 | ||
4858 | You can also build Multilib packages | 4719 | You can also build Multilib packages |
4859 | specifically with a command like this: | 4720 | specifically with a command like this:: |
4860 | :: | ||
4861 | 4721 | ||
4862 | $ bitbake lib32-glib-2.0 | 4722 | $ bitbake lib32-glib-2.0 |
4863 | 4723 | ||
@@ -4952,8 +4812,7 @@ you have other recipes that depend on a given library, you need to use | |||
4952 | the :term:`DEPENDS` variable to | 4812 | the :term:`DEPENDS` variable to |
4953 | create the dependency. Continuing with the same example, if you want to | 4813 | create the dependency. Continuing with the same example, if you want to |
4954 | have a recipe depend on the 1.8 version of the ``clutter`` library, use | 4814 | have a recipe depend on the 1.8 version of the ``clutter`` library, use |
4955 | the following in your recipe: | 4815 | the following in your recipe:: |
4956 | :: | ||
4957 | 4816 | ||
4958 | DEPENDS = "clutter-1.8" | 4817 | DEPENDS = "clutter-1.8" |
4959 | 4818 | ||
@@ -4996,8 +4855,7 @@ follows: | |||
4996 | - Support for large images exists. | 4855 | - Support for large images exists. |
4997 | 4856 | ||
4998 | To use the x32 psABI, you need to edit your ``conf/local.conf`` | 4857 | To use the x32 psABI, you need to edit your ``conf/local.conf`` |
4999 | configuration file as follows: | 4858 | configuration file as follows:: |
5000 | :: | ||
5001 | 4859 | ||
5002 | MACHINE = "qemux86-64" | 4860 | MACHINE = "qemux86-64" |
5003 | DEFAULTTUNE = "x86-64-x32" | 4861 | DEFAULTTUNE = "x86-64-x32" |
@@ -5006,8 +4864,7 @@ configuration file as follows: | |||
5006 | 4864 | ||
5007 | Once you have set | 4865 | Once you have set |
5008 | up your configuration file, use BitBake to build an image that supports | 4866 | up your configuration file, use BitBake to build an image that supports |
5009 | the x32 psABI. Here is an example: | 4867 | the x32 psABI. Here is an example:: |
5010 | :: | ||
5011 | 4868 | ||
5012 | $ bitbake core-image-sato | 4869 | $ bitbake core-image-sato |
5013 | 4870 | ||
@@ -5066,8 +4923,7 @@ library package involves the following: | |||
5066 | 3. Try to build the recipe. If you encounter build errors that look like | 4923 | 3. Try to build the recipe. If you encounter build errors that look like |
5067 | something is unable to find ``.so`` libraries, check where these | 4924 | something is unable to find ``.so`` libraries, check where these |
5068 | libraries are located in the source tree and add the following to the | 4925 | libraries are located in the source tree and add the following to the |
5069 | recipe: | 4926 | recipe:: |
5070 | :: | ||
5071 | 4927 | ||
5072 | GIR_EXTRA_LIBS_PATH = "${B}/something/.libs" | 4928 | GIR_EXTRA_LIBS_PATH = "${B}/something/.libs" |
5073 | 4929 | ||
@@ -5097,8 +4953,7 @@ perhaps QEMU does not work on your build host and target architecture | |||
5097 | combination. If so, you can use either of the following methods to | 4953 | combination. If so, you can use either of the following methods to |
5098 | disable GIR file generations: | 4954 | disable GIR file generations: |
5099 | 4955 | ||
5100 | - Add the following to your distro configuration: | 4956 | - Add the following to your distro configuration:: |
5101 | :: | ||
5102 | 4957 | ||
5103 | DISTRO_FEATURES_BACKFILL_CONSIDERED = "gobject-introspection-data" | 4958 | DISTRO_FEATURES_BACKFILL_CONSIDERED = "gobject-introspection-data" |
5104 | 4959 | ||
@@ -5106,8 +4961,7 @@ disable GIR file generations: | |||
5106 | QEMU but will still enable building introspection tools and libraries | 4961 | QEMU but will still enable building introspection tools and libraries |
5107 | (i.e. building them does not require the use of QEMU). | 4962 | (i.e. building them does not require the use of QEMU). |
5108 | 4963 | ||
5109 | - Add the following to your machine configuration: | 4964 | - Add the following to your machine configuration:: |
5110 | :: | ||
5111 | 4965 | ||
5112 | MACHINE_FEATURES_BACKFILL_CONSIDERED = "qemu-usermode" | 4966 | MACHINE_FEATURES_BACKFILL_CONSIDERED = "qemu-usermode" |
5113 | 4967 | ||
@@ -5140,8 +4994,7 @@ working in an image: | |||
5140 | 4994 | ||
5141 | 3. Launch a Terminal and then start Python in the terminal. | 4995 | 3. Launch a Terminal and then start Python in the terminal. |
5142 | 4996 | ||
5143 | 4. Enter the following in the terminal: | 4997 | 4. Enter the following in the terminal:: |
5144 | :: | ||
5145 | 4998 | ||
5146 | >>> from gi.repository import GLib | 4999 | >>> from gi.repository import GLib |
5147 | >>> GLib.get_host_name() | 5000 | >>> GLib.get_host_name() |
@@ -5289,8 +5142,7 @@ system needs to meet the following requirements: | |||
5289 | form generated by the OpenEmbedded build system. | 5142 | form generated by the OpenEmbedded build system. |
5290 | 5143 | ||
5291 | - You must build several native tools, which are built to run on the | 5144 | - You must build several native tools, which are built to run on the |
5292 | build system: | 5145 | build system:: |
5293 | :: | ||
5294 | 5146 | ||
5295 | $ bitbake parted-native dosfstools-native mtools-native | 5147 | $ bitbake parted-native dosfstools-native mtools-native |
5296 | 5148 | ||
@@ -5306,8 +5158,7 @@ Getting Help | |||
5306 | 5158 | ||
5307 | You can get general help for the ``wic`` command by entering the ``wic`` | 5159 | You can get general help for the ``wic`` command by entering the ``wic`` |
5308 | command by itself or by entering the command with a help argument as | 5160 | command by itself or by entering the command with a help argument as |
5309 | follows: | 5161 | follows:: |
5310 | :: | ||
5311 | 5162 | ||
5312 | $ wic -h | 5163 | $ wic -h |
5313 | $ wic --help | 5164 | $ wic --help |
@@ -5315,32 +5166,27 @@ follows: | |||
5315 | 5166 | ||
5316 | Currently, Wic supports seven commands: ``cp``, ``create``, ``help``, | 5167 | Currently, Wic supports seven commands: ``cp``, ``create``, ``help``, |
5317 | ``list``, ``ls``, ``rm``, and ``write``. You can get help for all these | 5168 | ``list``, ``ls``, ``rm``, and ``write``. You can get help for all these |
5318 | commands except "help" by using the following form: | 5169 | commands except "help" by using the following form:: |
5319 | :: | ||
5320 | 5170 | ||
5321 | $ wic help command | 5171 | $ wic help command |
5322 | 5172 | ||
5323 | For example, the following command returns help for the ``write`` | 5173 | For example, the following command returns help for the ``write`` |
5324 | command: | 5174 | command:: |
5325 | :: | ||
5326 | 5175 | ||
5327 | $ wic help write | 5176 | $ wic help write |
5328 | 5177 | ||
5329 | Wic supports help for three topics: ``overview``, ``plugins``, and | 5178 | Wic supports help for three topics: ``overview``, ``plugins``, and |
5330 | ``kickstart``. You can get help for any topic using the following form: | 5179 | ``kickstart``. You can get help for any topic using the following form:: |
5331 | :: | ||
5332 | 5180 | ||
5333 | $ wic help topic | 5181 | $ wic help topic |
5334 | 5182 | ||
5335 | For example, the following returns overview help for Wic: | 5183 | For example, the following returns overview help for Wic:: |
5336 | :: | ||
5337 | 5184 | ||
5338 | $ wic help overview | 5185 | $ wic help overview |
5339 | 5186 | ||
5340 | One additional level of help exists for Wic. You can get help on | 5187 | One additional level of help exists for Wic. You can get help on |
5341 | individual images through the ``list`` command. You can use the ``list`` | 5188 | individual images through the ``list`` command. You can use the ``list`` |
5342 | command to return the available Wic images as follows: | 5189 | command to return the available Wic images as follows:: |
5343 | :: | ||
5344 | 5190 | ||
5345 | $ wic list images | 5191 | $ wic list images |
5346 | genericx86 Create an EFI disk image for genericx86* | 5192 | genericx86 Create an EFI disk image for genericx86* |
@@ -5359,8 +5205,7 @@ command to return the available Wic images as follows: | |||
5359 | Once you know the list of available | 5205 | Once you know the list of available |
5360 | Wic images, you can use ``help`` with the command to get help on a | 5206 | Wic images, you can use ``help`` with the command to get help on a |
5361 | particular image. For example, the following command returns help on the | 5207 | particular image. For example, the following command returns help on the |
5362 | "beaglebone-yocto" image: | 5208 | "beaglebone-yocto" image:: |
5363 | :: | ||
5364 | 5209 | ||
5365 | $ wic list beaglebone-yocto help | 5210 | $ wic list beaglebone-yocto help |
5366 | 5211 | ||
@@ -5397,8 +5242,7 @@ can point to arbitrary kernel, root filesystem locations, and so forth. | |||
5397 | Contrast this behavior with cooked mode where Wic looks in the Build | 5242 | Contrast this behavior with cooked mode where Wic looks in the Build |
5398 | Directory (e.g. ``tmp/deploy/images/``\ machine). | 5243 | Directory (e.g. ``tmp/deploy/images/``\ machine). |
5399 | 5244 | ||
5400 | The general form of the ``wic`` command in raw mode is: | 5245 | The general form of the ``wic`` command in raw mode is:: |
5401 | :: | ||
5402 | 5246 | ||
5403 | $ wic create wks_file options ... | 5247 | $ wic create wks_file options ... |
5404 | 5248 | ||
@@ -5456,8 +5300,7 @@ a kickstart file and the name of the image from which to use artifacts | |||
5456 | by using the "-e" option. Wic looks in the Build Directory (e.g. | 5300 | by using the "-e" option. Wic looks in the Build Directory (e.g. |
5457 | ``tmp/deploy/images/``\ machine) for artifacts. | 5301 | ``tmp/deploy/images/``\ machine) for artifacts. |
5458 | 5302 | ||
5459 | The general form of the ``wic`` command using Cooked Mode is as follows: | 5303 | The general form of the ``wic`` command using Cooked Mode is as follows:: |
5460 | :: | ||
5461 | 5304 | ||
5462 | $ wic create wks_file -e IMAGE_NAME | 5305 | $ wic create wks_file -e IMAGE_NAME |
5463 | 5306 | ||
@@ -5480,14 +5323,12 @@ Using an Existing Kickstart File | |||
5480 | If you do not want to create your own kickstart file, you can use an | 5323 | If you do not want to create your own kickstart file, you can use an |
5481 | existing file provided by the Wic installation. As shipped, kickstart | 5324 | existing file provided by the Wic installation. As shipped, kickstart |
5482 | files can be found in the :ref:`overview-manual/development-environment:yocto project source repositories` in the | 5325 | files can be found in the :ref:`overview-manual/development-environment:yocto project source repositories` in the |
5483 | following two locations: | 5326 | following two locations:: |
5484 | :: | ||
5485 | 5327 | ||
5486 | poky/meta-yocto-bsp/wic | 5328 | poky/meta-yocto-bsp/wic |
5487 | poky/scripts/lib/wic/canned-wks | 5329 | poky/scripts/lib/wic/canned-wks |
5488 | 5330 | ||
5489 | Use the following command to list the available kickstart files: | 5331 | Use the following command to list the available kickstart files:: |
5490 | :: | ||
5491 | 5332 | ||
5492 | $ wic list images | 5333 | $ wic list images |
5493 | genericx86 Create an EFI disk image for genericx86* | 5334 | genericx86 Create an EFI disk image for genericx86* |
@@ -5505,15 +5346,13 @@ Use the following command to list the available kickstart files: | |||
5505 | 5346 | ||
5506 | When you use an existing file, you | 5347 | When you use an existing file, you |
5507 | do not have to use the ``.wks`` extension. Here is an example in Raw | 5348 | do not have to use the ``.wks`` extension. Here is an example in Raw |
5508 | Mode that uses the ``directdisk`` file: | 5349 | Mode that uses the ``directdisk`` file:: |
5509 | :: | ||
5510 | 5350 | ||
5511 | $ wic create directdisk -r rootfs_dir -b bootimg_dir \ | 5351 | $ wic create directdisk -r rootfs_dir -b bootimg_dir \ |
5512 | -k kernel_dir -n native_sysroot | 5352 | -k kernel_dir -n native_sysroot |
5513 | 5353 | ||
5514 | Here are the actual partition language commands used in the | 5354 | Here are the actual partition language commands used in the |
5515 | ``genericx86.wks`` file to generate an image: | 5355 | ``genericx86.wks`` file to generate an image:: |
5516 | :: | ||
5517 | 5356 | ||
5518 | # short-description: Create an EFI disk image for genericx86* | 5357 | # short-description: Create an EFI disk image for genericx86* |
5519 | # long-description: Creates a partitioned EFI disk image for genericx86* machines | 5358 | # long-description: Creates a partitioned EFI disk image for genericx86* machines |
@@ -5571,8 +5410,7 @@ When the Wic implementation needs to invoke a partition-specific | |||
5571 | implementation, it looks for the plugin with the same name as the | 5410 | implementation, it looks for the plugin with the same name as the |
5572 | ``--source`` parameter used in the kickstart file given to that | 5411 | ``--source`` parameter used in the kickstart file given to that |
5573 | partition. For example, if the partition is set up using the following | 5412 | partition. For example, if the partition is set up using the following |
5574 | command in a kickstart file: | 5413 | command in a kickstart file:: |
5575 | :: | ||
5576 | 5414 | ||
5577 | part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024 | 5415 | part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024 |
5578 | 5416 | ||
@@ -5583,8 +5421,7 @@ members of the matching source plugin (i.e. ``bootimg-pcbios``) in the | |||
5583 | To be more concrete, here is the corresponding plugin definition from | 5421 | To be more concrete, here is the corresponding plugin definition from |
5584 | the ``bootimg-pcbios.py`` file for the previous command along with an | 5422 | the ``bootimg-pcbios.py`` file for the previous command along with an |
5585 | example method called by the Wic implementation when it needs to prepare | 5423 | example method called by the Wic implementation when it needs to prepare |
5586 | a partition using an implementation-specific function: | 5424 | a partition using an implementation-specific function:: |
5587 | :: | ||
5588 | 5425 | ||
5589 | . | 5426 | . |
5590 | . | 5427 | . |
@@ -5675,8 +5512,7 @@ Generate an Image using an Existing Kickstart File | |||
5675 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 5512 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
5676 | 5513 | ||
5677 | This example runs in Cooked Mode and uses the ``mkefidisk`` kickstart | 5514 | This example runs in Cooked Mode and uses the ``mkefidisk`` kickstart |
5678 | file: | 5515 | file:: |
5679 | :: | ||
5680 | 5516 | ||
5681 | $ wic create mkefidisk -e core-image-minimal | 5517 | $ wic create mkefidisk -e core-image-minimal |
5682 | INFO: Building wic-tools... | 5518 | INFO: Building wic-tools... |
@@ -5712,8 +5548,7 @@ and kickstart file information. | |||
5712 | Continuing with the example, you can now write the image from the Build | 5548 | Continuing with the example, you can now write the image from the Build |
5713 | Directory onto a USB stick, or whatever media for which you built your | 5549 | Directory onto a USB stick, or whatever media for which you built your |
5714 | image, and boot from the media. You can write the image by using | 5550 | image, and boot from the media. You can write the image by using |
5715 | ``bmaptool`` or ``dd``: | 5551 | ``bmaptool`` or ``dd``:: |
5716 | :: | ||
5717 | 5552 | ||
5718 | $ oe-run-native bmaptool copy mkefidisk-201804191017-sda.direct /dev/sdX | 5553 | $ oe-run-native bmaptool copy mkefidisk-201804191017-sda.direct /dev/sdX |
5719 | 5554 | ||
@@ -5761,8 +5596,7 @@ the lines that specify the target disk from which to boot. | |||
5761 | Next, the example modifies the ``directdisksdb-gpt.wks`` file and | 5596 | Next, the example modifies the ``directdisksdb-gpt.wks`` file and |
5762 | changes all instances of "``--ondisk sda``" to "``--ondisk sdb``". The | 5597 | changes all instances of "``--ondisk sda``" to "``--ondisk sdb``". The |
5763 | example changes the following two lines and leaves the remaining lines | 5598 | example changes the following two lines and leaves the remaining lines |
5764 | untouched: | 5599 | untouched:: |
5765 | :: | ||
5766 | 5600 | ||
5767 | part /boot --source bootimg-pcbios --ondisk sdb --label boot --active --align 1024 | 5601 | part /boot --source bootimg-pcbios --ondisk sdb --label boot --active --align 1024 |
5768 | part / --source rootfs --ondisk sdb --fstype=ext4 --label platform --align 1024 --use-uuid | 5602 | part / --source rootfs --ondisk sdb --fstype=ext4 --label platform --align 1024 --use-uuid |
@@ -5799,8 +5633,7 @@ Computing (nuc) :term:`MACHINE` the | |||
5799 | 5633 | ||
5800 | Continuing with the example, you can now directly ``dd`` the image to a | 5634 | Continuing with the example, you can now directly ``dd`` the image to a |
5801 | USB stick, or whatever media for which you built your image, and boot | 5635 | USB stick, or whatever media for which you built your image, and boot |
5802 | the resulting media: | 5636 | the resulting media:: |
5803 | :: | ||
5804 | 5637 | ||
5805 | $ sudo dd if=directdisksdb-gpt-201710090938-sdb.direct of=/dev/sdb | 5638 | $ sudo dd if=directdisksdb-gpt-201710090938-sdb.direct of=/dev/sdb |
5806 | 140966+0 records in | 5639 | 140966+0 records in |
@@ -5814,8 +5647,7 @@ Using a Modified Kickstart File and Running in Raw Mode | |||
5814 | This next example manually specifies each build artifact (runs in Raw | 5647 | This next example manually specifies each build artifact (runs in Raw |
5815 | Mode) and uses a modified kickstart file. The example also uses the | 5648 | Mode) and uses a modified kickstart file. The example also uses the |
5816 | ``-o`` option to cause Wic to create the output somewhere other than the | 5649 | ``-o`` option to cause Wic to create the output somewhere other than the |
5817 | default output directory, which is the current directory: | 5650 | default output directory, which is the current directory:: |
5818 | :: | ||
5819 | 5651 | ||
5820 | $ wic create /home/stephano/my_yocto/test.wks -o /home/stephano/testwic \ | 5652 | $ wic create /home/stephano/my_yocto/test.wks -o /home/stephano/testwic \ |
5821 | --rootfs-dir /home/stephano/build/master/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs \ | 5653 | --rootfs-dir /home/stephano/build/master/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs \ |
@@ -5860,8 +5692,7 @@ The following example examines the contents of the Wic image, deletes | |||
5860 | the existing kernel, and then inserts a new kernel: | 5692 | the existing kernel, and then inserts a new kernel: |
5861 | 5693 | ||
5862 | 1. *List the Partitions:* Use the ``wic ls`` command to list all the | 5694 | 1. *List the Partitions:* Use the ``wic ls`` command to list all the |
5863 | partitions in the Wic image: | 5695 | partitions in the Wic image:: |
5864 | :: | ||
5865 | 5696 | ||
5866 | $ wic ls tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic | 5697 | $ wic ls tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic |
5867 | Num Start End Size Fstype | 5698 | Num Start End Size Fstype |
@@ -5877,8 +5708,7 @@ the existing kernel, and then inserts a new kernel: | |||
5877 | .. note:: | 5708 | .. note:: |
5878 | 5709 | ||
5879 | You can get command usage on any Wic command using the following | 5710 | You can get command usage on any Wic command using the following |
5880 | form: | 5711 | form:: |
5881 | :: | ||
5882 | 5712 | ||
5883 | $ wic help command | 5713 | $ wic help command |
5884 | 5714 | ||
@@ -5886,14 +5716,12 @@ the existing kernel, and then inserts a new kernel: | |||
5886 | For example, the following command shows you the various ways to | 5716 | For example, the following command shows you the various ways to |
5887 | use the | 5717 | use the |
5888 | wic ls | 5718 | wic ls |
5889 | command: | 5719 | command:: |
5890 | :: | ||
5891 | 5720 | ||
5892 | $ wic help ls | 5721 | $ wic help ls |
5893 | 5722 | ||
5894 | 5723 | ||
5895 | The following command shows what is in partition one: | 5724 | The following command shows what is in partition one:: |
5896 | :: | ||
5897 | 5725 | ||
5898 | $ wic ls tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic:1 | 5726 | $ wic ls tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic:1 |
5899 | Volume in drive : is boot | 5727 | Volume in drive : is boot |
@@ -5915,8 +5743,7 @@ the existing kernel, and then inserts a new kernel: | |||
5915 | 5743 | ||
5916 | If you see the following error, you need to update or create a | 5744 | If you see the following error, you need to update or create a |
5917 | ``~/.mtoolsrc`` file and be sure to have the line "mtools_skip_check=1" | 5745 | ``~/.mtoolsrc`` file and be sure to have the line "mtools_skip_check=1" |
5918 | in the file. Then, run the Wic command again: | 5746 | in the file. Then, run the Wic command again:: |
5919 | :: | ||
5920 | 5747 | ||
5921 | ERROR: _exec_cmd: /usr/bin/mdir -i /tmp/wic-parttfokuwra ::/ returned '1' instead of 0 | 5748 | ERROR: _exec_cmd: /usr/bin/mdir -i /tmp/wic-parttfokuwra ::/ returned '1' instead of 0 |
5922 | output: Total number of sectors (47824) not a multiple of sectors per track (32)! | 5749 | output: Total number of sectors (47824) not a multiple of sectors per track (32)! |
@@ -5924,8 +5751,7 @@ the existing kernel, and then inserts a new kernel: | |||
5924 | 5751 | ||
5925 | 5752 | ||
5926 | 3. *Remove the Old Kernel:* Use the ``wic rm`` command to remove the | 5753 | 3. *Remove the Old Kernel:* Use the ``wic rm`` command to remove the |
5927 | ``vmlinuz`` file (kernel): | 5754 | ``vmlinuz`` file (kernel):: |
5928 | :: | ||
5929 | 5755 | ||
5930 | $ wic rm tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic:1/vmlinuz | 5756 | $ wic rm tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic:1/vmlinuz |
5931 | 5757 | ||
@@ -5937,8 +5763,7 @@ the existing kernel, and then inserts a new kernel: | |||
5937 | kernel will be in the ``workspace/sources`` area. | 5763 | kernel will be in the ``workspace/sources`` area. |
5938 | 5764 | ||
5939 | The following example assumes ``devtool`` was used to build the | 5765 | The following example assumes ``devtool`` was used to build the |
5940 | kernel: | 5766 | kernel:: |
5941 | :: | ||
5942 | 5767 | ||
5943 | $ wic cp poky_sdk/tmp/work/qemux86-poky-linux/linux-yocto/4.12.12+git999-r0/linux-yocto-4.12.12+git999/arch/x86/boot/bzImage \ | 5768 | $ wic cp poky_sdk/tmp/work/qemux86-poky-linux/linux-yocto/4.12.12+git999-r0/linux-yocto-4.12.12+git999/arch/x86/boot/bzImage \ |
5944 | poky/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic:1/vmlinuz | 5769 | poky/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic:1/vmlinuz |
@@ -5968,14 +5793,12 @@ system image files much faster. | |||
5968 | - If you are using Ubuntu or Debian distributions, you can install | 5793 | - If you are using Ubuntu or Debian distributions, you can install |
5969 | the ``bmap-tools`` package using the following command and then | 5794 | the ``bmap-tools`` package using the following command and then |
5970 | use the tool without specifying ``PATH`` even from the root | 5795 | use the tool without specifying ``PATH`` even from the root |
5971 | account: | 5796 | account:: |
5972 | :: | ||
5973 | 5797 | ||
5974 | $ sudo apt-get install bmap-tools | 5798 | $ sudo apt-get install bmap-tools |
5975 | 5799 | ||
5976 | - If you are unable to install the ``bmap-tools`` package, you will | 5800 | - If you are unable to install the ``bmap-tools`` package, you will |
5977 | need to build Bmaptool before using it. Use the following command: | 5801 | need to build Bmaptool before using it. Use the following command:: |
5978 | :: | ||
5979 | 5802 | ||
5980 | $ bitbake bmap-tools-native | 5803 | $ bitbake bmap-tools-native |
5981 | 5804 | ||
@@ -5984,15 +5807,13 @@ that while this example uses a Wic image, you can use Bmaptool to flash | |||
5984 | any type of image. Use these steps to flash an image using Bmaptool: | 5807 | any type of image. Use these steps to flash an image using Bmaptool: |
5985 | 5808 | ||
5986 | 1. *Update your local.conf File:* You need to have the following set | 5809 | 1. *Update your local.conf File:* You need to have the following set |
5987 | in your ``local.conf`` file before building your image: | 5810 | in your ``local.conf`` file before building your image:: |
5988 | :: | ||
5989 | 5811 | ||
5990 | IMAGE_FSTYPES += "wic wic.bmap" | 5812 | IMAGE_FSTYPES += "wic wic.bmap" |
5991 | 5813 | ||
5992 | 2. *Get Your Image:* Either have your image ready (pre-built with the | 5814 | 2. *Get Your Image:* Either have your image ready (pre-built with the |
5993 | :term:`IMAGE_FSTYPES` | 5815 | :term:`IMAGE_FSTYPES` |
5994 | setting previously mentioned) or take the step to build the image: | 5816 | setting previously mentioned) or take the step to build the image:: |
5995 | :: | ||
5996 | 5817 | ||
5997 | $ bitbake image | 5818 | $ bitbake image |
5998 | 5819 | ||
@@ -6000,20 +5821,17 @@ any type of image. Use these steps to flash an image using Bmaptool: | |||
6000 | depending on your particular setup. The following commands assume the | 5821 | depending on your particular setup. The following commands assume the |
6001 | image resides in the Build Directory's ``deploy/images/`` area: | 5822 | image resides in the Build Directory's ``deploy/images/`` area: |
6002 | 5823 | ||
6003 | - If you have write access to the media, use this command form: | 5824 | - If you have write access to the media, use this command form:: |
6004 | :: | ||
6005 | 5825 | ||
6006 | $ oe-run-native bmap-tools-native bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX | 5826 | $ oe-run-native bmap-tools-native bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX |
6007 | 5827 | ||
6008 | - If you do not have write access to the media, set your permissions | 5828 | - If you do not have write access to the media, set your permissions |
6009 | first and then use the same command form: | 5829 | first and then use the same command form:: |
6010 | :: | ||
6011 | 5830 | ||
6012 | $ sudo chmod 666 /dev/sdX | 5831 | $ sudo chmod 666 /dev/sdX |
6013 | $ oe-run-native bmap-tools-native bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX | 5832 | $ oe-run-native bmap-tools-native bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX |
6014 | 5833 | ||
6015 | For help on the ``bmaptool`` command, use the following command: | 5834 | For help on the ``bmaptool`` command, use the following command:: |
6016 | :: | ||
6017 | 5835 | ||
6018 | $ bmaptool --help | 5836 | $ bmaptool --help |
6019 | 5837 | ||
@@ -6107,8 +5925,7 @@ your build output more secure. The security flags are in the | |||
6107 | 5925 | ||
6108 | Use the following line in your ``local.conf`` file or in your custom | 5926 | Use the following line in your ``local.conf`` file or in your custom |
6109 | distribution configuration file to enable the security compiler and | 5927 | distribution configuration file to enable the security compiler and |
6110 | linker flags for your build: | 5928 | linker flags for your build:: |
6111 | :: | ||
6112 | 5929 | ||
6113 | require conf/distro/include/security_flags.inc | 5930 | require conf/distro/include/security_flags.inc |
6114 | 5931 | ||
@@ -6123,8 +5940,7 @@ system to make your images more secure: | |||
6123 | When creating a new project, the default is to provide you with an | 5940 | When creating a new project, the default is to provide you with an |
6124 | initial ``local.conf`` file that enables this feature using the | 5941 | initial ``local.conf`` file that enables this feature using the |
6125 | :term:`EXTRA_IMAGE_FEATURES` | 5942 | :term:`EXTRA_IMAGE_FEATURES` |
6126 | variable with the line: | 5943 | variable with the line:: |
6127 | :: | ||
6128 | 5944 | ||
6129 | EXTRA_IMAGE_FEATURES = "debug-tweaks" | 5945 | EXTRA_IMAGE_FEATURES = "debug-tweaks" |
6130 | 5946 | ||
@@ -6250,8 +6066,7 @@ layer. The following steps provide some more detail: | |||
6250 | :term:`DISTRO` variable to point to | 6066 | :term:`DISTRO` variable to point to |
6251 | your distribution's configuration file. For example, if your | 6067 | your distribution's configuration file. For example, if your |
6252 | distribution's configuration file is named ``mydistro.conf``, then | 6068 | distribution's configuration file is named ``mydistro.conf``, then |
6253 | you point to it as follows: | 6069 | you point to it as follows:: |
6254 | :: | ||
6255 | 6070 | ||
6256 | DISTRO = "mydistro" | 6071 | DISTRO = "mydistro" |
6257 | 6072 | ||
@@ -6292,8 +6107,7 @@ The OpenEmbedded build system uses the environment variable | |||
6292 | configuration information that ultimately ends up in the | 6107 | configuration information that ultimately ends up in the |
6293 | :term:`Build Directory` ``conf`` directory. | 6108 | :term:`Build Directory` ``conf`` directory. |
6294 | By default, ``TEMPLATECONF`` is set as follows in the ``poky`` | 6109 | By default, ``TEMPLATECONF`` is set as follows in the ``poky`` |
6295 | repository: | 6110 | repository:: |
6296 | :: | ||
6297 | 6111 | ||
6298 | TEMPLATECONF=${TEMPLATECONF:-meta-poky/conf} | 6112 | TEMPLATECONF=${TEMPLATECONF:-meta-poky/conf} |
6299 | 6113 | ||
@@ -6335,8 +6149,7 @@ display BitBake targets as part of the script output. Customizing this | |||
6335 | targets appears as part of the script's output. | 6149 | targets appears as part of the script's output. |
6336 | 6150 | ||
6337 | Here is the default list of targets displayed as a result of running | 6151 | Here is the default list of targets displayed as a result of running |
6338 | either of the setup scripts: | 6152 | either of the setup scripts:: |
6339 | :: | ||
6340 | 6153 | ||
6341 | You can now run 'bitbake <target>' | 6154 | You can now run 'bitbake <target>' |
6342 | 6155 | ||
@@ -6355,8 +6168,7 @@ Conserving Disk Space During Builds | |||
6355 | 6168 | ||
6356 | To help conserve disk space during builds, you can add the following | 6169 | To help conserve disk space during builds, you can add the following |
6357 | statement to your project's ``local.conf`` configuration file found in | 6170 | statement to your project's ``local.conf`` configuration file found in |
6358 | the :term:`Build Directory`: | 6171 | the :term:`Build Directory`:: |
6359 | :: | ||
6360 | 6172 | ||
6361 | INHERIT += "rm_work" | 6173 | INHERIT += "rm_work" |
6362 | 6174 | ||
@@ -6534,8 +6346,7 @@ The simplest form for a PR Service is for it to exist for a single host | |||
6534 | development system that builds the package feed (building system). For | 6346 | development system that builds the package feed (building system). For |
6535 | this scenario, you can enable a local PR Service by setting | 6347 | this scenario, you can enable a local PR Service by setting |
6536 | :term:`PRSERV_HOST` in your | 6348 | :term:`PRSERV_HOST` in your |
6537 | ``local.conf`` file in the :term:`Build Directory`: | 6349 | ``local.conf`` file in the :term:`Build Directory`:: |
6538 | :: | ||
6539 | 6350 | ||
6540 | PRSERV_HOST = "localhost:0" | 6351 | PRSERV_HOST = "localhost:0" |
6541 | 6352 | ||
@@ -6546,8 +6357,7 @@ stopping the server. | |||
6546 | If you have a more complex setup where multiple host development systems | 6357 | If you have a more complex setup where multiple host development systems |
6547 | work against a common, shared package feed, you have a single PR Service | 6358 | work against a common, shared package feed, you have a single PR Service |
6548 | running and it is connected to each building system. For this scenario, | 6359 | running and it is connected to each building system. For this scenario, |
6549 | you need to start the PR Service using the ``bitbake-prserv`` command: | 6360 | you need to start the PR Service using the ``bitbake-prserv`` command:: |
6550 | :: | ||
6551 | 6361 | ||
6552 | bitbake-prserv --host ip --port port --start | 6362 | bitbake-prserv --host ip --port port --start |
6553 | 6363 | ||
@@ -6559,8 +6369,7 @@ server and port. | |||
6559 | It is also recommended you use build history, which adds some sanity | 6369 | It is also recommended you use build history, which adds some sanity |
6560 | checks to binary package versions, in conjunction with the server that | 6370 | checks to binary package versions, in conjunction with the server that |
6561 | is running the PR Service. To enable build history, add the following to | 6371 | is running the PR Service. To enable build history, add the following to |
6562 | each building system's ``local.conf`` file: | 6372 | each building system's ``local.conf`` file:: |
6563 | :: | ||
6564 | 6373 | ||
6565 | # It is recommended to activate "buildhistory" for testing the PR service | 6374 | # It is recommended to activate "buildhistory" for testing the PR service |
6566 | INHERIT += "buildhistory" | 6375 | INHERIT += "buildhistory" |
@@ -6629,15 +6438,13 @@ the specific source code revision from which to build. You set the | |||
6629 | ``SRCREV`` variable to | 6438 | ``SRCREV`` variable to |
6630 | :term:`AUTOREV` to cause the | 6439 | :term:`AUTOREV` to cause the |
6631 | OpenEmbedded build system to automatically use the latest revision of | 6440 | OpenEmbedded build system to automatically use the latest revision of |
6632 | the software: | 6441 | the software:: |
6633 | :: | ||
6634 | 6442 | ||
6635 | SRCREV = "${AUTOREV}" | 6443 | SRCREV = "${AUTOREV}" |
6636 | 6444 | ||
6637 | Furthermore, you need to reference ``SRCPV`` in ``PV`` in order to | 6445 | Furthermore, you need to reference ``SRCPV`` in ``PV`` in order to |
6638 | automatically update the version whenever the revision of the source | 6446 | automatically update the version whenever the revision of the source |
6639 | code changes. Here is an example: | 6447 | code changes. Here is an example:: |
6640 | :: | ||
6641 | 6448 | ||
6642 | PV = "1.0+git${SRCPV}" | 6449 | PV = "1.0+git${SRCPV}" |
6643 | 6450 | ||
@@ -6707,8 +6514,7 @@ package for each one it finds by appending to the | |||
6707 | :term:`PACKAGES` variable and | 6514 | :term:`PACKAGES` variable and |
6708 | setting the appropriate values for ``FILES_packagename``, | 6515 | setting the appropriate values for ``FILES_packagename``, |
6709 | ``RDEPENDS_packagename``, ``DESCRIPTION_packagename``, and so forth. | 6516 | ``RDEPENDS_packagename``, ``DESCRIPTION_packagename``, and so forth. |
6710 | Here is an example from the ``lighttpd`` recipe: | 6517 | Here is an example from the ``lighttpd`` recipe:: |
6711 | :: | ||
6712 | 6518 | ||
6713 | python populate_packages_prepend () { | 6519 | python populate_packages_prepend () { |
6714 | lighttpd_libdir = d.expand('${libdir}') | 6520 | lighttpd_libdir = d.expand('${libdir}') |
@@ -6751,8 +6557,7 @@ directory of the ``poky`` :ref:`source repository <overview-manual/development-e | |||
6751 | also find examples in ``meta/classes/kernel.bbclass``. | 6557 | also find examples in ``meta/classes/kernel.bbclass``. |
6752 | 6558 | ||
6753 | Following is a reference that shows ``do_split_packages`` mandatory and | 6559 | Following is a reference that shows ``do_split_packages`` mandatory and |
6754 | optional arguments: | 6560 | optional arguments:: |
6755 | :: | ||
6756 | 6561 | ||
6757 | Mandatory arguments | 6562 | Mandatory arguments |
6758 | 6563 | ||
@@ -6840,8 +6645,7 @@ any dependencies on optional modules from other recipes are satisfied by | |||
6840 | your recipe. You can be sure these dependencies are satisfied by using | 6645 | your recipe. You can be sure these dependencies are satisfied by using |
6841 | the :term:`PACKAGES_DYNAMIC` | 6646 | the :term:`PACKAGES_DYNAMIC` |
6842 | variable. Here is an example that continues with the ``lighttpd`` recipe | 6647 | variable. Here is an example that continues with the ``lighttpd`` recipe |
6843 | shown earlier: | 6648 | shown earlier:: |
6844 | :: | ||
6845 | 6649 | ||
6846 | PACKAGES_DYNAMIC = "lighttpd-module-.*" | 6650 | PACKAGES_DYNAMIC = "lighttpd-module-.*" |
6847 | 6651 | ||
@@ -6933,8 +6737,7 @@ variable to specify the format: | |||
6933 | :term:`Build Directory` (e.g. | 6737 | :term:`Build Directory` (e.g. |
6934 | ``poky/build/conf/local.conf``). | 6738 | ``poky/build/conf/local.conf``). |
6935 | 6739 | ||
6936 | 2. Select the desired package format as follows: | 6740 | 2. Select the desired package format as follows:: |
6937 | :: | ||
6938 | 6741 | ||
6939 | PACKAGE_CLASSES ?= "package_packageformat" | 6742 | PACKAGE_CLASSES ?= "package_packageformat" |
6940 | 6743 | ||
@@ -6968,15 +6771,13 @@ target's package database(s) later once your image is up and running. | |||
6968 | Whenever you perform any sort of build step that can potentially | 6771 | Whenever you perform any sort of build step that can potentially |
6969 | generate a package or modify existing package, it is always a good idea | 6772 | generate a package or modify existing package, it is always a good idea |
6970 | to re-generate the package index after the build by using the following | 6773 | to re-generate the package index after the build by using the following |
6971 | command: | 6774 | command:: |
6972 | :: | ||
6973 | 6775 | ||
6974 | $ bitbake package-index | 6776 | $ bitbake package-index |
6975 | 6777 | ||
6976 | It might be tempting to build the | 6778 | It might be tempting to build the |
6977 | package and the package index at the same time with a command such as | 6779 | package and the package index at the same time with a command such as |
6978 | the following: | 6780 | the following:: |
6979 | :: | ||
6980 | 6781 | ||
6981 | $ bitbake some-package package-index | 6782 | $ bitbake some-package package-index |
6982 | 6783 | ||
@@ -7024,8 +6825,7 @@ your packaging choice (i.e. the | |||
7024 | :term:`PACKAGE_CLASSES` | 6825 | :term:`PACKAGE_CLASSES` |
7025 | setting), simply start the server. The following example assumes a build | 6826 | setting), simply start the server. The following example assumes a build |
7026 | directory of ``poky/build/tmp/deploy/rpm`` and a ``PACKAGE_CLASSES`` | 6827 | directory of ``poky/build/tmp/deploy/rpm`` and a ``PACKAGE_CLASSES`` |
7027 | setting of "package_rpm": | 6828 | setting of "package_rpm":: |
7028 | :: | ||
7029 | 6829 | ||
7030 | $ cd poky/build/tmp/deploy/rpm | 6830 | $ cd poky/build/tmp/deploy/rpm |
7031 | $ python3 -m http.server | 6831 | $ python3 -m http.server |
@@ -7091,8 +6891,7 @@ for all architectures. You cannot do both: | |||
7091 | architectures. | 6891 | architectures. |
7092 | 6892 | ||
7093 | - *Create a Single (Full) Package Index:* Define a single base URL that | 6893 | - *Create a Single (Full) Package Index:* Define a single base URL that |
7094 | identifies where a full package database is located: | 6894 | identifies where a full package database is located:: |
7095 | :: | ||
7096 | 6895 | ||
7097 | [oe-packages] | 6896 | [oe-packages] |
7098 | baseurl=http://my.server/rpm | 6897 | baseurl=http://my.server/rpm |
@@ -7210,8 +7009,7 @@ Signing RPM Packages | |||
7210 | 7009 | ||
7211 | To enable signing RPM packages, you must set up the following | 7010 | To enable signing RPM packages, you must set up the following |
7212 | configurations in either your ``local.config`` or ``distro.config`` | 7011 | configurations in either your ``local.config`` or ``distro.config`` |
7213 | file: | 7012 | file:: |
7214 | :: | ||
7215 | 7013 | ||
7216 | # Inherit sign_rpm.bbclass to enable signing functionality | 7014 | # Inherit sign_rpm.bbclass to enable signing functionality |
7217 | INHERIT += " sign_rpm" | 7015 | INHERIT += " sign_rpm" |
@@ -7242,8 +7040,7 @@ signed package feeds for IPK and RPM packages. | |||
7242 | 7040 | ||
7243 | The steps you need to take to enable signed package feed use are similar | 7041 | The steps you need to take to enable signed package feed use are similar |
7244 | to the steps used to sign RPM packages. You must define the following in | 7042 | to the steps used to sign RPM packages. You must define the following in |
7245 | your ``local.config`` or ``distro.config`` file: | 7043 | your ``local.config`` or ``distro.config`` file:: |
7246 | :: | ||
7247 | 7044 | ||
7248 | INHERIT += "sign_package_feed" | 7045 | INHERIT += "sign_package_feed" |
7249 | PACKAGE_FEED_GPG_NAME = "key_name" | 7046 | PACKAGE_FEED_GPG_NAME = "key_name" |
@@ -7282,8 +7079,7 @@ hand, the test can be anything from a simple shell script that runs a | |||
7282 | binary and checks the output to an elaborate system of test binaries and | 7079 | binary and checks the output to an elaborate system of test binaries and |
7283 | data files. | 7080 | data files. |
7284 | 7081 | ||
7285 | The test generates output in the format used by Automake: | 7082 | The test generates output in the format used by Automake:: |
7286 | :: | ||
7287 | 7083 | ||
7288 | result: testname | 7084 | result: testname |
7289 | 7085 | ||
@@ -7305,8 +7101,7 @@ To add package testing to your build, add the | |||
7305 | :term:`DISTRO_FEATURES` and | 7101 | :term:`DISTRO_FEATURES` and |
7306 | :term:`EXTRA_IMAGE_FEATURES` | 7102 | :term:`EXTRA_IMAGE_FEATURES` |
7307 | variables to your ``local.conf`` file, which is found in the | 7103 | variables to your ``local.conf`` file, which is found in the |
7308 | :term:`Build Directory`: | 7104 | :term:`Build Directory`:: |
7309 | :: | ||
7310 | 7105 | ||
7311 | DISTRO_FEATURES_append = " ptest" | 7106 | DISTRO_FEATURES_append = " ptest" |
7312 | EXTRA_IMAGE_FEATURES += "ptest-pkgs" | 7107 | EXTRA_IMAGE_FEATURES += "ptest-pkgs" |
@@ -7331,16 +7126,14 @@ test. Here is what you have to do for each recipe: | |||
7331 | 7126 | ||
7332 | - *Be sure the recipe inherits | 7127 | - *Be sure the recipe inherits |
7333 | the* :ref:`ptest <ref-classes-ptest>` *class:* | 7128 | the* :ref:`ptest <ref-classes-ptest>` *class:* |
7334 | Include the following line in each recipe: | 7129 | Include the following line in each recipe:: |
7335 | :: | ||
7336 | 7130 | ||
7337 | inherit ptest | 7131 | inherit ptest |
7338 | 7132 | ||
7339 | - *Create run-ptest:* This script starts your test. Locate the | 7133 | - *Create run-ptest:* This script starts your test. Locate the |
7340 | script where you will refer to it using | 7134 | script where you will refer to it using |
7341 | :term:`SRC_URI`. Here is an | 7135 | :term:`SRC_URI`. Here is an |
7342 | example that starts a test for ``dbus``: | 7136 | example that starts a test for ``dbus``:: |
7343 | :: | ||
7344 | 7137 | ||
7345 | #!/bin/sh | 7138 | #!/bin/sh |
7346 | cd test | 7139 | cd test |
@@ -7352,8 +7145,7 @@ test. Here is what you have to do for each recipe: | |||
7352 | :term:`DEPENDS` and | 7145 | :term:`DEPENDS` and |
7353 | :term:`RDEPENDS` variables in | 7146 | :term:`RDEPENDS` variables in |
7354 | your recipe in order for the package to meet the dependencies. Here | 7147 | your recipe in order for the package to meet the dependencies. Here |
7355 | is an example where the package has a runtime dependency on "make": | 7148 | is an example where the package has a runtime dependency on "make":: |
7356 | :: | ||
7357 | 7149 | ||
7358 | RDEPENDS_${PN}-ptest += "make" | 7150 | RDEPENDS_${PN}-ptest += "make" |
7359 | 7151 | ||
@@ -7374,8 +7166,7 @@ test. Here is what you have to do for each recipe: | |||
7374 | 7166 | ||
7375 | Regardless, you still must add a ``do_compile_ptest`` function to | 7167 | Regardless, you still must add a ``do_compile_ptest`` function to |
7376 | build the test suite. Add a function similar to the following to your | 7168 | build the test suite. Add a function similar to the following to your |
7377 | recipe: | 7169 | recipe:: |
7378 | :: | ||
7379 | 7170 | ||
7380 | do_compile_ptest() { | 7171 | do_compile_ptest() { |
7381 | oe_runmake buildtest-TESTS | 7172 | oe_runmake buildtest-TESTS |
@@ -7457,8 +7248,7 @@ which is a file browser web application. | |||
7457 | You must know the ``cute-files`` module version. | 7248 | You must know the ``cute-files`` module version. |
7458 | 7249 | ||
7459 | The first thing you need to do is use ``devtool`` and the NPM fetcher to | 7250 | The first thing you need to do is use ``devtool`` and the NPM fetcher to |
7460 | create the recipe: | 7251 | create the recipe:: |
7461 | :: | ||
7462 | 7252 | ||
7463 | $ devtool add "npm://registry.npmjs.org;package=cute-files;version=1.0.2" | 7253 | $ devtool add "npm://registry.npmjs.org;package=cute-files;version=1.0.2" |
7464 | 7254 | ||
@@ -7486,8 +7276,7 @@ runs. | |||
7486 | practical way to have the licenses for all of the dependencies | 7276 | practical way to have the licenses for all of the dependencies |
7487 | represented in the license manifest of the image. | 7277 | represented in the license manifest of the image. |
7488 | 7278 | ||
7489 | The ``devtool edit-recipe`` command lets you take a look at the recipe: | 7279 | The ``devtool edit-recipe`` command lets you take a look at the recipe:: |
7490 | :: | ||
7491 | 7280 | ||
7492 | $ devtool edit-recipe cute-files | 7281 | $ devtool edit-recipe cute-files |
7493 | SUMMARY = "Turn any folder on your computer into a cute file browser, available on the local network." | 7282 | SUMMARY = "Turn any folder on your computer into a cute file browser, available on the local network." |
@@ -7520,8 +7309,7 @@ Three key points exist in the previous example: | |||
7520 | :ref:`npm <ref-classes-npm>` class to package | 7309 | :ref:`npm <ref-classes-npm>` class to package |
7521 | up all the modules. | 7310 | up all the modules. |
7522 | 7311 | ||
7523 | You can run the following command to build the ``cute-files`` package: | 7312 | You can run the following command to build the ``cute-files`` package:: |
7524 | :: | ||
7525 | 7313 | ||
7526 | $ devtool build cute-files | 7314 | $ devtool build cute-files |
7527 | 7315 | ||
@@ -7529,8 +7317,7 @@ Remember that ``nodejs`` must be installed on | |||
7529 | the target before your package. | 7317 | the target before your package. |
7530 | 7318 | ||
7531 | Assuming 192.168.7.2 for the target's IP address, use the following | 7319 | Assuming 192.168.7.2 for the target's IP address, use the following |
7532 | command to deploy your package: | 7320 | command to deploy your package:: |
7533 | :: | ||
7534 | 7321 | ||
7535 | $ devtool deploy-target -s cute-files root@192.168.7.2 | 7322 | $ devtool deploy-target -s cute-files root@192.168.7.2 |
7536 | 7323 | ||
@@ -7569,15 +7356,13 @@ projects method, you provide ``devtool`` with an URL that points to the | |||
7569 | source files. | 7356 | source files. |
7570 | 7357 | ||
7571 | Replicating the same example, (i.e. ``cute-files``) use the following | 7358 | Replicating the same example, (i.e. ``cute-files``) use the following |
7572 | command: | 7359 | command:: |
7573 | :: | ||
7574 | 7360 | ||
7575 | $ devtool add https://github.com/martinaglv/cute-files.git | 7361 | $ devtool add https://github.com/martinaglv/cute-files.git |
7576 | 7362 | ||
7577 | The | 7363 | The |
7578 | recipe this command generates is very similar to the recipe created in | 7364 | recipe this command generates is very similar to the recipe created in |
7579 | the previous section. However, the ``SRC_URI`` looks like the following: | 7365 | the previous section. However, the ``SRC_URI`` looks like the following:: |
7580 | :: | ||
7581 | 7366 | ||
7582 | SRC_URI = " \ | 7367 | SRC_URI = " \ |
7583 | git://github.com/martinaglv/cute-files.git;protocol=https \ | 7368 | git://github.com/martinaglv/cute-files.git;protocol=https \ |
@@ -7629,8 +7414,7 @@ by the literal sequence '\\n'. The separator can be redefined using the | |||
7629 | variable flag ``separator``. | 7414 | variable flag ``separator``. |
7630 | 7415 | ||
7631 | The following is an example that adds two custom fields for ipk | 7416 | The following is an example that adds two custom fields for ipk |
7632 | packages: | 7417 | packages:: |
7633 | :: | ||
7634 | 7418 | ||
7635 | PACKAGE_ADD_METADATA_IPK = "Vendor: CustomIpk\nGroup:Applications/Spreadsheets" | 7419 | PACKAGE_ADD_METADATA_IPK = "Vendor: CustomIpk\nGroup:Applications/Spreadsheets" |
7636 | 7420 | ||
@@ -7660,8 +7444,7 @@ adding statements to your configuration file so that the build process | |||
7660 | checks local directories first for existing tarballs before checking the | 7444 | checks local directories first for existing tarballs before checking the |
7661 | Internet. | 7445 | Internet. |
7662 | 7446 | ||
7663 | Here is an efficient way to set it up in your ``local.conf`` file: | 7447 | Here is an efficient way to set it up in your ``local.conf`` file:: |
7664 | :: | ||
7665 | 7448 | ||
7666 | SOURCE_MIRROR_URL ?= "file:///home/you/your-download-dir/" | 7449 | SOURCE_MIRROR_URL ?= "file:///home/you/your-download-dir/" |
7667 | INHERIT += "own-mirrors" | 7450 | INHERIT += "own-mirrors" |
@@ -7692,8 +7475,7 @@ download directory :ref:`structure-build-downloads`, | |||
7692 | which is located with :term:`DL_DIR`. | 7475 | which is located with :term:`DL_DIR`. |
7693 | 7476 | ||
7694 | Use the following BitBake command form to fetch all the necessary | 7477 | Use the following BitBake command form to fetch all the necessary |
7695 | sources without starting the build: | 7478 | sources without starting the build:: |
7696 | :: | ||
7697 | 7479 | ||
7698 | $ bitbake target --runall=fetch | 7480 | $ bitbake target --runall=fetch |
7699 | 7481 | ||
@@ -7740,15 +7522,13 @@ following sections. | |||
7740 | Using systemd Exclusively | 7522 | Using systemd Exclusively |
7741 | ------------------------- | 7523 | ------------------------- |
7742 | 7524 | ||
7743 | Set these variables in your distribution configuration file as follows: | 7525 | Set these variables in your distribution configuration file as follows:: |
7744 | :: | ||
7745 | 7526 | ||
7746 | DISTRO_FEATURES_append = " systemd" | 7527 | DISTRO_FEATURES_append = " systemd" |
7747 | VIRTUAL-RUNTIME_init_manager = "systemd" | 7528 | VIRTUAL-RUNTIME_init_manager = "systemd" |
7748 | 7529 | ||
7749 | You can also prevent the SysVinit distribution feature from | 7530 | You can also prevent the SysVinit distribution feature from |
7750 | being automatically enabled as follows: | 7531 | being automatically enabled as follows:: |
7751 | :: | ||
7752 | 7532 | ||
7753 | DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" | 7533 | DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" |
7754 | 7534 | ||
@@ -7756,8 +7536,7 @@ Doing so removes any | |||
7756 | redundant SysVinit scripts. | 7536 | redundant SysVinit scripts. |
7757 | 7537 | ||
7758 | To remove initscripts from your image altogether, set this variable | 7538 | To remove initscripts from your image altogether, set this variable |
7759 | also: | 7539 | also:: |
7760 | :: | ||
7761 | 7540 | ||
7762 | VIRTUAL-RUNTIME_initscripts = "" | 7541 | VIRTUAL-RUNTIME_initscripts = "" |
7763 | 7542 | ||
@@ -7767,8 +7546,7 @@ For information on the backfill variable, see | |||
7767 | Using systemd for the Main Image and Using SysVinit for the Rescue Image | 7546 | Using systemd for the Main Image and Using SysVinit for the Rescue Image |
7768 | ------------------------------------------------------------------------ | 7547 | ------------------------------------------------------------------------ |
7769 | 7548 | ||
7770 | Set these variables in your distribution configuration file as follows: | 7549 | Set these variables in your distribution configuration file as follows:: |
7771 | :: | ||
7772 | 7550 | ||
7773 | DISTRO_FEATURES_append = " systemd" | 7551 | DISTRO_FEATURES_append = " systemd" |
7774 | VIRTUAL-RUNTIME_init_manager = "systemd" | 7552 | VIRTUAL-RUNTIME_init_manager = "systemd" |
@@ -7800,8 +7578,7 @@ Using Persistent and Pre-Populated\ ``/dev`` | |||
7800 | 7578 | ||
7801 | To use the static method for device population, you need to set the | 7579 | To use the static method for device population, you need to set the |
7802 | :term:`USE_DEVFS` variable to "0" | 7580 | :term:`USE_DEVFS` variable to "0" |
7803 | as follows: | 7581 | as follows:: |
7804 | :: | ||
7805 | 7582 | ||
7806 | USE_DEVFS = "0" | 7583 | USE_DEVFS = "0" |
7807 | 7584 | ||
@@ -7813,8 +7590,7 @@ machine or distro configuration file. Alternatively, you can set this | |||
7813 | variable in your ``local.conf`` configuration file. | 7590 | variable in your ``local.conf`` configuration file. |
7814 | 7591 | ||
7815 | If you do not define the ``IMAGE_DEVICE_TABLES`` variable, the default | 7592 | If you do not define the ``IMAGE_DEVICE_TABLES`` variable, the default |
7816 | ``device_table-minimal.txt`` is used: | 7593 | ``device_table-minimal.txt`` is used:: |
7817 | :: | ||
7818 | 7594 | ||
7819 | IMAGE_DEVICE_TABLES = "device_table-mymachine.txt" | 7595 | IMAGE_DEVICE_TABLES = "device_table-mymachine.txt" |
7820 | 7596 | ||
@@ -7826,8 +7602,7 @@ Using ``devtmpfs`` and a Device Manager | |||
7826 | 7602 | ||
7827 | To use the dynamic method for device population, you need to use (or be | 7603 | To use the dynamic method for device population, you need to use (or be |
7828 | sure to set) the :term:`USE_DEVFS` | 7604 | sure to set) the :term:`USE_DEVFS` |
7829 | variable to "1", which is the default: | 7605 | variable to "1", which is the default:: |
7830 | :: | ||
7831 | 7606 | ||
7832 | USE_DEVFS = "1" | 7607 | USE_DEVFS = "1" |
7833 | 7608 | ||
@@ -7844,8 +7619,7 @@ To have more control over the device nodes, you can use a device manager | |||
7844 | like ``udev`` or ``busybox-mdev``. You choose the device manager by | 7619 | like ``udev`` or ``busybox-mdev``. You choose the device manager by |
7845 | defining the ``VIRTUAL-RUNTIME_dev_manager`` variable in your machine or | 7620 | defining the ``VIRTUAL-RUNTIME_dev_manager`` variable in your machine or |
7846 | distro configuration file. Alternatively, you can set this variable in | 7621 | distro configuration file. Alternatively, you can set this variable in |
7847 | your ``local.conf`` configuration file: | 7622 | your ``local.conf`` configuration file:: |
7848 | :: | ||
7849 | 7623 | ||
7850 | VIRTUAL-RUNTIME_dev_manager = "udev" | 7624 | VIRTUAL-RUNTIME_dev_manager = "udev" |
7851 | 7625 | ||
@@ -7866,14 +7640,12 @@ Subversion (SVN), Git, and Bazaar (BZR) repositories. | |||
7866 | 7640 | ||
7867 | To enable this behavior, the :term:`PV` of | 7641 | To enable this behavior, the :term:`PV` of |
7868 | the recipe needs to reference | 7642 | the recipe needs to reference |
7869 | :term:`SRCPV`. Here is an example: | 7643 | :term:`SRCPV`. Here is an example:: |
7870 | :: | ||
7871 | 7644 | ||
7872 | PV = "1.2.3+git${SRCPV}" | 7645 | PV = "1.2.3+git${SRCPV}" |
7873 | 7646 | ||
7874 | Then, you can add the following to your | 7647 | Then, you can add the following to your |
7875 | ``local.conf``: | 7648 | ``local.conf``:: |
7876 | :: | ||
7877 | 7649 | ||
7878 | SRCREV_pn-PN = "${AUTOREV}" | 7650 | SRCREV_pn-PN = "${AUTOREV}" |
7879 | 7651 | ||
@@ -7881,20 +7653,17 @@ Then, you can add the following to your | |||
7881 | which you want to enable automatic source revision updating. | 7653 | which you want to enable automatic source revision updating. |
7882 | 7654 | ||
7883 | If you do not want to update your local configuration file, you can add | 7655 | If you do not want to update your local configuration file, you can add |
7884 | the following directly to the recipe to finish enabling the feature: | 7656 | the following directly to the recipe to finish enabling the feature:: |
7885 | :: | ||
7886 | 7657 | ||
7887 | SRCREV = "${AUTOREV}" | 7658 | SRCREV = "${AUTOREV}" |
7888 | 7659 | ||
7889 | The Yocto Project provides a distribution named ``poky-bleeding``, whose | 7660 | The Yocto Project provides a distribution named ``poky-bleeding``, whose |
7890 | configuration file contains the line: | 7661 | configuration file contains the line:: |
7891 | :: | ||
7892 | 7662 | ||
7893 | require conf/distro/include/poky-floating-revisions.inc | 7663 | require conf/distro/include/poky-floating-revisions.inc |
7894 | 7664 | ||
7895 | This line pulls in the | 7665 | This line pulls in the |
7896 | listed include file that contains numerous lines of exactly that form: | 7666 | listed include file that contains numerous lines of exactly that form:: |
7897 | :: | ||
7898 | 7667 | ||
7899 | #SRCREV_pn-opkg-native ?= "${AUTOREV}" | 7668 | #SRCREV_pn-opkg-native ?= "${AUTOREV}" |
7900 | #SRCREV_pn-opkg-sdk ?= "${AUTOREV}" | 7669 | #SRCREV_pn-opkg-sdk ?= "${AUTOREV}" |
@@ -7946,15 +7715,13 @@ Creating the Root Filesystem | |||
7946 | To create the read-only root filesystem, simply add the | 7715 | To create the read-only root filesystem, simply add the |
7947 | "read-only-rootfs" feature to your image, normally in one of two ways. | 7716 | "read-only-rootfs" feature to your image, normally in one of two ways. |
7948 | The first way is to add the "read-only-rootfs" image feature in the | 7717 | The first way is to add the "read-only-rootfs" image feature in the |
7949 | image's recipe file via the ``IMAGE_FEATURES`` variable: | 7718 | image's recipe file via the ``IMAGE_FEATURES`` variable:: |
7950 | :: | ||
7951 | 7719 | ||
7952 | IMAGE_FEATURES += "read-only-rootfs" | 7720 | IMAGE_FEATURES += "read-only-rootfs" |
7953 | 7721 | ||
7954 | As an alternative, you can add the same feature | 7722 | As an alternative, you can add the same feature |
7955 | from within your build directory's ``local.conf`` file with the | 7723 | from within your build directory's ``local.conf`` file with the |
7956 | associated ``EXTRA_IMAGE_FEATURES`` variable, as in: | 7724 | associated ``EXTRA_IMAGE_FEATURES`` variable, as in:: |
7957 | :: | ||
7958 | 7725 | ||
7959 | EXTRA_IMAGE_FEATURES = "read-only-rootfs" | 7726 | EXTRA_IMAGE_FEATURES = "read-only-rootfs" |
7960 | 7727 | ||
@@ -8051,8 +7818,7 @@ Build history is disabled by default. To enable it, add the following | |||
8051 | ``INHERIT`` statement and set the | 7818 | ``INHERIT`` statement and set the |
8052 | :term:`BUILDHISTORY_COMMIT` | 7819 | :term:`BUILDHISTORY_COMMIT` |
8053 | variable to "1" at the end of your ``conf/local.conf`` file found in the | 7820 | variable to "1" at the end of your ``conf/local.conf`` file found in the |
8054 | :term:`Build Directory`: | 7821 | :term:`Build Directory`:: |
8055 | :: | ||
8056 | 7822 | ||
8057 | INHERIT += "buildhistory" | 7823 | INHERIT += "buildhistory" |
8058 | BUILDHISTORY_COMMIT = "1" | 7824 | BUILDHISTORY_COMMIT = "1" |
@@ -8140,8 +7906,7 @@ and actual revisions might differ when | |||
8140 | :term:`SRCREV` is set to | 7906 | :term:`SRCREV` is set to |
8141 | ${:term:`AUTOREV`}. Here is an | 7907 | ${:term:`AUTOREV`}. Here is an |
8142 | example assuming | 7908 | example assuming |
8143 | ``buildhistory/packages/qemux86-poky-linux/linux-yocto/latest_srcrev``): | 7909 | ``buildhistory/packages/qemux86-poky-linux/linux-yocto/latest_srcrev``):: |
8144 | :: | ||
8145 | 7910 | ||
8146 | # SRCREV_machine = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1" | 7911 | # SRCREV_machine = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1" |
8147 | SRCREV_machine = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1" | 7912 | SRCREV_machine = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1" |
@@ -8154,8 +7919,7 @@ collect the stored ``SRCREV`` values from build history and report them | |||
8154 | in a format suitable for use in global configuration (e.g., | 7919 | in a format suitable for use in global configuration (e.g., |
8155 | ``local.conf`` or a distro include file) to override floating | 7920 | ``local.conf`` or a distro include file) to override floating |
8156 | ``AUTOREV`` values to a fixed set of revisions. Here is some example | 7921 | ``AUTOREV`` values to a fixed set of revisions. Here is some example |
8157 | output from this command: | 7922 | output from this command:: |
8158 | :: | ||
8159 | 7923 | ||
8160 | $ buildhistory-collect-srcrevs -a | 7924 | $ buildhistory-collect-srcrevs -a |
8161 | # i586-poky-linux | 7925 | # i586-poky-linux |
@@ -8270,8 +8034,7 @@ image. If you are just interested in this information and not interested | |||
8270 | in collecting specific package or SDK information, you can enable | 8034 | in collecting specific package or SDK information, you can enable |
8271 | writing only image information without any history by adding the | 8035 | writing only image information without any history by adding the |
8272 | following to your ``conf/local.conf`` file found in the | 8036 | following to your ``conf/local.conf`` file found in the |
8273 | :term:`Build Directory`: | 8037 | :term:`Build Directory`:: |
8274 | :: | ||
8275 | 8038 | ||
8276 | INHERIT += "buildhistory" | 8039 | INHERIT += "buildhistory" |
8277 | BUILDHISTORY_COMMIT = "0" | 8040 | BUILDHISTORY_COMMIT = "0" |
@@ -8370,8 +8133,7 @@ interface. | |||
8370 | To see any changes that have occurred (assuming you have | 8133 | To see any changes that have occurred (assuming you have |
8371 | :term:`BUILDHISTORY_COMMIT` = "1"), | 8134 | :term:`BUILDHISTORY_COMMIT` = "1"), |
8372 | you can simply use any Git command that allows you to view the history | 8135 | you can simply use any Git command that allows you to view the history |
8373 | of a repository. Here is one method: | 8136 | of a repository. Here is one method:: |
8374 | :: | ||
8375 | 8137 | ||
8376 | $ git log -p | 8138 | $ git log -p |
8377 | 8139 | ||
@@ -8381,8 +8143,7 @@ however, that this method does show changes that are not significant | |||
8381 | 8143 | ||
8382 | A command-line tool called ``buildhistory-diff`` does exist, though, | 8144 | A command-line tool called ``buildhistory-diff`` does exist, though, |
8383 | that queries the Git repository and prints just the differences that | 8145 | that queries the Git repository and prints just the differences that |
8384 | might be significant in human-readable form. Here is an example: | 8146 | might be significant in human-readable form. Here is an example:: |
8385 | :: | ||
8386 | 8147 | ||
8387 | $ poky/poky/scripts/buildhistory-diff . HEAD^ | 8148 | $ poky/poky/scripts/buildhistory-diff . HEAD^ |
8388 | Changes to images/qemux86_64/glibc/core-image-minimal (files-in-image.txt): | 8149 | Changes to images/qemux86_64/glibc/core-image-minimal (files-in-image.txt): |
@@ -8402,8 +8163,7 @@ might be significant in human-readable form. Here is an example: | |||
8402 | .. note:: | 8163 | .. note:: |
8403 | 8164 | ||
8404 | The ``buildhistory-diff`` tool requires the ``GitPython`` | 8165 | The ``buildhistory-diff`` tool requires the ``GitPython`` |
8405 | package. Be sure to install it using Pip3 as follows: | 8166 | package. Be sure to install it using Pip3 as follows:: |
8406 | :: | ||
8407 | 8167 | ||
8408 | $ pip3 install GitPython --user | 8168 | $ pip3 install GitPython --user |
8409 | 8169 | ||
@@ -8473,8 +8233,7 @@ In order to run tests, you need to do the following: | |||
8473 | with sudo. | 8233 | with sudo. |
8474 | 8234 | ||
8475 | - The package recipe ``qemu-helper-native`` is required to run | 8235 | - The package recipe ``qemu-helper-native`` is required to run |
8476 | this script. Build the package using the following command: | 8236 | this script. Build the package using the following command:: |
8477 | :: | ||
8478 | 8237 | ||
8479 | $ bitbake qemu-helper-native | 8238 | $ bitbake qemu-helper-native |
8480 | 8239 | ||
@@ -8609,8 +8368,7 @@ not need any information in this section. You can skip down to the | |||
8609 | If you did set ``TEST_TARGET`` to "SystemdbootTarget", you also need to | 8368 | If you did set ``TEST_TARGET`` to "SystemdbootTarget", you also need to |
8610 | perform a one-time setup of your master image by doing the following: | 8369 | perform a one-time setup of your master image by doing the following: |
8611 | 8370 | ||
8612 | 1. *Set EFI_PROVIDER:* Be sure that ``EFI_PROVIDER`` is as follows: | 8371 | 1. *Set EFI_PROVIDER:* Be sure that ``EFI_PROVIDER`` is as follows:: |
8613 | :: | ||
8614 | 8372 | ||
8615 | EFI_PROVIDER = "systemd-boot" | 8373 | EFI_PROVIDER = "systemd-boot" |
8616 | 8374 | ||
@@ -8648,16 +8406,14 @@ The final thing you need to do when setting ``TEST_TARGET`` to | |||
8648 | "SystemdbootTarget" is to set up the test image: | 8406 | "SystemdbootTarget" is to set up the test image: |
8649 | 8407 | ||
8650 | 1. *Set up your local.conf file:* Make sure you have the following | 8408 | 1. *Set up your local.conf file:* Make sure you have the following |
8651 | statements in your ``local.conf`` file: | 8409 | statements in your ``local.conf`` file:: |
8652 | :: | ||
8653 | 8410 | ||
8654 | IMAGE_FSTYPES += "tar.gz" | 8411 | IMAGE_FSTYPES += "tar.gz" |
8655 | INHERIT += "testimage" | 8412 | INHERIT += "testimage" |
8656 | TEST_TARGET = "SystemdbootTarget" | 8413 | TEST_TARGET = "SystemdbootTarget" |
8657 | TEST_TARGET_IP = "192.168.2.3" | 8414 | TEST_TARGET_IP = "192.168.2.3" |
8658 | 8415 | ||
8659 | 2. *Build your test image:* Use BitBake to build the image: | 8416 | 2. *Build your test image:* Use BitBake to build the image:: |
8660 | :: | ||
8661 | 8417 | ||
8662 | $ bitbake core-image-sato | 8418 | $ bitbake core-image-sato |
8663 | 8419 | ||
@@ -8671,8 +8427,7 @@ power: | |||
8671 | ``TEST_POWERCONTROL_EXTRA_ARGS`` as a command that runs on the host | 8427 | ``TEST_POWERCONTROL_EXTRA_ARGS`` as a command that runs on the host |
8672 | and does power cycling. The test code passes one argument to that | 8428 | and does power cycling. The test code passes one argument to that |
8673 | command: off, on or cycle (off then on). Here is an example that | 8429 | command: off, on or cycle (off then on). Here is an example that |
8674 | could appear in your ``local.conf`` file: | 8430 | could appear in your ``local.conf`` file:: |
8675 | :: | ||
8676 | 8431 | ||
8677 | TEST_POWERCONTROL_CMD = "powercontrol.exp test 10.11.12.1 nuc1" | 8432 | TEST_POWERCONTROL_CMD = "powercontrol.exp test 10.11.12.1 nuc1" |
8678 | 8433 | ||
@@ -8705,8 +8460,7 @@ wish to experiment with automated hardware testing, you can use the | |||
8705 | the required power action. This script requires either KDialog or Zenity | 8460 | the required power action. This script requires either KDialog or Zenity |
8706 | to be installed. To use this script, set the | 8461 | to be installed. To use this script, set the |
8707 | :term:`TEST_POWERCONTROL_CMD` | 8462 | :term:`TEST_POWERCONTROL_CMD` |
8708 | variable as follows: | 8463 | variable as follows:: |
8709 | :: | ||
8710 | 8464 | ||
8711 | TEST_POWERCONTROL_CMD = "${COREBASE}/scripts/contrib/dialog-power-control" | 8465 | TEST_POWERCONTROL_CMD = "${COREBASE}/scripts/contrib/dialog-power-control" |
8712 | 8466 | ||
@@ -8728,8 +8482,7 @@ connecting to a remote console server. Regardless of the case, the | |||
8728 | command simply needs to connect to the serial console and forward that | 8482 | command simply needs to connect to the serial console and forward that |
8729 | connection to standard input and output as any normal terminal program | 8483 | connection to standard input and output as any normal terminal program |
8730 | does. For example, to use the picocom terminal program on serial device | 8484 | does. For example, to use the picocom terminal program on serial device |
8731 | ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows: | 8485 | ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows:: |
8732 | :: | ||
8733 | 8486 | ||
8734 | TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200" | 8487 | TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200" |
8735 | 8488 | ||
@@ -8737,8 +8490,7 @@ For local | |||
8737 | devices where the serial port device disappears when the device reboots, | 8490 | devices where the serial port device disappears when the device reboots, |
8738 | an additional "serdevtry" wrapper script is provided. To use this | 8491 | an additional "serdevtry" wrapper script is provided. To use this |
8739 | wrapper, simply prefix the terminal command with | 8492 | wrapper, simply prefix the terminal command with |
8740 | ``${COREBASE}/scripts/contrib/serdevtry``: | 8493 | ``${COREBASE}/scripts/contrib/serdevtry``:: |
8741 | :: | ||
8742 | 8494 | ||
8743 | TEST_SERIALCONTROL_CMD = "${COREBASE}/scripts/contrib/serdevtry picocom -b 115200 /dev/ttyUSB0" | 8495 | TEST_SERIALCONTROL_CMD = "${COREBASE}/scripts/contrib/serdevtry picocom -b 115200 /dev/ttyUSB0" |
8744 | 8496 | ||
@@ -8752,27 +8504,23 @@ You can start the tests automatically or manually: | |||
8752 | set the | 8504 | set the |
8753 | :term:`TESTIMAGE_AUTO` | 8505 | :term:`TESTIMAGE_AUTO` |
8754 | variable to "1" in your ``local.conf`` file in the | 8506 | variable to "1" in your ``local.conf`` file in the |
8755 | :term:`Build Directory`: | 8507 | :term:`Build Directory`:: |
8756 | :: | ||
8757 | 8508 | ||
8758 | TESTIMAGE_AUTO = "1" | 8509 | TESTIMAGE_AUTO = "1" |
8759 | 8510 | ||
8760 | Next, build your image. If the image successfully builds, the | 8511 | Next, build your image. If the image successfully builds, the |
8761 | tests run: | 8512 | tests run:: |
8762 | :: | ||
8763 | 8513 | ||
8764 | bitbake core-image-sato | 8514 | bitbake core-image-sato |
8765 | 8515 | ||
8766 | - *Manually running tests:* To manually run the tests, first globally | 8516 | - *Manually running tests:* To manually run the tests, first globally |
8767 | inherit the | 8517 | inherit the |
8768 | :ref:`testimage <ref-classes-testimage*>` class | 8518 | :ref:`testimage <ref-classes-testimage*>` class |
8769 | by editing your ``local.conf`` file: | 8519 | by editing your ``local.conf`` file:: |
8770 | :: | ||
8771 | 8520 | ||
8772 | INHERIT += "testimage" | 8521 | INHERIT += "testimage" |
8773 | 8522 | ||
8774 | Next, use BitBake to run the tests: | 8523 | Next, use BitBake to run the tests:: |
8775 | :: | ||
8776 | 8524 | ||
8777 | bitbake -c testimage image | 8525 | bitbake -c testimage image |
8778 | 8526 | ||
@@ -8815,18 +8563,15 @@ handling. | |||
8815 | 8563 | ||
8816 | Here are some things to keep in mind when running tests: | 8564 | Here are some things to keep in mind when running tests: |
8817 | 8565 | ||
8818 | - The default tests for the image are defined as: | 8566 | - The default tests for the image are defined as:: |
8819 | :: | ||
8820 | 8567 | ||
8821 | DEFAULT_TEST_SUITES_pn-image = "ping ssh df connman syslog xorg scp vnc date rpm dnf dmesg" | 8568 | DEFAULT_TEST_SUITES_pn-image = "ping ssh df connman syslog xorg scp vnc date rpm dnf dmesg" |
8822 | 8569 | ||
8823 | - Add your own test to the list of the by using the following: | 8570 | - Add your own test to the list of the by using the following:: |
8824 | :: | ||
8825 | 8571 | ||
8826 | TEST_SUITES_append = " mytest" | 8572 | TEST_SUITES_append = " mytest" |
8827 | 8573 | ||
8828 | - Run a specific list of tests as follows: | 8574 | - Run a specific list of tests as follows:: |
8829 | :: | ||
8830 | 8575 | ||
8831 | TEST_SUITES = "test1 test2 test3" | 8576 | TEST_SUITES = "test1 test2 test3" |
8832 | 8577 | ||
@@ -8842,16 +8587,14 @@ test execution off to a scheduler. You can only export tests that are | |||
8842 | defined in :term:`TEST_SUITES`. | 8587 | defined in :term:`TEST_SUITES`. |
8843 | 8588 | ||
8844 | If your image is already built, make sure the following are set in your | 8589 | If your image is already built, make sure the following are set in your |
8845 | ``local.conf`` file: | 8590 | ``local.conf`` file:: |
8846 | :: | ||
8847 | 8591 | ||
8848 | INHERIT += "testexport" | 8592 | INHERIT += "testexport" |
8849 | TEST_TARGET_IP = "IP-address-for-the-test-target" | 8593 | TEST_TARGET_IP = "IP-address-for-the-test-target" |
8850 | TEST_SERVER_IP = "IP-address-for-the-test-server" | 8594 | TEST_SERVER_IP = "IP-address-for-the-test-server" |
8851 | 8595 | ||
8852 | You can then export the tests with the | 8596 | You can then export the tests with the |
8853 | following BitBake command form: | 8597 | following BitBake command form:: |
8854 | :: | ||
8855 | 8598 | ||
8856 | $ bitbake image -c testexport | 8599 | $ bitbake image -c testexport |
8857 | 8600 | ||
@@ -8860,28 +8603,24 @@ Exporting the tests places them in the | |||
8860 | ``tmp/testexport/``\ image, which is controlled by the | 8603 | ``tmp/testexport/``\ image, which is controlled by the |
8861 | ``TEST_EXPORT_DIR`` variable. | 8604 | ``TEST_EXPORT_DIR`` variable. |
8862 | 8605 | ||
8863 | You can now run the tests outside of the build environment: | 8606 | You can now run the tests outside of the build environment:: |
8864 | :: | ||
8865 | 8607 | ||
8866 | $ cd tmp/testexport/image | 8608 | $ cd tmp/testexport/image |
8867 | $ ./runexported.py testdata.json | 8609 | $ ./runexported.py testdata.json |
8868 | 8610 | ||
8869 | Here is a complete example that shows IP addresses and uses the | 8611 | Here is a complete example that shows IP addresses and uses the |
8870 | ``core-image-sato`` image: | 8612 | ``core-image-sato`` image:: |
8871 | :: | ||
8872 | 8613 | ||
8873 | INHERIT += "testexport" | 8614 | INHERIT += "testexport" |
8874 | TEST_TARGET_IP = "192.168.7.2" | 8615 | TEST_TARGET_IP = "192.168.7.2" |
8875 | TEST_SERVER_IP = "192.168.7.1" | 8616 | TEST_SERVER_IP = "192.168.7.1" |
8876 | 8617 | ||
8877 | Use BitBake to export the tests: | 8618 | Use BitBake to export the tests:: |
8878 | :: | ||
8879 | 8619 | ||
8880 | $ bitbake core-image-sato -c testexport | 8620 | $ bitbake core-image-sato -c testexport |
8881 | 8621 | ||
8882 | Run the tests outside of | 8622 | Run the tests outside of |
8883 | the build environment using the following: | 8623 | the build environment using the following:: |
8884 | :: | ||
8885 | 8624 | ||
8886 | $ cd tmp/testexport/core-image-sato | 8625 | $ cd tmp/testexport/core-image-sato |
8887 | $ ./runexported.py testdata.json | 8626 | $ ./runexported.py testdata.json |
@@ -9157,14 +8896,12 @@ variables>` did not work out as expected. | |||
9157 | BitBake's ``-e`` option is used to display variable values after | 8896 | BitBake's ``-e`` option is used to display variable values after |
9158 | parsing. The following command displays the variable values after the | 8897 | parsing. The following command displays the variable values after the |
9159 | configuration files (i.e. ``local.conf``, ``bblayers.conf``, | 8898 | configuration files (i.e. ``local.conf``, ``bblayers.conf``, |
9160 | ``bitbake.conf`` and so forth) have been parsed: | 8899 | ``bitbake.conf`` and so forth) have been parsed:: |
9161 | :: | ||
9162 | 8900 | ||
9163 | $ bitbake -e | 8901 | $ bitbake -e |
9164 | 8902 | ||
9165 | The following command displays variable values after a specific recipe has | 8903 | The following command displays variable values after a specific recipe has |
9166 | been parsed. The variables include those from the configuration as well: | 8904 | been parsed. The variables include those from the configuration as well:: |
9167 | :: | ||
9168 | 8905 | ||
9169 | $ bitbake -e recipename | 8906 | $ bitbake -e recipename |
9170 | 8907 | ||
@@ -9187,8 +8924,7 @@ variable flags (varflags) set on the variable. The output can be very | |||
9187 | helpful during debugging. | 8924 | helpful during debugging. |
9188 | 8925 | ||
9189 | Variables that are exported to the environment are preceded by | 8926 | Variables that are exported to the environment are preceded by |
9190 | ``export`` in the output of ``bitbake -e``. See the following example: | 8927 | ``export`` in the output of ``bitbake -e``. See the following example:: |
9191 | :: | ||
9192 | 8928 | ||
9193 | export CC="i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/ulf/poky/build/tmp/sysroots/qemux86" | 8929 | export CC="i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/ulf/poky/build/tmp/sysroots/qemux86" |
9194 | 8930 | ||
@@ -9250,8 +8986,7 @@ Following are a few of the available ``oe-pkgdata-util`` subcommands. | |||
9250 | - ``oe-pkgdata-util find-path path ...``: Lists the names of | 8986 | - ``oe-pkgdata-util find-path path ...``: Lists the names of |
9251 | the packages that contain the given paths. For example, the following | 8987 | the packages that contain the given paths. For example, the following |
9252 | tells us that ``/usr/share/man/man1/make.1`` is contained in the | 8988 | tells us that ``/usr/share/man/man1/make.1`` is contained in the |
9253 | ``make-doc`` package: | 8989 | ``make-doc`` package:: |
9254 | :: | ||
9255 | 8990 | ||
9256 | $ oe-pkgdata-util find-path /usr/share/man/man1/make.1 | 8991 | $ oe-pkgdata-util find-path /usr/share/man/man1/make.1 |
9257 | make-doc: /usr/share/man/man1/make.1 | 8992 | make-doc: /usr/share/man/man1/make.1 |
@@ -9260,8 +8995,7 @@ Following are a few of the available ``oe-pkgdata-util`` subcommands. | |||
9260 | of the recipes that produce the given packages. | 8995 | of the recipes that produce the given packages. |
9261 | 8996 | ||
9262 | For more information on the ``oe-pkgdata-util`` command, use the help | 8997 | For more information on the ``oe-pkgdata-util`` command, use the help |
9263 | facility: | 8998 | facility:: |
9264 | :: | ||
9265 | 8999 | ||
9266 | $ oe-pkgdata-util --help | 9000 | $ oe-pkgdata-util --help |
9267 | $ oe-pkgdata-util subcommand --help | 9001 | $ oe-pkgdata-util subcommand --help |
@@ -9274,8 +9008,7 @@ before the one you have specified. Dependency information can help you | |||
9274 | understand why a recipe is built. | 9008 | understand why a recipe is built. |
9275 | 9009 | ||
9276 | To generate dependency information for a recipe, run the following | 9010 | To generate dependency information for a recipe, run the following |
9277 | command: | 9011 | command:: |
9278 | :: | ||
9279 | 9012 | ||
9280 | $ bitbake -g recipename | 9013 | $ bitbake -g recipename |
9281 | 9014 | ||
@@ -9305,8 +9038,7 @@ format and can be converted to images (e.g. using the ``dot`` tool from | |||
9305 | provide useful information. | 9038 | provide useful information. |
9306 | 9039 | ||
9307 | As an example, the ``task-depends.dot`` file contains lines such | 9040 | As an example, the ``task-depends.dot`` file contains lines such |
9308 | as the following: | 9041 | as the following:: |
9309 | :: | ||
9310 | 9042 | ||
9311 | "libxslt.do_configure" -> "libxml2.do_populate_sysroot" | 9043 | "libxslt.do_configure" -> "libxml2.do_populate_sysroot" |
9312 | 9044 | ||
@@ -9323,8 +9055,7 @@ format and can be converted to images (e.g. using the ``dot`` tool from | |||
9323 | displays paths between graph nodes. | 9055 | displays paths between graph nodes. |
9324 | 9056 | ||
9325 | You can use a different method to view dependency information by using | 9057 | You can use a different method to view dependency information by using |
9326 | the following command: | 9058 | the following command:: |
9327 | :: | ||
9328 | 9059 | ||
9329 | $ bitbake -g -u taskexp recipename | 9060 | $ bitbake -g -u taskexp recipename |
9330 | 9061 | ||
@@ -9350,8 +9081,7 @@ If you are unsure whether a variable dependency is being picked up | |||
9350 | automatically for a given task, you can list the variable dependencies | 9081 | automatically for a given task, you can list the variable dependencies |
9351 | BitBake has determined by doing the following: | 9082 | BitBake has determined by doing the following: |
9352 | 9083 | ||
9353 | 1. Build the recipe containing the task: | 9084 | 1. Build the recipe containing the task:: |
9354 | :: | ||
9355 | 9085 | ||
9356 | $ bitbake recipename | 9086 | $ bitbake recipename |
9357 | 9087 | ||
@@ -9362,8 +9092,7 @@ BitBake has determined by doing the following: | |||
9362 | checksum for the task. As an example, for the | 9092 | checksum for the task. As an example, for the |
9363 | :ref:`ref-tasks-fetch` task of the | 9093 | :ref:`ref-tasks-fetch` task of the |
9364 | ``db`` recipe, the ``sigdata`` file might be found in the following | 9094 | ``db`` recipe, the ``sigdata`` file might be found in the following |
9365 | location: | 9095 | location:: |
9366 | :: | ||
9367 | 9096 | ||
9368 | ${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222b16ff0bcee2000ef648b1 | 9097 | ${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222b16ff0bcee2000ef648b1 |
9369 | 9098 | ||
@@ -9375,8 +9104,7 @@ BitBake has determined by doing the following: | |||
9375 | same information as ``sigdata`` files. | 9104 | same information as ``sigdata`` files. |
9376 | 9105 | ||
9377 | 3. Run ``bitbake-dumpsig`` on the ``sigdata`` or ``siginfo`` file. Here | 9106 | 3. Run ``bitbake-dumpsig`` on the ``sigdata`` or ``siginfo`` file. Here |
9378 | is an example: | 9107 | is an example:: |
9379 | :: | ||
9380 | 9108 | ||
9381 | $ bitbake-dumpsig ${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222b16ff0bcee2000ef648b1 | 9109 | $ bitbake-dumpsig ${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222b16ff0bcee2000ef648b1 |
9382 | 9110 | ||
@@ -9406,8 +9134,7 @@ call ``bitbake-diffsigs`` with just one file, the command behaves like | |||
9406 | 9134 | ||
9407 | You can also use BitBake to dump out the signature construction | 9135 | You can also use BitBake to dump out the signature construction |
9408 | information without executing tasks by using either of the following | 9136 | information without executing tasks by using either of the following |
9409 | BitBake command-line options: | 9137 | BitBake command-line options:: |
9410 | :: | ||
9411 | 9138 | ||
9412 | ‐‐dump-signatures=SIGNATURE_HANDLER | 9139 | ‐‐dump-signatures=SIGNATURE_HANDLER |
9413 | -S SIGNATURE_HANDLER | 9140 | -S SIGNATURE_HANDLER |
@@ -9494,8 +9221,7 @@ behavior in most cases is: ``do_fetch``, ``do_unpack``, ``do_patch``, | |||
9494 | ``do_build`` and any tasks on which it depends build first. Some tasks, | 9221 | ``do_build`` and any tasks on which it depends build first. Some tasks, |
9495 | such as ``do_devshell``, are not part of the default build chain. If you | 9222 | such as ``do_devshell``, are not part of the default build chain. If you |
9496 | wish to run a task that is not part of the default build chain, you can | 9223 | wish to run a task that is not part of the default build chain, you can |
9497 | use the ``-c`` option in BitBake. Here is an example: | 9224 | use the ``-c`` option in BitBake. Here is an example:: |
9498 | :: | ||
9499 | 9225 | ||
9500 | $ bitbake matchbox-desktop -c devshell | 9226 | $ bitbake matchbox-desktop -c devshell |
9501 | 9227 | ||
@@ -9520,8 +9246,7 @@ out), then you can use the ``-f`` option. | |||
9520 | [\ :ref:`nostamp <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ] | 9246 | [\ :ref:`nostamp <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ] |
9521 | variable flag is already set for the task. | 9247 | variable flag is already set for the task. |
9522 | 9248 | ||
9523 | The following example shows one way you can use the ``-f`` option: | 9249 | The following example shows one way you can use the ``-f`` option:: |
9524 | :: | ||
9525 | 9250 | ||
9526 | $ bitbake matchbox-desktop | 9251 | $ bitbake matchbox-desktop |
9527 | . | 9252 | . |
@@ -9550,8 +9275,7 @@ Using this option invalidates the given task and then runs the | |||
9550 | :ref:`ref-tasks-build` task, which is | 9275 | :ref:`ref-tasks-build` task, which is |
9551 | the default task if no task is given, and the tasks on which it depends. | 9276 | the default task if no task is given, and the tasks on which it depends. |
9552 | You could replace the final two commands in the previous example with | 9277 | You could replace the final two commands in the previous example with |
9553 | the following single command: | 9278 | the following single command:: |
9554 | :: | ||
9555 | 9279 | ||
9556 | $ bitbake matchbox-desktop -C compile | 9280 | $ bitbake matchbox-desktop -C compile |
9557 | 9281 | ||
@@ -9575,16 +9299,14 @@ task dependency mechanisms. | |||
9575 | and build output might not be in the clean state they would be in for | 9299 | and build output might not be in the clean state they would be in for |
9576 | a "normal" build, depending on what actions you took. To get rid of | 9300 | a "normal" build, depending on what actions you took. To get rid of |
9577 | such warnings, you can remove the work directory and rebuild the | 9301 | such warnings, you can remove the work directory and rebuild the |
9578 | recipe, as follows: | 9302 | recipe, as follows:: |
9579 | :: | ||
9580 | 9303 | ||
9581 | $ bitbake matchbox-desktop -c clean | 9304 | $ bitbake matchbox-desktop -c clean |
9582 | $ bitbake matchbox-desktop | 9305 | $ bitbake matchbox-desktop |
9583 | 9306 | ||
9584 | 9307 | ||
9585 | You can view a list of tasks in a given package by running the | 9308 | You can view a list of tasks in a given package by running the |
9586 | ``do_listtasks`` task as follows: | 9309 | ``do_listtasks`` task as follows:: |
9587 | :: | ||
9588 | 9310 | ||
9589 | $ bitbake matchbox-desktop -c listtasks | 9311 | $ bitbake matchbox-desktop -c listtasks |
9590 | 9312 | ||
@@ -9608,8 +9330,7 @@ Building with No Dependencies | |||
9608 | ----------------------------- | 9330 | ----------------------------- |
9609 | 9331 | ||
9610 | To build a specific recipe (``.bb`` file), you can use the following | 9332 | To build a specific recipe (``.bb`` file), you can use the following |
9611 | command form: | 9333 | command form:: |
9612 | :: | ||
9613 | 9334 | ||
9614 | $ bitbake -b somepath/somerecipe.bb | 9335 | $ bitbake -b somepath/somerecipe.bb |
9615 | 9336 | ||
@@ -9678,8 +9399,7 @@ in the log, use the "debug" loglevel. | |||
9678 | Following is an example written in Python. The code handles logging for | 9399 | Following is an example written in Python. The code handles logging for |
9679 | a function that determines the number of tasks needed to be run. See the | 9400 | a function that determines the number of tasks needed to be run. See the |
9680 | ":ref:`ref-tasks-listtasks`" | 9401 | ":ref:`ref-tasks-listtasks`" |
9681 | section for additional information: | 9402 | section for additional information:: |
9682 | :: | ||
9683 | 9403 | ||
9684 | python do_listtasks() { | 9404 | python do_listtasks() { |
9685 | bb.debug(2, "Starting to figure out the task list") | 9405 | bb.debug(2, "Starting to figure out the task list") |
@@ -9841,21 +9561,18 @@ build, set the | |||
9841 | :term:`PARALLEL_MAKE` variable | 9561 | :term:`PARALLEL_MAKE` variable |
9842 | in your ``local.conf`` file to a high number (e.g. "-j 20"). Using a | 9562 | in your ``local.conf`` file to a high number (e.g. "-j 20"). Using a |
9843 | high value for ``PARALLEL_MAKE`` increases the chances of the race | 9563 | high value for ``PARALLEL_MAKE`` increases the chances of the race |
9844 | condition showing up: | 9564 | condition showing up:: |
9845 | :: | ||
9846 | 9565 | ||
9847 | $ bitbake neard | 9566 | $ bitbake neard |
9848 | 9567 | ||
9849 | Once the local build for "neard" completes, start a ``devshell`` build: | 9568 | Once the local build for "neard" completes, start a ``devshell`` build:: |
9850 | :: | ||
9851 | 9569 | ||
9852 | $ bitbake neard -c devshell | 9570 | $ bitbake neard -c devshell |
9853 | 9571 | ||
9854 | For information on how to use a ``devshell``, see the | 9572 | For information on how to use a ``devshell``, see the |
9855 | ":ref:`dev-manual/common-tasks:using a development shell`" section. | 9573 | ":ref:`dev-manual/common-tasks:using a development shell`" section. |
9856 | 9574 | ||
9857 | In the ``devshell``, do the following: | 9575 | In the ``devshell``, do the following:: |
9858 | :: | ||
9859 | 9576 | ||
9860 | $ make clean | 9577 | $ make clean |
9861 | $ make tools/snep-send.o | 9578 | $ make tools/snep-send.o |
@@ -9863,8 +9580,7 @@ In the ``devshell``, do the following: | |||
9863 | The ``devshell`` commands cause the failure to clearly | 9580 | The ``devshell`` commands cause the failure to clearly |
9864 | be visible. In this case, a missing dependency exists for the "neard" | 9581 | be visible. In this case, a missing dependency exists for the "neard" |
9865 | Makefile target. Here is some abbreviated, sample output with the | 9582 | Makefile target. Here is some abbreviated, sample output with the |
9866 | missing dependency clearly visible at the end: | 9583 | missing dependency clearly visible at the end:: |
9867 | :: | ||
9868 | 9584 | ||
9869 | i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/scott-lenovo/...... | 9585 | i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/scott-lenovo/...... |
9870 | . | 9586 | . |
@@ -9885,8 +9601,7 @@ Creating a Patch for the Fix | |||
9885 | 9601 | ||
9886 | Because there is a missing dependency for the Makefile target, you need | 9602 | Because there is a missing dependency for the Makefile target, you need |
9887 | to patch the ``Makefile.am`` file, which is generated from | 9603 | to patch the ``Makefile.am`` file, which is generated from |
9888 | ``Makefile.in``. You can use Quilt to create the patch: | 9604 | ``Makefile.in``. You can use Quilt to create the patch:: |
9889 | :: | ||
9890 | 9605 | ||
9891 | $ quilt new parallelmake.patch | 9606 | $ quilt new parallelmake.patch |
9892 | Patch patches/parallelmake.patch is now on top | 9607 | Patch patches/parallelmake.patch is now on top |
@@ -9898,14 +9613,12 @@ For more information on using Quilt, see the | |||
9898 | 9613 | ||
9899 | At this point you need to make the edits to ``Makefile.am`` to add the | 9614 | At this point you need to make the edits to ``Makefile.am`` to add the |
9900 | missing dependency. For our example, you have to add the following line | 9615 | missing dependency. For our example, you have to add the following line |
9901 | to the file: | 9616 | to the file:: |
9902 | :: | ||
9903 | 9617 | ||
9904 | tools/snep-send.$(OBJEXT): include/near/dbus.h | 9618 | tools/snep-send.$(OBJEXT): include/near/dbus.h |
9905 | 9619 | ||
9906 | Once you have edited the file, use the ``refresh`` command to create the | 9620 | Once you have edited the file, use the ``refresh`` command to create the |
9907 | patch: | 9621 | patch:: |
9908 | :: | ||
9909 | 9622 | ||
9910 | $ quilt refresh | 9623 | $ quilt refresh |
9911 | Refreshed patch patches/parallelmake.patch | 9624 | Refreshed patch patches/parallelmake.patch |
@@ -9913,8 +9626,7 @@ patch: | |||
9913 | Once | 9626 | Once |
9914 | the patch file exists, you need to add it back to the originating recipe | 9627 | the patch file exists, you need to add it back to the originating recipe |
9915 | folder. Here is an example assuming a top-level | 9628 | folder. Here is an example assuming a top-level |
9916 | :term:`Source Directory` named ``poky``: | 9629 | :term:`Source Directory` named ``poky``:: |
9917 | :: | ||
9918 | 9630 | ||
9919 | $ cp patches/parallelmake.patch poky/meta/recipes-connectivity/neard/neard | 9631 | $ cp patches/parallelmake.patch poky/meta/recipes-connectivity/neard/neard |
9920 | 9632 | ||
@@ -9922,8 +9634,7 @@ The final thing you need to do to implement the fix in the build is to | |||
9922 | update the "neard" recipe (i.e. ``neard-0.14.bb``) so that the | 9634 | update the "neard" recipe (i.e. ``neard-0.14.bb``) so that the |
9923 | :term:`SRC_URI` statement includes | 9635 | :term:`SRC_URI` statement includes |
9924 | the patch file. The recipe file is in the folder above the patch. Here | 9636 | the patch file. The recipe file is in the folder above the patch. Here |
9925 | is what the edited ``SRC_URI`` statement would look like: | 9637 | is what the edited ``SRC_URI`` statement would look like:: |
9926 | :: | ||
9927 | 9638 | ||
9928 | SRC_URI = "${KERNELORG_MIRROR}/linux/network/nfc/${BPN}-${PV}.tar.xz \ | 9639 | SRC_URI = "${KERNELORG_MIRROR}/linux/network/nfc/${BPN}-${PV}.tar.xz \ |
9929 | file://neard.in \ | 9640 | file://neard.in \ |
@@ -9932,8 +9643,7 @@ is what the edited ``SRC_URI`` statement would look like: | |||
9932 | " | 9643 | " |
9933 | 9644 | ||
9934 | With the patch complete and moved to the correct folder and the | 9645 | With the patch complete and moved to the correct folder and the |
9935 | ``SRC_URI`` statement updated, you can exit the ``devshell``: | 9646 | ``SRC_URI`` statement updated, you can exit the ``devshell``:: |
9936 | :: | ||
9937 | 9647 | ||
9938 | $ exit | 9648 | $ exit |
9939 | 9649 | ||
@@ -9941,16 +9651,14 @@ Testing the Build | |||
9941 | ~~~~~~~~~~~~~~~~~ | 9651 | ~~~~~~~~~~~~~~~~~ |
9942 | 9652 | ||
9943 | With everything in place, you can get back to trying the build again | 9653 | With everything in place, you can get back to trying the build again |
9944 | locally: | 9654 | locally:: |
9945 | :: | ||
9946 | 9655 | ||
9947 | $ bitbake neard | 9656 | $ bitbake neard |
9948 | 9657 | ||
9949 | This build should succeed. | 9658 | This build should succeed. |
9950 | 9659 | ||
9951 | Now you can open up a ``devshell`` again and repeat the clean and make | 9660 | Now you can open up a ``devshell`` again and repeat the clean and make |
9952 | operations as follows: | 9661 | operations as follows:: |
9953 | :: | ||
9954 | 9662 | ||
9955 | $ bitbake neard -c devshell | 9663 | $ bitbake neard -c devshell |
9956 | $ make clean | 9664 | $ make clean |
@@ -10005,24 +9713,21 @@ debug symbols from the server. | |||
10005 | 9713 | ||
10006 | To run a debuginfod server, you need to do the following: | 9714 | To run a debuginfod server, you need to do the following: |
10007 | 9715 | ||
10008 | - Ensure that this variable is set in your ``local.conf`` file: | 9716 | - Ensure that this variable is set in your ``local.conf`` file:: |
10009 | :: | ||
10010 | 9717 | ||
10011 | PACKAGECONFIG_pn-elfutils-native = "debuginfod libdebuginfod" | 9718 | PACKAGECONFIG_pn-elfutils-native = "debuginfod libdebuginfod" |
10012 | 9719 | ||
10013 | This :term:`PACKAGECONFIG` option enables debuginfod and libdebuginfod for | 9720 | This :term:`PACKAGECONFIG` option enables debuginfod and libdebuginfod for |
10014 | "elfutils-native". | 9721 | "elfutils-native". |
10015 | 9722 | ||
10016 | - Run the following commands to set up the "debuginfod" server: | 9723 | - Run the following commands to set up the "debuginfod" server:: |
10017 | :: | ||
10018 | 9724 | ||
10019 | $ oe-debuginfod | 9725 | $ oe-debuginfod |
10020 | 9726 | ||
10021 | 9727 | ||
10022 | To use debuginfod on the target, you need the following: | 9728 | To use debuginfod on the target, you need the following: |
10023 | 9729 | ||
10024 | - Ensure that this variable is set in your ``local.conf`` file: | 9730 | - Ensure that this variable is set in your ``local.conf`` file:: |
10025 | :: | ||
10026 | 9731 | ||
10027 | DEBUGINFOD_URLS = "http://localhost:8002/" | 9732 | DEBUGINFOD_URLS = "http://localhost:8002/" |
10028 | 9733 | ||
@@ -10069,8 +9774,7 @@ debugger. | |||
10069 | 1. *Configure your build system to construct the companion debug | 9774 | 1. *Configure your build system to construct the companion debug |
10070 | filesystem:* | 9775 | filesystem:* |
10071 | 9776 | ||
10072 | In your ``local.conf`` file, set the following: | 9777 | In your ``local.conf`` file, set the following:: |
10073 | :: | ||
10074 | 9778 | ||
10075 | IMAGE_GEN_DEBUGFS = "1" | 9779 | IMAGE_GEN_DEBUGFS = "1" |
10076 | IMAGE_FSTYPES_DEBUGFS = "tar.bz2" | 9780 | IMAGE_FSTYPES_DEBUGFS = "tar.bz2" |
@@ -10090,8 +9794,7 @@ debugger. | |||
10090 | 2. *Configure the system to include gdbserver in the target filesystem:* | 9794 | 2. *Configure the system to include gdbserver in the target filesystem:* |
10091 | 9795 | ||
10092 | Make the following addition in either your ``local.conf`` file or in | 9796 | Make the following addition in either your ``local.conf`` file or in |
10093 | an image recipe: | 9797 | an image recipe:: |
10094 | :: | ||
10095 | 9798 | ||
10096 | IMAGE_INSTALL_append = " gdbserver" | 9799 | IMAGE_INSTALL_append = " gdbserver" |
10097 | 9800 | ||
@@ -10101,29 +9804,25 @@ debugger. | |||
10101 | 3. *Build the environment:* | 9804 | 3. *Build the environment:* |
10102 | 9805 | ||
10103 | Use the following command to construct the image and the companion | 9806 | Use the following command to construct the image and the companion |
10104 | Debug Filesystem: | 9807 | Debug Filesystem:: |
10105 | :: | ||
10106 | 9808 | ||
10107 | $ bitbake image | 9809 | $ bitbake image |
10108 | 9810 | ||
10109 | Build the cross GDB component and | 9811 | Build the cross GDB component and |
10110 | make it available for debugging. Build the SDK that matches the | 9812 | make it available for debugging. Build the SDK that matches the |
10111 | image. Building the SDK is best for a production build that can be | 9813 | image. Building the SDK is best for a production build that can be |
10112 | used later for debugging, especially during long term maintenance: | 9814 | used later for debugging, especially during long term maintenance:: |
10113 | :: | ||
10114 | 9815 | ||
10115 | $ bitbake -c populate_sdk image | 9816 | $ bitbake -c populate_sdk image |
10116 | 9817 | ||
10117 | Alternatively, you can build the minimal toolchain components that | 9818 | Alternatively, you can build the minimal toolchain components that |
10118 | match the target. Doing so creates a smaller than typical SDK and | 9819 | match the target. Doing so creates a smaller than typical SDK and |
10119 | only contains a minimal set of components with which to build simple | 9820 | only contains a minimal set of components with which to build simple |
10120 | test applications, as well as run the debugger: | 9821 | test applications, as well as run the debugger:: |
10121 | :: | ||
10122 | 9822 | ||
10123 | $ bitbake meta-toolchain | 9823 | $ bitbake meta-toolchain |
10124 | 9824 | ||
10125 | A final method is to build Gdb itself within the build system: | 9825 | A final method is to build Gdb itself within the build system:: |
10126 | :: | ||
10127 | 9826 | ||
10128 | $ bitbake gdb-cross-<architecture> | 9827 | $ bitbake gdb-cross-<architecture> |
10129 | 9828 | ||
@@ -10140,8 +9839,7 @@ debugger. | |||
10140 | 9839 | ||
10141 | 4. *Set up the* ``debugfs``\ *:* | 9840 | 4. *Set up the* ``debugfs``\ *:* |
10142 | 9841 | ||
10143 | Run the following commands to set up the ``debugfs``: | 9842 | Run the following commands to set up the ``debugfs``:: |
10144 | :: | ||
10145 | 9843 | ||
10146 | $ mkdir debugfs | 9844 | $ mkdir debugfs |
10147 | $ cd debugfs | 9845 | $ cd debugfs |
@@ -10180,8 +9878,7 @@ debugger. | |||
10180 | Documentation <https://www.gnu.org/software/gdb/documentation/>`__. | 9878 | Documentation <https://www.gnu.org/software/gdb/documentation/>`__. |
10181 | 9879 | ||
10182 | After running gdbserver on the target, you need to run Gdb on the | 9880 | After running gdbserver on the target, you need to run Gdb on the |
10183 | host and configure it and connect to the target. Use these commands: | 9881 | host and configure it and connect to the target. Use these commands:: |
10184 | :: | ||
10185 | 9882 | ||
10186 | $ cd directory-holding-the-debugfs-directory | 9883 | $ cd directory-holding-the-debugfs-directory |
10187 | $ arch-gdb | 9884 | $ arch-gdb |
@@ -10212,8 +9909,7 @@ debugger. | |||
10212 | If the binary is processed through the debug splitting in | 9909 | If the binary is processed through the debug splitting in |
10213 | OpenEmbedded, you should also copy the debug items (i.e. ``.debug`` | 9910 | OpenEmbedded, you should also copy the debug items (i.e. ``.debug`` |
10214 | contents and corresponding ``/usr/src/debug`` files) from the work | 9911 | contents and corresponding ``/usr/src/debug`` files) from the work |
10215 | directory. Here is an example: | 9912 | directory. Here is an example:: |
10216 | :: | ||
10217 | 9913 | ||
10218 | $ bitbake bash | 9914 | $ bitbake bash |
10219 | $ bitbake -c devshell bash | 9915 | $ bitbake -c devshell bash |
@@ -10234,25 +9930,21 @@ debug on the target hardware. | |||
10234 | To support this kind of debugging, you need do the following: | 9930 | To support this kind of debugging, you need do the following: |
10235 | 9931 | ||
10236 | - Ensure that GDB is on the target. You can do this by adding "gdb" to | 9932 | - Ensure that GDB is on the target. You can do this by adding "gdb" to |
10237 | :term:`IMAGE_INSTALL`: | 9933 | :term:`IMAGE_INSTALL`:: |
10238 | :: | ||
10239 | 9934 | ||
10240 | IMAGE_INSTALL_append = " gdb" | 9935 | IMAGE_INSTALL_append = " gdb" |
10241 | 9936 | ||
10242 | Alternatively, you can add "tools-debug" to :term:`IMAGE_FEATURES`: | 9937 | Alternatively, you can add "tools-debug" to :term:`IMAGE_FEATURES`:: |
10243 | :: | ||
10244 | 9938 | ||
10245 | IMAGE_FEATURES_append = " tools-debug" | 9939 | IMAGE_FEATURES_append = " tools-debug" |
10246 | 9940 | ||
10247 | - Ensure that debug symbols are present. You can make sure these | 9941 | - Ensure that debug symbols are present. You can make sure these |
10248 | symbols are present by installing ``-dbg``: | 9942 | symbols are present by installing ``-dbg``:: |
10249 | :: | ||
10250 | 9943 | ||
10251 | IMAGE_INSTALL_append = "packagename-dbg" | 9944 | IMAGE_INSTALL_append = "packagename-dbg" |
10252 | 9945 | ||
10253 | Alternatively, you can do the following to include | 9946 | Alternatively, you can do the following to include |
10254 | all the debug symbols: | 9947 | all the debug symbols:: |
10255 | :: | ||
10256 | 9948 | ||
10257 | IMAGE_FEATURES_append = " dbg-pkgs" | 9949 | IMAGE_FEATURES_append = " dbg-pkgs" |
10258 | 9950 | ||
@@ -10262,8 +9954,7 @@ To support this kind of debugging, you need do the following: | |||
10262 | of optimization used by the compiler. For example, when adding the | 9954 | of optimization used by the compiler. For example, when adding the |
10263 | following line to your ``local.conf`` file, you will reduce optimization | 9955 | following line to your ``local.conf`` file, you will reduce optimization |
10264 | from :term:`FULL_OPTIMIZATION` of "-O2" to :term:`DEBUG_OPTIMIZATION` | 9956 | from :term:`FULL_OPTIMIZATION` of "-O2" to :term:`DEBUG_OPTIMIZATION` |
10265 | of "-O -fno-omit-frame-pointer": | 9957 | of "-O -fno-omit-frame-pointer":: |
10266 | :: | ||
10267 | 9958 | ||
10268 | DEBUG_BUILD = "1" | 9959 | DEBUG_BUILD = "1" |
10269 | 9960 | ||
@@ -10307,8 +9998,7 @@ Here are some other tips that you might find useful: | |||
10307 | Using GNU Grep, you can use the following shell function to | 9998 | Using GNU Grep, you can use the following shell function to |
10308 | recursively search through common recipe-related files, skipping | 9999 | recursively search through common recipe-related files, skipping |
10309 | binary files, ``.git`` directories, and the Build Directory (assuming | 10000 | binary files, ``.git`` directories, and the Build Directory (assuming |
10310 | its name starts with "build"): | 10001 | its name starts with "build"):: |
10311 | :: | ||
10312 | 10002 | ||
10313 | g() { | 10003 | g() { |
10314 | grep -Ir \ | 10004 | grep -Ir \ |
@@ -10321,8 +10011,7 @@ Here are some other tips that you might find useful: | |||
10321 | "$@" | 10011 | "$@" |
10322 | } | 10012 | } |
10323 | 10013 | ||
10324 | Following are some usage examples: | 10014 | Following are some usage examples:: |
10325 | :: | ||
10326 | 10015 | ||
10327 | $ g FOO # Search recursively for "FOO" | 10016 | $ g FOO # Search recursively for "FOO" |
10328 | $ g -i foo # Search recursively for "foo", ignoring case | 10017 | $ g -i foo # Search recursively for "foo", ignoring case |
@@ -10581,8 +10270,7 @@ Preparing Changes for Submission | |||
10581 | specific convention for bug references - any commit that addresses | 10270 | specific convention for bug references - any commit that addresses |
10582 | a specific bug should use the following form for the detailed | 10271 | a specific bug should use the following form for the detailed |
10583 | description. Be sure to use the actual bug-tracking ID from | 10272 | description. Be sure to use the actual bug-tracking ID from |
10584 | Bugzilla for bug-id: | 10273 | Bugzilla for bug-id:: |
10585 | :: | ||
10586 | 10274 | ||
10587 | Fixes [YOCTO #bug-id] | 10275 | Fixes [YOCTO #bug-id] |
10588 | 10276 | ||
@@ -10608,8 +10296,7 @@ without using the scripts once the steps in | |||
10608 | provide the command, you must include a revision list or a number of | 10296 | provide the command, you must include a revision list or a number of |
10609 | patches as part of the command. For example, either of these two | 10297 | patches as part of the command. For example, either of these two |
10610 | commands takes your most recent single commit and formats it as an | 10298 | commands takes your most recent single commit and formats it as an |
10611 | email message in the current directory: | 10299 | email message in the current directory:: |
10612 | :: | ||
10613 | 10300 | ||
10614 | $ git format-patch -1 | 10301 | $ git format-patch -1 |
10615 | 10302 | ||
@@ -10701,8 +10388,7 @@ been followed: | |||
10701 | 10388 | ||
10702 | 1. *Push Your Commits to a "Contrib" Upstream:* If you have arranged for | 10389 | 1. *Push Your Commits to a "Contrib" Upstream:* If you have arranged for |
10703 | permissions to push to an upstream contrib repository, push the | 10390 | permissions to push to an upstream contrib repository, push the |
10704 | change to that repository: | 10391 | change to that repository:: |
10705 | :: | ||
10706 | 10392 | ||
10707 | $ git push upstream_remote_repo local_branch_name | 10393 | $ git push upstream_remote_repo local_branch_name |
10708 | 10394 | ||
@@ -10711,8 +10397,7 @@ been followed: | |||
10711 | working in a local branch named `your_name`\ ``/README``. The following | 10397 | working in a local branch named `your_name`\ ``/README``. The following |
10712 | command pushes your local commits to the ``meta-intel-contrib`` | 10398 | command pushes your local commits to the ``meta-intel-contrib`` |
10713 | upstream repository and puts the commit in a branch named | 10399 | upstream repository and puts the commit in a branch named |
10714 | `your_name`\ ``/README``: | 10400 | `your_name`\ ``/README``:: |
10715 | :: | ||
10716 | 10401 | ||
10717 | $ git push meta-intel-contrib your_name/README | 10402 | $ git push meta-intel-contrib your_name/README |
10718 | 10403 | ||
@@ -10729,8 +10414,7 @@ been followed: | |||
10729 | 10414 | ||
10730 | - *Search by File:* Using :ref:`overview-manual/development-environment:git`, you can | 10415 | - *Search by File:* Using :ref:`overview-manual/development-environment:git`, you can |
10731 | enter the following command to bring up a short list of all | 10416 | enter the following command to bring up a short list of all |
10732 | commits against a specific file: | 10417 | commits against a specific file:: |
10733 | :: | ||
10734 | 10418 | ||
10735 | git shortlog -- filename | 10419 | git shortlog -- filename |
10736 | 10420 | ||
@@ -10764,8 +10448,7 @@ been followed: | |||
10764 | First, create the pull request. For example, the following command | 10448 | First, create the pull request. For example, the following command |
10765 | runs the script, specifies the upstream repository in the contrib | 10449 | runs the script, specifies the upstream repository in the contrib |
10766 | directory into which you pushed the change, and provides a subject | 10450 | directory into which you pushed the change, and provides a subject |
10767 | line in the created patch files: | 10451 | line in the created patch files:: |
10768 | :: | ||
10769 | 10452 | ||
10770 | $ poky/scripts/create-pull-request -u meta-intel-contrib -s "Updated Manual Section Reference in README" | 10453 | $ poky/scripts/create-pull-request -u meta-intel-contrib -s "Updated Manual Section Reference in README" |
10771 | 10454 | ||
@@ -10778,8 +10461,7 @@ been followed: | |||
10778 | editing the cover letter, send the pull request. For example, the | 10461 | editing the cover letter, send the pull request. For example, the |
10779 | following command runs the script and specifies the patch directory | 10462 | following command runs the script and specifies the patch directory |
10780 | and email address. In this example, the email address is a mailing | 10463 | and email address. In this example, the email address is a mailing |
10781 | list: | 10464 | list:: |
10782 | :: | ||
10783 | 10465 | ||
10784 | $ poky/scripts/send-pull-request -p ~/meta-intel/pull-10565 -t meta-intel@yoctoproject.org | 10466 | $ poky/scripts/send-pull-request -p ~/meta-intel/pull-10565 -t meta-intel@yoctoproject.org |
10785 | 10467 | ||
@@ -10788,8 +10470,7 @@ been followed: | |||
10788 | .. note:: | 10470 | .. note:: |
10789 | 10471 | ||
10790 | For help on using these scripts, simply provide the ``-h`` | 10472 | For help on using these scripts, simply provide the ``-h`` |
10791 | argument as follows: | 10473 | argument as follows:: |
10792 | :: | ||
10793 | 10474 | ||
10794 | $ poky/scripts/create-pull-request -h | 10475 | $ poky/scripts/create-pull-request -h |
10795 | $ poky/scripts/send-pull-request -h | 10476 | $ poky/scripts/send-pull-request -h |
@@ -10901,8 +10582,7 @@ Specifying the ``LIC_FILES_CHKSUM`` Variable | |||
10901 | 10582 | ||
10902 | The ``LIC_FILES_CHKSUM`` variable contains checksums of the license text | 10583 | The ``LIC_FILES_CHKSUM`` variable contains checksums of the license text |
10903 | in the source code for the recipe. Following is an example of how to | 10584 | in the source code for the recipe. Following is an example of how to |
10904 | specify ``LIC_FILES_CHKSUM``: | 10585 | specify ``LIC_FILES_CHKSUM``:: |
10905 | :: | ||
10906 | 10586 | ||
10907 | LIC_FILES_CHKSUM = "file://COPYING;md5=xxxx \ | 10587 | LIC_FILES_CHKSUM = "file://COPYING;md5=xxxx \ |
10908 | file://licfile1.txt;beginline=5;endline=29;md5=yyyy \ | 10588 | file://licfile1.txt;beginline=5;endline=29;md5=yyyy \ |
@@ -10925,8 +10605,7 @@ variable as the default directory when searching files listed in | |||
10925 | ``LIC_FILES_CHKSUM``. The previous example employs the default | 10605 | ``LIC_FILES_CHKSUM``. The previous example employs the default |
10926 | directory. | 10606 | directory. |
10927 | 10607 | ||
10928 | Consider this next example: | 10608 | Consider this next example:: |
10929 | :: | ||
10930 | 10609 | ||
10931 | LIC_FILES_CHKSUM = "file://src/ls.c;beginline=5;endline=16;\ | 10610 | LIC_FILES_CHKSUM = "file://src/ls.c;beginline=5;endline=16;\ |
10932 | md5=bb14ed3c4cda583abc85401304b5cd4e" | 10611 | md5=bb14ed3c4cda583abc85401304b5cd4e" |
@@ -10988,15 +10667,13 @@ are defined on a recipe-by-recipe basis through the | |||
10988 | :term:`LICENSE_FLAGS` variable | 10667 | :term:`LICENSE_FLAGS` variable |
10989 | definition in the affected recipe. For instance, the | 10668 | definition in the affected recipe. For instance, the |
10990 | ``poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly`` recipe | 10669 | ``poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly`` recipe |
10991 | contains the following statement: | 10670 | contains the following statement:: |
10992 | :: | ||
10993 | 10671 | ||
10994 | LICENSE_FLAGS = "commercial" | 10672 | LICENSE_FLAGS = "commercial" |
10995 | 10673 | ||
10996 | Here is a | 10674 | Here is a |
10997 | slightly more complicated example that contains both an explicit recipe | 10675 | slightly more complicated example that contains both an explicit recipe |
10998 | name and version (after variable expansion): | 10676 | name and version (after variable expansion):: |
10999 | :: | ||
11000 | 10677 | ||
11001 | LICENSE_FLAGS = "license_${PN}_${PV}" | 10678 | LICENSE_FLAGS = "license_${PN}_${PV}" |
11002 | 10679 | ||
@@ -11011,8 +10688,7 @@ could add either the string "commercial_gst-plugins-ugly" or the more | |||
11011 | general string "commercial" to ``LICENSE_FLAGS_WHITELIST``. See the | 10688 | general string "commercial" to ``LICENSE_FLAGS_WHITELIST``. See the |
11012 | ":ref:`dev-manual/common-tasks:license flag matching`" section for a full | 10689 | ":ref:`dev-manual/common-tasks:license flag matching`" section for a full |
11013 | explanation of how ``LICENSE_FLAGS`` matching works. Here is the | 10690 | explanation of how ``LICENSE_FLAGS`` matching works. Here is the |
11014 | example: | 10691 | example:: |
11015 | :: | ||
11016 | 10692 | ||
11017 | LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly" | 10693 | LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly" |
11018 | 10694 | ||
@@ -11020,8 +10696,7 @@ Likewise, to additionally enable the package built from the recipe | |||
11020 | containing ``LICENSE_FLAGS = "license_${PN}_${PV}"``, and assuming that | 10696 | containing ``LICENSE_FLAGS = "license_${PN}_${PV}"``, and assuming that |
11021 | the actual recipe name was ``emgd_1.10.bb``, the following string would | 10697 | the actual recipe name was ``emgd_1.10.bb``, the following string would |
11022 | enable that package as well as the original ``gst-plugins-ugly`` | 10698 | enable that package as well as the original ``gst-plugins-ugly`` |
11023 | package: | 10699 | package:: |
11024 | :: | ||
11025 | 10700 | ||
11026 | LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly license_emgd_1.10" | 10701 | LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly license_emgd_1.10" |
11027 | 10702 | ||
@@ -11077,8 +10752,7 @@ matches any expanded ``LICENSE_FLAGS`` definition that starts with the | |||
11077 | string "commercial" such as "commercial_foo" and "commercial_bar", which | 10752 | string "commercial" such as "commercial_foo" and "commercial_bar", which |
11078 | are the strings the build system automatically generates for | 10753 | are the strings the build system automatically generates for |
11079 | hypothetical recipes named "foo" and "bar" assuming those recipes simply | 10754 | hypothetical recipes named "foo" and "bar" assuming those recipes simply |
11080 | specify the following: | 10755 | specify the following:: |
11081 | :: | ||
11082 | 10756 | ||
11083 | LICENSE_FLAGS = "commercial" | 10757 | LICENSE_FLAGS = "commercial" |
11084 | 10758 | ||
@@ -11116,8 +10790,7 @@ Other Variables Related to Commercial Licenses | |||
11116 | 10790 | ||
11117 | Other helpful variables related to commercial license handling exist and | 10791 | Other helpful variables related to commercial license handling exist and |
11118 | are defined in the | 10792 | are defined in the |
11119 | ``poky/meta/conf/distro/include/default-distrovars.inc`` file: | 10793 | ``poky/meta/conf/distro/include/default-distrovars.inc`` file:: |
11120 | :: | ||
11121 | 10794 | ||
11122 | COMMERCIAL_AUDIO_PLUGINS ?= "" | 10795 | COMMERCIAL_AUDIO_PLUGINS ?= "" |
11123 | COMMERCIAL_VIDEO_PLUGINS ?= "" | 10796 | COMMERCIAL_VIDEO_PLUGINS ?= "" |
@@ -11125,8 +10798,7 @@ are defined in the | |||
11125 | If you | 10798 | If you |
11126 | want to enable these components, you can do so by making sure you have | 10799 | want to enable these components, you can do so by making sure you have |
11127 | statements similar to the following in your ``local.conf`` configuration | 10800 | statements similar to the following in your ``local.conf`` configuration |
11128 | file: | 10801 | file:: |
11129 | :: | ||
11130 | 10802 | ||
11131 | COMMERCIAL_AUDIO_PLUGINS = "gst-plugins-ugly-mad \ | 10803 | COMMERCIAL_AUDIO_PLUGINS = "gst-plugins-ugly-mad \ |
11132 | gst-plugins-ugly-mpegaudioparse" | 10804 | gst-plugins-ugly-mpegaudioparse" |
@@ -11138,8 +10810,7 @@ file: | |||
11138 | Of course, you could also create a matching whitelist for those | 10810 | Of course, you could also create a matching whitelist for those |
11139 | components using the more general "commercial" in the whitelist, but | 10811 | components using the more general "commercial" in the whitelist, but |
11140 | that would also enable all the other packages with ``LICENSE_FLAGS`` | 10812 | that would also enable all the other packages with ``LICENSE_FLAGS`` |
11141 | containing "commercial", which you may or may not want: | 10813 | containing "commercial", which you may or may not want:: |
11142 | :: | ||
11143 | 10814 | ||
11144 | LICENSE_FLAGS_WHITELIST = "commercial" | 10815 | LICENSE_FLAGS_WHITELIST = "commercial" |
11145 | 10816 | ||
@@ -11219,8 +10890,7 @@ of compliance in mind. | |||
11219 | One way of doing this (but certainly not the only way) is to release | 10890 | One way of doing this (but certainly not the only way) is to release |
11220 | just the source as a tarball. You can do this by adding the following to | 10891 | just the source as a tarball. You can do this by adding the following to |
11221 | the ``local.conf`` file found in the | 10892 | the ``local.conf`` file found in the |
11222 | :term:`Build Directory`: | 10893 | :term:`Build Directory`:: |
11223 | :: | ||
11224 | 10894 | ||
11225 | INHERIT += "archiver" | 10895 | INHERIT += "archiver" |
11226 | ARCHIVER_MODE[src] = "original" | 10896 | ARCHIVER_MODE[src] = "original" |
@@ -11276,8 +10946,7 @@ One requirement that is often overlooked is inclusion of license text. | |||
11276 | This requirement also needs to be dealt with prior to generating the | 10946 | This requirement also needs to be dealt with prior to generating the |
11277 | final image. Some licenses require the license text to accompany the | 10947 | final image. Some licenses require the license text to accompany the |
11278 | binary. You can achieve this by adding the following to your | 10948 | binary. You can achieve this by adding the following to your |
11279 | ``local.conf`` file: | 10949 | ``local.conf`` file:: |
11280 | :: | ||
11281 | 10950 | ||
11282 | COPY_LIC_MANIFEST = "1" | 10951 | COPY_LIC_MANIFEST = "1" |
11283 | COPY_LIC_DIRS = "1" | 10952 | COPY_LIC_DIRS = "1" |
@@ -11344,8 +11013,7 @@ thing a development organization might want to consider for end-user | |||
11344 | convenience is to modify ``meta-poky/conf/bblayers.conf.sample`` to | 11013 | convenience is to modify ``meta-poky/conf/bblayers.conf.sample`` to |
11345 | ensure that when the end user utilizes the released build system to | 11014 | ensure that when the end user utilizes the released build system to |
11346 | build an image, the development organization's layers are included in | 11015 | build an image, the development organization's layers are included in |
11347 | the ``bblayers.conf`` file automatically: | 11016 | the ``bblayers.conf`` file automatically:: |
11348 | :: | ||
11349 | 11017 | ||
11350 | # POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf | 11018 | # POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf |
11351 | # changes incompatibly | 11019 | # changes incompatibly |
@@ -11413,8 +11081,7 @@ variable. Using this variable also avoids QA errors when you use a | |||
11413 | non-common, non-CLOSED license in a recipe. | 11081 | non-common, non-CLOSED license in a recipe. |
11414 | 11082 | ||
11415 | The following is an example that uses the ``LICENSE.Abilis.txt`` file as | 11083 | The following is an example that uses the ``LICENSE.Abilis.txt`` file as |
11416 | the license from the fetched source: | 11084 | the license from the fetched source:: |
11417 | :: | ||
11418 | 11085 | ||
11419 | NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt" | 11086 | NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt" |
11420 | 11087 | ||
@@ -11457,8 +11124,7 @@ class by adding the following statement to the end of your | |||
11457 | By default, the error reporting feature stores information in | 11124 | By default, the error reporting feature stores information in |
11458 | ``${``\ :term:`LOG_DIR`\ ``}/error-report``. | 11125 | ``${``\ :term:`LOG_DIR`\ ``}/error-report``. |
11459 | However, you can specify a directory to use by adding the following to | 11126 | However, you can specify a directory to use by adding the following to |
11460 | your ``local.conf`` file: | 11127 | your ``local.conf`` file:: |
11461 | :: | ||
11462 | 11128 | ||
11463 | ERR_REPORT_DIR = "path" | 11129 | ERR_REPORT_DIR = "path" |
11464 | 11130 | ||
@@ -11467,8 +11133,7 @@ reporting causes the build process to collect the errors and store them | |||
11467 | in a file as previously described. When the build system encounters an | 11133 | in a file as previously described. When the build system encounters an |
11468 | error, it includes a command as part of the console output. You can run | 11134 | error, it includes a command as part of the console output. You can run |
11469 | the command to send the error file to the server. For example, the | 11135 | the command to send the error file to the server. For example, the |
11470 | following command sends the errors to an upstream server: | 11136 | following command sends the errors to an upstream server:: |
11471 | :: | ||
11472 | 11137 | ||
11473 | $ send-error-report /home/brandusa/project/poky/build/tmp/log/error-report/error_report_201403141617.txt | 11138 | $ send-error-report /home/brandusa/project/poky/build/tmp/log/error-report/error_report_201403141617.txt |
11474 | 11139 | ||
@@ -11476,8 +11141,7 @@ In the previous example, the errors are sent to a public database | |||
11476 | available at https://errors.yoctoproject.org, which is used by the | 11141 | available at https://errors.yoctoproject.org, which is used by the |
11477 | entire community. If you specify a particular server, you can send the | 11142 | entire community. If you specify a particular server, you can send the |
11478 | errors to a different database. Use the following command for more | 11143 | errors to a different database. Use the following command for more |
11479 | information on available options: | 11144 | information on available options:: |
11480 | :: | ||
11481 | 11145 | ||
11482 | $ send-error-report --help | 11146 | $ send-error-report --help |
11483 | 11147 | ||
@@ -11557,8 +11221,7 @@ Wayland with Kernel Mode Setting | |||
11557 | (`KMS <https://wiki.archlinux.org/index.php/Kernel_Mode_Setting>`__) | 11221 | (`KMS <https://wiki.archlinux.org/index.php/Kernel_Mode_Setting>`__) |
11558 | support, include the "wayland" flag in the | 11222 | support, include the "wayland" flag in the |
11559 | :term:`DISTRO_FEATURES` | 11223 | :term:`DISTRO_FEATURES` |
11560 | statement in your ``local.conf`` file: | 11224 | statement in your ``local.conf`` file:: |
11561 | :: | ||
11562 | 11225 | ||
11563 | DISTRO_FEATURES_append = " wayland" | 11226 | DISTRO_FEATURES_append = " wayland" |
11564 | 11227 | ||
@@ -11573,8 +11236,7 @@ Installing Wayland and Weston | |||
11573 | To install the Wayland feature into an image, you must include the | 11236 | To install the Wayland feature into an image, you must include the |
11574 | following | 11237 | following |
11575 | :term:`CORE_IMAGE_EXTRA_INSTALL` | 11238 | :term:`CORE_IMAGE_EXTRA_INSTALL` |
11576 | statement in your ``local.conf`` file: | 11239 | statement in your ``local.conf`` file:: |
11577 | :: | ||
11578 | 11240 | ||
11579 | CORE_IMAGE_EXTRA_INSTALL += "wayland weston" | 11241 | CORE_IMAGE_EXTRA_INSTALL += "wayland weston" |
11580 | 11242 | ||
@@ -11589,14 +11251,12 @@ Alternatively, you can run Weston through the command-line interpretor | |||
11589 | (CLI), which is better suited for development work. To run Weston under | 11251 | (CLI), which is better suited for development work. To run Weston under |
11590 | the CLI, you need to do the following after your image is built: | 11252 | the CLI, you need to do the following after your image is built: |
11591 | 11253 | ||
11592 | 1. Run these commands to export ``XDG_RUNTIME_DIR``: | 11254 | 1. Run these commands to export ``XDG_RUNTIME_DIR``:: |
11593 | :: | ||
11594 | 11255 | ||
11595 | mkdir -p /tmp/$USER-weston | 11256 | mkdir -p /tmp/$USER-weston |
11596 | chmod 0700 /tmp/$USER-weston | 11257 | chmod 0700 /tmp/$USER-weston |
11597 | export XDG_RUNTIME_DIR=/tmp/$USER-weston | 11258 | export XDG_RUNTIME_DIR=/tmp/$USER-weston |
11598 | 11259 | ||
11599 | 2. Launch Weston in the shell: | 11260 | 2. Launch Weston in the shell:: |
11600 | :: | ||
11601 | 11261 | ||
11602 | weston | 11262 | weston |
diff --git a/documentation/dev-manual/qemu.rst b/documentation/dev-manual/qemu.rst index 92799d6d25..2b6d3d76c7 100644 --- a/documentation/dev-manual/qemu.rst +++ b/documentation/dev-manual/qemu.rst | |||
@@ -55,16 +55,14 @@ available. Follow these general steps to run QEMU: | |||
55 | 55 | ||
56 | - If you cloned the ``poky`` repository or you downloaded and | 56 | - If you cloned the ``poky`` repository or you downloaded and |
57 | unpacked a Yocto Project release tarball, you can source the build | 57 | unpacked a Yocto Project release tarball, you can source the build |
58 | environment script (i.e. :ref:`structure-core-script`): | 58 | environment script (i.e. :ref:`structure-core-script`):: |
59 | :: | ||
60 | 59 | ||
61 | $ cd poky | 60 | $ cd poky |
62 | $ source oe-init-build-env | 61 | $ source oe-init-build-env |
63 | 62 | ||
64 | - If you installed a cross-toolchain, you can run the script that | 63 | - If you installed a cross-toolchain, you can run the script that |
65 | initializes the toolchain. For example, the following commands run | 64 | initializes the toolchain. For example, the following commands run |
66 | the initialization script from the default ``poky_sdk`` directory: | 65 | the initialization script from the default ``poky_sdk`` directory:: |
67 | :: | ||
68 | 66 | ||
69 | . poky_sdk/environment-setup-core2-64-poky-linux | 67 | . poky_sdk/environment-setup-core2-64-poky-linux |
70 | 68 | ||
@@ -86,8 +84,7 @@ available. Follow these general steps to run QEMU: | |||
86 | Extensible Software Development Kit (eSDK) manual for information on | 84 | Extensible Software Development Kit (eSDK) manual for information on |
87 | how to extract a root filesystem. | 85 | how to extract a root filesystem. |
88 | 86 | ||
89 | 4. *Run QEMU:* The basic ``runqemu`` command syntax is as follows: | 87 | 4. *Run QEMU:* The basic ``runqemu`` command syntax is as follows:: |
90 | :: | ||
91 | 88 | ||
92 | $ runqemu [option ] [...] | 89 | $ runqemu [option ] [...] |
93 | 90 | ||
@@ -222,18 +219,15 @@ using an NFS server. | |||
222 | Should you need to start, stop, or restart the NFS share, you can use | 219 | Should you need to start, stop, or restart the NFS share, you can use |
223 | the following commands: | 220 | the following commands: |
224 | 221 | ||
225 | - The following command starts the NFS share: | 222 | - The following command starts the NFS share:: |
226 | :: | ||
227 | 223 | ||
228 | runqemu-export-rootfs start file-system-location | 224 | runqemu-export-rootfs start file-system-location |
229 | 225 | ||
230 | - The following command stops the NFS share: | 226 | - The following command stops the NFS share:: |
231 | :: | ||
232 | 227 | ||
233 | runqemu-export-rootfs stop file-system-location | 228 | runqemu-export-rootfs stop file-system-location |
234 | 229 | ||
235 | - The following command restarts the NFS share: | 230 | - The following command restarts the NFS share:: |
236 | :: | ||
237 | 231 | ||
238 | runqemu-export-rootfs restart file-system-location | 232 | runqemu-export-rootfs restart file-system-location |
239 | 233 | ||
@@ -313,8 +307,7 @@ present, the toolchain is also automatically used. | |||
313 | QEMU Command-Line Syntax | 307 | QEMU Command-Line Syntax |
314 | ======================== | 308 | ======================== |
315 | 309 | ||
316 | The basic ``runqemu`` command syntax is as follows: | 310 | The basic ``runqemu`` command syntax is as follows:: |
317 | :: | ||
318 | 311 | ||
319 | $ runqemu [option ] [...] | 312 | $ runqemu [option ] [...] |
320 | 313 | ||
@@ -325,8 +318,7 @@ timestamp when it needs to look for an image. Minimally, through the use | |||
325 | of options, you must provide either a machine name, a virtual machine | 318 | of options, you must provide either a machine name, a virtual machine |
326 | image (``*wic.vmdk``), or a kernel image (``*.bin``). | 319 | image (``*wic.vmdk``), or a kernel image (``*.bin``). |
327 | 320 | ||
328 | Following is the command-line help output for the ``runqemu`` command: | 321 | Following is the command-line help output for the ``runqemu`` command:: |
329 | :: | ||
330 | 322 | ||
331 | $ runqemu --help | 323 | $ runqemu --help |
332 | 324 | ||
diff --git a/documentation/dev-manual/start.rst b/documentation/dev-manual/start.rst index 84abf4c51f..f8c8637d47 100644 --- a/documentation/dev-manual/start.rst +++ b/documentation/dev-manual/start.rst | |||
@@ -486,8 +486,7 @@ your Yocto Project build host: | |||
486 | distribution. | 486 | distribution. |
487 | 487 | ||
488 | 3. *Check your Linux distribution is using WSLv2:* Open a Windows | 488 | 3. *Check your Linux distribution is using WSLv2:* Open a Windows |
489 | PowerShell and run: | 489 | PowerShell and run:: |
490 | :: | ||
491 | 490 | ||
492 | C:\WINDOWS\system32> wsl -l -v | 491 | C:\WINDOWS\system32> wsl -l -v |
493 | NAME STATE VERSION | 492 | NAME STATE VERSION |
@@ -514,8 +513,7 @@ your Yocto Project build host: | |||
514 | 513 | ||
515 | 1. *Find the location of your VHDX file:* First you need to find the | 514 | 1. *Find the location of your VHDX file:* First you need to find the |
516 | distro app package directory, to achieve this open a Windows | 515 | distro app package directory, to achieve this open a Windows |
517 | Powershell as Administrator and run: | 516 | Powershell as Administrator and run:: |
518 | :: | ||
519 | 517 | ||
520 | C:\WINDOWS\system32> Get-AppxPackage -Name "*Ubuntu*" | Select PackageFamilyName | 518 | C:\WINDOWS\system32> Get-AppxPackage -Name "*Ubuntu*" | Select PackageFamilyName |
521 | PackageFamilyName | 519 | PackageFamilyName |
@@ -525,8 +523,7 @@ your Yocto Project build host: | |||
525 | 523 | ||
526 | You should now | 524 | You should now |
527 | replace the PackageFamilyName and your user on the following path | 525 | replace the PackageFamilyName and your user on the following path |
528 | to find your VHDX file: | 526 | to find your VHDX file:: |
529 | :: | ||
530 | 527 | ||
531 | ls C:\Users\myuser\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\ | 528 | ls C:\Users\myuser\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\ |
532 | Mode LastWriteTime Length Name | 529 | Mode LastWriteTime Length Name |
@@ -536,8 +533,7 @@ your Yocto Project build host: | |||
536 | ``C:\Users\myuser\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\ext4.vhdx`` | 533 | ``C:\Users\myuser\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\ext4.vhdx`` |
537 | 534 | ||
538 | 2. *Optimize your VHDX file:* Open a Windows Powershell as | 535 | 2. *Optimize your VHDX file:* Open a Windows Powershell as |
539 | Administrator to optimize your VHDX file, shutting down WSL first: | 536 | Administrator to optimize your VHDX file, shutting down WSL first:: |
540 | :: | ||
541 | 537 | ||
542 | C:\WINDOWS\system32> wsl --shutdown | 538 | C:\WINDOWS\system32> wsl --shutdown |
543 | C:\WINDOWS\system32> optimize-vhd -Path C:\Users\myuser\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\ext4.vhdx -Mode full | 539 | C:\WINDOWS\system32> optimize-vhd -Path C:\Users\myuser\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\ext4.vhdx -Mode full |
@@ -741,8 +737,7 @@ Follow these steps to create a local version of the upstream | |||
741 | 737 | ||
742 | 2. *Clone the Repository:* The following example command clones the | 738 | 2. *Clone the Repository:* The following example command clones the |
743 | ``poky`` repository and uses the default name "poky" for your local | 739 | ``poky`` repository and uses the default name "poky" for your local |
744 | repository: | 740 | repository:: |
745 | :: | ||
746 | 741 | ||
747 | $ git clone git://git.yoctoproject.org/poky | 742 | $ git clone git://git.yoctoproject.org/poky |
748 | Cloning into 'poky'... | 743 | Cloning into 'poky'... |
@@ -764,8 +759,7 @@ Follow these steps to create a local version of the upstream | |||
764 | 759 | ||
765 | Once the local repository is created, you can change to that | 760 | Once the local repository is created, you can change to that |
766 | directory and check its status. Here, the single "master" branch | 761 | directory and check its status. Here, the single "master" branch |
767 | exists on your system and by default, it is checked out: | 762 | exists on your system and by default, it is checked out:: |
768 | :: | ||
769 | 763 | ||
770 | $ cd poky | 764 | $ cd poky |
771 | $ git status | 765 | $ git status |
@@ -826,8 +820,7 @@ and then specifically check out that development branch. | |||
826 | 820 | ||
827 | 3. *Check out the Branch:* Check out the development branch in which you | 821 | 3. *Check out the Branch:* Check out the development branch in which you |
828 | want to work. For example, to access the files for the Yocto Project | 822 | want to work. For example, to access the files for the Yocto Project |
829 | &DISTRO; Release (&DISTRO_NAME;), use the following command: | 823 | &DISTRO; Release (&DISTRO_NAME;), use the following command:: |
830 | :: | ||
831 | 824 | ||
832 | $ git checkout -b &DISTRO_NAME_NO_CAP; origin/&DISTRO_NAME_NO_CAP; | 825 | $ git checkout -b &DISTRO_NAME_NO_CAP; origin/&DISTRO_NAME_NO_CAP; |
833 | Branch &DISTRO_NAME_NO_CAP; set up to track remote branch &DISTRO_NAME_NO_CAP; from origin. | 826 | Branch &DISTRO_NAME_NO_CAP; set up to track remote branch &DISTRO_NAME_NO_CAP; from origin. |
@@ -839,8 +832,7 @@ and then specifically check out that development branch. | |||
839 | 832 | ||
840 | The following command displays the branches that are now part of your | 833 | The following command displays the branches that are now part of your |
841 | local poky repository. The asterisk character indicates the branch | 834 | local poky repository. The asterisk character indicates the branch |
842 | that is currently checked out for work: | 835 | that is currently checked out for work:: |
843 | :: | ||
844 | 836 | ||
845 | $ git branch | 837 | $ git branch |
846 | master | 838 | master |
@@ -867,14 +859,12 @@ similar to checking out by branch name except you use tag names. | |||
867 | section. | 859 | section. |
868 | 860 | ||
869 | 2. *Fetch the Tag Names:* To checkout the branch based on a tag name, | 861 | 2. *Fetch the Tag Names:* To checkout the branch based on a tag name, |
870 | you need to fetch the upstream tags into your local repository: | 862 | you need to fetch the upstream tags into your local repository:: |
871 | :: | ||
872 | 863 | ||
873 | $ git fetch --tags | 864 | $ git fetch --tags |
874 | $ | 865 | $ |
875 | 866 | ||
876 | 3. *List the Tag Names:* You can list the tag names now: | 867 | 3. *List the Tag Names:* You can list the tag names now:: |
877 | :: | ||
878 | 868 | ||
879 | $ git tag | 869 | $ git tag |
880 | 1.1_M1.final | 870 | 1.1_M1.final |
diff --git a/documentation/kernel-dev/advanced.rst b/documentation/kernel-dev/advanced.rst index fb6dfca85f..b0d03851b3 100644 --- a/documentation/kernel-dev/advanced.rst +++ b/documentation/kernel-dev/advanced.rst | |||
@@ -67,8 +67,7 @@ to indicate the branch. | |||
67 | .. note:: | 67 | .. note:: |
68 | 68 | ||
69 | You can use the ``KBRANCH`` value to define an alternate branch typically | 69 | You can use the ``KBRANCH`` value to define an alternate branch typically |
70 | with a machine override as shown here from the ``meta-yocto-bsp`` layer: | 70 | with a machine override as shown here from the ``meta-yocto-bsp`` layer:: |
71 | :: | ||
72 | 71 | ||
73 | KBRANCH_edgerouter = "standard/edgerouter" | 72 | KBRANCH_edgerouter = "standard/edgerouter" |
74 | 73 | ||
@@ -106,15 +105,13 @@ You can use the | |||
106 | variable to include features (configuration fragments, patches, or both) | 105 | variable to include features (configuration fragments, patches, or both) |
107 | that are not already included by the ``KMACHINE`` and | 106 | that are not already included by the ``KMACHINE`` and |
108 | ``LINUX_KERNEL_TYPE`` variable combination. For example, to include a | 107 | ``LINUX_KERNEL_TYPE`` variable combination. For example, to include a |
109 | feature specified as "features/netfilter/netfilter.scc", specify: | 108 | feature specified as "features/netfilter/netfilter.scc", specify:: |
110 | :: | ||
111 | 109 | ||
112 | KERNEL_FEATURES += "features/netfilter/netfilter.scc" | 110 | KERNEL_FEATURES += "features/netfilter/netfilter.scc" |
113 | 111 | ||
114 | To include a | 112 | To include a |
115 | feature called "cfg/sound.scc" just for the ``qemux86`` machine, | 113 | feature called "cfg/sound.scc" just for the ``qemux86`` machine, |
116 | specify: | 114 | specify:: |
117 | :: | ||
118 | 115 | ||
119 | KERNEL_FEATURES_append_qemux86 = " cfg/sound.scc" | 116 | KERNEL_FEATURES_append_qemux86 = " cfg/sound.scc" |
120 | 117 | ||
@@ -157,8 +154,7 @@ types to form the final description of what will be assembled and built. | |||
157 | While the kernel Metadata syntax does not enforce any logical separation | 154 | While the kernel Metadata syntax does not enforce any logical separation |
158 | of configuration fragments, patches, features or kernel types, best | 155 | of configuration fragments, patches, features or kernel types, best |
159 | practices dictate a logical separation of these types of Metadata. The | 156 | practices dictate a logical separation of these types of Metadata. The |
160 | following Metadata file hierarchy is recommended: | 157 | following Metadata file hierarchy is recommended:: |
161 | :: | ||
162 | 158 | ||
163 | base/ | 159 | base/ |
164 | bsp/ | 160 | bsp/ |
@@ -222,8 +218,7 @@ used with the ``linux-yocto-4.12`` kernel as defined outside of the | |||
222 | recipe space (i.e. ``yocto-kernel-cache``). This Metadata consists of | 218 | recipe space (i.e. ``yocto-kernel-cache``). This Metadata consists of |
223 | two files: ``smp.scc`` and ``smp.cfg``. You can find these files in the | 219 | two files: ``smp.scc`` and ``smp.cfg``. You can find these files in the |
224 | ``cfg`` directory of the ``yocto-4.12`` branch in the | 220 | ``cfg`` directory of the ``yocto-4.12`` branch in the |
225 | ``yocto-kernel-cache`` Git repository: | 221 | ``yocto-kernel-cache`` Git repository:: |
226 | :: | ||
227 | 222 | ||
228 | cfg/smp.scc: | 223 | cfg/smp.scc: |
229 | define KFEATURE_DESCRIPTION "Enable SMP for 32 bit builds" | 224 | define KFEATURE_DESCRIPTION "Enable SMP for 32 bit builds" |
@@ -265,8 +260,7 @@ non-hardware fragment. | |||
265 | 260 | ||
266 | As described in the | 261 | As described in the |
267 | ":ref:`kernel-dev/common:validating configuration`" section, you can | 262 | ":ref:`kernel-dev/common:validating configuration`" section, you can |
268 | use the following BitBake command to audit your configuration: | 263 | use the following BitBake command to audit your configuration:: |
269 | :: | ||
270 | 264 | ||
271 | $ bitbake linux-yocto -c kernel_configcheck -f | 265 | $ bitbake linux-yocto -c kernel_configcheck -f |
272 | 266 | ||
@@ -287,8 +281,7 @@ in the ``patches/build`` directory of the ``yocto-4.12`` branch in the | |||
287 | ``yocto-kernel-cache`` Git repository. | 281 | ``yocto-kernel-cache`` Git repository. |
288 | 282 | ||
289 | The following listings show the ``build.scc`` file and part of the | 283 | The following listings show the ``build.scc`` file and part of the |
290 | ``modpost-mask-trivial-warnings.patch`` file: | 284 | ``modpost-mask-trivial-warnings.patch`` file:: |
291 | :: | ||
292 | 285 | ||
293 | patches/build/build.scc: | 286 | patches/build/build.scc: |
294 | patch arm-serialize-build-targets.patch | 287 | patch arm-serialize-build-targets.patch |
@@ -334,8 +327,7 @@ Features | |||
334 | 327 | ||
335 | Features are complex kernel Metadata types that consist of configuration | 328 | Features are complex kernel Metadata types that consist of configuration |
336 | fragments, patches, and possibly other feature description files. As an | 329 | fragments, patches, and possibly other feature description files. As an |
337 | example, consider the following generic listing: | 330 | example, consider the following generic listing:: |
338 | :: | ||
339 | 331 | ||
340 | features/myfeature.scc | 332 | features/myfeature.scc |
341 | define KFEATURE_DESCRIPTION "Enable myfeature" | 333 | define KFEATURE_DESCRIPTION "Enable myfeature" |
@@ -371,15 +363,13 @@ the ``linux-yocto_4.12.bb`` kernel recipe found in | |||
371 | ``poky/meta/recipes-kernel/linux``, a | 363 | ``poky/meta/recipes-kernel/linux``, a |
372 | :ref:`require <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`require\`\` directive>` directive | 364 | :ref:`require <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`require\`\` directive>` directive |
373 | includes the ``poky/meta/recipes-kernel/linux/linux-yocto.inc`` file, | 365 | includes the ``poky/meta/recipes-kernel/linux/linux-yocto.inc`` file, |
374 | which has the following statement that defines the default kernel type: | 366 | which has the following statement that defines the default kernel type:: |
375 | :: | ||
376 | 367 | ||
377 | LINUX_KERNEL_TYPE ??= "standard" | 368 | LINUX_KERNEL_TYPE ??= "standard" |
378 | 369 | ||
379 | Another example would be the real-time kernel (i.e. | 370 | Another example would be the real-time kernel (i.e. |
380 | ``linux-yocto-rt_4.12.bb``). This kernel recipe directly sets the kernel | 371 | ``linux-yocto-rt_4.12.bb``). This kernel recipe directly sets the kernel |
381 | type as follows: | 372 | type as follows:: |
382 | :: | ||
383 | 373 | ||
384 | LINUX_KERNEL_TYPE = "preempt-rt" | 374 | LINUX_KERNEL_TYPE = "preempt-rt" |
385 | 375 | ||
@@ -412,8 +402,7 @@ for Linux Yocto kernels: | |||
412 | For any given kernel type, the Metadata is defined by the ``.scc`` (e.g. | 402 | For any given kernel type, the Metadata is defined by the ``.scc`` (e.g. |
413 | ``standard.scc``). Here is a partial listing for the ``standard.scc`` | 403 | ``standard.scc``). Here is a partial listing for the ``standard.scc`` |
414 | file, which is found in the ``ktypes/standard`` directory of the | 404 | file, which is found in the ``ktypes/standard`` directory of the |
415 | ``yocto-kernel-cache`` Git repository: | 405 | ``yocto-kernel-cache`` Git repository:: |
416 | :: | ||
417 | 406 | ||
418 | # Include this kernel type fragment to get the standard features and | 407 | # Include this kernel type fragment to get the standard features and |
419 | # configuration values. | 408 | # configuration values. |
@@ -482,15 +471,13 @@ Description Overview | |||
482 | For simplicity, consider the following root BSP layer description files | 471 | For simplicity, consider the following root BSP layer description files |
483 | for the BeagleBone board. These files employ both a structure and naming | 472 | for the BeagleBone board. These files employ both a structure and naming |
484 | convention for consistency. The naming convention for the file is as | 473 | convention for consistency. The naming convention for the file is as |
485 | follows: | 474 | follows:: |
486 | :: | ||
487 | 475 | ||
488 | bsp_root_name-kernel_type.scc | 476 | bsp_root_name-kernel_type.scc |
489 | 477 | ||
490 | Here are some example root layer | 478 | Here are some example root layer |
491 | BSP filenames for the BeagleBone Board BSP, which is supported by the | 479 | BSP filenames for the BeagleBone Board BSP, which is supported by the |
492 | Yocto Project: | 480 | Yocto Project:: |
493 | :: | ||
494 | 481 | ||
495 | beaglebone-standard.scc | 482 | beaglebone-standard.scc |
496 | beaglebone-preempt-rt.scc | 483 | beaglebone-preempt-rt.scc |
@@ -498,8 +485,7 @@ Yocto Project: | |||
498 | Each file uses the root name (i.e "beaglebone") BSP name followed by the | 485 | Each file uses the root name (i.e "beaglebone") BSP name followed by the |
499 | kernel type. | 486 | kernel type. |
500 | 487 | ||
501 | Examine the ``beaglebone-standard.scc`` file: | 488 | Examine the ``beaglebone-standard.scc`` file:: |
502 | :: | ||
503 | 489 | ||
504 | define KMACHINE beaglebone | 490 | define KMACHINE beaglebone |
505 | define KTYPE standard | 491 | define KTYPE standard |
@@ -533,8 +519,7 @@ description file match. | |||
533 | 519 | ||
534 | To separate your kernel policy from your hardware configuration, you | 520 | To separate your kernel policy from your hardware configuration, you |
535 | include a kernel type (``ktype``), such as "standard". In the previous | 521 | include a kernel type (``ktype``), such as "standard". In the previous |
536 | example, this is done using the following: | 522 | example, this is done using the following:: |
537 | :: | ||
538 | 523 | ||
539 | include ktypes/standard/standard.scc | 524 | include ktypes/standard/standard.scc |
540 | 525 | ||
@@ -544,13 +529,11 @@ policy. See the ":ref:`kernel-dev/advanced:kernel types`" section for more | |||
544 | information. | 529 | information. |
545 | 530 | ||
546 | To aggregate common configurations and features specific to the kernel | 531 | To aggregate common configurations and features specific to the kernel |
547 | for `mybsp`, use the following: | 532 | for `mybsp`, use the following:: |
548 | :: | ||
549 | 533 | ||
550 | include mybsp.scc | 534 | include mybsp.scc |
551 | 535 | ||
552 | You can see that in the BeagleBone example with the following: | 536 | You can see that in the BeagleBone example with the following:: |
553 | :: | ||
554 | 537 | ||
555 | include beaglebone.scc | 538 | include beaglebone.scc |
556 | 539 | ||
@@ -558,15 +541,13 @@ For information on how to break a complete ``.config`` file into the various | |||
558 | configuration fragments, see the ":ref:`kernel-dev/common:creating configuration fragments`" section. | 541 | configuration fragments, see the ":ref:`kernel-dev/common:creating configuration fragments`" section. |
559 | 542 | ||
560 | Finally, if you have any configurations specific to the hardware that | 543 | Finally, if you have any configurations specific to the hardware that |
561 | are not in a ``*.scc`` file, you can include them as follows: | 544 | are not in a ``*.scc`` file, you can include them as follows:: |
562 | :: | ||
563 | 545 | ||
564 | kconf hardware mybsp-extra.cfg | 546 | kconf hardware mybsp-extra.cfg |
565 | 547 | ||
566 | The BeagleBone example does not include these | 548 | The BeagleBone example does not include these |
567 | types of configurations. However, the Malta 32-bit board does | 549 | types of configurations. However, the Malta 32-bit board does |
568 | ("mti-malta32"). Here is the ``mti-malta32-le-standard.scc`` file: | 550 | ("mti-malta32"). Here is the ``mti-malta32-le-standard.scc`` file:: |
569 | :: | ||
570 | 551 | ||
571 | define KMACHINE mti-malta32-le | 552 | define KMACHINE mti-malta32-le |
572 | define KMACHINE qemumipsel | 553 | define KMACHINE qemumipsel |
@@ -623,8 +604,7 @@ found on the machine. This ``minnow.scc`` description file is then | |||
623 | included in each of the three "minnow" description files for the | 604 | included in each of the three "minnow" description files for the |
624 | supported kernel types (i.e. "standard", "preempt-rt", and "tiny"). | 605 | supported kernel types (i.e. "standard", "preempt-rt", and "tiny"). |
625 | Consider the "minnow" description for the "standard" kernel type (i.e. | 606 | Consider the "minnow" description for the "standard" kernel type (i.e. |
626 | ``minnow-standard.scc``): | 607 | ``minnow-standard.scc``):: |
627 | :: | ||
628 | 608 | ||
629 | define KMACHINE minnow | 609 | define KMACHINE minnow |
630 | define KTYPE standard | 610 | define KTYPE standard |
@@ -656,8 +636,7 @@ that defines all enabled hardware for the BSP that is common to all | |||
656 | kernel types. Using this command significantly reduces duplication. | 636 | kernel types. Using this command significantly reduces duplication. |
657 | 637 | ||
658 | Now consider the "minnow" description for the "tiny" kernel type (i.e. | 638 | Now consider the "minnow" description for the "tiny" kernel type (i.e. |
659 | ``minnow-tiny.scc``): | 639 | ``minnow-tiny.scc``):: |
660 | :: | ||
661 | 640 | ||
662 | define KMACHINE minnow | 641 | define KMACHINE minnow |
663 | define KTYPE tiny | 642 | define KTYPE tiny |
@@ -720,8 +699,7 @@ See the ":ref:`kernel-dev/common:modifying an existing recipe`" | |||
720 | section for more information. | 699 | section for more information. |
721 | 700 | ||
722 | Here is an example that shows a trivial tree of kernel Metadata stored | 701 | Here is an example that shows a trivial tree of kernel Metadata stored |
723 | in recipe-space within a BSP layer: | 702 | in recipe-space within a BSP layer:: |
724 | :: | ||
725 | 703 | ||
726 | meta-my_bsp_layer/ | 704 | meta-my_bsp_layer/ |
727 | `-- recipes-kernel | 705 | `-- recipes-kernel |
@@ -744,8 +722,7 @@ value when changing the content of files not explicitly listed in the | |||
744 | 722 | ||
745 | If the BSP description is in recipe space, you cannot simply list the | 723 | If the BSP description is in recipe space, you cannot simply list the |
746 | ``*.scc`` in the ``SRC_URI`` statement. You need to use the following | 724 | ``*.scc`` in the ``SRC_URI`` statement. You need to use the following |
747 | form from your kernel append file: | 725 | form from your kernel append file:: |
748 | :: | ||
749 | 726 | ||
750 | SRC_URI_append_myplatform = " \ | 727 | SRC_URI_append_myplatform = " \ |
751 | file://myplatform;type=kmeta;destsuffix=myplatform \ | 728 | file://myplatform;type=kmeta;destsuffix=myplatform \ |
@@ -759,8 +736,7 @@ reside in a separate repository. The OpenEmbedded build system adds the | |||
759 | Metadata to the build as a "type=kmeta" repository through the | 736 | Metadata to the build as a "type=kmeta" repository through the |
760 | :term:`SRC_URI` variable. As an | 737 | :term:`SRC_URI` variable. As an |
761 | example, consider the following ``SRC_URI`` statement from the | 738 | example, consider the following ``SRC_URI`` statement from the |
762 | ``linux-yocto_4.12.bb`` kernel recipe: | 739 | ``linux-yocto_4.12.bb`` kernel recipe:: |
763 | :: | ||
764 | 740 | ||
765 | SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.12.git;name=machine;branch=${KBRANCH}; \ | 741 | SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.12.git;name=machine;branch=${KBRANCH}; \ |
766 | git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.12;destsuffix=${KMETA}" | 742 | git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.12;destsuffix=${KMETA}" |
@@ -844,14 +820,12 @@ patches into a feature. | |||
844 | 820 | ||
845 | Once you have a new branch, you can set up your kernel Metadata to use | 821 | Once you have a new branch, you can set up your kernel Metadata to use |
846 | the branch a couple different ways. In the recipe, you can specify the | 822 | the branch a couple different ways. In the recipe, you can specify the |
847 | new branch as the ``KBRANCH`` to use for the board as follows: | 823 | new branch as the ``KBRANCH`` to use for the board as follows:: |
848 | :: | ||
849 | 824 | ||
850 | KBRANCH = "mynewbranch" | 825 | KBRANCH = "mynewbranch" |
851 | 826 | ||
852 | Another method is to use the ``branch`` command in the BSP | 827 | Another method is to use the ``branch`` command in the BSP |
853 | description: | 828 | description:: |
854 | :: | ||
855 | 829 | ||
856 | mybsp.scc: | 830 | mybsp.scc: |
857 | define KMACHINE mybsp | 831 | define KMACHINE mybsp |
@@ -865,15 +839,13 @@ description: | |||
865 | 839 | ||
866 | If you find yourself with numerous branches, you might consider using a | 840 | If you find yourself with numerous branches, you might consider using a |
867 | hierarchical branching system similar to what the Yocto Linux Kernel Git | 841 | hierarchical branching system similar to what the Yocto Linux Kernel Git |
868 | repositories use: | 842 | repositories use:: |
869 | :: | ||
870 | 843 | ||
871 | common/kernel_type/machine | 844 | common/kernel_type/machine |
872 | 845 | ||
873 | If you had two kernel types, "standard" and "small" for instance, three | 846 | If you had two kernel types, "standard" and "small" for instance, three |
874 | machines, and common as ``mydir``, the branches in your Git repository | 847 | machines, and common as ``mydir``, the branches in your Git repository |
875 | might look like this: | 848 | might look like this:: |
876 | :: | ||
877 | 849 | ||
878 | mydir/base | 850 | mydir/base |
879 | mydir/standard/base | 851 | mydir/standard/base |
@@ -905,8 +877,7 @@ that have to be regularly updated. The Yocto Project Linux kernel tools | |||
905 | provide for this with the ``git merge`` command. | 877 | provide for this with the ``git merge`` command. |
906 | 878 | ||
907 | To merge a feature branch into a BSP, insert the ``git merge`` command | 879 | To merge a feature branch into a BSP, insert the ``git merge`` command |
908 | after any ``branch`` commands: | 880 | after any ``branch`` commands:: |
909 | :: | ||
910 | 881 | ||
911 | mybsp.scc: | 882 | mybsp.scc: |
912 | define KMACHINE mybsp | 883 | define KMACHINE mybsp |
diff --git a/documentation/kernel-dev/common.rst b/documentation/kernel-dev/common.rst index 56217b9d38..3f35d8412f 100644 --- a/documentation/kernel-dev/common.rst +++ b/documentation/kernel-dev/common.rst | |||
@@ -54,8 +54,7 @@ section: | |||
54 | 54 | ||
55 | 1. *Initialize the BitBake Environment:* Before building an extensible | 55 | 1. *Initialize the BitBake Environment:* Before building an extensible |
56 | SDK, you need to initialize the BitBake build environment by sourcing | 56 | SDK, you need to initialize the BitBake build environment by sourcing |
57 | the build environment script (i.e. :ref:`structure-core-script`): | 57 | the build environment script (i.e. :ref:`structure-core-script`):: |
58 | :: | ||
59 | 58 | ||
60 | $ cd poky | 59 | $ cd poky |
61 | $ source oe-init-build-env | 60 | $ source oe-init-build-env |
@@ -83,16 +82,14 @@ section: | |||
83 | 82 | ||
84 | In this example we wish to build for qemux86 so we must set the | 83 | In this example we wish to build for qemux86 so we must set the |
85 | ``MACHINE`` variable to "qemux86" and also add the "kernel-modules". | 84 | ``MACHINE`` variable to "qemux86" and also add the "kernel-modules". |
86 | As described we do this by appending to ``conf/local.conf``: | 85 | As described we do this by appending to ``conf/local.conf``:: |
87 | :: | ||
88 | 86 | ||
89 | MACHINE = "qemux86" | 87 | MACHINE = "qemux86" |
90 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules" | 88 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules" |
91 | 89 | ||
92 | 3. *Create a Layer for Patches:* You need to create a layer to hold | 90 | 3. *Create a Layer for Patches:* You need to create a layer to hold |
93 | patches created for the kernel image. You can use the | 91 | patches created for the kernel image. You can use the |
94 | ``bitbake-layers create-layer`` command as follows: | 92 | ``bitbake-layers create-layer`` command as follows:: |
95 | :: | ||
96 | 93 | ||
97 | $ cd poky/build | 94 | $ cd poky/build |
98 | $ bitbake-layers create-layer ../../meta-mylayer | 95 | $ bitbake-layers create-layer ../../meta-mylayer |
@@ -116,8 +113,7 @@ section: | |||
116 | 4. *Inform the BitBake Build Environment About Your Layer:* As directed | 113 | 4. *Inform the BitBake Build Environment About Your Layer:* As directed |
117 | when you created your layer, you need to add the layer to the | 114 | when you created your layer, you need to add the layer to the |
118 | :term:`BBLAYERS` variable in the | 115 | :term:`BBLAYERS` variable in the |
119 | ``bblayers.conf`` file as follows: | 116 | ``bblayers.conf`` file as follows:: |
120 | :: | ||
121 | 117 | ||
122 | $ cd poky/build | 118 | $ cd poky/build |
123 | $ bitbake-layers add-layer ../../meta-mylayer | 119 | $ bitbake-layers add-layer ../../meta-mylayer |
@@ -125,16 +121,14 @@ section: | |||
125 | $ | 121 | $ |
126 | 122 | ||
127 | 5. *Build the Extensible SDK:* Use BitBake to build the extensible SDK | 123 | 5. *Build the Extensible SDK:* Use BitBake to build the extensible SDK |
128 | specifically for use with images to be run using QEMU: | 124 | specifically for use with images to be run using QEMU:: |
129 | :: | ||
130 | 125 | ||
131 | $ cd poky/build | 126 | $ cd poky/build |
132 | $ bitbake core-image-minimal -c populate_sdk_ext | 127 | $ bitbake core-image-minimal -c populate_sdk_ext |
133 | 128 | ||
134 | Once | 129 | Once |
135 | the build finishes, you can find the SDK installer file (i.e. | 130 | the build finishes, you can find the SDK installer file (i.e. |
136 | ``*.sh`` file) in the following directory: | 131 | ``*.sh`` file) in the following directory:: |
137 | :: | ||
138 | 132 | ||
139 | poky/build/tmp/deploy/sdk | 133 | poky/build/tmp/deploy/sdk |
140 | 134 | ||
@@ -143,8 +137,7 @@ section: | |||
143 | 137 | ||
144 | 6. *Install the Extensible SDK:* Use the following command to install | 138 | 6. *Install the Extensible SDK:* Use the following command to install |
145 | the SDK. For this example, install the SDK in the default | 139 | the SDK. For this example, install the SDK in the default |
146 | ``poky_sdk`` directory: | 140 | ``poky_sdk`` directory:: |
147 | :: | ||
148 | 141 | ||
149 | $ cd poky/build/tmp/deploy/sdk | 142 | $ cd poky/build/tmp/deploy/sdk |
150 | $ ./poky-glibc-x86_64-core-image-minimal-i586-toolchain-ext-&DISTRO;.sh | 143 | $ ./poky-glibc-x86_64-core-image-minimal-i586-toolchain-ext-&DISTRO;.sh |
@@ -172,8 +165,7 @@ section: | |||
172 | BitBake shell used to build the installer. | 165 | BitBake shell used to build the installer. |
173 | 166 | ||
174 | After opening a new shell, run the SDK environment setup script as | 167 | After opening a new shell, run the SDK environment setup script as |
175 | directed by the output from installing the SDK: | 168 | directed by the output from installing the SDK:: |
176 | :: | ||
177 | 169 | ||
178 | $ source poky_sdk/environment-setup-i586-poky-linux | 170 | $ source poky_sdk/environment-setup-i586-poky-linux |
179 | "SDK environment now set up; additionally you may now run devtool to perform development tasks. | 171 | "SDK environment now set up; additionally you may now run devtool to perform development tasks. |
@@ -186,8 +178,7 @@ section: | |||
186 | 178 | ||
187 | 8. *Build the Clean Image:* The final step in preparing to work on the | 179 | 8. *Build the Clean Image:* The final step in preparing to work on the |
188 | kernel is to build an initial image using ``devtool`` in the new | 180 | kernel is to build an initial image using ``devtool`` in the new |
189 | terminal you just set up and initialized for SDK work: | 181 | terminal you just set up and initialized for SDK work:: |
190 | :: | ||
191 | 182 | ||
192 | $ devtool build-image | 183 | $ devtool build-image |
193 | Parsing recipes: 100% |##########################################| Time: 0:00:05 | 184 | Parsing recipes: 100% |##########################################| Time: 0:00:05 |
@@ -269,16 +260,14 @@ section: | |||
269 | 260 | ||
270 | In this example we wish to build for qemux86 so we must set the | 261 | In this example we wish to build for qemux86 so we must set the |
271 | ``MACHINE`` variable to "qemux86" and also add the "kernel-modules". | 262 | ``MACHINE`` variable to "qemux86" and also add the "kernel-modules". |
272 | As described we do this by appending to ``conf/local.conf``: | 263 | As described we do this by appending to ``conf/local.conf``:: |
273 | :: | ||
274 | 264 | ||
275 | MACHINE = "qemux86" | 265 | MACHINE = "qemux86" |
276 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules" | 266 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules" |
277 | 267 | ||
278 | 3. *Create a Layer for Patches:* You need to create a layer to hold | 268 | 3. *Create a Layer for Patches:* You need to create a layer to hold |
279 | patches created for the kernel image. You can use the | 269 | patches created for the kernel image. You can use the |
280 | ``bitbake-layers create-layer`` command as follows: | 270 | ``bitbake-layers create-layer`` command as follows:: |
281 | :: | ||
282 | 271 | ||
283 | $ cd poky/build | 272 | $ cd poky/build |
284 | $ bitbake-layers create-layer ../../meta-mylayer | 273 | $ bitbake-layers create-layer ../../meta-mylayer |
@@ -301,8 +290,7 @@ section: | |||
301 | 4. *Inform the BitBake Build Environment About Your Layer:* As directed | 290 | 4. *Inform the BitBake Build Environment About Your Layer:* As directed |
302 | when you created your layer, you need to add the layer to the | 291 | when you created your layer, you need to add the layer to the |
303 | :term:`BBLAYERS` variable in the | 292 | :term:`BBLAYERS` variable in the |
304 | ``bblayers.conf`` file as follows: | 293 | ``bblayers.conf`` file as follows:: |
305 | :: | ||
306 | 294 | ||
307 | $ cd poky/build | 295 | $ cd poky/build |
308 | $ bitbake-layers add-layer ../../meta-mylayer | 296 | $ bitbake-layers add-layer ../../meta-mylayer |
@@ -350,8 +338,7 @@ section: | |||
350 | the ``yocto-4.12`` branch. | 338 | the ``yocto-4.12`` branch. |
351 | 339 | ||
352 | The following commands show how to create a local copy of the | 340 | The following commands show how to create a local copy of the |
353 | ``yocto-kernel-cache`` and be in the ``yocto-4.12`` branch: | 341 | ``yocto-kernel-cache`` and be in the ``yocto-4.12`` branch:: |
354 | :: | ||
355 | 342 | ||
356 | $ cd ~ | 343 | $ cd ~ |
357 | $ git clone git://git.yoctoproject.org/yocto-kernel-cache --branch yocto-4.12 | 344 | $ git clone git://git.yoctoproject.org/yocto-kernel-cache --branch yocto-4.12 |
@@ -394,8 +381,7 @@ following section describes how to create a layer without the aid of | |||
394 | tools. These steps assume creation of a layer named ``mylayer`` in your | 381 | tools. These steps assume creation of a layer named ``mylayer`` in your |
395 | home directory: | 382 | home directory: |
396 | 383 | ||
397 | 1. *Create Structure*: Create the layer's structure: | 384 | 1. *Create Structure*: Create the layer's structure:: |
398 | :: | ||
399 | 385 | ||
400 | $ mkdir meta-mylayer | 386 | $ mkdir meta-mylayer |
401 | $ mkdir meta-mylayer/conf | 387 | $ mkdir meta-mylayer/conf |
@@ -409,8 +395,7 @@ home directory: | |||
409 | 395 | ||
410 | 2. *Create the Layer Configuration File*: Move to the | 396 | 2. *Create the Layer Configuration File*: Move to the |
411 | ``meta-mylayer/conf`` directory and create the ``layer.conf`` file as | 397 | ``meta-mylayer/conf`` directory and create the ``layer.conf`` file as |
412 | follows: | 398 | follows:: |
413 | :: | ||
414 | 399 | ||
415 | # We have a conf and classes directory, add to BBPATH | 400 | # We have a conf and classes directory, add to BBPATH |
416 | BBPATH .= ":${LAYERDIR}" | 401 | BBPATH .= ":${LAYERDIR}" |
@@ -429,8 +414,7 @@ home directory: | |||
429 | ``meta-mylayer/recipes-kernel/linux`` directory and create the | 414 | ``meta-mylayer/recipes-kernel/linux`` directory and create the |
430 | kernel's append file. This example uses the ``linux-yocto-4.12`` | 415 | kernel's append file. This example uses the ``linux-yocto-4.12`` |
431 | kernel. Thus, the name of the append file is | 416 | kernel. Thus, the name of the append file is |
432 | ``linux-yocto_4.12.bbappend``: | 417 | ``linux-yocto_4.12.bbappend``:: |
433 | :: | ||
434 | 418 | ||
435 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 419 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
436 | 420 | ||
@@ -483,8 +467,7 @@ The append file should initially extend the | |||
483 | :term:`FILESPATH` search path by | 467 | :term:`FILESPATH` search path by |
484 | prepending the directory that contains your files to the | 468 | prepending the directory that contains your files to the |
485 | :term:`FILESEXTRAPATHS` | 469 | :term:`FILESEXTRAPATHS` |
486 | variable as follows: | 470 | variable as follows:: |
487 | :: | ||
488 | 471 | ||
489 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 472 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
490 | 473 | ||
@@ -492,8 +475,7 @@ The path ``${``\ :term:`THISDIR`\ ``}/${``\ :term:`PN`\ ``}`` | |||
492 | expands to "linux-yocto" in the current directory for this example. If | 475 | expands to "linux-yocto" in the current directory for this example. If |
493 | you add any new files that modify the kernel recipe and you have | 476 | you add any new files that modify the kernel recipe and you have |
494 | extended ``FILESPATH`` as described above, you must place the files in | 477 | extended ``FILESPATH`` as described above, you must place the files in |
495 | your layer in the following area: | 478 | your layer in the following area:: |
496 | :: | ||
497 | 479 | ||
498 | your-layer/recipes-kernel/linux/linux-yocto/ | 480 | your-layer/recipes-kernel/linux/linux-yocto/ |
499 | 481 | ||
@@ -582,8 +564,7 @@ To group related configurations into multiple files, you perform a | |||
582 | similar procedure. Here is an example that groups separate | 564 | similar procedure. Here is an example that groups separate |
583 | configurations specifically for Ethernet and graphics into their own | 565 | configurations specifically for Ethernet and graphics into their own |
584 | files and adds the configurations by using a ``SRC_URI`` statement like | 566 | files and adds the configurations by using a ``SRC_URI`` statement like |
585 | the following in your append file: | 567 | the following in your append file:: |
586 | :: | ||
587 | 568 | ||
588 | SRC_URI += "file://myconfig.cfg \ | 569 | SRC_URI += "file://myconfig.cfg \ |
589 | file://eth.cfg \ | 570 | file://eth.cfg \ |
@@ -627,8 +608,7 @@ reference them in :term:`SRC_URI` | |||
627 | statements. | 608 | statements. |
628 | 609 | ||
629 | For example, you can apply a three-patch series by adding the following | 610 | For example, you can apply a three-patch series by adding the following |
630 | lines to your linux-yocto ``.bbappend`` file in your layer: | 611 | lines to your linux-yocto ``.bbappend`` file in your layer:: |
631 | :: | ||
632 | 612 | ||
633 | SRC_URI += "file://0001-first-change.patch" | 613 | SRC_URI += "file://0001-first-change.patch" |
634 | SRC_URI += "file://0002-second-change.patch" | 614 | SRC_URI += "file://0002-second-change.patch" |
@@ -658,8 +638,7 @@ If you have a complete, working Linux kernel ``.config`` file you want | |||
658 | to use for the configuration, as before, copy that file to the | 638 | to use for the configuration, as before, copy that file to the |
659 | appropriate ``${PN}`` directory in your layer's ``recipes-kernel/linux`` | 639 | appropriate ``${PN}`` directory in your layer's ``recipes-kernel/linux`` |
660 | directory, and rename the copied file to "defconfig". Then, add the | 640 | directory, and rename the copied file to "defconfig". Then, add the |
661 | following lines to the linux-yocto ``.bbappend`` file in your layer: | 641 | following lines to the linux-yocto ``.bbappend`` file in your layer:: |
662 | :: | ||
663 | 642 | ||
664 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 643 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
665 | SRC_URI += "file://defconfig" | 644 | SRC_URI += "file://defconfig" |
@@ -685,8 +664,7 @@ Generally speaking, the preferred approach is to determine the | |||
685 | incremental change you want to make and add that as a configuration | 664 | incremental change you want to make and add that as a configuration |
686 | fragment. For example, if you want to add support for a basic serial | 665 | fragment. For example, if you want to add support for a basic serial |
687 | console, create a file named ``8250.cfg`` in the ``${PN}`` directory | 666 | console, create a file named ``8250.cfg`` in the ``${PN}`` directory |
688 | with the following content (without indentation): | 667 | with the following content (without indentation):: |
689 | :: | ||
690 | 668 | ||
691 | CONFIG_SERIAL_8250=y | 669 | CONFIG_SERIAL_8250=y |
692 | CONFIG_SERIAL_8250_CONSOLE=y | 670 | CONFIG_SERIAL_8250_CONSOLE=y |
@@ -698,8 +676,7 @@ with the following content (without indentation): | |||
698 | 676 | ||
699 | Next, include this | 677 | Next, include this |
700 | configuration fragment and extend the ``FILESPATH`` variable in your | 678 | configuration fragment and extend the ``FILESPATH`` variable in your |
701 | ``.bbappend`` file: | 679 | ``.bbappend`` file:: |
702 | :: | ||
703 | 680 | ||
704 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 681 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
705 | SRC_URI += "file://8250.cfg" | 682 | SRC_URI += "file://8250.cfg" |
@@ -718,8 +695,7 @@ It might be desirable to have kernel configuration fragment support | |||
718 | through a ``defconfig`` file that is pulled from the kernel source tree | 695 | through a ``defconfig`` file that is pulled from the kernel source tree |
719 | for the configured machine. By default, the OpenEmbedded build system | 696 | for the configured machine. By default, the OpenEmbedded build system |
720 | looks for ``defconfig`` files in the layer used for Metadata, which is | 697 | looks for ``defconfig`` files in the layer used for Metadata, which is |
721 | "out-of-tree", and then configures them using the following: | 698 | "out-of-tree", and then configures them using the following:: |
722 | :: | ||
723 | 699 | ||
724 | SRC_URI += "file://defconfig" | 700 | SRC_URI += "file://defconfig" |
725 | 701 | ||
@@ -732,16 +708,14 @@ append files, you can direct the OpenEmbedded build system to use a | |||
732 | ``defconfig`` file that is "in-tree". | 708 | ``defconfig`` file that is "in-tree". |
733 | 709 | ||
734 | To specify an "in-tree" ``defconfig`` file, use the following statement | 710 | To specify an "in-tree" ``defconfig`` file, use the following statement |
735 | form: | 711 | form:: |
736 | :: | ||
737 | 712 | ||
738 | KBUILD_DEFCONFIG_KMACHINE ?= "defconfig_file" | 713 | KBUILD_DEFCONFIG_KMACHINE ?= "defconfig_file" |
739 | 714 | ||
740 | Here is an example | 715 | Here is an example |
741 | that assigns the ``KBUILD_DEFCONFIG`` variable based on "raspberrypi2" | 716 | that assigns the ``KBUILD_DEFCONFIG`` variable based on "raspberrypi2" |
742 | and provides the path to the "in-tree" ``defconfig`` file to be used for | 717 | and provides the path to the "in-tree" ``defconfig`` file to be used for |
743 | a Raspberry Pi 2, which is based on the Broadcom 2708/2709 chipset: | 718 | a Raspberry Pi 2, which is based on the Broadcom 2708/2709 chipset:: |
744 | :: | ||
745 | 719 | ||
746 | KBUILD_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig" | 720 | KBUILD_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig" |
747 | 721 | ||
@@ -792,8 +766,7 @@ the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Se | |||
792 | ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" | 766 | ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" |
793 | section for more information. | 767 | section for more information. |
794 | 768 | ||
795 | Use the following ``devtool`` command to check out the code: | 769 | Use the following ``devtool`` command to check out the code:: |
796 | :: | ||
797 | 770 | ||
798 | $ devtool modify linux-yocto | 771 | $ devtool modify linux-yocto |
799 | 772 | ||
@@ -819,14 +792,12 @@ the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Se | |||
819 | noted where you can find the source files (e.g. | 792 | noted where you can find the source files (e.g. |
820 | ``poky_sdk/workspace/sources/linux-yocto``). Change to where the | 793 | ``poky_sdk/workspace/sources/linux-yocto``). Change to where the |
821 | kernel source code is before making your edits to the | 794 | kernel source code is before making your edits to the |
822 | ``calibrate.c`` file: | 795 | ``calibrate.c`` file:: |
823 | :: | ||
824 | 796 | ||
825 | $ cd poky_sdk/workspace/sources/linux-yocto | 797 | $ cd poky_sdk/workspace/sources/linux-yocto |
826 | 798 | ||
827 | 2. *Edit the source file*: Edit the ``init/calibrate.c`` file to have | 799 | 2. *Edit the source file*: Edit the ``init/calibrate.c`` file to have |
828 | the following changes: | 800 | the following changes:: |
829 | :: | ||
830 | 801 | ||
831 | void calibrate_delay(void) | 802 | void calibrate_delay(void) |
832 | { | 803 | { |
@@ -846,8 +817,7 @@ the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Se | |||
846 | . | 817 | . |
847 | 818 | ||
848 | 3. *Build the Updated Kernel Source:* To build the updated kernel | 819 | 3. *Build the Updated Kernel Source:* To build the updated kernel |
849 | source, use ``devtool``: | 820 | source, use ``devtool``:: |
850 | :: | ||
851 | 821 | ||
852 | $ devtool build linux-yocto | 822 | $ devtool build linux-yocto |
853 | 823 | ||
@@ -872,8 +842,7 @@ the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Se | |||
872 | using QEMU to verify your changes: | 842 | using QEMU to verify your changes: |
873 | 843 | ||
874 | 1. *Boot the image*: Boot the modified image in the QEMU emulator | 844 | 1. *Boot the image*: Boot the modified image in the QEMU emulator |
875 | using this command: | 845 | using this command:: |
876 | :: | ||
877 | 846 | ||
878 | $ runqemu qemux86 | 847 | $ runqemu qemux86 |
879 | 848 | ||
@@ -891,8 +860,7 @@ the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Se | |||
891 | 860 | ||
892 | 6. *Stage and commit your changes*: Within your eSDK terminal, change | 861 | 6. *Stage and commit your changes*: Within your eSDK terminal, change |
893 | your working directory to where you modified the ``calibrate.c`` file | 862 | your working directory to where you modified the ``calibrate.c`` file |
894 | and use these Git commands to stage and commit your changes: | 863 | and use these Git commands to stage and commit your changes:: |
895 | :: | ||
896 | 864 | ||
897 | $ cd poky_sdk/workspace/sources/linux-yocto | 865 | $ cd poky_sdk/workspace/sources/linux-yocto |
898 | $ git status | 866 | $ git status |
@@ -921,8 +889,7 @@ the ":ref:`kernel-dev/common:getting ready to develop using \`\`devtool\`\``" Se | |||
921 | image that includes your kernel patches. Execute the following | 889 | image that includes your kernel patches. Execute the following |
922 | command from your | 890 | command from your |
923 | :term:`Build Directory` in the terminal | 891 | :term:`Build Directory` in the terminal |
924 | set up to run BitBake: | 892 | set up to run BitBake:: |
925 | :: | ||
926 | 893 | ||
927 | $ cd poky/build | 894 | $ cd poky/build |
928 | $ bitbake core-image-minimal | 895 | $ bitbake core-image-minimal |
@@ -966,14 +933,12 @@ Section. | |||
966 | 1. *Change the working directory*: You need to locate the source | 933 | 1. *Change the working directory*: You need to locate the source |
967 | files in the local copy of the kernel Git repository. Change to | 934 | files in the local copy of the kernel Git repository. Change to |
968 | where the kernel source code is before making your edits to the | 935 | where the kernel source code is before making your edits to the |
969 | ``calibrate.c`` file: | 936 | ``calibrate.c`` file:: |
970 | :: | ||
971 | 937 | ||
972 | $ cd ~/linux-yocto-4.12/init | 938 | $ cd ~/linux-yocto-4.12/init |
973 | 939 | ||
974 | 2. *Edit the source file*: Edit the ``calibrate.c`` file to have the | 940 | 2. *Edit the source file*: Edit the ``calibrate.c`` file to have the |
975 | following changes: | 941 | following changes:: |
976 | :: | ||
977 | 942 | ||
978 | void calibrate_delay(void) | 943 | void calibrate_delay(void) |
979 | { | 944 | { |
@@ -993,8 +958,7 @@ Section. | |||
993 | . | 958 | . |
994 | 959 | ||
995 | 2. *Stage and Commit Your Changes:* Use standard Git commands to stage | 960 | 2. *Stage and Commit Your Changes:* Use standard Git commands to stage |
996 | and commit the changes you just made: | 961 | and commit the changes you just made:: |
997 | :: | ||
998 | 962 | ||
999 | $ git add calibrate.c | 963 | $ git add calibrate.c |
1000 | $ git commit -m "calibrate.c - Added some printk statements" | 964 | $ git commit -m "calibrate.c - Added some printk statements" |
@@ -1009,13 +973,11 @@ Section. | |||
1009 | updated kernel source files. Add | 973 | updated kernel source files. Add |
1010 | :term:`SRC_URI` and | 974 | :term:`SRC_URI` and |
1011 | :term:`SRCREV` statements similar | 975 | :term:`SRCREV` statements similar |
1012 | to the following to your ``local.conf``: | 976 | to the following to your ``local.conf``:: |
1013 | :: | ||
1014 | 977 | ||
1015 | $ cd poky/build/conf | 978 | $ cd poky/build/conf |
1016 | 979 | ||
1017 | Add the following to the ``local.conf``: | 980 | Add the following to the ``local.conf``:: |
1018 | :: | ||
1019 | 981 | ||
1020 | SRC_URI_pn-linux-yocto = "git:///path-to/linux-yocto-4.12;protocol=file;name=machine;branch=standard/base; \ | 982 | SRC_URI_pn-linux-yocto = "git:///path-to/linux-yocto-4.12;protocol=file;name=machine;branch=standard/base; \ |
1021 | git:///path-to/yocto-kernel-cache;protocol=file;type=kmeta;name=meta;branch=yocto-4.12;destsuffix=${KMETA}" | 983 | git:///path-to/yocto-kernel-cache;protocol=file;type=kmeta;name=meta;branch=yocto-4.12;destsuffix=${KMETA}" |
@@ -1031,16 +993,14 @@ Section. | |||
1031 | 993 | ||
1032 | 4. *Build the Image:* With the source modified, your changes staged and | 994 | 4. *Build the Image:* With the source modified, your changes staged and |
1033 | committed, and the ``local.conf`` file pointing to the kernel files, | 995 | committed, and the ``local.conf`` file pointing to the kernel files, |
1034 | you can now use BitBake to build the image: | 996 | you can now use BitBake to build the image:: |
1035 | :: | ||
1036 | 997 | ||
1037 | $ cd poky/build | 998 | $ cd poky/build |
1038 | $ bitbake core-image-minimal | 999 | $ bitbake core-image-minimal |
1039 | 1000 | ||
1040 | 5. *Boot the image*: Boot the modified image in the QEMU emulator using | 1001 | 5. *Boot the image*: Boot the modified image in the QEMU emulator using |
1041 | this command. When prompted to login to the QEMU console, use "root" | 1002 | this command. When prompted to login to the QEMU console, use "root" |
1042 | with no password: | 1003 | with no password:: |
1043 | :: | ||
1044 | 1004 | ||
1045 | $ cd poky/build | 1005 | $ cd poky/build |
1046 | $ runqemu qemux86 | 1006 | $ runqemu qemux86 |
@@ -1059,8 +1019,7 @@ Section. | |||
1059 | 1019 | ||
1060 | 7. *Generate the Patch File:* Once you are sure that your patch works | 1020 | 7. *Generate the Patch File:* Once you are sure that your patch works |
1061 | correctly, you can generate a ``*.patch`` file in the kernel source | 1021 | correctly, you can generate a ``*.patch`` file in the kernel source |
1062 | repository: | 1022 | repository:: |
1063 | :: | ||
1064 | 1023 | ||
1065 | $ cd ~/linux-yocto-4.12/init | 1024 | $ cd ~/linux-yocto-4.12/init |
1066 | $ git format-patch -1 | 1025 | $ git format-patch -1 |
@@ -1073,8 +1032,7 @@ Section. | |||
1073 | ``meta-mylayer``. When the layer was created using the | 1032 | ``meta-mylayer``. When the layer was created using the |
1074 | ``yocto-create`` script, no additional hierarchy was created to | 1033 | ``yocto-create`` script, no additional hierarchy was created to |
1075 | support patches. Before moving the patch file, you need to add | 1034 | support patches. Before moving the patch file, you need to add |
1076 | additional structure to your layer using the following commands: | 1035 | additional structure to your layer using the following commands:: |
1077 | :: | ||
1078 | 1036 | ||
1079 | $ cd ~/meta-mylayer | 1037 | $ cd ~/meta-mylayer |
1080 | $ mkdir recipes-kernel | 1038 | $ mkdir recipes-kernel |
@@ -1083,8 +1041,7 @@ Section. | |||
1083 | 1041 | ||
1084 | Once you have created this | 1042 | Once you have created this |
1085 | hierarchy in your layer, you can move the patch file using the | 1043 | hierarchy in your layer, you can move the patch file using the |
1086 | following command: | 1044 | following command:: |
1087 | :: | ||
1088 | 1045 | ||
1089 | $ mv ~/linux-yocto-4.12/init/0001-calibrate.c-Added-some-printk-statements.patch ~/meta-mylayer/recipes-kernel/linux/linux-yocto | 1046 | $ mv ~/linux-yocto-4.12/init/0001-calibrate.c-Added-some-printk-statements.patch ~/meta-mylayer/recipes-kernel/linux/linux-yocto |
1090 | 1047 | ||
@@ -1093,8 +1050,7 @@ Section. | |||
1093 | the OpenEmbedded build system to find the patch. The append file | 1050 | the OpenEmbedded build system to find the patch. The append file |
1094 | needs to be in your layer's ``recipes-kernel/linux`` directory and it | 1051 | needs to be in your layer's ``recipes-kernel/linux`` directory and it |
1095 | must be named ``linux-yocto_4.12.bbappend`` and have the following | 1052 | must be named ``linux-yocto_4.12.bbappend`` and have the following |
1096 | contents: | 1053 | contents:: |
1097 | :: | ||
1098 | 1054 | ||
1099 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 1055 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
1100 | SRC_URI_append = "file://0001-calibrate.c-Added-some-printk-statements.patch" | 1056 | SRC_URI_append = "file://0001-calibrate.c-Added-some-printk-statements.patch" |
@@ -1113,8 +1069,7 @@ Section. | |||
1113 | To build ``core-image-minimal`` again and see the effects of your patch, | 1069 | To build ``core-image-minimal`` again and see the effects of your patch, |
1114 | you can essentially eliminate the temporary source files saved in | 1070 | you can essentially eliminate the temporary source files saved in |
1115 | ``poky/build/tmp/work/...`` and residual effects of the build by entering | 1071 | ``poky/build/tmp/work/...`` and residual effects of the build by entering |
1116 | the following sequence of commands: | 1072 | the following sequence of commands:: |
1117 | :: | ||
1118 | 1073 | ||
1119 | $ cd poky/build | 1074 | $ cd poky/build |
1120 | $ bitbake -c cleanall yocto-linux | 1075 | $ bitbake -c cleanall yocto-linux |
@@ -1160,8 +1115,7 @@ environment, you must do the following: | |||
1160 | - You must be sure of the state of your build's configuration in the | 1115 | - You must be sure of the state of your build's configuration in the |
1161 | :term:`Source Directory`. | 1116 | :term:`Source Directory`. |
1162 | 1117 | ||
1163 | - Your build host must have the following two packages installed: | 1118 | - Your build host must have the following two packages installed:: |
1164 | :: | ||
1165 | 1119 | ||
1166 | libncurses5-dev | 1120 | libncurses5-dev |
1167 | libtinfo-dev | 1121 | libtinfo-dev |
@@ -1169,8 +1123,7 @@ environment, you must do the following: | |||
1169 | The following commands initialize the BitBake environment, run the | 1123 | The following commands initialize the BitBake environment, run the |
1170 | :ref:`ref-tasks-kernel_configme` | 1124 | :ref:`ref-tasks-kernel_configme` |
1171 | task, and launch ``menuconfig``. These commands assume the Source | 1125 | task, and launch ``menuconfig``. These commands assume the Source |
1172 | Directory's top-level folder is ``poky``: | 1126 | Directory's top-level folder is ``poky``:: |
1173 | :: | ||
1174 | 1127 | ||
1175 | $ cd poky | 1128 | $ cd poky |
1176 | $ source oe-init-build-env | 1129 | $ source oe-init-build-env |
@@ -1232,8 +1185,7 @@ the ``.config`` file would be: | |||
1232 | 1185 | ||
1233 | Within the ``.config`` file, you can see the kernel settings. For | 1186 | Within the ``.config`` file, you can see the kernel settings. For |
1234 | example, the following entry shows that symmetric multi-processor | 1187 | example, the following entry shows that symmetric multi-processor |
1235 | support is not set: | 1188 | support is not set:: |
1236 | :: | ||
1237 | 1189 | ||
1238 | # CONFIG_SMP is not set | 1190 | # CONFIG_SMP is not set |
1239 | 1191 | ||
@@ -1274,8 +1226,7 @@ your layer's ``recipes-kernel/linux`` directory, and rename the copied | |||
1274 | file to "defconfig" (e.g. | 1226 | file to "defconfig" (e.g. |
1275 | ``~/meta-mylayer/recipes-kernel/linux/linux-yocto/defconfig``). Then, | 1227 | ``~/meta-mylayer/recipes-kernel/linux/linux-yocto/defconfig``). Then, |
1276 | add the following lines to the linux-yocto ``.bbappend`` file in your | 1228 | add the following lines to the linux-yocto ``.bbappend`` file in your |
1277 | layer: | 1229 | layer:: |
1278 | :: | ||
1279 | 1230 | ||
1280 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 1231 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
1281 | SRC_URI += "file://defconfig" | 1232 | SRC_URI += "file://defconfig" |
@@ -1323,8 +1274,7 @@ appear in the ``.config`` file, which is in the :term:`Build Directory`. | |||
1323 | It is simple to create a configuration fragment. One method is to use | 1274 | It is simple to create a configuration fragment. One method is to use |
1324 | shell commands. For example, issuing the following from the shell | 1275 | shell commands. For example, issuing the following from the shell |
1325 | creates a configuration fragment file named ``my_smp.cfg`` that enables | 1276 | creates a configuration fragment file named ``my_smp.cfg`` that enables |
1326 | multi-processor support within the kernel: | 1277 | multi-processor support within the kernel:: |
1327 | :: | ||
1328 | 1278 | ||
1329 | $ echo "CONFIG_SMP=y" >> my_smp.cfg | 1279 | $ echo "CONFIG_SMP=y" >> my_smp.cfg |
1330 | 1280 | ||
@@ -1342,8 +1292,7 @@ To create a configuration fragment using this method, follow these | |||
1342 | steps: | 1292 | steps: |
1343 | 1293 | ||
1344 | 1. *Complete a Build Through Kernel Configuration:* Complete a build at | 1294 | 1. *Complete a Build Through Kernel Configuration:* Complete a build at |
1345 | least through the kernel configuration task as follows: | 1295 | least through the kernel configuration task as follows:: |
1346 | :: | ||
1347 | 1296 | ||
1348 | $ bitbake linux-yocto -c kernel_configme -f | 1297 | $ bitbake linux-yocto -c kernel_configme -f |
1349 | 1298 | ||
@@ -1352,8 +1301,7 @@ steps: | |||
1352 | your build state might become unknown, it is best to run this task | 1301 | your build state might become unknown, it is best to run this task |
1353 | prior to starting ``menuconfig``. | 1302 | prior to starting ``menuconfig``. |
1354 | 1303 | ||
1355 | 2. *Launch menuconfig:* Run the ``menuconfig`` command: | 1304 | 2. *Launch menuconfig:* Run the ``menuconfig`` command:: |
1356 | :: | ||
1357 | 1305 | ||
1358 | $ bitbake linux-yocto -c menuconfig | 1306 | $ bitbake linux-yocto -c menuconfig |
1359 | 1307 | ||
@@ -1361,8 +1309,7 @@ steps: | |||
1361 | to prepare a configuration fragment. The resulting file | 1309 | to prepare a configuration fragment. The resulting file |
1362 | ``fragment.cfg`` is placed in the | 1310 | ``fragment.cfg`` is placed in the |
1363 | ``${``\ :term:`WORKDIR`\ ``}`` | 1311 | ``${``\ :term:`WORKDIR`\ ``}`` |
1364 | directory: | 1312 | directory:: |
1365 | :: | ||
1366 | 1313 | ||
1367 | $ bitbake linux-yocto -c diffconfig | 1314 | $ bitbake linux-yocto -c diffconfig |
1368 | 1315 | ||
@@ -1387,8 +1334,7 @@ options in a file called ``myconfig.cfg``. If you put that file inside a | |||
1387 | directory named ``linux-yocto`` that resides in the same directory as | 1334 | directory named ``linux-yocto`` that resides in the same directory as |
1388 | the kernel's append file within your layer and then add the following | 1335 | the kernel's append file within your layer and then add the following |
1389 | statements to the kernel's append file, those configuration options will | 1336 | statements to the kernel's append file, those configuration options will |
1390 | be picked up and applied when the kernel is built: | 1337 | be picked up and applied when the kernel is built:: |
1391 | :: | ||
1392 | 1338 | ||
1393 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 1339 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
1394 | SRC_URI += "file://myconfig.cfg" | 1340 | SRC_URI += "file://myconfig.cfg" |
@@ -1397,8 +1343,7 @@ As mentioned earlier, you can group related configurations into multiple | |||
1397 | files and name them all in the ``SRC_URI`` statement as well. For | 1343 | files and name them all in the ``SRC_URI`` statement as well. For |
1398 | example, you could group separate configurations specifically for | 1344 | example, you could group separate configurations specifically for |
1399 | Ethernet and graphics into their own files and add those by using a | 1345 | Ethernet and graphics into their own files and add those by using a |
1400 | ``SRC_URI`` statement like the following in your append file: | 1346 | ``SRC_URI`` statement like the following in your append file:: |
1401 | :: | ||
1402 | 1347 | ||
1403 | SRC_URI += "file://myconfig.cfg \ | 1348 | SRC_URI += "file://myconfig.cfg \ |
1404 | file://eth.cfg \ | 1349 | file://eth.cfg \ |
@@ -1409,8 +1354,7 @@ Validating Configuration | |||
1409 | 1354 | ||
1410 | You can use the | 1355 | You can use the |
1411 | :ref:`ref-tasks-kernel_configcheck` | 1356 | :ref:`ref-tasks-kernel_configcheck` |
1412 | task to provide configuration validation: | 1357 | task to provide configuration validation:: |
1413 | :: | ||
1414 | 1358 | ||
1415 | $ bitbake linux-yocto -c kernel_configcheck -f | 1359 | $ bitbake linux-yocto -c kernel_configcheck -f |
1416 | 1360 | ||
@@ -1537,8 +1481,7 @@ To streamline the configuration, do the following: | |||
1537 | successfully. Use this configuration file as your baseline. | 1481 | successfully. Use this configuration file as your baseline. |
1538 | 1482 | ||
1539 | 2. *Run Configure and Check Tasks:* Separately run the | 1483 | 2. *Run Configure and Check Tasks:* Separately run the |
1540 | ``do_kernel_configme`` and ``do_kernel_configcheck`` tasks: | 1484 | ``do_kernel_configme`` and ``do_kernel_configcheck`` tasks:: |
1541 | :: | ||
1542 | 1485 | ||
1543 | $ bitbake linux-yocto -c kernel_configme -f | 1486 | $ bitbake linux-yocto -c kernel_configme -f |
1544 | $ bitbake linux-yocto -c kernel_configcheck -f | 1487 | $ bitbake linux-yocto -c kernel_configcheck -f |
@@ -1572,8 +1515,7 @@ Expanding Variables | |||
1572 | Sometimes it is helpful to determine what a variable expands to during a | 1515 | Sometimes it is helpful to determine what a variable expands to during a |
1573 | build. You can examine the values of variables by examining the | 1516 | build. You can examine the values of variables by examining the |
1574 | output of the ``bitbake -e`` command. The output is long and is more | 1517 | output of the ``bitbake -e`` command. The output is long and is more |
1575 | easily managed in a text file, which allows for easy searches: | 1518 | easily managed in a text file, which allows for easy searches:: |
1576 | :: | ||
1577 | 1519 | ||
1578 | $ bitbake -e virtual/kernel > some_text_file | 1520 | $ bitbake -e virtual/kernel > some_text_file |
1579 | 1521 | ||
@@ -1590,15 +1532,13 @@ source directory. Follow these steps to clean up the version string: | |||
1590 | 1532 | ||
1591 | 1. *Discover the Uncommitted Changes:* Go to the kernel's locally cloned | 1533 | 1. *Discover the Uncommitted Changes:* Go to the kernel's locally cloned |
1592 | Git repository (source directory) and use the following Git command | 1534 | Git repository (source directory) and use the following Git command |
1593 | to list the files that have been changed, added, or removed: | 1535 | to list the files that have been changed, added, or removed:: |
1594 | :: | ||
1595 | 1536 | ||
1596 | $ git status | 1537 | $ git status |
1597 | 1538 | ||
1598 | 2. *Commit the Changes:* You should commit those changes to the kernel | 1539 | 2. *Commit the Changes:* You should commit those changes to the kernel |
1599 | source tree regardless of whether or not you will save, export, or | 1540 | source tree regardless of whether or not you will save, export, or |
1600 | use the changes: | 1541 | use the changes:: |
1601 | :: | ||
1602 | 1542 | ||
1603 | $ git add | 1543 | $ git add |
1604 | $ git commit -s -a -m "getting rid of -dirty" | 1544 | $ git commit -s -a -m "getting rid of -dirty" |
@@ -1633,8 +1573,7 @@ linux-yocto custom recipe (``linux-yocto-custom.bb``) that uses | |||
1633 | ``kernel.org`` sources and the Yocto Project Linux kernel tools for | 1573 | ``kernel.org`` sources and the Yocto Project Linux kernel tools for |
1634 | managing kernel Metadata. You can find this recipe in the ``poky`` Git | 1574 | managing kernel Metadata. You can find this recipe in the ``poky`` Git |
1635 | repository of the Yocto Project :yocto_git:`Source Repository <>` | 1575 | repository of the Yocto Project :yocto_git:`Source Repository <>` |
1636 | at: | 1576 | at:: |
1637 | :: | ||
1638 | 1577 | ||
1639 | poky/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb | 1578 | poky/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb |
1640 | 1579 | ||
@@ -1655,8 +1594,7 @@ Here are some basic steps you can use to work with your own sources: | |||
1655 | ``defconfig`` file or configuration fragment files in your layer. | 1594 | ``defconfig`` file or configuration fragment files in your layer. |
1656 | When you use the ``linux-yocto-custom.bb`` recipe, you must specify a | 1595 | When you use the ``linux-yocto-custom.bb`` recipe, you must specify a |
1657 | configuration. If you do not have a ``defconfig`` file, you can run | 1596 | configuration. If you do not have a ``defconfig`` file, you can run |
1658 | the following: | 1597 | the following:: |
1659 | :: | ||
1660 | 1598 | ||
1661 | $ make defconfig | 1599 | $ make defconfig |
1662 | 1600 | ||
@@ -1708,8 +1646,7 @@ Here are some basic steps you can use to work with your own sources: | |||
1708 | ``LINUX_VERSION`` with the Source Control Manager (SCM) revision | 1646 | ``LINUX_VERSION`` with the Source Control Manager (SCM) revision |
1709 | as derived from the :term:`SRCPV` | 1647 | as derived from the :term:`SRCPV` |
1710 | variable. The combined results are a string with the following | 1648 | variable. The combined results are a string with the following |
1711 | form: | 1649 | form:: |
1712 | :: | ||
1713 | 1650 | ||
1714 | 3.19.11+git1+68a635bf8dfb64b02263c1ac80c948647cc76d5f_1+218bd8d2022b9852c60d32f0d770931e3cf343e2 | 1651 | 3.19.11+git1+68a635bf8dfb64b02263c1ac80c948647cc76d5f_1+218bd8d2022b9852c60d32f0d770931e3cf343e2 |
1715 | 1652 | ||
@@ -1723,8 +1660,7 @@ Here are some basic steps you can use to work with your own sources: | |||
1723 | triggers an explicit build failure. You must change it to match a | 1660 | triggers an explicit build failure. You must change it to match a |
1724 | list of the machines that your new recipe supports. For example, | 1661 | list of the machines that your new recipe supports. For example, |
1725 | to support the ``qemux86`` and ``qemux86-64`` machines, use the | 1662 | to support the ``qemux86`` and ``qemux86-64`` machines, use the |
1726 | following form: | 1663 | following form:: |
1727 | :: | ||
1728 | 1664 | ||
1729 | COMPATIBLE_MACHINE = "qemux86|qemux86-64" | 1665 | COMPATIBLE_MACHINE = "qemux86|qemux86-64" |
1730 | 1666 | ||
@@ -1807,8 +1743,7 @@ Typically, you will need to set the following variables: | |||
1807 | 1743 | ||
1808 | Depending on the build system used by the module sources, you might need | 1744 | Depending on the build system used by the module sources, you might need |
1809 | to make some adjustments. For example, a typical module ``Makefile`` | 1745 | to make some adjustments. For example, a typical module ``Makefile`` |
1810 | looks much like the one provided with the ``hello-mod`` template: | 1746 | looks much like the one provided with the ``hello-mod`` template:: |
1811 | :: | ||
1812 | 1747 | ||
1813 | obj-m := hello.o | 1748 | obj-m := hello.o |
1814 | 1749 | ||
@@ -1845,8 +1780,7 @@ them appropriately for your machine configuration file: | |||
1845 | - :term:`MACHINE_EXTRA_RRECOMMENDS` | 1780 | - :term:`MACHINE_EXTRA_RRECOMMENDS` |
1846 | 1781 | ||
1847 | Modules are often not required for boot and can be excluded from certain | 1782 | Modules are often not required for boot and can be excluded from certain |
1848 | build configurations. The following allows for the most flexibility: | 1783 | build configurations. The following allows for the most flexibility:: |
1849 | :: | ||
1850 | 1784 | ||
1851 | MACHINE_EXTRA_RRECOMMENDS += "kernel-module-mymodule" | 1785 | MACHINE_EXTRA_RRECOMMENDS += "kernel-module-mymodule" |
1852 | 1786 | ||
@@ -1895,26 +1829,22 @@ branch. | |||
1895 | 1829 | ||
1896 | $ git whatchanged origin/standard/base..origin/standard/emenlow | 1830 | $ git whatchanged origin/standard/base..origin/standard/emenlow |
1897 | 1831 | ||
1898 | To see short, one line summaries of changes use the ``git log`` command: | 1832 | To see short, one line summaries of changes use the ``git log`` command:: |
1899 | :: | ||
1900 | 1833 | ||
1901 | $ git log --oneline origin/standard/base..origin/standard/emenlow | 1834 | $ git log --oneline origin/standard/base..origin/standard/emenlow |
1902 | 1835 | ||
1903 | Use this command to see code differences for the changes: | 1836 | Use this command to see code differences for the changes:: |
1904 | :: | ||
1905 | 1837 | ||
1906 | $ git diff origin/standard/base..origin/standard/emenlow | 1838 | $ git diff origin/standard/base..origin/standard/emenlow |
1907 | 1839 | ||
1908 | Use this command to see the commit log messages and the text | 1840 | Use this command to see the commit log messages and the text |
1909 | differences: | 1841 | differences:: |
1910 | :: | ||
1911 | 1842 | ||
1912 | $ git show origin/standard/base..origin/standard/emenlow | 1843 | $ git show origin/standard/base..origin/standard/emenlow |
1913 | 1844 | ||
1914 | Use this command to create individual patches for each change. Here is | 1845 | Use this command to create individual patches for each change. Here is |
1915 | an example that creates patch files for each commit and places them | 1846 | an example that creates patch files for each commit and places them |
1916 | in your ``Documents`` directory: | 1847 | in your ``Documents`` directory:: |
1917 | :: | ||
1918 | 1848 | ||
1919 | $ git format-patch -o $HOME/Documents origin/standard/base..origin/standard/emenlow | 1849 | $ git format-patch -o $HOME/Documents origin/standard/base..origin/standard/emenlow |
1920 | 1850 | ||
@@ -1923,15 +1853,13 @@ Showing a Particular Feature or Branch Change | |||
1923 | 1853 | ||
1924 | Tags in the Yocto Project kernel tree divide changes for significant | 1854 | Tags in the Yocto Project kernel tree divide changes for significant |
1925 | features or branches. The ``git show`` tag command shows changes based | 1855 | features or branches. The ``git show`` tag command shows changes based |
1926 | on a tag. Here is an example that shows ``systemtap`` changes: | 1856 | on a tag. Here is an example that shows ``systemtap`` changes:: |
1927 | :: | ||
1928 | 1857 | ||
1929 | $ git show systemtap | 1858 | $ git show systemtap |
1930 | 1859 | ||
1931 | You can use the ``git branch --contains`` tag command to | 1860 | You can use the ``git branch --contains`` tag command to |
1932 | show the branches that contain a particular feature. This command shows | 1861 | show the branches that contain a particular feature. This command shows |
1933 | the branches that contain the ``systemtap`` feature: | 1862 | the branches that contain the ``systemtap`` feature:: |
1934 | :: | ||
1935 | 1863 | ||
1936 | $ git branch --contains systemtap | 1864 | $ git branch --contains systemtap |
1937 | 1865 | ||
@@ -1986,8 +1914,7 @@ build. | |||
1986 | searched during the build as potential feature directories. | 1914 | searched during the build as potential feature directories. |
1987 | 1915 | ||
1988 | Continuing with the example, suppose the "test.scc" feature you are | 1916 | Continuing with the example, suppose the "test.scc" feature you are |
1989 | adding has a ``test.scc`` file in the following directory: | 1917 | adding has a ``test.scc`` file in the following directory:: |
1990 | :: | ||
1991 | 1918 | ||
1992 | my_recipe | 1919 | my_recipe |
1993 | | | 1920 | | |
@@ -2001,8 +1928,7 @@ build. | |||
2001 | a similarly named configuration fragment file ``test.cfg``. | 1928 | a similarly named configuration fragment file ``test.cfg``. |
2002 | 1929 | ||
2003 | 2. *Add the Feature File to SRC_URI:* Add the ``.scc`` file to the | 1930 | 2. *Add the Feature File to SRC_URI:* Add the ``.scc`` file to the |
2004 | recipe's ``SRC_URI`` statement: | 1931 | recipe's ``SRC_URI`` statement:: |
2005 | :: | ||
2006 | 1932 | ||
2007 | SRC_URI_append = " file://test.scc" | 1933 | SRC_URI_append = " file://test.scc" |
2008 | 1934 | ||
@@ -2011,8 +1937,7 @@ build. | |||
2011 | 1937 | ||
2012 | 3. *Specify the Feature as a Kernel Feature:* Use the | 1938 | 3. *Specify the Feature as a Kernel Feature:* Use the |
2013 | ``KERNEL_FEATURES`` statement to specify the feature as a kernel | 1939 | ``KERNEL_FEATURES`` statement to specify the feature as a kernel |
2014 | feature: | 1940 | feature:: |
2015 | :: | ||
2016 | 1941 | ||
2017 | KERNEL_FEATURES_append = " test.scc" | 1942 | KERNEL_FEATURES_append = " test.scc" |
2018 | 1943 | ||
diff --git a/documentation/kernel-dev/concepts-appx.rst b/documentation/kernel-dev/concepts-appx.rst index 4b6dbe5ef9..63e67315fa 100644 --- a/documentation/kernel-dev/concepts-appx.rst +++ b/documentation/kernel-dev/concepts-appx.rst | |||
@@ -359,8 +359,7 @@ To determine whether or not a given option is "hardware" or | |||
359 | "non-hardware", the kernel Metadata in ``yocto-kernel-cache`` contains | 359 | "non-hardware", the kernel Metadata in ``yocto-kernel-cache`` contains |
360 | files that classify individual or groups of options as either hardware | 360 | files that classify individual or groups of options as either hardware |
361 | or non-hardware. To better show this, consider a situation where the | 361 | or non-hardware. To better show this, consider a situation where the |
362 | ``yocto-kernel-cache`` contains the following files: | 362 | ``yocto-kernel-cache`` contains the following files:: |
363 | :: | ||
364 | 363 | ||
365 | yocto-kernel-cache/features/drm-psb/hardware.cfg | 364 | yocto-kernel-cache/features/drm-psb/hardware.cfg |
366 | yocto-kernel-cache/features/kgdb/hardware.cfg | 365 | yocto-kernel-cache/features/kgdb/hardware.cfg |
@@ -400,8 +399,7 @@ provides explanations for the various files: | |||
400 | (i.e. ``hardware.kcf`` or ``non-hardware.kcf``). | 399 | (i.e. ``hardware.kcf`` or ``non-hardware.kcf``). |
401 | 400 | ||
402 | Here is a specific example using the | 401 | Here is a specific example using the |
403 | ``kernel-cache/bsp/mti-malta32/hardware.cfg``: | 402 | ``kernel-cache/bsp/mti-malta32/hardware.cfg``:: |
404 | :: | ||
405 | 403 | ||
406 | CONFIG_SERIAL_8250 | 404 | CONFIG_SERIAL_8250 |
407 | CONFIG_SERIAL_8250_CONSOLE | 405 | CONFIG_SERIAL_8250_CONSOLE |
diff --git a/documentation/kernel-dev/faq.rst b/documentation/kernel-dev/faq.rst index c2106f81e1..8169511445 100644 --- a/documentation/kernel-dev/faq.rst +++ b/documentation/kernel-dev/faq.rst | |||
@@ -57,8 +57,7 @@ These other variables are useful for installing specific modules: | |||
57 | 57 | ||
58 | For example, set the following in the ``qemux86.conf`` file to include | 58 | For example, set the following in the ``qemux86.conf`` file to include |
59 | the ``ab123`` kernel modules with images built for the ``qemux86`` | 59 | the ``ab123`` kernel modules with images built for the ``qemux86`` |
60 | machine: | 60 | machine:: |
61 | :: | ||
62 | 61 | ||
63 | MACHINE_EXTRA_RRECOMMENDS += "kernel-module-ab123" | 62 | MACHINE_EXTRA_RRECOMMENDS += "kernel-module-ab123" |
64 | 63 | ||
@@ -71,8 +70,7 @@ How do I change the Linux kernel command line? | |||
71 | The Linux kernel command line is | 70 | The Linux kernel command line is |
72 | typically specified in the machine config using the ``APPEND`` variable. | 71 | typically specified in the machine config using the ``APPEND`` variable. |
73 | For example, you can add some helpful debug information doing the | 72 | For example, you can add some helpful debug information doing the |
74 | following: | 73 | following:: |
75 | :: | ||
76 | 74 | ||
77 | APPEND += "printk.time=y initcall_debug debug" | 75 | APPEND += "printk.time=y initcall_debug debug" |
78 | 76 | ||
diff --git a/documentation/kernel-dev/maint-appx.rst b/documentation/kernel-dev/maint-appx.rst index 44c43893e2..f84ab6e239 100644 --- a/documentation/kernel-dev/maint-appx.rst +++ b/documentation/kernel-dev/maint-appx.rst | |||
@@ -28,8 +28,7 @@ in the Yocto Project Linux kernel in any clone of the Yocto Project | |||
28 | Linux kernel source repository and ``yocto-kernel-cache`` Git trees. For | 28 | Linux kernel source repository and ``yocto-kernel-cache`` Git trees. For |
29 | example, the following commands clone the Yocto Project baseline Linux | 29 | example, the following commands clone the Yocto Project baseline Linux |
30 | kernel that branches off ``linux.org`` version 4.12 and the | 30 | kernel that branches off ``linux.org`` version 4.12 and the |
31 | ``yocto-kernel-cache``, which contains stores of kernel Metadata: | 31 | ``yocto-kernel-cache``, which contains stores of kernel Metadata:: |
32 | :: | ||
33 | 32 | ||
34 | $ git clone git://git.yoctoproject.org/linux-yocto-4.12 | 33 | $ git clone git://git.yoctoproject.org/linux-yocto-4.12 |
35 | $ git clone git://git.yoctoproject.org/linux-kernel-cache | 34 | $ git clone git://git.yoctoproject.org/linux-kernel-cache |
@@ -42,16 +41,14 @@ section. | |||
42 | 41 | ||
43 | Once you have cloned the kernel Git repository and the cache of Metadata | 42 | Once you have cloned the kernel Git repository and the cache of Metadata |
44 | on your local machine, you can discover the branches that are available | 43 | on your local machine, you can discover the branches that are available |
45 | in the repository using the following Git command: | 44 | in the repository using the following Git command:: |
46 | :: | ||
47 | 45 | ||
48 | $ git branch -a | 46 | $ git branch -a |
49 | 47 | ||
50 | Checking out a branch allows you to work with a particular Yocto Linux | 48 | Checking out a branch allows you to work with a particular Yocto Linux |
51 | kernel. For example, the following commands check out the | 49 | kernel. For example, the following commands check out the |
52 | "standard/beagleboard" branch of the Yocto Linux kernel repository and | 50 | "standard/beagleboard" branch of the Yocto Linux kernel repository and |
53 | the "yocto-4.12" branch of the ``yocto-kernel-cache`` repository: | 51 | the "yocto-4.12" branch of the ``yocto-kernel-cache`` repository:: |
54 | :: | ||
55 | 52 | ||
56 | $ cd ~/linux-yocto-4.12 | 53 | $ cd ~/linux-yocto-4.12 |
57 | $ git checkout -b my-kernel-4.12 remotes/origin/standard/beagleboard | 54 | $ git checkout -b my-kernel-4.12 remotes/origin/standard/beagleboard |
@@ -111,8 +108,7 @@ patch, or BSP: | |||
111 | 108 | ||
112 | For a typical build, the target of the search is a feature | 109 | For a typical build, the target of the search is a feature |
113 | description in an ``.scc`` file whose name follows this format (e.g. | 110 | description in an ``.scc`` file whose name follows this format (e.g. |
114 | ``beaglebone-standard.scc`` and ``beaglebone-preempt-rt.scc``): | 111 | ``beaglebone-standard.scc`` and ``beaglebone-preempt-rt.scc``):: |
115 | :: | ||
116 | 112 | ||
117 | bsp_root_name-kernel_type.scc | 113 | bsp_root_name-kernel_type.scc |
118 | 114 | ||
@@ -222,8 +218,7 @@ build process generates a build tree that is separate from your kernel's | |||
222 | local Git source repository tree. This build tree has a name that uses | 218 | local Git source repository tree. This build tree has a name that uses |
223 | the following form, where ``${MACHINE}`` is the metadata name of the | 219 | the following form, where ``${MACHINE}`` is the metadata name of the |
224 | machine (BSP) and "kernel_type" is one of the Yocto Project supported | 220 | machine (BSP) and "kernel_type" is one of the Yocto Project supported |
225 | kernel types (e.g. "standard"): | 221 | kernel types (e.g. "standard"):: |
226 | :: | ||
227 | 222 | ||
228 | linux-${MACHINE}-kernel_type-build | 223 | linux-${MACHINE}-kernel_type-build |
229 | 224 | ||
diff --git a/documentation/overview-manual/concepts.rst b/documentation/overview-manual/concepts.rst index ada5143b2a..2e3f1af442 100644 --- a/documentation/overview-manual/concepts.rst +++ b/documentation/overview-manual/concepts.rst | |||
@@ -55,8 +55,7 @@ This section briefly introduces BitBake. If you want more information on | |||
55 | BitBake, see the :doc:`BitBake User Manual <bitbake:index>`. | 55 | BitBake, see the :doc:`BitBake User Manual <bitbake:index>`. |
56 | 56 | ||
57 | To see a list of the options BitBake supports, use either of the | 57 | To see a list of the options BitBake supports, use either of the |
58 | following commands: | 58 | following commands:: |
59 | :: | ||
60 | 59 | ||
61 | $ bitbake -h | 60 | $ bitbake -h |
62 | $ bitbake --help | 61 | $ bitbake --help |
@@ -66,8 +65,7 @@ The most common usage for BitBake is ``bitbake recipename``, where | |||
66 | to as the "target"). The target often equates to the first part of a | 65 | to as the "target"). The target often equates to the first part of a |
67 | recipe's filename (e.g. "foo" for a recipe named ``foo_1.3.0-r0.bb``). | 66 | recipe's filename (e.g. "foo" for a recipe named ``foo_1.3.0-r0.bb``). |
68 | So, to process the ``matchbox-desktop_1.2.3.bb`` recipe file, you might | 67 | So, to process the ``matchbox-desktop_1.2.3.bb`` recipe file, you might |
69 | type the following: | 68 | type the following:: |
70 | :: | ||
71 | 69 | ||
72 | $ bitbake matchbox-desktop | 70 | $ bitbake matchbox-desktop |
73 | 71 | ||
@@ -1068,15 +1066,13 @@ the image. The formats used for the root filesystem depend on the | |||
1068 | support compression. | 1066 | support compression. |
1069 | 1067 | ||
1070 | As an example, a dynamically created task when creating a particular | 1068 | As an example, a dynamically created task when creating a particular |
1071 | image type would take the following form: | 1069 | image type would take the following form:: |
1072 | :: | ||
1073 | 1070 | ||
1074 | do_image_type | 1071 | do_image_type |
1075 | 1072 | ||
1076 | So, if the type | 1073 | So, if the type |
1077 | as specified by the ``IMAGE_FSTYPES`` were ``ext4``, the dynamically | 1074 | as specified by the ``IMAGE_FSTYPES`` were ``ext4``, the dynamically |
1078 | generated task would be as follows: | 1075 | generated task would be as follows:: |
1079 | :: | ||
1080 | 1076 | ||
1081 | do_image_ext4 | 1077 | do_image_ext4 |
1082 | 1078 | ||
@@ -1478,8 +1474,7 @@ cross-compiler that is used internally within BitBake only. | |||
1478 | gcc-cross | 1474 | gcc-cross |
1479 | . | 1475 | . |
1480 | 1476 | ||
1481 | The chain of events that occurs when the standard toolchain is bootstrapped: | 1477 | The chain of events that occurs when the standard toolchain is bootstrapped:: |
1482 | :: | ||
1483 | 1478 | ||
1484 | binutils-cross -> linux-libc-headers -> gcc-cross -> libgcc-initial -> glibc -> libgcc -> gcc-runtime | 1479 | binutils-cross -> linux-libc-headers -> gcc-cross -> libgcc-initial -> glibc -> libgcc -> gcc-runtime |
1485 | 1480 | ||
@@ -1528,8 +1523,7 @@ might not be the same machine as the Build Host. | |||
1528 | can take advantage of pre-built images that ship with the Yocto | 1523 | can take advantage of pre-built images that ship with the Yocto |
1529 | Project and already contain cross-development toolchain installers. | 1524 | Project and already contain cross-development toolchain installers. |
1530 | 1525 | ||
1531 | Here is the bootstrap process for the relocatable toolchain: | 1526 | Here is the bootstrap process for the relocatable toolchain:: |
1532 | :: | ||
1533 | 1527 | ||
1534 | gcc -> binutils-crosssdk -> gcc-crosssdk-initial -> linux-libc-headers -> glibc-initial -> nativesdk-glibc -> gcc-crosssdk -> gcc-cross-canadian | 1528 | gcc -> binutils-crosssdk -> gcc-crosssdk-initial -> linux-libc-headers -> glibc-initial -> nativesdk-glibc -> gcc-crosssdk -> gcc-cross-canadian |
1535 | 1529 | ||
@@ -1703,8 +1697,7 @@ to the task. | |||
1703 | 1697 | ||
1704 | Like the ``WORKDIR`` case, situations exist where dependencies should be | 1698 | Like the ``WORKDIR`` case, situations exist where dependencies should be |
1705 | ignored. For these situations, you can instruct the build process to | 1699 | ignored. For these situations, you can instruct the build process to |
1706 | ignore a dependency by using a line like the following: | 1700 | ignore a dependency by using a line like the following:: |
1707 | :: | ||
1708 | 1701 | ||
1709 | PACKAGE_ARCHS[vardepsexclude] = "MACHINE" | 1702 | PACKAGE_ARCHS[vardepsexclude] = "MACHINE" |
1710 | 1703 | ||
@@ -1714,8 +1707,7 @@ reference it. | |||
1714 | 1707 | ||
1715 | Equally, there are cases where you need to add dependencies BitBake is | 1708 | Equally, there are cases where you need to add dependencies BitBake is |
1716 | not able to find. You can accomplish this by using a line like the | 1709 | not able to find. You can accomplish this by using a line like the |
1717 | following: | 1710 | following:: |
1718 | :: | ||
1719 | 1711 | ||
1720 | PACKAGE_ARCHS[vardeps] = "MACHINE" | 1712 | PACKAGE_ARCHS[vardeps] = "MACHINE" |
1721 | 1713 | ||
@@ -1745,8 +1737,7 @@ and the dependent task hashes can be influenced. Within the BitBake | |||
1745 | configuration file, you can give BitBake some extra information to help | 1737 | configuration file, you can give BitBake some extra information to help |
1746 | it construct the basehash. The following statement effectively results | 1738 | it construct the basehash. The following statement effectively results |
1747 | in a list of global variable dependency excludes (i.e. variables never | 1739 | in a list of global variable dependency excludes (i.e. variables never |
1748 | included in any checksum): | 1740 | included in any checksum):: |
1749 | :: | ||
1750 | 1741 | ||
1751 | BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \\ | 1742 | BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \\ |
1752 | SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \\ | 1743 | SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \\ |
@@ -1771,8 +1762,7 @@ desired. This file defines the two basic signature generators | |||
1771 | "OEBasicHash". By default, a dummy "noop" signature handler is enabled | 1762 | "OEBasicHash". By default, a dummy "noop" signature handler is enabled |
1772 | in BitBake. This means that behavior is unchanged from previous | 1763 | in BitBake. This means that behavior is unchanged from previous |
1773 | versions. OE-Core uses the "OEBasicHash" signature handler by default | 1764 | versions. OE-Core uses the "OEBasicHash" signature handler by default |
1774 | through this setting in the ``bitbake.conf`` file: | 1765 | through this setting in the ``bitbake.conf`` file:: |
1775 | :: | ||
1776 | 1766 | ||
1777 | BB_SIGNATURE_HANDLER ?= "OEBasicHash" | 1767 | BB_SIGNATURE_HANDLER ?= "OEBasicHash" |
1778 | 1768 | ||
@@ -1826,8 +1816,7 @@ The Yocto Project team has tried to keep the details of the | |||
1826 | implementation hidden in ``sstate`` class. From a user's perspective, | 1816 | implementation hidden in ``sstate`` class. From a user's perspective, |
1827 | adding shared state wrapping to a task is as simple as this | 1817 | adding shared state wrapping to a task is as simple as this |
1828 | :ref:`ref-tasks-deploy` example taken | 1818 | :ref:`ref-tasks-deploy` example taken |
1829 | from the :ref:`deploy <ref-classes-deploy>` class: | 1819 | from the :ref:`deploy <ref-classes-deploy>` class:: |
1830 | :: | ||
1831 | 1820 | ||
1832 | DEPLOYDIR = "${WORKDIR}/deploy-${PN}" | 1821 | DEPLOYDIR = "${WORKDIR}/deploy-${PN}" |
1833 | SSTATETASKS += "do_deploy" | 1822 | SSTATETASKS += "do_deploy" |
@@ -1871,8 +1860,7 @@ The following list explains the previous example: | |||
1871 | instead, skipping the ``do_deploy`` task. | 1860 | instead, skipping the ``do_deploy`` task. |
1872 | 1861 | ||
1873 | - The following task definition is glue logic needed to make the | 1862 | - The following task definition is glue logic needed to make the |
1874 | previous settings effective: | 1863 | previous settings effective:: |
1875 | :: | ||
1876 | 1864 | ||
1877 | python do_deploy_setscene () { | 1865 | python do_deploy_setscene () { |
1878 | sstate_setscene(d) | 1866 | sstate_setscene(d) |
@@ -1898,8 +1886,7 @@ The following list explains the previous example: | |||
1898 | In cases where ``sstate-inputdirs`` and ``sstate-outputdirs`` would be | 1886 | In cases where ``sstate-inputdirs`` and ``sstate-outputdirs`` would be |
1899 | the same, you can use ``sstate-plaindirs``. For example, to preserve the | 1887 | the same, you can use ``sstate-plaindirs``. For example, to preserve the |
1900 | ${:term:`PKGD`} and ${:term:`PKGDEST`} output from the ``do_package`` | 1888 | ${:term:`PKGD`} and ${:term:`PKGDEST`} output from the ``do_package`` |
1901 | task, use the following: | 1889 | task, use the following:: |
1902 | :: | ||
1903 | 1890 | ||
1904 | do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}" | 1891 | do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}" |
1905 | 1892 | ||
@@ -1917,24 +1904,21 @@ The following list explains the previous example: | |||
1917 | multiple directories. For example, the following declares | 1904 | multiple directories. For example, the following declares |
1918 | ``PKGDESTWORK`` and ``SHLIBWORK`` as shared state input directories, | 1905 | ``PKGDESTWORK`` and ``SHLIBWORK`` as shared state input directories, |
1919 | which populates the shared state cache, and ``PKGDATA_DIR`` and | 1906 | which populates the shared state cache, and ``PKGDATA_DIR`` and |
1920 | ``SHLIBSDIR`` as the corresponding shared state output directories: | 1907 | ``SHLIBSDIR`` as the corresponding shared state output directories:: |
1921 | :: | ||
1922 | 1908 | ||
1923 | do_package[sstate-inputdirs] = "${PKGDESTWORK} ${SHLIBSWORKDIR}" | 1909 | do_package[sstate-inputdirs] = "${PKGDESTWORK} ${SHLIBSWORKDIR}" |
1924 | do_package[sstate-outputdirs] = "${PKGDATA_DIR} ${SHLIBSDIR}" | 1910 | do_package[sstate-outputdirs] = "${PKGDATA_DIR} ${SHLIBSDIR}" |
1925 | 1911 | ||
1926 | - These methods also include the ability to take a lockfile when | 1912 | - These methods also include the ability to take a lockfile when |
1927 | manipulating shared state directory structures, for cases where file | 1913 | manipulating shared state directory structures, for cases where file |
1928 | additions or removals are sensitive: | 1914 | additions or removals are sensitive:: |
1929 | :: | ||
1930 | 1915 | ||
1931 | do_package[sstate-lockfile] = "${PACKAGELOCK}" | 1916 | do_package[sstate-lockfile] = "${PACKAGELOCK}" |
1932 | 1917 | ||
1933 | Behind the scenes, the shared state code works by looking in | 1918 | Behind the scenes, the shared state code works by looking in |
1934 | :term:`SSTATE_DIR` and | 1919 | :term:`SSTATE_DIR` and |
1935 | :term:`SSTATE_MIRRORS` for | 1920 | :term:`SSTATE_MIRRORS` for |
1936 | shared state files. Here is an example: | 1921 | shared state files. Here is an example:: |
1937 | :: | ||
1938 | 1922 | ||
1939 | SSTATE_MIRRORS ?= "\ | 1923 | SSTATE_MIRRORS ?= "\ |
1940 | file://.\* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ | 1924 | file://.\* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ |
@@ -2116,8 +2100,7 @@ accomplished using fakeroot. | |||
2116 | under fakeroot. Otherwise, the task cannot run root-only operations, | 2100 | under fakeroot. Otherwise, the task cannot run root-only operations, |
2117 | and cannot see the fake file ownership and permissions set by the | 2101 | and cannot see the fake file ownership and permissions set by the |
2118 | other task. You need to also add a dependency on | 2102 | other task. You need to also add a dependency on |
2119 | ``virtual/fakeroot-native:do_populate_sysroot``, giving the following: | 2103 | ``virtual/fakeroot-native:do_populate_sysroot``, giving the following:: |
2120 | :: | ||
2121 | 2104 | ||
2122 | fakeroot do_mytask () { | 2105 | fakeroot do_mytask () { |
2123 | ... | 2106 | ... |
diff --git a/documentation/overview-manual/development-environment.rst b/documentation/overview-manual/development-environment.rst index a33f89e4fa..1decf01e43 100644 --- a/documentation/overview-manual/development-environment.rst +++ b/documentation/overview-manual/development-environment.rst | |||
@@ -430,8 +430,7 @@ local working area (also called a branch) that tracks a specific | |||
430 | development branch from the upstream source Git repository. in other | 430 | development branch from the upstream source Git repository. in other |
431 | words, you can define your local Git environment to work on any | 431 | words, you can define your local Git environment to work on any |
432 | development branch in the repository. To help illustrate, consider the | 432 | development branch in the repository. To help illustrate, consider the |
433 | following example Git commands: | 433 | following example Git commands:: |
434 | :: | ||
435 | 434 | ||
436 | $ cd ~ | 435 | $ cd ~ |
437 | $ git clone git://git.yoctoproject.org/poky | 436 | $ git clone git://git.yoctoproject.org/poky |
@@ -476,8 +475,7 @@ create and checkout a local working Git branch based on a tag name. When | |||
476 | you do this, you get a snapshot of the Git repository that reflects the | 475 | you do this, you get a snapshot of the Git repository that reflects the |
477 | state of the files when the change was made associated with that tag. | 476 | state of the files when the change was made associated with that tag. |
478 | The most common use is to checkout a working branch that matches a | 477 | The most common use is to checkout a working branch that matches a |
479 | specific Yocto Project release. Here is an example: | 478 | specific Yocto Project release. Here is an example:: |
480 | :: | ||
481 | 479 | ||
482 | $ cd ~ | 480 | $ cd ~ |
483 | $ git clone git://git.yoctoproject.org/poky | 481 | $ git clone git://git.yoctoproject.org/poky |
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index 52a50faf67..9a1fc2c93f 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst | |||
@@ -168,8 +168,7 @@ example use for this class. | |||
168 | the "subpath" parameter limits the checkout to a specific subpath | 168 | the "subpath" parameter limits the checkout to a specific subpath |
169 | of the tree. Here is an example where ``${BP}`` is used so that the files | 169 | of the tree. Here is an example where ``${BP}`` is used so that the files |
170 | are extracted into the subdirectory expected by the default value of | 170 | are extracted into the subdirectory expected by the default value of |
171 | ``S``: | 171 | ``S``:: |
172 | :: | ||
173 | 172 | ||
174 | SRC_URI = "git://example.com/downloads/somepackage.rpm;subpath=${BP}" | 173 | SRC_URI = "git://example.com/downloads/somepackage.rpm;subpath=${BP}" |
175 | 174 | ||
@@ -221,8 +220,7 @@ each recipe you wish to blacklist. Specify the :term:`PN` | |||
221 | value as a variable flag (varflag) and provide a reason, which is | 220 | value as a variable flag (varflag) and provide a reason, which is |
222 | reported, if the package is requested to be built as the value. For | 221 | reported, if the package is requested to be built as the value. For |
223 | example, if you want to blacklist a recipe called "exoticware", you add | 222 | example, if you want to blacklist a recipe called "exoticware", you add |
224 | the following to your ``local.conf`` or distribution configuration: | 223 | the following to your ``local.conf`` or distribution configuration:: |
225 | :: | ||
226 | 224 | ||
227 | INHERIT += "blacklist" | 225 | INHERIT += "blacklist" |
228 | PNBLACKLIST[exoticware] = "Not supported by our organization." | 226 | PNBLACKLIST[exoticware] = "Not supported by our organization." |
@@ -470,8 +468,7 @@ information about using ``devshell``. | |||
470 | The ``devupstream`` class uses | 468 | The ``devupstream`` class uses |
471 | :term:`BBCLASSEXTEND` to add a variant of the | 469 | :term:`BBCLASSEXTEND` to add a variant of the |
472 | recipe that fetches from an alternative URI (e.g. Git) instead of a | 470 | recipe that fetches from an alternative URI (e.g. Git) instead of a |
473 | tarball. Following is an example: | 471 | tarball. Following is an example:: |
474 | :: | ||
475 | 472 | ||
476 | BBCLASSEXTEND = "devupstream:target" | 473 | BBCLASSEXTEND = "devupstream:target" |
477 | SRC_URI_class-devupstream = "git://git.example.com/example" | 474 | SRC_URI_class-devupstream = "git://git.example.com/example" |
@@ -481,8 +478,7 @@ Adding the above statements to your recipe creates a variant that has | |||
481 | :term:`DEFAULT_PREFERENCE` set to "-1". | 478 | :term:`DEFAULT_PREFERENCE` set to "-1". |
482 | Consequently, you need to select the variant of the recipe to use it. | 479 | Consequently, you need to select the variant of the recipe to use it. |
483 | Any development-specific adjustments can be done by using the | 480 | Any development-specific adjustments can be done by using the |
484 | ``class-devupstream`` override. Here is an example: | 481 | ``class-devupstream`` override. Here is an example:: |
485 | :: | ||
486 | 482 | ||
487 | DEPENDS_append_class-devupstream = " gperf-native" | 483 | DEPENDS_append_class-devupstream = " gperf-native" |
488 | do_configure_prepend_class-devupstream() { | 484 | do_configure_prepend_class-devupstream() { |
@@ -544,8 +540,7 @@ By default, this class expects the source code to support recipe builds | |||
544 | that use the :term:`B` variable to point to the directory in | 540 | that use the :term:`B` variable to point to the directory in |
545 | which the OpenEmbedded build system places the generated objects built | 541 | which the OpenEmbedded build system places the generated objects built |
546 | from the recipes. By default, the ``B`` directory is set to the | 542 | from the recipes. By default, the ``B`` directory is set to the |
547 | following, which is separate from the source directory (``S``): | 543 | following, which is separate from the source directory (``S``):: |
548 | :: | ||
549 | 544 | ||
550 | ${WORKDIR}/${BPN}/{PV}/ | 545 | ${WORKDIR}/${BPN}/{PV}/ |
551 | 546 | ||
@@ -581,8 +576,7 @@ be performed using the | |||
581 | useradd | 576 | useradd |
582 | class to add user and group configuration to a specific recipe. | 577 | class to add user and group configuration to a specific recipe. |
583 | 578 | ||
584 | Here is an example that uses this class in an image recipe: | 579 | Here is an example that uses this class in an image recipe:: |
585 | :: | ||
586 | 580 | ||
587 | inherit extrausers | 581 | inherit extrausers |
588 | EXTRA_USERS_PARAMS = "\ | 582 | EXTRA_USERS_PARAMS = "\ |
@@ -595,8 +589,7 @@ Here is an example that uses this class in an image recipe: | |||
595 | " | 589 | " |
596 | 590 | ||
597 | Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns | 591 | Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns |
598 | passwords: | 592 | passwords:: |
599 | :: | ||
600 | 593 | ||
601 | inherit extrausers | 594 | inherit extrausers |
602 | EXTRA_USERS_PARAMS = "\ | 595 | EXTRA_USERS_PARAMS = "\ |
@@ -604,8 +597,7 @@ passwords: | |||
604 | useradd -P tester01 tester-sue; \ | 597 | useradd -P tester01 tester-sue; \ |
605 | " | 598 | " |
606 | 599 | ||
607 | Finally, here is an example that sets the root password to "1876*18": | 600 | Finally, here is an example that sets the root password to "1876*18":: |
608 | :: | ||
609 | 601 | ||
610 | inherit extrausers | 602 | inherit extrausers |
611 | EXTRA_USERS_PARAMS = "\ | 603 | EXTRA_USERS_PARAMS = "\ |
@@ -867,8 +859,7 @@ system need to either inherit the ``icecc`` class or nobody should. | |||
867 | At the distribution level, you can inherit the ``icecc`` class to be | 859 | At the distribution level, you can inherit the ``icecc`` class to be |
868 | sure that all builders start with the same sstate signatures. After | 860 | sure that all builders start with the same sstate signatures. After |
869 | inheriting the class, you can then disable the feature by setting the | 861 | inheriting the class, you can then disable the feature by setting the |
870 | :term:`ICECC_DISABLED` variable to "1" as follows: | 862 | :term:`ICECC_DISABLED` variable to "1" as follows:: |
871 | :: | ||
872 | 863 | ||
873 | INHERIT_DISTRO_append = " icecc" | 864 | INHERIT_DISTRO_append = " icecc" |
874 | ICECC_DISABLED ??= "1" | 865 | ICECC_DISABLED ??= "1" |
@@ -876,8 +867,7 @@ inheriting the class, you can then disable the feature by setting the | |||
876 | This practice | 867 | This practice |
877 | makes sure everyone is using the same signatures but also requires | 868 | makes sure everyone is using the same signatures but also requires |
878 | individuals that do want to use Icecream to enable the feature | 869 | individuals that do want to use Icecream to enable the feature |
879 | individually as follows in your ``local.conf`` file: | 870 | individually as follows in your ``local.conf`` file:: |
880 | :: | ||
881 | 871 | ||
882 | ICECC_DISABLED = "" | 872 | ICECC_DISABLED = "" |
883 | 873 | ||
@@ -925,8 +915,7 @@ types. | |||
925 | 915 | ||
926 | By default, the :ref:`image <ref-classes-image>` class automatically | 916 | By default, the :ref:`image <ref-classes-image>` class automatically |
927 | enables the ``image_types`` class. The ``image`` class uses the | 917 | enables the ``image_types`` class. The ``image`` class uses the |
928 | ``IMGCLASSES`` variable as follows: | 918 | ``IMGCLASSES`` variable as follows:: |
929 | :: | ||
930 | 919 | ||
931 | IMGCLASSES = "rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}" | 920 | IMGCLASSES = "rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}" |
932 | IMGCLASSES += "${@['populate_sdk_base', 'populate_sdk_ext']['linux' in d.getVar("SDK_OS")]}" | 921 | IMGCLASSES += "${@['populate_sdk_base', 'populate_sdk_ext']['linux' in d.getVar("SDK_OS")]}" |
@@ -968,8 +957,7 @@ during the :ref:`ref-tasks-rootfs` task, which optimizes | |||
968 | the size of libraries contained in the image. | 957 | the size of libraries contained in the image. |
969 | 958 | ||
970 | By default, the class is enabled in the ``local.conf.template`` using | 959 | By default, the class is enabled in the ``local.conf.template`` using |
971 | the :term:`USER_CLASSES` variable as follows: | 960 | the :term:`USER_CLASSES` variable as follows:: |
972 | :: | ||
973 | 961 | ||
974 | USER_CLASSES ?= "buildstats image-mklibs image-prelink" | 962 | USER_CLASSES ?= "buildstats image-mklibs image-prelink" |
975 | 963 | ||
@@ -984,8 +972,7 @@ the dynamic linking of shared libraries to reduce executable startup | |||
984 | time. | 972 | time. |
985 | 973 | ||
986 | By default, the class is enabled in the ``local.conf.template`` using | 974 | By default, the class is enabled in the ``local.conf.template`` using |
987 | the :term:`USER_CLASSES` variable as follows: | 975 | the :term:`USER_CLASSES` variable as follows:: |
988 | :: | ||
989 | 976 | ||
990 | USER_CLASSES ?= "buildstats image-mklibs image-prelink" | 977 | USER_CLASSES ?= "buildstats image-mklibs image-prelink" |
991 | 978 | ||
@@ -1014,8 +1001,7 @@ configuration). However, to skip one or more checks in recipes, you | |||
1014 | should use :term:`INSANE_SKIP`. For example, to skip | 1001 | should use :term:`INSANE_SKIP`. For example, to skip |
1015 | the check for symbolic link ``.so`` files in the main package of a | 1002 | the check for symbolic link ``.so`` files in the main package of a |
1016 | recipe, add the following to the recipe. You need to realize that the | 1003 | recipe, add the following to the recipe. You need to realize that the |
1017 | package name override, in this example ``${PN}``, must be used: | 1004 | package name override, in this example ``${PN}``, must be used:: |
1018 | :: | ||
1019 | 1005 | ||
1020 | INSANE_SKIP_${PN} += "dev-so" | 1006 | INSANE_SKIP_${PN} += "dev-so" |
1021 | 1007 | ||
@@ -1152,8 +1138,7 @@ The following list shows the tests you can list with the ``WARN_QA`` and | |||
1152 | 1138 | ||
1153 | - ``invalid-packageconfig:`` Checks that no undefined features are | 1139 | - ``invalid-packageconfig:`` Checks that no undefined features are |
1154 | being added to :term:`PACKAGECONFIG`. For | 1140 | being added to :term:`PACKAGECONFIG`. For |
1155 | example, any name "foo" for which the following form does not exist: | 1141 | example, any name "foo" for which the following form does not exist:: |
1156 | :: | ||
1157 | 1142 | ||
1158 | PACKAGECONFIG[foo] = "..." | 1143 | PACKAGECONFIG[foo] = "..." |
1159 | 1144 | ||
@@ -1636,8 +1621,7 @@ a couple different ways: | |||
1636 | .. note:: | 1621 | .. note:: |
1637 | 1622 | ||
1638 | When creating a recipe this way, the recipe name must follow this | 1623 | When creating a recipe this way, the recipe name must follow this |
1639 | naming convention: | 1624 | naming convention:: |
1640 | :: | ||
1641 | 1625 | ||
1642 | myrecipe-native.bb | 1626 | myrecipe-native.bb |
1643 | 1627 | ||
@@ -1645,8 +1629,7 @@ a couple different ways: | |||
1645 | Not using this naming convention can lead to subtle problems | 1629 | Not using this naming convention can lead to subtle problems |
1646 | caused by existing code that depends on that naming convention. | 1630 | caused by existing code that depends on that naming convention. |
1647 | 1631 | ||
1648 | - Create or modify a target recipe that contains the following: | 1632 | - Create or modify a target recipe that contains the following:: |
1649 | :: | ||
1650 | 1633 | ||
1651 | BBCLASSEXTEND = "native" | 1634 | BBCLASSEXTEND = "native" |
1652 | 1635 | ||
@@ -1677,8 +1660,7 @@ couple different ways: | |||
1677 | inherit statement in the recipe after all other inherit statements so | 1660 | inherit statement in the recipe after all other inherit statements so |
1678 | that the ``nativesdk`` class is inherited last. | 1661 | that the ``nativesdk`` class is inherited last. |
1679 | 1662 | ||
1680 | - Create a ``nativesdk`` variant of any recipe by adding the following: | 1663 | - Create a ``nativesdk`` variant of any recipe by adding the following:: |
1681 | :: | ||
1682 | 1664 | ||
1683 | BBCLASSEXTEND = "nativesdk" | 1665 | BBCLASSEXTEND = "nativesdk" |
1684 | 1666 | ||
@@ -1689,8 +1671,7 @@ couple different ways: | |||
1689 | 1671 | ||
1690 | .. note:: | 1672 | .. note:: |
1691 | 1673 | ||
1692 | When creating a recipe, you must follow this naming convention: | 1674 | When creating a recipe, you must follow this naming convention:: |
1693 | :: | ||
1694 | 1675 | ||
1695 | nativesdk-myrecipe.bb | 1676 | nativesdk-myrecipe.bb |
1696 | 1677 | ||
@@ -1753,8 +1734,7 @@ before attempting to fetch it from the upstream specified in | |||
1753 | :term:`SRC_URI` within each recipe. | 1734 | :term:`SRC_URI` within each recipe. |
1754 | 1735 | ||
1755 | To use this class, inherit it globally and specify | 1736 | To use this class, inherit it globally and specify |
1756 | :term:`SOURCE_MIRROR_URL`. Here is an example: | 1737 | :term:`SOURCE_MIRROR_URL`. Here is an example:: |
1757 | :: | ||
1758 | 1738 | ||
1759 | INHERIT += "own-mirrors" | 1739 | INHERIT += "own-mirrors" |
1760 | SOURCE_MIRROR_URL = "http://example.com/my-source-mirror" | 1740 | SOURCE_MIRROR_URL = "http://example.com/my-source-mirror" |
@@ -2017,8 +1997,7 @@ established and then populates the SDK. After populating the SDK, the | |||
2017 | contains the cross-compiler and associated tooling, and the target, | 1997 | contains the cross-compiler and associated tooling, and the target, |
2018 | which contains a target root filesystem that is configured for the SDK | 1998 | which contains a target root filesystem that is configured for the SDK |
2019 | usage. These two images reside in :term:`SDK_OUTPUT`, | 1999 | usage. These two images reside in :term:`SDK_OUTPUT`, |
2020 | which consists of the following: | 2000 | which consists of the following:: |
2021 | :: | ||
2022 | 2001 | ||
2023 | ${SDK_OUTPUT}/${SDK_ARCH}-nativesdk-pkgs | 2002 | ${SDK_OUTPUT}/${SDK_ARCH}-nativesdk-pkgs |
2024 | ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/target-pkgs | 2003 | ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/target-pkgs |
@@ -2180,8 +2159,7 @@ installed by ``libtool``. Removing these files results in them being | |||
2180 | absent from both the sysroot and target packages. | 2159 | absent from both the sysroot and target packages. |
2181 | 2160 | ||
2182 | If a recipe needs the ``.la`` files to be installed, then the recipe can | 2161 | If a recipe needs the ``.la`` files to be installed, then the recipe can |
2183 | override the removal by setting ``REMOVE_LIBTOOL_LA`` to "0" as follows: | 2162 | override the removal by setting ``REMOVE_LIBTOOL_LA`` to "0" as follows:: |
2184 | :: | ||
2185 | 2163 | ||
2186 | REMOVE_LIBTOOL_LA = "0" | 2164 | REMOVE_LIBTOOL_LA = "0" |
2187 | 2165 | ||
@@ -2231,8 +2209,7 @@ recipe, enabling ``rm_work`` will potentially result in your changes to | |||
2231 | the source being lost. To exclude some recipes from having their work | 2209 | the source being lost. To exclude some recipes from having their work |
2232 | directories deleted by ``rm_work``, you can add the names of the recipe | 2210 | directories deleted by ``rm_work``, you can add the names of the recipe |
2233 | or recipes you are working on to the ``RM_WORK_EXCLUDE`` variable, which | 2211 | or recipes you are working on to the ``RM_WORK_EXCLUDE`` variable, which |
2234 | can also be set in your ``local.conf`` file. Here is an example: | 2212 | can also be set in your ``local.conf`` file. Here is an example:: |
2235 | :: | ||
2236 | 2213 | ||
2237 | RM_WORK_EXCLUDE += "busybox glibc" | 2214 | RM_WORK_EXCLUDE += "busybox glibc" |
2238 | 2215 | ||
@@ -2531,8 +2508,7 @@ You should set :term:`SYSTEMD_SERVICE` to the | |||
2531 | name of the service file. You should also use a package name override to | 2508 | name of the service file. You should also use a package name override to |
2532 | indicate the package to which the value applies. If the value applies to | 2509 | indicate the package to which the value applies. If the value applies to |
2533 | the recipe's main package, use ``${``\ :term:`PN`\ ``}``. Here | 2510 | the recipe's main package, use ``${``\ :term:`PN`\ ``}``. Here |
2534 | is an example from the connman recipe: | 2511 | is an example from the connman recipe:: |
2535 | :: | ||
2536 | 2512 | ||
2537 | SYSTEMD_SERVICE_${PN} = "connman.service" | 2513 | SYSTEMD_SERVICE_${PN} = "connman.service" |
2538 | 2514 | ||
@@ -2608,8 +2584,7 @@ The tests are commands that run on the target system over ``ssh``. Each | |||
2608 | test is written in Python and makes use of the ``unittest`` module. | 2584 | test is written in Python and makes use of the ``unittest`` module. |
2609 | 2585 | ||
2610 | The ``testimage.bbclass`` runs tests on an image when called using the | 2586 | The ``testimage.bbclass`` runs tests on an image when called using the |
2611 | following: | 2587 | following:: |
2612 | :: | ||
2613 | 2588 | ||
2614 | $ bitbake -c testimage image | 2589 | $ bitbake -c testimage image |
2615 | 2590 | ||
@@ -2628,8 +2603,7 @@ section in the Yocto Project Development Tasks Manual. | |||
2628 | 2603 | ||
2629 | This class supports running automated tests against software development | 2604 | This class supports running automated tests against software development |
2630 | kits (SDKs). The ``testsdk`` class runs tests on an SDK when called | 2605 | kits (SDKs). The ``testsdk`` class runs tests on an SDK when called |
2631 | using the following: | 2606 | using the following:: |
2632 | :: | ||
2633 | 2607 | ||
2634 | $ bitbake -c testsdk image | 2608 | $ bitbake -c testsdk image |
2635 | 2609 | ||
@@ -2684,8 +2658,7 @@ the environment for installed SDKs. | |||
2684 | The ``typecheck`` class provides support for validating the values of | 2658 | The ``typecheck`` class provides support for validating the values of |
2685 | variables set at the configuration level against their defined types. | 2659 | variables set at the configuration level against their defined types. |
2686 | The OpenEmbedded build system allows you to define the type of a | 2660 | The OpenEmbedded build system allows you to define the type of a |
2687 | variable using the "type" varflag. Here is an example: | 2661 | variable using the "type" varflag. Here is an example:: |
2688 | :: | ||
2689 | 2662 | ||
2690 | IMAGE_FEATURES[type] = "list" | 2663 | IMAGE_FEATURES[type] = "list" |
2691 | 2664 | ||
@@ -2695,14 +2668,12 @@ variable using the "type" varflag. Here is an example: | |||
2695 | ======================== | 2668 | ======================== |
2696 | 2669 | ||
2697 | The ``uboot-config`` class provides support for U-Boot configuration for | 2670 | The ``uboot-config`` class provides support for U-Boot configuration for |
2698 | a machine. Specify the machine in your recipe as follows: | 2671 | a machine. Specify the machine in your recipe as follows:: |
2699 | :: | ||
2700 | 2672 | ||
2701 | UBOOT_CONFIG ??= <default> | 2673 | UBOOT_CONFIG ??= <default> |
2702 | UBOOT_CONFIG[foo] = "config,images" | 2674 | UBOOT_CONFIG[foo] = "config,images" |
2703 | 2675 | ||
2704 | You can also specify the machine using this method: | 2676 | You can also specify the machine using this method:: |
2705 | :: | ||
2706 | 2677 | ||
2707 | UBOOT_MACHINE = "config" | 2678 | UBOOT_MACHINE = "config" |
2708 | 2679 | ||
diff --git a/documentation/ref-manual/devtool-reference.rst b/documentation/ref-manual/devtool-reference.rst index 629aa2ffb9..0ce3219831 100644 --- a/documentation/ref-manual/devtool-reference.rst +++ b/documentation/ref-manual/devtool-reference.rst | |||
@@ -22,8 +22,7 @@ Getting Help | |||
22 | 22 | ||
23 | The ``devtool`` command line is organized similarly to Git in that it | 23 | The ``devtool`` command line is organized similarly to Git in that it |
24 | has a number of sub-commands for each function. You can run | 24 | has a number of sub-commands for each function. You can run |
25 | ``devtool --help`` to see all the commands: | 25 | ``devtool --help`` to see all the commands:: |
26 | :: | ||
27 | 26 | ||
28 | $ devtool -h | 27 | $ devtool -h |
29 | NOTE: Starting bitbake server... | 28 | NOTE: Starting bitbake server... |
@@ -79,8 +78,7 @@ has a number of sub-commands for each function. You can run | |||
79 | 78 | ||
80 | As directed in the general help output, you can | 79 | As directed in the general help output, you can |
81 | get more syntax on a specific command by providing the command name and | 80 | get more syntax on a specific command by providing the command name and |
82 | using "--help": | 81 | using "--help":: |
83 | :: | ||
84 | 82 | ||
85 | $ devtool add --help | 83 | $ devtool add --help |
86 | NOTE: Starting bitbake server... | 84 | NOTE: Starting bitbake server... |
@@ -172,8 +170,7 @@ you. The source files the recipe uses should exist in an external area. | |||
172 | 170 | ||
173 | The following example creates and adds a new recipe named ``jackson`` to | 171 | The following example creates and adds a new recipe named ``jackson`` to |
174 | a workspace layer the tool creates. The source code built by the recipes | 172 | a workspace layer the tool creates. The source code built by the recipes |
175 | resides in ``/home/user/sources/jackson``: | 173 | resides in ``/home/user/sources/jackson``:: |
176 | :: | ||
177 | 174 | ||
178 | $ devtool add jackson /home/user/sources/jackson | 175 | $ devtool add jackson /home/user/sources/jackson |
179 | 176 | ||
@@ -201,8 +198,7 @@ unpacking files from a remote URI. In some cases, you might want to | |||
201 | specify a source revision by branch, tag, or commit hash. You can | 198 | specify a source revision by branch, tag, or commit hash. You can |
202 | specify these options when using the ``devtool add`` command: | 199 | specify these options when using the ``devtool add`` command: |
203 | 200 | ||
204 | - To specify a source branch, use the ``--srcbranch`` option: | 201 | - To specify a source branch, use the ``--srcbranch`` option:: |
205 | :: | ||
206 | 202 | ||
207 | $ devtool add --srcbranch &DISTRO_NAME_NO_CAP; jackson /home/user/sources/jackson | 203 | $ devtool add --srcbranch &DISTRO_NAME_NO_CAP; jackson /home/user/sources/jackson |
208 | 204 | ||
@@ -210,8 +206,7 @@ specify these options when using the ``devtool add`` command: | |||
210 | branch. | 206 | branch. |
211 | 207 | ||
212 | - To specify a specific tag or commit hash, use the ``--srcrev`` | 208 | - To specify a specific tag or commit hash, use the ``--srcrev`` |
213 | option: | 209 | option:: |
214 | :: | ||
215 | 210 | ||
216 | $ devtool add --srcrev &DISTRO_REL_TAG; jackson /home/user/sources/jackson | 211 | $ devtool add --srcrev &DISTRO_REL_TAG; jackson /home/user/sources/jackson |
217 | $ devtool add --srcrev some_commit_hash /home/user/sources/jackson | 212 | $ devtool add --srcrev some_commit_hash /home/user/sources/jackson |
@@ -269,8 +264,7 @@ The ``devtool modify`` command extracts the source for a recipe, sets it | |||
269 | up as a Git repository if the source had not already been fetched from | 264 | up as a Git repository if the source had not already been fetched from |
270 | Git, checks out a branch for development, and applies any patches from | 265 | Git, checks out a branch for development, and applies any patches from |
271 | the recipe as commits on top. You can use the following command to | 266 | the recipe as commits on top. You can use the following command to |
272 | checkout the source files: | 267 | checkout the source files:: |
273 | :: | ||
274 | 268 | ||
275 | $ devtool modify recipe | 269 | $ devtool modify recipe |
276 | 270 | ||
@@ -309,8 +303,7 @@ compile, and test the code. | |||
309 | 303 | ||
310 | When you are satisfied with the results and you have committed your | 304 | When you are satisfied with the results and you have committed your |
311 | changes to the Git repository, you can then run the | 305 | changes to the Git repository, you can then run the |
312 | ``devtool update-recipe`` to create the patches and update the recipe: | 306 | ``devtool update-recipe`` to create the patches and update the recipe:: |
313 | :: | ||
314 | 307 | ||
315 | $ devtool update-recipe recipe | 308 | $ devtool update-recipe recipe |
316 | 309 | ||
@@ -321,8 +314,7 @@ Often, you might want to apply customizations made to your software in | |||
321 | your own layer rather than apply them to the original recipe. If so, you | 314 | your own layer rather than apply them to the original recipe. If so, you |
322 | can use the ``-a`` or ``--append`` option with the | 315 | can use the ``-a`` or ``--append`` option with the |
323 | ``devtool update-recipe`` command. These options allow you to specify | 316 | ``devtool update-recipe`` command. These options allow you to specify |
324 | the layer into which to write an append file: | 317 | the layer into which to write an append file:: |
325 | :: | ||
326 | 318 | ||
327 | $ devtool update-recipe recipe -a base-layer-directory | 319 | $ devtool update-recipe recipe -a base-layer-directory |
328 | 320 | ||
@@ -358,8 +350,7 @@ particular recipe. | |||
358 | recipe's latest version tag. | 350 | recipe's latest version tag. |
359 | 351 | ||
360 | As with all ``devtool`` commands, you can get help on the individual | 352 | As with all ``devtool`` commands, you can get help on the individual |
361 | command: | 353 | command:: |
362 | :: | ||
363 | 354 | ||
364 | $ devtool check-upgrade-status -h | 355 | $ devtool check-upgrade-status -h |
365 | NOTE: Starting bitbake server... | 356 | NOTE: Starting bitbake server... |
@@ -462,8 +453,7 @@ files have been modified, the command preserves the modified files in a | |||
462 | separate "attic" subdirectory under the workspace layer. | 453 | separate "attic" subdirectory under the workspace layer. |
463 | 454 | ||
464 | Here is an example that resets the workspace directory that contains the | 455 | Here is an example that resets the workspace directory that contains the |
465 | ``mtr`` recipe: | 456 | ``mtr`` recipe:: |
466 | :: | ||
467 | 457 | ||
468 | $ devtool reset mtr | 458 | $ devtool reset mtr |
469 | NOTE: Cleaning sysroot for recipe mtr... | 459 | NOTE: Cleaning sysroot for recipe mtr... |
@@ -482,8 +472,7 @@ Use the ``devtool build`` command to build your recipe. The | |||
482 | When you use the ``devtool build`` command, you must supply the root | 472 | When you use the ``devtool build`` command, you must supply the root |
483 | name of the recipe (i.e. do not provide versions, paths, or extensions). | 473 | name of the recipe (i.e. do not provide versions, paths, or extensions). |
484 | You can use either the "-s" or the "--disable-parallel-make" options to | 474 | You can use either the "-s" or the "--disable-parallel-make" options to |
485 | disable parallel makes during the build. Here is an example: | 475 | disable parallel makes during the build. Here is an example:: |
486 | :: | ||
487 | 476 | ||
488 | $ devtool build recipe | 477 | $ devtool build recipe |
489 | 478 | ||
@@ -499,8 +488,7 @@ device for testing. For proper integration into a final image, you need | |||
499 | to edit your custom image recipe appropriately. | 488 | to edit your custom image recipe appropriately. |
500 | 489 | ||
501 | When you use the ``devtool build-image`` command, you must supply the | 490 | When you use the ``devtool build-image`` command, you must supply the |
502 | name of the image. This command has no command line options: | 491 | name of the image. This command has no command line options:: |
503 | :: | ||
504 | 492 | ||
505 | $ devtool build-image image | 493 | $ devtool build-image image |
506 | 494 | ||
@@ -510,8 +498,7 @@ Deploying Your Software on the Target Machine | |||
510 | ============================================= | 498 | ============================================= |
511 | 499 | ||
512 | Use the ``devtool deploy-target`` command to deploy the recipe's build | 500 | Use the ``devtool deploy-target`` command to deploy the recipe's build |
513 | output to the live target machine: | 501 | output to the live target machine:: |
514 | :: | ||
515 | 502 | ||
516 | $ devtool deploy-target recipe target | 503 | $ devtool deploy-target recipe target |
517 | 504 | ||
@@ -582,15 +569,13 @@ new workspace layer, it is populated with the ``README`` file and the | |||
582 | ``conf`` directory only. | 569 | ``conf`` directory only. |
583 | 570 | ||
584 | The following example creates a new workspace layer in your current | 571 | The following example creates a new workspace layer in your current |
585 | working and by default names the workspace layer "workspace": | 572 | working and by default names the workspace layer "workspace":: |
586 | :: | ||
587 | 573 | ||
588 | $ devtool create-workspace | 574 | $ devtool create-workspace |
589 | 575 | ||
590 | You can create a workspace layer anywhere by supplying a pathname with | 576 | You can create a workspace layer anywhere by supplying a pathname with |
591 | the command. The following command creates a new workspace layer named | 577 | the command. The following command creates a new workspace layer named |
592 | "new-workspace": | 578 | "new-workspace":: |
593 | :: | ||
594 | 579 | ||
595 | $ devtool create-workspace /home/scottrif/new-workspace | 580 | $ devtool create-workspace /home/scottrif/new-workspace |
596 | 581 | ||
@@ -603,15 +588,13 @@ Use the ``devtool status`` command to list the recipes currently in your | |||
603 | workspace. Information includes the paths to their respective external | 588 | workspace. Information includes the paths to their respective external |
604 | source trees. | 589 | source trees. |
605 | 590 | ||
606 | The ``devtool status`` command has no command-line options: | 591 | The ``devtool status`` command has no command-line options:: |
607 | :: | ||
608 | 592 | ||
609 | $ devtool status | 593 | $ devtool status |
610 | 594 | ||
611 | Following is sample output after using | 595 | Following is sample output after using |
612 | :ref:`devtool add <ref-manual/devtool-reference:adding a new recipe to the workspace layer>` | 596 | :ref:`devtool add <ref-manual/devtool-reference:adding a new recipe to the workspace layer>` |
613 | to create and add the ``mtr_0.86.bb`` recipe to the ``workspace`` directory: | 597 | to create and add the ``mtr_0.86.bb`` recipe to the ``workspace`` directory:: |
614 | :: | ||
615 | 598 | ||
616 | $ devtool status | 599 | $ devtool status |
617 | mtr:/home/scottrif/poky/build/workspace/sources/mtr (/home/scottrif/poky/build/workspace/recipes/mtr/mtr_0.86.bb) | 600 | mtr:/home/scottrif/poky/build/workspace/sources/mtr (/home/scottrif/poky/build/workspace/recipes/mtr/mtr_0.86.bb) |
diff --git a/documentation/ref-manual/faq.rst b/documentation/ref-manual/faq.rst index a9103f83c6..e7bca829a3 100644 --- a/documentation/ref-manual/faq.rst +++ b/documentation/ref-manual/faq.rst | |||
@@ -209,8 +209,7 @@ section in the Yocto Project Development Tasks Manual. | |||
209 | **A:** You need to create a form factor file as described in the | 209 | **A:** You need to create a form factor file as described in the |
210 | ":ref:`bsp-guide/bsp:miscellaneous bsp-specific recipe files`" section in | 210 | ":ref:`bsp-guide/bsp:miscellaneous bsp-specific recipe files`" section in |
211 | the Yocto Project Board Support Packages (BSP) Developer's Guide. Set | 211 | the Yocto Project Board Support Packages (BSP) Developer's Guide. Set |
212 | the ``HAVE_TOUCHSCREEN`` variable equal to one as follows: | 212 | the ``HAVE_TOUCHSCREEN`` variable equal to one as follows:: |
213 | :: | ||
214 | 213 | ||
215 | HAVE_TOUCHSCREEN=1 | 214 | HAVE_TOUCHSCREEN=1 |
216 | 215 | ||
@@ -313,8 +312,7 @@ HTTPS requests and direct them to the ``http://`` sources mirror. You | |||
313 | can use ``file://`` URLs to point to local directories or network shares | 312 | can use ``file://`` URLs to point to local directories or network shares |
314 | as well. | 313 | as well. |
315 | 314 | ||
316 | Aside from the previous technique, these options also exist: | 315 | Aside from the previous technique, these options also exist:: |
317 | :: | ||
318 | 316 | ||
319 | BB_NO_NETWORK = "1" | 317 | BB_NO_NETWORK = "1" |
320 | 318 | ||
@@ -322,8 +320,7 @@ This statement tells BitBake to issue an error | |||
322 | instead of trying to access the Internet. This technique is useful if | 320 | instead of trying to access the Internet. This technique is useful if |
323 | you want to ensure code builds only from local sources. | 321 | you want to ensure code builds only from local sources. |
324 | 322 | ||
325 | Here is another technique: | 323 | Here is another technique:: |
326 | :: | ||
327 | 324 | ||
328 | BB_FETCH_PREMIRRORONLY = "1" | 325 | BB_FETCH_PREMIRRORONLY = "1" |
329 | 326 | ||
@@ -331,8 +328,7 @@ This statement | |||
331 | limits the build system to pulling source from the ``PREMIRRORS`` only. | 328 | limits the build system to pulling source from the ``PREMIRRORS`` only. |
332 | Again, this technique is useful for reproducing builds. | 329 | Again, this technique is useful for reproducing builds. |
333 | 330 | ||
334 | Here is another technique: | 331 | Here is another technique:: |
335 | :: | ||
336 | 332 | ||
337 | BB_GENERATE_MIRROR_TARBALLS = "1" | 333 | BB_GENERATE_MIRROR_TARBALLS = "1" |
338 | 334 | ||
diff --git a/documentation/ref-manual/features.rst b/documentation/ref-manual/features.rst index 89c06eb65f..eb4947d594 100644 --- a/documentation/ref-manual/features.rst +++ b/documentation/ref-manual/features.rst | |||
@@ -26,8 +26,7 @@ One method you can use to determine which recipes are checking to see if | |||
26 | a particular feature is contained or not is to ``grep`` through the | 26 | a particular feature is contained or not is to ``grep`` through the |
27 | :term:`Metadata` for the feature. Here is an example that | 27 | :term:`Metadata` for the feature. Here is an example that |
28 | discovers the recipes whose build is potentially changed based on a | 28 | discovers the recipes whose build is potentially changed based on a |
29 | given feature: | 29 | given feature:: |
30 | :: | ||
31 | 30 | ||
32 | $ cd poky | 31 | $ cd poky |
33 | $ git grep 'contains.*MACHINE_FEATURES.*feature' | 32 | $ git grep 'contains.*MACHINE_FEATURES.*feature' |
diff --git a/documentation/ref-manual/images.rst b/documentation/ref-manual/images.rst index 6b4e958a85..b2db1a7734 100644 --- a/documentation/ref-manual/images.rst +++ b/documentation/ref-manual/images.rst | |||
@@ -18,8 +18,7 @@ image you want. | |||
18 | are going to build an image using non-GPLv3 and similarly licensed | 18 | are going to build an image using non-GPLv3 and similarly licensed |
19 | components, you must make the following changes in the ``local.conf`` | 19 | components, you must make the following changes in the ``local.conf`` |
20 | file before using the BitBake command to build the minimal or base | 20 | file before using the BitBake command to build the minimal or base |
21 | image: | 21 | image:: |
22 | :: | ||
23 | 22 | ||
24 | 1. Comment out the EXTRA_IMAGE_FEATURES line | 23 | 1. Comment out the EXTRA_IMAGE_FEATURES line |
25 | 2. Set INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0" | 24 | 2. Set INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0" |
diff --git a/documentation/ref-manual/kickstart.rst b/documentation/ref-manual/kickstart.rst index b87cdc13b1..843292b528 100644 --- a/documentation/ref-manual/kickstart.rst +++ b/documentation/ref-manual/kickstart.rst | |||
@@ -30,8 +30,7 @@ Command: part or partition | |||
30 | ========================== | 30 | ========================== |
31 | 31 | ||
32 | Either of these commands creates a partition on the system and uses the | 32 | Either of these commands creates a partition on the system and uses the |
33 | following syntax: | 33 | following syntax:: |
34 | :: | ||
35 | 34 | ||
36 | part [mntpoint] | 35 | part [mntpoint] |
37 | partition [mntpoint] | 36 | partition [mntpoint] |
@@ -59,8 +58,7 @@ must also provide one of the ``--ondrive``, ``--ondisk``, or | |||
59 | versions of these application are currently excluded. | 58 | versions of these application are currently excluded. |
60 | 59 | ||
61 | Here is an example that uses "/" as the mountpoint. The command uses | 60 | Here is an example that uses "/" as the mountpoint. The command uses |
62 | ``--ondisk`` to force the partition onto the ``sdb`` disk: | 61 | ``--ondisk`` to force the partition onto the ``sdb`` disk:: |
63 | :: | ||
64 | 62 | ||
65 | part / --source rootfs --ondisk sdb --fstype=ext3 --label platform --align 1024 | 63 | part / --source rootfs --ondisk sdb --fstype=ext3 --label platform --align 1024 |
66 | 64 | ||
diff --git a/documentation/ref-manual/migration-1.3.rst b/documentation/ref-manual/migration-1.3.rst index 7c522dc123..b90767ff90 100644 --- a/documentation/ref-manual/migration-1.3.rst +++ b/documentation/ref-manual/migration-1.3.rst | |||
@@ -181,8 +181,7 @@ Linux Kernel Naming | |||
181 | ------------------- | 181 | ------------------- |
182 | 182 | ||
183 | The naming scheme for kernel output binaries has been changed to now | 183 | The naming scheme for kernel output binaries has been changed to now |
184 | include :term:`PE` as part of the filename: | 184 | include :term:`PE` as part of the filename:: |
185 | :: | ||
186 | 185 | ||
187 | KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}" | 186 | KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}" |
188 | 187 | ||
diff --git a/documentation/ref-manual/migration-1.4.rst b/documentation/ref-manual/migration-1.4.rst index f5fac7a2ac..deb848749c 100644 --- a/documentation/ref-manual/migration-1.4.rst +++ b/documentation/ref-manual/migration-1.4.rst | |||
@@ -40,8 +40,7 @@ Differences include the following: | |||
40 | 40 | ||
41 | - *Shared State Code:* The shared state code has been optimized to | 41 | - *Shared State Code:* The shared state code has been optimized to |
42 | avoid running unnecessary tasks. For example, the following no longer | 42 | avoid running unnecessary tasks. For example, the following no longer |
43 | populates the target sysroot since that is not necessary: | 43 | populates the target sysroot since that is not necessary:: |
44 | :: | ||
45 | 44 | ||
46 | $ bitbake -c rootfs some-image | 45 | $ bitbake -c rootfs some-image |
47 | 46 | ||
@@ -136,8 +135,7 @@ Target Package Management with RPM | |||
136 | If runtime package management is enabled and the RPM backend is | 135 | If runtime package management is enabled and the RPM backend is |
137 | selected, Smart is now installed for package download, dependency | 136 | selected, Smart is now installed for package download, dependency |
138 | resolution, and upgrades instead of Zypper. For more information on how | 137 | resolution, and upgrades instead of Zypper. For more information on how |
139 | to use Smart, run the following command on the target: | 138 | to use Smart, run the following command on the target:: |
140 | :: | ||
141 | 139 | ||
142 | smart --help | 140 | smart --help |
143 | 141 | ||
diff --git a/documentation/ref-manual/migration-1.6.rst b/documentation/ref-manual/migration-1.6.rst index fe3e04d685..5a18d63103 100644 --- a/documentation/ref-manual/migration-1.6.rst +++ b/documentation/ref-manual/migration-1.6.rst | |||
@@ -53,8 +53,7 @@ Matching Branch Requirement for Git Fetching | |||
53 | When fetching source from a Git repository using | 53 | When fetching source from a Git repository using |
54 | :term:`SRC_URI`, BitBake will now validate the | 54 | :term:`SRC_URI`, BitBake will now validate the |
55 | :term:`SRCREV` value against the branch. You can specify | 55 | :term:`SRCREV` value against the branch. You can specify |
56 | the branch using the following form: | 56 | the branch using the following form:: |
57 | :: | ||
58 | 57 | ||
59 | SRC_URI = "git://server.name/repository;branch=branchname" | 58 | SRC_URI = "git://server.name/repository;branch=branchname" |
60 | 59 | ||
@@ -248,8 +247,7 @@ the ``autotools`` or ``autotools_stage``\ classes. | |||
248 | 247 | ||
249 | ``qemu-native`` now builds without SDL-based graphical output support by | 248 | ``qemu-native`` now builds without SDL-based graphical output support by |
250 | default. The following additional lines are needed in your | 249 | default. The following additional lines are needed in your |
251 | ``local.conf`` to enable it: | 250 | ``local.conf`` to enable it:: |
252 | :: | ||
253 | 251 | ||
254 | PACKAGECONFIG_pn-qemu-native = "sdl" | 252 | PACKAGECONFIG_pn-qemu-native = "sdl" |
255 | ASSUME_PROVIDED += "libsdl-native" | 253 | ASSUME_PROVIDED += "libsdl-native" |
diff --git a/documentation/ref-manual/migration-1.7.rst b/documentation/ref-manual/migration-1.7.rst index 9cf467f28b..46bf126583 100644 --- a/documentation/ref-manual/migration-1.7.rst +++ b/documentation/ref-manual/migration-1.7.rst | |||
@@ -15,8 +15,7 @@ optional features. The method used to set defaults for these options | |||
15 | means that existing ``local.conf`` files will need to be modified to | 15 | means that existing ``local.conf`` files will need to be modified to |
16 | append to ``PACKAGECONFIG`` for ``qemu-native`` and ``nativesdk-qemu`` | 16 | append to ``PACKAGECONFIG`` for ``qemu-native`` and ``nativesdk-qemu`` |
17 | instead of setting it. In other words, to enable graphical output for | 17 | instead of setting it. In other words, to enable graphical output for |
18 | QEMU, you should now have these lines in ``local.conf``: | 18 | QEMU, you should now have these lines in ``local.conf``:: |
19 | :: | ||
20 | 19 | ||
21 | PACKAGECONFIG_append_pn-qemu-native = " sdl" | 20 | PACKAGECONFIG_append_pn-qemu-native = " sdl" |
22 | PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" | 21 | PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" |
@@ -80,8 +79,7 @@ disable the scripts due to the scripts previously requiring error-prone | |||
80 | path substitution. Software that links against these libraries using | 79 | path substitution. Software that links against these libraries using |
81 | these scripts should use the much more robust ``pkg-config`` instead. | 80 | these scripts should use the much more robust ``pkg-config`` instead. |
82 | The list of recipes changed in this version (and their configuration | 81 | The list of recipes changed in this version (and their configuration |
83 | scripts) is as follows: | 82 | scripts) is as follows:: |
84 | :: | ||
85 | 83 | ||
86 | directfb (directfb-config) | 84 | directfb (directfb-config) |
87 | freetype (freetype-config) | 85 | freetype (freetype-config) |
diff --git a/documentation/ref-manual/migration-2.0.rst b/documentation/ref-manual/migration-2.0.rst index 9da60dfdcb..8319b0ee36 100644 --- a/documentation/ref-manual/migration-2.0.rst +++ b/documentation/ref-manual/migration-2.0.rst | |||
@@ -25,8 +25,7 @@ and the porting guide at | |||
25 | https://gcc.gnu.org/gcc-5/porting_to.html. | 25 | https://gcc.gnu.org/gcc-5/porting_to.html. |
26 | 26 | ||
27 | Alternatively, you can switch back to GCC 4.9 or 4.8 by setting | 27 | Alternatively, you can switch back to GCC 4.9 or 4.8 by setting |
28 | ``GCCVERSION`` in your configuration, as follows: | 28 | ``GCCVERSION`` in your configuration, as follows:: |
29 | :: | ||
30 | 29 | ||
31 | GCCVERSION = "4.9%" | 30 | GCCVERSION = "4.9%" |
32 | 31 | ||
@@ -91,8 +90,7 @@ unlikely to require any changes to Metadata. However, these minor | |||
91 | changes in behavior exist: | 90 | changes in behavior exist: |
92 | 91 | ||
93 | - All potential overrides are now visible in the variable history as | 92 | - All potential overrides are now visible in the variable history as |
94 | seen when you run the following: | 93 | seen when you run the following:: |
95 | :: | ||
96 | 94 | ||
97 | $ bitbake -e | 95 | $ bitbake -e |
98 | 96 | ||
@@ -200,8 +198,7 @@ changes. | |||
200 | 198 | ||
201 | Additionally, work directories for old versions of recipes are now | 199 | Additionally, work directories for old versions of recipes are now |
202 | pruned. If you wish to disable pruning old work directories, you can set | 200 | pruned. If you wish to disable pruning old work directories, you can set |
203 | the following variable in your configuration: | 201 | the following variable in your configuration:: |
204 | :: | ||
205 | 202 | ||
206 | SSTATE_PRUNE_OBSOLETEWORKDIR = "0" | 203 | SSTATE_PRUNE_OBSOLETEWORKDIR = "0" |
207 | 204 | ||
diff --git a/documentation/ref-manual/migration-2.1.rst b/documentation/ref-manual/migration-2.1.rst index 1eb9ab5525..32d193f0ff 100644 --- a/documentation/ref-manual/migration-2.1.rst +++ b/documentation/ref-manual/migration-2.1.rst | |||
@@ -42,8 +42,7 @@ defaulted to False if not specified. Now, however, no default exists so | |||
42 | one must be specified. You must change any ``getVar()`` calls that do | 42 | one must be specified. You must change any ``getVar()`` calls that do |
43 | not specify the final expand parameter to calls that do specify the | 43 | not specify the final expand parameter to calls that do specify the |
44 | parameter. You can run the following ``sed`` command at the base of a | 44 | parameter. You can run the following ``sed`` command at the base of a |
45 | layer to make this change: | 45 | layer to make this change:: |
46 | :: | ||
47 | 46 | ||
48 | sed -e 's:\(\.getVar([^,()]*\)):\1, False):g' -i `grep -ril getVar *` | 47 | sed -e 's:\(\.getVar([^,()]*\)):\1, False):g' -i `grep -ril getVar *` |
49 | sed -e 's:\(\.getVarFlag([^,()]*,[^,()]*\)):\1, False):g' -i `grep -ril getVarFlag *` | 48 | sed -e 's:\(\.getVarFlag([^,()]*,[^,()]*\)):\1, False):g' -i `grep -ril getVarFlag *` |
@@ -285,8 +284,7 @@ The following changes have been made for the Poky distribution: | |||
285 | Any recipe that needs to opt-out of having the "--disable-static" | 284 | Any recipe that needs to opt-out of having the "--disable-static" |
286 | option specified on the configure command line either because it is | 285 | option specified on the configure command line either because it is |
287 | not a supported option for the configure script or because static | 286 | not a supported option for the configure script or because static |
288 | libraries are needed should set the following variable: | 287 | libraries are needed should set the following variable:: |
289 | :: | ||
290 | 288 | ||
291 | DISABLE_STATIC = "" | 289 | DISABLE_STATIC = "" |
292 | 290 | ||
@@ -369,8 +367,7 @@ These additional changes exist: | |||
369 | - Previously, the following list of packages were removed if | 367 | - Previously, the following list of packages were removed if |
370 | package-management was not in | 368 | package-management was not in |
371 | :term:`IMAGE_FEATURES`, regardless of any | 369 | :term:`IMAGE_FEATURES`, regardless of any |
372 | dependencies: | 370 | dependencies:: |
373 | :: | ||
374 | 371 | ||
375 | update-rc.d | 372 | update-rc.d |
376 | base-passwd | 373 | base-passwd |
diff --git a/documentation/ref-manual/migration-2.2.rst b/documentation/ref-manual/migration-2.2.rst index d11735163e..a9d3cde7b7 100644 --- a/documentation/ref-manual/migration-2.2.rst +++ b/documentation/ref-manual/migration-2.2.rst | |||
@@ -144,8 +144,7 @@ The new ``runqemu`` is a Python script. Machine knowledge is no longer | |||
144 | hardcoded into ``runqemu``. You can choose to use the ``qemuboot`` | 144 | hardcoded into ``runqemu``. You can choose to use the ``qemuboot`` |
145 | configuration file to define the BSP's own arguments and to make it | 145 | configuration file to define the BSP's own arguments and to make it |
146 | bootable with ``runqemu``. If you use a configuration file, use the | 146 | bootable with ``runqemu``. If you use a configuration file, use the |
147 | following form: | 147 | following form:: |
148 | :: | ||
149 | 148 | ||
150 | image-name-machine.qemuboot.conf | 149 | image-name-machine.qemuboot.conf |
151 | 150 | ||
@@ -160,8 +159,7 @@ rootfs). QEMU boot arguments can be set in BSP's configuration file and | |||
160 | the ``qemuboot`` class will save them to ``qemuboot.conf``. | 159 | the ``qemuboot`` class will save them to ``qemuboot.conf``. |
161 | 160 | ||
162 | If you want to use ``runqemu`` without a configuration file, use the | 161 | If you want to use ``runqemu`` without a configuration file, use the |
163 | following command form: | 162 | following command form:: |
164 | :: | ||
165 | 163 | ||
166 | $ runqemu machine rootfs kernel [options] | 164 | $ runqemu machine rootfs kernel [options] |
167 | 165 | ||
@@ -244,8 +242,7 @@ recipes. You need to fix these recipes so that they use the expected | |||
244 | ``LDFLAGS``. Depending on how the software is built, the build system | 242 | ``LDFLAGS``. Depending on how the software is built, the build system |
245 | used by the software (e.g. a Makefile) might need to be patched. | 243 | used by the software (e.g. a Makefile) might need to be patched. |
246 | However, sometimes making this fix is as simple as adding the following | 244 | However, sometimes making this fix is as simple as adding the following |
247 | to the recipe: | 245 | to the recipe:: |
248 | :: | ||
249 | 246 | ||
250 | TARGET_CC_ARCH += "${LDFLAGS}" | 247 | TARGET_CC_ARCH += "${LDFLAGS}" |
251 | 248 | ||
@@ -258,8 +255,7 @@ The ``KERNEL_IMAGE_BASE_NAME`` variable no longer uses the | |||
258 | :term:`KERNEL_IMAGETYPE` variable to create the | 255 | :term:`KERNEL_IMAGETYPE` variable to create the |
259 | image's base name. Because the OpenEmbedded build system can now build | 256 | image's base name. Because the OpenEmbedded build system can now build |
260 | multiple kernel image types, this part of the kernel image base name as | 257 | multiple kernel image types, this part of the kernel image base name as |
261 | been removed leaving only the following: | 258 | been removed leaving only the following:: |
262 | :: | ||
263 | 259 | ||
264 | KERNEL_IMAGE_BASE_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" | 260 | KERNEL_IMAGE_BASE_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" |
265 | 261 | ||
diff --git a/documentation/ref-manual/migration-2.3.rst b/documentation/ref-manual/migration-2.3.rst index 0541eb3e74..dfbda612ae 100644 --- a/documentation/ref-manual/migration-2.3.rst +++ b/documentation/ref-manual/migration-2.3.rst | |||
@@ -114,8 +114,7 @@ Changes to Scripts | |||
114 | The following changes to scripts took place: | 114 | The following changes to scripts took place: |
115 | 115 | ||
116 | - ``oe-find-native-sysroot``: The usage for the | 116 | - ``oe-find-native-sysroot``: The usage for the |
117 | ``oe-find-native-sysroot`` script has changed to the following: | 117 | ``oe-find-native-sysroot`` script has changed to the following:: |
118 | :: | ||
119 | 118 | ||
120 | $ . oe-find-native-sysroot recipe | 119 | $ . oe-find-native-sysroot recipe |
121 | 120 | ||
@@ -124,8 +123,7 @@ The following changes to scripts took place: | |||
124 | was not necessary to provide the script with the command. | 123 | was not necessary to provide the script with the command. |
125 | 124 | ||
126 | - ``oe-run-native``: The usage for the ``oe-run-native`` script has | 125 | - ``oe-run-native``: The usage for the ``oe-run-native`` script has |
127 | changed to the following: | 126 | changed to the following:: |
128 | :: | ||
129 | 127 | ||
130 | $ oe-run-native native_recipe tool | 128 | $ oe-run-native native_recipe tool |
131 | 129 | ||
@@ -453,14 +451,11 @@ The following miscellaneous changes have occurred: | |||
453 | tools. | 451 | tools. |
454 | 452 | ||
455 | - The ``USE_LDCONFIG`` variable has been replaced with the "ldconfig" | 453 | - The ``USE_LDCONFIG`` variable has been replaced with the "ldconfig" |
456 | ``DISTRO_FEATURES`` feature. Distributions that previously set: | 454 | ``DISTRO_FEATURES`` feature. Distributions that previously set:: |
457 | :: | ||
458 | 455 | ||
459 | USE_LDCONFIG = "0" | 456 | USE_LDCONFIG = "0" |
460 | 457 | ||
461 | should now instead use the following: | 458 | should now instead use the following:: |
462 | |||
463 | :: | ||
464 | 459 | ||
465 | DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " ldconfig" | 460 | DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " ldconfig" |
466 | 461 | ||
@@ -478,8 +473,7 @@ The following miscellaneous changes have occurred: | |||
478 | order to allow module packages from multiple kernel versions to | 473 | order to allow module packages from multiple kernel versions to |
479 | co-exist on a target system. If you wish to return to the previous | 474 | co-exist on a target system. If you wish to return to the previous |
480 | naming scheme that does not include the version suffix, use the | 475 | naming scheme that does not include the version suffix, use the |
481 | following: | 476 | following:: |
482 | :: | ||
483 | 477 | ||
484 | KERNEL_MODULE_PACKAGE_SUFFIX = "" | 478 | KERNEL_MODULE_PACKAGE_SUFFIX = "" |
485 | 479 | ||
diff --git a/documentation/ref-manual/migration-2.5.rst b/documentation/ref-manual/migration-2.5.rst index fd5f2f88e0..86a0da9c40 100644 --- a/documentation/ref-manual/migration-2.5.rst +++ b/documentation/ref-manual/migration-2.5.rst | |||
@@ -138,13 +138,11 @@ The following are BitBake changes: | |||
138 | tree" tasks have been removed (e.g. ``fetchall``, ``checkuriall``, | 138 | tree" tasks have been removed (e.g. ``fetchall``, ``checkuriall``, |
139 | and the ``*all`` tasks provided by the ``distrodata`` and | 139 | and the ``*all`` tasks provided by the ``distrodata`` and |
140 | ``archiver`` classes). There is a BitBake option to complete this for | 140 | ``archiver`` classes). There is a BitBake option to complete this for |
141 | any arbitrary task. For example: | 141 | any arbitrary task. For example:: |
142 | :: | ||
143 | 142 | ||
144 | bitbake <target> -c fetchall | 143 | bitbake <target> -c fetchall |
145 | 144 | ||
146 | should now be replaced with: | 145 | should now be replaced with:: |
147 | :: | ||
148 | 146 | ||
149 | bitbake <target> --runall=fetch | 147 | bitbake <target> --runall=fetch |
150 | 148 | ||
diff --git a/documentation/ref-manual/migration-2.6.rst b/documentation/ref-manual/migration-2.6.rst index aeac509808..d1c6c0c5f5 100644 --- a/documentation/ref-manual/migration-2.6.rst +++ b/documentation/ref-manual/migration-2.6.rst | |||
@@ -161,13 +161,11 @@ The following changes have been made: | |||
161 | allows easier and more direct changes. | 161 | allows easier and more direct changes. |
162 | 162 | ||
163 | The ``IMAGE_VERSION_SUFFIX`` variable is set in the ``bitbake.conf`` | 163 | The ``IMAGE_VERSION_SUFFIX`` variable is set in the ``bitbake.conf`` |
164 | configuration file as follows: | 164 | configuration file as follows:: |
165 | :: | ||
166 | 165 | ||
167 | IMAGE_VERSION_SUFFIX = "-${DATETIME}" | 166 | IMAGE_VERSION_SUFFIX = "-${DATETIME}" |
168 | 167 | ||
169 | - Several variables have changed names for consistency: | 168 | - Several variables have changed names for consistency:: |
170 | :: | ||
171 | 169 | ||
172 | Old Variable Name New Variable Name | 170 | Old Variable Name New Variable Name |
173 | ======================================================== | 171 | ======================================================== |
@@ -292,8 +290,7 @@ avoids the ``systemd`` recipe from becoming machine-specific for cases | |||
292 | where machine-specific configurations need to be applied (e.g. for | 290 | where machine-specific configurations need to be applied (e.g. for |
293 | ``qemu*`` machines). | 291 | ``qemu*`` machines). |
294 | 292 | ||
295 | Currently, the new recipe packages the following files: | 293 | Currently, the new recipe packages the following files:: |
296 | :: | ||
297 | 294 | ||
298 | ${sysconfdir}/machine-id | 295 | ${sysconfdir}/machine-id |
299 | ${sysconfdir}/systemd/coredump.conf | 296 | ${sysconfdir}/systemd/coredump.conf |
@@ -393,8 +390,7 @@ If you wish to disable Python profile-guided optimization regardless of | |||
393 | the value of ``MACHINE_FEATURES``, then ensure that | 390 | the value of ``MACHINE_FEATURES``, then ensure that |
394 | :term:`PACKAGECONFIG` for the ``python3`` recipe | 391 | :term:`PACKAGECONFIG` for the ``python3`` recipe |
395 | does not contain "pgo". You could accomplish the latter using the | 392 | does not contain "pgo". You could accomplish the latter using the |
396 | following at the configuration level: | 393 | following at the configuration level:: |
397 | :: | ||
398 | 394 | ||
399 | PACKAGECONFIG_remove_pn-python3 = "pgo" | 395 | PACKAGECONFIG_remove_pn-python3 = "pgo" |
400 | 396 | ||
@@ -411,8 +407,7 @@ The following miscellaneous changes occurred: | |||
411 | - Default to using the Thumb-2 instruction set for armv7a and above. If | 407 | - Default to using the Thumb-2 instruction set for armv7a and above. If |
412 | you have any custom recipes that build software that needs to be | 408 | you have any custom recipes that build software that needs to be |
413 | built with the ARM instruction set, change the recipe to set the | 409 | built with the ARM instruction set, change the recipe to set the |
414 | instruction set as follows: | 410 | instruction set as follows:: |
415 | :: | ||
416 | 411 | ||
417 | ARM_INSTRUCTION_SET = "arm" | 412 | ARM_INSTRUCTION_SET = "arm" |
418 | 413 | ||
diff --git a/documentation/ref-manual/migration-3.1.rst b/documentation/ref-manual/migration-3.1.rst index c62aba7d48..7822285a87 100644 --- a/documentation/ref-manual/migration-3.1.rst +++ b/documentation/ref-manual/migration-3.1.rst | |||
@@ -71,8 +71,7 @@ when building a simple image such as core-image-minimal. If you do not | |||
71 | need runtime tests enabled for core components, then it is recommended | 71 | need runtime tests enabled for core components, then it is recommended |
72 | that you remove "ptest" from | 72 | that you remove "ptest" from |
73 | :term:`DISTRO_FEATURES` to save a significant | 73 | :term:`DISTRO_FEATURES` to save a significant |
74 | amount of build time e.g. by adding the following in your configuration: | 74 | amount of build time e.g. by adding the following in your configuration:: |
75 | :: | ||
76 | 75 | ||
77 | DISTRO_FEATURES_remove = "ptest" | 76 | DISTRO_FEATURES_remove = "ptest" |
78 | 77 | ||
diff --git a/documentation/ref-manual/qa-checks.rst b/documentation/ref-manual/qa-checks.rst index 79d2d4266a..9cc4c577c7 100644 --- a/documentation/ref-manual/qa-checks.rst +++ b/documentation/ref-manual/qa-checks.rst | |||
@@ -221,8 +221,7 @@ Errors and Warnings | |||
221 | Typically, the way to solve this performance issue is to add "-fPIC" | 221 | Typically, the way to solve this performance issue is to add "-fPIC" |
222 | or "-fpic" to the compiler command-line options. For example, given | 222 | or "-fpic" to the compiler command-line options. For example, given |
223 | software that reads :term:`CFLAGS` when you build it, | 223 | software that reads :term:`CFLAGS` when you build it, |
224 | you could add the following to your recipe: | 224 | you could add the following to your recipe:: |
225 | :: | ||
226 | 225 | ||
227 | CFLAGS_append = " -fPIC " | 226 | CFLAGS_append = " -fPIC " |
228 | 227 | ||
@@ -240,8 +239,7 @@ Errors and Warnings | |||
240 | variable is being passed to the linker command. A common workaround | 239 | variable is being passed to the linker command. A common workaround |
241 | for this situation is to pass in ``LDFLAGS`` using | 240 | for this situation is to pass in ``LDFLAGS`` using |
242 | :term:`TARGET_CC_ARCH` within the recipe as | 241 | :term:`TARGET_CC_ARCH` within the recipe as |
243 | follows: | 242 | follows:: |
244 | :: | ||
245 | 243 | ||
246 | TARGET_CC_ARCH += "${LDFLAGS}" | 244 | TARGET_CC_ARCH += "${LDFLAGS}" |
247 | 245 | ||
@@ -265,8 +263,7 @@ Errors and Warnings | |||
265 | 263 | ||
266 | The ``/usr/share/info/dir`` should not be packaged. Add the following | 264 | The ``/usr/share/info/dir`` should not be packaged. Add the following |
267 | line to your :ref:`ref-tasks-install` task or to your | 265 | line to your :ref:`ref-tasks-install` task or to your |
268 | ``do_install_append`` within the recipe as follows: | 266 | ``do_install_append`` within the recipe as follows:: |
269 | :: | ||
270 | 267 | ||
271 | rm ${D}${infodir}/dir | 268 | rm ${D}${infodir}/dir |
272 | 269 | ||
diff --git a/documentation/ref-manual/structure.rst b/documentation/ref-manual/structure.rst index 0f2093a8d4..f8dc7d2821 100644 --- a/documentation/ref-manual/structure.rst +++ b/documentation/ref-manual/structure.rst | |||
@@ -153,8 +153,7 @@ When you run this script, your Yocto Project environment is set up, a | |||
153 | :term:`Build Directory` is created, your working | 153 | :term:`Build Directory` is created, your working |
154 | directory becomes the Build Directory, and you are presented with some | 154 | directory becomes the Build Directory, and you are presented with some |
155 | simple suggestions as to what to do next, including a list of some | 155 | simple suggestions as to what to do next, including a list of some |
156 | possible targets to build. Here is an example: | 156 | possible targets to build. Here is an example:: |
157 | :: | ||
158 | 157 | ||
159 | $ source oe-init-build-env | 158 | $ source oe-init-build-env |
160 | 159 | ||
@@ -185,8 +184,7 @@ creates the ``build/`` directory in your current working directory. If | |||
185 | you provide a Build Directory argument when you ``source`` the script, | 184 | you provide a Build Directory argument when you ``source`` the script, |
186 | you direct the OpenEmbedded build system to create a Build Directory of | 185 | you direct the OpenEmbedded build system to create a Build Directory of |
187 | your choice. For example, the following command creates a Build | 186 | your choice. For example, the following command creates a Build |
188 | Directory named ``mybuilds/`` that is outside of the :term:`Source Directory`: | 187 | Directory named ``mybuilds/`` that is outside of the :term:`Source Directory`:: |
189 | :: | ||
190 | 188 | ||
191 | $ source oe-init-build-env ~/mybuilds | 189 | $ source oe-init-build-env ~/mybuilds |
192 | 190 | ||
@@ -269,8 +267,7 @@ and to ``meta/conf/`` when you are building from the OpenEmbedded-Core | |||
269 | environment. Because the script variable points to the source of the | 267 | environment. Because the script variable points to the source of the |
270 | ``local.conf.sample`` file, this implies that you can configure your | 268 | ``local.conf.sample`` file, this implies that you can configure your |
271 | build environment from any layer by setting the variable in the | 269 | build environment from any layer by setting the variable in the |
272 | top-level build environment setup script as follows: | 270 | top-level build environment setup script as follows:: |
273 | :: | ||
274 | 271 | ||
275 | TEMPLATECONF=your_layer/conf | 272 | TEMPLATECONF=your_layer/conf |
276 | 273 | ||
@@ -309,8 +306,7 @@ Project development environment, and to ``meta/conf/`` when you are | |||
309 | building from the OpenEmbedded-Core environment. Because the script | 306 | building from the OpenEmbedded-Core environment. Because the script |
310 | variable points to the source of the ``bblayers.conf.sample`` file, this | 307 | variable points to the source of the ``bblayers.conf.sample`` file, this |
311 | implies that you can base your build from any layer by setting the | 308 | implies that you can base your build from any layer by setting the |
312 | variable in the top-level build environment setup script as follows: | 309 | variable in the top-level build environment setup script as follows:: |
313 | :: | ||
314 | 310 | ||
315 | TEMPLATECONF=your_layer/conf | 311 | TEMPLATECONF=your_layer/conf |
316 | 312 | ||
@@ -463,8 +459,7 @@ image again. | |||
463 | If you do accidentally delete files here, you will need to force them to | 459 | If you do accidentally delete files here, you will need to force them to |
464 | be re-created. In order to do that, you will need to know the target | 460 | be re-created. In order to do that, you will need to know the target |
465 | that produced them. For example, these commands rebuild and re-create | 461 | that produced them. For example, these commands rebuild and re-create |
466 | the kernel files: | 462 | the kernel files:: |
467 | :: | ||
468 | 463 | ||
469 | $ bitbake -c clean virtual/kernel | 464 | $ bitbake -c clean virtual/kernel |
470 | $ bitbake virtual/kernel | 465 | $ bitbake virtual/kernel |
@@ -535,8 +530,7 @@ recipe-specific :term:`WORKDIR` directories. Thus, the | |||
535 | This directory holds information that BitBake uses for accounting | 530 | This directory holds information that BitBake uses for accounting |
536 | purposes to track what tasks have run and when they have run. The | 531 | purposes to track what tasks have run and when they have run. The |
537 | directory is sub-divided by architecture, package name, and version. | 532 | directory is sub-divided by architecture, package name, and version. |
538 | Following is an example: | 533 | Following is an example:: |
539 | :: | ||
540 | 534 | ||
541 | stamps/all-poky-linux/distcc-config/1.0-r0.do_build-2fdd....2do | 535 | stamps/all-poky-linux/distcc-config/1.0-r0.do_build-2fdd....2do |
542 | 536 | ||
diff --git a/documentation/ref-manual/system-requirements.rst b/documentation/ref-manual/system-requirements.rst index 80378cedb7..4fa4d3ef52 100644 --- a/documentation/ref-manual/system-requirements.rst +++ b/documentation/ref-manual/system-requirements.rst | |||
@@ -120,8 +120,7 @@ supported Ubuntu or Debian Linux distribution: | |||
120 | might experience QEMU build failures due to the package installing | 120 | might experience QEMU build failures due to the package installing |
121 | its own custom ``/usr/include/linux/soundcard.h`` on the Debian | 121 | its own custom ``/usr/include/linux/soundcard.h`` on the Debian |
122 | system. If you run into this situation, either of the following | 122 | system. If you run into this situation, either of the following |
123 | solutions exist: | 123 | solutions exist:: |
124 | :: | ||
125 | 124 | ||
126 | $ sudo apt-get build-dep qemu | 125 | $ sudo apt-get build-dep qemu |
127 | $ sudo apt-get remove oss4-dev | 126 | $ sudo apt-get remove oss4-dev |
@@ -132,14 +131,12 @@ supported Ubuntu or Debian Linux distribution: | |||
132 | 131 | ||
133 | $ sudo pip3 install GitPython pylint==1.9.5 | 132 | $ sudo pip3 install GitPython pylint==1.9.5 |
134 | 133 | ||
135 | - *Essentials:* Packages needed to build an image on a headless system: | 134 | - *Essentials:* Packages needed to build an image on a headless system:: |
136 | :: | ||
137 | 135 | ||
138 | $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL; | 136 | $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL; |
139 | 137 | ||
140 | - *Documentation:* Packages needed if you are going to build out the | 138 | - *Documentation:* Packages needed if you are going to build out the |
141 | Yocto Project documentation manuals: | 139 | Yocto Project documentation manuals:: |
142 | :: | ||
143 | 140 | ||
144 | $ sudo apt-get install make python3-pip | 141 | $ sudo apt-get install make python3-pip |
145 | &PIP3_HOST_PACKAGES_DOC; | 142 | &PIP3_HOST_PACKAGES_DOC; |
@@ -157,14 +154,12 @@ The following list shows the required packages by function given a | |||
157 | supported Fedora Linux distribution: | 154 | supported Fedora Linux distribution: |
158 | 155 | ||
159 | - *Essentials:* Packages needed to build an image for a headless | 156 | - *Essentials:* Packages needed to build an image for a headless |
160 | system: | 157 | system:: |
161 | :: | ||
162 | 158 | ||
163 | $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL; | 159 | $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL; |
164 | 160 | ||
165 | - *Documentation:* Packages needed if you are going to build out the | 161 | - *Documentation:* Packages needed if you are going to build out the |
166 | Yocto Project documentation manuals: | 162 | Yocto Project documentation manuals:: |
167 | :: | ||
168 | 163 | ||
169 | $ sudo dnf install make python3-pip which | 164 | $ sudo dnf install make python3-pip which |
170 | &PIP3_HOST_PACKAGES_DOC; | 165 | &PIP3_HOST_PACKAGES_DOC; |
@@ -176,14 +171,12 @@ The following list shows the required packages by function given a | |||
176 | supported openSUSE Linux distribution: | 171 | supported openSUSE Linux distribution: |
177 | 172 | ||
178 | - *Essentials:* Packages needed to build an image for a headless | 173 | - *Essentials:* Packages needed to build an image for a headless |
179 | system: | 174 | system:: |
180 | :: | ||
181 | 175 | ||
182 | $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL; | 176 | $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL; |
183 | 177 | ||
184 | - *Documentation:* Packages needed if you are going to build out the | 178 | - *Documentation:* Packages needed if you are going to build out the |
185 | Yocto Project documentation manuals: | 179 | Yocto Project documentation manuals:: |
186 | :: | ||
187 | 180 | ||
188 | $ sudo zypper install make python3-pip which | 181 | $ sudo zypper install make python3-pip which |
189 | &PIP3_HOST_PACKAGES_DOC; | 182 | &PIP3_HOST_PACKAGES_DOC; |
@@ -196,8 +189,7 @@ The following list shows the required packages by function given a | |||
196 | supported CentOS-7 Linux distribution: | 189 | supported CentOS-7 Linux distribution: |
197 | 190 | ||
198 | - *Essentials:* Packages needed to build an image for a headless | 191 | - *Essentials:* Packages needed to build an image for a headless |
199 | system: | 192 | system:: |
200 | :: | ||
201 | 193 | ||
202 | $ sudo yum install &CENTOS7_HOST_PACKAGES_ESSENTIAL; | 194 | $ sudo yum install &CENTOS7_HOST_PACKAGES_ESSENTIAL; |
203 | 195 | ||
@@ -212,8 +204,7 @@ supported CentOS-7 Linux distribution: | |||
212 | ``epel-release``. | 204 | ``epel-release``. |
213 | 205 | ||
214 | - *Documentation:* Packages needed if you are going to build out the | 206 | - *Documentation:* Packages needed if you are going to build out the |
215 | Yocto Project documentation manuals: | 207 | Yocto Project documentation manuals:: |
216 | :: | ||
217 | 208 | ||
218 | $ sudo yum install make python3-pip which | 209 | $ sudo yum install make python3-pip which |
219 | &PIP3_HOST_PACKAGES_DOC; | 210 | &PIP3_HOST_PACKAGES_DOC; |
@@ -225,8 +216,7 @@ The following list shows the required packages by function given a | |||
225 | supported CentOS-8 Linux distribution: | 216 | supported CentOS-8 Linux distribution: |
226 | 217 | ||
227 | - *Essentials:* Packages needed to build an image for a headless | 218 | - *Essentials:* Packages needed to build an image for a headless |
228 | system: | 219 | system:: |
229 | :: | ||
230 | 220 | ||
231 | $ sudo dnf install &CENTOS8_HOST_PACKAGES_ESSENTIAL; | 221 | $ sudo dnf install &CENTOS8_HOST_PACKAGES_ESSENTIAL; |
232 | 222 | ||
@@ -244,8 +234,7 @@ supported CentOS-8 Linux distribution: | |||
244 | ``epel-release``. | 234 | ``epel-release``. |
245 | 235 | ||
246 | - *Documentation:* Packages needed if you are going to build out the | 236 | - *Documentation:* Packages needed if you are going to build out the |
247 | Yocto Project documentation manuals: | 237 | Yocto Project documentation manuals:: |
248 | :: | ||
249 | 238 | ||
250 | $ sudo dnf install make python3-pip which | 239 | $ sudo dnf install make python3-pip which |
251 | &PIP3_HOST_PACKAGES_DOC; | 240 | &PIP3_HOST_PACKAGES_DOC; |
@@ -287,8 +276,7 @@ The ``install-buildtools`` script is the easiest of the three methods by | |||
287 | which you can get these tools. It downloads a pre-built buildtools | 276 | which you can get these tools. It downloads a pre-built buildtools |
288 | installer and automatically installs the tools for you: | 277 | installer and automatically installs the tools for you: |
289 | 278 | ||
290 | 1. Execute the ``install-buildtools`` script. Here is an example: | 279 | 1. Execute the ``install-buildtools`` script. Here is an example:: |
291 | :: | ||
292 | 280 | ||
293 | $ cd poky | 281 | $ cd poky |
294 | $ scripts/install-buildtools --without-extended-buildtools \ | 282 | $ scripts/install-buildtools --without-extended-buildtools \ |
@@ -302,22 +290,19 @@ installer and automatically installs the tools for you: | |||
302 | installation is functional. | 290 | installation is functional. |
303 | 291 | ||
304 | To avoid the need of ``sudo`` privileges, the ``install-buildtools`` | 292 | To avoid the need of ``sudo`` privileges, the ``install-buildtools`` |
305 | script will by default tell the installer to install in: | 293 | script will by default tell the installer to install in:: |
306 | :: | ||
307 | 294 | ||
308 | /path/to/poky/buildtools | 295 | /path/to/poky/buildtools |
309 | 296 | ||
310 | If your host development system needs the additional tools provided | 297 | If your host development system needs the additional tools provided |
311 | in the ``buildtools-extended`` tarball, you can instead execute the | 298 | in the ``buildtools-extended`` tarball, you can instead execute the |
312 | ``install-buildtools`` script with the default parameters: | 299 | ``install-buildtools`` script with the default parameters:: |
313 | :: | ||
314 | 300 | ||
315 | $ cd poky | 301 | $ cd poky |
316 | $ scripts/install-buildtools | 302 | $ scripts/install-buildtools |
317 | 303 | ||
318 | 2. Source the tools environment setup script by using a command like the | 304 | 2. Source the tools environment setup script by using a command like the |
319 | following: | 305 | following:: |
320 | :: | ||
321 | 306 | ||
322 | $ source /path/to/poky/buildtools/environment-setup-x86_64-pokysdk-linux | 307 | $ source /path/to/poky/buildtools/environment-setup-x86_64-pokysdk-linux |
323 | 308 | ||
@@ -342,13 +327,11 @@ steps: | |||
342 | 1. Locate and download the ``*.sh`` at &YOCTO_RELEASE_DL_URL;/buildtools/ | 327 | 1. Locate and download the ``*.sh`` at &YOCTO_RELEASE_DL_URL;/buildtools/ |
343 | 328 | ||
344 | 2. Execute the installation script. Here is an example for the | 329 | 2. Execute the installation script. Here is an example for the |
345 | traditional installer: | 330 | traditional installer:: |
346 | :: | ||
347 | 331 | ||
348 | $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh | 332 | $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh |
349 | 333 | ||
350 | Here is an example for the extended installer: | 334 | Here is an example for the extended installer:: |
351 | :: | ||
352 | 335 | ||
353 | $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh | 336 | $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh |
354 | 337 | ||
@@ -357,8 +340,7 @@ steps: | |||
357 | ``/home/your-username/buildtools`` | 340 | ``/home/your-username/buildtools`` |
358 | 341 | ||
359 | 3. Source the tools environment setup script by using a command like the | 342 | 3. Source the tools environment setup script by using a command like the |
360 | following: | 343 | following:: |
361 | :: | ||
362 | 344 | ||
363 | $ source /home/your_username/buildtools/environment-setup-i586-poky-linux | 345 | $ source /home/your_username/buildtools/environment-setup-i586-poky-linux |
364 | 346 | ||
@@ -390,13 +372,11 @@ installer: | |||
390 | your build environment with the setup script | 372 | your build environment with the setup script |
391 | (:ref:`structure-core-script`). | 373 | (:ref:`structure-core-script`). |
392 | 374 | ||
393 | 2. Run the BitBake command to build the tarball: | 375 | 2. Run the BitBake command to build the tarball:: |
394 | :: | ||
395 | 376 | ||
396 | $ bitbake buildtools-tarball | 377 | $ bitbake buildtools-tarball |
397 | 378 | ||
398 | or run the BitBake command to build the extended tarball: | 379 | or run the BitBake command to build the extended tarball:: |
399 | :: | ||
400 | 380 | ||
401 | $ bitbake buildtools-extended-tarball | 381 | $ bitbake buildtools-extended-tarball |
402 | 382 | ||
@@ -415,13 +395,11 @@ installer: | |||
415 | 395 | ||
416 | 4. On the machine that does not meet the requirements, run the ``.sh`` | 396 | 4. On the machine that does not meet the requirements, run the ``.sh`` |
417 | file to install the tools. Here is an example for the traditional | 397 | file to install the tools. Here is an example for the traditional |
418 | installer: | 398 | installer:: |
419 | :: | ||
420 | 399 | ||
421 | $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh | 400 | $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh |
422 | 401 | ||
423 | Here is an example for the extended installer: | 402 | Here is an example for the extended installer:: |
424 | :: | ||
425 | 403 | ||
426 | $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh | 404 | $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh |
427 | 405 | ||
@@ -430,8 +408,7 @@ installer: | |||
430 | ``/home/your_username/buildtools`` | 408 | ``/home/your_username/buildtools`` |
431 | 409 | ||
432 | 5. Source the tools environment setup script by using a command like the | 410 | 5. Source the tools environment setup script by using a command like the |
433 | following: | 411 | following:: |
434 | :: | ||
435 | 412 | ||
436 | $ source /home/your_username/buildtools/environment-setup-x86_64-poky-linux | 413 | $ source /home/your_username/buildtools/environment-setup-x86_64-poky-linux |
437 | 414 | ||
diff --git a/documentation/ref-manual/tasks.rst b/documentation/ref-manual/tasks.rst index 9fe1c296aa..001edf6bb3 100644 --- a/documentation/ref-manual/tasks.rst +++ b/documentation/ref-manual/tasks.rst | |||
@@ -93,8 +93,7 @@ output from ``${DEPLOYDIR}`` to ``${DEPLOY_DIR_IMAGE}``. | |||
93 | The ``do_deploy`` task is not added as a task by default and | 93 | The ``do_deploy`` task is not added as a task by default and |
94 | consequently needs to be added manually. If you want the task to run | 94 | consequently needs to be added manually. If you want the task to run |
95 | after :ref:`ref-tasks-compile`, you can add it by doing | 95 | after :ref:`ref-tasks-compile`, you can add it by doing |
96 | the following: | 96 | the following:: |
97 | :: | ||
98 | 97 | ||
99 | addtask deploy after do_compile | 98 | addtask deploy after do_compile |
100 | 99 | ||
@@ -103,8 +102,7 @@ Adding ``do_deploy`` after other tasks works the same way. | |||
103 | .. note:: | 102 | .. note:: |
104 | 103 | ||
105 | You do not need to add ``before do_build`` to the ``addtask`` command | 104 | You do not need to add ``before do_build`` to the ``addtask`` command |
106 | (though it is harmless), because the ``base`` class contains the following: | 105 | (though it is harmless), because the ``base`` class contains the following:: |
107 | :: | ||
108 | 106 | ||
109 | do_build[recrdeptask] += "do_deploy" | 107 | do_build[recrdeptask] += "do_deploy" |
110 | 108 | ||
@@ -302,13 +300,11 @@ Patch files, by default, are ``*.patch`` and ``*.diff`` files created | |||
302 | and kept in a subdirectory of the directory holding the recipe file. For | 300 | and kept in a subdirectory of the directory holding the recipe file. For |
303 | example, consider the | 301 | example, consider the |
304 | :yocto_git:`bluez5 </poky/tree/meta/recipes-connectivity/bluez5>` | 302 | :yocto_git:`bluez5 </poky/tree/meta/recipes-connectivity/bluez5>` |
305 | recipe from the OE-Core layer (i.e. ``poky/meta``): | 303 | recipe from the OE-Core layer (i.e. ``poky/meta``):: |
306 | :: | ||
307 | 304 | ||
308 | poky/meta/recipes-connectivity/bluez5 | 305 | poky/meta/recipes-connectivity/bluez5 |
309 | 306 | ||
310 | This recipe has two patch files located here: | 307 | This recipe has two patch files located here:: |
311 | :: | ||
312 | 308 | ||
313 | poky/meta/recipes-connectivity/bluez5/bluez5 | 309 | poky/meta/recipes-connectivity/bluez5/bluez5 |
314 | 310 | ||
@@ -323,8 +319,7 @@ and patch files needed to build the package. | |||
323 | As mentioned earlier, the build system treats files whose file types are | 319 | As mentioned earlier, the build system treats files whose file types are |
324 | ``.patch`` and ``.diff`` as patch files. However, you can use the | 320 | ``.patch`` and ``.diff`` as patch files. However, you can use the |
325 | "apply=yes" parameter with the ``SRC_URI`` statement to indicate any | 321 | "apply=yes" parameter with the ``SRC_URI`` statement to indicate any |
326 | file as a patch file: | 322 | file as a patch file:: |
327 | :: | ||
328 | 323 | ||
329 | SRC_URI = " \ | 324 | SRC_URI = " \ |
330 | git://path_to_repo/some_package \ | 325 | git://path_to_repo/some_package \ |
@@ -334,8 +329,7 @@ file as a patch file: | |||
334 | Conversely, if you have a directory full of patch files and you want to | 329 | Conversely, if you have a directory full of patch files and you want to |
335 | exclude some so that the ``do_patch`` task does not apply them during | 330 | exclude some so that the ``do_patch`` task does not apply them during |
336 | the patch phase, you can use the "apply=no" parameter with the | 331 | the patch phase, you can use the "apply=no" parameter with the |
337 | ``SRC_URI`` statement: | 332 | ``SRC_URI`` statement:: |
338 | :: | ||
339 | 333 | ||
340 | SRC_URI = " \ | 334 | SRC_URI = " \ |
341 | git://path_to_repo/some_package \ | 335 | git://path_to_repo/some_package \ |
@@ -455,8 +449,7 @@ of the recipe exists upstream and a status of not updated, updated, or | |||
455 | unknown. | 449 | unknown. |
456 | 450 | ||
457 | To check the upstream version and status of a recipe, use the following | 451 | To check the upstream version and status of a recipe, use the following |
458 | devtool commands: | 452 | devtool commands:: |
459 | :: | ||
460 | 453 | ||
461 | $ devtool latest-version | 454 | $ devtool latest-version |
462 | $ devtool check-upgrade-status | 455 | $ devtool check-upgrade-status |
@@ -467,8 +460,7 @@ chapter for more information on | |||
467 | section for information on checking the upgrade status of a recipe. | 460 | section for information on checking the upgrade status of a recipe. |
468 | 461 | ||
469 | To build the ``checkpkg`` task, use the ``bitbake`` command with the | 462 | To build the ``checkpkg`` task, use the ``bitbake`` command with the |
470 | "-c" option and task name: | 463 | "-c" option and task name:: |
471 | :: | ||
472 | 464 | ||
473 | $ bitbake core-image-minimal -c checkpkg | 465 | $ bitbake core-image-minimal -c checkpkg |
474 | 466 | ||
@@ -494,8 +486,7 @@ Removes all output files for a target from the | |||
494 | :ref:`ref-tasks-install`, and | 486 | :ref:`ref-tasks-install`, and |
495 | :ref:`ref-tasks-package`). | 487 | :ref:`ref-tasks-package`). |
496 | 488 | ||
497 | You can run this task using BitBake as follows: | 489 | You can run this task using BitBake as follows:: |
498 | :: | ||
499 | 490 | ||
500 | $ bitbake -c clean recipe | 491 | $ bitbake -c clean recipe |
501 | 492 | ||
@@ -519,8 +510,7 @@ downloaded source files for a target (i.e. the contents of | |||
519 | identical to the :ref:`ref-tasks-cleansstate` task | 510 | identical to the :ref:`ref-tasks-cleansstate` task |
520 | with the added removal of downloaded source files. | 511 | with the added removal of downloaded source files. |
521 | 512 | ||
522 | You can run this task using BitBake as follows: | 513 | You can run this task using BitBake as follows:: |
523 | :: | ||
524 | 514 | ||
525 | $ bitbake -c cleanall recipe | 515 | $ bitbake -c cleanall recipe |
526 | 516 | ||
@@ -540,8 +530,7 @@ target. Essentially, the ``do_cleansstate`` task is identical to the | |||
540 | shared state (:ref:`sstate <overview-manual/concepts:shared state cache>`) | 530 | shared state (:ref:`sstate <overview-manual/concepts:shared state cache>`) |
541 | cache. | 531 | cache. |
542 | 532 | ||
543 | You can run this task using BitBake as follows: | 533 | You can run this task using BitBake as follows:: |
544 | :: | ||
545 | 534 | ||
546 | $ bitbake -c cleansstate recipe | 535 | $ bitbake -c cleansstate recipe |
547 | 536 | ||
@@ -553,8 +542,7 @@ scratch is guaranteed. | |||
553 | 542 | ||
554 | The ``do_cleansstate`` task cannot remove sstate from a remote sstate | 543 | The ``do_cleansstate`` task cannot remove sstate from a remote sstate |
555 | mirror. If you need to build a target from scratch using remote mirrors, use | 544 | mirror. If you need to build a target from scratch using remote mirrors, use |
556 | the "-f" option as follows: | 545 | the "-f" option as follows:: |
557 | :: | ||
558 | 546 | ||
559 | $ bitbake -f -c do_cleansstate target | 547 | $ bitbake -f -c do_cleansstate target |
560 | 548 | ||
@@ -687,8 +675,7 @@ changes made by the user with other methods (i.e. using | |||
687 | (:ref:`ref-tasks-kernel_menuconfig`). Once the | 675 | (:ref:`ref-tasks-kernel_menuconfig`). Once the |
688 | file of differences is created, it can be used to create a config | 676 | file of differences is created, it can be used to create a config |
689 | fragment that only contains the differences. You can invoke this task | 677 | fragment that only contains the differences. You can invoke this task |
690 | from the command line as follows: | 678 | from the command line as follows:: |
691 | :: | ||
692 | 679 | ||
693 | $ bitbake linux-yocto -c diffconfig | 680 | $ bitbake linux-yocto -c diffconfig |
694 | 681 | ||
@@ -718,8 +705,7 @@ Validates the configuration produced by the | |||
718 | configuration does not appear in the final ``.config`` file or when you | 705 | configuration does not appear in the final ``.config`` file or when you |
719 | override a policy configuration in a hardware configuration fragment. | 706 | override a policy configuration in a hardware configuration fragment. |
720 | You can run this task explicitly and view the output by using the | 707 | You can run this task explicitly and view the output by using the |
721 | following command: | 708 | following command:: |
722 | :: | ||
723 | 709 | ||
724 | $ bitbake linux-yocto -c kernel_configcheck -f | 710 | $ bitbake linux-yocto -c kernel_configcheck -f |
725 | 711 | ||
@@ -750,8 +736,7 @@ tool, which you then use to modify the kernel configuration. | |||
750 | 736 | ||
751 | .. note:: | 737 | .. note:: |
752 | 738 | ||
753 | You can also invoke this tool from the command line as follows: | 739 | You can also invoke this tool from the command line as follows:: |
754 | :: | ||
755 | 740 | ||
756 | $ bitbake linux-yocto -c menuconfig | 741 | $ bitbake linux-yocto -c menuconfig |
757 | 742 | ||
@@ -793,8 +778,7 @@ instead of the default defconfig. The saved defconfig contains the | |||
793 | differences between the default defconfig and the changes made by the | 778 | differences between the default defconfig and the changes made by the |
794 | user using other methods (i.e. the | 779 | user using other methods (i.e. the |
795 | :ref:`ref-tasks-kernel_menuconfig` task. You | 780 | :ref:`ref-tasks-kernel_menuconfig` task. You |
796 | can invoke the task using the following command: | 781 | can invoke the task using the following command:: |
797 | :: | ||
798 | 782 | ||
799 | $ bitbake linux-yocto -c savedefconfig | 783 | $ bitbake linux-yocto -c savedefconfig |
800 | 784 | ||
diff --git a/documentation/ref-manual/terms.rst b/documentation/ref-manual/terms.rst index 32bb75b271..0af9af6485 100644 --- a/documentation/ref-manual/terms.rst +++ b/documentation/ref-manual/terms.rst | |||
@@ -26,8 +26,7 @@ universal, the list includes them just in case: | |||
26 | 26 | ||
27 | When you name an append file, you can use the "``%``" wildcard character | 27 | When you name an append file, you can use the "``%``" wildcard character |
28 | to allow for matching recipe names. For example, suppose you have an | 28 | to allow for matching recipe names. For example, suppose you have an |
29 | append file named as follows: | 29 | append file named as follows:: |
30 | :: | ||
31 | 30 | ||
32 | busybox_1.21.%.bbappend | 31 | busybox_1.21.%.bbappend |
33 | 32 | ||
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 9435aec458..64521b89bb 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst | |||
@@ -24,8 +24,7 @@ system and gives an overview of their function and contents. | |||
24 | 24 | ||
25 | ABI extensions are set in the machine include files. For example, the | 25 | ABI extensions are set in the machine include files. For example, the |
26 | ``meta/conf/machine/include/arm/arch-arm.inc`` file sets the | 26 | ``meta/conf/machine/include/arm/arch-arm.inc`` file sets the |
27 | following extension: | 27 | following extension:: |
28 | :: | ||
29 | 28 | ||
30 | ABIEXTENSION = "eabi" | 29 | ABIEXTENSION = "eabi" |
31 | 30 | ||
@@ -37,8 +36,7 @@ system and gives an overview of their function and contents. | |||
37 | requirement on the existence of the package. | 36 | requirement on the existence of the package. |
38 | 37 | ||
39 | Like all package-controlling variables, you must always use them in | 38 | Like all package-controlling variables, you must always use them in |
40 | conjunction with a package name override, as in: | 39 | conjunction with a package name override, as in:: |
41 | :: | ||
42 | 40 | ||
43 | ALLOW_EMPTY_${PN} = "1" | 41 | ALLOW_EMPTY_${PN} = "1" |
44 | ALLOW_EMPTY_${PN}-dev = "1" | 42 | ALLOW_EMPTY_${PN}-dev = "1" |
@@ -54,8 +52,7 @@ system and gives an overview of their function and contents. | |||
54 | To use the variable, list out the package's commands that also exist | 52 | To use the variable, list out the package's commands that also exist |
55 | as part of another package. For example, if the ``busybox`` package | 53 | as part of another package. For example, if the ``busybox`` package |
56 | has four commands that also exist as part of another package, you | 54 | has four commands that also exist as part of another package, you |
57 | identify them as follows: | 55 | identify them as follows:: |
58 | :: | ||
59 | 56 | ||
60 | ALTERNATIVE_busybox = "sh sed test bracket" | 57 | ALTERNATIVE_busybox = "sh sed test bracket" |
61 | 58 | ||
@@ -68,8 +65,7 @@ system and gives an overview of their function and contents. | |||
68 | locations. For example, if the ``bracket`` command provided by the | 65 | locations. For example, if the ``bracket`` command provided by the |
69 | ``busybox`` package is duplicated through another package, you must | 66 | ``busybox`` package is duplicated through another package, you must |
70 | use the ``ALTERNATIVE_LINK_NAME`` variable to specify the actual | 67 | use the ``ALTERNATIVE_LINK_NAME`` variable to specify the actual |
71 | location: | 68 | location:: |
72 | :: | ||
73 | 69 | ||
74 | ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/[" | 70 | ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/[" |
75 | 71 | ||
@@ -90,8 +86,7 @@ system and gives an overview of their function and contents. | |||
90 | default regardless of the command name or package, a default for | 86 | default regardless of the command name or package, a default for |
91 | specific duplicated commands regardless of the package, or a default | 87 | specific duplicated commands regardless of the package, or a default |
92 | for specific commands tied to particular packages. Here are the | 88 | for specific commands tied to particular packages. Here are the |
93 | available syntax forms: | 89 | available syntax forms:: |
94 | :: | ||
95 | 90 | ||
96 | ALTERNATIVE_PRIORITY = "priority" | 91 | ALTERNATIVE_PRIORITY = "priority" |
97 | ALTERNATIVE_PRIORITY[name] = "priority" | 92 | ALTERNATIVE_PRIORITY[name] = "priority" |
@@ -107,8 +102,7 @@ system and gives an overview of their function and contents. | |||
107 | default location for all duplicated commands regardless of the | 102 | default location for all duplicated commands regardless of the |
108 | command name or package, a default for specific duplicated commands | 103 | command name or package, a default for specific duplicated commands |
109 | regardless of the package, or a default for specific commands tied to | 104 | regardless of the package, or a default for specific commands tied to |
110 | particular packages. Here are the available syntax forms: | 105 | particular packages. Here are the available syntax forms:: |
111 | :: | ||
112 | 106 | ||
113 | ALTERNATIVE_TARGET = "target" | 107 | ALTERNATIVE_TARGET = "target" |
114 | ALTERNATIVE_TARGET[name] = "target" | 108 | ALTERNATIVE_TARGET[name] = "target" |
@@ -159,8 +153,7 @@ system and gives an overview of their function and contents. | |||
159 | determines the type of information used to create a released archive. | 153 | determines the type of information used to create a released archive. |
160 | You can use this variable to create archives of patched source, | 154 | You can use this variable to create archives of patched source, |
161 | original source, configured source, and so forth by employing the | 155 | original source, configured source, and so forth by employing the |
162 | following variable flags (varflags): | 156 | following variable flags (varflags):: |
163 | :: | ||
164 | 157 | ||
165 | ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files. | 158 | ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source files. |
166 | ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default. | 159 | ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is the default. |
@@ -193,14 +186,12 @@ system and gives an overview of their function and contents. | |||
193 | system. Separate multiple entries using spaces. | 186 | system. Separate multiple entries using spaces. |
194 | 187 | ||
195 | As an example, use the following form to add an ``shlib`` provider of | 188 | As an example, use the following form to add an ``shlib`` provider of |
196 | shlibname in packagename with the optional version: | 189 | shlibname in packagename with the optional version:: |
197 | :: | ||
198 | 190 | ||
199 | shlibname:packagename[_version] | 191 | shlibname:packagename[_version] |
200 | 192 | ||
201 | Here is an example that adds a shared library named ``libEGL.so.1`` | 193 | Here is an example that adds a shared library named ``libEGL.so.1`` |
202 | as being provided by the ``libegl-implementation`` package: | 194 | as being provided by the ``libegl-implementation`` package:: |
203 | :: | ||
204 | 195 | ||
205 | ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation" | 196 | ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation" |
206 | 197 | ||
@@ -224,8 +215,7 @@ system and gives an overview of their function and contents. | |||
224 | 215 | ||
225 | :term:`AUTOREV` | 216 | :term:`AUTOREV` |
226 | When ``SRCREV`` is set to the value of this variable, it specifies to | 217 | When ``SRCREV`` is set to the value of this variable, it specifies to |
227 | use the latest source revision in the repository. Here is an example: | 218 | use the latest source revision in the repository. Here is an example:: |
228 | :: | ||
229 | 219 | ||
230 | SRCREV = "${AUTOREV}" | 220 | SRCREV = "${AUTOREV}" |
231 | 221 | ||
@@ -286,8 +276,7 @@ system and gives an overview of their function and contents. | |||
286 | The directory within the :term:`Build Directory` in | 276 | The directory within the :term:`Build Directory` in |
287 | which the OpenEmbedded build system places generated objects during a | 277 | which the OpenEmbedded build system places generated objects during a |
288 | recipe's build process. By default, this directory is the same as the | 278 | recipe's build process. By default, this directory is the same as the |
289 | :term:`S` directory, which is defined as: | 279 | :term:`S` directory, which is defined as:: |
290 | :: | ||
291 | 280 | ||
292 | S = "${WORKDIR}/${BP}" | 281 | S = "${WORKDIR}/${BP}" |
293 | 282 | ||
@@ -301,15 +290,13 @@ system and gives an overview of their function and contents. | |||
301 | packages are packages installed only through the | 290 | packages are packages installed only through the |
302 | :term:`RRECOMMENDS` variable. You can prevent any | 291 | :term:`RRECOMMENDS` variable. You can prevent any |
303 | of these "recommended" packages from being installed by listing them | 292 | of these "recommended" packages from being installed by listing them |
304 | with the ``BAD_RECOMMENDATIONS`` variable: | 293 | with the ``BAD_RECOMMENDATIONS`` variable:: |
305 | :: | ||
306 | 294 | ||
307 | BAD_RECOMMENDATIONS = "package_name package_name package_name ..." | 295 | BAD_RECOMMENDATIONS = "package_name package_name package_name ..." |
308 | 296 | ||
309 | You can set this variable globally in your ``local.conf`` file or you | 297 | You can set this variable globally in your ``local.conf`` file or you |
310 | can attach it to a specific image recipe by using the recipe name | 298 | can attach it to a specific image recipe by using the recipe name |
311 | override: | 299 | override:: |
312 | :: | ||
313 | 300 | ||
314 | BAD_RECOMMENDATIONS_pn-target_image = "package_name" | 301 | BAD_RECOMMENDATIONS_pn-target_image = "package_name" |
315 | 302 | ||
@@ -394,8 +381,7 @@ system and gives an overview of their function and contents. | |||
394 | 381 | ||
395 | You can change the default behavior by setting this variable to "1", | 382 | You can change the default behavior by setting this variable to "1", |
396 | "yes", or "true" in your ``local.conf`` file, which is located in the | 383 | "yes", or "true" in your ``local.conf`` file, which is located in the |
397 | :term:`Build Directory`: Here is an example: | 384 | :term:`Build Directory`: Here is an example:: |
398 | :: | ||
399 | 385 | ||
400 | BB_DANGLINGAPPENDS_WARNONLY = "1" | 386 | BB_DANGLINGAPPENDS_WARNONLY = "1" |
401 | 387 | ||
@@ -444,8 +430,7 @@ system and gives an overview of their function and contents. | |||
444 | not specify G, M, or K, Kbytes is assumed by | 430 | not specify G, M, or K, Kbytes is assumed by |
445 | default. Do not use GB, MB, or KB. | 431 | default. Do not use GB, MB, or KB. |
446 | 432 | ||
447 | Here are some examples: | 433 | Here are some examples:: |
448 | :: | ||
449 | 434 | ||
450 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K" | 435 | BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K" |
451 | BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G" | 436 | BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G" |
@@ -485,8 +470,7 @@ system and gives an overview of their function and contents. | |||
485 | 470 | ||
486 | If you do not provide a ``BB_DISKMON_WARNINTERVAL`` variable and you | 471 | If you do not provide a ``BB_DISKMON_WARNINTERVAL`` variable and you |
487 | do use ``BB_DISKMON_DIRS`` with the "WARN" action, the disk | 472 | do use ``BB_DISKMON_DIRS`` with the "WARN" action, the disk |
488 | monitoring interval defaults to the following: | 473 | monitoring interval defaults to the following:: |
489 | :: | ||
490 | 474 | ||
491 | BB_DISKMON_WARNINTERVAL = "50M,5K" | 475 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
492 | 476 | ||
@@ -509,8 +493,7 @@ system and gives an overview of their function and contents. | |||
509 | G, M, or K for Gbytes, Mbytes, or Kbytes, | 493 | G, M, or K for Gbytes, Mbytes, or Kbytes, |
510 | respectively. You cannot use GB, MB, or KB. | 494 | respectively. You cannot use GB, MB, or KB. |
511 | 495 | ||
512 | Here is an example: | 496 | Here is an example:: |
513 | :: | ||
514 | 497 | ||
515 | BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K" | 498 | BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K" |
516 | BB_DISKMON_WARNINTERVAL = "50M,5K" | 499 | BB_DISKMON_WARNINTERVAL = "50M,5K" |
@@ -566,8 +549,7 @@ system and gives an overview of their function and contents. | |||
566 | long the BitBake server stays resident between invocations. | 549 | long the BitBake server stays resident between invocations. |
567 | 550 | ||
568 | For example, the following statement in your ``local.conf`` file | 551 | For example, the following statement in your ``local.conf`` file |
569 | instructs the server to be unloaded after 20 seconds of inactivity: | 552 | instructs the server to be unloaded after 20 seconds of inactivity:: |
570 | :: | ||
571 | 553 | ||
572 | BB_SERVER_TIMEOUT = "20" | 554 | BB_SERVER_TIMEOUT = "20" |
573 | 555 | ||
@@ -585,8 +567,7 @@ system and gives an overview of their function and contents. | |||
585 | "``multilib:``\ multilib_name". | 567 | "``multilib:``\ multilib_name". |
586 | 568 | ||
587 | To build a different variant of the recipe with a minimal amount of | 569 | To build a different variant of the recipe with a minimal amount of |
588 | code, it usually is as simple as adding the following to your recipe: | 570 | code, it usually is as simple as adding the following to your recipe:: |
589 | :: | ||
590 | 571 | ||
591 | BBCLASSEXTEND =+ "native nativesdk" | 572 | BBCLASSEXTEND =+ "native nativesdk" |
592 | BBCLASSEXTEND =+ "multilib:multilib_name" | 573 | BBCLASSEXTEND =+ "multilib:multilib_name" |
@@ -662,8 +643,7 @@ system and gives an overview of their function and contents. | |||
662 | 643 | ||
663 | Use the following form for ``BBFILES_DYNAMIC``: | 644 | Use the following form for ``BBFILES_DYNAMIC``: |
664 | collection_name:filename_pattern The following example identifies two | 645 | collection_name:filename_pattern The following example identifies two |
665 | collection names and two filename patterns: | 646 | collection names and two filename patterns:: |
666 | :: | ||
667 | 647 | ||
668 | BBFILES_DYNAMIC += " \ | 648 | BBFILES_DYNAMIC += " \ |
669 | clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \ | 649 | clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \ |
@@ -691,8 +671,7 @@ system and gives an overview of their function and contents. | |||
691 | :term:`BBLAYERS` | 671 | :term:`BBLAYERS` |
692 | Lists the layers to enable during the build. This variable is defined | 672 | Lists the layers to enable during the build. This variable is defined |
693 | in the ``bblayers.conf`` configuration file in the :term:`Build Directory`. | 673 | in the ``bblayers.conf`` configuration file in the :term:`Build Directory`. |
694 | Here is an example: | 674 | Here is an example:: |
695 | :: | ||
696 | 675 | ||
697 | BBLAYERS = " \ | 676 | BBLAYERS = " \ |
698 | /home/scottrif/poky/meta \ | 677 | /home/scottrif/poky/meta \ |
@@ -721,8 +700,7 @@ system and gives an overview of their function and contents. | |||
721 | 700 | ||
722 | The following example uses a complete regular expression to tell | 701 | The following example uses a complete regular expression to tell |
723 | BitBake to ignore all recipe and recipe append files in the | 702 | BitBake to ignore all recipe and recipe append files in the |
724 | ``meta-ti/recipes-misc/`` directory: | 703 | ``meta-ti/recipes-misc/`` directory:: |
725 | :: | ||
726 | 704 | ||
727 | BBMASK = "meta-ti/recipes-misc/" | 705 | BBMASK = "meta-ti/recipes-misc/" |
728 | 706 | ||
@@ -746,8 +724,7 @@ system and gives an overview of their function and contents. | |||
746 | building targets with multiple configurations. Use this variable in | 724 | building targets with multiple configurations. Use this variable in |
747 | your ``conf/local.conf`` configuration file. Specify a | 725 | your ``conf/local.conf`` configuration file. Specify a |
748 | multiconfigname for each configuration file you are using. For | 726 | multiconfigname for each configuration file you are using. For |
749 | example, the following line specifies three configuration files: | 727 | example, the following line specifies three configuration files:: |
750 | :: | ||
751 | 728 | ||
752 | BBMULTICONFIG = "configA configB configC" | 729 | BBMULTICONFIG = "configA configB configC" |
753 | 730 | ||
@@ -770,8 +747,7 @@ system and gives an overview of their function and contents. | |||
770 | If you run BitBake from a directory outside of the | 747 | If you run BitBake from a directory outside of the |
771 | :term:`Build Directory`, you must be sure to set ``BBPATH`` | 748 | :term:`Build Directory`, you must be sure to set ``BBPATH`` |
772 | to point to the Build Directory. Set the variable as you would any | 749 | to point to the Build Directory. Set the variable as you would any |
773 | environment variable and then run BitBake: | 750 | environment variable and then run BitBake:: |
774 | :: | ||
775 | 751 | ||
776 | $ BBPATH = "build_directory" | 752 | $ BBPATH = "build_directory" |
777 | $ export BBPATH | 753 | $ export BBPATH |
@@ -783,8 +759,7 @@ system and gives an overview of their function and contents. | |||
783 | BitBake remote server. | 759 | BitBake remote server. |
784 | 760 | ||
785 | Use the following format to export the variable to the BitBake | 761 | Use the following format to export the variable to the BitBake |
786 | environment: | 762 | environment:: |
787 | :: | ||
788 | 763 | ||
789 | export BBSERVER=localhost:$port | 764 | export BBSERVER=localhost:$port |
790 | 765 | ||
@@ -803,8 +778,7 @@ system and gives an overview of their function and contents. | |||
803 | replaced. | 778 | replaced. |
804 | 779 | ||
805 | To add multiple scripts, separate them by spaces. Here is an example | 780 | To add multiple scripts, separate them by spaces. Here is an example |
806 | from the ``libpng`` recipe: | 781 | from the ``libpng`` recipe:: |
807 | :: | ||
808 | 782 | ||
809 | BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" | 783 | BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" |
810 | 784 | ||
@@ -834,8 +808,7 @@ system and gives an overview of their function and contents. | |||
834 | :term:`BP` | 808 | :term:`BP` |
835 | The base recipe name and version but without any special recipe name | 809 | The base recipe name and version but without any special recipe name |
836 | suffix (i.e. ``-native``, ``lib64-``, and so forth). ``BP`` is | 810 | suffix (i.e. ``-native``, ``lib64-``, and so forth). ``BP`` is |
837 | comprised of the following: | 811 | comprised of the following:: |
838 | :: | ||
839 | 812 | ||
840 | ${BPN}-${PV} | 813 | ${BPN}-${PV} |
841 | 814 | ||
@@ -975,8 +948,7 @@ system and gives an overview of their function and contents. | |||
975 | you should set this value to "1". | 948 | you should set this value to "1". |
976 | 949 | ||
977 | By default, the ``buildhistory`` class does not commit the build | 950 | By default, the ``buildhistory`` class does not commit the build |
978 | history output in a local Git repository: | 951 | history output in a local Git repository:: |
979 | :: | ||
980 | 952 | ||
981 | BUILDHISTORY_COMMIT ?= "0" | 953 | BUILDHISTORY_COMMIT ?= "0" |
982 | 954 | ||
@@ -992,8 +964,7 @@ system and gives an overview of their function and contents. | |||
992 | email@host". Providing an email address or host that is not valid | 964 | email@host". Providing an email address or host that is not valid |
993 | does not produce an error. | 965 | does not produce an error. |
994 | 966 | ||
995 | By default, the ``buildhistory`` class sets the variable as follows: | 967 | By default, the ``buildhistory`` class sets the variable as follows:: |
996 | :: | ||
997 | 968 | ||
998 | BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>" | 969 | BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>" |
999 | 970 | ||
@@ -1003,8 +974,7 @@ system and gives an overview of their function and contents. | |||
1003 | information is kept. For more information on how the variable works, | 974 | information is kept. For more information on how the variable works, |
1004 | see the ``buildhistory.class``. | 975 | see the ``buildhistory.class``. |
1005 | 976 | ||
1006 | By default, the ``buildhistory`` class sets the directory as follows: | 977 | By default, the ``buildhistory`` class sets the directory as follows:: |
1007 | :: | ||
1008 | 978 | ||
1009 | BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory" | 979 | BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory" |
1010 | 980 | ||
@@ -1032,8 +1002,7 @@ system and gives an overview of their function and contents. | |||
1032 | each file staged (i.e. the output of the task). | 1002 | each file staged (i.e. the output of the task). |
1033 | 1003 | ||
1034 | By default, the ``buildhistory`` class enables the following | 1004 | By default, the ``buildhistory`` class enables the following |
1035 | features: | 1005 | features:: |
1036 | :: | ||
1037 | 1006 | ||
1038 | BUILDHISTORY_FEATURES ?= "image package sdk" | 1007 | BUILDHISTORY_FEATURES ?= "image package sdk" |
1039 | 1008 | ||
@@ -1049,8 +1018,7 @@ system and gives an overview of their function and contents. | |||
1049 | Consequently, you can include files that might not always be present. | 1018 | Consequently, you can include files that might not always be present. |
1050 | 1019 | ||
1051 | By default, the ``buildhistory`` class provides paths to the | 1020 | By default, the ``buildhistory`` class provides paths to the |
1052 | following files: | 1021 | following files:: |
1053 | :: | ||
1054 | 1022 | ||
1055 | BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group" | 1023 | BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group" |
1056 | 1024 | ||
@@ -1067,8 +1035,7 @@ system and gives an overview of their function and contents. | |||
1067 | that you have set up manually using ``git remote`` within the local | 1035 | that you have set up manually using ``git remote`` within the local |
1068 | repository. | 1036 | repository. |
1069 | 1037 | ||
1070 | By default, the ``buildhistory`` class sets the variable as follows: | 1038 | By default, the ``buildhistory`` class sets the variable as follows:: |
1071 | :: | ||
1072 | 1039 | ||
1073 | BUILDHISTORY_PUSH_REPO ?= "" | 1040 | BUILDHISTORY_PUSH_REPO ?= "" |
1074 | 1041 | ||
@@ -1152,8 +1119,7 @@ system and gives an overview of their function and contents. | |||
1152 | ``bitbake.conf`` file. | 1119 | ``bitbake.conf`` file. |
1153 | 1120 | ||
1154 | As an example, the following override allows you to install extra | 1121 | As an example, the following override allows you to install extra |
1155 | files, but only when building for the target: | 1122 | files, but only when building for the target:: |
1156 | :: | ||
1157 | 1123 | ||
1158 | do_install_append_class-target() { | 1124 | do_install_append_class-target() { |
1159 | install my-extra-file ${D}${sysconfdir} | 1125 | install my-extra-file ${D}${sysconfdir} |
@@ -1161,8 +1127,7 @@ system and gives an overview of their function and contents. | |||
1161 | 1127 | ||
1162 | Here is an example where ``FOO`` is set to | 1128 | Here is an example where ``FOO`` is set to |
1163 | "native" when building for the build host, and to "other" when not | 1129 | "native" when building for the build host, and to "other" when not |
1164 | building for the build host: | 1130 | building for the build host:: |
1165 | :: | ||
1166 | 1131 | ||
1167 | FOO_class-native = "native" | 1132 | FOO_class-native = "native" |
1168 | FOO = "other" | 1133 | FOO = "other" |
@@ -1235,8 +1200,7 @@ system and gives an overview of their function and contents. | |||
1235 | 1200 | ||
1236 | To add a new feature item pointing to a wildcard, use a variable flag | 1201 | To add a new feature item pointing to a wildcard, use a variable flag |
1237 | to specify the feature item name and use the value to specify the | 1202 | to specify the feature item name and use the value to specify the |
1238 | wildcard. Here is an example: | 1203 | wildcard. Here is an example:: |
1239 | :: | ||
1240 | 1204 | ||
1241 | COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev' | 1205 | COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev' |
1242 | 1206 | ||
@@ -1268,8 +1232,7 @@ system and gives an overview of their function and contents. | |||
1268 | 1232 | ||
1269 | To use the ``CONFFILES`` variable, provide a package name override | 1233 | To use the ``CONFFILES`` variable, provide a package name override |
1270 | that identifies the resulting package. Then, provide a | 1234 | that identifies the resulting package. Then, provide a |
1271 | space-separated list of files. Here is an example: | 1235 | space-separated list of files. Here is an example:: |
1272 | :: | ||
1273 | 1236 | ||
1274 | CONFFILES_${PN} += "${sysconfdir}/file1 \ | 1237 | CONFFILES_${PN} += "${sysconfdir}/file1 \ |
1275 | ${sysconfdir}/file2 ${sysconfdir}/file3" | 1238 | ${sysconfdir}/file2 ${sysconfdir}/file3" |
@@ -1524,8 +1487,7 @@ system and gives an overview of their function and contents. | |||
1524 | The destination directory. The location in the :term:`Build Directory` | 1487 | The destination directory. The location in the :term:`Build Directory` |
1525 | where components are installed by the | 1488 | where components are installed by the |
1526 | :ref:`ref-tasks-install` task. This location defaults | 1489 | :ref:`ref-tasks-install` task. This location defaults |
1527 | to: | 1490 | to:: |
1528 | :: | ||
1529 | 1491 | ||
1530 | ${WORKDIR}/image | 1492 | ${WORKDIR}/image |
1531 | 1493 | ||
@@ -1547,8 +1509,7 @@ system and gives an overview of their function and contents. | |||
1547 | which is the default behavior, ``DEBIAN_NOAUTONAME`` specifies a | 1509 | which is the default behavior, ``DEBIAN_NOAUTONAME`` specifies a |
1548 | particular package should not be renamed according to Debian library | 1510 | particular package should not be renamed according to Debian library |
1549 | package naming. You must use the package name as an override when you | 1511 | package naming. You must use the package name as an override when you |
1550 | set this variable. Here is an example from the ``fontconfig`` recipe: | 1512 | set this variable. Here is an example from the ``fontconfig`` recipe:: |
1551 | :: | ||
1552 | 1513 | ||
1553 | DEBIAN_NOAUTONAME_fontconfig-utils = "1" | 1514 | DEBIAN_NOAUTONAME_fontconfig-utils = "1" |
1554 | 1515 | ||
@@ -1558,8 +1519,7 @@ system and gives an overview of their function and contents. | |||
1558 | the library name for an individual package. Overriding the library | 1519 | the library name for an individual package. Overriding the library |
1559 | name in these cases is rare. You must use the package name as an | 1520 | name in these cases is rare. You must use the package name as an |
1560 | override when you set this variable. Here is an example from the | 1521 | override when you set this variable. Here is an example from the |
1561 | ``dbus`` recipe: | 1522 | ``dbus`` recipe:: |
1562 | :: | ||
1563 | 1523 | ||
1564 | DEBIANNAME_${PN} = "dbus-1" | 1524 | DEBIANNAME_${PN} = "dbus-1" |
1565 | 1525 | ||
@@ -1610,8 +1570,7 @@ system and gives an overview of their function and contents. | |||
1610 | needed by the recipe at build time. | 1570 | needed by the recipe at build time. |
1611 | 1571 | ||
1612 | As an example, consider a recipe ``foo`` that contains the following | 1572 | As an example, consider a recipe ``foo`` that contains the following |
1613 | assignment: | 1573 | assignment:: |
1614 | :: | ||
1615 | 1574 | ||
1616 | DEPENDS = "bar" | 1575 | DEPENDS = "bar" |
1617 | 1576 | ||
@@ -1635,8 +1594,7 @@ system and gives an overview of their function and contents. | |||
1635 | As another example, ``DEPENDS`` can also be used to add utilities | 1594 | As another example, ``DEPENDS`` can also be used to add utilities |
1636 | that run on the build machine during the build. For example, a recipe | 1595 | that run on the build machine during the build. For example, a recipe |
1637 | that makes use of a code generator built by the recipe ``codegen`` | 1596 | that makes use of a code generator built by the recipe ``codegen`` |
1638 | might have the following: | 1597 | might have the following:: |
1639 | :: | ||
1640 | 1598 | ||
1641 | DEPENDS = "codegen-native" | 1599 | DEPENDS = "codegen-native" |
1642 | 1600 | ||
@@ -1702,8 +1660,7 @@ system and gives an overview of their function and contents. | |||
1702 | 1660 | ||
1703 | The BitBake configuration file initially defines the | 1661 | The BitBake configuration file initially defines the |
1704 | ``DEPLOY_DIR_DEB`` variable as a sub-folder of | 1662 | ``DEPLOY_DIR_DEB`` variable as a sub-folder of |
1705 | :term:`DEPLOY_DIR`: | 1663 | :term:`DEPLOY_DIR`:: |
1706 | :: | ||
1707 | 1664 | ||
1708 | DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb" | 1665 | DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb" |
1709 | 1666 | ||
@@ -1738,8 +1695,7 @@ system and gives an overview of their function and contents. | |||
1738 | "package_ipk". | 1695 | "package_ipk". |
1739 | 1696 | ||
1740 | The BitBake configuration file initially defines this variable as a | 1697 | The BitBake configuration file initially defines this variable as a |
1741 | sub-folder of :term:`DEPLOY_DIR`: | 1698 | sub-folder of :term:`DEPLOY_DIR`:: |
1742 | :: | ||
1743 | 1699 | ||
1744 | DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk" | 1700 | DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk" |
1745 | 1701 | ||
@@ -1759,8 +1715,7 @@ system and gives an overview of their function and contents. | |||
1759 | "package_rpm". | 1715 | "package_rpm". |
1760 | 1716 | ||
1761 | The BitBake configuration file initially defines this variable as a | 1717 | The BitBake configuration file initially defines this variable as a |
1762 | sub-folder of :term:`DEPLOY_DIR`: | 1718 | sub-folder of :term:`DEPLOY_DIR`:: |
1763 | :: | ||
1764 | 1719 | ||
1765 | DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm" | 1720 | DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm" |
1766 | 1721 | ||
@@ -1780,8 +1735,7 @@ system and gives an overview of their function and contents. | |||
1780 | "package_tar". | 1735 | "package_tar". |
1781 | 1736 | ||
1782 | The BitBake configuration file initially defines this variable as a | 1737 | The BitBake configuration file initially defines this variable as a |
1783 | sub-folder of :term:`DEPLOY_DIR`: | 1738 | sub-folder of :term:`DEPLOY_DIR`:: |
1784 | :: | ||
1785 | 1739 | ||
1786 | DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar" | 1740 | DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar" |
1787 | 1741 | ||
@@ -1796,8 +1750,7 @@ system and gives an overview of their function and contents. | |||
1796 | :term:`DEPLOYDIR` | 1750 | :term:`DEPLOYDIR` |
1797 | When inheriting the :ref:`deploy <ref-classes-deploy>` class, the | 1751 | When inheriting the :ref:`deploy <ref-classes-deploy>` class, the |
1798 | ``DEPLOYDIR`` points to a temporary work area for deployed files that | 1752 | ``DEPLOYDIR`` points to a temporary work area for deployed files that |
1799 | is set in the ``deploy`` class as follows: | 1753 | is set in the ``deploy`` class as follows:: |
1800 | :: | ||
1801 | 1754 | ||
1802 | DEPLOYDIR = "${WORKDIR}/deploy-${PN}" | 1755 | DEPLOYDIR = "${WORKDIR}/deploy-${PN}" |
1803 | 1756 | ||
@@ -1824,8 +1777,7 @@ system and gives an overview of their function and contents. | |||
1824 | :term:`Source Directory`. | 1777 | :term:`Source Directory`. |
1825 | 1778 | ||
1826 | Within that ``poky.conf`` file, the ``DISTRO`` variable is set as | 1779 | Within that ``poky.conf`` file, the ``DISTRO`` variable is set as |
1827 | follows: | 1780 | follows:: |
1828 | :: | ||
1829 | 1781 | ||
1830 | DISTRO = "poky" | 1782 | DISTRO = "poky" |
1831 | 1783 | ||
@@ -1899,8 +1851,7 @@ system and gives an overview of their function and contents. | |||
1899 | able to reuse the default | 1851 | able to reuse the default |
1900 | :term:`DISTRO_FEATURES` options without the | 1852 | :term:`DISTRO_FEATURES` options without the |
1901 | need to write out the full set. Here is an example that uses | 1853 | need to write out the full set. Here is an example that uses |
1902 | ``DISTRO_FEATURES_DEFAULT`` from a custom distro configuration file: | 1854 | ``DISTRO_FEATURES_DEFAULT`` from a custom distro configuration file:: |
1903 | :: | ||
1904 | 1855 | ||
1905 | DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature" | 1856 | DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature" |
1906 | 1857 | ||
@@ -1948,8 +1899,7 @@ system and gives an overview of their function and contents. | |||
1948 | of the :term:`Source Directory`. | 1899 | of the :term:`Source Directory`. |
1949 | 1900 | ||
1950 | Within that ``poky.conf`` file, the ``DISTRO_NAME`` variable is set | 1901 | Within that ``poky.conf`` file, the ``DISTRO_NAME`` variable is set |
1951 | as follows: | 1902 | as follows:: |
1952 | :: | ||
1953 | 1903 | ||
1954 | DISTRO_NAME = "Poky (Yocto Project Reference Distro)" | 1904 | DISTRO_NAME = "Poky (Yocto Project Reference Distro)" |
1955 | 1905 | ||
@@ -2065,8 +2015,7 @@ system and gives an overview of their function and contents. | |||
2065 | 2015 | ||
2066 | You can set ``ERR_REPORT_DIR`` to the path you want the error | 2016 | You can set ``ERR_REPORT_DIR`` to the path you want the error |
2067 | reporting tool to store the debug files as follows in your | 2017 | reporting tool to store the debug files as follows in your |
2068 | ``local.conf`` file: | 2018 | ``local.conf`` file:: |
2069 | :: | ||
2070 | 2019 | ||
2071 | ERR_REPORT_DIR = "path" | 2020 | ERR_REPORT_DIR = "path" |
2072 | 2021 | ||
@@ -2094,8 +2043,7 @@ system and gives an overview of their function and contents. | |||
2094 | package's particular libraries only and not the whole package. | 2043 | package's particular libraries only and not the whole package. |
2095 | 2044 | ||
2096 | Use the ``EXCLUDE_FROM_SHLIBS`` variable by setting it to "1" for a | 2045 | Use the ``EXCLUDE_FROM_SHLIBS`` variable by setting it to "1" for a |
2097 | particular package: | 2046 | particular package:: |
2098 | :: | ||
2099 | 2047 | ||
2100 | EXCLUDE_FROM_SHLIBS = "1" | 2048 | EXCLUDE_FROM_SHLIBS = "1" |
2101 | 2049 | ||
@@ -2129,8 +2077,7 @@ system and gives an overview of their function and contents. | |||
2129 | The full package version specification as it appears on the final | 2077 | The full package version specification as it appears on the final |
2130 | packages produced by a recipe. The variable's value is normally used | 2078 | packages produced by a recipe. The variable's value is normally used |
2131 | to fix a runtime dependency to the exact same version of another | 2079 | to fix a runtime dependency to the exact same version of another |
2132 | package in the same recipe: | 2080 | package in the same recipe:: |
2133 | :: | ||
2134 | 2081 | ||
2135 | RDEPENDS_${PN}-additional-module = "${PN} (= ${EXTENDPKGV})" | 2082 | RDEPENDS_${PN}-additional-module = "${PN} (= ${EXTENDPKGV})" |
2136 | 2083 | ||
@@ -2230,8 +2177,7 @@ system and gives an overview of their function and contents. | |||
2230 | Specifies additional options for the image creation command that has | 2177 | Specifies additional options for the image creation command that has |
2231 | been specified in :term:`IMAGE_CMD`. When setting | 2178 | been specified in :term:`IMAGE_CMD`. When setting |
2232 | this variable, use an override for the associated image type. Here is | 2179 | this variable, use an override for the associated image type. Here is |
2233 | an example: | 2180 | an example:: |
2234 | :: | ||
2235 | 2181 | ||
2236 | EXTRA_IMAGECMD_ext3 ?= "-i 4096" | 2182 | EXTRA_IMAGECMD_ext3 ?= "-i 4096" |
2237 | 2183 | ||
@@ -2255,8 +2201,7 @@ system and gives an overview of their function and contents. | |||
2255 | added to the beginning of the environment variable ``PATH``. As an | 2201 | added to the beginning of the environment variable ``PATH``. As an |
2256 | example, the following prepends | 2202 | example, the following prepends |
2257 | "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to | 2203 | "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to |
2258 | ``PATH``: | 2204 | ``PATH``:: |
2259 | :: | ||
2260 | 2205 | ||
2261 | EXTRANATIVEPATH = "foo bar" | 2206 | EXTRANATIVEPATH = "foo bar" |
2262 | 2207 | ||
@@ -2294,8 +2239,7 @@ system and gives an overview of their function and contents. | |||
2294 | 2239 | ||
2295 | The set list of commands you can configure using the | 2240 | The set list of commands you can configure using the |
2296 | ``EXTRA_USERS_PARAMS`` is shown in the ``extrausers`` class. These | 2241 | ``EXTRA_USERS_PARAMS`` is shown in the ``extrausers`` class. These |
2297 | commands map to the normal Unix commands of the same names: | 2242 | commands map to the normal Unix commands of the same names:: |
2298 | :: | ||
2299 | 2243 | ||
2300 | # EXTRA_USERS_PARAMS = "\ | 2244 | # EXTRA_USERS_PARAMS = "\ |
2301 | # useradd -p '' tester; \ | 2245 | # useradd -p '' tester; \ |
@@ -2321,8 +2265,7 @@ system and gives an overview of their function and contents. | |||
2321 | Defines one or more packages to include in an image when a specific | 2265 | Defines one or more packages to include in an image when a specific |
2322 | item is included in :term:`IMAGE_FEATURES`. | 2266 | item is included in :term:`IMAGE_FEATURES`. |
2323 | When setting the value, ``FEATURE_PACKAGES`` should have the name of | 2267 | When setting the value, ``FEATURE_PACKAGES`` should have the name of |
2324 | the feature item as an override. Here is an example: | 2268 | the feature item as an override. Here is an example:: |
2325 | :: | ||
2326 | 2269 | ||
2327 | FEATURE_PACKAGES_widget = "package1 package2" | 2270 | FEATURE_PACKAGES_widget = "package1 package2" |
2328 | 2271 | ||
@@ -2342,8 +2285,7 @@ system and gives an overview of their function and contents. | |||
2342 | OPKG to support runtime package management of IPK packages. You set | 2285 | OPKG to support runtime package management of IPK packages. You set |
2343 | this variable in your ``local.conf`` file. | 2286 | this variable in your ``local.conf`` file. |
2344 | 2287 | ||
2345 | Consider the following example: | 2288 | Consider the following example:: |
2346 | :: | ||
2347 | 2289 | ||
2348 | FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir" | 2290 | FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir" |
2349 | 2291 | ||
@@ -2362,8 +2304,7 @@ system and gives an overview of their function and contents. | |||
2362 | To use the ``FILES`` variable, provide a package name override that | 2304 | To use the ``FILES`` variable, provide a package name override that |
2363 | identifies the resulting package. Then, provide a space-separated | 2305 | identifies the resulting package. Then, provide a space-separated |
2364 | list of files or paths that identify the files you want included as | 2306 | list of files or paths that identify the files you want included as |
2365 | part of the resulting package. Here is an example: | 2307 | part of the resulting package. Here is an example:: |
2366 | :: | ||
2367 | 2308 | ||
2368 | FILES_${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile" | 2309 | FILES_${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile" |
2369 | 2310 | ||
@@ -2398,8 +2339,7 @@ system and gives an overview of their function and contents. | |||
2398 | symbolic link (symlink) for shared libraries on the target platform. | 2339 | symbolic link (symlink) for shared libraries on the target platform. |
2399 | 2340 | ||
2400 | The following statement from the ``bitbake.conf`` shows how it is | 2341 | The following statement from the ``bitbake.conf`` shows how it is |
2401 | set: | 2342 | set:: |
2402 | :: | ||
2403 | 2343 | ||
2404 | FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}" | 2344 | FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}" |
2405 | 2345 | ||
@@ -2413,8 +2353,7 @@ system and gives an overview of their function and contents. | |||
2413 | 2353 | ||
2414 | Best practices dictate that you accomplish this by using | 2354 | Best practices dictate that you accomplish this by using |
2415 | ``FILESEXTRAPATHS`` from within a ``.bbappend`` file and that you | 2355 | ``FILESEXTRAPATHS`` from within a ``.bbappend`` file and that you |
2416 | prepend paths as follows: | 2356 | prepend paths as follows:: |
2417 | :: | ||
2418 | 2357 | ||
2419 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 2358 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
2420 | 2359 | ||
@@ -2436,8 +2375,7 @@ system and gives an overview of their function and contents. | |||
2436 | are directing BitBake to extend the path by prepending directories | 2375 | are directing BitBake to extend the path by prepending directories |
2437 | to the search path. | 2376 | to the search path. |
2438 | 2377 | ||
2439 | Here is another common use: | 2378 | Here is another common use:: |
2440 | :: | ||
2441 | 2379 | ||
2442 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | 2380 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |
2443 | 2381 | ||
@@ -2445,15 +2383,13 @@ system and gives an overview of their function and contents. | |||
2445 | ``FILESPATH`` variable to include a directory named ``files`` that is | 2383 | ``FILESPATH`` variable to include a directory named ``files`` that is |
2446 | in the same directory as the corresponding append file. | 2384 | in the same directory as the corresponding append file. |
2447 | 2385 | ||
2448 | This next example specifically adds three paths: | 2386 | This next example specifically adds three paths:: |
2449 | :: | ||
2450 | 2387 | ||
2451 | FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:" | 2388 | FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:" |
2452 | 2389 | ||
2453 | A final example shows how you can extend the search path and include | 2390 | A final example shows how you can extend the search path and include |
2454 | a :term:`MACHINE`-specific override, which is useful | 2391 | a :term:`MACHINE`-specific override, which is useful |
2455 | in a BSP layer: | 2392 | in a BSP layer:: |
2456 | :: | ||
2457 | 2393 | ||
2458 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" | 2394 | FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" |
2459 | 2395 | ||
@@ -2485,8 +2421,7 @@ system and gives an overview of their function and contents. | |||
2485 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" | 2421 | ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`" |
2486 | section of the BitBake User Manual. | 2422 | section of the BitBake User Manual. |
2487 | 2423 | ||
2488 | By default, the ``FILESOVERRIDES`` variable is defined as: | 2424 | By default, the ``FILESOVERRIDES`` variable is defined as:: |
2489 | :: | ||
2490 | 2425 | ||
2491 | FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}" | 2426 | FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}" |
2492 | 2427 | ||
@@ -2507,8 +2442,7 @@ system and gives an overview of their function and contents. | |||
2507 | 2442 | ||
2508 | The default value for the ``FILESPATH`` variable is defined in the | 2443 | The default value for the ``FILESPATH`` variable is defined in the |
2509 | ``base.bbclass`` class found in ``meta/classes`` in the | 2444 | ``base.bbclass`` class found in ``meta/classes`` in the |
2510 | :term:`Source Directory`: | 2445 | :term:`Source Directory`:: |
2511 | :: | ||
2512 | 2446 | ||
2513 | FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \ | 2447 | FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \ |
2514 | "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}" | 2448 | "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}" |
@@ -2533,8 +2467,7 @@ system and gives an overview of their function and contents. | |||
2533 | 2467 | ||
2534 | You can take advantage of this searching behavior in useful ways. For | 2468 | You can take advantage of this searching behavior in useful ways. For |
2535 | example, consider a case where the following directory structure | 2469 | example, consider a case where the following directory structure |
2536 | exists for general and machine-specific configurations: | 2470 | exists for general and machine-specific configurations:: |
2537 | :: | ||
2538 | 2471 | ||
2539 | files/defconfig | 2472 | files/defconfig |
2540 | files/MACHINEA/defconfig | 2473 | files/MACHINEA/defconfig |
@@ -2662,16 +2595,14 @@ system and gives an overview of their function and contents. | |||
2662 | Programming (ROP) attacks much more difficult to execute. | 2595 | Programming (ROP) attacks much more difficult to execute. |
2663 | 2596 | ||
2664 | By default the ``security_flags.inc`` file enables PIE by setting the | 2597 | By default the ``security_flags.inc`` file enables PIE by setting the |
2665 | variable as follows: | 2598 | variable as follows:: |
2666 | :: | ||
2667 | 2599 | ||
2668 | GCCPIE ?= "--enable-default-pie" | 2600 | GCCPIE ?= "--enable-default-pie" |
2669 | 2601 | ||
2670 | :term:`GCCVERSION` | 2602 | :term:`GCCVERSION` |
2671 | Specifies the default version of the GNU C Compiler (GCC) used for | 2603 | Specifies the default version of the GNU C Compiler (GCC) used for |
2672 | compilation. By default, ``GCCVERSION`` is set to "8.x" in the | 2604 | compilation. By default, ``GCCVERSION`` is set to "8.x" in the |
2673 | ``meta/conf/distro/include/tcmode-default.inc`` include file: | 2605 | ``meta/conf/distro/include/tcmode-default.inc`` include file:: |
2674 | :: | ||
2675 | 2606 | ||
2676 | GCCVERSION ?= "8.%" | 2607 | GCCVERSION ?= "8.%" |
2677 | 2608 | ||
@@ -2706,8 +2637,7 @@ system and gives an overview of their function and contents. | |||
2706 | passed to the ``groupadd`` command if you wish to add a group to the | 2637 | passed to the ``groupadd`` command if you wish to add a group to the |
2707 | system when the package is installed. | 2638 | system when the package is installed. |
2708 | 2639 | ||
2709 | Here is an example from the ``dbus`` recipe: | 2640 | Here is an example from the ``dbus`` recipe:: |
2710 | :: | ||
2711 | 2641 | ||
2712 | GROUPADD_PARAM_${PN} = "-r netdev" | 2642 | GROUPADD_PARAM_${PN} = "-r netdev" |
2713 | 2643 | ||
@@ -2855,13 +2785,11 @@ system and gives an overview of their function and contents. | |||
2855 | section. | 2785 | section. |
2856 | 2786 | ||
2857 | Setting this variable to "1" in your ``local.conf`` disables the | 2787 | Setting this variable to "1" in your ``local.conf`` disables the |
2858 | function: | 2788 | function:: |
2859 | :: | ||
2860 | 2789 | ||
2861 | ICECC_DISABLED ??= "1" | 2790 | ICECC_DISABLED ??= "1" |
2862 | 2791 | ||
2863 | To enable the function, set the variable as follows: | 2792 | To enable the function, set the variable as follows:: |
2864 | :: | ||
2865 | 2793 | ||
2866 | ICECC_DISABLED = "" | 2794 | ICECC_DISABLED = "" |
2867 | 2795 | ||
@@ -2946,8 +2874,7 @@ system and gives an overview of their function and contents. | |||
2946 | installed name, separate it from the original name with a semi-colon | 2874 | installed name, separate it from the original name with a semi-colon |
2947 | (;). Source files need to be located in | 2875 | (;). Source files need to be located in |
2948 | :term:`DEPLOY_DIR_IMAGE`. Here are two | 2876 | :term:`DEPLOY_DIR_IMAGE`. Here are two |
2949 | examples: | 2877 | examples:: |
2950 | :: | ||
2951 | 2878 | ||
2952 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2" | 2879 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2" |
2953 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio" | 2880 | IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio" |
@@ -2956,8 +2883,7 @@ system and gives an overview of their function and contents. | |||
2956 | this case, the destination file must have the same name as the base | 2883 | this case, the destination file must have the same name as the base |
2957 | name of the source file path. To install files into a directory | 2884 | name of the source file path. To install files into a directory |
2958 | within the target location, pass its name after a semi-colon (;). | 2885 | within the target location, pass its name after a semi-colon (;). |
2959 | Here are two examples: | 2886 | Here are two examples:: |
2960 | :: | ||
2961 | 2887 | ||
2962 | IMAGE_EFI_BOOT_FILES = "boot/loader/*" | 2888 | IMAGE_EFI_BOOT_FILES = "boot/loader/*" |
2963 | IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/" | 2889 | IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/" |
@@ -2982,8 +2908,7 @@ system and gives an overview of their function and contents. | |||
2982 | installed name, separate it from the original name with a semi-colon | 2908 | installed name, separate it from the original name with a semi-colon |
2983 | (;). Source files need to be located in | 2909 | (;). Source files need to be located in |
2984 | :term:`DEPLOY_DIR_IMAGE`. Here are two | 2910 | :term:`DEPLOY_DIR_IMAGE`. Here are two |
2985 | examples: | 2911 | examples:: |
2986 | :: | ||
2987 | 2912 | ||
2988 | IMAGE_BOOT_FILES = "u-boot.img uImage;kernel" | 2913 | IMAGE_BOOT_FILES = "u-boot.img uImage;kernel" |
2989 | IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}" | 2914 | IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}" |
@@ -2992,8 +2917,7 @@ system and gives an overview of their function and contents. | |||
2992 | this case, the destination file must have the same name as the base | 2917 | this case, the destination file must have the same name as the base |
2993 | name of the source file path. To install files into a directory | 2918 | name of the source file path. To install files into a directory |
2994 | within the target location, pass its name after a semi-colon (;). | 2919 | within the target location, pass its name after a semi-colon (;). |
2995 | Here are two examples: | 2920 | Here are two examples:: |
2996 | :: | ||
2997 | 2921 | ||
2998 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*" | 2922 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*" |
2999 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/" | 2923 | IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/" |
@@ -3026,8 +2950,7 @@ system and gives an overview of their function and contents. | |||
3026 | type, which corresponds to the value set in | 2950 | type, which corresponds to the value set in |
3027 | :term:`IMAGE_FSTYPES`, (e.g. ``ext3``, | 2951 | :term:`IMAGE_FSTYPES`, (e.g. ``ext3``, |
3028 | ``btrfs``, and so forth). When setting this variable, you should use | 2952 | ``btrfs``, and so forth). When setting this variable, you should use |
3029 | an override for the associated type. Here is an example: | 2953 | an override for the associated type. Here is an example:: |
3030 | :: | ||
3031 | 2954 | ||
3032 | IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} \ | 2955 | IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} \ |
3033 | --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \ | 2956 | --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \ |
@@ -3071,8 +2994,7 @@ system and gives an overview of their function and contents. | |||
3071 | Specifies the formats the OpenEmbedded build system uses during the | 2994 | Specifies the formats the OpenEmbedded build system uses during the |
3072 | build when creating the root filesystem. For example, setting | 2995 | build when creating the root filesystem. For example, setting |
3073 | ``IMAGE_FSTYPES`` as follows causes the build system to create root | 2996 | ``IMAGE_FSTYPES`` as follows causes the build system to create root |
3074 | filesystems using two formats: ``.ext3`` and ``.tar.bz2``: | 2997 | filesystems using two formats: ``.ext3`` and ``.tar.bz2``:: |
3075 | :: | ||
3076 | 2998 | ||
3077 | IMAGE_FSTYPES = "ext3 tar.bz2" | 2999 | IMAGE_FSTYPES = "ext3 tar.bz2" |
3078 | 3000 | ||
@@ -3103,8 +3025,7 @@ system and gives an overview of their function and contents. | |||
3103 | auto-generated entries in ``IMAGE_INSTALL`` in addition to its | 3025 | auto-generated entries in ``IMAGE_INSTALL`` in addition to its |
3104 | default contents. | 3026 | default contents. |
3105 | 3027 | ||
3106 | When you use this variable, it is best to use it as follows: | 3028 | When you use this variable, it is best to use it as follows:: |
3107 | :: | ||
3108 | 3029 | ||
3109 | IMAGE_INSTALL_append = " package-name" | 3030 | IMAGE_INSTALL_append = " package-name" |
3110 | 3031 | ||
@@ -3147,8 +3068,7 @@ system and gives an overview of their function and contents. | |||
3147 | into separate packages. Setting the ``IMAGE_LINGUAS`` variable | 3068 | into separate packages. Setting the ``IMAGE_LINGUAS`` variable |
3148 | ensures that any locale packages that correspond to packages already | 3069 | ensures that any locale packages that correspond to packages already |
3149 | selected for installation into the image are also installed. Here is | 3070 | selected for installation into the image are also installed. Here is |
3150 | an example: | 3071 | an example:: |
3151 | :: | ||
3152 | 3072 | ||
3153 | IMAGE_LINGUAS = "pt-br de-de" | 3073 | IMAGE_LINGUAS = "pt-br de-de" |
3154 | 3074 | ||
@@ -3167,8 +3087,7 @@ system and gives an overview of their function and contents. | |||
3167 | The name of the output image symlink (which does not include | 3087 | The name of the output image symlink (which does not include |
3168 | the version part as :term:`IMAGE_NAME` does). The default value | 3088 | the version part as :term:`IMAGE_NAME` does). The default value |
3169 | is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE` | 3089 | is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE` |
3170 | variables: | 3090 | variables:: |
3171 | :: | ||
3172 | 3091 | ||
3173 | IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}" | 3092 | IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}" |
3174 | 3093 | ||
@@ -3176,14 +3095,12 @@ system and gives an overview of their function and contents. | |||
3176 | :term:`IMAGE_MANIFEST` | 3095 | :term:`IMAGE_MANIFEST` |
3177 | The manifest file for the image. This file lists all the installed | 3096 | The manifest file for the image. This file lists all the installed |
3178 | packages that make up the image. The file contains package | 3097 | packages that make up the image. The file contains package |
3179 | information on a line-per-package basis as follows: | 3098 | information on a line-per-package basis as follows:: |
3180 | :: | ||
3181 | 3099 | ||
3182 | packagename packagearch version | 3100 | packagename packagearch version |
3183 | 3101 | ||
3184 | The :ref:`image <ref-classes-image>` class defines the manifest | 3102 | The :ref:`image <ref-classes-image>` class defines the manifest |
3185 | file as follows: | 3103 | file as follows:: |
3186 | :: | ||
3187 | 3104 | ||
3188 | IMAGE_MANIFEST ="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest" | 3105 | IMAGE_MANIFEST ="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest" |
3189 | 3106 | ||
@@ -3197,8 +3114,7 @@ system and gives an overview of their function and contents. | |||
3197 | The name of the output image files minus the extension. This variable | 3114 | The name of the output image files minus the extension. This variable |
3198 | is derived using the :term:`IMAGE_BASENAME`, | 3115 | is derived using the :term:`IMAGE_BASENAME`, |
3199 | :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX` | 3116 | :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX` |
3200 | variables: | 3117 | variables:: |
3201 | :: | ||
3202 | 3118 | ||
3203 | IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | 3119 | IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
3204 | 3120 | ||
@@ -3229,8 +3145,7 @@ system and gives an overview of their function and contents. | |||
3229 | to boot and allows for basic post installs while still leaving a | 3145 | to boot and allows for basic post installs while still leaving a |
3230 | small amount of free disk space. If 30% free space is inadequate, you | 3146 | small amount of free disk space. If 30% free space is inadequate, you |
3231 | can increase the default value. For example, the following setting | 3147 | can increase the default value. For example, the following setting |
3232 | gives you 50% free space added to the image: | 3148 | gives you 50% free space added to the image:: |
3233 | :: | ||
3234 | 3149 | ||
3235 | IMAGE_OVERHEAD_FACTOR = "1.5" | 3150 | IMAGE_OVERHEAD_FACTOR = "1.5" |
3236 | 3151 | ||
@@ -3271,8 +3186,7 @@ system and gives an overview of their function and contents. | |||
3271 | :term:`IMAGE_POSTPROCESS_COMMAND` | 3186 | :term:`IMAGE_POSTPROCESS_COMMAND` |
3272 | Specifies a list of functions to call once the OpenEmbedded build | 3187 | Specifies a list of functions to call once the OpenEmbedded build |
3273 | system creates the final image output files. You can specify | 3188 | system creates the final image output files. You can specify |
3274 | functions separated by semicolons: | 3189 | functions separated by semicolons:: |
3275 | :: | ||
3276 | 3190 | ||
3277 | IMAGE_POSTPROCESS_COMMAND += "function; ... " | 3191 | IMAGE_POSTPROCESS_COMMAND += "function; ... " |
3278 | 3192 | ||
@@ -3285,8 +3199,7 @@ system and gives an overview of their function and contents. | |||
3285 | :term:`IMAGE_PREPROCESS_COMMAND` | 3199 | :term:`IMAGE_PREPROCESS_COMMAND` |
3286 | Specifies a list of functions to call before the OpenEmbedded build | 3200 | Specifies a list of functions to call before the OpenEmbedded build |
3287 | system creates the final image output files. You can specify | 3201 | system creates the final image output files. You can specify |
3288 | functions separated by semicolons: | 3202 | functions separated by semicolons:: |
3289 | :: | ||
3290 | 3203 | ||
3291 | IMAGE_PREPROCESS_COMMAND += "function; ... " | 3204 | IMAGE_PREPROCESS_COMMAND += "function; ... " |
3292 | 3205 | ||
@@ -3317,14 +3230,12 @@ system and gives an overview of their function and contents. | |||
3317 | This variable is particularly useful when you want to ensure that a | 3230 | This variable is particularly useful when you want to ensure that a |
3318 | specific amount of free disk space is available on a device after an | 3231 | specific amount of free disk space is available on a device after an |
3319 | image is installed and running. For example, to be sure 5 Gbytes of | 3232 | image is installed and running. For example, to be sure 5 Gbytes of |
3320 | free disk space is available, set the variable as follows: | 3233 | free disk space is available, set the variable as follows:: |
3321 | :: | ||
3322 | 3234 | ||
3323 | IMAGE_ROOTFS_EXTRA_SPACE = "5242880" | 3235 | IMAGE_ROOTFS_EXTRA_SPACE = "5242880" |
3324 | 3236 | ||
3325 | For example, the Yocto Project Build Appliance specifically requests | 3237 | For example, the Yocto Project Build Appliance specifically requests |
3326 | 40 Gbytes of extra space with the line: | 3238 | 40 Gbytes of extra space with the line:: |
3327 | :: | ||
3328 | 3239 | ||
3329 | IMAGE_ROOTFS_EXTRA_SPACE = "41943040" | 3240 | IMAGE_ROOTFS_EXTRA_SPACE = "41943040" |
3330 | 3241 | ||
@@ -3335,8 +3246,7 @@ system and gives an overview of their function and contents. | |||
3335 | the generated image, a requested size for the image, and requested | 3246 | the generated image, a requested size for the image, and requested |
3336 | additional free disk space to be added to the image. Programatically, | 3247 | additional free disk space to be added to the image. Programatically, |
3337 | the build system determines the final size of the generated image as | 3248 | the build system determines the final size of the generated image as |
3338 | follows: | 3249 | follows:: |
3339 | :: | ||
3340 | 3250 | ||
3341 | if (image-du * overhead) < rootfs-size: | 3251 | if (image-du * overhead) < rootfs-size: |
3342 | internal-rootfs-size = rootfs-size + xspace | 3252 | internal-rootfs-size = rootfs-size + xspace |
@@ -3355,8 +3265,7 @@ system and gives an overview of their function and contents. | |||
3355 | 3265 | ||
3356 | :term:`IMAGE_TYPEDEP` | 3266 | :term:`IMAGE_TYPEDEP` |
3357 | Specifies a dependency from one image type on another. Here is an | 3267 | Specifies a dependency from one image type on another. Here is an |
3358 | example from the :ref:`image-live <ref-classes-image-live>` class: | 3268 | example from the :ref:`image-live <ref-classes-image-live>` class:: |
3359 | :: | ||
3360 | 3269 | ||
3361 | IMAGE_TYPEDEP_live = "ext3" | 3270 | IMAGE_TYPEDEP_live = "ext3" |
3362 | 3271 | ||
@@ -3443,8 +3352,7 @@ system and gives an overview of their function and contents. | |||
3443 | variable. Once the variable is defined in the ``include`` file, you | 3352 | variable. Once the variable is defined in the ``include`` file, you |
3444 | can use the variable to set the ``PR`` values in each recipe. You | 3353 | can use the variable to set the ``PR`` values in each recipe. You |
3445 | will notice that when you set a recipe's ``PR`` you can provide more | 3354 | will notice that when you set a recipe's ``PR`` you can provide more |
3446 | granular revisioning by appending values to the ``INC_PR`` variable: | 3355 | granular revisioning by appending values to the ``INC_PR`` variable:: |
3447 | :: | ||
3448 | 3356 | ||
3449 | recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2" | 3357 | recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2" |
3450 | recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1" | 3358 | recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1" |
@@ -3467,8 +3375,7 @@ system and gives an overview of their function and contents. | |||
3467 | .. note:: | 3375 | .. note:: |
3468 | 3376 | ||
3469 | This functionality is only regularly tested using the following | 3377 | This functionality is only regularly tested using the following |
3470 | setting: | 3378 | setting:: |
3471 | :: | ||
3472 | 3379 | ||
3473 | INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0" | 3380 | INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0" |
3474 | 3381 | ||
@@ -3482,8 +3389,7 @@ system and gives an overview of their function and contents. | |||
3482 | It is possible to define a list of licenses that are allowed to be | 3389 | It is possible to define a list of licenses that are allowed to be |
3483 | used instead of the licenses that are excluded. To do this, define | 3390 | used instead of the licenses that are excluded. To do this, define |
3484 | a variable ``COMPATIBLE_LICENSES`` with the names of the licenses | 3391 | a variable ``COMPATIBLE_LICENSES`` with the names of the licenses |
3485 | that are allowed. Then define ``INCOMPATIBLE_LICENSE`` as: | 3392 | that are allowed. Then define ``INCOMPATIBLE_LICENSE`` as:: |
3486 | :: | ||
3487 | 3393 | ||
3488 | INCOMPATIBLE_LICENSE = "${@' '.join(sorted(set(d.getVar('AVAILABLE_LICENSES').split()) - set(d.getVar('COMPATIBLE_LICENSES').split())))}" | 3394 | INCOMPATIBLE_LICENSE = "${@' '.join(sorted(set(d.getVar('AVAILABLE_LICENSES').split()) - set(d.getVar('COMPATIBLE_LICENSES').split())))}" |
3489 | 3395 | ||
@@ -3508,8 +3414,7 @@ system and gives an overview of their function and contents. | |||
3508 | unlikely that you want to edit this variable. | 3414 | unlikely that you want to edit this variable. |
3509 | 3415 | ||
3510 | The default value of the variable is set as follows in the | 3416 | The default value of the variable is set as follows in the |
3511 | ``meta/conf/distro/defaultsetup.conf`` file: | 3417 | ``meta/conf/distro/defaultsetup.conf`` file:: |
3512 | :: | ||
3513 | 3418 | ||
3514 | INHERIT_DISTRO ?= "debian devshell sstate license" | 3419 | INHERIT_DISTRO ?= "debian devshell sstate license" |
3515 | 3420 | ||
@@ -3533,8 +3438,7 @@ system and gives an overview of their function and contents. | |||
3533 | 3438 | ||
3534 | To prevent the build system from splitting out debug information | 3439 | To prevent the build system from splitting out debug information |
3535 | during packaging, set the ``INHIBIT_PACKAGE_DEBUG_SPLIT`` variable as | 3440 | during packaging, set the ``INHIBIT_PACKAGE_DEBUG_SPLIT`` variable as |
3536 | follows: | 3441 | follows:: |
3537 | :: | ||
3538 | 3442 | ||
3539 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | 3443 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" |
3540 | 3444 | ||
@@ -3646,15 +3550,13 @@ system and gives an overview of their function and contents. | |||
3646 | 3550 | ||
3647 | Setting the variable to "1" in a configuration file causes the | 3551 | Setting the variable to "1" in a configuration file causes the |
3648 | OpenEmbedded build system to generate a kernel image with the | 3552 | OpenEmbedded build system to generate a kernel image with the |
3649 | initramfs specified in ``INITRAMFS_IMAGE`` bundled within: | 3553 | initramfs specified in ``INITRAMFS_IMAGE`` bundled within:: |
3650 | :: | ||
3651 | 3554 | ||
3652 | INITRAMFS_IMAGE_BUNDLE = "1" | 3555 | INITRAMFS_IMAGE_BUNDLE = "1" |
3653 | 3556 | ||
3654 | By default, the | 3557 | By default, the |
3655 | :ref:`kernel <ref-classes-kernel>` class sets this variable to a | 3558 | :ref:`kernel <ref-classes-kernel>` class sets this variable to a |
3656 | null string as follows: | 3559 | null string as follows:: |
3657 | :: | ||
3658 | 3560 | ||
3659 | INITRAMFS_IMAGE_BUNDLE ?= "" | 3561 | INITRAMFS_IMAGE_BUNDLE ?= "" |
3660 | 3562 | ||
@@ -3672,15 +3574,13 @@ system and gives an overview of their function and contents. | |||
3672 | :term:`INITRAMFS_LINK_NAME` | 3574 | :term:`INITRAMFS_LINK_NAME` |
3673 | The link name of the initial RAM filesystem image. This variable is | 3575 | The link name of the initial RAM filesystem image. This variable is |
3674 | set in the ``meta/classes/kernel-artifact-names.bbclass`` file as | 3576 | set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
3675 | follows: | 3577 | follows:: |
3676 | :: | ||
3677 | 3578 | ||
3678 | INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}" | 3579 | INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}" |
3679 | 3580 | ||
3680 | The value of the | 3581 | The value of the |
3681 | ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same | 3582 | ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
3682 | file, has the following value: | 3583 | file, has the following value:: |
3683 | :: | ||
3684 | 3584 | ||
3685 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" | 3585 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
3686 | 3586 | ||
@@ -3690,14 +3590,12 @@ system and gives an overview of their function and contents. | |||
3690 | :term:`INITRAMFS_NAME` | 3590 | :term:`INITRAMFS_NAME` |
3691 | The base name of the initial RAM filesystem image. This variable is | 3591 | The base name of the initial RAM filesystem image. This variable is |
3692 | set in the ``meta/classes/kernel-artifact-names.bbclass`` file as | 3592 | set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
3693 | follows: | 3593 | follows:: |
3694 | :: | ||
3695 | 3594 | ||
3696 | INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}" | 3595 | INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}" |
3697 | 3596 | ||
3698 | The value of the :term:`KERNEL_ARTIFACT_NAME` | 3597 | The value of the :term:`KERNEL_ARTIFACT_NAME` |
3699 | variable, which is set in the same file, has the following value: | 3598 | variable, which is set in the same file, has the following value:: |
3700 | :: | ||
3701 | 3599 | ||
3702 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | 3600 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
3703 | 3601 | ||
@@ -3735,8 +3633,7 @@ system and gives an overview of their function and contents. | |||
3735 | variable. | 3633 | variable. |
3736 | 3634 | ||
3737 | :term:`INITSCRIPT_PARAMS` | 3635 | :term:`INITSCRIPT_PARAMS` |
3738 | Specifies the options to pass to ``update-rc.d``. Here is an example: | 3636 | Specifies the options to pass to ``update-rc.d``. Here is an example:: |
3739 | :: | ||
3740 | 3637 | ||
3741 | INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." | 3638 | INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." |
3742 | 3639 | ||
@@ -3756,8 +3653,7 @@ system and gives an overview of their function and contents. | |||
3756 | recipe. For example, to skip the check for symbolic link ``.so`` | 3653 | recipe. For example, to skip the check for symbolic link ``.so`` |
3757 | files in the main package of a recipe, add the following to the | 3654 | files in the main package of a recipe, add the following to the |
3758 | recipe. The package name override must be used, which in this example | 3655 | recipe. The package name override must be used, which in this example |
3759 | is ``${PN}``: | 3656 | is ``${PN}``:: |
3760 | :: | ||
3761 | 3657 | ||
3762 | INSANE_SKIP_${PN} += "dev-so" | 3658 | INSANE_SKIP_${PN} += "dev-so" |
3763 | 3659 | ||
@@ -3799,8 +3695,7 @@ system and gives an overview of their function and contents. | |||
3799 | kernel's append file. For example, if you are using the | 3695 | kernel's append file. For example, if you are using the |
3800 | ``linux-yocto_4.12`` kernel, the kernel recipe file is the | 3696 | ``linux-yocto_4.12`` kernel, the kernel recipe file is the |
3801 | ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. ``KBRANCH`` | 3697 | ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. ``KBRANCH`` |
3802 | is set as follows in that kernel recipe file: | 3698 | is set as follows in that kernel recipe file:: |
3803 | :: | ||
3804 | 3699 | ||
3805 | KBRANCH ?= "standard/base" | 3700 | KBRANCH ?= "standard/base" |
3806 | 3701 | ||
@@ -3812,8 +3707,7 @@ system and gives an overview of their function and contents. | |||
3812 | Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA | 3707 | Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA |
3813 | machines (``meta-yocto-bsp``) is named | 3708 | machines (``meta-yocto-bsp``) is named |
3814 | ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``. | 3709 | ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``. |
3815 | Here are the related statements from that append file: | 3710 | Here are the related statements from that append file:: |
3816 | :: | ||
3817 | 3711 | ||
3818 | KBRANCH_genericx86 = "standard/base" | 3712 | KBRANCH_genericx86 = "standard/base" |
3819 | KBRANCH_genericx86-64 = "standard/base" | 3713 | KBRANCH_genericx86-64 = "standard/base" |
@@ -3839,19 +3733,16 @@ system and gives an overview of their function and contents. | |||
3839 | ``defconfig`` file. | 3733 | ``defconfig`` file. |
3840 | 3734 | ||
3841 | To use the variable, set it in the append file for your kernel recipe | 3735 | To use the variable, set it in the append file for your kernel recipe |
3842 | using the following form: | 3736 | using the following form:: |
3843 | :: | ||
3844 | 3737 | ||
3845 | KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file | 3738 | KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file |
3846 | 3739 | ||
3847 | Here is an example from a "raspberrypi2" ``KMACHINE`` build that uses | 3740 | Here is an example from a "raspberrypi2" ``KMACHINE`` build that uses |
3848 | a ``defconfig`` file named "bcm2709_defconfig": | 3741 | a ``defconfig`` file named "bcm2709_defconfig":: |
3849 | :: | ||
3850 | 3742 | ||
3851 | KBUILD_DEFCONFIG_raspberrypi2 = "bcm2709_defconfig" | 3743 | KBUILD_DEFCONFIG_raspberrypi2 = "bcm2709_defconfig" |
3852 | 3744 | ||
3853 | As an alternative, you can use the following within your append file: | 3745 | As an alternative, you can use the following within your append file:: |
3854 | :: | ||
3855 | 3746 | ||
3856 | KBUILD_DEFCONFIG_pn-linux-yocto ?= defconfig_file | 3747 | KBUILD_DEFCONFIG_pn-linux-yocto ?= defconfig_file |
3857 | 3748 | ||
@@ -3872,8 +3763,7 @@ system and gives an overview of their function and contents. | |||
3872 | 3763 | ||
3873 | The value of ``KERNEL_ARTIFACT_NAME``, which is set in the | 3764 | The value of ``KERNEL_ARTIFACT_NAME``, which is set in the |
3874 | ``meta/classes/kernel-artifact-names.bbclass`` file, has the | 3765 | ``meta/classes/kernel-artifact-names.bbclass`` file, has the |
3875 | following default value: | 3766 | following default value:: |
3876 | :: | ||
3877 | 3767 | ||
3878 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | 3768 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
3879 | 3769 | ||
@@ -3905,15 +3795,13 @@ system and gives an overview of their function and contents. | |||
3905 | :term:`KERNEL_DTB_LINK_NAME` | 3795 | :term:`KERNEL_DTB_LINK_NAME` |
3906 | The link name of the kernel device tree binary (DTB). This variable | 3796 | The link name of the kernel device tree binary (DTB). This variable |
3907 | is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as | 3797 | is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
3908 | follows: | 3798 | follows:: |
3909 | :: | ||
3910 | 3799 | ||
3911 | KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" | 3800 | KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
3912 | 3801 | ||
3913 | The | 3802 | The |
3914 | value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in | 3803 | value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in |
3915 | the same file, has the following value: | 3804 | the same file, has the following value:: |
3916 | :: | ||
3917 | 3805 | ||
3918 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" | 3806 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
3919 | 3807 | ||
@@ -3923,14 +3811,12 @@ system and gives an overview of their function and contents. | |||
3923 | :term:`KERNEL_DTB_NAME` | 3811 | :term:`KERNEL_DTB_NAME` |
3924 | The base name of the kernel device tree binary (DTB). This variable | 3812 | The base name of the kernel device tree binary (DTB). This variable |
3925 | is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as | 3813 | is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as |
3926 | follows: | 3814 | follows:: |
3927 | :: | ||
3928 | 3815 | ||
3929 | KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}" | 3816 | KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
3930 | 3817 | ||
3931 | The value of the :term:`KERNEL_ARTIFACT_NAME` | 3818 | The value of the :term:`KERNEL_ARTIFACT_NAME` |
3932 | variable, which is set in the same file, has the following value: | 3819 | variable, which is set in the same file, has the following value:: |
3933 | :: | ||
3934 | 3820 | ||
3935 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | 3821 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
3936 | 3822 | ||
@@ -3965,8 +3851,7 @@ system and gives an overview of their function and contents. | |||
3965 | For example, the following example from the ``linux-yocto-rt_4.12`` | 3851 | For example, the following example from the ``linux-yocto-rt_4.12`` |
3966 | kernel recipe adds "netfilter" and "taskstats" features to all BSPs | 3852 | kernel recipe adds "netfilter" and "taskstats" features to all BSPs |
3967 | as well as "virtio" configurations to all QEMU machines. The last two | 3853 | as well as "virtio" configurations to all QEMU machines. The last two |
3968 | statements add specific configurations to targeted machine types: | 3854 | statements add specific configurations to targeted machine types:: |
3969 | :: | ||
3970 | 3855 | ||
3971 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" | 3856 | KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" |
3972 | KERNEL_FEATURES_append = "${KERNEL_EXTRA_FEATURES}" | 3857 | KERNEL_FEATURES_append = "${KERNEL_EXTRA_FEATURES}" |
@@ -3977,15 +3862,13 @@ system and gives an overview of their function and contents. | |||
3977 | :term:`KERNEL_FIT_LINK_NAME` | 3862 | :term:`KERNEL_FIT_LINK_NAME` |
3978 | The link name of the kernel flattened image tree (FIT) image. This | 3863 | The link name of the kernel flattened image tree (FIT) image. This |
3979 | variable is set in the ``meta/classes/kernel-artifact-names.bbclass`` | 3864 | variable is set in the ``meta/classes/kernel-artifact-names.bbclass`` |
3980 | file as follows: | 3865 | file as follows:: |
3981 | :: | ||
3982 | 3866 | ||
3983 | KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" | 3867 | KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
3984 | 3868 | ||
3985 | The value of the | 3869 | The value of the |
3986 | ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same | 3870 | ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
3987 | file, has the following value: | 3871 | file, has the following value:: |
3988 | :: | ||
3989 | 3872 | ||
3990 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" | 3873 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
3991 | 3874 | ||
@@ -3995,28 +3878,24 @@ system and gives an overview of their function and contents. | |||
3995 | :term:`KERNEL_FIT_NAME` | 3878 | :term:`KERNEL_FIT_NAME` |
3996 | The base name of the kernel flattened image tree (FIT) image. This | 3879 | The base name of the kernel flattened image tree (FIT) image. This |
3997 | variable is set in the ``meta/classes/kernel-artifact-names.bbclass`` | 3880 | variable is set in the ``meta/classes/kernel-artifact-names.bbclass`` |
3998 | file as follows: | 3881 | file as follows:: |
3999 | :: | ||
4000 | 3882 | ||
4001 | KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}" | 3883 | KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
4002 | 3884 | ||
4003 | The value of the :term:`KERNEL_ARTIFACT_NAME` | 3885 | The value of the :term:`KERNEL_ARTIFACT_NAME` |
4004 | variable, which is set in the same file, has the following value: | 3886 | variable, which is set in the same file, has the following value:: |
4005 | :: | ||
4006 | 3887 | ||
4007 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | 3888 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
4008 | 3889 | ||
4009 | :term:`KERNEL_IMAGE_LINK_NAME` | 3890 | :term:`KERNEL_IMAGE_LINK_NAME` |
4010 | The link name for the kernel image. This variable is set in the | 3891 | The link name for the kernel image. This variable is set in the |
4011 | ``meta/classes/kernel-artifact-names.bbclass`` file as follows: | 3892 | ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
4012 | :: | ||
4013 | 3893 | ||
4014 | KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" | 3894 | KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
4015 | 3895 | ||
4016 | The value of | 3896 | The value of |
4017 | the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same | 3897 | the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same |
4018 | file, has the following value: | 3898 | file, has the following value:: |
4019 | :: | ||
4020 | 3899 | ||
4021 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" | 3900 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
4022 | 3901 | ||
@@ -4038,15 +3917,13 @@ system and gives an overview of their function and contents. | |||
4038 | 3917 | ||
4039 | :term:`KERNEL_IMAGE_NAME` | 3918 | :term:`KERNEL_IMAGE_NAME` |
4040 | The base name of the kernel image. This variable is set in the | 3919 | The base name of the kernel image. This variable is set in the |
4041 | ``meta/classes/kernel-artifact-names.bbclass`` file as follows: | 3920 | ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
4042 | :: | ||
4043 | 3921 | ||
4044 | KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}" | 3922 | KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
4045 | 3923 | ||
4046 | The value of the | 3924 | The value of the |
4047 | :term:`KERNEL_ARTIFACT_NAME` variable, | 3925 | :term:`KERNEL_ARTIFACT_NAME` variable, |
4048 | which is set in the same file, has the following value: | 3926 | which is set in the same file, has the following value:: |
4049 | :: | ||
4050 | 3927 | ||
4051 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | 3928 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
4052 | 3929 | ||
@@ -4074,8 +3951,7 @@ system and gives an overview of their function and contents. | |||
4074 | configuration file, an append file for the recipe, or the recipe | 3951 | configuration file, an append file for the recipe, or the recipe |
4075 | itself). | 3952 | itself). |
4076 | 3953 | ||
4077 | Specify it as follows: | 3954 | Specify it as follows:: |
4078 | :: | ||
4079 | 3955 | ||
4080 | KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3" | 3956 | KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3" |
4081 | 3957 | ||
@@ -4083,8 +3959,7 @@ system and gives an overview of their function and contents. | |||
4083 | system to populate the ``/etc/modules-load.d/modname.conf`` file with | 3959 | system to populate the ``/etc/modules-load.d/modname.conf`` file with |
4084 | the list of modules to be auto-loaded on boot. The modules appear | 3960 | the list of modules to be auto-loaded on boot. The modules appear |
4085 | one-per-line in the file. Here is an example of the most common use | 3961 | one-per-line in the file. Here is an example of the most common use |
4086 | case: | 3962 | case:: |
4087 | :: | ||
4088 | 3963 | ||
4089 | KERNEL_MODULE_AUTOLOAD += "module_name" | 3964 | KERNEL_MODULE_AUTOLOAD += "module_name" |
4090 | 3965 | ||
@@ -4146,8 +4021,7 @@ system and gives an overview of their function and contents. | |||
4146 | Provides a short description of a configuration fragment. You use | 4021 | Provides a short description of a configuration fragment. You use |
4147 | this variable in the ``.scc`` file that describes a configuration | 4022 | this variable in the ``.scc`` file that describes a configuration |
4148 | fragment file. Here is the variable used in a file named ``smp.scc`` | 4023 | fragment file. Here is the variable used in a file named ``smp.scc`` |
4149 | to describe SMP being enabled: | 4024 | to describe SMP being enabled:: |
4150 | :: | ||
4151 | 4025 | ||
4152 | define KFEATURE_DESCRIPTION "Enable SMP" | 4026 | define KFEATURE_DESCRIPTION "Enable SMP" |
4153 | 4027 | ||
@@ -4163,8 +4037,7 @@ system and gives an overview of their function and contents. | |||
4163 | 4037 | ||
4164 | These mappings between different names occur in the Yocto Linux | 4038 | These mappings between different names occur in the Yocto Linux |
4165 | Kernel's ``meta`` branch. As an example take a look in the | 4039 | Kernel's ``meta`` branch. As an example take a look in the |
4166 | ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file: | 4040 | ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file:: |
4167 | :: | ||
4168 | 4041 | ||
4169 | LINUX_VERSION_core2-32-intel-common = "3.19.0" | 4042 | LINUX_VERSION_core2-32-intel-common = "3.19.0" |
4170 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" | 4043 | COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" |
@@ -4202,8 +4075,7 @@ system and gives an overview of their function and contents. | |||
4202 | :term:`LAYERDEPENDS` | 4075 | :term:`LAYERDEPENDS` |
4203 | Lists the layers, separated by spaces, on which this recipe depends. | 4076 | Lists the layers, separated by spaces, on which this recipe depends. |
4204 | Optionally, you can specify a specific layer version for a dependency | 4077 | Optionally, you can specify a specific layer version for a dependency |
4205 | by adding it to the end of the layer name. Here is an example: | 4078 | by adding it to the end of the layer name. Here is an example:: |
4206 | :: | ||
4207 | 4079 | ||
4208 | LAYERDEPENDS_mylayer = "anotherlayer (=3)" | 4080 | LAYERDEPENDS_mylayer = "anotherlayer (=3)" |
4209 | 4081 | ||
@@ -4228,8 +4100,7 @@ system and gives an overview of their function and contents. | |||
4228 | 4100 | ||
4229 | Optionally, you can specify a specific layer version for a | 4101 | Optionally, you can specify a specific layer version for a |
4230 | recommendation by adding the version to the end of the layer name. | 4102 | recommendation by adding the version to the end of the layer name. |
4231 | Here is an example: | 4103 | Here is an example:: |
4232 | :: | ||
4233 | 4104 | ||
4234 | LAYERRECOMMENDS_mylayer = "anotherlayer (=3)" | 4105 | LAYERRECOMMENDS_mylayer = "anotherlayer (=3)" |
4235 | 4106 | ||
@@ -4253,8 +4124,7 @@ system and gives an overview of their function and contents. | |||
4253 | For the list, use the Yocto Project | 4124 | For the list, use the Yocto Project |
4254 | :yocto_wiki:`Release Name </Releases>` (e.g. | 4125 | :yocto_wiki:`Release Name </Releases>` (e.g. |
4255 | &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the | 4126 | &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the |
4256 | layer, use a space-separated list: | 4127 | layer, use a space-separated list:: |
4257 | :: | ||
4258 | 4128 | ||
4259 | LAYERSERIES_COMPAT_layer_root_name = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;" | 4129 | LAYERSERIES_COMPAT_layer_root_name = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;" |
4260 | 4130 | ||
@@ -4335,8 +4205,7 @@ system and gives an overview of their function and contents. | |||
4335 | :term:`SPDXLICENSEMAP` flag names defined in | 4205 | :term:`SPDXLICENSEMAP` flag names defined in |
4336 | ``meta/conf/licenses.conf``. | 4206 | ``meta/conf/licenses.conf``. |
4337 | 4207 | ||
4338 | Here are some examples: | 4208 | Here are some examples:: |
4339 | :: | ||
4340 | 4209 | ||
4341 | LICENSE = "LGPLv2.1 | GPLv3" | 4210 | LICENSE = "LGPLv2.1 | GPLv3" |
4342 | LICENSE = "MPL-1 & LGPLv2.1" | 4211 | LICENSE = "MPL-1 & LGPLv2.1" |
@@ -4353,8 +4222,7 @@ system and gives an overview of their function and contents. | |||
4353 | situations where components of the output have different licenses. | 4222 | situations where components of the output have different licenses. |
4354 | For example, a piece of software whose code is licensed under GPLv2 | 4223 | For example, a piece of software whose code is licensed under GPLv2 |
4355 | but has accompanying documentation licensed under the GNU Free | 4224 | but has accompanying documentation licensed under the GNU Free |
4356 | Documentation License 1.2 could be specified as follows: | 4225 | Documentation License 1.2 could be specified as follows:: |
4357 | :: | ||
4358 | 4226 | ||
4359 | LICENSE = "GFDL-1.2 & GPLv2" | 4227 | LICENSE = "GFDL-1.2 & GPLv2" |
4360 | LICENSE_${PN} = "GPLv2" | 4228 | LICENSE_${PN} = "GPLv2" |
@@ -4409,8 +4277,7 @@ system and gives an overview of their function and contents. | |||
4409 | OpenEmbedded build system uses ``COMMON_LICENSE_DIR`` to define the | 4277 | OpenEmbedded build system uses ``COMMON_LICENSE_DIR`` to define the |
4410 | directory that holds common license text used during the build. The | 4278 | directory that holds common license text used during the build. The |
4411 | ``LICENSE_PATH`` variable allows you to extend that location to other | 4279 | ``LICENSE_PATH`` variable allows you to extend that location to other |
4412 | areas that have additional licenses: | 4280 | areas that have additional licenses:: |
4413 | :: | ||
4414 | 4281 | ||
4415 | LICENSE_PATH += "path-to-additional-common-licenses" | 4282 | LICENSE_PATH += "path-to-additional-common-licenses" |
4416 | 4283 | ||
@@ -4434,14 +4301,12 @@ system and gives an overview of their function and contents. | |||
4434 | being built using the OpenEmbedded build system is based. You define | 4301 | being built using the OpenEmbedded build system is based. You define |
4435 | this variable in the kernel recipe. For example, the | 4302 | this variable in the kernel recipe. For example, the |
4436 | ``linux-yocto-3.4.bb`` kernel recipe found in | 4303 | ``linux-yocto-3.4.bb`` kernel recipe found in |
4437 | ``meta/recipes-kernel/linux`` defines the variables as follows: | 4304 | ``meta/recipes-kernel/linux`` defines the variables as follows:: |
4438 | :: | ||
4439 | 4305 | ||
4440 | LINUX_VERSION ?= "3.4.24" | 4306 | LINUX_VERSION ?= "3.4.24" |
4441 | 4307 | ||
4442 | The ``LINUX_VERSION`` variable is used to define :term:`PV` | 4308 | The ``LINUX_VERSION`` variable is used to define :term:`PV` |
4443 | for the recipe: | 4309 | for the recipe:: |
4444 | :: | ||
4445 | 4310 | ||
4446 | PV = "${LINUX_VERSION}+git${SRCPV}" | 4311 | PV = "${LINUX_VERSION}+git${SRCPV}" |
4447 | 4312 | ||
@@ -4449,16 +4314,14 @@ system and gives an overview of their function and contents. | |||
4449 | A string extension compiled into the version string of the Linux | 4314 | A string extension compiled into the version string of the Linux |
4450 | kernel built with the OpenEmbedded build system. You define this | 4315 | kernel built with the OpenEmbedded build system. You define this |
4451 | variable in the kernel recipe. For example, the linux-yocto kernel | 4316 | variable in the kernel recipe. For example, the linux-yocto kernel |
4452 | recipes all define the variable as follows: | 4317 | recipes all define the variable as follows:: |
4453 | :: | ||
4454 | 4318 | ||
4455 | LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" | 4319 | LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" |
4456 | 4320 | ||
4457 | Defining this variable essentially sets the Linux kernel | 4321 | Defining this variable essentially sets the Linux kernel |
4458 | configuration item ``CONFIG_LOCALVERSION``, which is visible through | 4322 | configuration item ``CONFIG_LOCALVERSION``, which is visible through |
4459 | the ``uname`` command. Here is an example that shows the extension | 4323 | the ``uname`` command. Here is an example that shows the extension |
4460 | assuming it was set as previously shown: | 4324 | assuming it was set as previously shown:: |
4461 | :: | ||
4462 | 4325 | ||
4463 | $ uname -r | 4326 | $ uname -r |
4464 | 3.7.0-rc8-custom | 4327 | 3.7.0-rc8-custom |
@@ -4475,8 +4338,7 @@ system and gives an overview of their function and contents. | |||
4475 | ``MACHINE`` in the ``local.conf`` file found in the | 4338 | ``MACHINE`` in the ``local.conf`` file found in the |
4476 | :term:`Build Directory`. By default, ``MACHINE`` is set to | 4339 | :term:`Build Directory`. By default, ``MACHINE`` is set to |
4477 | "qemux86", which is an x86-based architecture machine to be emulated | 4340 | "qemux86", which is an x86-based architecture machine to be emulated |
4478 | using QEMU: | 4341 | using QEMU:: |
4479 | :: | ||
4480 | 4342 | ||
4481 | MACHINE ?= "qemux86" | 4343 | MACHINE ?= "qemux86" |
4482 | 4344 | ||
@@ -4488,8 +4350,7 @@ system and gives an overview of their function and contents. | |||
4488 | ``meta/conf/machine``. | 4350 | ``meta/conf/machine``. |
4489 | 4351 | ||
4490 | The list of machines supported by the Yocto Project as shipped | 4352 | The list of machines supported by the Yocto Project as shipped |
4491 | include the following: | 4353 | include the following:: |
4492 | :: | ||
4493 | 4354 | ||
4494 | MACHINE ?= "qemuarm" | 4355 | MACHINE ?= "qemuarm" |
4495 | MACHINE ?= "qemuarm64" | 4356 | MACHINE ?= "qemuarm64" |
@@ -4535,8 +4396,7 @@ system and gives an overview of their function and contents. | |||
4535 | As an example, suppose the machine for which you are building | 4396 | As an example, suppose the machine for which you are building |
4536 | requires ``example-init`` to be run during boot to initialize the | 4397 | requires ``example-init`` to be run during boot to initialize the |
4537 | hardware. In this case, you would use the following in the machine's | 4398 | hardware. In this case, you would use the following in the machine's |
4538 | ``.conf`` configuration file: | 4399 | ``.conf`` configuration file:: |
4539 | :: | ||
4540 | 4400 | ||
4541 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init" | 4401 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init" |
4542 | 4402 | ||
@@ -4567,8 +4427,7 @@ system and gives an overview of their function and contents. | |||
4567 | "recommends" relationship so that in the latter case, the build will | 4427 | "recommends" relationship so that in the latter case, the build will |
4568 | not fail due to the missing package. To accomplish this, assuming the | 4428 | not fail due to the missing package. To accomplish this, assuming the |
4569 | package for the module was called ``kernel-module-ab123``, you would | 4429 | package for the module was called ``kernel-module-ab123``, you would |
4570 | use the following in the machine's ``.conf`` configuration file: | 4430 | use the following in the machine's ``.conf`` configuration file:: |
4571 | :: | ||
4572 | 4431 | ||
4573 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123" | 4432 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123" |
4574 | 4433 | ||
@@ -4604,8 +4463,7 @@ system and gives an overview of their function and contents. | |||
4604 | exist, so it is acceptable for the build process to depend upon | 4463 | exist, so it is acceptable for the build process to depend upon |
4605 | finding the package. In this case, assuming the package for the | 4464 | finding the package. In this case, assuming the package for the |
4606 | firmware was called ``wifidriver-firmware``, you would use the | 4465 | firmware was called ``wifidriver-firmware``, you would use the |
4607 | following in the ``.conf`` file for the machine: | 4466 | following in the ``.conf`` file for the machine:: |
4608 | :: | ||
4609 | 4467 | ||
4610 | MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware" | 4468 | MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware" |
4611 | 4469 | ||
@@ -4631,8 +4489,7 @@ system and gives an overview of their function and contents. | |||
4631 | the build to succeed instead of failing as a result of the package | 4489 | the build to succeed instead of failing as a result of the package |
4632 | not being found. To accomplish this, assuming the package for the | 4490 | not being found. To accomplish this, assuming the package for the |
4633 | module was called ``kernel-module-examplewifi``, you would use the | 4491 | module was called ``kernel-module-examplewifi``, you would use the |
4634 | following in the ``.conf`` file for the machine: | 4492 | following in the ``.conf`` file for the machine:: |
4635 | :: | ||
4636 | 4493 | ||
4637 | MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi" | 4494 | MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi" |
4638 | 4495 | ||
@@ -4671,16 +4528,14 @@ system and gives an overview of their function and contents. | |||
4671 | should apply to a machine. For example, all machines emulated in QEMU | 4528 | should apply to a machine. For example, all machines emulated in QEMU |
4672 | (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named | 4529 | (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named |
4673 | ``meta/conf/machine/include/qemu.inc`` that prepends the following | 4530 | ``meta/conf/machine/include/qemu.inc`` that prepends the following |
4674 | override to ``MACHINEOVERRIDES``: | 4531 | override to ``MACHINEOVERRIDES``:: |
4675 | :: | ||
4676 | 4532 | ||
4677 | MACHINEOVERRIDES =. "qemuall:" | 4533 | MACHINEOVERRIDES =. "qemuall:" |
4678 | 4534 | ||
4679 | This | 4535 | This |
4680 | override allows variables to be overridden for all machines emulated | 4536 | override allows variables to be overridden for all machines emulated |
4681 | in QEMU, like in the following example from the ``connman-conf`` | 4537 | in QEMU, like in the following example from the ``connman-conf`` |
4682 | recipe: | 4538 | recipe:: |
4683 | :: | ||
4684 | 4539 | ||
4685 | SRC_URI_append_qemuall = " file://wired.config \ | 4540 | SRC_URI_append_qemuall = " file://wired.config \ |
4686 | file://wired-setup \ | 4541 | file://wired-setup \ |
@@ -4734,27 +4589,23 @@ system and gives an overview of their function and contents. | |||
4734 | recipes by using :term:`DEPENDS`, then a dependency on | 4589 | recipes by using :term:`DEPENDS`, then a dependency on |
4735 | "foo" will automatically get rewritten to a dependency on | 4590 | "foo" will automatically get rewritten to a dependency on |
4736 | "nativesdk-foo". However, dependencies like the following will not | 4591 | "nativesdk-foo". However, dependencies like the following will not |
4737 | get rewritten automatically: | 4592 | get rewritten automatically:: |
4738 | :: | ||
4739 | 4593 | ||
4740 | do_foo[depends] += "recipe:do_foo" | 4594 | do_foo[depends] += "recipe:do_foo" |
4741 | 4595 | ||
4742 | If you want such a dependency to also get transformed, you can do the | 4596 | If you want such a dependency to also get transformed, you can do the |
4743 | following: | 4597 | following:: |
4744 | :: | ||
4745 | 4598 | ||
4746 | do_foo[depends] += "${MLPREFIX}recipe:do_foo" | 4599 | do_foo[depends] += "${MLPREFIX}recipe:do_foo" |
4747 | 4600 | ||
4748 | module_autoload | 4601 | module_autoload |
4749 | This variable has been replaced by the ``KERNEL_MODULE_AUTOLOAD`` | 4602 | This variable has been replaced by the ``KERNEL_MODULE_AUTOLOAD`` |
4750 | variable. You should replace all occurrences of ``module_autoload`` | 4603 | variable. You should replace all occurrences of ``module_autoload`` |
4751 | with additions to ``KERNEL_MODULE_AUTOLOAD``, for example: | 4604 | with additions to ``KERNEL_MODULE_AUTOLOAD``, for example:: |
4752 | :: | ||
4753 | 4605 | ||
4754 | module_autoload_rfcomm = "rfcomm" | 4606 | module_autoload_rfcomm = "rfcomm" |
4755 | 4607 | ||
4756 | should now be replaced with: | 4608 | should now be replaced with:: |
4757 | :: | ||
4758 | 4609 | ||
4759 | KERNEL_MODULE_AUTOLOAD += "rfcomm" | 4610 | KERNEL_MODULE_AUTOLOAD += "rfcomm" |
4760 | 4611 | ||
@@ -4773,8 +4624,7 @@ system and gives an overview of their function and contents. | |||
4773 | :term:`KERNEL_MODULE_AUTOLOAD` | 4624 | :term:`KERNEL_MODULE_AUTOLOAD` |
4774 | variable. | 4625 | variable. |
4775 | 4626 | ||
4776 | Here is the general syntax: | 4627 | Here is the general syntax:: |
4777 | :: | ||
4778 | 4628 | ||
4779 | module_conf_module_name = "modprobe.d-syntax" | 4629 | module_conf_module_name = "modprobe.d-syntax" |
4780 | 4630 | ||
@@ -4786,8 +4636,7 @@ system and gives an overview of their function and contents. | |||
4786 | Including ``module_conf`` causes the OpenEmbedded build system to | 4636 | Including ``module_conf`` causes the OpenEmbedded build system to |
4787 | populate the ``/etc/modprobe.d/modname.conf`` file with | 4637 | populate the ``/etc/modprobe.d/modname.conf`` file with |
4788 | ``modprobe.d`` syntax lines. Here is an example that adds the options | 4638 | ``modprobe.d`` syntax lines. Here is an example that adds the options |
4789 | ``arg1`` and ``arg2`` to a module named ``mymodule``: | 4639 | ``arg1`` and ``arg2`` to a module named ``mymodule``:: |
4790 | :: | ||
4791 | 4640 | ||
4792 | module_conf_mymodule = "options mymodule arg1=val1 arg2=val2" | 4641 | module_conf_mymodule = "options mymodule arg1=val1 arg2=val2" |
4793 | 4642 | ||
@@ -4801,15 +4650,13 @@ system and gives an overview of their function and contents. | |||
4801 | 4650 | ||
4802 | :term:`MODULE_TARBALL_LINK_NAME` | 4651 | :term:`MODULE_TARBALL_LINK_NAME` |
4803 | The link name of the kernel module tarball. This variable is set in | 4652 | The link name of the kernel module tarball. This variable is set in |
4804 | the ``meta/classes/kernel-artifact-names.bbclass`` file as follows: | 4653 | the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
4805 | :: | ||
4806 | 4654 | ||
4807 | MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" | 4655 | MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" |
4808 | 4656 | ||
4809 | The value | 4657 | The value |
4810 | of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the | 4658 | of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the |
4811 | same file, has the following value: | 4659 | same file, has the following value:: |
4812 | :: | ||
4813 | 4660 | ||
4814 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" | 4661 | KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" |
4815 | 4662 | ||
@@ -4817,14 +4664,12 @@ system and gives an overview of their function and contents. | |||
4817 | 4664 | ||
4818 | :term:`MODULE_TARBALL_NAME` | 4665 | :term:`MODULE_TARBALL_NAME` |
4819 | The base name of the kernel module tarball. This variable is set in | 4666 | The base name of the kernel module tarball. This variable is set in |
4820 | the ``meta/classes/kernel-artifact-names.bbclass`` file as follows: | 4667 | the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:: |
4821 | :: | ||
4822 | 4668 | ||
4823 | MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" | 4669 | MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" |
4824 | 4670 | ||
4825 | The value of the :term:`KERNEL_ARTIFACT_NAME` variable, | 4671 | The value of the :term:`KERNEL_ARTIFACT_NAME` variable, |
4826 | which is set in the same file, has the following value: | 4672 | which is set in the same file, has the following value:: |
4827 | :: | ||
4828 | 4673 | ||
4829 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | 4674 | KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
4830 | 4675 | ||
@@ -4834,8 +4679,7 @@ system and gives an overview of their function and contents. | |||
4834 | target systems to be put into different subdirectories of the same | 4679 | target systems to be put into different subdirectories of the same |
4835 | output directory. | 4680 | output directory. |
4836 | 4681 | ||
4837 | The default value of this variable is: | 4682 | The default value of this variable is:: |
4838 | :: | ||
4839 | 4683 | ||
4840 | ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS} | 4684 | ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS} |
4841 | 4685 | ||
@@ -4874,15 +4718,13 @@ system and gives an overview of their function and contents. | |||
4874 | not exist in common licenses. | 4718 | not exist in common licenses. |
4875 | 4719 | ||
4876 | The following example shows how to add ``NO_GENERIC_LICENSE`` to a | 4720 | The following example shows how to add ``NO_GENERIC_LICENSE`` to a |
4877 | recipe: | 4721 | recipe:: |
4878 | :: | ||
4879 | 4722 | ||
4880 | NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source" | 4723 | NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source" |
4881 | 4724 | ||
4882 | The following is an example that | 4725 | The following is an example that |
4883 | uses the ``LICENSE.Abilis.txt`` file as the license from the fetched | 4726 | uses the ``LICENSE.Abilis.txt`` file as the license from the fetched |
4884 | source: | 4727 | source:: |
4885 | :: | ||
4886 | 4728 | ||
4887 | NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt" | 4729 | NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt" |
4888 | 4730 | ||
@@ -4923,8 +4765,7 @@ system and gives an overview of their function and contents. | |||
4923 | Disables auto package from splitting ``.debug`` files. If a recipe | 4765 | Disables auto package from splitting ``.debug`` files. If a recipe |
4924 | requires ``FILES_${PN}-dbg`` to be set manually, the | 4766 | requires ``FILES_${PN}-dbg`` to be set manually, the |
4925 | ``NOAUTOPACKAGEDEBUG`` can be defined allowing you to define the | 4767 | ``NOAUTOPACKAGEDEBUG`` can be defined allowing you to define the |
4926 | content of the debug package. For example: | 4768 | content of the debug package. For example:: |
4927 | :: | ||
4928 | 4769 | ||
4929 | NOAUTOPACKAGEDEBUG = "1" | 4770 | NOAUTOPACKAGEDEBUG = "1" |
4930 | FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" | 4771 | FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" |
@@ -5016,8 +4857,7 @@ system and gives an overview of their function and contents. | |||
5016 | As an example, if the string "an-override" appears as an element in | 4857 | As an example, if the string "an-override" appears as an element in |
5017 | the colon-separated list in ``OVERRIDES``, then the following | 4858 | the colon-separated list in ``OVERRIDES``, then the following |
5018 | assignment will override ``FOO`` with the value "overridden" at the | 4859 | assignment will override ``FOO`` with the value "overridden" at the |
5019 | end of parsing: | 4860 | end of parsing:: |
5020 | :: | ||
5021 | 4861 | ||
5022 | FOO_an-override = "overridden" | 4862 | FOO_an-override = "overridden" |
5023 | 4863 | ||
@@ -5032,8 +4872,7 @@ system and gives an overview of their function and contents. | |||
5032 | :term:`DISTROOVERRIDES` variables. Another | 4872 | :term:`DISTROOVERRIDES` variables. Another |
5033 | important override included by default is ``pn-${PN}``. This override | 4873 | important override included by default is ``pn-${PN}``. This override |
5034 | allows variables to be set for a single recipe within configuration | 4874 | allows variables to be set for a single recipe within configuration |
5035 | (``.conf``) files. Here is an example: | 4875 | (``.conf``) files. Here is an example:: |
5036 | :: | ||
5037 | 4876 | ||
5038 | FOO_pn-myrecipe = "myrecipe-specific value" | 4877 | FOO_pn-myrecipe = "myrecipe-specific value" |
5039 | 4878 | ||
@@ -5045,8 +4884,7 @@ system and gives an overview of their function and contents. | |||
5045 | Project Development Tasks Manual for more information. | 4884 | Project Development Tasks Manual for more information. |
5046 | 4885 | ||
5047 | :term:`P` | 4886 | :term:`P` |
5048 | The recipe name and version. ``P`` is comprised of the following: | 4887 | The recipe name and version. ``P`` is comprised of the following:: |
5049 | :: | ||
5050 | 4888 | ||
5051 | ${PN}-${PV} | 4889 | ${PN}-${PV} |
5052 | 4890 | ||
@@ -5082,8 +4920,7 @@ system and gives an overview of their function and contents. | |||
5082 | However, if your recipe's output packages are built specific to the | 4920 | However, if your recipe's output packages are built specific to the |
5083 | target machine rather than generally for the architecture of the | 4921 | target machine rather than generally for the architecture of the |
5084 | machine, you should set ``PACKAGE_ARCH`` to the value of | 4922 | machine, you should set ``PACKAGE_ARCH`` to the value of |
5085 | :term:`MACHINE_ARCH` in the recipe as follows: | 4923 | :term:`MACHINE_ARCH` in the recipe as follows:: |
5086 | :: | ||
5087 | 4924 | ||
5088 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 4925 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
5089 | 4926 | ||
@@ -5119,8 +4956,7 @@ system and gives an overview of their function and contents. | |||
5119 | The build system uses only the first argument in the list as the | 4956 | The build system uses only the first argument in the list as the |
5120 | package manager when creating your image or SDK. However, packages | 4957 | package manager when creating your image or SDK. However, packages |
5121 | will be created using any additional packaging classes you specify. | 4958 | will be created using any additional packaging classes you specify. |
5122 | For example, if you use the following in your ``local.conf`` file: | 4959 | For example, if you use the following in your ``local.conf`` file:: |
5123 | :: | ||
5124 | 4960 | ||
5125 | PACKAGE_CLASSES ?= "package_ipk" | 4961 | PACKAGE_CLASSES ?= "package_ipk" |
5126 | 4962 | ||
@@ -5178,15 +5014,13 @@ system and gives an overview of their function and contents. | |||
5178 | 5014 | ||
5179 | :term:`PACKAGE_EXCLUDE` | 5015 | :term:`PACKAGE_EXCLUDE` |
5180 | Lists packages that should not be installed into an image. For | 5016 | Lists packages that should not be installed into an image. For |
5181 | example: | 5017 | example:: |
5182 | :: | ||
5183 | 5018 | ||
5184 | PACKAGE_EXCLUDE = "package_name package_name package_name ..." | 5019 | PACKAGE_EXCLUDE = "package_name package_name package_name ..." |
5185 | 5020 | ||
5186 | You can set this variable globally in your ``local.conf`` file or you | 5021 | You can set this variable globally in your ``local.conf`` file or you |
5187 | can attach it to a specific image recipe by using the recipe name | 5022 | can attach it to a specific image recipe by using the recipe name |
5188 | override: | 5023 | override:: |
5189 | :: | ||
5190 | 5024 | ||
5191 | PACKAGE_EXCLUDE_pn-target_image = "package_name" | 5025 | PACKAGE_EXCLUDE_pn-target_image = "package_name" |
5192 | 5026 | ||
@@ -5230,8 +5064,7 @@ system and gives an overview of their function and contents. | |||
5230 | 5064 | ||
5231 | Consider the following example where the ``PACKAGE_FEED_URIS``, | 5065 | Consider the following example where the ``PACKAGE_FEED_URIS``, |
5232 | ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are | 5066 | ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are |
5233 | defined in your ``local.conf`` file: | 5067 | defined in your ``local.conf`` file:: |
5234 | :: | ||
5235 | 5068 | ||
5236 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ | 5069 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
5237 | https://example.com/packagerepos/updates" | 5070 | https://example.com/packagerepos/updates" |
@@ -5260,8 +5093,7 @@ system and gives an overview of their function and contents. | |||
5260 | 5093 | ||
5261 | Consider the following example where the ``PACKAGE_FEED_URIS``, | 5094 | Consider the following example where the ``PACKAGE_FEED_URIS``, |
5262 | ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are | 5095 | ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are |
5263 | defined in your ``local.conf`` file: | 5096 | defined in your ``local.conf`` file:: |
5264 | :: | ||
5265 | 5097 | ||
5266 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ | 5098 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
5267 | https://example.com/packagerepos/updates" | 5099 | https://example.com/packagerepos/updates" |
@@ -5290,8 +5122,7 @@ system and gives an overview of their function and contents. | |||
5290 | 5122 | ||
5291 | Consider the following example where the ``PACKAGE_FEED_URIS``, | 5123 | Consider the following example where the ``PACKAGE_FEED_URIS``, |
5292 | ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are | 5124 | ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are |
5293 | defined in your ``local.conf`` file: | 5125 | defined in your ``local.conf`` file:: |
5294 | :: | ||
5295 | 5126 | ||
5296 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ | 5127 | PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \ |
5297 | https://example.com/packagerepos/updates" | 5128 | https://example.com/packagerepos/updates" |
@@ -5356,8 +5187,7 @@ system and gives an overview of their function and contents. | |||
5356 | recipe on a per-recipe basis. ``PACKAGECONFIG`` blocks are defined in | 5187 | recipe on a per-recipe basis. ``PACKAGECONFIG`` blocks are defined in |
5357 | recipes when you specify features and then arguments that define | 5188 | recipes when you specify features and then arguments that define |
5358 | feature behaviors. Here is the basic block structure (broken over | 5189 | feature behaviors. Here is the basic block structure (broken over |
5359 | multiple lines for readability): | 5190 | multiple lines for readability):: |
5360 | :: | ||
5361 | 5191 | ||
5362 | PACKAGECONFIG ??= "f1 f2 f3 ..." | 5192 | PACKAGECONFIG ??= "f1 f2 f3 ..." |
5363 | PACKAGECONFIG[f1] = "\ | 5193 | PACKAGECONFIG[f1] = "\ |
@@ -5423,26 +5253,22 @@ system and gives an overview of their function and contents. | |||
5423 | - *Append file:* Create an append file named | 5253 | - *Append file:* Create an append file named |
5424 | recipename\ ``.bbappend`` in your layer and override the value of | 5254 | recipename\ ``.bbappend`` in your layer and override the value of |
5425 | ``PACKAGECONFIG``. You can either completely override the | 5255 | ``PACKAGECONFIG``. You can either completely override the |
5426 | variable: | 5256 | variable:: |
5427 | :: | ||
5428 | 5257 | ||
5429 | PACKAGECONFIG = "f4 f5" | 5258 | PACKAGECONFIG = "f4 f5" |
5430 | 5259 | ||
5431 | Or, you can just append the variable: | 5260 | Or, you can just append the variable:: |
5432 | :: | ||
5433 | 5261 | ||
5434 | PACKAGECONFIG_append = " f4" | 5262 | PACKAGECONFIG_append = " f4" |
5435 | 5263 | ||
5436 | - *Configuration file:* This method is identical to changing the | 5264 | - *Configuration file:* This method is identical to changing the |
5437 | block through an append file except you edit your ``local.conf`` | 5265 | block through an append file except you edit your ``local.conf`` |
5438 | or ``mydistro.conf`` file. As with append files previously | 5266 | or ``mydistro.conf`` file. As with append files previously |
5439 | described, you can either completely override the variable: | 5267 | described, you can either completely override the variable:: |
5440 | :: | ||
5441 | 5268 | ||
5442 | PACKAGECONFIG_pn-recipename = "f4 f5" | 5269 | PACKAGECONFIG_pn-recipename = "f4 f5" |
5443 | 5270 | ||
5444 | Or, you can just amend the variable: | 5271 | Or, you can just amend the variable:: |
5445 | :: | ||
5446 | 5272 | ||
5447 | PACKAGECONFIG_append_pn-recipename = " f4" | 5273 | PACKAGECONFIG_append_pn-recipename = " f4" |
5448 | 5274 | ||
@@ -5467,8 +5293,7 @@ system and gives an overview of their function and contents. | |||
5467 | 5293 | ||
5468 | :term:`PACKAGES` | 5294 | :term:`PACKAGES` |
5469 | The list of packages the recipe creates. The default value is the | 5295 | The list of packages the recipe creates. The default value is the |
5470 | following: | 5296 | following:: |
5471 | :: | ||
5472 | 5297 | ||
5473 | ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN} | 5298 | ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN} |
5474 | 5299 | ||
@@ -5594,8 +5419,7 @@ system and gives an overview of their function and contents. | |||
5594 | patched, it uses "patch". | 5419 | patched, it uses "patch". |
5595 | 5420 | ||
5596 | If you wish to use an alternative patching tool, set the variable in | 5421 | If you wish to use an alternative patching tool, set the variable in |
5597 | the recipe using one of the following: | 5422 | the recipe using one of the following:: |
5598 | :: | ||
5599 | 5423 | ||
5600 | PATCHTOOL = "patch" | 5424 | PATCHTOOL = "patch" |
5601 | PATCHTOOL = "quilt" | 5425 | PATCHTOOL = "quilt" |
@@ -5641,8 +5465,7 @@ system and gives an overview of their function and contents. | |||
5641 | :term:`PKGD` | 5465 | :term:`PKGD` |
5642 | Points to the destination directory for files to be packaged before | 5466 | Points to the destination directory for files to be packaged before |
5643 | they are split into individual packages. This directory defaults to | 5467 | they are split into individual packages. This directory defaults to |
5644 | the following: | 5468 | the following:: |
5645 | :: | ||
5646 | 5469 | ||
5647 | ${WORKDIR}/package | 5470 | ${WORKDIR}/package |
5648 | 5471 | ||
@@ -5654,8 +5477,7 @@ system and gives an overview of their function and contents. | |||
5654 | :ref:`ref-tasks-packagedata` task packages data | 5477 | :ref:`ref-tasks-packagedata` task packages data |
5655 | for each recipe and installs it into this temporary, shared area. | 5478 | for each recipe and installs it into this temporary, shared area. |
5656 | This directory defaults to the following, which you should not | 5479 | This directory defaults to the following, which you should not |
5657 | change: | 5480 | change:: |
5658 | :: | ||
5659 | 5481 | ||
5660 | ${STAGING_DIR_HOST}/pkgdata | 5482 | ${STAGING_DIR_HOST}/pkgdata |
5661 | 5483 | ||
@@ -5670,8 +5492,7 @@ system and gives an overview of their function and contents. | |||
5670 | :term:`PKGDEST` | 5492 | :term:`PKGDEST` |
5671 | Points to the parent directory for files to be packaged after they | 5493 | Points to the parent directory for files to be packaged after they |
5672 | have been split into individual packages. This directory defaults to | 5494 | have been split into individual packages. This directory defaults to |
5673 | the following: | 5495 | the following:: |
5674 | :: | ||
5675 | 5496 | ||
5676 | ${WORKDIR}/packages-split | 5497 | ${WORKDIR}/packages-split |
5677 | 5498 | ||
@@ -5682,8 +5503,7 @@ system and gives an overview of their function and contents. | |||
5682 | :term:`PKGDESTWORK` | 5503 | :term:`PKGDESTWORK` |
5683 | Points to a temporary work area where the | 5504 | Points to a temporary work area where the |
5684 | :ref:`ref-tasks-package` task saves package metadata. | 5505 | :ref:`ref-tasks-package` task saves package metadata. |
5685 | The ``PKGDESTWORK`` location defaults to the following: | 5506 | The ``PKGDESTWORK`` location defaults to the following:: |
5686 | :: | ||
5687 | 5507 | ||
5688 | ${WORKDIR}/pkgdata | 5508 | ${WORKDIR}/pkgdata |
5689 | 5509 | ||
@@ -5732,16 +5552,14 @@ system and gives an overview of their function and contents. | |||
5732 | 5552 | ||
5733 | To prevent a recipe from being built, use the ``PNBLACKLIST`` | 5553 | To prevent a recipe from being built, use the ``PNBLACKLIST`` |
5734 | variable in your ``local.conf`` file. Here is an example that | 5554 | variable in your ``local.conf`` file. Here is an example that |
5735 | prevents ``myrecipe`` from being built: | 5555 | prevents ``myrecipe`` from being built:: |
5736 | :: | ||
5737 | 5556 | ||
5738 | PNBLACKLIST[myrecipe] = "Not supported by our organization." | 5557 | PNBLACKLIST[myrecipe] = "Not supported by our organization." |
5739 | 5558 | ||
5740 | :term:`POPULATE_SDK_POST_HOST_COMMAND` | 5559 | :term:`POPULATE_SDK_POST_HOST_COMMAND` |
5741 | Specifies a list of functions to call once the OpenEmbedded build | 5560 | Specifies a list of functions to call once the OpenEmbedded build |
5742 | system has created the host part of the SDK. You can specify | 5561 | system has created the host part of the SDK. You can specify |
5743 | functions separated by semicolons: | 5562 | functions separated by semicolons:: |
5744 | :: | ||
5745 | 5563 | ||
5746 | POPULATE_SDK_POST_HOST_COMMAND += "function; ... " | 5564 | POPULATE_SDK_POST_HOST_COMMAND += "function; ... " |
5747 | 5565 | ||
@@ -5753,8 +5571,7 @@ system and gives an overview of their function and contents. | |||
5753 | :term:`POPULATE_SDK_POST_TARGET_COMMAND` | 5571 | :term:`POPULATE_SDK_POST_TARGET_COMMAND` |
5754 | Specifies a list of functions to call once the OpenEmbedded build | 5572 | Specifies a list of functions to call once the OpenEmbedded build |
5755 | system has created the target part of the SDK. You can specify | 5573 | system has created the target part of the SDK. You can specify |
5756 | functions separated by semicolons: | 5574 | functions separated by semicolons:: |
5757 | :: | ||
5758 | 5575 | ||
5759 | POPULATE_SDK_POST_TARGET_COMMAND += "function; ... " | 5576 | POPULATE_SDK_POST_TARGET_COMMAND += "function; ... " |
5760 | 5577 | ||
@@ -5804,8 +5621,7 @@ system and gives an overview of their function and contents. | |||
5804 | preferred provider). You should always suffix this variable with the | 5621 | preferred provider). You should always suffix this variable with the |
5805 | name of the provided item. And, you should define the variable using | 5622 | name of the provided item. And, you should define the variable using |
5806 | the preferred recipe's name (:term:`PN`). Here is a common | 5623 | the preferred recipe's name (:term:`PN`). Here is a common |
5807 | example: | 5624 | example:: |
5808 | :: | ||
5809 | 5625 | ||
5810 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" | 5626 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" |
5811 | 5627 | ||
@@ -5813,8 +5629,7 @@ system and gives an overview of their function and contents. | |||
5813 | The ``PREFERRED_PROVIDER`` variable is set with the name (``PN``) of | 5629 | The ``PREFERRED_PROVIDER`` variable is set with the name (``PN``) of |
5814 | the recipe you prefer to provide "virtual/kernel". | 5630 | the recipe you prefer to provide "virtual/kernel". |
5815 | 5631 | ||
5816 | Following are more examples: | 5632 | Following are more examples:: |
5817 | :: | ||
5818 | 5633 | ||
5819 | PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86" | 5634 | PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86" |
5820 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" | 5635 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" |
@@ -5842,8 +5657,7 @@ system and gives an overview of their function and contents. | |||
5842 | through the "``%``" character. You can use the character to match any | 5657 | through the "``%``" character. You can use the character to match any |
5843 | number of characters, which can be useful when specifying versions | 5658 | number of characters, which can be useful when specifying versions |
5844 | that contain long revision numbers that potentially change. Here are | 5659 | that contain long revision numbers that potentially change. Here are |
5845 | two examples: | 5660 | two examples:: |
5846 | :: | ||
5847 | 5661 | ||
5848 | PREFERRED_VERSION_python = "3.4.0" | 5662 | PREFERRED_VERSION_python = "3.4.0" |
5849 | PREFERRED_VERSION_linux-yocto = "5.0%" | 5663 | PREFERRED_VERSION_linux-yocto = "5.0%" |
@@ -5857,35 +5671,30 @@ system and gives an overview of their function and contents. | |||
5857 | The specified version is matched against :term:`PV`, which | 5671 | The specified version is matched against :term:`PV`, which |
5858 | does not necessarily match the version part of the recipe's filename. | 5672 | does not necessarily match the version part of the recipe's filename. |
5859 | For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb`` | 5673 | For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb`` |
5860 | where ``foo_git.bb`` contains the following assignment: | 5674 | where ``foo_git.bb`` contains the following assignment:: |
5861 | :: | ||
5862 | 5675 | ||
5863 | PV = "1.1+git${SRCPV}" | 5676 | PV = "1.1+git${SRCPV}" |
5864 | 5677 | ||
5865 | In this case, the correct way to select | 5678 | In this case, the correct way to select |
5866 | ``foo_git.bb`` is by using an assignment such as the following: | 5679 | ``foo_git.bb`` is by using an assignment such as the following:: |
5867 | :: | ||
5868 | 5680 | ||
5869 | PREFERRED_VERSION_foo = "1.1+git%" | 5681 | PREFERRED_VERSION_foo = "1.1+git%" |
5870 | 5682 | ||
5871 | Compare that previous example | 5683 | Compare that previous example |
5872 | against the following incorrect example, which does not work: | 5684 | against the following incorrect example, which does not work:: |
5873 | :: | ||
5874 | 5685 | ||
5875 | PREFERRED_VERSION_foo = "git" | 5686 | PREFERRED_VERSION_foo = "git" |
5876 | 5687 | ||
5877 | Sometimes the ``PREFERRED_VERSION`` variable can be set by | 5688 | Sometimes the ``PREFERRED_VERSION`` variable can be set by |
5878 | configuration files in a way that is hard to change. You can use | 5689 | configuration files in a way that is hard to change. You can use |
5879 | :term:`OVERRIDES` to set a machine-specific | 5690 | :term:`OVERRIDES` to set a machine-specific |
5880 | override. Here is an example: | 5691 | override. Here is an example:: |
5881 | :: | ||
5882 | 5692 | ||
5883 | PREFERRED_VERSION_linux-yocto_qemux86 = "5.0%" | 5693 | PREFERRED_VERSION_linux-yocto_qemux86 = "5.0%" |
5884 | 5694 | ||
5885 | Although not recommended, worst case, you can also use the | 5695 | Although not recommended, worst case, you can also use the |
5886 | "forcevariable" override, which is the strongest override possible. | 5696 | "forcevariable" override, which is the strongest override possible. |
5887 | Here is an example: | 5697 | Here is an example:: |
5888 | :: | ||
5889 | 5698 | ||
5890 | PREFERRED_VERSION_linux-yocto_forcevariable = "5.0%" | 5699 | PREFERRED_VERSION_linux-yocto_forcevariable = "5.0%" |
5891 | 5700 | ||
@@ -5913,8 +5722,7 @@ system and gives an overview of their function and contents. | |||
5913 | Typically, you could add a specific server for the build system to | 5722 | Typically, you could add a specific server for the build system to |
5914 | attempt before any others by adding something like the following to | 5723 | attempt before any others by adding something like the following to |
5915 | the ``local.conf`` configuration file in the | 5724 | the ``local.conf`` configuration file in the |
5916 | :term:`Build Directory`: | 5725 | :term:`Build Directory`:: |
5917 | :: | ||
5918 | 5726 | ||
5919 | PREMIRRORS_prepend = "\ | 5727 | PREMIRRORS_prepend = "\ |
5920 | git://.*/.* http://www.yoctoproject.org/sources/ \n \ | 5728 | git://.*/.* http://www.yoctoproject.org/sources/ \n \ |
@@ -5950,8 +5758,7 @@ system and gives an overview of their function and contents. | |||
5950 | standard version of the library. | 5758 | standard version of the library. |
5951 | 5759 | ||
5952 | Libraries specified in this variable should be specified by their | 5760 | Libraries specified in this variable should be specified by their |
5953 | file name. For example, from the Firefox recipe in meta-browser: | 5761 | file name. For example, from the Firefox recipe in meta-browser:: |
5954 | :: | ||
5955 | 5762 | ||
5956 | PRIVATE_LIBS = "libmozjs.so \ | 5763 | PRIVATE_LIBS = "libmozjs.so \ |
5957 | libxpcom.so \ | 5764 | libxpcom.so \ |
@@ -5975,8 +5782,7 @@ system and gives an overview of their function and contents. | |||
5975 | ``DEPENDS``. | 5782 | ``DEPENDS``. |
5976 | 5783 | ||
5977 | Consider the following example ``PROVIDES`` statement from the recipe | 5784 | Consider the following example ``PROVIDES`` statement from the recipe |
5978 | file ``eudev_3.2.9.bb``: | 5785 | file ``eudev_3.2.9.bb``:: |
5979 | :: | ||
5980 | 5786 | ||
5981 | PROVIDES += "udev" | 5787 | PROVIDES += "udev" |
5982 | 5788 | ||
@@ -6013,8 +5819,7 @@ system and gives an overview of their function and contents. | |||
6013 | the component that manages the ``/dev`` directory. | 5819 | the component that manages the ``/dev`` directory. |
6014 | 5820 | ||
6015 | Setting the "preferred provider" for runtime dependencies is as | 5821 | Setting the "preferred provider" for runtime dependencies is as |
6016 | simple as using the following assignment in a configuration file: | 5822 | simple as using the following assignment in a configuration file:: |
6017 | :: | ||
6018 | 5823 | ||
6019 | VIRTUAL-RUNTIME_dev_manager = "udev" | 5824 | VIRTUAL-RUNTIME_dev_manager = "udev" |
6020 | 5825 | ||
@@ -6024,8 +5829,7 @@ system and gives an overview of their function and contents. | |||
6024 | 5829 | ||
6025 | The ``conf/local.conf.sample.extended`` configuration file in the | 5830 | The ``conf/local.conf.sample.extended`` configuration file in the |
6026 | :term:`Source Directory` shows how the | 5831 | :term:`Source Directory` shows how the |
6027 | ``PRSERV_HOST`` variable is set: | 5832 | ``PRSERV_HOST`` variable is set:: |
6028 | :: | ||
6029 | 5833 | ||
6030 | PRSERV_HOST = "localhost:0" | 5834 | PRSERV_HOST = "localhost:0" |
6031 | 5835 | ||
@@ -6086,8 +5890,7 @@ system and gives an overview of their function and contents. | |||
6086 | OpenEmbedded build system automatically sets it for you. | 5890 | OpenEmbedded build system automatically sets it for you. |
6087 | 5891 | ||
6088 | The variable allows recipes to use common infrastructure such as the | 5892 | The variable allows recipes to use common infrastructure such as the |
6089 | following: | 5893 | following:: |
6090 | :: | ||
6091 | 5894 | ||
6092 | DEPENDS += "${PYTHON_PN}-native" | 5895 | DEPENDS += "${PYTHON_PN}-native" |
6093 | 5896 | ||
@@ -6102,8 +5905,7 @@ system and gives an overview of their function and contents. | |||
6102 | will not be installed if conflicting packages are not first removed. | 5905 | will not be installed if conflicting packages are not first removed. |
6103 | 5906 | ||
6104 | Like all package-controlling variables, you must always use them in | 5907 | Like all package-controlling variables, you must always use them in |
6105 | conjunction with a package name override. Here is an example: | 5908 | conjunction with a package name override. Here is an example:: |
6106 | :: | ||
6107 | 5909 | ||
6108 | RCONFLICTS_${PN} = "another_conflicting_package_name" | 5910 | RCONFLICTS_${PN} = "another_conflicting_package_name" |
6109 | 5911 | ||
@@ -6111,8 +5913,7 @@ system and gives an overview of their function and contents. | |||
6111 | specifying versioned dependencies. Although the syntax varies | 5913 | specifying versioned dependencies. Although the syntax varies |
6112 | depending on the packaging format, BitBake hides these differences | 5914 | depending on the packaging format, BitBake hides these differences |
6113 | from you. Here is the general syntax to specify versions with the | 5915 | from you. Here is the general syntax to specify versions with the |
6114 | ``RCONFLICTS`` variable: | 5916 | ``RCONFLICTS`` variable:: |
6115 | :: | ||
6116 | 5917 | ||
6117 | RCONFLICTS_${PN} = "package (operator version)" | 5918 | RCONFLICTS_${PN} = "package (operator version)" |
6118 | 5919 | ||
@@ -6125,8 +5926,7 @@ system and gives an overview of their function and contents. | |||
6125 | - >= | 5926 | - >= |
6126 | 5927 | ||
6127 | For example, the following sets up a dependency on version 1.2 or | 5928 | For example, the following sets up a dependency on version 1.2 or |
6128 | greater of the package ``foo``: | 5929 | greater of the package ``foo``:: |
6129 | :: | ||
6130 | 5930 | ||
6131 | RCONFLICTS_${PN} = "foo (>= 1.2)" | 5931 | RCONFLICTS_${PN} = "foo (>= 1.2)" |
6132 | 5932 | ||
@@ -6135,8 +5935,7 @@ system and gives an overview of their function and contents. | |||
6135 | packages that must be installed in order for the package to function | 5935 | packages that must be installed in order for the package to function |
6136 | correctly. As an example, the following assignment declares that the | 5936 | correctly. As an example, the following assignment declares that the |
6137 | package ``foo`` needs the packages ``bar`` and ``baz`` to be | 5937 | package ``foo`` needs the packages ``bar`` and ``baz`` to be |
6138 | installed: | 5938 | installed:: |
6139 | :: | ||
6140 | 5939 | ||
6141 | RDEPENDS_foo = "bar baz" | 5940 | RDEPENDS_foo = "bar baz" |
6142 | 5941 | ||
@@ -6177,8 +5976,7 @@ system and gives an overview of their function and contents. | |||
6177 | name (remember that a single recipe can build multiple packages). For | 5976 | name (remember that a single recipe can build multiple packages). For |
6178 | example, suppose you are building a development package that depends | 5977 | example, suppose you are building a development package that depends |
6179 | on the ``perl`` package. In this case, you would use the following | 5978 | on the ``perl`` package. In this case, you would use the following |
6180 | ``RDEPENDS`` statement: | 5979 | ``RDEPENDS`` statement:: |
6181 | :: | ||
6182 | 5980 | ||
6183 | RDEPENDS_${PN}-dev += "perl" | 5981 | RDEPENDS_${PN}-dev += "perl" |
6184 | 5982 | ||
@@ -6207,8 +6005,7 @@ system and gives an overview of their function and contents. | |||
6207 | specifying versioned dependencies. Although the syntax varies | 6005 | specifying versioned dependencies. Although the syntax varies |
6208 | depending on the packaging format, BitBake hides these differences | 6006 | depending on the packaging format, BitBake hides these differences |
6209 | from you. Here is the general syntax to specify versions with the | 6007 | from you. Here is the general syntax to specify versions with the |
6210 | ``RDEPENDS`` variable: | 6008 | ``RDEPENDS`` variable:: |
6211 | :: | ||
6212 | 6009 | ||
6213 | RDEPENDS_${PN} = "package (operator version)" | 6010 | RDEPENDS_${PN} = "package (operator version)" |
6214 | 6011 | ||
@@ -6228,8 +6025,7 @@ system and gives an overview of their function and contents. | |||
6228 | specification. | 6025 | specification. |
6229 | 6026 | ||
6230 | For example, the following sets up a dependency on version 1.2 or | 6027 | For example, the following sets up a dependency on version 1.2 or |
6231 | greater of the package ``foo``: | 6028 | greater of the package ``foo``:: |
6232 | :: | ||
6233 | 6029 | ||
6234 | RDEPENDS_${PN} = "foo (>= 1.2)" | 6030 | RDEPENDS_${PN} = "foo (>= 1.2)" |
6235 | 6031 | ||
@@ -6270,8 +6066,7 @@ system and gives an overview of their function and contents. | |||
6270 | 6066 | ||
6271 | :term:`ROOT_HOME` | 6067 | :term:`ROOT_HOME` |
6272 | Defines the root home directory. By default, this directory is set as | 6068 | Defines the root home directory. By default, this directory is set as |
6273 | follows in the BitBake configuration file: | 6069 | follows in the BitBake configuration file:: |
6274 | :: | ||
6275 | 6070 | ||
6276 | ROOT_HOME ??= "/home/root" | 6071 | ROOT_HOME ??= "/home/root" |
6277 | 6072 | ||
@@ -6284,8 +6079,7 @@ system and gives an overview of their function and contents. | |||
6284 | You can override the default by setting the variable in any layer or | 6079 | You can override the default by setting the variable in any layer or |
6285 | in the ``local.conf`` file. Because the default is set using a "weak" | 6080 | in the ``local.conf`` file. Because the default is set using a "weak" |
6286 | assignment (i.e. "??="), you can use either of the following forms to | 6081 | assignment (i.e. "??="), you can use either of the following forms to |
6287 | define your override: | 6082 | define your override:: |
6288 | :: | ||
6289 | 6083 | ||
6290 | ROOT_HOME = "/root" | 6084 | ROOT_HOME = "/root" |
6291 | ROOT_HOME ?= "/root" | 6085 | ROOT_HOME ?= "/root" |
@@ -6303,8 +6097,7 @@ system and gives an overview of their function and contents. | |||
6303 | :term:`ROOTFS_POSTINSTALL_COMMAND` | 6097 | :term:`ROOTFS_POSTINSTALL_COMMAND` |
6304 | Specifies a list of functions to call after the OpenEmbedded build | 6098 | Specifies a list of functions to call after the OpenEmbedded build |
6305 | system has installed packages. You can specify functions separated by | 6099 | system has installed packages. You can specify functions separated by |
6306 | semicolons: | 6100 | semicolons:: |
6307 | :: | ||
6308 | 6101 | ||
6309 | ROOTFS_POSTINSTALL_COMMAND += "function; ... " | 6102 | ROOTFS_POSTINSTALL_COMMAND += "function; ... " |
6310 | 6103 | ||
@@ -6317,8 +6110,7 @@ system and gives an overview of their function and contents. | |||
6317 | :term:`ROOTFS_POSTPROCESS_COMMAND` | 6110 | :term:`ROOTFS_POSTPROCESS_COMMAND` |
6318 | Specifies a list of functions to call once the OpenEmbedded build | 6111 | Specifies a list of functions to call once the OpenEmbedded build |
6319 | system has created the root filesystem. You can specify functions | 6112 | system has created the root filesystem. You can specify functions |
6320 | separated by semicolons: | 6113 | separated by semicolons:: |
6321 | :: | ||
6322 | 6114 | ||
6323 | ROOTFS_POSTPROCESS_COMMAND += "function; ... " | 6115 | ROOTFS_POSTPROCESS_COMMAND += "function; ... " |
6324 | 6116 | ||
@@ -6333,8 +6125,7 @@ system and gives an overview of their function and contents. | |||
6333 | system has removed unnecessary packages. When runtime package | 6125 | system has removed unnecessary packages. When runtime package |
6334 | management is disabled in the image, several packages are removed | 6126 | management is disabled in the image, several packages are removed |
6335 | including ``base-passwd``, ``shadow``, and ``update-alternatives``. | 6127 | including ``base-passwd``, ``shadow``, and ``update-alternatives``. |
6336 | You can specify functions separated by semicolons: | 6128 | You can specify functions separated by semicolons:: |
6337 | :: | ||
6338 | 6129 | ||
6339 | ROOTFS_POSTUNINSTALL_COMMAND += "function; ... " | 6130 | ROOTFS_POSTUNINSTALL_COMMAND += "function; ... " |
6340 | 6131 | ||
@@ -6347,8 +6138,7 @@ system and gives an overview of their function and contents. | |||
6347 | :term:`ROOTFS_PREPROCESS_COMMAND` | 6138 | :term:`ROOTFS_PREPROCESS_COMMAND` |
6348 | Specifies a list of functions to call before the OpenEmbedded build | 6139 | Specifies a list of functions to call before the OpenEmbedded build |
6349 | system has created the root filesystem. You can specify functions | 6140 | system has created the root filesystem. You can specify functions |
6350 | separated by semicolons: | 6141 | separated by semicolons:: |
6351 | :: | ||
6352 | 6142 | ||
6353 | ROOTFS_PREPROCESS_COMMAND += "function; ... " | 6143 | ROOTFS_PREPROCESS_COMMAND += "function; ... " |
6354 | 6144 | ||
@@ -6370,8 +6160,7 @@ system and gives an overview of their function and contents. | |||
6370 | 6160 | ||
6371 | As with all package-controlling variables, you must always use the | 6161 | As with all package-controlling variables, you must always use the |
6372 | variable in conjunction with a package name override. Here is an | 6162 | variable in conjunction with a package name override. Here is an |
6373 | example: | 6163 | example:: |
6374 | :: | ||
6375 | 6164 | ||
6376 | RPROVIDES_${PN} = "widget-abi-2" | 6165 | RPROVIDES_${PN} = "widget-abi-2" |
6377 | 6166 | ||
@@ -6402,8 +6191,7 @@ system and gives an overview of their function and contents. | |||
6402 | particular package whose usability is being extended. For example, | 6191 | particular package whose usability is being extended. For example, |
6403 | suppose you are building a development package that is extended to | 6192 | suppose you are building a development package that is extended to |
6404 | support wireless functionality. In this case, you would use the | 6193 | support wireless functionality. In this case, you would use the |
6405 | following: | 6194 | following:: |
6406 | :: | ||
6407 | 6195 | ||
6408 | RRECOMMENDS_${PN}-dev += "wireless_package_name" | 6196 | RRECOMMENDS_${PN}-dev += "wireless_package_name" |
6409 | 6197 | ||
@@ -6416,8 +6204,7 @@ system and gives an overview of their function and contents. | |||
6416 | specifying versioned recommends. Although the syntax varies depending | 6204 | specifying versioned recommends. Although the syntax varies depending |
6417 | on the packaging format, BitBake hides these differences from you. | 6205 | on the packaging format, BitBake hides these differences from you. |
6418 | Here is the general syntax to specify versions with the | 6206 | Here is the general syntax to specify versions with the |
6419 | ``RRECOMMENDS`` variable: | 6207 | ``RRECOMMENDS`` variable:: |
6420 | :: | ||
6421 | 6208 | ||
6422 | RRECOMMENDS_${PN} = "package (operator version)" | 6209 | RRECOMMENDS_${PN} = "package (operator version)" |
6423 | 6210 | ||
@@ -6430,8 +6217,7 @@ system and gives an overview of their function and contents. | |||
6430 | - >= | 6217 | - >= |
6431 | 6218 | ||
6432 | For example, the following sets up a recommend on version 1.2 or | 6219 | For example, the following sets up a recommend on version 1.2 or |
6433 | greater of the package ``foo``: | 6220 | greater of the package ``foo``:: |
6434 | :: | ||
6435 | 6221 | ||
6436 | RRECOMMENDS_${PN} = "foo (>= 1.2)" | 6222 | RRECOMMENDS_${PN} = "foo (>= 1.2)" |
6437 | 6223 | ||
@@ -6443,8 +6229,7 @@ system and gives an overview of their function and contents. | |||
6443 | the other package to the ``RCONFLICTS`` variable. | 6229 | the other package to the ``RCONFLICTS`` variable. |
6444 | 6230 | ||
6445 | As with all package-controlling variables, you must use this variable | 6231 | As with all package-controlling variables, you must use this variable |
6446 | in conjunction with a package name override. Here is an example: | 6232 | in conjunction with a package name override. Here is an example:: |
6447 | :: | ||
6448 | 6233 | ||
6449 | RREPLACES_${PN} = "other_package_being_replaced" | 6234 | RREPLACES_${PN} = "other_package_being_replaced" |
6450 | 6235 | ||
@@ -6452,8 +6237,7 @@ system and gives an overview of their function and contents. | |||
6452 | specifying versioned replacements. Although the syntax varies | 6237 | specifying versioned replacements. Although the syntax varies |
6453 | depending on the packaging format, BitBake hides these differences | 6238 | depending on the packaging format, BitBake hides these differences |
6454 | from you. Here is the general syntax to specify versions with the | 6239 | from you. Here is the general syntax to specify versions with the |
6455 | ``RREPLACES`` variable: | 6240 | ``RREPLACES`` variable:: |
6456 | :: | ||
6457 | 6241 | ||
6458 | RREPLACES_${PN} = "package (operator version)" | 6242 | RREPLACES_${PN} = "package (operator version)" |
6459 | 6243 | ||
@@ -6466,8 +6250,7 @@ system and gives an overview of their function and contents. | |||
6466 | - >= | 6250 | - >= |
6467 | 6251 | ||
6468 | For example, the following sets up a replacement using version 1.2 | 6252 | For example, the following sets up a replacement using version 1.2 |
6469 | or greater of the package ``foo``: | 6253 | or greater of the package ``foo``:: |
6470 | :: | ||
6471 | 6254 | ||
6472 | RREPLACES_${PN} = "foo (>= 1.2)" | 6255 | RREPLACES_${PN} = "foo (>= 1.2)" |
6473 | 6256 | ||
@@ -6478,8 +6261,7 @@ system and gives an overview of their function and contents. | |||
6478 | 6261 | ||
6479 | As with all package-controlling variables, you must always use this | 6262 | As with all package-controlling variables, you must always use this |
6480 | variable in conjunction with a package name override. Here is an | 6263 | variable in conjunction with a package name override. Here is an |
6481 | example: | 6264 | example:: |
6482 | :: | ||
6483 | 6265 | ||
6484 | RSUGGESTS_${PN} = "useful_package another_package" | 6266 | RSUGGESTS_${PN} = "useful_package another_package" |
6485 | 6267 | ||
@@ -6497,8 +6279,7 @@ system and gives an overview of their function and contents. | |||
6497 | As an example, assume a :term:`Source Directory` | 6279 | As an example, assume a :term:`Source Directory` |
6498 | top-level folder named ``poky`` and a default Build Directory at | 6280 | top-level folder named ``poky`` and a default Build Directory at |
6499 | ``poky/build``. In this case, the work directory the build system | 6281 | ``poky/build``. In this case, the work directory the build system |
6500 | uses to keep the unpacked recipe for ``db`` is the following: | 6282 | uses to keep the unpacked recipe for ``db`` is the following:: |
6501 | :: | ||
6502 | 6283 | ||
6503 | poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19 | 6284 | poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19 |
6504 | 6285 | ||
@@ -6508,8 +6289,7 @@ system and gives an overview of their function and contents. | |||
6508 | repositories are cloned to ``${WORKDIR}/git`` during | 6289 | repositories are cloned to ``${WORKDIR}/git`` during |
6509 | :ref:`ref-tasks-fetch`. Since this path is different | 6290 | :ref:`ref-tasks-fetch`. Since this path is different |
6510 | from the default value of ``S``, you must set it specifically so the | 6291 | from the default value of ``S``, you must set it specifically so the |
6511 | source can be located: | 6292 | source can be located:: |
6512 | :: | ||
6513 | 6293 | ||
6514 | SRC_URI = "git://path/to/repo.git" | 6294 | SRC_URI = "git://path/to/repo.git" |
6515 | S = "${WORKDIR}/git" | 6295 | S = "${WORKDIR}/git" |
@@ -6544,8 +6324,7 @@ system and gives an overview of their function and contents. | |||
6544 | The directory set up and used by the | 6324 | The directory set up and used by the |
6545 | :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which | 6325 | :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which |
6546 | the SDK is deployed. The ``populate_sdk_base`` class defines | 6326 | the SDK is deployed. The ``populate_sdk_base`` class defines |
6547 | ``SDK_DEPLOY`` as follows: | 6327 | ``SDK_DEPLOY`` as follows:: |
6548 | :: | ||
6549 | 6328 | ||
6550 | SDK_DEPLOY = "${TMPDIR}/deploy/sdk" | 6329 | SDK_DEPLOY = "${TMPDIR}/deploy/sdk" |
6551 | 6330 | ||
@@ -6553,8 +6332,7 @@ system and gives an overview of their function and contents. | |||
6553 | The parent directory used by the OpenEmbedded build system when | 6332 | The parent directory used by the OpenEmbedded build system when |
6554 | creating SDK output. The | 6333 | creating SDK output. The |
6555 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines | 6334 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines |
6556 | the variable as follows: | 6335 | the variable as follows:: |
6557 | :: | ||
6558 | 6336 | ||
6559 | SDK_DIR = "${WORKDIR}/sdk" | 6337 | SDK_DIR = "${WORKDIR}/sdk" |
6560 | 6338 | ||
@@ -6579,14 +6357,12 @@ system and gives an overview of their function and contents. | |||
6579 | The manifest file for the host part of the SDK. This file lists all | 6357 | The manifest file for the host part of the SDK. This file lists all |
6580 | the installed packages that make up the host part of the SDK. The | 6358 | the installed packages that make up the host part of the SDK. The |
6581 | file contains package information on a line-per-package basis as | 6359 | file contains package information on a line-per-package basis as |
6582 | follows: | 6360 | follows:: |
6583 | :: | ||
6584 | 6361 | ||
6585 | packagename packagearch version | 6362 | packagename packagearch version |
6586 | 6363 | ||
6587 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class | 6364 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class |
6588 | defines the manifest file as follows: | 6365 | defines the manifest file as follows:: |
6589 | :: | ||
6590 | 6366 | ||
6591 | SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" | 6367 | SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" |
6592 | 6368 | ||
@@ -6624,8 +6400,7 @@ system and gives an overview of their function and contents. | |||
6624 | A list of classes to remove from the :term:`INHERIT` | 6400 | A list of classes to remove from the :term:`INHERIT` |
6625 | value globally within the extensible SDK configuration. The | 6401 | value globally within the extensible SDK configuration. The |
6626 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the | 6402 | :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the |
6627 | default value: | 6403 | default value:: |
6628 | :: | ||
6629 | 6404 | ||
6630 | SDK_INHERIT_BLACKLIST ?= "buildhistory icecc" | 6405 | SDK_INHERIT_BLACKLIST ?= "buildhistory icecc" |
6631 | 6406 | ||
@@ -6688,8 +6463,7 @@ system and gives an overview of their function and contents. | |||
6688 | :term:`DISTRO`, :term:`TCLIBC`, | 6463 | :term:`DISTRO`, :term:`TCLIBC`, |
6689 | :term:`SDK_ARCH`, | 6464 | :term:`SDK_ARCH`, |
6690 | :term:`IMAGE_BASENAME`, and | 6465 | :term:`IMAGE_BASENAME`, and |
6691 | :term:`TUNE_PKGARCH` variables: | 6466 | :term:`TUNE_PKGARCH` variables:: |
6692 | :: | ||
6693 | 6467 | ||
6694 | SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}" | 6468 | SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}" |
6695 | 6469 | ||
@@ -6700,8 +6474,7 @@ system and gives an overview of their function and contents. | |||
6700 | :term:`SDK_OUTPUT` | 6474 | :term:`SDK_OUTPUT` |
6701 | The location used by the OpenEmbedded build system when creating SDK | 6475 | The location used by the OpenEmbedded build system when creating SDK |
6702 | output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` | 6476 | output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` |
6703 | class defines the variable as follows: | 6477 | class defines the variable as follows:: |
6704 | :: | ||
6705 | 6478 | ||
6706 | SDK_DIR = "${WORKDIR}/sdk" | 6479 | SDK_DIR = "${WORKDIR}/sdk" |
6707 | SDK_OUTPUT = "${SDK_DIR}/image" | 6480 | SDK_OUTPUT = "${SDK_DIR}/image" |
@@ -6766,14 +6539,12 @@ system and gives an overview of their function and contents. | |||
6766 | The manifest file for the target part of the SDK. This file lists all | 6539 | The manifest file for the target part of the SDK. This file lists all |
6767 | the installed packages that make up the target part of the SDK. The | 6540 | the installed packages that make up the target part of the SDK. The |
6768 | file contains package information on a line-per-package basis as | 6541 | file contains package information on a line-per-package basis as |
6769 | follows: | 6542 | follows:: |
6770 | :: | ||
6771 | 6543 | ||
6772 | packagename packagearch version | 6544 | packagename packagearch version |
6773 | 6545 | ||
6774 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class | 6546 | The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class |
6775 | defines the manifest file as follows: | 6547 | defines the manifest file as follows:: |
6776 | :: | ||
6777 | 6548 | ||
6778 | SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" | 6549 | SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" |
6779 | 6550 | ||
@@ -6793,8 +6564,7 @@ system and gives an overview of their function and contents. | |||
6793 | this title is based on the :term:`DISTRO_NAME` or | 6564 | this title is based on the :term:`DISTRO_NAME` or |
6794 | :term:`DISTRO` variable and is set in the | 6565 | :term:`DISTRO` variable and is set in the |
6795 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as | 6566 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as |
6796 | follows: | 6567 | follows:: |
6797 | :: | ||
6798 | 6568 | ||
6799 | SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" | 6569 | SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" |
6800 | 6570 | ||
@@ -6817,8 +6587,7 @@ system and gives an overview of their function and contents. | |||
6817 | :term:`SDK_VERSION` | 6587 | :term:`SDK_VERSION` |
6818 | Specifies the version of the SDK. The Poky distribution configuration file | 6588 | Specifies the version of the SDK. The Poky distribution configuration file |
6819 | (``/meta-poky/conf/distro/poky.conf``) sets the default | 6589 | (``/meta-poky/conf/distro/poky.conf``) sets the default |
6820 | ``SDK_VERSION`` as follows: | 6590 | ``SDK_VERSION`` as follows:: |
6821 | :: | ||
6822 | 6591 | ||
6823 | SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}" | 6592 | SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}" |
6824 | 6593 | ||
@@ -6831,8 +6600,7 @@ system and gives an overview of their function and contents. | |||
6831 | default, this directory is based on the :term:`DISTRO` | 6600 | default, this directory is based on the :term:`DISTRO` |
6832 | variable and is set in the | 6601 | variable and is set in the |
6833 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as | 6602 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as |
6834 | follows: | 6603 | follows:: |
6835 | :: | ||
6836 | 6604 | ||
6837 | SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" | 6605 | SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" |
6838 | 6606 | ||
@@ -6846,8 +6614,7 @@ system and gives an overview of their function and contents. | |||
6846 | 6614 | ||
6847 | :term:`SDKIMAGE_FEATURES` | 6615 | :term:`SDKIMAGE_FEATURES` |
6848 | Equivalent to ``IMAGE_FEATURES``. However, this variable applies to | 6616 | Equivalent to ``IMAGE_FEATURES``. However, this variable applies to |
6849 | the SDK generated from an image using the following command: | 6617 | the SDK generated from an image using the following command:: |
6850 | :: | ||
6851 | 6618 | ||
6852 | $ bitbake -c populate_sdk imagename | 6619 | $ bitbake -c populate_sdk imagename |
6853 | 6620 | ||
@@ -6899,8 +6666,7 @@ system and gives an overview of their function and contents. | |||
6899 | Defines a serial console (TTY) to enable using | 6666 | Defines a serial console (TTY) to enable using |
6900 | `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a | 6667 | `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a |
6901 | value that specifies the baud rate followed by the TTY device name | 6668 | value that specifies the baud rate followed by the TTY device name |
6902 | separated by a space. You cannot specify more than one TTY device: | 6669 | separated by a space. You cannot specify more than one TTY device:: |
6903 | :: | ||
6904 | 6670 | ||
6905 | SERIAL_CONSOLE = "115200 ttyS0" | 6671 | SERIAL_CONSOLE = "115200 ttyS0" |
6906 | 6672 | ||
@@ -6913,8 +6679,7 @@ system and gives an overview of their function and contents. | |||
6913 | Defines a serial console (TTY) to enable using | 6679 | Defines a serial console (TTY) to enable using |
6914 | `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a | 6680 | `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a |
6915 | value that specifies the baud rate followed by the TTY device name | 6681 | value that specifies the baud rate followed by the TTY device name |
6916 | separated by a semicolon. Use spaces to separate multiple devices: | 6682 | separated by a semicolon. Use spaces to separate multiple devices:: |
6917 | :: | ||
6918 | 6683 | ||
6919 | SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1" | 6684 | SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1" |
6920 | 6685 | ||
@@ -7044,8 +6809,7 @@ system and gives an overview of their function and contents. | |||
7044 | 6809 | ||
7045 | To use this variable, you must globally inherit the | 6810 | To use this variable, you must globally inherit the |
7046 | :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide | 6811 | :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide |
7047 | the URL to your mirrors. Here is the general syntax: | 6812 | the URL to your mirrors. Here is the general syntax:: |
7048 | :: | ||
7049 | 6813 | ||
7050 | INHERIT += "own-mirrors" | 6814 | INHERIT += "own-mirrors" |
7051 | SOURCE_MIRROR_URL = "http://example.com/my_source_mirror" | 6815 | SOURCE_MIRROR_URL = "http://example.com/my_source_mirror" |
@@ -7076,8 +6840,7 @@ system and gives an overview of their function and contents. | |||
7076 | U-Boot recipe. | 6840 | U-Boot recipe. |
7077 | 6841 | ||
7078 | The SPL file type is set to "null" by default in the ``u-boot.inc`` | 6842 | The SPL file type is set to "null" by default in the ``u-boot.inc`` |
7079 | file as follows: | 6843 | file as follows:: |
7080 | :: | ||
7081 | 6844 | ||
7082 | # Some versions of u-boot build an SPL (Second Program Loader) image that | 6845 | # Some versions of u-boot build an SPL (Second Program Loader) image that |
7083 | # should be packaged along with the u-boot binary as well as placed in the | 6846 | # should be packaged along with the u-boot binary as well as placed in the |
@@ -7236,8 +6999,7 @@ system and gives an overview of their function and contents. | |||
7236 | 6999 | ||
7237 | - ``name`` - Specifies a name to be used for association with | 7000 | - ``name`` - Specifies a name to be used for association with |
7238 | ``SRC_URI`` checksums or :term:`SRCREV` when you have more than one | 7001 | ``SRC_URI`` checksums or :term:`SRCREV` when you have more than one |
7239 | file or git repository specified in ``SRC_URI``. For example: | 7002 | file or git repository specified in ``SRC_URI``. For example:: |
7240 | :: | ||
7241 | 7003 | ||
7242 | SRC_URI = "git://example.com/foo.git;name=first \ | 7004 | SRC_URI = "git://example.com/foo.git;name=first \ |
7243 | git://example.com/bar.git;name=second \ | 7005 | git://example.com/bar.git;name=second \ |
@@ -7268,16 +7030,14 @@ system and gives an overview of their function and contents. | |||
7268 | 7030 | ||
7269 | The ``SRCPV`` variable is defined in the ``meta/conf/bitbake.conf`` | 7031 | The ``SRCPV`` variable is defined in the ``meta/conf/bitbake.conf`` |
7270 | configuration file in the :term:`Source Directory` as | 7032 | configuration file in the :term:`Source Directory` as |
7271 | follows: | 7033 | follows:: |
7272 | :: | ||
7273 | 7034 | ||
7274 | SRCPV = "${@bb.fetch2.get_srcrev(d)}" | 7035 | SRCPV = "${@bb.fetch2.get_srcrev(d)}" |
7275 | 7036 | ||
7276 | Recipes that need to define ``PV`` do so with the help of the | 7037 | Recipes that need to define ``PV`` do so with the help of the |
7277 | ``SRCPV``. For example, the ``ofono`` recipe (``ofono_git.bb``) | 7038 | ``SRCPV``. For example, the ``ofono`` recipe (``ofono_git.bb``) |
7278 | located in ``meta/recipes-connectivity`` in the Source Directory | 7039 | located in ``meta/recipes-connectivity`` in the Source Directory |
7279 | defines ``PV`` as follows: | 7040 | defines ``PV`` as follows:: |
7280 | :: | ||
7281 | 7041 | ||
7282 | PV = "0.12-git${SRCPV}" | 7042 | PV = "0.12-git${SRCPV}" |
7283 | 7043 | ||
@@ -7328,8 +7088,7 @@ system and gives an overview of their function and contents. | |||
7328 | :term:`NATIVELSBSTRING` set by the | 7088 | :term:`NATIVELSBSTRING` set by the |
7329 | :ref:`uninative <ref-classes-uninative>` class. For example, the | 7089 | :ref:`uninative <ref-classes-uninative>` class. For example, the |
7330 | following maps the local search path ``universal-4.9`` to the | 7090 | following maps the local search path ``universal-4.9`` to the |
7331 | server-provided path server_url_sstate_path: | 7091 | server-provided path server_url_sstate_path:: |
7332 | :: | ||
7333 | 7092 | ||
7334 | SSTATE_MIRRORS ?= "file://universal-4.9/(.*) http://server_url_sstate_path/universal-4.8/\1 \n" | 7093 | SSTATE_MIRRORS ?= "file://universal-4.9/(.*) http://server_url_sstate_path/universal-4.8/\1 \n" |
7335 | 7094 | ||
@@ -7524,8 +7283,7 @@ system and gives an overview of their function and contents. | |||
7524 | to an actual stamp file is constructed by evaluating this string and | 7283 | to an actual stamp file is constructed by evaluating this string and |
7525 | then appending additional information. Currently, the default | 7284 | then appending additional information. Currently, the default |
7526 | assignment for ``STAMP`` as set in the ``meta/conf/bitbake.conf`` | 7285 | assignment for ``STAMP`` as set in the ``meta/conf/bitbake.conf`` |
7527 | file is: | 7286 | file is:: |
7528 | :: | ||
7529 | 7287 | ||
7530 | STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" | 7288 | STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" |
7531 | 7289 | ||
@@ -7562,8 +7320,7 @@ system and gives an overview of their function and contents. | |||
7562 | :term:`SYSLINUX_DEFAULT_CONSOLE` | 7320 | :term:`SYSLINUX_DEFAULT_CONSOLE` |
7563 | Specifies the kernel boot default console. If you want to use a | 7321 | Specifies the kernel boot default console. If you want to use a |
7564 | console other than the default, set this variable in your recipe as | 7322 | console other than the default, set this variable in your recipe as |
7565 | follows where "X" is the console number you want to use: | 7323 | follows where "X" is the console number you want to use:: |
7566 | :: | ||
7567 | 7324 | ||
7568 | SYSLINUX_DEFAULT_CONSOLE = "console=ttyX" | 7325 | SYSLINUX_DEFAULT_CONSOLE = "console=ttyX" |
7569 | 7326 | ||
@@ -7582,8 +7339,7 @@ system and gives an overview of their function and contents. | |||
7582 | Specifies the alternate serial port or turns it off. To turn off | 7339 | Specifies the alternate serial port or turns it off. To turn off |
7583 | serial, set this variable to an empty string in your recipe. The | 7340 | serial, set this variable to an empty string in your recipe. The |
7584 | variable's default value is set in the | 7341 | variable's default value is set in the |
7585 | :ref:`syslinux <ref-classes-syslinux>` class as follows: | 7342 | :ref:`syslinux <ref-classes-syslinux>` class as follows:: |
7586 | :: | ||
7587 | 7343 | ||
7588 | SYSLINUX_SERIAL ?= "0 115200" | 7344 | SYSLINUX_SERIAL ?= "0 115200" |
7589 | 7345 | ||
@@ -7592,8 +7348,7 @@ system and gives an overview of their function and contents. | |||
7592 | :term:`SYSLINUX_SERIAL_TTY` | 7348 | :term:`SYSLINUX_SERIAL_TTY` |
7593 | Specifies the alternate console=tty... kernel boot argument. The | 7349 | Specifies the alternate console=tty... kernel boot argument. The |
7594 | variable's default value is set in the | 7350 | variable's default value is set in the |
7595 | :ref:`syslinux <ref-classes-syslinux>` class as follows: | 7351 | :ref:`syslinux <ref-classes-syslinux>` class as follows:: |
7596 | :: | ||
7597 | 7352 | ||
7598 | SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200" | 7353 | SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200" |
7599 | 7354 | ||
@@ -7616,8 +7371,7 @@ system and gives an overview of their function and contents. | |||
7616 | :term:`SYSROOT_DIRS` | 7371 | :term:`SYSROOT_DIRS` |
7617 | Directories that are staged into the sysroot by the | 7372 | Directories that are staged into the sysroot by the |
7618 | :ref:`ref-tasks-populate_sysroot` task. By | 7373 | :ref:`ref-tasks-populate_sysroot` task. By |
7619 | default, the following directories are staged: | 7374 | default, the following directories are staged:: |
7620 | :: | ||
7621 | 7375 | ||
7622 | SYSROOT_DIRS = " \ | 7376 | SYSROOT_DIRS = " \ |
7623 | ${includedir} \ | 7377 | ${includedir} \ |
@@ -7632,8 +7386,7 @@ system and gives an overview of their function and contents. | |||
7632 | :ref:`ref-tasks-populate_sysroot` task. You | 7386 | :ref:`ref-tasks-populate_sysroot` task. You |
7633 | can use this variable to exclude certain subdirectories of | 7387 | can use this variable to exclude certain subdirectories of |
7634 | directories listed in :term:`SYSROOT_DIRS` from | 7388 | directories listed in :term:`SYSROOT_DIRS` from |
7635 | staging. By default, the following directories are not staged: | 7389 | staging. By default, the following directories are not staged:: |
7636 | :: | ||
7637 | 7390 | ||
7638 | SYSROOT_DIRS_BLACKLIST = " \ | 7391 | SYSROOT_DIRS_BLACKLIST = " \ |
7639 | ${mandir} \ | 7392 | ${mandir} \ |
@@ -7650,8 +7403,7 @@ system and gives an overview of their function and contents. | |||
7650 | :ref:`ref-tasks-populate_sysroot` task for | 7403 | :ref:`ref-tasks-populate_sysroot` task for |
7651 | ``-native`` recipes, in addition to those specified in | 7404 | ``-native`` recipes, in addition to those specified in |
7652 | :term:`SYSROOT_DIRS`. By default, the following | 7405 | :term:`SYSROOT_DIRS`. By default, the following |
7653 | extra directories are staged: | 7406 | extra directories are staged:: |
7654 | :: | ||
7655 | 7407 | ||
7656 | SYSROOT_DIRS_NATIVE = " \ | 7408 | SYSROOT_DIRS_NATIVE = " \ |
7657 | ${bindir} \ | 7409 | ${bindir} \ |
@@ -7680,8 +7432,7 @@ system and gives an overview of their function and contents. | |||
7680 | :term:`SYSTEMD_SERVICE` should start | 7432 | :term:`SYSTEMD_SERVICE` should start |
7681 | automatically or not. By default, the service is enabled to | 7433 | automatically or not. By default, the service is enabled to |
7682 | automatically start at boot time. The default setting is in the | 7434 | automatically start at boot time. The default setting is in the |
7683 | :ref:`systemd <ref-classes-systemd>` class as follows: | 7435 | :ref:`systemd <ref-classes-systemd>` class as follows:: |
7684 | :: | ||
7685 | 7436 | ||
7686 | SYSTEMD_AUTO_ENABLE ??= "enable" | 7437 | SYSTEMD_AUTO_ENABLE ??= "enable" |
7687 | 7438 | ||
@@ -7692,8 +7443,7 @@ system and gives an overview of their function and contents. | |||
7692 | "systemd-boot", the ``SYSTEMD_BOOT_CFG`` variable specifies the | 7443 | "systemd-boot", the ``SYSTEMD_BOOT_CFG`` variable specifies the |
7693 | configuration file that should be used. By default, the | 7444 | configuration file that should be used. By default, the |
7694 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the | 7445 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the |
7695 | ``SYSTEMD_BOOT_CFG`` as follows: | 7446 | ``SYSTEMD_BOOT_CFG`` as follows:: |
7696 | :: | ||
7697 | 7447 | ||
7698 | SYSTEMD_BOOT_CFG ?= "${:term:`S`}/loader.conf" | 7448 | SYSTEMD_BOOT_CFG ?= "${:term:`S`}/loader.conf" |
7699 | 7449 | ||
@@ -7706,8 +7456,7 @@ system and gives an overview of their function and contents. | |||
7706 | list of entry files (``*.conf``) to install that contain one boot | 7456 | list of entry files (``*.conf``) to install that contain one boot |
7707 | entry per file. By default, the | 7457 | entry per file. By default, the |
7708 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the | 7458 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the |
7709 | ``SYSTEMD_BOOT_ENTRIES`` as follows: | 7459 | ``SYSTEMD_BOOT_ENTRIES`` as follows:: |
7710 | :: | ||
7711 | 7460 | ||
7712 | SYSTEMD_BOOT_ENTRIES ?= "" | 7461 | SYSTEMD_BOOT_ENTRIES ?= "" |
7713 | 7462 | ||
@@ -7719,8 +7468,7 @@ system and gives an overview of their function and contents. | |||
7719 | "systemd-boot", the ``SYSTEMD_BOOT_TIMEOUT`` variable specifies the | 7468 | "systemd-boot", the ``SYSTEMD_BOOT_TIMEOUT`` variable specifies the |
7720 | boot menu timeout in seconds. By default, the | 7469 | boot menu timeout in seconds. By default, the |
7721 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the | 7470 | :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the |
7722 | ``SYSTEMD_BOOT_TIMEOUT`` as follows: | 7471 | ``SYSTEMD_BOOT_TIMEOUT`` as follows:: |
7723 | :: | ||
7724 | 7472 | ||
7725 | SYSTEMD_BOOT_TIMEOUT ?= "10" | 7473 | SYSTEMD_BOOT_TIMEOUT ?= "10" |
7726 | 7474 | ||
@@ -7732,8 +7480,7 @@ system and gives an overview of their function and contents. | |||
7732 | this variable locates the systemd unit files when they are not found | 7480 | this variable locates the systemd unit files when they are not found |
7733 | in the main recipe's package. By default, the ``SYSTEMD_PACKAGES`` | 7481 | in the main recipe's package. By default, the ``SYSTEMD_PACKAGES`` |
7734 | variable is set such that the systemd unit files are assumed to | 7482 | variable is set such that the systemd unit files are assumed to |
7735 | reside in the recipes main package: | 7483 | reside in the recipes main package:: |
7736 | :: | ||
7737 | 7484 | ||
7738 | SYSTEMD_PACKAGES ?= "${PN}" | 7485 | SYSTEMD_PACKAGES ?= "${PN}" |
7739 | 7486 | ||
@@ -7747,8 +7494,7 @@ system and gives an overview of their function and contents. | |||
7747 | 7494 | ||
7748 | When you specify this file in your recipe, use a package name | 7495 | When you specify this file in your recipe, use a package name |
7749 | override to indicate the package to which the value applies. Here is | 7496 | override to indicate the package to which the value applies. Here is |
7750 | an example from the connman recipe: | 7497 | an example from the connman recipe:: |
7751 | :: | ||
7752 | 7498 | ||
7753 | SYSTEMD_SERVICE_${PN} = "connman.service" | 7499 | SYSTEMD_SERVICE_${PN} = "connman.service" |
7754 | 7500 | ||
@@ -7766,8 +7512,7 @@ system and gives an overview of their function and contents. | |||
7766 | :term:`T` | 7512 | :term:`T` |
7767 | This variable points to a directory were BitBake places temporary | 7513 | This variable points to a directory were BitBake places temporary |
7768 | files, which consist mostly of task logs and scripts, when building a | 7514 | files, which consist mostly of task logs and scripts, when building a |
7769 | particular recipe. The variable is typically set as follows: | 7515 | particular recipe. The variable is typically set as follows:: |
7770 | :: | ||
7771 | 7516 | ||
7772 | T = "${WORKDIR}/temp" | 7517 | T = "${WORKDIR}/temp" |
7773 | 7518 | ||
@@ -7801,8 +7546,7 @@ system and gives an overview of their function and contents. | |||
7801 | Specifies architecture-specific assembler flags for the target | 7546 | Specifies architecture-specific assembler flags for the target |
7802 | system. ``TARGET_AS_ARCH`` is initialized from | 7547 | system. ``TARGET_AS_ARCH`` is initialized from |
7803 | :term:`TUNE_ASARGS` by default in the BitBake | 7548 | :term:`TUNE_ASARGS` by default in the BitBake |
7804 | configuration file (``meta/conf/bitbake.conf``): | 7549 | configuration file (``meta/conf/bitbake.conf``):: |
7805 | :: | ||
7806 | 7550 | ||
7807 | TARGET_AS_ARCH = "${TUNE_ASARGS}" | 7551 | TARGET_AS_ARCH = "${TUNE_ASARGS}" |
7808 | 7552 | ||
@@ -7869,8 +7613,7 @@ system and gives an overview of their function and contents. | |||
7869 | Specifies architecture-specific linker flags for the target system. | 7613 | Specifies architecture-specific linker flags for the target system. |
7870 | ``TARGET_LD_ARCH`` is initialized from | 7614 | ``TARGET_LD_ARCH`` is initialized from |
7871 | :term:`TUNE_LDARGS` by default in the BitBake | 7615 | :term:`TUNE_LDARGS` by default in the BitBake |
7872 | configuration file (``meta/conf/bitbake.conf``): | 7616 | configuration file (``meta/conf/bitbake.conf``):: |
7873 | :: | ||
7874 | 7617 | ||
7875 | TARGET_LD_ARCH = "${TUNE_LDARGS}" | 7618 | TARGET_LD_ARCH = "${TUNE_LDARGS}" |
7876 | 7619 | ||
@@ -8051,8 +7794,7 @@ system and gives an overview of their function and contents. | |||
8051 | program does. | 7794 | program does. |
8052 | 7795 | ||
8053 | For example, to use the Picocom terminal program on serial device | 7796 | For example, to use the Picocom terminal program on serial device |
8054 | ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows: | 7797 | ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows:: |
8055 | :: | ||
8056 | 7798 | ||
8057 | TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200" | 7799 | TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200" |
8058 | 7800 | ||
@@ -8090,8 +7832,7 @@ system and gives an overview of their function and contents. | |||
8090 | 7832 | ||
8091 | Tests include ``ping``, ``ssh``, ``df`` among others. You can add | 7833 | Tests include ``ping``, ``ssh``, ``df`` among others. You can add |
8092 | your own tests to the list of tests by appending ``TEST_SUITES`` as | 7834 | your own tests to the list of tests by appending ``TEST_SUITES`` as |
8093 | follows: | 7835 | follows:: |
8094 | :: | ||
8095 | 7836 | ||
8096 | TEST_SUITES_append = " mytest" | 7837 | TEST_SUITES_append = " mytest" |
8097 | 7838 | ||
@@ -8110,8 +7851,7 @@ system and gives an overview of their function and contents. | |||
8110 | another test must appear later in the list than the test on which | 7851 | another test must appear later in the list than the test on which |
8111 | they depend. For example, if you append the list of tests with two | 7852 | they depend. For example, if you append the list of tests with two |
8112 | tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on | 7853 | tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on |
8113 | ``test_A``, then you must order the tests as follows: | 7854 | ``test_A``, then you must order the tests as follows:: |
8114 | :: | ||
8115 | 7855 | ||
8116 | TEST_SUITES = "test_A test_B" | 7856 | TEST_SUITES = "test_A test_B" |
8117 | 7857 | ||
@@ -8121,8 +7861,7 @@ system and gives an overview of their function and contents. | |||
8121 | 7861 | ||
8122 | :term:`TEST_TARGET` | 7862 | :term:`TEST_TARGET` |
8123 | Specifies the target controller to use when running tests against a | 7863 | Specifies the target controller to use when running tests against a |
8124 | test image. The default controller to use is "qemu": | 7864 | test image. The default controller to use is "qemu":: |
8125 | :: | ||
8126 | 7865 | ||
8127 | TEST_TARGET = "qemu" | 7866 | TEST_TARGET = "qemu" |
8128 | 7867 | ||
@@ -8161,8 +7900,7 @@ system and gives an overview of their function and contents. | |||
8161 | set to "qemu". | 7900 | set to "qemu". |
8162 | 7901 | ||
8163 | When you specify the IP address, you can also include a port. Here is | 7902 | When you specify the IP address, you can also include a port. Here is |
8164 | an example: | 7903 | an example:: |
8165 | :: | ||
8166 | 7904 | ||
8167 | TEST_TARGET_IP = "192.168.1.4:2201" | 7905 | TEST_TARGET_IP = "192.168.1.4:2201" |
8168 | 7906 | ||
@@ -8211,8 +7949,7 @@ system and gives an overview of their function and contents. | |||
8211 | 7949 | ||
8212 | If you want to establish this directory in a location other than the | 7950 | If you want to establish this directory in a location other than the |
8213 | default, you can uncomment and edit the following statement in the | 7951 | default, you can uncomment and edit the following statement in the |
8214 | ``conf/local.conf`` file in the :term:`Source Directory`: | 7952 | ``conf/local.conf`` file in the :term:`Source Directory`:: |
8215 | :: | ||
8216 | 7953 | ||
8217 | #TMPDIR = "${TOPDIR}/tmp" | 7954 | #TMPDIR = "${TOPDIR}/tmp" |
8218 | 7955 | ||
@@ -8231,8 +7968,7 @@ system and gives an overview of their function and contents. | |||
8231 | packages specified by this variable are part of the toolchain set | 7968 | packages specified by this variable are part of the toolchain set |
8232 | that runs on the :term:`SDKMACHINE`, and each | 7969 | that runs on the :term:`SDKMACHINE`, and each |
8233 | package should usually have the prefix ``nativesdk-``. For example, | 7970 | package should usually have the prefix ``nativesdk-``. For example, |
8234 | consider the following command when building an SDK: | 7971 | consider the following command when building an SDK:: |
8235 | :: | ||
8236 | 7972 | ||
8237 | $ bitbake -c populate_sdk imagename | 7973 | $ bitbake -c populate_sdk imagename |
8238 | 7974 | ||
@@ -8253,8 +7989,7 @@ system and gives an overview of their function and contents. | |||
8253 | :term:`TOOLCHAIN_OUTPUTNAME` | 7989 | :term:`TOOLCHAIN_OUTPUTNAME` |
8254 | This variable defines the name used for the toolchain output. The | 7990 | This variable defines the name used for the toolchain output. The |
8255 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets | 7991 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets |
8256 | the ``TOOLCHAIN_OUTPUTNAME`` variable as follows: | 7992 | the ``TOOLCHAIN_OUTPUTNAME`` variable as follows:: |
8257 | :: | ||
8258 | 7993 | ||
8259 | TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}" | 7994 | TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}" |
8260 | 7995 | ||
@@ -8310,8 +8045,7 @@ system and gives an overview of their function and contents. | |||
8310 | ``TUNE_ARCH`` is tied closely to | 8045 | ``TUNE_ARCH`` is tied closely to |
8311 | :term:`TARGET_ARCH`, which defines the target | 8046 | :term:`TARGET_ARCH`, which defines the target |
8312 | machine's architecture. The BitBake configuration file | 8047 | machine's architecture. The BitBake configuration file |
8313 | (``meta/conf/bitbake.conf``) sets ``TARGET_ARCH`` as follows: | 8048 | (``meta/conf/bitbake.conf``) sets ``TARGET_ARCH`` as follows:: |
8314 | :: | ||
8315 | 8049 | ||
8316 | TARGET_ARCH = "${TUNE_ARCH}" | 8050 | TARGET_ARCH = "${TUNE_ARCH}" |
8317 | 8051 | ||
@@ -8333,8 +8067,7 @@ system and gives an overview of their function and contents. | |||
8333 | typically under ``meta/conf/machine/include/`` and are influenced | 8067 | typically under ``meta/conf/machine/include/`` and are influenced |
8334 | through :term:`TUNE_FEATURES`. For example, the | 8068 | through :term:`TUNE_FEATURES`. For example, the |
8335 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags | 8069 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags |
8336 | for the x86 architecture as follows: | 8070 | for the x86 architecture as follows:: |
8337 | :: | ||
8338 | 8071 | ||
8339 | TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}" | 8072 | TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}" |
8340 | 8073 | ||
@@ -8367,8 +8100,7 @@ system and gives an overview of their function and contents. | |||
8367 | are not conflicting and that they are supported. | 8100 | are not conflicting and that they are supported. |
8368 | 8101 | ||
8369 | The BitBake configuration file (``meta/conf/bitbake.conf``) defines | 8102 | The BitBake configuration file (``meta/conf/bitbake.conf``) defines |
8370 | ``TUNE_FEATURES`` as follows: | 8103 | ``TUNE_FEATURES`` as follows:: |
8371 | :: | ||
8372 | 8104 | ||
8373 | TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}" | 8105 | TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}" |
8374 | 8106 | ||
@@ -8381,8 +8113,7 @@ system and gives an overview of their function and contents. | |||
8381 | typically under ``meta/conf/machine/include/`` and are influenced | 8113 | typically under ``meta/conf/machine/include/`` and are influenced |
8382 | through :term:`TUNE_FEATURES`. For example, the | 8114 | through :term:`TUNE_FEATURES`. For example, the |
8383 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags | 8115 | ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags |
8384 | for the x86 architecture as follows: | 8116 | for the x86 architecture as follows:: |
8385 | :: | ||
8386 | 8117 | ||
8387 | TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}" | 8118 | TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}" |
8388 | 8119 | ||
@@ -8395,15 +8126,13 @@ system and gives an overview of their function and contents. | |||
8395 | :term:`TUNE_PKGARCH` | 8126 | :term:`TUNE_PKGARCH` |
8396 | The package architecture understood by the packaging system to define | 8127 | The package architecture understood by the packaging system to define |
8397 | the architecture, ABI, and tuning of output packages. The specific | 8128 | the architecture, ABI, and tuning of output packages. The specific |
8398 | tune is defined using the "_tune" override as follows: | 8129 | tune is defined using the "_tune" override as follows:: |
8399 | :: | ||
8400 | 8130 | ||
8401 | TUNE_PKGARCH_tune-tune = "tune" | 8131 | TUNE_PKGARCH_tune-tune = "tune" |
8402 | 8132 | ||
8403 | These tune-specific package architectures are defined in the machine | 8133 | These tune-specific package architectures are defined in the machine |
8404 | include files. Here is an example of the "core2-32" tuning as used in | 8134 | include files. Here is an example of the "core2-32" tuning as used in |
8405 | the ``meta/conf/machine/include/tune-core2.inc`` file: | 8135 | the ``meta/conf/machine/include/tune-core2.inc`` file:: |
8406 | :: | ||
8407 | 8136 | ||
8408 | TUNE_PKGARCH_tune-core2-32 = "core2-32" | 8137 | TUNE_PKGARCH_tune-core2-32 = "core2-32" |
8409 | 8138 | ||
@@ -8449,8 +8178,7 @@ system and gives an overview of their function and contents. | |||
8449 | the :term:`Source Directory`. Here is an example from | 8178 | the :term:`Source Directory`. Here is an example from |
8450 | the ``meta/conf/machine/include/mips/arch-mips.inc`` include file | 8179 | the ``meta/conf/machine/include/mips/arch-mips.inc`` include file |
8451 | that lists the "o32" and "n64" features as conflicting with the "n32" | 8180 | that lists the "o32" and "n64" features as conflicting with the "n32" |
8452 | feature: | 8181 | feature:: |
8453 | :: | ||
8454 | 8182 | ||
8455 | TUNECONFLICTS[n32] = "o32 n64" | 8183 | TUNECONFLICTS[n32] = "o32 n64" |
8456 | 8184 | ||
@@ -8459,8 +8187,7 @@ system and gives an overview of their function and contents. | |||
8459 | feature. The specified feature is stored as a flag. Valid features | 8187 | feature. The specified feature is stored as a flag. Valid features |
8460 | are specified in the machine include files (e.g. | 8188 | are specified in the machine include files (e.g. |
8461 | ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example | 8189 | ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example |
8462 | from that file: | 8190 | from that file:: |
8463 | :: | ||
8464 | 8191 | ||
8465 | TUNEVALID[bigendian] = "Enable big-endian mode." | 8192 | TUNEVALID[bigendian] = "Enable big-endian mode." |
8466 | 8193 | ||
@@ -8516,8 +8243,7 @@ system and gives an overview of their function and contents. | |||
8516 | Appends a string to the name of the local version of the U-Boot | 8243 | Appends a string to the name of the local version of the U-Boot |
8517 | image. For example, assuming the version of the U-Boot image built | 8244 | image. For example, assuming the version of the U-Boot image built |
8518 | was "2013.10", the full version string reported by U-Boot would be | 8245 | was "2013.10", the full version string reported by U-Boot would be |
8519 | "2013.10-yocto" given the following statement: | 8246 | "2013.10-yocto" given the following statement:: |
8520 | :: | ||
8521 | 8247 | ||
8522 | UBOOT_LOCALVERSION = "-yocto" | 8248 | UBOOT_LOCALVERSION = "-yocto" |
8523 | 8249 | ||
@@ -8691,8 +8417,7 @@ system and gives an overview of their function and contents. | |||
8691 | OpenEmbedded build system to enable extra features (e.g. | 8417 | OpenEmbedded build system to enable extra features (e.g. |
8692 | ``buildstats``, ``image-mklibs``, and so forth). | 8418 | ``buildstats``, ``image-mklibs``, and so forth). |
8693 | 8419 | ||
8694 | The default list is set in your ``local.conf`` file: | 8420 | The default list is set in your ``local.conf`` file:: |
8695 | :: | ||
8696 | 8421 | ||
8697 | USER_CLASSES ?= "buildstats image-mklibs image-prelink" | 8422 | USER_CLASSES ?= "buildstats image-mklibs image-prelink" |
8698 | 8423 | ||
@@ -8712,8 +8437,7 @@ system and gives an overview of their function and contents. | |||
8712 | ``USERADD_ERROR_DYNAMIC`` variable is by default not set. If you plan | 8437 | ``USERADD_ERROR_DYNAMIC`` variable is by default not set. If you plan |
8713 | on using statically assigned ``gid`` and ``uid`` values, you should | 8438 | on using statically assigned ``gid`` and ``uid`` values, you should |
8714 | set the ``USERADD_ERROR_DYNAMIC`` variable in your ``local.conf`` | 8439 | set the ``USERADD_ERROR_DYNAMIC`` variable in your ``local.conf`` |
8715 | file as follows: | 8440 | file as follows:: |
8716 | :: | ||
8717 | 8441 | ||
8718 | USERADD_ERROR_DYNAMIC = "error" | 8442 | USERADD_ERROR_DYNAMIC = "error" |
8719 | 8443 | ||
@@ -8743,8 +8467,7 @@ system and gives an overview of their function and contents. | |||
8743 | When applying static group identification (``gid``) values, the | 8467 | When applying static group identification (``gid``) values, the |
8744 | OpenEmbedded build system looks in :term:`BBPATH` for a | 8468 | OpenEmbedded build system looks in :term:`BBPATH` for a |
8745 | ``files/group`` file and then applies those ``uid`` values. Set the | 8469 | ``files/group`` file and then applies those ``uid`` values. Set the |
8746 | variable as follows in your ``local.conf`` file: | 8470 | variable as follows in your ``local.conf`` file:: |
8747 | :: | ||
8748 | 8471 | ||
8749 | 8472 | ||
8750 | USERADD_GID_TABLES = "files/group" | 8473 | USERADD_GID_TABLES = "files/group" |
@@ -8761,8 +8484,7 @@ system and gives an overview of their function and contents. | |||
8761 | 8484 | ||
8762 | You must set this variable if the recipe inherits the class. For | 8485 | You must set this variable if the recipe inherits the class. For |
8763 | example, the following enables adding a user for the main package in | 8486 | example, the following enables adding a user for the main package in |
8764 | a recipe: | 8487 | a recipe:: |
8765 | :: | ||
8766 | 8488 | ||
8767 | USERADD_PACKAGES = "${PN}" | 8489 | USERADD_PACKAGES = "${PN}" |
8768 | 8490 | ||
@@ -8778,8 +8500,7 @@ system and gives an overview of their function and contents. | |||
8778 | the ``useradd`` command if you add a user to the system when the | 8500 | the ``useradd`` command if you add a user to the system when the |
8779 | package is installed. | 8501 | package is installed. |
8780 | 8502 | ||
8781 | Here is an example from the ``dbus`` recipe: | 8503 | Here is an example from the ``dbus`` recipe:: |
8782 | :: | ||
8783 | 8504 | ||
8784 | USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \ | 8505 | USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \ |
8785 | --no-create-home --shell /bin/false \ | 8506 | --no-create-home --shell /bin/false \ |
@@ -8797,8 +8518,7 @@ system and gives an overview of their function and contents. | |||
8797 | When applying static user identification (``uid``) values, the | 8518 | When applying static user identification (``uid``) values, the |
8798 | OpenEmbedded build system looks in :term:`BBPATH` for a | 8519 | OpenEmbedded build system looks in :term:`BBPATH` for a |
8799 | ``files/passwd`` file and then applies those ``uid`` values. Set the | 8520 | ``files/passwd`` file and then applies those ``uid`` values. Set the |
8800 | variable as follows in your ``local.conf`` file: | 8521 | variable as follows in your ``local.conf`` file:: |
8801 | :: | ||
8802 | 8522 | ||
8803 | USERADD_UID_TABLES = "files/passwd" | 8523 | USERADD_UID_TABLES = "files/passwd" |
8804 | 8524 | ||
@@ -8869,8 +8589,7 @@ system and gives an overview of their function and contents. | |||
8869 | With the ``WKS_FILE_DEPENDS`` variable, you have the possibility to | 8589 | With the ``WKS_FILE_DEPENDS`` variable, you have the possibility to |
8870 | specify a list of additional dependencies (e.g. native tools, | 8590 | specify a list of additional dependencies (e.g. native tools, |
8871 | bootloaders, and so forth), that are required to build Wic images. | 8591 | bootloaders, and so forth), that are required to build Wic images. |
8872 | Following is an example: | 8592 | Following is an example:: |
8873 | :: | ||
8874 | 8593 | ||
8875 | WKS_FILE_DEPENDS = "some-native-tool" | 8594 | WKS_FILE_DEPENDS = "some-native-tool" |
8876 | 8595 | ||
@@ -8884,8 +8603,7 @@ system and gives an overview of their function and contents. | |||
8884 | :term:`TMPDIR` directory structure and is specific to | 8603 | :term:`TMPDIR` directory structure and is specific to |
8885 | the recipe being built and the system for which it is being built. | 8604 | the recipe being built and the system for which it is being built. |
8886 | 8605 | ||
8887 | The ``WORKDIR`` directory is defined as follows: | 8606 | The ``WORKDIR`` directory is defined as follows:: |
8888 | :: | ||
8889 | 8607 | ||
8890 | ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR} | 8608 | ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR} |
8891 | 8609 | ||
@@ -8904,8 +8622,7 @@ system and gives an overview of their function and contents. | |||
8904 | ``qemux86-poky-linux`` machine target system. Furthermore, suppose | 8622 | ``qemux86-poky-linux`` machine target system. Furthermore, suppose |
8905 | your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work | 8623 | your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work |
8906 | directory the build system uses to build the package would be as | 8624 | directory the build system uses to build the package would be as |
8907 | follows: | 8625 | follows:: |
8908 | :: | ||
8909 | 8626 | ||
8910 | poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0 | 8627 | poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0 |
8911 | 8628 | ||
diff --git a/documentation/sdk-manual/appendix-customizing.rst b/documentation/sdk-manual/appendix-customizing.rst index 8e7115046b..fb2d78452b 100644 --- a/documentation/sdk-manual/appendix-customizing.rst +++ b/documentation/sdk-manual/appendix-customizing.rst | |||
@@ -149,8 +149,7 @@ from the :term:`DISTRO` variable. | |||
149 | The | 149 | The |
150 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` | 150 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` |
151 | class defines the default value of the ``SDK_TITLE`` variable as | 151 | class defines the default value of the ``SDK_TITLE`` variable as |
152 | follows: | 152 | follows:: |
153 | :: | ||
154 | 153 | ||
155 | SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" | 154 | SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" |
156 | 155 | ||
@@ -162,8 +161,7 @@ an example, assume you have your own layer for your distribution named | |||
162 | does the default "poky" distribution. If so, you could update the | 161 | does the default "poky" distribution. If so, you could update the |
163 | ``SDK_TITLE`` variable in the | 162 | ``SDK_TITLE`` variable in the |
164 | ``~/meta-mydistro/conf/distro/mydistro.conf`` file using the following | 163 | ``~/meta-mydistro/conf/distro/mydistro.conf`` file using the following |
165 | form: | 164 | form:: |
166 | :: | ||
167 | 165 | ||
168 | SDK_TITLE = "your_title" | 166 | SDK_TITLE = "your_title" |
169 | 167 | ||
@@ -194,8 +192,7 @@ the installed SDKs to update the installed SDKs by using the | |||
194 | 3. Build the extensible SDK normally (i.e., use the | 192 | 3. Build the extensible SDK normally (i.e., use the |
195 | ``bitbake -c populate_sdk_ext`` imagename command). | 193 | ``bitbake -c populate_sdk_ext`` imagename command). |
196 | 194 | ||
197 | 4. Publish the SDK using the following command: | 195 | 4. Publish the SDK using the following command:: |
198 | :: | ||
199 | 196 | ||
200 | $ oe-publish-sdk some_path/sdk-installer.sh path_to_shared_http_directory | 197 | $ oe-publish-sdk some_path/sdk-installer.sh path_to_shared_http_directory |
201 | 198 | ||
@@ -218,8 +215,7 @@ installation directory for the SDK is based on the | |||
218 | :term:`SDKEXTPATH` variables from | 215 | :term:`SDKEXTPATH` variables from |
219 | within the | 216 | within the |
220 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` | 217 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` |
221 | class as follows: | 218 | class as follows:: |
222 | :: | ||
223 | 219 | ||
224 | SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" | 220 | SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" |
225 | 221 | ||
@@ -236,8 +232,7 @@ assume you have your own layer for your distribution named | |||
236 | does the default "poky" distribution. If so, you could update the | 232 | does the default "poky" distribution. If so, you could update the |
237 | ``SDKEXTPATH`` variable in the | 233 | ``SDKEXTPATH`` variable in the |
238 | ``~/meta-mydistro/conf/distro/mydistro.conf`` file using the following | 234 | ``~/meta-mydistro/conf/distro/mydistro.conf`` file using the following |
239 | form: | 235 | form:: |
240 | :: | ||
241 | 236 | ||
242 | SDKEXTPATH = "some_path_for_your_installed_sdk" | 237 | SDKEXTPATH = "some_path_for_your_installed_sdk" |
243 | 238 | ||
@@ -272,8 +267,7 @@ source, you need to do a number of things: | |||
272 | 267 | ||
273 | 3. Set the appropriate configuration so that the produced SDK knows how | 268 | 3. Set the appropriate configuration so that the produced SDK knows how |
274 | to find the configuration. The variable you need to set is | 269 | to find the configuration. The variable you need to set is |
275 | :term:`SSTATE_MIRRORS`: | 270 | :term:`SSTATE_MIRRORS`:: |
276 | :: | ||
277 | 271 | ||
278 | SSTATE_MIRRORS = "file://.* http://example.com/some_path/sstate-cache/PATH" | 272 | SSTATE_MIRRORS = "file://.* http://example.com/some_path/sstate-cache/PATH" |
279 | 273 | ||
@@ -287,8 +281,7 @@ source, you need to do a number of things: | |||
287 | side, and its contents will not interfere with the build), then | 281 | side, and its contents will not interfere with the build), then |
288 | you can set the variable in your ``local.conf`` or custom distro | 282 | you can set the variable in your ``local.conf`` or custom distro |
289 | configuration file. You can then "whitelist" the variable through | 283 | configuration file. You can then "whitelist" the variable through |
290 | to the SDK by adding the following: | 284 | to the SDK by adding the following:: |
291 | :: | ||
292 | 285 | ||
293 | SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS" | 286 | SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS" |
294 | 287 | ||
@@ -313,8 +306,7 @@ everything needed to reconstruct the image for which the SDK was built. | |||
313 | This bundling can lead to an SDK installer file that is a Gigabyte or | 306 | This bundling can lead to an SDK installer file that is a Gigabyte or |
314 | more in size. If the size of this file causes a problem, you can build | 307 | more in size. If the size of this file causes a problem, you can build |
315 | an SDK that has just enough in it to install and provide access to the | 308 | an SDK that has just enough in it to install and provide access to the |
316 | ``devtool command`` by setting the following in your configuration: | 309 | ``devtool command`` by setting the following in your configuration:: |
317 | :: | ||
318 | 310 | ||
319 | SDK_EXT_TYPE = "minimal" | 311 | SDK_EXT_TYPE = "minimal" |
320 | 312 | ||
@@ -336,8 +328,7 @@ information enables the ``devtool search`` command to return useful | |||
336 | results. | 328 | results. |
337 | 329 | ||
338 | To facilitate this wider range of information, you would need to set the | 330 | To facilitate this wider range of information, you would need to set the |
339 | following: | 331 | following:: |
340 | :: | ||
341 | 332 | ||
342 | SDK_INCLUDE_PKGDATA = "1" | 333 | SDK_INCLUDE_PKGDATA = "1" |
343 | 334 | ||
diff --git a/documentation/sdk-manual/appendix-obtain.rst b/documentation/sdk-manual/appendix-obtain.rst index 3c1dc52d19..0ce828aa29 100644 --- a/documentation/sdk-manual/appendix-obtain.rst +++ b/documentation/sdk-manual/appendix-obtain.rst | |||
@@ -25,8 +25,7 @@ Follow these steps to locate and hand-install the toolchain: | |||
25 | download the installer appropriate for your build host, target | 25 | download the installer appropriate for your build host, target |
26 | hardware, and image type. | 26 | hardware, and image type. |
27 | 27 | ||
28 | The installer files (``*.sh``) follow this naming convention: | 28 | The installer files (``*.sh``) follow this naming convention:: |
29 | :: | ||
30 | 29 | ||
31 | poky-glibc-host_system-core-image-type-arch-toolchain[-ext]-release.sh | 30 | poky-glibc-host_system-core-image-type-arch-toolchain[-ext]-release.sh |
32 | 31 | ||
@@ -55,15 +54,13 @@ Follow these steps to locate and hand-install the toolchain: | |||
55 | 54 | ||
56 | For example, if your build host is a 64-bit x86 system and you need | 55 | For example, if your build host is a 64-bit x86 system and you need |
57 | an extended SDK for a 64-bit core2 target, go into the ``x86_64`` | 56 | an extended SDK for a 64-bit core2 target, go into the ``x86_64`` |
58 | folder and download the following installer: | 57 | folder and download the following installer:: |
59 | :: | ||
60 | 58 | ||
61 | poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh | 59 | poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh |
62 | 60 | ||
63 | 4. *Run the Installer:* Be sure you have execution privileges and run | 61 | 4. *Run the Installer:* Be sure you have execution privileges and run |
64 | the installer. Following is an example from the ``Downloads`` | 62 | the installer. Following is an example from the ``Downloads`` |
65 | directory: | 63 | directory:: |
66 | :: | ||
67 | 64 | ||
68 | $ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh | 65 | $ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh |
69 | 66 | ||
@@ -132,8 +129,7 @@ build the SDK installer. Follow these steps: | |||
132 | using to build the installer. If | 129 | using to build the installer. If |
133 | SDKMACHINE | 130 | SDKMACHINE |
134 | is not set appropriately, the build fails and provides an error | 131 | is not set appropriately, the build fails and provides an error |
135 | message similar to the following: | 132 | message similar to the following:: |
136 | :: | ||
137 | 133 | ||
138 | The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is | 134 | The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is |
139 | set to i686 (likely via setting SDKMACHINE) which is different from the architecture of the build machine (x86_64). | 135 | set to i686 (likely via setting SDKMACHINE) which is different from the architecture of the build machine (x86_64). |
@@ -144,8 +140,7 @@ build the SDK installer. Follow these steps: | |||
144 | SDK and populate the SDK image, use the following command form. Be | 140 | SDK and populate the SDK image, use the following command form. Be |
145 | sure to replace image with an image (e.g. "core-image-sato"): $ | 141 | sure to replace image with an image (e.g. "core-image-sato"): $ |
146 | bitbake image -c populate_sdk You can do the same for the extensible | 142 | bitbake image -c populate_sdk You can do the same for the extensible |
147 | SDK using this command form: | 143 | SDK using this command form:: |
148 | :: | ||
149 | 144 | ||
150 | $ bitbake image -c populate_sdk_ext | 145 | $ bitbake image -c populate_sdk_ext |
151 | 146 | ||
@@ -170,8 +165,7 @@ build the SDK installer. Follow these steps: | |||
170 | libc-staticdev" | 165 | libc-staticdev" |
171 | 166 | ||
172 | 7. *Run the Installer:* You can now run the SDK installer from | 167 | 7. *Run the Installer:* You can now run the SDK installer from |
173 | ``tmp/deploy/sdk`` in the Build Directory. Following is an example: | 168 | ``tmp/deploy/sdk`` in the Build Directory. Following is an example:: |
174 | :: | ||
175 | 169 | ||
176 | $ cd poky/build/tmp/deploy/sdk | 170 | $ cd poky/build/tmp/deploy/sdk |
177 | $ ./poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh | 171 | $ ./poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh |
@@ -211,8 +205,7 @@ Follow these steps to extract the root filesystem: | |||
211 | which you can use with QEMU directly. | 205 | which you can use with QEMU directly. |
212 | 206 | ||
213 | The pre-built root filesystem image files follow these naming | 207 | The pre-built root filesystem image files follow these naming |
214 | conventions: | 208 | conventions:: |
215 | :: | ||
216 | 209 | ||
217 | core-image-profile-arch.tar.bz2 | 210 | core-image-profile-arch.tar.bz2 |
218 | 211 | ||
@@ -233,8 +226,7 @@ Follow these steps to extract the root filesystem: | |||
233 | 226 | ||
234 | For example, if you plan on using a BeagleBone device as your target | 227 | For example, if you plan on using a BeagleBone device as your target |
235 | hardware and your image is a ``core-image-sato-sdk`` image, you can | 228 | hardware and your image is a ``core-image-sato-sdk`` image, you can |
236 | download the following file: | 229 | download the following file:: |
237 | :: | ||
238 | 230 | ||
239 | core-image-sato-sdk-beaglebone-yocto.tar.bz2 | 231 | core-image-sato-sdk-beaglebone-yocto.tar.bz2 |
240 | 232 | ||
@@ -246,8 +238,7 @@ Follow these steps to extract the root filesystem: | |||
246 | installed the toolchain (e.g. ``poky_sdk``). | 238 | installed the toolchain (e.g. ``poky_sdk``). |
247 | 239 | ||
248 | Following is an example based on the toolchain installed in the | 240 | Following is an example based on the toolchain installed in the |
249 | ":ref:`sdk-manual/appendix-obtain:locating pre-built sdk installers`" section: | 241 | ":ref:`sdk-manual/appendix-obtain:locating pre-built sdk installers`" section:: |
250 | :: | ||
251 | 242 | ||
252 | $ source poky_sdk/environment-setup-core2-64-poky-linux | 243 | $ source poky_sdk/environment-setup-core2-64-poky-linux |
253 | 244 | ||
@@ -258,8 +249,7 @@ Follow these steps to extract the root filesystem: | |||
258 | from a previously built root filesystem image that was downloaded | 249 | from a previously built root filesystem image that was downloaded |
259 | from the :yocto_dl:`Index of Releases </releases/yocto/yocto-&DISTRO;/machines/>`. | 250 | from the :yocto_dl:`Index of Releases </releases/yocto/yocto-&DISTRO;/machines/>`. |
260 | This command extracts the root filesystem into the ``core2-64-sato`` | 251 | This command extracts the root filesystem into the ``core2-64-sato`` |
261 | directory: | 252 | directory:: |
262 | :: | ||
263 | 253 | ||
264 | $ runqemu-extract-sdk ~/Downloads/core-image-sato-sdk-beaglebone-yocto.tar.bz2 ~/beaglebone-sato | 254 | $ runqemu-extract-sdk ~/Downloads/core-image-sato-sdk-beaglebone-yocto.tar.bz2 ~/beaglebone-sato |
265 | 255 | ||
diff --git a/documentation/sdk-manual/extensible.rst b/documentation/sdk-manual/extensible.rst index baa432ef3b..04bafaed9e 100644 --- a/documentation/sdk-manual/extensible.rst +++ b/documentation/sdk-manual/extensible.rst | |||
@@ -59,8 +59,7 @@ The names of the tarball installer scripts are such that a string | |||
59 | representing the host system appears first in the filename and then is | 59 | representing the host system appears first in the filename and then is |
60 | immediately followed by a string representing the target architecture. | 60 | immediately followed by a string representing the target architecture. |
61 | An extensible SDK has the string "-ext" as part of the name. Following | 61 | An extensible SDK has the string "-ext" as part of the name. Following |
62 | is the general form: | 62 | is the general form:: |
63 | :: | ||
64 | 63 | ||
65 | poky-glibc-host_system-image_type-arch-toolchain-ext-release_version.sh | 64 | poky-glibc-host_system-image_type-arch-toolchain-ext-release_version.sh |
66 | 65 | ||
@@ -83,8 +82,7 @@ is the general form: | |||
83 | 82 | ||
84 | For example, the following SDK installer is for a 64-bit | 83 | For example, the following SDK installer is for a 64-bit |
85 | development host system and a i586-tuned target architecture based off | 84 | development host system and a i586-tuned target architecture based off |
86 | the SDK for ``core-image-sato`` and using the current &DISTRO; snapshot: | 85 | the SDK for ``core-image-sato`` and using the current &DISTRO; snapshot:: |
87 | :: | ||
88 | 86 | ||
89 | poky-glibc-x86_64-core-image-sato-i586-toolchain-ext-&DISTRO;.sh | 87 | poky-glibc-x86_64-core-image-sato-i586-toolchain-ext-&DISTRO;.sh |
90 | 88 | ||
@@ -150,8 +148,7 @@ begin with the string "``environment-setup``" and include as part of | |||
150 | their name the tuned target architecture. As an example, the following | 148 | their name the tuned target architecture. As an example, the following |
151 | commands set the working directory to where the SDK was installed and | 149 | commands set the working directory to where the SDK was installed and |
152 | then source the environment setup script. In this example, the setup | 150 | then source the environment setup script. In this example, the setup |
153 | script is for an IA-based target machine using i586 tuning: | 151 | script is for an IA-based target machine using i586 tuning:: |
154 | :: | ||
155 | 152 | ||
156 | $ cd /home/scottrif/poky_sdk | 153 | $ cd /home/scottrif/poky_sdk |
157 | $ source environment-setup-core2-64-poky-linux | 154 | $ source environment-setup-core2-64-poky-linux |
@@ -258,8 +255,7 @@ command: | |||
258 | to be extracted. In this situation, the source code is extracted | 255 | to be extracted. In this situation, the source code is extracted |
259 | to the default workspace - you do not want the files in some | 256 | to the default workspace - you do not want the files in some |
260 | specific location outside of the workspace. Thus, everything you | 257 | specific location outside of the workspace. Thus, everything you |
261 | need will be located in the workspace: | 258 | need will be located in the workspace:: |
262 | :: | ||
263 | 259 | ||
264 | $ devtool add recipe fetchuri | 260 | $ devtool add recipe fetchuri |
265 | 261 | ||
@@ -283,8 +279,7 @@ command: | |||
283 | Furthermore, the first positional argument srctree in this case | 279 | Furthermore, the first positional argument srctree in this case |
284 | identifies where the ``devtool add`` command will locate the | 280 | identifies where the ``devtool add`` command will locate the |
285 | extracted code outside of the workspace. You need to specify an | 281 | extracted code outside of the workspace. You need to specify an |
286 | empty directory: | 282 | empty directory:: |
287 | :: | ||
288 | 283 | ||
289 | $ devtool add recipe srctree fetchuri | 284 | $ devtool add recipe srctree fetchuri |
290 | 285 | ||
@@ -300,8 +295,7 @@ command: | |||
300 | ``devtool`` workspace. | 295 | ``devtool`` workspace. |
301 | 296 | ||
302 | The following command provides a new recipe name and identifies | 297 | The following command provides a new recipe name and identifies |
303 | the existing source tree location: | 298 | the existing source tree location:: |
304 | :: | ||
305 | 299 | ||
306 | $ devtool add recipe srctree | 300 | $ devtool add recipe srctree |
307 | 301 | ||
@@ -317,8 +311,7 @@ command: | |||
317 | 311 | ||
318 | 2. *Edit the Recipe*: You can use ``devtool edit-recipe`` to open up the | 312 | 2. *Edit the Recipe*: You can use ``devtool edit-recipe`` to open up the |
319 | editor as defined by the ``$EDITOR`` environment variable and modify | 313 | editor as defined by the ``$EDITOR`` environment variable and modify |
320 | the file: | 314 | the file:: |
321 | :: | ||
322 | 315 | ||
323 | $ devtool edit-recipe recipe | 316 | $ devtool edit-recipe recipe |
324 | 317 | ||
@@ -338,8 +331,7 @@ command: | |||
338 | On the other hand, if you want an image to contain the recipe's | 331 | On the other hand, if you want an image to contain the recipe's |
339 | packages from the workspace for immediate deployment onto a device | 332 | packages from the workspace for immediate deployment onto a device |
340 | (e.g. for testing purposes), you can use the ``devtool build-image`` | 333 | (e.g. for testing purposes), you can use the ``devtool build-image`` |
341 | command: | 334 | command:: |
342 | :: | ||
343 | 335 | ||
344 | $ devtool build-image image | 336 | $ devtool build-image image |
345 | 337 | ||
@@ -435,8 +427,7 @@ command: | |||
435 | outside the workspace (i.e. ``meta-``\ layername). | 427 | outside the workspace (i.e. ``meta-``\ layername). |
436 | 428 | ||
437 | The following command identifies the recipe and, by default, | 429 | The following command identifies the recipe and, by default, |
438 | extracts the source files: | 430 | extracts the source files:: |
439 | :: | ||
440 | 431 | ||
441 | $ devtool modify recipe | 432 | $ devtool modify recipe |
442 | 433 | ||
@@ -474,8 +465,7 @@ command: | |||
474 | The following command tells ``devtool`` the recipe with which to | 465 | The following command tells ``devtool`` the recipe with which to |
475 | work and, in this case, identifies a local area for the extracted | 466 | work and, in this case, identifies a local area for the extracted |
476 | source files that exists outside of the default ``devtool`` | 467 | source files that exists outside of the default ``devtool`` |
477 | workspace: | 468 | workspace:: |
478 | :: | ||
479 | 469 | ||
480 | $ devtool modify recipe srctree | 470 | $ devtool modify recipe srctree |
481 | 471 | ||
@@ -508,8 +498,7 @@ command: | |||
508 | The following command tells ``devtool`` the recipe with which to | 498 | The following command tells ``devtool`` the recipe with which to |
509 | work, uses the "-n" option to indicate source does not need to be | 499 | work, uses the "-n" option to indicate source does not need to be |
510 | extracted, and uses srctree to point to the previously extracted | 500 | extracted, and uses srctree to point to the previously extracted |
511 | source files: | 501 | source files:: |
512 | :: | ||
513 | 502 | ||
514 | $ devtool modify -n recipe srctree | 503 | $ devtool modify -n recipe srctree |
515 | 504 | ||
@@ -532,8 +521,7 @@ command: | |||
532 | depends on what you are going to do with the new code. | 521 | depends on what you are going to do with the new code. |
533 | 522 | ||
534 | If you need to eventually move the build output to the target | 523 | If you need to eventually move the build output to the target |
535 | hardware, use the following ``devtool`` command: | 524 | hardware, use the following ``devtool`` command:: |
536 | :: | ||
537 | 525 | ||
538 | $ devtool build recipe | 526 | $ devtool build recipe |
539 | 527 | ||
@@ -556,8 +544,7 @@ command: | |||
556 | development machine. | 544 | development machine. |
557 | 545 | ||
558 | You can deploy your build output to that target hardware by using the | 546 | You can deploy your build output to that target hardware by using the |
559 | ``devtool deploy-target`` command: | 547 | ``devtool deploy-target`` command:: |
560 | :: | ||
561 | 548 | ||
562 | $ devtool deploy-target recipe target | 549 | $ devtool deploy-target recipe target |
563 | 550 | ||
@@ -651,8 +638,7 @@ The following diagram shows the common development flow used with the | |||
651 | A common situation is where third-party software has undergone a | 638 | A common situation is where third-party software has undergone a |
652 | revision so that it has been upgraded. The recipe you have access to | 639 | revision so that it has been upgraded. The recipe you have access to |
653 | is likely in your own layer. Thus, you need to upgrade the recipe to | 640 | is likely in your own layer. Thus, you need to upgrade the recipe to |
654 | use the newer version of the software: | 641 | use the newer version of the software:: |
655 | :: | ||
656 | 642 | ||
657 | $ devtool upgrade -V version recipe | 643 | $ devtool upgrade -V version recipe |
658 | 644 | ||
@@ -703,16 +689,14 @@ The following diagram shows the common development flow used with the | |||
703 | depends on what you are going to do with the new code. | 689 | depends on what you are going to do with the new code. |
704 | 690 | ||
705 | If you need to eventually move the build output to the target | 691 | If you need to eventually move the build output to the target |
706 | hardware, use the following ``devtool`` command: | 692 | hardware, use the following ``devtool`` command:: |
707 | :: | ||
708 | 693 | ||
709 | $ devtool build recipe | 694 | $ devtool build recipe |
710 | 695 | ||
711 | On the other hand, if you want an image to contain the recipe's | 696 | On the other hand, if you want an image to contain the recipe's |
712 | packages from the workspace for immediate deployment onto a device | 697 | packages from the workspace for immediate deployment onto a device |
713 | (e.g. for testing purposes), you can use the ``devtool build-image`` | 698 | (e.g. for testing purposes), you can use the ``devtool build-image`` |
714 | command: | 699 | command:: |
715 | :: | ||
716 | 700 | ||
717 | $ devtool build-image image | 701 | $ devtool build-image image |
718 | 702 | ||
@@ -828,8 +812,7 @@ name and version, just the name, or just the version as part of the | |||
828 | command line. | 812 | command line. |
829 | 813 | ||
830 | Sometimes the name or version determined from the source tree might be | 814 | Sometimes the name or version determined from the source tree might be |
831 | incorrect. For such a case, you must reset the recipe: | 815 | incorrect. For such a case, you must reset the recipe:: |
832 | :: | ||
833 | 816 | ||
834 | $ devtool reset -n recipename | 817 | $ devtool reset -n recipename |
835 | 818 | ||
@@ -853,8 +836,7 @@ the ``DEPENDS`` variable in the original recipe to include the new | |||
853 | recipe. | 836 | recipe. |
854 | 837 | ||
855 | If you need to add runtime dependencies, you can do so by adding the | 838 | If you need to add runtime dependencies, you can do so by adding the |
856 | following to your recipe: | 839 | following to your recipe:: |
857 | :: | ||
858 | 840 | ||
859 | RDEPENDS_${PN} += "dependency1 dependency2 ..." | 841 | RDEPENDS_${PN} += "dependency1 dependency2 ..." |
860 | 842 | ||
@@ -938,8 +920,7 @@ mind: | |||
938 | the command line, add the variable setting to | 920 | the command line, add the variable setting to |
939 | :term:`EXTRA_OEMAKE` or | 921 | :term:`EXTRA_OEMAKE` or |
940 | :term:`PACKAGECONFIG_CONFARGS` | 922 | :term:`PACKAGECONFIG_CONFARGS` |
941 | within the recipe. Here is an example using ``EXTRA_OEMAKE``: | 923 | within the recipe. Here is an example using ``EXTRA_OEMAKE``:: |
942 | :: | ||
943 | 924 | ||
944 | EXTRA_OEMAKE += "'CC=${CC}' 'CXX=${CXX}'" | 925 | EXTRA_OEMAKE += "'CC=${CC}' 'CXX=${CXX}'" |
945 | 926 | ||
@@ -993,8 +974,7 @@ You can use the ``devtool add`` command two different ways to add | |||
993 | Node.js modules: 1) Through ``npm`` and, 2) from a repository or local | 974 | Node.js modules: 1) Through ``npm`` and, 2) from a repository or local |
994 | source. | 975 | source. |
995 | 976 | ||
996 | Use the following form to add Node.js modules through ``npm``: | 977 | Use the following form to add Node.js modules through ``npm``:: |
997 | :: | ||
998 | 978 | ||
999 | $ devtool add "npm://registry.npmjs.org;name=forever;version=0.15.1" | 979 | $ devtool add "npm://registry.npmjs.org;name=forever;version=0.15.1" |
1000 | 980 | ||
@@ -1018,8 +998,7 @@ these behaviors ensure the reproducibility and integrity of the build. | |||
1018 | 998 | ||
1019 | As mentioned earlier, you can also add Node.js modules directly from a | 999 | As mentioned earlier, you can also add Node.js modules directly from a |
1020 | repository or local source tree. To add modules this way, use | 1000 | repository or local source tree. To add modules this way, use |
1021 | ``devtool add`` in the following form: | 1001 | ``devtool add`` in the following form:: |
1022 | :: | ||
1023 | 1002 | ||
1024 | $ devtool add https://github.com/diversario/node-ssdp | 1003 | $ devtool add https://github.com/diversario/node-ssdp |
1025 | 1004 | ||
@@ -1196,15 +1175,13 @@ need to restore the original files that existed prior to running the | |||
1196 | ``devtool deploy-target`` command. Because the ``devtool deploy-target`` | 1175 | ``devtool deploy-target`` command. Because the ``devtool deploy-target`` |
1197 | command backs up any files it overwrites, you can use the | 1176 | command backs up any files it overwrites, you can use the |
1198 | ``devtool undeploy-target`` command to restore those files and remove | 1177 | ``devtool undeploy-target`` command to restore those files and remove |
1199 | any other files the recipe deployed. Consider the following example: | 1178 | any other files the recipe deployed. Consider the following example:: |
1200 | :: | ||
1201 | 1179 | ||
1202 | $ devtool undeploy-target lighttpd root@192.168.7.2 | 1180 | $ devtool undeploy-target lighttpd root@192.168.7.2 |
1203 | 1181 | ||
1204 | If you have deployed | 1182 | If you have deployed |
1205 | multiple applications, you can remove them all using the "-a" option | 1183 | multiple applications, you can remove them all using the "-a" option |
1206 | thus restoring the target device to its original state: | 1184 | thus restoring the target device to its original state:: |
1207 | :: | ||
1208 | 1185 | ||
1209 | $ devtool undeploy-target -a root@192.168.7.2 | 1186 | $ devtool undeploy-target -a root@192.168.7.2 |
1210 | 1187 | ||
@@ -1235,22 +1212,19 @@ populated on-demand. Sometimes you must explicitly install extra items | |||
1235 | into the SDK. If you need these extra items, you can first search for | 1212 | into the SDK. If you need these extra items, you can first search for |
1236 | the items using the ``devtool search`` command. For example, suppose you | 1213 | the items using the ``devtool search`` command. For example, suppose you |
1237 | need to link to libGL but you are not sure which recipe provides libGL. | 1214 | need to link to libGL but you are not sure which recipe provides libGL. |
1238 | You can use the following command to find out: | 1215 | You can use the following command to find out:: |
1239 | :: | ||
1240 | 1216 | ||
1241 | $ devtool search libGL mesa | 1217 | $ devtool search libGL mesa |
1242 | 1218 | ||
1243 | A free implementation of the OpenGL API Once you know the recipe | 1219 | A free implementation of the OpenGL API Once you know the recipe |
1244 | (i.e. ``mesa`` in this example), you can install it: | 1220 | (i.e. ``mesa`` in this example), you can install it:: |
1245 | :: | ||
1246 | 1221 | ||
1247 | $ devtool sdk-install mesa | 1222 | $ devtool sdk-install mesa |
1248 | 1223 | ||
1249 | By default, the ``devtool sdk-install`` command assumes | 1224 | By default, the ``devtool sdk-install`` command assumes |
1250 | the item is available in pre-built form from your SDK provider. If the | 1225 | the item is available in pre-built form from your SDK provider. If the |
1251 | item is not available and it is acceptable to build the item from | 1226 | item is not available and it is acceptable to build the item from |
1252 | source, you can add the "-s" option as follows: | 1227 | source, you can add the "-s" option as follows:: |
1253 | :: | ||
1254 | 1228 | ||
1255 | $ devtool sdk-install -s mesa | 1229 | $ devtool sdk-install -s mesa |
1256 | 1230 | ||
@@ -1266,8 +1240,7 @@ If you are working with an installed extensible SDK that gets | |||
1266 | occasionally updated (e.g. a third-party SDK), then you will need to | 1240 | occasionally updated (e.g. a third-party SDK), then you will need to |
1267 | manually "pull down" the updates into the installed SDK. | 1241 | manually "pull down" the updates into the installed SDK. |
1268 | 1242 | ||
1269 | To update your installed SDK, use ``devtool`` as follows: | 1243 | To update your installed SDK, use ``devtool`` as follows:: |
1270 | :: | ||
1271 | 1244 | ||
1272 | $ devtool sdk-update | 1245 | $ devtool sdk-update |
1273 | 1246 | ||
diff --git a/documentation/sdk-manual/using.rst b/documentation/sdk-manual/using.rst index 62967f5572..fa0e8d4098 100644 --- a/documentation/sdk-manual/using.rst +++ b/documentation/sdk-manual/using.rst | |||
@@ -77,8 +77,7 @@ immediately followed by a string representing the target architecture. | |||
77 | 77 | ||
78 | For example, the following SDK installer is for a 64-bit | 78 | For example, the following SDK installer is for a 64-bit |
79 | development host system and a i586-tuned target architecture based off | 79 | development host system and a i586-tuned target architecture based off |
80 | the SDK for ``core-image-sato`` and using the current DISTRO snapshot: | 80 | the SDK for ``core-image-sato`` and using the current DISTRO snapshot:: |
81 | :: | ||
82 | 81 | ||
83 | poky-glibc-x86_64-core-image-sato-i586-toolchain-DISTRO.sh | 82 | poky-glibc-x86_64-core-image-sato-i586-toolchain-DISTRO.sh |
84 | 83 | ||
@@ -141,8 +140,7 @@ begin with the string "``environment-setup``" and include as part of | |||
141 | their name the tuned target architecture. As an example, the following | 140 | their name the tuned target architecture. As an example, the following |
142 | commands set the working directory to where the SDK was installed and | 141 | commands set the working directory to where the SDK was installed and |
143 | then source the environment setup script. In this example, the setup | 142 | then source the environment setup script. In this example, the setup |
144 | script is for an IA-based target machine using i586 tuning: | 143 | script is for an IA-based target machine using i586 tuning:: |
145 | :: | ||
146 | 144 | ||
147 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux | 145 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux |
148 | 146 | ||
diff --git a/documentation/sdk-manual/working-projects.rst b/documentation/sdk-manual/working-projects.rst index f880cbe0d5..ad84ce2b87 100644 --- a/documentation/sdk-manual/working-projects.rst +++ b/documentation/sdk-manual/working-projects.rst | |||
@@ -45,16 +45,14 @@ project: | |||
45 | respectively. | 45 | respectively. |
46 | 46 | ||
47 | Use the following command to create an empty README file, which is | 47 | Use the following command to create an empty README file, which is |
48 | required by GNU Coding Standards: | 48 | required by GNU Coding Standards:: |
49 | :: | ||
50 | 49 | ||
51 | $ touch README | 50 | $ touch README |
52 | 51 | ||
53 | Create the remaining | 52 | Create the remaining |
54 | three files as follows: | 53 | three files as follows: |
55 | 54 | ||
56 | - ``hello.c``: | 55 | - ``hello.c``:: |
57 | :: | ||
58 | 56 | ||
59 | #include <stdio.h> | 57 | #include <stdio.h> |
60 | 58 | ||
@@ -63,8 +61,7 @@ project: | |||
63 | printf("Hello World!\n"); | 61 | printf("Hello World!\n"); |
64 | } | 62 | } |
65 | 63 | ||
66 | - ``configure.ac``: | 64 | - ``configure.ac``:: |
67 | :: | ||
68 | 65 | ||
69 | AC_INIT(hello,0.1) | 66 | AC_INIT(hello,0.1) |
70 | AM_INIT_AUTOMAKE([foreign]) | 67 | AM_INIT_AUTOMAKE([foreign]) |
@@ -72,8 +69,7 @@ project: | |||
72 | AC_CONFIG_FILES(Makefile) | 69 | AC_CONFIG_FILES(Makefile) |
73 | AC_OUTPUT | 70 | AC_OUTPUT |
74 | 71 | ||
75 | - ``Makefile.am``: | 72 | - ``Makefile.am``:: |
76 | :: | ||
77 | 73 | ||
78 | bin_PROGRAMS = hello | 74 | bin_PROGRAMS = hello |
79 | hello_SOURCES = hello.c | 75 | hello_SOURCES = hello.c |
@@ -87,8 +83,7 @@ project: | |||
87 | which is followed by the string "poky-linux". For this example, the | 83 | which is followed by the string "poky-linux". For this example, the |
88 | command sources a script from the default SDK installation directory | 84 | command sources a script from the default SDK installation directory |
89 | that uses the 32-bit Intel x86 Architecture and the &DISTRO; Yocto | 85 | that uses the 32-bit Intel x86 Architecture and the &DISTRO; Yocto |
90 | Project release: | 86 | Project release:: |
91 | :: | ||
92 | 87 | ||
93 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux | 88 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux |
94 | 89 | ||
@@ -113,8 +108,7 @@ project: | |||
113 | the cross-compiler. The | 108 | the cross-compiler. The |
114 | :term:`CONFIGURE_FLAGS` | 109 | :term:`CONFIGURE_FLAGS` |
115 | environment variable provides the minimal arguments for GNU | 110 | environment variable provides the minimal arguments for GNU |
116 | configure: | 111 | configure:: |
117 | :: | ||
118 | 112 | ||
119 | $ ./configure ${CONFIGURE_FLAGS} | 113 | $ ./configure ${CONFIGURE_FLAGS} |
120 | 114 | ||
@@ -127,14 +121,12 @@ project: | |||
127 | ``armv5te-poky-linux-gnueabi``. You will notice that the name of the | 121 | ``armv5te-poky-linux-gnueabi``. You will notice that the name of the |
128 | script is ``environment-setup-armv5te-poky-linux-gnueabi``. Thus, the | 122 | script is ``environment-setup-armv5te-poky-linux-gnueabi``. Thus, the |
129 | following command works to update your project and rebuild it using | 123 | following command works to update your project and rebuild it using |
130 | the appropriate cross-toolchain tools: | 124 | the appropriate cross-toolchain tools:: |
131 | :: | ||
132 | 125 | ||
133 | $ ./configure --host=armv5te-poky-linux-gnueabi --with-libtool-sysroot=sysroot_dir | 126 | $ ./configure --host=armv5te-poky-linux-gnueabi --with-libtool-sysroot=sysroot_dir |
134 | 127 | ||
135 | 5. *Make and Install the Project:* These two commands generate and | 128 | 5. *Make and Install the Project:* These two commands generate and |
136 | install the project into the destination directory: | 129 | install the project into the destination directory:: |
137 | :: | ||
138 | 130 | ||
139 | $ make | 131 | $ make |
140 | $ make install DESTDIR=./tmp | 132 | $ make install DESTDIR=./tmp |
@@ -157,8 +149,7 @@ project: | |||
157 | 149 | ||
158 | 6. *Execute Your Project:* To execute the project, you would need to run | 150 | 6. *Execute Your Project:* To execute the project, you would need to run |
159 | it on your target hardware. If your target hardware happens to be | 151 | it on your target hardware. If your target hardware happens to be |
160 | your build host, you could run the project as follows: | 152 | your build host, you could run the project as follows:: |
161 | :: | ||
162 | 153 | ||
163 | $ ./tmp/usr/local/bin/hello | 154 | $ ./tmp/usr/local/bin/hello |
164 | 155 | ||
@@ -203,8 +194,7 @@ regarding variable behavior: | |||
203 | .. note:: | 194 | .. note:: |
204 | 195 | ||
205 | Regardless of how you set your variables, if you use the "-e" option | 196 | Regardless of how you set your variables, if you use the "-e" option |
206 | with ``make``, the variables from the SDK setup script take precedence: | 197 | with ``make``, the variables from the SDK setup script take precedence:: |
207 | :: | ||
208 | 198 | ||
209 | $ make -e target | 199 | $ make -e target |
210 | 200 | ||
@@ -226,8 +216,7 @@ Running the | |||
226 | SDK setup script for a 64-bit build host and an i586-tuned target | 216 | SDK setup script for a 64-bit build host and an i586-tuned target |
227 | architecture for a ``core-image-sato`` image using the current &DISTRO; | 217 | architecture for a ``core-image-sato`` image using the current &DISTRO; |
228 | Yocto Project release and then echoing that variable shows the value | 218 | Yocto Project release and then echoing that variable shows the value |
229 | established through the script: | 219 | established through the script:: |
230 | :: | ||
231 | 220 | ||
232 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux | 221 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux |
233 | $ echo ${CC} | 222 | $ echo ${CC} |
@@ -252,8 +241,7 @@ example: | |||
252 | 241 | ||
253 | Create the three files as follows: | 242 | Create the three files as follows: |
254 | 243 | ||
255 | - ``main.c``: | 244 | - ``main.c``:: |
256 | :: | ||
257 | 245 | ||
258 | #include "module.h" | 246 | #include "module.h" |
259 | void sample_func(); | 247 | void sample_func(); |
@@ -263,14 +251,12 @@ example: | |||
263 | return 0; | 251 | return 0; |
264 | } | 252 | } |
265 | 253 | ||
266 | - ``module.h``: | 254 | - ``module.h``:: |
267 | :: | ||
268 | 255 | ||
269 | #include <stdio.h> | 256 | #include <stdio.h> |
270 | void sample_func(); | 257 | void sample_func(); |
271 | 258 | ||
272 | - ``module.c``: | 259 | - ``module.c``:: |
273 | :: | ||
274 | 260 | ||
275 | #include "module.h" | 261 | #include "module.h" |
276 | void sample_func() | 262 | void sample_func() |
@@ -288,8 +274,7 @@ example: | |||
288 | which is followed by the string "poky-linux". For this example, the | 274 | which is followed by the string "poky-linux". For this example, the |
289 | command sources a script from the default SDK installation directory | 275 | command sources a script from the default SDK installation directory |
290 | that uses the 32-bit Intel x86 Architecture and the &DISTRO_NAME; Yocto | 276 | that uses the 32-bit Intel x86 Architecture and the &DISTRO_NAME; Yocto |
291 | Project release: | 277 | Project release:: |
292 | :: | ||
293 | 278 | ||
294 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux | 279 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux |
295 | 280 | ||
@@ -297,8 +282,7 @@ example: | |||
297 | two lines that can be used to set the ``CC`` variable. One line is | 282 | two lines that can be used to set the ``CC`` variable. One line is |
298 | identical to the value that is set when you run the SDK environment | 283 | identical to the value that is set when you run the SDK environment |
299 | setup script, and the other line sets ``CC`` to "gcc", the default | 284 | setup script, and the other line sets ``CC`` to "gcc", the default |
300 | GNU compiler on the build host: | 285 | GNU compiler on the build host:: |
301 | :: | ||
302 | 286 | ||
303 | # CC=i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux | 287 | # CC=i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux |
304 | # CC="gcc" | 288 | # CC="gcc" |
@@ -315,8 +299,7 @@ example: | |||
315 | 4. *Make the Project:* Use the ``make`` command to create the binary | 299 | 4. *Make the Project:* Use the ``make`` command to create the binary |
316 | output file. Because variables are commented out in the Makefile, the | 300 | output file. Because variables are commented out in the Makefile, the |
317 | value used for ``CC`` is the value set when the SDK environment setup | 301 | value used for ``CC`` is the value set when the SDK environment setup |
318 | file was run: | 302 | file was run:: |
319 | :: | ||
320 | 303 | ||
321 | $ make | 304 | $ make |
322 | i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c main.c | 305 | i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c main.c |
@@ -351,8 +334,7 @@ example: | |||
351 | variable as part of the command line. Go into the Makefile and | 334 | variable as part of the command line. Go into the Makefile and |
352 | re-insert the comment character so that running ``make`` uses the | 335 | re-insert the comment character so that running ``make`` uses the |
353 | established SDK compiler. However, when you run ``make``, use a | 336 | established SDK compiler. However, when you run ``make``, use a |
354 | command-line argument to set ``CC`` to "gcc": | 337 | command-line argument to set ``CC`` to "gcc":: |
355 | :: | ||
356 | 338 | ||
357 | $ make clean | 339 | $ make clean |
358 | rm -rf *.o | 340 | rm -rf *.o |
@@ -376,8 +358,7 @@ example: | |||
376 | environment variable. | 358 | environment variable. |
377 | 359 | ||
378 | In this last case, edit Makefile again to use the "gcc" compiler but | 360 | In this last case, edit Makefile again to use the "gcc" compiler but |
379 | then use the "-e" option on the ``make`` command line: | 361 | then use the "-e" option on the ``make`` command line:: |
380 | :: | ||
381 | 362 | ||
382 | $ make clean | 363 | $ make clean |
383 | rm -rf *.o | 364 | rm -rf *.o |
@@ -402,8 +383,7 @@ example: | |||
402 | Makefile. | 383 | Makefile. |
403 | 384 | ||
404 | 5. *Execute Your Project:* To execute the project (i.e. ``target_bin``), | 385 | 5. *Execute Your Project:* To execute the project (i.e. ``target_bin``), |
405 | use the following command: | 386 | use the following command:: |
406 | :: | ||
407 | 387 | ||
408 | $ ./target_bin | 388 | $ ./target_bin |
409 | Hello World! | 389 | Hello World! |