diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-14 13:34:34 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-17 10:09:35 +0100 |
commit | de89b5a0b6ecb9a5b6a3e5a862cf4cee32dc8a94 (patch) | |
tree | 9851be19b42edfb032ff83308d77bd863b11159d /documentation/sdk-manual/sdk-extensible.rst | |
parent | 688e49bb5e6e61b5c0dbbe6b2c3bdf1c5a4bef8d (diff) | |
download | poky-de89b5a0b6ecb9a5b6a3e5a862cf4cee32dc8a94.tar.gz |
sphinx: sdk-manual: Various URL, code block and other fixes to imported data
(From yocto-docs rev: 12f5e9cb36409b813ffef9242ce9a042f08acf69)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/sdk-manual/sdk-extensible.rst')
-rw-r--r-- | documentation/sdk-manual/sdk-extensible.rst | 303 |
1 files changed, 209 insertions, 94 deletions
diff --git a/documentation/sdk-manual/sdk-extensible.rst b/documentation/sdk-manual/sdk-extensible.rst index 5836bd8549..1ad5c46bea 100644 --- a/documentation/sdk-manual/sdk-extensible.rst +++ b/documentation/sdk-manual/sdk-extensible.rst | |||
@@ -45,14 +45,13 @@ functionality. | |||
45 | Installing the Extensible SDK | 45 | Installing the Extensible SDK |
46 | ============================= | 46 | ============================= |
47 | 47 | ||
48 | The first thing you need to do is install the SDK on your `Build | 48 | The first thing you need to do is install the SDK on your :term:`Build |
49 | Host <&YOCTO_DOCS_REF_URL;#hardware-build-system-term>`__ by running the | 49 | Host` by running the ``*.sh`` installation script. |
50 | ``*.sh`` installation script. | ||
51 | 50 | ||
52 | You can download a tarball installer, which includes the pre-built | 51 | You can download a tarball installer, which includes the pre-built |
53 | toolchain, the ``runqemu`` script, the internal build system, | 52 | toolchain, the ``runqemu`` script, the internal build system, |
54 | ``devtool``, and support files from the appropriate | 53 | ``devtool``, and support files from the appropriate |
55 | `toolchain <&YOCTO_TOOLCHAIN_DL_URL;>`__ directory within the Index of | 54 | :yocto_dl:`toolchain <releases/yocto/yocto-3.1.2/toolchain/>` directory within the Index of |
56 | Releases. Toolchains are available for several 32-bit and 64-bit | 55 | Releases. Toolchains are available for several 32-bit and 64-bit |
57 | architectures with the ``x86_64`` directories, respectively. The | 56 | architectures with the ``x86_64`` directories, respectively. The |
58 | toolchains the Yocto Project provides are based off the | 57 | toolchains the Yocto Project provides are based off the |
@@ -64,17 +63,33 @@ representing the host system appears first in the filename and then is | |||
64 | immediately followed by a string representing the target architecture. | 63 | immediately followed by a string representing the target architecture. |
65 | An extensible SDK has the string "-ext" as part of the name. Following | 64 | An extensible SDK has the string "-ext" as part of the name. Following |
66 | is the general form: | 65 | is the general form: |
67 | poky-glibc-host_system-image_type-arch-toolchain-ext-release_version.sh | 66 | :: |
68 | Where: host_system is a string representing your development system: | 67 | |
69 | i686 or x86_64. image_type is the image for which the SDK was built: | 68 | poky-glibc-host_system-image_type-arch-toolchain-ext-release_version.sh |
70 | core-image-sato or core-image-minimal arch is a string representing the | 69 | |
71 | tuned target architecture: aarch64, armv5e, core2-64, i586, mips32r2, | 70 | Where: |
72 | mips64, ppc7400, or cortexa8hf-neon release_version is a string | 71 | host_system is a string representing your development system: |
73 | representing the release number of the Yocto Project: DISTRO, | 72 | |
74 | DISTRO+snapshot For example, the following SDK installer is for a 64-bit | 73 | i686 or x86_64. |
74 | |||
75 | image_type is the image for which the SDK was built: | ||
76 | |||
77 | core-image-sato or core-image-minimal | ||
78 | |||
79 | arch is a string representing the tuned target architecture: | ||
80 | |||
81 | aarch64, armv5e, core2-64, i586, mips32r2, mips64, ppc7400, or cortexa8hf-neon | ||
82 | |||
83 | release_version is a string representing the release number of the Yocto Project: | ||
84 | |||
85 | 3.1.2, 3.1.2+snapshot | ||
86 | |||
87 | For example, the following SDK installer is for a 64-bit | ||
75 | development host system and a i586-tuned target architecture based off | 88 | development host system and a i586-tuned target architecture based off |
76 | the SDK for ``core-image-sato`` and using the current DISTRO snapshot: | 89 | the SDK for ``core-image-sato`` and using the current DISTRO snapshot: |
77 | poky-glibc-x86_64-core-image-sato-i586-toolchain-ext-DISTRO.sh | 90 | :: |
91 | |||
92 | poky-glibc-x86_64-core-image-sato-i586-toolchain-ext-DISTRO.sh | ||
78 | 93 | ||
79 | .. note:: | 94 | .. note:: |
80 | 95 | ||
@@ -102,28 +117,26 @@ architecture. The example assumes the SDK installer is located in | |||
102 | that case, set up the proper permissions in the directory and run the | 117 | that case, set up the proper permissions in the directory and run the |
103 | installer again. | 118 | installer again. |
104 | 119 | ||
105 | $ | 120 | :: |
106 | ./Downloads/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.5.sh | 121 | |
107 | Poky (Yocto Project Reference Distro) Extensible SDK installer version | 122 | $ ./Downloads/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.5.sh |
108 | 2.5 | 123 | Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.5 |
109 | ========================================================================== | 124 | ========================================================================== |
110 | Enter target directory for SDK (default: ~/poky_sdk): You are about to | 125 | Enter target directory for SDK (default: ~/poky_sdk): |
111 | install the SDK to "/home/scottrif/poky_sdk". Proceed [Y/n]? Y | 126 | You are about to install the SDK to "/home/scottrif/poky_sdk". Proceed [Y/n]? Y |
112 | Extracting SDK..............done Setting it up... Extracting | 127 | Extracting SDK..............done |
113 | buildtools... Preparing build system... Parsing recipes: 100% | 128 | Setting it up... |
114 | \|##################################################################\| | 129 | Extracting buildtools... |
115 | Time: 0:00:52 Initialising tasks: 100% | 130 | Preparing build system... |
116 | \|###############################################################\| | 131 | Parsing recipes: 100% |##################################################################| Time: 0:00:52 |
117 | Time: 0:00:00 Checking sstate mirror object availability: 100% | 132 | Initialising tasks: 100% |###############################################################| Time: 0:00:00 |
118 | \|#######################################\| Time: 0:00:00 Loading cache: | 133 | Checking sstate mirror object availability: 100% |#######################################| Time: 0:00:00 |
119 | 100% | 134 | Loading cache: 100% |####################################################################| Time: 0:00:00 |
120 | \|####################################################################\| | 135 | Initialising tasks: 100% |###############################################################| Time: 0:00:00 |
121 | Time: 0:00:00 Initialising tasks: 100% | 136 | done |
122 | \|###############################################################\| | 137 | SDK has been successfully set up and is ready to be used. |
123 | Time: 0:00:00 done SDK has been successfully set up and is ready to be | 138 | Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. |
124 | used. Each time you wish to use the SDK in a new shell session, you need | 139 | $ . /home/scottrif/poky_sdk/environment-setup-core2-64-poky-linux |
125 | to source the environment setup script e.g. $ . | ||
126 | /home/scottrif/poky_sdk/environment-setup-core2-64-poky-linux | ||
127 | 140 | ||
128 | .. _sdk-running-the-extensible-sdk-environment-setup-script: | 141 | .. _sdk-running-the-extensible-sdk-environment-setup-script: |
129 | 142 | ||
@@ -142,10 +155,14 @@ begin with the string "``environment-setup``" and include as part of | |||
142 | their name the tuned target architecture. As an example, the following | 155 | their name the tuned target architecture. As an example, the following |
143 | commands set the working directory to where the SDK was installed and | 156 | commands set the working directory to where the SDK was installed and |
144 | then source the environment setup script. In this example, the setup | 157 | then source the environment setup script. In this example, the setup |
145 | script is for an IA-based target machine using i586 tuning: $ cd | 158 | script is for an IA-based target machine using i586 tuning: |
146 | /home/scottrif/poky_sdk $ source environment-setup-core2-64-poky-linux | 159 | :: |
147 | SDK environment now set up; additionally you may now run devtool to | 160 | |
148 | perform development tasks. Run devtool --help for further details. | 161 | $ cd /home/scottrif/poky_sdk |
162 | $ source environment-setup-core2-64-poky-linux | ||
163 | SDK environment now set up; additionally you may now run devtool to perform development tasks. | ||
164 | Run devtool --help for further details. | ||
165 | |||
149 | Running the setup script defines many environment variables needed in | 166 | Running the setup script defines many environment variables needed in |
150 | order to use the SDK (e.g. ``PATH``, | 167 | order to use the SDK (e.g. ``PATH``, |
151 | :term:`CC`, | 168 | :term:`CC`, |
@@ -172,7 +189,7 @@ system. | |||
172 | part of an image built using the build system. | 189 | part of an image built using the build system. |
173 | 190 | ||
174 | The ``devtool`` command line is organized similarly to | 191 | The ``devtool`` command line is organized similarly to |
175 | `Git <&YOCTO_DOCS_OM_URL;#git>`__ in that it has a number of | 192 | :ref:`overview-manual/overview-manual-development-environment:git` in that it has a number of |
176 | sub-commands for each function. You can run ``devtool --help`` to see | 193 | sub-commands for each function. You can run ``devtool --help`` to see |
177 | all the commands. | 194 | all the commands. |
178 | 195 | ||
@@ -188,12 +205,12 @@ all the commands. | |||
188 | Three ``devtool`` subcommands exist that provide entry-points into | 205 | Three ``devtool`` subcommands exist that provide entry-points into |
189 | development: | 206 | development: |
190 | 207 | ||
191 | - *``devtool add``*: Assists in adding new software to be built. | 208 | - *devtool add*: Assists in adding new software to be built. |
192 | 209 | ||
193 | - *``devtool modify``*: Sets up an environment to enable you to modify | 210 | - *devtool modify*: Sets up an environment to enable you to modify |
194 | the source of an existing component. | 211 | the source of an existing component. |
195 | 212 | ||
196 | - *``devtool upgrade``*: Updates an existing recipe so that you can | 213 | - *devtool upgrade*: Updates an existing recipe so that you can |
197 | build it for an updated set of source files. | 214 | build it for an updated set of source files. |
198 | 215 | ||
199 | As with the build system, "recipes" represent software packages within | 216 | As with the build system, "recipes" represent software packages within |
@@ -248,8 +265,12 @@ command: | |||
248 | to be extracted. In this situation, the source code is extracted | 265 | to be extracted. In this situation, the source code is extracted |
249 | to the default workspace - you do not want the files in some | 266 | to the default workspace - you do not want the files in some |
250 | specific location outside of the workspace. Thus, everything you | 267 | specific location outside of the workspace. Thus, everything you |
251 | need will be located in the workspace: $ devtool add recipe | 268 | need will be located in the workspace: |
252 | fetchuri With this command, ``devtool`` extracts the upstream | 269 | :: |
270 | |||
271 | $ devtool add recipe fetchuri | ||
272 | |||
273 | With this command, ``devtool`` extracts the upstream | ||
253 | source files into a local Git repository within the ``sources`` | 274 | source files into a local Git repository within the ``sources`` |
254 | folder. The command then creates a recipe named recipe and a | 275 | folder. The command then creates a recipe named recipe and a |
255 | corresponding append file in the workspace. If you do not provide | 276 | corresponding append file in the workspace. If you do not provide |
@@ -269,7 +290,12 @@ command: | |||
269 | Furthermore, the first positional argument srctree in this case | 290 | Furthermore, the first positional argument srctree in this case |
270 | identifies where the ``devtool add`` command will locate the | 291 | identifies where the ``devtool add`` command will locate the |
271 | extracted code outside of the workspace. You need to specify an | 292 | extracted code outside of the workspace. You need to specify an |
272 | empty directory: $ devtool add recipe srctree fetchuri In summary, | 293 | empty directory: |
294 | :: | ||
295 | |||
296 | $ devtool add recipe srctree fetchuri | ||
297 | |||
298 | In summary, | ||
273 | the source code is pulled from fetchuri and extracted into the | 299 | the source code is pulled from fetchuri and extracted into the |
274 | location defined by srctree as a local Git repository. | 300 | location defined by srctree as a local Git repository. |
275 | 301 | ||
@@ -281,7 +307,11 @@ command: | |||
281 | ``devtool`` workspace. | 307 | ``devtool`` workspace. |
282 | 308 | ||
283 | The following command provides a new recipe name and identifies | 309 | The following command provides a new recipe name and identifies |
284 | the existing source tree location: $ devtool add recipe srctree | 310 | the existing source tree location: |
311 | :: | ||
312 | |||
313 | $ devtool add recipe srctree | ||
314 | |||
285 | The command examines the source code and creates a recipe named | 315 | The command examines the source code and creates a recipe named |
286 | recipe for the code and places the recipe into the workspace. | 316 | recipe for the code and places the recipe into the workspace. |
287 | 317 | ||
@@ -294,7 +324,12 @@ command: | |||
294 | 324 | ||
295 | 2. *Edit the Recipe*: You can use ``devtool edit-recipe`` to open up the | 325 | 2. *Edit the Recipe*: You can use ``devtool edit-recipe`` to open up the |
296 | editor as defined by the ``$EDITOR`` environment variable and modify | 326 | editor as defined by the ``$EDITOR`` environment variable and modify |
297 | the file: $ devtool edit-recipe recipe From within the editor, you | 327 | the file: |
328 | :: | ||
329 | |||
330 | $ devtool edit-recipe recipe | ||
331 | |||
332 | From within the editor, you | ||
298 | can make modifications to the recipe that take affect when you build | 333 | can make modifications to the recipe that take affect when you build |
299 | it later. | 334 | it later. |
300 | 335 | ||
@@ -302,13 +337,18 @@ command: | |||
302 | depends on what you are going to do with the new code. | 337 | depends on what you are going to do with the new code. |
303 | 338 | ||
304 | If you need to eventually move the build output to the target | 339 | If you need to eventually move the build output to the target |
305 | hardware, use the following ``devtool`` command: $ devtool build | 340 | hardware, use the following ``devtool`` command: |
306 | recipe | 341 | :; |
342 | |||
343 | $ devtool build recipe | ||
307 | 344 | ||
308 | On the other hand, if you want an image to contain the recipe's | 345 | On the other hand, if you want an image to contain the recipe's |
309 | packages from the workspace for immediate deployment onto a device | 346 | packages from the workspace for immediate deployment onto a device |
310 | (e.g. for testing purposes), you can use the ``devtool build-image`` | 347 | (e.g. for testing purposes), you can use the ``devtool build-image`` |
311 | command: $ devtool build-image image | 348 | command: |
349 | :: | ||
350 | |||
351 | $ devtool build-image image | ||
312 | 352 | ||
313 | 4. *Deploy the Build Output*: When you use the ``devtool build`` command | 353 | 4. *Deploy the Build Output*: When you use the ``devtool build`` command |
314 | to build out your recipe, you probably want to see if the resulting | 354 | to build out your recipe, you probably want to see if the resulting |
@@ -336,7 +376,10 @@ command: | |||
336 | creates any patches corresponding to commits in the local Git | 376 | creates any patches corresponding to commits in the local Git |
337 | repository, moves the new recipe to a more permanent layer, and then | 377 | repository, moves the new recipe to a more permanent layer, and then |
338 | resets the recipe so that the recipe is built normally rather than | 378 | resets the recipe so that the recipe is built normally rather than |
339 | from the workspace. $ devtool finish recipe layer | 379 | from the workspace. |
380 | :: | ||
381 | |||
382 | $ devtool finish recipe layer | ||
340 | 383 | ||
341 | .. note:: | 384 | .. note:: |
342 | 385 | ||
@@ -401,7 +444,12 @@ command: | |||
401 | outside the workspace (i.e. ``meta-``\ layername). | 444 | outside the workspace (i.e. ``meta-``\ layername). |
402 | 445 | ||
403 | The following command identifies the recipe and, by default, | 446 | The following command identifies the recipe and, by default, |
404 | extracts the source files: $ devtool modify recipe Once | 447 | extracts the source files: |
448 | :: | ||
449 | |||
450 | $ devtool modify recipe | ||
451 | |||
452 | Once | ||
405 | ``devtool``\ locates the recipe, ``devtool`` uses the recipe's | 453 | ``devtool``\ locates the recipe, ``devtool`` uses the recipe's |
406 | :term:`SRC_URI` statements to | 454 | :term:`SRC_URI` statements to |
407 | locate the source code and any local patch files from other | 455 | locate the source code and any local patch files from other |
@@ -435,7 +483,10 @@ command: | |||
435 | The following command tells ``devtool`` the recipe with which to | 483 | The following command tells ``devtool`` the recipe with which to |
436 | work and, in this case, identifies a local area for the extracted | 484 | work and, in this case, identifies a local area for the extracted |
437 | source files that exists outside of the default ``devtool`` | 485 | source files that exists outside of the default ``devtool`` |
438 | workspace: $ devtool modify recipe srctree | 486 | workspace: |
487 | :: | ||
488 | |||
489 | $ devtool modify recipe srctree | ||
439 | 490 | ||
440 | .. note:: | 491 | .. note:: |
441 | 492 | ||
@@ -466,7 +517,10 @@ command: | |||
466 | The following command tells ``devtool`` the recipe with which to | 517 | The following command tells ``devtool`` the recipe with which to |
467 | work, uses the "-n" option to indicate source does not need to be | 518 | work, uses the "-n" option to indicate source does not need to be |
468 | extracted, and uses srctree to point to the previously extracted | 519 | extracted, and uses srctree to point to the previously extracted |
469 | source files: $ devtool modify -n recipe srctree | 520 | source files: |
521 | :: | ||
522 | |||
523 | $ devtool modify -n recipe srctree | ||
470 | 524 | ||
471 | If an ``oe-local-files`` subdirectory happens to exist and it | 525 | If an ``oe-local-files`` subdirectory happens to exist and it |
472 | contains non-patch files, the files are used. However, if the | 526 | contains non-patch files, the files are used. However, if the |
@@ -487,8 +541,10 @@ command: | |||
487 | depends on what you are going to do with the new code. | 541 | depends on what you are going to do with the new code. |
488 | 542 | ||
489 | If you need to eventually move the build output to the target | 543 | If you need to eventually move the build output to the target |
490 | hardware, use the following ``devtool`` command: $ devtool build | 544 | hardware, use the following ``devtool`` command: |
491 | recipe | 545 | :: |
546 | |||
547 | $ devtool build recipe | ||
492 | 548 | ||
493 | On the other hand, if you want an image to contain the recipe's | 549 | On the other hand, if you want an image to contain the recipe's |
494 | packages from the workspace for immediate deployment onto a device | 550 | packages from the workspace for immediate deployment onto a device |
@@ -509,8 +565,12 @@ command: | |||
509 | development machine. | 565 | development machine. |
510 | 566 | ||
511 | You can deploy your build output to that target hardware by using the | 567 | You can deploy your build output to that target hardware by using the |
512 | ``devtool deploy-target`` command: $ devtool deploy-target recipe | 568 | ``devtool deploy-target`` command: |
513 | target The target is a live target machine running as an SSH server. | 569 | :: |
570 | |||
571 | $ devtool deploy-target recipe target | ||
572 | |||
573 | The target is a live target machine running as an SSH server. | ||
514 | 574 | ||
515 | You can, of course, use other methods to deploy the image you built | 575 | You can, of course, use other methods to deploy the image you built |
516 | using the ``devtool build-image`` command to actual hardware. | 576 | using the ``devtool build-image`` command to actual hardware. |
@@ -522,8 +582,10 @@ command: | |||
522 | repository, updates the recipe to point to them (or creates a | 582 | repository, updates the recipe to point to them (or creates a |
523 | ``.bbappend`` file to do so, depending on the specified destination | 583 | ``.bbappend`` file to do so, depending on the specified destination |
524 | layer), and then resets the recipe so that the recipe is built | 584 | layer), and then resets the recipe so that the recipe is built |
525 | normally rather than from the workspace. $ devtool finish recipe | 585 | normally rather than from the workspace. |
526 | layer | 586 | :: |
587 | |||
588 | $ devtool finish recipe layer | ||
527 | 589 | ||
528 | .. note:: | 590 | .. note:: |
529 | 591 | ||
@@ -600,8 +662,12 @@ The following diagram shows the common development flow used with the | |||
600 | A common situation is where third-party software has undergone a | 662 | A common situation is where third-party software has undergone a |
601 | revision so that it has been upgraded. The recipe you have access to | 663 | revision so that it has been upgraded. The recipe you have access to |
602 | is likely in your own layer. Thus, you need to upgrade the recipe to | 664 | is likely in your own layer. Thus, you need to upgrade the recipe to |
603 | use the newer version of the software: $ devtool upgrade -V version | 665 | use the newer version of the software: |
604 | recipe By default, the ``devtool upgrade`` command extracts source | 666 | :: |
667 | |||
668 | $ devtool upgrade -V version recipe | ||
669 | |||
670 | By default, the ``devtool upgrade`` command extracts source | ||
605 | code into the ``sources`` directory in the | 671 | code into the ``sources`` directory in the |
606 | :ref:`devtool-the-workspace-layer-structure`. | 672 | :ref:`devtool-the-workspace-layer-structure`. |
607 | If you want the code extracted to any other location, you need to | 673 | If you want the code extracted to any other location, you need to |
@@ -648,13 +714,18 @@ The following diagram shows the common development flow used with the | |||
648 | depends on what you are going to do with the new code. | 714 | depends on what you are going to do with the new code. |
649 | 715 | ||
650 | If you need to eventually move the build output to the target | 716 | If you need to eventually move the build output to the target |
651 | hardware, use the following ``devtool`` command: $ devtool build | 717 | hardware, use the following ``devtool`` command: |
652 | recipe | 718 | :: |
719 | |||
720 | $ devtool build recipe | ||
653 | 721 | ||
654 | On the other hand, if you want an image to contain the recipe's | 722 | On the other hand, if you want an image to contain the recipe's |
655 | packages from the workspace for immediate deployment onto a device | 723 | packages from the workspace for immediate deployment onto a device |
656 | (e.g. for testing purposes), you can use the ``devtool build-image`` | 724 | (e.g. for testing purposes), you can use the ``devtool build-image`` |
657 | command: $ devtool build-image image | 725 | command: |
726 | :: | ||
727 | |||
728 | $ devtool build-image image | ||
658 | 729 | ||
659 | 4. *Deploy the Build Output*: When you use the ``devtool build`` command | 730 | 4. *Deploy the Build Output*: When you use the ``devtool build`` command |
660 | or ``bitbake`` to build your recipe, you probably want to see if the | 731 | or ``bitbake`` to build your recipe, you probably want to see if the |
@@ -690,8 +761,10 @@ The following diagram shows the common development flow used with the | |||
690 | 761 | ||
691 | If you specify a destination layer that is the same as the original | 762 | If you specify a destination layer that is the same as the original |
692 | source, then the old version of the recipe and associated files are | 763 | source, then the old version of the recipe and associated files are |
693 | removed prior to adding the new version. $ devtool finish recipe | 764 | removed prior to adding the new version. |
694 | layer | 765 | :: |
766 | |||
767 | $ devtool finish recipe layer | ||
695 | 768 | ||
696 | .. note:: | 769 | .. note:: |
697 | 770 | ||
@@ -770,8 +843,12 @@ name and version, just the name, or just the version as part of the | |||
770 | command line. | 843 | command line. |
771 | 844 | ||
772 | Sometimes the name or version determined from the source tree might be | 845 | Sometimes the name or version determined from the source tree might be |
773 | incorrect. For such a case, you must reset the recipe: $ devtool reset | 846 | incorrect. For such a case, you must reset the recipe: |
774 | -n recipename After running the ``devtool reset`` command, you need to | 847 | :: |
848 | |||
849 | $ devtool reset -n recipename | ||
850 | |||
851 | After running the ``devtool reset`` command, you need to | ||
775 | run ``devtool add`` again and provide the name or the version. | 852 | run ``devtool add`` again and provide the name or the version. |
776 | 853 | ||
777 | .. _sdk-dependency-detection-and-mapping: | 854 | .. _sdk-dependency-detection-and-mapping: |
@@ -793,8 +870,10 @@ the ``DEPENDS`` variable in the original recipe to include the new | |||
793 | recipe. | 870 | recipe. |
794 | 871 | ||
795 | If you need to add runtime dependencies, you can do so by adding the | 872 | If you need to add runtime dependencies, you can do so by adding the |
796 | following to your recipe: RDEPENDS_${PN} += "dependency1 dependency2 | 873 | following to your recipe: |
797 | ..." | 874 | :: |
875 | |||
876 | RDEPENDS_${PN} += "dependency1 dependency2 ..." | ||
798 | 877 | ||
799 | .. note:: | 878 | .. note:: |
800 | 879 | ||
@@ -881,7 +960,11 @@ mind: | |||
881 | :term:`EXTRA_OEMAKE` or | 960 | :term:`EXTRA_OEMAKE` or |
882 | :term:`PACKAGECONFIG_CONFARGS` | 961 | :term:`PACKAGECONFIG_CONFARGS` |
883 | within the recipe. Here is an example using ``EXTRA_OEMAKE``: | 962 | within the recipe. Here is an example using ``EXTRA_OEMAKE``: |
884 | EXTRA_OEMAKE += "'CC=${CC}' 'CXX=${CXX}'" In the above example, | 963 | :: |
964 | |||
965 | EXTRA_OEMAKE += "'CC=${CC}' 'CXX=${CXX}'" | ||
966 | |||
967 | In the above example, | ||
885 | single quotes are used around the variable settings as the values are | 968 | single quotes are used around the variable settings as the values are |
886 | likely to contain spaces because required default options are passed | 969 | likely to contain spaces because required default options are passed |
887 | to the compiler. | 970 | to the compiler. |
@@ -903,8 +986,8 @@ mind: | |||
903 | Adding Native Tools | 986 | Adding Native Tools |
904 | ------------------- | 987 | ------------------- |
905 | 988 | ||
906 | Often, you need to build additional tools that run on the `build | 989 | Often, you need to build additional tools that run on the :term:`Build |
907 | host <&YOCTO_DOCS_REF_URL;#hardware-build-system-term>`__ as opposed to | 990 | Host` as opposed to |
908 | the target. You should indicate this requirement by using one of the | 991 | the target. You should indicate this requirement by using one of the |
909 | following methods when you run ``devtool add``: | 992 | following methods when you run ``devtool add``: |
910 | 993 | ||
@@ -935,8 +1018,12 @@ You can use the ``devtool add`` command two different ways to add | |||
935 | Node.js modules: 1) Through ``npm`` and, 2) from a repository or local | 1018 | Node.js modules: 1) Through ``npm`` and, 2) from a repository or local |
936 | source. | 1019 | source. |
937 | 1020 | ||
938 | Use the following form to add Node.js modules through ``npm``: $ devtool | 1021 | Use the following form to add Node.js modules through ``npm``: |
939 | add "npm://registry.npmjs.org;name=forever;version=0.15.1" The name and | 1022 | :: |
1023 | |||
1024 | $ devtool add "npm://registry.npmjs.org;name=forever;version=0.15.1" | ||
1025 | |||
1026 | The name and | ||
940 | version parameters are mandatory. Lockdown and shrinkwrap files are | 1027 | version parameters are mandatory. Lockdown and shrinkwrap files are |
941 | generated and pointed to by the recipe in order to freeze the version | 1028 | generated and pointed to by the recipe in order to freeze the version |
942 | that is fetched for the dependencies according to the first time. This | 1029 | that is fetched for the dependencies according to the first time. This |
@@ -956,8 +1043,12 @@ these behaviors ensure the reproducibility and integrity of the build. | |||
956 | 1043 | ||
957 | As mentioned earlier, you can also add Node.js modules directly from a | 1044 | As mentioned earlier, you can also add Node.js modules directly from a |
958 | repository or local source tree. To add modules this way, use | 1045 | repository or local source tree. To add modules this way, use |
959 | ``devtool add`` in the following form: $ devtool add | 1046 | ``devtool add`` in the following form: |
960 | https://github.com/diversario/node-ssdp In this example, ``devtool`` | 1047 | :: |
1048 | |||
1049 | $ devtool add https://github.com/diversario/node-ssdp | ||
1050 | |||
1051 | In this example, ``devtool`` | ||
961 | fetches the specified Git repository, detects the code as Node.js code, | 1052 | fetches the specified Git repository, detects the code as Node.js code, |
962 | fetches dependencies using ``npm``, and sets | 1053 | fetches dependencies using ``npm``, and sets |
963 | :term:`SRC_URI` accordingly. | 1054 | :term:`SRC_URI` accordingly. |
@@ -984,7 +1075,7 @@ build progresses as follows: | |||
984 | 1075 | ||
985 | For recipes in the workspace, fetching and unpacking is disabled as the | 1076 | For recipes in the workspace, fetching and unpacking is disabled as the |
986 | source tree has already been prepared and is persistent. Each of these | 1077 | source tree has already been prepared and is persistent. Each of these |
987 | build steps is defined as a function (task), usually with a "do_" prefix | 1078 | build steps is defined as a function (task), usually with a "do\_" prefix |
988 | (e.g. :ref:`ref-tasks-fetch`, | 1079 | (e.g. :ref:`ref-tasks-fetch`, |
989 | :ref:`ref-tasks-unpack`, and so | 1080 | :ref:`ref-tasks-unpack`, and so |
990 | forth). These functions are typically shell scripts but can instead be | 1081 | forth). These functions are typically shell scripts but can instead be |
@@ -1069,8 +1160,8 @@ reference. | |||
1069 | Sharing Files Between Recipes | 1160 | Sharing Files Between Recipes |
1070 | ----------------------------- | 1161 | ----------------------------- |
1071 | 1162 | ||
1072 | Recipes often need to use files provided by other recipes on the `build | 1163 | Recipes often need to use files provided by other recipes on the |
1073 | host <&YOCTO_DOCS_REF_URL;#hardware-build-system-term>`__. For example, | 1164 | :term:`Build Host`. For example, |
1074 | an application linking to a common library needs access to the library | 1165 | an application linking to a common library needs access to the library |
1075 | itself and its associated headers. The way this access is accomplished | 1166 | itself and its associated headers. The way this access is accomplished |
1076 | within the extensible SDK is through the sysroot. One sysroot exists per | 1167 | within the extensible SDK is through the sysroot. One sysroot exists per |
@@ -1142,11 +1233,19 @@ need to restore the original files that existed prior to running the | |||
1142 | ``devtool deploy-target`` command. Because the ``devtool deploy-target`` | 1233 | ``devtool deploy-target`` command. Because the ``devtool deploy-target`` |
1143 | command backs up any files it overwrites, you can use the | 1234 | command backs up any files it overwrites, you can use the |
1144 | ``devtool undeploy-target`` command to restore those files and remove | 1235 | ``devtool undeploy-target`` command to restore those files and remove |
1145 | any other files the recipe deployed. Consider the following example: $ | 1236 | any other files the recipe deployed. Consider the following example: |
1146 | devtool undeploy-target lighttpd root@192.168.7.2 If you have deployed | 1237 | :: |
1238 | |||
1239 | $ devtool undeploy-target lighttpd root@192.168.7.2 | ||
1240 | |||
1241 | If you have deployed | ||
1147 | multiple applications, you can remove them all using the "-a" option | 1242 | multiple applications, you can remove them all using the "-a" option |
1148 | thus restoring the target device to its original state: $ devtool | 1243 | thus restoring the target device to its original state: |
1149 | undeploy-target -a root@192.168.7.2 Information about files deployed to | 1244 | :: |
1245 | |||
1246 | $ devtool undeploy-target -a root@192.168.7.2 | ||
1247 | |||
1248 | Information about files deployed to | ||
1150 | the target as well as any backed up files are stored on the target | 1249 | the target as well as any backed up files are stored on the target |
1151 | itself. This storage, of course, requires some additional space on the | 1250 | itself. This storage, of course, requires some additional space on the |
1152 | target machine. | 1251 | target machine. |
@@ -1175,14 +1274,26 @@ populated on-demand. Sometimes you must explicitly install extra items | |||
1175 | into the SDK. If you need these extra items, you can first search for | 1274 | into the SDK. If you need these extra items, you can first search for |
1176 | the items using the ``devtool search`` command. For example, suppose you | 1275 | the items using the ``devtool search`` command. For example, suppose you |
1177 | need to link to libGL but you are not sure which recipe provides libGL. | 1276 | need to link to libGL but you are not sure which recipe provides libGL. |
1178 | You can use the following command to find out: $ devtool search libGL | 1277 | You can use the following command to find out: |
1179 | mesa A free implementation of the OpenGL API Once you know the recipe | 1278 | :: |
1180 | (i.e. ``mesa`` in this example), you can install it: $ devtool | 1279 | |
1181 | sdk-install mesa By default, the ``devtool sdk-install`` command assumes | 1280 | $ devtool search libGL mesa |
1281 | |||
1282 | A free implementation of the OpenGL API Once you know the recipe | ||
1283 | (i.e. ``mesa`` in this example), you can install it: | ||
1284 | :: | ||
1285 | |||
1286 | $ devtool sdk-install mesa | ||
1287 | |||
1288 | By default, the ``devtool sdk-install`` command assumes | ||
1182 | the item is available in pre-built form from your SDK provider. If the | 1289 | the item is available in pre-built form from your SDK provider. If the |
1183 | item is not available and it is acceptable to build the item from | 1290 | item is not available and it is acceptable to build the item from |
1184 | source, you can add the "-s" option as follows: $ devtool sdk-install -s | 1291 | source, you can add the "-s" option as follows: |
1185 | mesa It is important to remember that building the item from source | 1292 | :: |
1293 | |||
1294 | $ devtool sdk-install -s mesa | ||
1295 | |||
1296 | It is important to remember that building the item from source | ||
1186 | takes significantly longer than installing the pre-built artifact. Also, | 1297 | takes significantly longer than installing the pre-built artifact. Also, |
1187 | if no recipe exists for the item you want to add to the SDK, you must | 1298 | if no recipe exists for the item you want to add to the SDK, you must |
1188 | instead add the item using the ``devtool add`` command. | 1299 | instead add the item using the ``devtool add`` command. |
@@ -1196,8 +1307,12 @@ If you are working with an installed extensible SDK that gets | |||
1196 | occasionally updated (e.g. a third-party SDK), then you will need to | 1307 | occasionally updated (e.g. a third-party SDK), then you will need to |
1197 | manually "pull down" the updates into the installed SDK. | 1308 | manually "pull down" the updates into the installed SDK. |
1198 | 1309 | ||
1199 | To update your installed SDK, use ``devtool`` as follows: $ devtool | 1310 | To update your installed SDK, use ``devtool`` as follows: |
1200 | sdk-update The previous command assumes your SDK provider has set the | 1311 | :: |
1312 | |||
1313 | $ devtool sdk-update | ||
1314 | |||
1315 | The previous command assumes your SDK provider has set the | ||
1201 | default update URL for you through the | 1316 | default update URL for you through the |
1202 | :term:`SDK_UPDATE_URL` | 1317 | :term:`SDK_UPDATE_URL` |
1203 | variable as described in the "`Providing Updates to the Extensible SDK | 1318 | variable as described in the "`Providing Updates to the Extensible SDK |