diff options
| author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2023-09-20 05:50:59 +0200 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-09-23 05:26:16 -1000 |
| commit | bdf0b48912155d9f2e14be864438a8b3e6d2aca1 (patch) | |
| tree | afba3634799613031653fddaa4c4fd710fcd3fd8 /documentation/sdk-manual | |
| parent | b099a1c252a8bd03bb882f6351f423b96648e921 (diff) | |
| download | poky-bdf0b48912155d9f2e14be864438a8b3e6d2aca1.tar.gz | |
sdk-manual: extensible.rst: align with master branch
In particular, this addresses multiple formatting issues.
Aligning with the master branch as all updates apply to
kirkstone too.
(From yocto-docs rev: 5e2ec35e3d63f9c73726122fe2b3dd6d6f85a77e)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'documentation/sdk-manual')
| -rw-r--r-- | documentation/sdk-manual/extensible.rst | 389 |
1 files changed, 202 insertions, 187 deletions
diff --git a/documentation/sdk-manual/extensible.rst b/documentation/sdk-manual/extensible.rst index 18a2b59c96..355c6cb0e4 100644 --- a/documentation/sdk-manual/extensible.rst +++ b/documentation/sdk-manual/extensible.rst | |||
| @@ -41,6 +41,44 @@ functionality. | |||
| 41 | Installing the Extensible SDK | 41 | Installing the Extensible SDK |
| 42 | ============================= | 42 | ============================= |
| 43 | 43 | ||
| 44 | Two ways to install the Extensible SDK | ||
| 45 | -------------------------------------- | ||
| 46 | |||
| 47 | Extensible SDK can be installed in two different ways, and both have | ||
| 48 | their own pros and cons: | ||
| 49 | |||
| 50 | #. *Setting up the Extensible SDK environment directly in a Yocto build*. This | ||
| 51 | avoids having to produce, test, distribute and maintain separate SDK | ||
| 52 | installer archives, which can get very large. There is only one environment | ||
| 53 | for the regular Yocto build and the SDK and less code paths where things can | ||
| 54 | go not according to plan. It's easier to update the SDK: it simply means | ||
| 55 | updating the Yocto layers with git fetch or layer management tooling. The | ||
| 56 | SDK extensibility is better than in the second option: just run ``bitbake`` | ||
| 57 | again to add more things to the sysroot, or add layers if even more things | ||
| 58 | are required. | ||
| 59 | |||
| 60 | #. *Setting up the Extensible SDK from a standalone installer*. This has the | ||
| 61 | benefit of having a single, self-contained archive that includes all the | ||
| 62 | needed binary artifacts. So nothing needs to be rebuilt, and there is no | ||
| 63 | need to provide a well-functioning binary artefact cache over the network | ||
| 64 | for developers with underpowered laptops. | ||
| 65 | |||
| 66 | Setting up the Extensible SDK environment directly in a Yocto build | ||
| 67 | ------------------------------------------------------------------- | ||
| 68 | |||
| 69 | #. Set up all the needed layers and a Yocto :term:`Build Directory`, e.g. a regular Yocto | ||
| 70 | build where ``bitbake`` can be executed. | ||
| 71 | |||
| 72 | #. Run:: | ||
| 73 | |||
| 74 | $ bitbake meta-ide-support | ||
| 75 | $ bitbake -c populate_sysroot gtk+3 | ||
| 76 | # or any other target or native item that the application developer would need | ||
| 77 | $ bitbake build-sysroots | ||
| 78 | |||
| 79 | Setting up the Extensible SDK from a standalone installer | ||
| 80 | --------------------------------------------------------- | ||
| 81 | |||
| 44 | The first thing you need to do is install the SDK on your :term:`Build | 82 | The first thing you need to do is install the SDK on your :term:`Build |
| 45 | Host` by running the ``*.sh`` installation script. | 83 | Host` by running the ``*.sh`` installation script. |
| 46 | 84 | ||
| @@ -102,16 +140,7 @@ must be writable for whichever users need to use the SDK. | |||
| 102 | The following command shows how to run the installer given a toolchain | 140 | The following command shows how to run the installer given a toolchain |
| 103 | tarball for a 64-bit x86 development host system and a 64-bit x86 target | 141 | tarball for a 64-bit x86 development host system and a 64-bit x86 target |
| 104 | architecture. The example assumes the SDK installer is located in | 142 | architecture. The example assumes the SDK installer is located in |
| 105 | ``~/Downloads/`` and has execution rights. | 143 | ``~/Downloads/`` and has execution rights:: |
| 106 | |||
| 107 | .. note:: | ||
| 108 | |||
| 109 | If you do not have write permissions for the directory into which you | ||
| 110 | are installing the SDK, the installer notifies you and exits. For | ||
| 111 | that case, set up the proper permissions in the directory and run the | ||
| 112 | installer again. | ||
| 113 | |||
| 114 | :: | ||
| 115 | 144 | ||
| 116 | $ ./Downloads/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.5.sh | 145 | $ ./Downloads/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.5.sh |
| 117 | Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.5 | 146 | Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.5 |
| @@ -132,11 +161,23 @@ architecture. The example assumes the SDK installer is located in | |||
| 132 | Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. | 161 | Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. |
| 133 | $ . /home/scottrif/poky_sdk/environment-setup-core2-64-poky-linux | 162 | $ . /home/scottrif/poky_sdk/environment-setup-core2-64-poky-linux |
| 134 | 163 | ||
| 164 | .. note:: | ||
| 165 | |||
| 166 | If you do not have write permissions for the directory into which you | ||
| 167 | are installing the SDK, the installer notifies you and exits. For | ||
| 168 | that case, set up the proper permissions in the directory and run the | ||
| 169 | installer again. | ||
| 170 | |||
| 135 | Running the Extensible SDK Environment Setup Script | 171 | Running the Extensible SDK Environment Setup Script |
| 136 | =================================================== | 172 | =================================================== |
| 137 | 173 | ||
| 138 | Once you have the SDK installed, you must run the SDK environment setup | 174 | Once you have the SDK installed, you must run the SDK environment setup |
| 139 | script before you can actually use the SDK. This setup script resides in | 175 | script before you can actually use the SDK. |
| 176 | |||
| 177 | When using a SDK directly in a Yocto build, you will find the script in | ||
| 178 | ``tmp/deploy/images/qemux86-64/`` in your :term:`Build Directory`. | ||
| 179 | |||
| 180 | When using a standalone SDK installer, this setup script resides in | ||
| 140 | the directory you chose when you installed the SDK, which is either the | 181 | the directory you chose when you installed the SDK, which is either the |
| 141 | default ``poky_sdk`` directory or the directory you chose during | 182 | default ``poky_sdk`` directory or the directory you chose during |
| 142 | installation. | 183 | installation. |
| @@ -154,11 +195,14 @@ script is for an IA-based target machine using i586 tuning:: | |||
| 154 | SDK environment now set up; additionally you may now run devtool to perform development tasks. | 195 | SDK environment now set up; additionally you may now run devtool to perform development tasks. |
| 155 | Run devtool --help for further details. | 196 | Run devtool --help for further details. |
| 156 | 197 | ||
| 157 | Running the setup script defines many environment variables needed in | 198 | When using the environment script directly in a Yocto build, it can |
| 158 | order to use the SDK (e.g. ``PATH``, | 199 | be run similarly:: |
| 159 | :term:`CC`, | 200 | |
| 160 | :term:`LD`, and so forth). If you want to | 201 | $ source tmp/deploy/images/qemux86-64/environment-setup-core2-64-poky-linux |
| 161 | see all the environment variables the script exports, examine the | 202 | |
| 203 | Running the setup script defines many environment variables needed in order to | ||
| 204 | use the SDK (e.g. ``PATH``, :term:`CC`, :term:`LD`, and so forth). If you want | ||
| 205 | to see all the environment variables the script exports, examine the | ||
| 162 | installation file itself. | 206 | installation file itself. |
| 163 | 207 | ||
| 164 | Using ``devtool`` in Your SDK Workflow | 208 | Using ``devtool`` in Your SDK Workflow |
| @@ -172,11 +216,8 @@ system. | |||
| 172 | 216 | ||
| 173 | .. note:: | 217 | .. note:: |
| 174 | 218 | ||
| 175 | The use of | 219 | The use of ``devtool`` is not limited to the extensible SDK. You can use |
| 176 | devtool | 220 | ``devtool`` to help you easily develop any project whose build output must be |
| 177 | is not limited to the extensible SDK. You can use | ||
| 178 | devtool | ||
| 179 | to help you easily develop any project whose build output must be | ||
| 180 | part of an image built using the build system. | 221 | part of an image built using the build system. |
| 181 | 222 | ||
| 182 | The ``devtool`` command line is organized similarly to | 223 | The ``devtool`` command line is organized similarly to |
| @@ -186,15 +227,10 @@ all the commands. | |||
| 186 | 227 | ||
| 187 | .. note:: | 228 | .. note:: |
| 188 | 229 | ||
| 189 | See the " | 230 | See the ":doc:`/ref-manual/devtool-reference`" |
| 190 | devtool | 231 | section in the Yocto Project Reference Manual. |
| 191 | Quick Reference | ||
| 192 | " in the Yocto Project Reference Manual for a | ||
| 193 | devtool | ||
| 194 | quick reference. | ||
| 195 | 232 | ||
| 196 | Three ``devtool`` subcommands provide entry-points into | 233 | Three ``devtool`` subcommands provide entry-points into development: |
| 197 | development: | ||
| 198 | 234 | ||
| 199 | - *devtool add*: Assists in adding new software to be built. | 235 | - *devtool add*: Assists in adding new software to be built. |
| 200 | 236 | ||
| @@ -233,9 +269,9 @@ shows common development flows you would use with the ``devtool add`` | |||
| 233 | command: | 269 | command: |
| 234 | 270 | ||
| 235 | .. image:: figures/sdk-devtool-add-flow.png | 271 | .. image:: figures/sdk-devtool-add-flow.png |
| 236 | :align: center | 272 | :width: 100% |
| 237 | 273 | ||
| 238 | 1. *Generating the New Recipe*: The top part of the flow shows three | 274 | #. *Generating the New Recipe*: The top part of the flow shows three |
| 239 | scenarios by which you could use ``devtool add`` to generate a recipe | 275 | scenarios by which you could use ``devtool add`` to generate a recipe |
| 240 | based on existing source code. | 276 | based on existing source code. |
| 241 | 277 | ||
| @@ -252,7 +288,7 @@ command: | |||
| 252 | - *Left*: The left scenario in the figure represents a common | 288 | - *Left*: The left scenario in the figure represents a common |
| 253 | situation where the source code does not exist locally and needs | 289 | situation where the source code does not exist locally and needs |
| 254 | to be extracted. In this situation, the source code is extracted | 290 | to be extracted. In this situation, the source code is extracted |
| 255 | to the default workspace - you do not want the files in some | 291 | to the default workspace --- you do not want the files in some |
| 256 | specific location outside of the workspace. Thus, everything you | 292 | specific location outside of the workspace. Thus, everything you |
| 257 | need will be located in the workspace:: | 293 | need will be located in the workspace:: |
| 258 | 294 | ||
| @@ -267,13 +303,12 @@ command: | |||
| 267 | - *Middle*: The middle scenario in the figure also represents a | 303 | - *Middle*: The middle scenario in the figure also represents a |
| 268 | situation where the source code does not exist locally. In this | 304 | situation where the source code does not exist locally. In this |
| 269 | case, the code is again upstream and needs to be extracted to some | 305 | case, the code is again upstream and needs to be extracted to some |
| 270 | local area - this time outside of the default workspace. | 306 | local area --- this time outside of the default workspace. |
| 271 | 307 | ||
| 272 | .. note:: | 308 | .. note:: |
| 273 | 309 | ||
| 274 | If required, | 310 | If required, ``devtool`` always creates a Git repository locally |
| 275 | devtool | 311 | during the extraction. |
| 276 | always creates a Git repository locally during the extraction. | ||
| 277 | 312 | ||
| 278 | Furthermore, the first positional argument ``srctree`` in this case | 313 | Furthermore, the first positional argument ``srctree`` in this case |
| 279 | identifies where the ``devtool add`` command will locate the | 314 | identifies where the ``devtool add`` command will locate the |
| @@ -282,8 +317,7 @@ command: | |||
| 282 | 317 | ||
| 283 | $ devtool add recipe srctree fetchuri | 318 | $ devtool add recipe srctree fetchuri |
| 284 | 319 | ||
| 285 | In summary, | 320 | In summary, the source code is pulled from fetchuri and extracted into the |
| 286 | the source code is pulled from fetchuri and extracted into the | ||
| 287 | location defined by ``srctree`` as a local Git repository. | 321 | location defined by ``srctree`` as a local Git repository. |
| 288 | 322 | ||
| 289 | Within workspace, ``devtool`` creates a recipe named recipe along | 323 | Within workspace, ``devtool`` creates a recipe named recipe along |
| @@ -302,28 +336,26 @@ command: | |||
| 302 | recipe for the code and places the recipe into the workspace. | 336 | recipe for the code and places the recipe into the workspace. |
| 303 | 337 | ||
| 304 | Because the extracted source code already exists, ``devtool`` does | 338 | Because the extracted source code already exists, ``devtool`` does |
| 305 | not try to relocate the source code into the workspace - only the | 339 | not try to relocate the source code into the workspace --- only the |
| 306 | new recipe is placed in the workspace. | 340 | new recipe is placed in the workspace. |
| 307 | 341 | ||
| 308 | Aside from a recipe folder, the command also creates an associated | 342 | Aside from a recipe folder, the command also creates an associated |
| 309 | append folder and places an initial ``*.bbappend`` file within. | 343 | append folder and places an initial ``*.bbappend`` file within. |
| 310 | 344 | ||
| 311 | 2. *Edit the Recipe*: You can use ``devtool edit-recipe`` to open up the | 345 | #. *Edit the Recipe*: You can use ``devtool edit-recipe`` to open up the |
| 312 | editor as defined by the ``$EDITOR`` environment variable and modify | 346 | editor as defined by the ``$EDITOR`` environment variable and modify |
| 313 | the file:: | 347 | the file:: |
| 314 | 348 | ||
| 315 | $ devtool edit-recipe recipe | 349 | $ devtool edit-recipe recipe |
| 316 | 350 | ||
| 317 | From within the editor, you | 351 | From within the editor, you can make modifications to the recipe that |
| 318 | can make modifications to the recipe that take effect when you build | 352 | take effect when you build it later. |
| 319 | it later. | ||
| 320 | 353 | ||
| 321 | 3. *Build the Recipe or Rebuild the Image*: The next step you take | 354 | #. *Build the Recipe or Rebuild the Image*: The next step you take |
| 322 | depends on what you are going to do with the new code. | 355 | depends on what you are going to do with the new code. |
| 323 | 356 | ||
| 324 | If you need to eventually move the build output to the target | 357 | If you need to eventually move the build output to the target |
| 325 | hardware, use the following ``devtool`` command: | 358 | hardware, use the following ``devtool`` command:: |
| 326 | :; | ||
| 327 | 359 | ||
| 328 | $ devtool build recipe | 360 | $ devtool build recipe |
| 329 | 361 | ||
| @@ -334,7 +366,7 @@ command: | |||
| 334 | 366 | ||
| 335 | $ devtool build-image image | 367 | $ devtool build-image image |
| 336 | 368 | ||
| 337 | 4. *Deploy the Build Output*: When you use the ``devtool build`` command | 369 | #. *Deploy the Build Output*: When you use the ``devtool build`` command |
| 338 | to build out your recipe, you probably want to see if the resulting | 370 | to build out your recipe, you probably want to see if the resulting |
| 339 | build output works as expected on the target hardware. | 371 | build output works as expected on the target hardware. |
| 340 | 372 | ||
| @@ -348,20 +380,22 @@ command: | |||
| 348 | development machine. | 380 | development machine. |
| 349 | 381 | ||
| 350 | You can deploy your build output to that target hardware by using the | 382 | You can deploy your build output to that target hardware by using the |
| 351 | ``devtool deploy-target`` command: $ devtool deploy-target recipe | 383 | ``devtool deploy-target`` command:: |
| 352 | target The target is a live target machine running as an SSH server. | 384 | |
| 385 | $ devtool deploy-target recipe target | ||
| 386 | |||
| 387 | The target is a live target machine running as an SSH server. | ||
| 353 | 388 | ||
| 354 | You can, of course, also deploy the image you build to actual | 389 | You can, of course, also deploy the image you build to actual |
| 355 | hardware by using the ``devtool build-image`` command. However, | 390 | hardware by using the ``devtool build-image`` command. However, |
| 356 | ``devtool`` does not provide a specific command that allows you to | 391 | ``devtool`` does not provide a specific command that allows you to |
| 357 | deploy the image to actual hardware. | 392 | deploy the image to actual hardware. |
| 358 | 393 | ||
| 359 | 5. *Finish Your Work With the Recipe*: The ``devtool finish`` command | 394 | #. *Finish Your Work With the Recipe*: The ``devtool finish`` command |
| 360 | creates any patches corresponding to commits in the local Git | 395 | creates any patches corresponding to commits in the local Git |
| 361 | repository, moves the new recipe to a more permanent layer, and then | 396 | repository, moves the new recipe to a more permanent layer, and then |
| 362 | resets the recipe so that the recipe is built normally rather than | 397 | resets the recipe so that the recipe is built normally rather than |
| 363 | from the workspace. | 398 | from the workspace:: |
| 364 | :: | ||
| 365 | 399 | ||
| 366 | $ devtool finish recipe layer | 400 | $ devtool finish recipe layer |
| 367 | 401 | ||
| @@ -379,11 +413,9 @@ command: | |||
| 379 | 413 | ||
| 380 | .. note:: | 414 | .. note:: |
| 381 | 415 | ||
| 382 | You can use the | 416 | You can use the ``devtool reset`` command to put things back should you |
| 383 | devtool reset | 417 | decide you do not want to proceed with your work. If you do use this |
| 384 | command to put things back should you decide you do not want to | 418 | command, realize that the source tree is preserved. |
| 385 | proceed with your work. If you do use this command, realize that | ||
| 386 | the source tree is preserved. | ||
| 387 | 419 | ||
| 388 | Use ``devtool modify`` to Modify the Source of an Existing Component | 420 | Use ``devtool modify`` to Modify the Source of an Existing Component |
| 389 | -------------------------------------------------------------------- | 421 | -------------------------------------------------------------------- |
| @@ -401,9 +433,9 @@ diagram shows common development flows for the ``devtool modify`` | |||
| 401 | command: | 433 | command: |
| 402 | 434 | ||
| 403 | .. image:: figures/sdk-devtool-modify-flow.png | 435 | .. image:: figures/sdk-devtool-modify-flow.png |
| 404 | :align: center | 436 | :width: 100% |
| 405 | 437 | ||
| 406 | 1. *Preparing to Modify the Code*: The top part of the flow shows three | 438 | #. *Preparing to Modify the Code*: The top part of the flow shows three |
| 407 | scenarios by which you could use ``devtool modify`` to prepare to | 439 | scenarios by which you could use ``devtool modify`` to prepare to |
| 408 | work on source files. Each scenario assumes the following: | 440 | work on source files. Each scenario assumes the following: |
| 409 | 441 | ||
| @@ -430,11 +462,9 @@ command: | |||
| 430 | 462 | ||
| 431 | $ devtool modify recipe | 463 | $ devtool modify recipe |
| 432 | 464 | ||
| 433 | Once | 465 | Once ``devtool`` locates the recipe, ``devtool`` uses the recipe's |
| 434 | ``devtool``\ locates the recipe, ``devtool`` uses the recipe's | 466 | :term:`SRC_URI` statements to locate the source code and any local |
| 435 | :term:`SRC_URI` statements to | 467 | patch files from other developers. |
| 436 | locate the source code and any local patch files from other | ||
| 437 | developers. | ||
| 438 | 468 | ||
| 439 | With this scenario, there is no ``srctree`` argument. Consequently, the | 469 | With this scenario, there is no ``srctree`` argument. Consequently, the |
| 440 | default behavior of the ``devtool modify`` command is to extract | 470 | default behavior of the ``devtool modify`` command is to extract |
| @@ -470,11 +500,7 @@ command: | |||
| 470 | 500 | ||
| 471 | .. note:: | 501 | .. note:: |
| 472 | 502 | ||
| 473 | You cannot provide a URL for | 503 | You cannot provide a URL for ``srctree`` using the ``devtool`` command. |
| 474 | srctree | ||
| 475 | using the | ||
| 476 | devtool | ||
| 477 | command. | ||
| 478 | 504 | ||
| 479 | As with all extractions, the command uses the recipe's :term:`SRC_URI` | 505 | As with all extractions, the command uses the recipe's :term:`SRC_URI` |
| 480 | statements to locate the source files and any associated patch | 506 | statements to locate the source files and any associated patch |
| @@ -512,11 +538,11 @@ command: | |||
| 512 | append file for the recipe in the ``devtool`` workspace. The | 538 | append file for the recipe in the ``devtool`` workspace. The |
| 513 | recipe and the source code remain in their original locations. | 539 | recipe and the source code remain in their original locations. |
| 514 | 540 | ||
| 515 | 2. *Edit the Source*: Once you have used the ``devtool modify`` command, | 541 | #. *Edit the Source*: Once you have used the ``devtool modify`` command, |
| 516 | you are free to make changes to the source files. You can use any | 542 | you are free to make changes to the source files. You can use any |
| 517 | editor you like to make and save your source code modifications. | 543 | editor you like to make and save your source code modifications. |
| 518 | 544 | ||
| 519 | 3. *Build the Recipe or Rebuild the Image*: The next step you take | 545 | #. *Build the Recipe or Rebuild the Image*: The next step you take |
| 520 | depends on what you are going to do with the new code. | 546 | depends on what you are going to do with the new code. |
| 521 | 547 | ||
| 522 | If you need to eventually move the build output to the target | 548 | If you need to eventually move the build output to the target |
| @@ -527,9 +553,11 @@ command: | |||
| 527 | On the other hand, if you want an image to contain the recipe's | 553 | On the other hand, if you want an image to contain the recipe's |
| 528 | packages from the workspace for immediate deployment onto a device | 554 | packages from the workspace for immediate deployment onto a device |
| 529 | (e.g. for testing purposes), you can use the ``devtool build-image`` | 555 | (e.g. for testing purposes), you can use the ``devtool build-image`` |
| 530 | command: $ devtool build-image image | 556 | command:: |
| 557 | |||
| 558 | $ devtool build-image image | ||
| 531 | 559 | ||
| 532 | 4. *Deploy the Build Output*: When you use the ``devtool build`` command | 560 | #. *Deploy the Build Output*: When you use the ``devtool build`` command |
| 533 | to build out your recipe, you probably want to see if the resulting | 561 | to build out your recipe, you probably want to see if the resulting |
| 534 | build output works as expected on target hardware. | 562 | build output works as expected on target hardware. |
| 535 | 563 | ||
| @@ -554,13 +582,12 @@ command: | |||
| 554 | ``devtool`` does not provide a specific command to deploy the image | 582 | ``devtool`` does not provide a specific command to deploy the image |
| 555 | to actual hardware. | 583 | to actual hardware. |
| 556 | 584 | ||
| 557 | 5. *Finish Your Work With the Recipe*: The ``devtool finish`` command | 585 | #. *Finish Your Work With the Recipe*: The ``devtool finish`` command |
| 558 | creates any patches corresponding to commits in the local Git | 586 | creates any patches corresponding to commits in the local Git |
| 559 | repository, updates the recipe to point to them (or creates a | 587 | repository, updates the recipe to point to them (or creates a |
| 560 | ``.bbappend`` file to do so, depending on the specified destination | 588 | ``.bbappend`` file to do so, depending on the specified destination |
| 561 | layer), and then resets the recipe so that the recipe is built | 589 | layer), and then resets the recipe so that the recipe is built |
| 562 | normally rather than from the workspace. | 590 | normally rather than from the workspace:: |
| 563 | :: | ||
| 564 | 591 | ||
| 565 | $ devtool finish recipe layer | 592 | $ devtool finish recipe layer |
| 566 | 593 | ||
| @@ -568,8 +595,7 @@ command: | |||
| 568 | 595 | ||
| 569 | Any changes you want to turn into patches must be staged and | 596 | Any changes you want to turn into patches must be staged and |
| 570 | committed within the local Git repository before you use the | 597 | committed within the local Git repository before you use the |
| 571 | devtool finish | 598 | ``devtool finish`` command. |
| 572 | command. | ||
| 573 | 599 | ||
| 574 | Because there is no need to move the recipe, ``devtool finish`` | 600 | Because there is no need to move the recipe, ``devtool finish`` |
| 575 | either updates the original recipe in the original layer or the | 601 | either updates the original recipe in the original layer or the |
| @@ -584,11 +610,9 @@ command: | |||
| 584 | 610 | ||
| 585 | .. note:: | 611 | .. note:: |
| 586 | 612 | ||
| 587 | You can use the | 613 | You can use the ``devtool reset`` command to put things back should you |
| 588 | devtool reset | 614 | decide you do not want to proceed with your work. If you do use this |
| 589 | command to put things back should you decide you do not want to | 615 | command, realize that the source tree is preserved. |
| 590 | proceed with your work. If you do use this command, realize that | ||
| 591 | the source tree is preserved. | ||
| 592 | 616 | ||
| 593 | Use ``devtool upgrade`` to Create a Version of the Recipe that Supports a Newer Version of the Software | 617 | Use ``devtool upgrade`` to Create a Version of the Recipe that Supports a Newer Version of the Software |
| 594 | ------------------------------------------------------------------------------------------------------- | 618 | ------------------------------------------------------------------------------------------------------- |
| @@ -602,27 +626,25 @@ counterparts. | |||
| 602 | 626 | ||
| 603 | .. note:: | 627 | .. note:: |
| 604 | 628 | ||
| 605 | Several methods exist by which you can upgrade recipes - | 629 | Several methods exist by which you can upgrade recipes --- |
| 606 | ``devtool upgrade`` | 630 | ``devtool upgrade`` happens to be one. You can read about all the methods by |
| 607 | happens to be one. You can read about all the methods by which you | 631 | which you can upgrade recipes in the |
| 608 | can upgrade recipes in the | 632 | :ref:`dev-manual/upgrading-recipes:upgrading recipes` section of the Yocto |
| 609 | :ref:`dev-manual/upgrading-recipes:upgrading recipes` section | 633 | Project Development Tasks Manual. |
| 610 | of the Yocto Project Development Tasks Manual. | ||
| 611 | 634 | ||
| 612 | The ``devtool upgrade`` command is flexible enough to allow you to | 635 | The ``devtool upgrade`` command is flexible enough to allow you to specify |
| 613 | specify source code revision and versioning schemes, extract code into | 636 | source code revision and versioning schemes, extract code into or out of the |
| 614 | or out of the ``devtool`` | 637 | ``devtool`` :ref:`devtool-the-workspace-layer-structure`, and work with any |
| 615 | :ref:`devtool-the-workspace-layer-structure`, | 638 | source file forms that the |
| 616 | and work with any source file forms that the | 639 | :ref:`bitbake-user-manual/bitbake-user-manual-fetching:fetchers` support. |
| 617 | :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers` support. | ||
| 618 | 640 | ||
| 619 | The following diagram shows the common development flow used with the | 641 | The following diagram shows the common development flow used with the |
| 620 | ``devtool upgrade`` command: | 642 | ``devtool upgrade`` command: |
| 621 | 643 | ||
| 622 | .. image:: figures/sdk-devtool-upgrade-flow.png | 644 | .. image:: figures/sdk-devtool-upgrade-flow.png |
| 623 | :align: center | 645 | :width: 100% |
| 624 | 646 | ||
| 625 | 1. *Initiate the Upgrade*: The top part of the flow shows the typical | 647 | #. *Initiate the Upgrade*: The top part of the flow shows the typical |
| 626 | scenario by which you use the ``devtool upgrade`` command. The | 648 | scenario by which you use the ``devtool upgrade`` command. The |
| 627 | following conditions exist: | 649 | following conditions exist: |
| 628 | 650 | ||
| @@ -674,7 +696,7 @@ The following diagram shows the common development flow used with the | |||
| 674 | are incorporated into the build the next time you build the software | 696 | are incorporated into the build the next time you build the software |
| 675 | just as are other changes you might have made to the source. | 697 | just as are other changes you might have made to the source. |
| 676 | 698 | ||
| 677 | 2. *Resolve any Conflicts created by the Upgrade*: Conflicts could happen | 699 | #. *Resolve any Conflicts created by the Upgrade*: Conflicts could happen |
| 678 | after upgrading the software to a new version. Conflicts occur | 700 | after upgrading the software to a new version. Conflicts occur |
| 679 | if your recipe specifies some patch files in :term:`SRC_URI` that | 701 | if your recipe specifies some patch files in :term:`SRC_URI` that |
| 680 | conflict with changes made in the new version of the software. For | 702 | conflict with changes made in the new version of the software. For |
| @@ -685,7 +707,7 @@ The following diagram shows the common development flow used with the | |||
| 685 | conflicts created through use of a newer or different version of the | 707 | conflicts created through use of a newer or different version of the |
| 686 | software. | 708 | software. |
| 687 | 709 | ||
| 688 | 3. *Build the Recipe or Rebuild the Image*: The next step you take | 710 | #. *Build the Recipe or Rebuild the Image*: The next step you take |
| 689 | depends on what you are going to do with the new code. | 711 | depends on what you are going to do with the new code. |
| 690 | 712 | ||
| 691 | If you need to eventually move the build output to the target | 713 | If you need to eventually move the build output to the target |
| @@ -700,7 +722,7 @@ The following diagram shows the common development flow used with the | |||
| 700 | 722 | ||
| 701 | $ devtool build-image image | 723 | $ devtool build-image image |
| 702 | 724 | ||
| 703 | 4. *Deploy the Build Output*: When you use the ``devtool build`` command | 725 | #. *Deploy the Build Output*: When you use the ``devtool build`` command |
| 704 | or ``bitbake`` to build your recipe, you probably want to see if the | 726 | or ``bitbake`` to build your recipe, you probably want to see if the |
| 705 | resulting build output works as expected on target hardware. | 727 | resulting build output works as expected on target hardware. |
| 706 | 728 | ||
| @@ -714,15 +736,18 @@ The following diagram shows the common development flow used with the | |||
| 714 | development machine. | 736 | development machine. |
| 715 | 737 | ||
| 716 | You can deploy your build output to that target hardware by using the | 738 | You can deploy your build output to that target hardware by using the |
| 717 | ``devtool deploy-target`` command: $ devtool deploy-target recipe | 739 | ``devtool deploy-target`` command:: |
| 718 | target The target is a live target machine running as an SSH server. | 740 | |
| 741 | $ devtool deploy-target recipe target | ||
| 742 | |||
| 743 | The target is a live target machine running as an SSH server. | ||
| 719 | 744 | ||
| 720 | You can, of course, also deploy the image you build using the | 745 | You can, of course, also deploy the image you build using the |
| 721 | ``devtool build-image`` command to actual hardware. However, | 746 | ``devtool build-image`` command to actual hardware. However, |
| 722 | ``devtool`` does not provide a specific command that allows you to do | 747 | ``devtool`` does not provide a specific command that allows you to do |
| 723 | this. | 748 | this. |
| 724 | 749 | ||
| 725 | 5. *Finish Your Work With the Recipe*: The ``devtool finish`` command | 750 | #. *Finish Your Work With the Recipe*: The ``devtool finish`` command |
| 726 | creates any patches corresponding to commits in the local Git | 751 | creates any patches corresponding to commits in the local Git |
| 727 | repository, moves the new recipe to a more permanent layer, and then | 752 | repository, moves the new recipe to a more permanent layer, and then |
| 728 | resets the recipe so that the recipe is built normally rather than | 753 | resets the recipe so that the recipe is built normally rather than |
| @@ -734,8 +759,7 @@ The following diagram shows the common development flow used with the | |||
| 734 | 759 | ||
| 735 | If you specify a destination layer that is the same as the original | 760 | If you specify a destination layer that is the same as the original |
| 736 | source, then the old version of the recipe and associated files are | 761 | source, then the old version of the recipe and associated files are |
| 737 | removed prior to adding the new version. | 762 | removed prior to adding the new version:: |
| 738 | :: | ||
| 739 | 763 | ||
| 740 | $ devtool finish recipe layer | 764 | $ devtool finish recipe layer |
| 741 | 765 | ||
| @@ -750,11 +774,9 @@ The following diagram shows the common development flow used with the | |||
| 750 | 774 | ||
| 751 | .. note:: | 775 | .. note:: |
| 752 | 776 | ||
| 753 | You can use the | 777 | You can use the ``devtool reset`` command to put things back should you |
| 754 | devtool reset | 778 | decide you do not want to proceed with your work. If you do use this |
| 755 | command to put things back should you decide you do not want to | 779 | command, realize that the source tree is preserved. |
| 756 | proceed with your work. If you do use this command, realize that | ||
| 757 | the source tree is preserved. | ||
| 758 | 780 | ||
| 759 | A Closer Look at ``devtool add`` | 781 | A Closer Look at ``devtool add`` |
| 760 | ================================ | 782 | ================================ |
| @@ -822,10 +844,9 @@ run ``devtool add`` again and provide the name or the version. | |||
| 822 | Dependency Detection and Mapping | 844 | Dependency Detection and Mapping |
| 823 | -------------------------------- | 845 | -------------------------------- |
| 824 | 846 | ||
| 825 | The ``devtool add`` command attempts to detect build-time dependencies | 847 | The ``devtool add`` command attempts to detect build-time dependencies and map |
| 826 | and map them to other recipes in the system. During this mapping, the | 848 | them to other recipes in the system. During this mapping, the command fills in |
| 827 | command fills in the names of those recipes as part of the | 849 | the names of those recipes as part of the :term:`DEPENDS` variable within the |
| 828 | :term:`DEPENDS` variable within the | ||
| 829 | recipe. If a dependency cannot be mapped, ``devtool`` places a comment | 850 | recipe. If a dependency cannot be mapped, ``devtool`` places a comment |
| 830 | in the recipe indicating such. The inability to map a dependency can | 851 | in the recipe indicating such. The inability to map a dependency can |
| 831 | result from naming not being recognized or because the dependency simply | 852 | result from naming not being recognized or because the dependency simply |
| @@ -842,10 +863,8 @@ following to your recipe:: | |||
| 842 | 863 | ||
| 843 | .. note:: | 864 | .. note:: |
| 844 | 865 | ||
| 845 | The | 866 | The ``devtool add`` command often cannot distinguish between mandatory and |
| 846 | devtool add | 867 | optional dependencies. Consequently, some of the detected dependencies might |
| 847 | command often cannot distinguish between mandatory and optional | ||
| 848 | dependencies. Consequently, some of the detected dependencies might | ||
| 849 | in fact be optional. When in doubt, consult the documentation or the | 868 | in fact be optional. When in doubt, consult the documentation or the |
| 850 | configure script for the software the recipe is building for further | 869 | configure script for the software the recipe is building for further |
| 851 | details. In some cases, you might find you can substitute the | 870 | details. In some cases, you might find you can substitute the |
| @@ -855,16 +874,14 @@ following to your recipe:: | |||
| 855 | License Detection | 874 | License Detection |
| 856 | ----------------- | 875 | ----------------- |
| 857 | 876 | ||
| 858 | The ``devtool add`` command attempts to determine if the software you | 877 | The ``devtool add`` command attempts to determine if the software you are |
| 859 | are adding is able to be distributed under a common, open-source | 878 | adding is able to be distributed under a common, open-source license. If |
| 860 | license. If so, the command sets the | 879 | so, the command sets the :term:`LICENSE` value accordingly. |
| 861 | :term:`LICENSE` value accordingly. | ||
| 862 | You should double-check the value added by the command against the | 880 | You should double-check the value added by the command against the |
| 863 | documentation or source files for the software you are building and, if | 881 | documentation or source files for the software you are building and, if |
| 864 | necessary, update that :term:`LICENSE` value. | 882 | necessary, update that :term:`LICENSE` value. |
| 865 | 883 | ||
| 866 | The ``devtool add`` command also sets the | 884 | The ``devtool add`` command also sets the :term:`LIC_FILES_CHKSUM` |
| 867 | :term:`LIC_FILES_CHKSUM` | ||
| 868 | value to point to all files that appear to be license-related. Realize | 885 | value to point to all files that appear to be license-related. Realize |
| 869 | that license statements often appear in comments at the top of source | 886 | that license statements often appear in comments at the top of source |
| 870 | files or within the documentation. In such cases, the command does not | 887 | files or within the documentation. In such cases, the command does not |
| @@ -944,10 +961,9 @@ mind: | |||
| 944 | Adding Native Tools | 961 | Adding Native Tools |
| 945 | ------------------- | 962 | ------------------- |
| 946 | 963 | ||
| 947 | Often, you need to build additional tools that run on the :term:`Build | 964 | Often, you need to build additional tools that run on the :term:`Build Host` |
| 948 | Host` as opposed to | 965 | as opposed to the target. You should indicate this requirement by using one of |
| 949 | the target. You should indicate this requirement by using one of the | 966 | the following methods when you run ``devtool add``: |
| 950 | following methods when you run ``devtool add``: | ||
| 951 | 967 | ||
| 952 | - Specify the name of the recipe such that it ends with "-native". | 968 | - Specify the name of the recipe such that it ends with "-native". |
| 953 | Specifying the name like this produces a recipe that only builds for | 969 | Specifying the name like this produces a recipe that only builds for |
| @@ -971,8 +987,7 @@ Adding Node.js Modules | |||
| 971 | ---------------------- | 987 | ---------------------- |
| 972 | 988 | ||
| 973 | You can use the ``devtool add`` command two different ways to add | 989 | You can use the ``devtool add`` command two different ways to add |
| 974 | Node.js modules: 1) Through ``npm`` and, 2) from a repository or local | 990 | Node.js modules: through ``npm`` or from a repository or local source. |
| 975 | source. | ||
| 976 | 991 | ||
| 977 | Use the following form to add Node.js modules through ``npm``:: | 992 | Use the following form to add Node.js modules through ``npm``:: |
| 978 | 993 | ||
| @@ -987,7 +1002,7 @@ these behaviors ensure the reproducibility and integrity of the build. | |||
| 987 | 1002 | ||
| 988 | .. note:: | 1003 | .. note:: |
| 989 | 1004 | ||
| 990 | - You must use quotes around the URL. The ``devtool add`` does not | 1005 | - You must use quotes around the URL. ``devtool add`` does not |
| 991 | require the quotes, but the shell considers ";" as a splitter | 1006 | require the quotes, but the shell considers ";" as a splitter |
| 992 | between multiple commands. Thus, without the quotes, | 1007 | between multiple commands. Thus, without the quotes, |
| 993 | ``devtool add`` does not receive the other parts, which results in | 1008 | ``devtool add`` does not receive the other parts, which results in |
| @@ -1002,9 +1017,8 @@ repository or local source tree. To add modules this way, use | |||
| 1002 | 1017 | ||
| 1003 | $ devtool add https://github.com/diversario/node-ssdp | 1018 | $ devtool add https://github.com/diversario/node-ssdp |
| 1004 | 1019 | ||
| 1005 | In this example, ``devtool`` | 1020 | In this example, ``devtool`` fetches the specified Git repository, detects the |
| 1006 | fetches the specified Git repository, detects the code as Node.js code, | 1021 | code as Node.js code, fetches dependencies using ``npm``, and sets |
| 1007 | fetches dependencies using ``npm``, and sets | ||
| 1008 | :term:`SRC_URI` accordingly. | 1022 | :term:`SRC_URI` accordingly. |
| 1009 | 1023 | ||
| 1010 | Working With Recipes | 1024 | Working With Recipes |
| @@ -1013,17 +1027,17 @@ Working With Recipes | |||
| 1013 | When building a recipe using the ``devtool build`` command, the typical | 1027 | When building a recipe using the ``devtool build`` command, the typical |
| 1014 | build progresses as follows: | 1028 | build progresses as follows: |
| 1015 | 1029 | ||
| 1016 | 1. Fetch the source | 1030 | #. Fetch the source |
| 1017 | 1031 | ||
| 1018 | 2. Unpack the source | 1032 | #. Unpack the source |
| 1019 | 1033 | ||
| 1020 | 3. Configure the source | 1034 | #. Configure the source |
| 1021 | 1035 | ||
| 1022 | 4. Compile the source | 1036 | #. Compile the source |
| 1023 | 1037 | ||
| 1024 | 5. Install the build output | 1038 | #. Install the build output |
| 1025 | 1039 | ||
| 1026 | 6. Package the installed output | 1040 | #. Package the installed output |
| 1027 | 1041 | ||
| 1028 | For recipes in the workspace, fetching and unpacking is disabled as the | 1042 | For recipes in the workspace, fetching and unpacking is disabled as the |
| 1029 | source tree has already been prepared and is persistent. Each of these | 1043 | source tree has already been prepared and is persistent. Each of these |
| @@ -1038,9 +1052,8 @@ does not include complete instructions for building the software. | |||
| 1038 | Instead, common functionality is encapsulated in classes inherited with | 1052 | Instead, common functionality is encapsulated in classes inherited with |
| 1039 | the ``inherit`` directive. This technique leaves the recipe to describe | 1053 | the ``inherit`` directive. This technique leaves the recipe to describe |
| 1040 | just the things that are specific to the software being built. There is | 1054 | just the things that are specific to the software being built. There is |
| 1041 | a :ref:`base <ref-classes-base>` class that | 1055 | a :ref:`ref-classes-base` class that is implicitly inherited by all recipes |
| 1042 | is implicitly inherited by all recipes and provides the functionality | 1056 | and provides the functionality that most recipes typically need. |
| 1043 | that most recipes typically need. | ||
| 1044 | 1057 | ||
| 1045 | The remainder of this section presents information useful when working | 1058 | The remainder of this section presents information useful when working |
| 1046 | with recipes. | 1059 | with recipes. |
| @@ -1066,7 +1079,7 @@ links created within the source tree: | |||
| 1066 | ``${``\ :term:`D`\ ``}``. | 1079 | ``${``\ :term:`D`\ ``}``. |
| 1067 | 1080 | ||
| 1068 | - ``sysroot-destdir/``: Contains a subset of files installed within | 1081 | - ``sysroot-destdir/``: Contains a subset of files installed within |
| 1069 | ``do_install`` that have been put into the shared sysroot. For | 1082 | :ref:`ref-tasks-install` that have been put into the shared sysroot. For |
| 1070 | more information, see the | 1083 | more information, see the |
| 1071 | ":ref:`dev-manual/new-recipe:sharing files between recipes`" section. | 1084 | ":ref:`dev-manual/new-recipe:sharing files between recipes`" section. |
| 1072 | 1085 | ||
| @@ -1082,18 +1095,13 @@ Setting Configure Arguments | |||
| 1082 | 1095 | ||
| 1083 | If the software your recipe is building uses GNU autoconf, then a fixed | 1096 | If the software your recipe is building uses GNU autoconf, then a fixed |
| 1084 | set of arguments is passed to it to enable cross-compilation plus any | 1097 | set of arguments is passed to it to enable cross-compilation plus any |
| 1085 | extras specified by | 1098 | extras specified by :term:`EXTRA_OECONF` or :term:`PACKAGECONFIG_CONFARGS` |
| 1086 | :term:`EXTRA_OECONF` or | ||
| 1087 | :term:`PACKAGECONFIG_CONFARGS` | ||
| 1088 | set within the recipe. If you wish to pass additional options, add them | 1099 | set within the recipe. If you wish to pass additional options, add them |
| 1089 | to :term:`EXTRA_OECONF` or :term:`PACKAGECONFIG_CONFARGS`. Other supported build | 1100 | to :term:`EXTRA_OECONF` or :term:`PACKAGECONFIG_CONFARGS`. Other supported build |
| 1090 | tools have similar variables (e.g. | 1101 | tools have similar variables (e.g. :term:`EXTRA_OECMAKE` for CMake, |
| 1091 | :term:`EXTRA_OECMAKE` for | 1102 | :term:`EXTRA_OESCONS` for Scons, and so forth). If you need to pass anything on |
| 1092 | CMake, :term:`EXTRA_OESCONS` | 1103 | the ``make`` command line, you can use :term:`EXTRA_OEMAKE` or the |
| 1093 | for Scons, and so forth). If you need to pass anything on the ``make`` | 1104 | :term:`PACKAGECONFIG_CONFARGS` variables to do so. |
| 1094 | command line, you can use :term:`EXTRA_OEMAKE` or the | ||
| 1095 | :term:`PACKAGECONFIG_CONFARGS` | ||
| 1096 | variables to do so. | ||
| 1097 | 1105 | ||
| 1098 | You can use the ``devtool configure-help`` command to help you set the | 1106 | You can use the ``devtool configure-help`` command to help you set the |
| 1099 | arguments listed in the previous paragraph. The command determines the | 1107 | arguments listed in the previous paragraph. The command determines the |
| @@ -1117,8 +1125,7 @@ the build host. | |||
| 1117 | 1125 | ||
| 1118 | Recipes should never write files directly into the sysroot. Instead, | 1126 | Recipes should never write files directly into the sysroot. Instead, |
| 1119 | files should be installed into standard locations during the | 1127 | files should be installed into standard locations during the |
| 1120 | :ref:`ref-tasks-install` task within | 1128 | :ref:`ref-tasks-install` task within the ``${``\ :term:`D`\ ``}`` directory. A |
| 1121 | the ``${``\ :term:`D`\ ``}`` directory. A | ||
| 1122 | subset of these files automatically goes into the sysroot. The reason | 1129 | subset of these files automatically goes into the sysroot. The reason |
| 1123 | for this limitation is that almost all files that go into the sysroot | 1130 | for this limitation is that almost all files that go into the sysroot |
| 1124 | are cataloged in manifests in order to ensure they can be removed later | 1131 | are cataloged in manifests in order to ensure they can be removed later |
| @@ -1134,14 +1141,12 @@ the target device, it is important to understand packaging because the | |||
| 1134 | contents of the image are expressed in terms of packages and not | 1141 | contents of the image are expressed in terms of packages and not |
| 1135 | recipes. | 1142 | recipes. |
| 1136 | 1143 | ||
| 1137 | During the :ref:`ref-tasks-package` | 1144 | During the :ref:`ref-tasks-package` task, files installed during the |
| 1138 | task, files installed during the | 1145 | :ref:`ref-tasks-install` task are split into one main package, which is almost |
| 1139 | :ref:`ref-tasks-install` task are | 1146 | always named the same as the recipe, and into several other packages. This |
| 1140 | split into one main package, which is almost always named the same as | 1147 | separation exists because not all of those installed files are useful in every |
| 1141 | the recipe, and into several other packages. This separation exists | 1148 | image. For example, you probably do not need any of the documentation installed |
| 1142 | because not all of those installed files are useful in every image. For | 1149 | in a production image. Consequently, for each recipe the documentation |
| 1143 | example, you probably do not need any of the documentation installed in | ||
| 1144 | a production image. Consequently, for each recipe the documentation | ||
| 1145 | files are separated into a ``-doc`` package. Recipes that package | 1150 | files are separated into a ``-doc`` package. Recipes that package |
| 1146 | software containing optional modules or plugins might undergo additional | 1151 | software containing optional modules or plugins might undergo additional |
| 1147 | package splitting as well. | 1152 | package splitting as well. |
| @@ -1149,8 +1154,7 @@ package splitting as well. | |||
| 1149 | After building a recipe, you can see where files have gone by looking in | 1154 | After building a recipe, you can see where files have gone by looking in |
| 1150 | the ``oe-workdir/packages-split`` directory, which contains a | 1155 | the ``oe-workdir/packages-split`` directory, which contains a |
| 1151 | subdirectory for each package. Apart from some advanced cases, the | 1156 | subdirectory for each package. Apart from some advanced cases, the |
| 1152 | :term:`PACKAGES` and | 1157 | :term:`PACKAGES` and :term:`FILES` variables controls |
| 1153 | :term:`FILES` variables controls | ||
| 1154 | splitting. The :term:`PACKAGES` variable lists all of the packages to be | 1158 | splitting. The :term:`PACKAGES` variable lists all of the packages to be |
| 1155 | produced, while the :term:`FILES` variable specifies which files to include | 1159 | produced, while the :term:`FILES` variable specifies which files to include |
| 1156 | in each package by using an override to specify the package. For | 1160 | in each package by using an override to specify the package. For |
| @@ -1192,16 +1196,11 @@ target machine. | |||
| 1192 | 1196 | ||
| 1193 | .. note:: | 1197 | .. note:: |
| 1194 | 1198 | ||
| 1195 | The | 1199 | The ``devtool deploy-target`` and ``devtool undeploy-target`` commands do |
| 1196 | devtool deploy-target | 1200 | not currently interact with any package management system on the target |
| 1197 | and | 1201 | device (e.g. RPM or OPKG). Consequently, you should not intermingle |
| 1198 | devtool undeploy-target | 1202 | ``devtool deploy-target`` and package manager operations on the target |
| 1199 | commands do not currently interact with any package management system | 1203 | device. Doing so could result in a conflicting set of files. |
| 1200 | on the target device (e.g. RPM or OPKG). Consequently, you should not | ||
| 1201 | intermingle | ||
| 1202 | devtool deploy-target | ||
| 1203 | and package manager operations on the target device. Doing so could | ||
| 1204 | result in a conflicting set of files. | ||
| 1205 | 1204 | ||
| 1206 | Installing Additional Items Into the Extensible SDK | 1205 | Installing Additional Items Into the Extensible SDK |
| 1207 | =================================================== | 1206 | =================================================== |
| @@ -1215,9 +1214,25 @@ need to link to libGL but you are not sure which recipe provides libGL. | |||
| 1215 | You can use the following command to find out:: | 1214 | You can use the following command to find out:: |
| 1216 | 1215 | ||
| 1217 | $ devtool search libGL mesa | 1216 | $ devtool search libGL mesa |
| 1217 | A free implementation of the OpenGL API | ||
| 1218 | |||
| 1219 | Once you know the recipe | ||
| 1220 | (i.e. ``mesa`` in this example), you can install it. | ||
| 1218 | 1221 | ||
| 1219 | A free implementation of the OpenGL API Once you know the recipe | 1222 | When using the extensible SDK directly in a Yocto build |
| 1220 | (i.e. ``mesa`` in this example), you can install it:: | 1223 | ------------------------------------------------------- |
| 1224 | |||
| 1225 | In this scenario, the Yocto build tooling, e.g. ``bitbake`` | ||
| 1226 | is directly accessible to build additional items, and it | ||
| 1227 | can simply be executed directly:: | ||
| 1228 | |||
| 1229 | $ bitbake mesa | ||
| 1230 | $ bitbake build-sysroots | ||
| 1231 | |||
| 1232 | When using a standalone installer for the Extensible SDK | ||
| 1233 | -------------------------------------------------------- | ||
| 1234 | |||
| 1235 | :: | ||
| 1221 | 1236 | ||
| 1222 | $ devtool sdk-install mesa | 1237 | $ devtool sdk-install mesa |
| 1223 | 1238 | ||
| @@ -1244,13 +1259,13 @@ To update your installed SDK, use ``devtool`` as follows:: | |||
| 1244 | 1259 | ||
| 1245 | $ devtool sdk-update | 1260 | $ devtool sdk-update |
| 1246 | 1261 | ||
| 1247 | The previous command assumes your SDK provider has set the | 1262 | The previous command assumes your SDK provider has set the default update URL |
| 1248 | default update URL for you through the :term:`SDK_UPDATE_URL` | 1263 | for you through the :term:`SDK_UPDATE_URL` variable as described in the |
| 1249 | variable as described in the | ||
| 1250 | ":ref:`sdk-manual/appendix-customizing:Providing Updates to the Extensible SDK After Installation`" | 1264 | ":ref:`sdk-manual/appendix-customizing:Providing Updates to the Extensible SDK After Installation`" |
| 1251 | section. If the SDK provider has not set that default URL, you need to | 1265 | section. If the SDK provider has not set that default URL, you need to |
| 1252 | specify it yourself in the command as follows: $ devtool sdk-update | 1266 | specify it yourself in the command as follows:: |
| 1253 | path_to_update_directory | 1267 | |
| 1268 | $ devtool sdk-update path_to_update_directory | ||
| 1254 | 1269 | ||
| 1255 | .. note:: | 1270 | .. note:: |
| 1256 | 1271 | ||
| @@ -1267,15 +1282,15 @@ those customers need an SDK that has custom libraries. In such a case, | |||
| 1267 | you can produce a derivative SDK based on the currently installed SDK | 1282 | you can produce a derivative SDK based on the currently installed SDK |
| 1268 | fairly easily by following these steps: | 1283 | fairly easily by following these steps: |
| 1269 | 1284 | ||
| 1270 | 1. If necessary, install an extensible SDK that you want to use as a | 1285 | #. If necessary, install an extensible SDK that you want to use as a |
| 1271 | base for your derivative SDK. | 1286 | base for your derivative SDK. |
| 1272 | 1287 | ||
| 1273 | 2. Source the environment script for the SDK. | 1288 | #. Source the environment script for the SDK. |
| 1274 | 1289 | ||
| 1275 | 3. Add the extra libraries or other components you want by using the | 1290 | #. Add the extra libraries or other components you want by using the |
| 1276 | ``devtool add`` command. | 1291 | ``devtool add`` command. |
| 1277 | 1292 | ||
| 1278 | 4. Run the ``devtool build-sdk`` command. | 1293 | #. Run the ``devtool build-sdk`` command. |
| 1279 | 1294 | ||
| 1280 | The previous steps take the recipes added to the workspace and construct | 1295 | The previous steps take the recipes added to the workspace and construct |
| 1281 | a new SDK installer that contains those recipes and the resulting binary | 1296 | a new SDK installer that contains those recipes and the resulting binary |
