diff options
Diffstat (limited to 'documentation/sdk-manual')
-rw-r--r-- | documentation/sdk-manual/appendix-customizing.rst | 27 | ||||
-rw-r--r-- | documentation/sdk-manual/appendix-obtain.rst | 30 | ||||
-rw-r--r-- | documentation/sdk-manual/extensible.rst | 81 | ||||
-rw-r--r-- | documentation/sdk-manual/using.rst | 6 | ||||
-rw-r--r-- | documentation/sdk-manual/working-projects.rst | 60 |
5 files changed, 68 insertions, 136 deletions
diff --git a/documentation/sdk-manual/appendix-customizing.rst b/documentation/sdk-manual/appendix-customizing.rst index 8e7115046b..fb2d78452b 100644 --- a/documentation/sdk-manual/appendix-customizing.rst +++ b/documentation/sdk-manual/appendix-customizing.rst | |||
@@ -149,8 +149,7 @@ from the :term:`DISTRO` variable. | |||
149 | The | 149 | The |
150 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` | 150 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` |
151 | class defines the default value of the ``SDK_TITLE`` variable as | 151 | class defines the default value of the ``SDK_TITLE`` variable as |
152 | follows: | 152 | follows:: |
153 | :: | ||
154 | 153 | ||
155 | SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" | 154 | SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" |
156 | 155 | ||
@@ -162,8 +161,7 @@ an example, assume you have your own layer for your distribution named | |||
162 | does the default "poky" distribution. If so, you could update the | 161 | does the default "poky" distribution. If so, you could update the |
163 | ``SDK_TITLE`` variable in the | 162 | ``SDK_TITLE`` variable in the |
164 | ``~/meta-mydistro/conf/distro/mydistro.conf`` file using the following | 163 | ``~/meta-mydistro/conf/distro/mydistro.conf`` file using the following |
165 | form: | 164 | form:: |
166 | :: | ||
167 | 165 | ||
168 | SDK_TITLE = "your_title" | 166 | SDK_TITLE = "your_title" |
169 | 167 | ||
@@ -194,8 +192,7 @@ the installed SDKs to update the installed SDKs by using the | |||
194 | 3. Build the extensible SDK normally (i.e., use the | 192 | 3. Build the extensible SDK normally (i.e., use the |
195 | ``bitbake -c populate_sdk_ext`` imagename command). | 193 | ``bitbake -c populate_sdk_ext`` imagename command). |
196 | 194 | ||
197 | 4. Publish the SDK using the following command: | 195 | 4. Publish the SDK using the following command:: |
198 | :: | ||
199 | 196 | ||
200 | $ oe-publish-sdk some_path/sdk-installer.sh path_to_shared_http_directory | 197 | $ oe-publish-sdk some_path/sdk-installer.sh path_to_shared_http_directory |
201 | 198 | ||
@@ -218,8 +215,7 @@ installation directory for the SDK is based on the | |||
218 | :term:`SDKEXTPATH` variables from | 215 | :term:`SDKEXTPATH` variables from |
219 | within the | 216 | within the |
220 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` | 217 | :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` |
221 | class as follows: | 218 | class as follows:: |
222 | :: | ||
223 | 219 | ||
224 | SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" | 220 | SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" |
225 | 221 | ||
@@ -236,8 +232,7 @@ assume you have your own layer for your distribution named | |||
236 | does the default "poky" distribution. If so, you could update the | 232 | does the default "poky" distribution. If so, you could update the |
237 | ``SDKEXTPATH`` variable in the | 233 | ``SDKEXTPATH`` variable in the |
238 | ``~/meta-mydistro/conf/distro/mydistro.conf`` file using the following | 234 | ``~/meta-mydistro/conf/distro/mydistro.conf`` file using the following |
239 | form: | 235 | form:: |
240 | :: | ||
241 | 236 | ||
242 | SDKEXTPATH = "some_path_for_your_installed_sdk" | 237 | SDKEXTPATH = "some_path_for_your_installed_sdk" |
243 | 238 | ||
@@ -272,8 +267,7 @@ source, you need to do a number of things: | |||
272 | 267 | ||
273 | 3. Set the appropriate configuration so that the produced SDK knows how | 268 | 3. Set the appropriate configuration so that the produced SDK knows how |
274 | to find the configuration. The variable you need to set is | 269 | to find the configuration. The variable you need to set is |
275 | :term:`SSTATE_MIRRORS`: | 270 | :term:`SSTATE_MIRRORS`:: |
276 | :: | ||
277 | 271 | ||
278 | SSTATE_MIRRORS = "file://.* http://example.com/some_path/sstate-cache/PATH" | 272 | SSTATE_MIRRORS = "file://.* http://example.com/some_path/sstate-cache/PATH" |
279 | 273 | ||
@@ -287,8 +281,7 @@ source, you need to do a number of things: | |||
287 | side, and its contents will not interfere with the build), then | 281 | side, and its contents will not interfere with the build), then |
288 | you can set the variable in your ``local.conf`` or custom distro | 282 | you can set the variable in your ``local.conf`` or custom distro |
289 | configuration file. You can then "whitelist" the variable through | 283 | configuration file. You can then "whitelist" the variable through |
290 | to the SDK by adding the following: | 284 | to the SDK by adding the following:: |
291 | :: | ||
292 | 285 | ||
293 | SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS" | 286 | SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS" |
294 | 287 | ||
@@ -313,8 +306,7 @@ everything needed to reconstruct the image for which the SDK was built. | |||
313 | This bundling can lead to an SDK installer file that is a Gigabyte or | 306 | This bundling can lead to an SDK installer file that is a Gigabyte or |
314 | more in size. If the size of this file causes a problem, you can build | 307 | more in size. If the size of this file causes a problem, you can build |
315 | an SDK that has just enough in it to install and provide access to the | 308 | an SDK that has just enough in it to install and provide access to the |
316 | ``devtool command`` by setting the following in your configuration: | 309 | ``devtool command`` by setting the following in your configuration:: |
317 | :: | ||
318 | 310 | ||
319 | SDK_EXT_TYPE = "minimal" | 311 | SDK_EXT_TYPE = "minimal" |
320 | 312 | ||
@@ -336,8 +328,7 @@ information enables the ``devtool search`` command to return useful | |||
336 | results. | 328 | results. |
337 | 329 | ||
338 | To facilitate this wider range of information, you would need to set the | 330 | To facilitate this wider range of information, you would need to set the |
339 | following: | 331 | following:: |
340 | :: | ||
341 | 332 | ||
342 | SDK_INCLUDE_PKGDATA = "1" | 333 | SDK_INCLUDE_PKGDATA = "1" |
343 | 334 | ||
diff --git a/documentation/sdk-manual/appendix-obtain.rst b/documentation/sdk-manual/appendix-obtain.rst index 3c1dc52d19..0ce828aa29 100644 --- a/documentation/sdk-manual/appendix-obtain.rst +++ b/documentation/sdk-manual/appendix-obtain.rst | |||
@@ -25,8 +25,7 @@ Follow these steps to locate and hand-install the toolchain: | |||
25 | download the installer appropriate for your build host, target | 25 | download the installer appropriate for your build host, target |
26 | hardware, and image type. | 26 | hardware, and image type. |
27 | 27 | ||
28 | The installer files (``*.sh``) follow this naming convention: | 28 | The installer files (``*.sh``) follow this naming convention:: |
29 | :: | ||
30 | 29 | ||
31 | poky-glibc-host_system-core-image-type-arch-toolchain[-ext]-release.sh | 30 | poky-glibc-host_system-core-image-type-arch-toolchain[-ext]-release.sh |
32 | 31 | ||
@@ -55,15 +54,13 @@ Follow these steps to locate and hand-install the toolchain: | |||
55 | 54 | ||
56 | For example, if your build host is a 64-bit x86 system and you need | 55 | For example, if your build host is a 64-bit x86 system and you need |
57 | an extended SDK for a 64-bit core2 target, go into the ``x86_64`` | 56 | an extended SDK for a 64-bit core2 target, go into the ``x86_64`` |
58 | folder and download the following installer: | 57 | folder and download the following installer:: |
59 | :: | ||
60 | 58 | ||
61 | poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh | 59 | poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh |
62 | 60 | ||
63 | 4. *Run the Installer:* Be sure you have execution privileges and run | 61 | 4. *Run the Installer:* Be sure you have execution privileges and run |
64 | the installer. Following is an example from the ``Downloads`` | 62 | the installer. Following is an example from the ``Downloads`` |
65 | directory: | 63 | directory:: |
66 | :: | ||
67 | 64 | ||
68 | $ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh | 65 | $ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh |
69 | 66 | ||
@@ -132,8 +129,7 @@ build the SDK installer. Follow these steps: | |||
132 | using to build the installer. If | 129 | using to build the installer. If |
133 | SDKMACHINE | 130 | SDKMACHINE |
134 | is not set appropriately, the build fails and provides an error | 131 | is not set appropriately, the build fails and provides an error |
135 | message similar to the following: | 132 | message similar to the following:: |
136 | :: | ||
137 | 133 | ||
138 | The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is | 134 | The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is |
139 | set to i686 (likely via setting SDKMACHINE) which is different from the architecture of the build machine (x86_64). | 135 | set to i686 (likely via setting SDKMACHINE) which is different from the architecture of the build machine (x86_64). |
@@ -144,8 +140,7 @@ build the SDK installer. Follow these steps: | |||
144 | SDK and populate the SDK image, use the following command form. Be | 140 | SDK and populate the SDK image, use the following command form. Be |
145 | sure to replace image with an image (e.g. "core-image-sato"): $ | 141 | sure to replace image with an image (e.g. "core-image-sato"): $ |
146 | bitbake image -c populate_sdk You can do the same for the extensible | 142 | bitbake image -c populate_sdk You can do the same for the extensible |
147 | SDK using this command form: | 143 | SDK using this command form:: |
148 | :: | ||
149 | 144 | ||
150 | $ bitbake image -c populate_sdk_ext | 145 | $ bitbake image -c populate_sdk_ext |
151 | 146 | ||
@@ -170,8 +165,7 @@ build the SDK installer. Follow these steps: | |||
170 | libc-staticdev" | 165 | libc-staticdev" |
171 | 166 | ||
172 | 7. *Run the Installer:* You can now run the SDK installer from | 167 | 7. *Run the Installer:* You can now run the SDK installer from |
173 | ``tmp/deploy/sdk`` in the Build Directory. Following is an example: | 168 | ``tmp/deploy/sdk`` in the Build Directory. Following is an example:: |
174 | :: | ||
175 | 169 | ||
176 | $ cd poky/build/tmp/deploy/sdk | 170 | $ cd poky/build/tmp/deploy/sdk |
177 | $ ./poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh | 171 | $ ./poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh |
@@ -211,8 +205,7 @@ Follow these steps to extract the root filesystem: | |||
211 | which you can use with QEMU directly. | 205 | which you can use with QEMU directly. |
212 | 206 | ||
213 | The pre-built root filesystem image files follow these naming | 207 | The pre-built root filesystem image files follow these naming |
214 | conventions: | 208 | conventions:: |
215 | :: | ||
216 | 209 | ||
217 | core-image-profile-arch.tar.bz2 | 210 | core-image-profile-arch.tar.bz2 |
218 | 211 | ||
@@ -233,8 +226,7 @@ Follow these steps to extract the root filesystem: | |||
233 | 226 | ||
234 | For example, if you plan on using a BeagleBone device as your target | 227 | For example, if you plan on using a BeagleBone device as your target |
235 | hardware and your image is a ``core-image-sato-sdk`` image, you can | 228 | hardware and your image is a ``core-image-sato-sdk`` image, you can |
236 | download the following file: | 229 | download the following file:: |
237 | :: | ||
238 | 230 | ||
239 | core-image-sato-sdk-beaglebone-yocto.tar.bz2 | 231 | core-image-sato-sdk-beaglebone-yocto.tar.bz2 |
240 | 232 | ||
@@ -246,8 +238,7 @@ Follow these steps to extract the root filesystem: | |||
246 | installed the toolchain (e.g. ``poky_sdk``). | 238 | installed the toolchain (e.g. ``poky_sdk``). |
247 | 239 | ||
248 | Following is an example based on the toolchain installed in the | 240 | Following is an example based on the toolchain installed in the |
249 | ":ref:`sdk-manual/appendix-obtain:locating pre-built sdk installers`" section: | 241 | ":ref:`sdk-manual/appendix-obtain:locating pre-built sdk installers`" section:: |
250 | :: | ||
251 | 242 | ||
252 | $ source poky_sdk/environment-setup-core2-64-poky-linux | 243 | $ source poky_sdk/environment-setup-core2-64-poky-linux |
253 | 244 | ||
@@ -258,8 +249,7 @@ Follow these steps to extract the root filesystem: | |||
258 | from a previously built root filesystem image that was downloaded | 249 | from a previously built root filesystem image that was downloaded |
259 | from the :yocto_dl:`Index of Releases </releases/yocto/yocto-&DISTRO;/machines/>`. | 250 | from the :yocto_dl:`Index of Releases </releases/yocto/yocto-&DISTRO;/machines/>`. |
260 | This command extracts the root filesystem into the ``core2-64-sato`` | 251 | This command extracts the root filesystem into the ``core2-64-sato`` |
261 | directory: | 252 | directory:: |
262 | :: | ||
263 | 253 | ||
264 | $ runqemu-extract-sdk ~/Downloads/core-image-sato-sdk-beaglebone-yocto.tar.bz2 ~/beaglebone-sato | 254 | $ runqemu-extract-sdk ~/Downloads/core-image-sato-sdk-beaglebone-yocto.tar.bz2 ~/beaglebone-sato |
265 | 255 | ||
diff --git a/documentation/sdk-manual/extensible.rst b/documentation/sdk-manual/extensible.rst index baa432ef3b..04bafaed9e 100644 --- a/documentation/sdk-manual/extensible.rst +++ b/documentation/sdk-manual/extensible.rst | |||
@@ -59,8 +59,7 @@ The names of the tarball installer scripts are such that a string | |||
59 | representing the host system appears first in the filename and then is | 59 | representing the host system appears first in the filename and then is |
60 | immediately followed by a string representing the target architecture. | 60 | immediately followed by a string representing the target architecture. |
61 | An extensible SDK has the string "-ext" as part of the name. Following | 61 | An extensible SDK has the string "-ext" as part of the name. Following |
62 | is the general form: | 62 | is the general form:: |
63 | :: | ||
64 | 63 | ||
65 | poky-glibc-host_system-image_type-arch-toolchain-ext-release_version.sh | 64 | poky-glibc-host_system-image_type-arch-toolchain-ext-release_version.sh |
66 | 65 | ||
@@ -83,8 +82,7 @@ is the general form: | |||
83 | 82 | ||
84 | For example, the following SDK installer is for a 64-bit | 83 | For example, the following SDK installer is for a 64-bit |
85 | development host system and a i586-tuned target architecture based off | 84 | development host system and a i586-tuned target architecture based off |
86 | the SDK for ``core-image-sato`` and using the current &DISTRO; snapshot: | 85 | the SDK for ``core-image-sato`` and using the current &DISTRO; snapshot:: |
87 | :: | ||
88 | 86 | ||
89 | poky-glibc-x86_64-core-image-sato-i586-toolchain-ext-&DISTRO;.sh | 87 | poky-glibc-x86_64-core-image-sato-i586-toolchain-ext-&DISTRO;.sh |
90 | 88 | ||
@@ -150,8 +148,7 @@ begin with the string "``environment-setup``" and include as part of | |||
150 | their name the tuned target architecture. As an example, the following | 148 | their name the tuned target architecture. As an example, the following |
151 | commands set the working directory to where the SDK was installed and | 149 | commands set the working directory to where the SDK was installed and |
152 | then source the environment setup script. In this example, the setup | 150 | then source the environment setup script. In this example, the setup |
153 | script is for an IA-based target machine using i586 tuning: | 151 | script is for an IA-based target machine using i586 tuning:: |
154 | :: | ||
155 | 152 | ||
156 | $ cd /home/scottrif/poky_sdk | 153 | $ cd /home/scottrif/poky_sdk |
157 | $ source environment-setup-core2-64-poky-linux | 154 | $ source environment-setup-core2-64-poky-linux |
@@ -258,8 +255,7 @@ command: | |||
258 | to be extracted. In this situation, the source code is extracted | 255 | to be extracted. In this situation, the source code is extracted |
259 | to the default workspace - you do not want the files in some | 256 | to the default workspace - you do not want the files in some |
260 | specific location outside of the workspace. Thus, everything you | 257 | specific location outside of the workspace. Thus, everything you |
261 | need will be located in the workspace: | 258 | need will be located in the workspace:: |
262 | :: | ||
263 | 259 | ||
264 | $ devtool add recipe fetchuri | 260 | $ devtool add recipe fetchuri |
265 | 261 | ||
@@ -283,8 +279,7 @@ command: | |||
283 | Furthermore, the first positional argument srctree in this case | 279 | Furthermore, the first positional argument srctree in this case |
284 | identifies where the ``devtool add`` command will locate the | 280 | identifies where the ``devtool add`` command will locate the |
285 | extracted code outside of the workspace. You need to specify an | 281 | extracted code outside of the workspace. You need to specify an |
286 | empty directory: | 282 | empty directory:: |
287 | :: | ||
288 | 283 | ||
289 | $ devtool add recipe srctree fetchuri | 284 | $ devtool add recipe srctree fetchuri |
290 | 285 | ||
@@ -300,8 +295,7 @@ command: | |||
300 | ``devtool`` workspace. | 295 | ``devtool`` workspace. |
301 | 296 | ||
302 | The following command provides a new recipe name and identifies | 297 | The following command provides a new recipe name and identifies |
303 | the existing source tree location: | 298 | the existing source tree location:: |
304 | :: | ||
305 | 299 | ||
306 | $ devtool add recipe srctree | 300 | $ devtool add recipe srctree |
307 | 301 | ||
@@ -317,8 +311,7 @@ command: | |||
317 | 311 | ||
318 | 2. *Edit the Recipe*: You can use ``devtool edit-recipe`` to open up the | 312 | 2. *Edit the Recipe*: You can use ``devtool edit-recipe`` to open up the |
319 | editor as defined by the ``$EDITOR`` environment variable and modify | 313 | editor as defined by the ``$EDITOR`` environment variable and modify |
320 | the file: | 314 | the file:: |
321 | :: | ||
322 | 315 | ||
323 | $ devtool edit-recipe recipe | 316 | $ devtool edit-recipe recipe |
324 | 317 | ||
@@ -338,8 +331,7 @@ command: | |||
338 | On the other hand, if you want an image to contain the recipe's | 331 | On the other hand, if you want an image to contain the recipe's |
339 | packages from the workspace for immediate deployment onto a device | 332 | packages from the workspace for immediate deployment onto a device |
340 | (e.g. for testing purposes), you can use the ``devtool build-image`` | 333 | (e.g. for testing purposes), you can use the ``devtool build-image`` |
341 | command: | 334 | command:: |
342 | :: | ||
343 | 335 | ||
344 | $ devtool build-image image | 336 | $ devtool build-image image |
345 | 337 | ||
@@ -435,8 +427,7 @@ command: | |||
435 | outside the workspace (i.e. ``meta-``\ layername). | 427 | outside the workspace (i.e. ``meta-``\ layername). |
436 | 428 | ||
437 | The following command identifies the recipe and, by default, | 429 | The following command identifies the recipe and, by default, |
438 | extracts the source files: | 430 | extracts the source files:: |
439 | :: | ||
440 | 431 | ||
441 | $ devtool modify recipe | 432 | $ devtool modify recipe |
442 | 433 | ||
@@ -474,8 +465,7 @@ command: | |||
474 | The following command tells ``devtool`` the recipe with which to | 465 | The following command tells ``devtool`` the recipe with which to |
475 | work and, in this case, identifies a local area for the extracted | 466 | work and, in this case, identifies a local area for the extracted |
476 | source files that exists outside of the default ``devtool`` | 467 | source files that exists outside of the default ``devtool`` |
477 | workspace: | 468 | workspace:: |
478 | :: | ||
479 | 469 | ||
480 | $ devtool modify recipe srctree | 470 | $ devtool modify recipe srctree |
481 | 471 | ||
@@ -508,8 +498,7 @@ command: | |||
508 | The following command tells ``devtool`` the recipe with which to | 498 | The following command tells ``devtool`` the recipe with which to |
509 | work, uses the "-n" option to indicate source does not need to be | 499 | work, uses the "-n" option to indicate source does not need to be |
510 | extracted, and uses srctree to point to the previously extracted | 500 | extracted, and uses srctree to point to the previously extracted |
511 | source files: | 501 | source files:: |
512 | :: | ||
513 | 502 | ||
514 | $ devtool modify -n recipe srctree | 503 | $ devtool modify -n recipe srctree |
515 | 504 | ||
@@ -532,8 +521,7 @@ command: | |||
532 | depends on what you are going to do with the new code. | 521 | depends on what you are going to do with the new code. |
533 | 522 | ||
534 | If you need to eventually move the build output to the target | 523 | If you need to eventually move the build output to the target |
535 | hardware, use the following ``devtool`` command: | 524 | hardware, use the following ``devtool`` command:: |
536 | :: | ||
537 | 525 | ||
538 | $ devtool build recipe | 526 | $ devtool build recipe |
539 | 527 | ||
@@ -556,8 +544,7 @@ command: | |||
556 | development machine. | 544 | development machine. |
557 | 545 | ||
558 | You can deploy your build output to that target hardware by using the | 546 | You can deploy your build output to that target hardware by using the |
559 | ``devtool deploy-target`` command: | 547 | ``devtool deploy-target`` command:: |
560 | :: | ||
561 | 548 | ||
562 | $ devtool deploy-target recipe target | 549 | $ devtool deploy-target recipe target |
563 | 550 | ||
@@ -651,8 +638,7 @@ The following diagram shows the common development flow used with the | |||
651 | A common situation is where third-party software has undergone a | 638 | A common situation is where third-party software has undergone a |
652 | revision so that it has been upgraded. The recipe you have access to | 639 | revision so that it has been upgraded. The recipe you have access to |
653 | is likely in your own layer. Thus, you need to upgrade the recipe to | 640 | is likely in your own layer. Thus, you need to upgrade the recipe to |
654 | use the newer version of the software: | 641 | use the newer version of the software:: |
655 | :: | ||
656 | 642 | ||
657 | $ devtool upgrade -V version recipe | 643 | $ devtool upgrade -V version recipe |
658 | 644 | ||
@@ -703,16 +689,14 @@ The following diagram shows the common development flow used with the | |||
703 | depends on what you are going to do with the new code. | 689 | depends on what you are going to do with the new code. |
704 | 690 | ||
705 | If you need to eventually move the build output to the target | 691 | If you need to eventually move the build output to the target |
706 | hardware, use the following ``devtool`` command: | 692 | hardware, use the following ``devtool`` command:: |
707 | :: | ||
708 | 693 | ||
709 | $ devtool build recipe | 694 | $ devtool build recipe |
710 | 695 | ||
711 | On the other hand, if you want an image to contain the recipe's | 696 | On the other hand, if you want an image to contain the recipe's |
712 | packages from the workspace for immediate deployment onto a device | 697 | packages from the workspace for immediate deployment onto a device |
713 | (e.g. for testing purposes), you can use the ``devtool build-image`` | 698 | (e.g. for testing purposes), you can use the ``devtool build-image`` |
714 | command: | 699 | command:: |
715 | :: | ||
716 | 700 | ||
717 | $ devtool build-image image | 701 | $ devtool build-image image |
718 | 702 | ||
@@ -828,8 +812,7 @@ name and version, just the name, or just the version as part of the | |||
828 | command line. | 812 | command line. |
829 | 813 | ||
830 | Sometimes the name or version determined from the source tree might be | 814 | Sometimes the name or version determined from the source tree might be |
831 | incorrect. For such a case, you must reset the recipe: | 815 | incorrect. For such a case, you must reset the recipe:: |
832 | :: | ||
833 | 816 | ||
834 | $ devtool reset -n recipename | 817 | $ devtool reset -n recipename |
835 | 818 | ||
@@ -853,8 +836,7 @@ the ``DEPENDS`` variable in the original recipe to include the new | |||
853 | recipe. | 836 | recipe. |
854 | 837 | ||
855 | If you need to add runtime dependencies, you can do so by adding the | 838 | If you need to add runtime dependencies, you can do so by adding the |
856 | following to your recipe: | 839 | following to your recipe:: |
857 | :: | ||
858 | 840 | ||
859 | RDEPENDS_${PN} += "dependency1 dependency2 ..." | 841 | RDEPENDS_${PN} += "dependency1 dependency2 ..." |
860 | 842 | ||
@@ -938,8 +920,7 @@ mind: | |||
938 | the command line, add the variable setting to | 920 | the command line, add the variable setting to |
939 | :term:`EXTRA_OEMAKE` or | 921 | :term:`EXTRA_OEMAKE` or |
940 | :term:`PACKAGECONFIG_CONFARGS` | 922 | :term:`PACKAGECONFIG_CONFARGS` |
941 | within the recipe. Here is an example using ``EXTRA_OEMAKE``: | 923 | within the recipe. Here is an example using ``EXTRA_OEMAKE``:: |
942 | :: | ||
943 | 924 | ||
944 | EXTRA_OEMAKE += "'CC=${CC}' 'CXX=${CXX}'" | 925 | EXTRA_OEMAKE += "'CC=${CC}' 'CXX=${CXX}'" |
945 | 926 | ||
@@ -993,8 +974,7 @@ You can use the ``devtool add`` command two different ways to add | |||
993 | Node.js modules: 1) Through ``npm`` and, 2) from a repository or local | 974 | Node.js modules: 1) Through ``npm`` and, 2) from a repository or local |
994 | source. | 975 | source. |
995 | 976 | ||
996 | Use the following form to add Node.js modules through ``npm``: | 977 | Use the following form to add Node.js modules through ``npm``:: |
997 | :: | ||
998 | 978 | ||
999 | $ devtool add "npm://registry.npmjs.org;name=forever;version=0.15.1" | 979 | $ devtool add "npm://registry.npmjs.org;name=forever;version=0.15.1" |
1000 | 980 | ||
@@ -1018,8 +998,7 @@ these behaviors ensure the reproducibility and integrity of the build. | |||
1018 | 998 | ||
1019 | As mentioned earlier, you can also add Node.js modules directly from a | 999 | As mentioned earlier, you can also add Node.js modules directly from a |
1020 | repository or local source tree. To add modules this way, use | 1000 | repository or local source tree. To add modules this way, use |
1021 | ``devtool add`` in the following form: | 1001 | ``devtool add`` in the following form:: |
1022 | :: | ||
1023 | 1002 | ||
1024 | $ devtool add https://github.com/diversario/node-ssdp | 1003 | $ devtool add https://github.com/diversario/node-ssdp |
1025 | 1004 | ||
@@ -1196,15 +1175,13 @@ need to restore the original files that existed prior to running the | |||
1196 | ``devtool deploy-target`` command. Because the ``devtool deploy-target`` | 1175 | ``devtool deploy-target`` command. Because the ``devtool deploy-target`` |
1197 | command backs up any files it overwrites, you can use the | 1176 | command backs up any files it overwrites, you can use the |
1198 | ``devtool undeploy-target`` command to restore those files and remove | 1177 | ``devtool undeploy-target`` command to restore those files and remove |
1199 | any other files the recipe deployed. Consider the following example: | 1178 | any other files the recipe deployed. Consider the following example:: |
1200 | :: | ||
1201 | 1179 | ||
1202 | $ devtool undeploy-target lighttpd root@192.168.7.2 | 1180 | $ devtool undeploy-target lighttpd root@192.168.7.2 |
1203 | 1181 | ||
1204 | If you have deployed | 1182 | If you have deployed |
1205 | multiple applications, you can remove them all using the "-a" option | 1183 | multiple applications, you can remove them all using the "-a" option |
1206 | thus restoring the target device to its original state: | 1184 | thus restoring the target device to its original state:: |
1207 | :: | ||
1208 | 1185 | ||
1209 | $ devtool undeploy-target -a root@192.168.7.2 | 1186 | $ devtool undeploy-target -a root@192.168.7.2 |
1210 | 1187 | ||
@@ -1235,22 +1212,19 @@ populated on-demand. Sometimes you must explicitly install extra items | |||
1235 | into the SDK. If you need these extra items, you can first search for | 1212 | into the SDK. If you need these extra items, you can first search for |
1236 | the items using the ``devtool search`` command. For example, suppose you | 1213 | the items using the ``devtool search`` command. For example, suppose you |
1237 | need to link to libGL but you are not sure which recipe provides libGL. | 1214 | need to link to libGL but you are not sure which recipe provides libGL. |
1238 | You can use the following command to find out: | 1215 | You can use the following command to find out:: |
1239 | :: | ||
1240 | 1216 | ||
1241 | $ devtool search libGL mesa | 1217 | $ devtool search libGL mesa |
1242 | 1218 | ||
1243 | A free implementation of the OpenGL API Once you know the recipe | 1219 | A free implementation of the OpenGL API Once you know the recipe |
1244 | (i.e. ``mesa`` in this example), you can install it: | 1220 | (i.e. ``mesa`` in this example), you can install it:: |
1245 | :: | ||
1246 | 1221 | ||
1247 | $ devtool sdk-install mesa | 1222 | $ devtool sdk-install mesa |
1248 | 1223 | ||
1249 | By default, the ``devtool sdk-install`` command assumes | 1224 | By default, the ``devtool sdk-install`` command assumes |
1250 | the item is available in pre-built form from your SDK provider. If the | 1225 | the item is available in pre-built form from your SDK provider. If the |
1251 | item is not available and it is acceptable to build the item from | 1226 | item is not available and it is acceptable to build the item from |
1252 | source, you can add the "-s" option as follows: | 1227 | source, you can add the "-s" option as follows:: |
1253 | :: | ||
1254 | 1228 | ||
1255 | $ devtool sdk-install -s mesa | 1229 | $ devtool sdk-install -s mesa |
1256 | 1230 | ||
@@ -1266,8 +1240,7 @@ If you are working with an installed extensible SDK that gets | |||
1266 | occasionally updated (e.g. a third-party SDK), then you will need to | 1240 | occasionally updated (e.g. a third-party SDK), then you will need to |
1267 | manually "pull down" the updates into the installed SDK. | 1241 | manually "pull down" the updates into the installed SDK. |
1268 | 1242 | ||
1269 | To update your installed SDK, use ``devtool`` as follows: | 1243 | To update your installed SDK, use ``devtool`` as follows:: |
1270 | :: | ||
1271 | 1244 | ||
1272 | $ devtool sdk-update | 1245 | $ devtool sdk-update |
1273 | 1246 | ||
diff --git a/documentation/sdk-manual/using.rst b/documentation/sdk-manual/using.rst index 62967f5572..fa0e8d4098 100644 --- a/documentation/sdk-manual/using.rst +++ b/documentation/sdk-manual/using.rst | |||
@@ -77,8 +77,7 @@ immediately followed by a string representing the target architecture. | |||
77 | 77 | ||
78 | For example, the following SDK installer is for a 64-bit | 78 | For example, the following SDK installer is for a 64-bit |
79 | development host system and a i586-tuned target architecture based off | 79 | development host system and a i586-tuned target architecture based off |
80 | the SDK for ``core-image-sato`` and using the current DISTRO snapshot: | 80 | the SDK for ``core-image-sato`` and using the current DISTRO snapshot:: |
81 | :: | ||
82 | 81 | ||
83 | poky-glibc-x86_64-core-image-sato-i586-toolchain-DISTRO.sh | 82 | poky-glibc-x86_64-core-image-sato-i586-toolchain-DISTRO.sh |
84 | 83 | ||
@@ -141,8 +140,7 @@ begin with the string "``environment-setup``" and include as part of | |||
141 | their name the tuned target architecture. As an example, the following | 140 | their name the tuned target architecture. As an example, the following |
142 | commands set the working directory to where the SDK was installed and | 141 | commands set the working directory to where the SDK was installed and |
143 | then source the environment setup script. In this example, the setup | 142 | then source the environment setup script. In this example, the setup |
144 | script is for an IA-based target machine using i586 tuning: | 143 | script is for an IA-based target machine using i586 tuning:: |
145 | :: | ||
146 | 144 | ||
147 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux | 145 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux |
148 | 146 | ||
diff --git a/documentation/sdk-manual/working-projects.rst b/documentation/sdk-manual/working-projects.rst index f880cbe0d5..ad84ce2b87 100644 --- a/documentation/sdk-manual/working-projects.rst +++ b/documentation/sdk-manual/working-projects.rst | |||
@@ -45,16 +45,14 @@ project: | |||
45 | respectively. | 45 | respectively. |
46 | 46 | ||
47 | Use the following command to create an empty README file, which is | 47 | Use the following command to create an empty README file, which is |
48 | required by GNU Coding Standards: | 48 | required by GNU Coding Standards:: |
49 | :: | ||
50 | 49 | ||
51 | $ touch README | 50 | $ touch README |
52 | 51 | ||
53 | Create the remaining | 52 | Create the remaining |
54 | three files as follows: | 53 | three files as follows: |
55 | 54 | ||
56 | - ``hello.c``: | 55 | - ``hello.c``:: |
57 | :: | ||
58 | 56 | ||
59 | #include <stdio.h> | 57 | #include <stdio.h> |
60 | 58 | ||
@@ -63,8 +61,7 @@ project: | |||
63 | printf("Hello World!\n"); | 61 | printf("Hello World!\n"); |
64 | } | 62 | } |
65 | 63 | ||
66 | - ``configure.ac``: | 64 | - ``configure.ac``:: |
67 | :: | ||
68 | 65 | ||
69 | AC_INIT(hello,0.1) | 66 | AC_INIT(hello,0.1) |
70 | AM_INIT_AUTOMAKE([foreign]) | 67 | AM_INIT_AUTOMAKE([foreign]) |
@@ -72,8 +69,7 @@ project: | |||
72 | AC_CONFIG_FILES(Makefile) | 69 | AC_CONFIG_FILES(Makefile) |
73 | AC_OUTPUT | 70 | AC_OUTPUT |
74 | 71 | ||
75 | - ``Makefile.am``: | 72 | - ``Makefile.am``:: |
76 | :: | ||
77 | 73 | ||
78 | bin_PROGRAMS = hello | 74 | bin_PROGRAMS = hello |
79 | hello_SOURCES = hello.c | 75 | hello_SOURCES = hello.c |
@@ -87,8 +83,7 @@ project: | |||
87 | which is followed by the string "poky-linux". For this example, the | 83 | which is followed by the string "poky-linux". For this example, the |
88 | command sources a script from the default SDK installation directory | 84 | command sources a script from the default SDK installation directory |
89 | that uses the 32-bit Intel x86 Architecture and the &DISTRO; Yocto | 85 | that uses the 32-bit Intel x86 Architecture and the &DISTRO; Yocto |
90 | Project release: | 86 | Project release:: |
91 | :: | ||
92 | 87 | ||
93 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux | 88 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux |
94 | 89 | ||
@@ -113,8 +108,7 @@ project: | |||
113 | the cross-compiler. The | 108 | the cross-compiler. The |
114 | :term:`CONFIGURE_FLAGS` | 109 | :term:`CONFIGURE_FLAGS` |
115 | environment variable provides the minimal arguments for GNU | 110 | environment variable provides the minimal arguments for GNU |
116 | configure: | 111 | configure:: |
117 | :: | ||
118 | 112 | ||
119 | $ ./configure ${CONFIGURE_FLAGS} | 113 | $ ./configure ${CONFIGURE_FLAGS} |
120 | 114 | ||
@@ -127,14 +121,12 @@ project: | |||
127 | ``armv5te-poky-linux-gnueabi``. You will notice that the name of the | 121 | ``armv5te-poky-linux-gnueabi``. You will notice that the name of the |
128 | script is ``environment-setup-armv5te-poky-linux-gnueabi``. Thus, the | 122 | script is ``environment-setup-armv5te-poky-linux-gnueabi``. Thus, the |
129 | following command works to update your project and rebuild it using | 123 | following command works to update your project and rebuild it using |
130 | the appropriate cross-toolchain tools: | 124 | the appropriate cross-toolchain tools:: |
131 | :: | ||
132 | 125 | ||
133 | $ ./configure --host=armv5te-poky-linux-gnueabi --with-libtool-sysroot=sysroot_dir | 126 | $ ./configure --host=armv5te-poky-linux-gnueabi --with-libtool-sysroot=sysroot_dir |
134 | 127 | ||
135 | 5. *Make and Install the Project:* These two commands generate and | 128 | 5. *Make and Install the Project:* These two commands generate and |
136 | install the project into the destination directory: | 129 | install the project into the destination directory:: |
137 | :: | ||
138 | 130 | ||
139 | $ make | 131 | $ make |
140 | $ make install DESTDIR=./tmp | 132 | $ make install DESTDIR=./tmp |
@@ -157,8 +149,7 @@ project: | |||
157 | 149 | ||
158 | 6. *Execute Your Project:* To execute the project, you would need to run | 150 | 6. *Execute Your Project:* To execute the project, you would need to run |
159 | it on your target hardware. If your target hardware happens to be | 151 | it on your target hardware. If your target hardware happens to be |
160 | your build host, you could run the project as follows: | 152 | your build host, you could run the project as follows:: |
161 | :: | ||
162 | 153 | ||
163 | $ ./tmp/usr/local/bin/hello | 154 | $ ./tmp/usr/local/bin/hello |
164 | 155 | ||
@@ -203,8 +194,7 @@ regarding variable behavior: | |||
203 | .. note:: | 194 | .. note:: |
204 | 195 | ||
205 | Regardless of how you set your variables, if you use the "-e" option | 196 | Regardless of how you set your variables, if you use the "-e" option |
206 | with ``make``, the variables from the SDK setup script take precedence: | 197 | with ``make``, the variables from the SDK setup script take precedence:: |
207 | :: | ||
208 | 198 | ||
209 | $ make -e target | 199 | $ make -e target |
210 | 200 | ||
@@ -226,8 +216,7 @@ Running the | |||
226 | SDK setup script for a 64-bit build host and an i586-tuned target | 216 | SDK setup script for a 64-bit build host and an i586-tuned target |
227 | architecture for a ``core-image-sato`` image using the current &DISTRO; | 217 | architecture for a ``core-image-sato`` image using the current &DISTRO; |
228 | Yocto Project release and then echoing that variable shows the value | 218 | Yocto Project release and then echoing that variable shows the value |
229 | established through the script: | 219 | established through the script:: |
230 | :: | ||
231 | 220 | ||
232 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux | 221 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux |
233 | $ echo ${CC} | 222 | $ echo ${CC} |
@@ -252,8 +241,7 @@ example: | |||
252 | 241 | ||
253 | Create the three files as follows: | 242 | Create the three files as follows: |
254 | 243 | ||
255 | - ``main.c``: | 244 | - ``main.c``:: |
256 | :: | ||
257 | 245 | ||
258 | #include "module.h" | 246 | #include "module.h" |
259 | void sample_func(); | 247 | void sample_func(); |
@@ -263,14 +251,12 @@ example: | |||
263 | return 0; | 251 | return 0; |
264 | } | 252 | } |
265 | 253 | ||
266 | - ``module.h``: | 254 | - ``module.h``:: |
267 | :: | ||
268 | 255 | ||
269 | #include <stdio.h> | 256 | #include <stdio.h> |
270 | void sample_func(); | 257 | void sample_func(); |
271 | 258 | ||
272 | - ``module.c``: | 259 | - ``module.c``:: |
273 | :: | ||
274 | 260 | ||
275 | #include "module.h" | 261 | #include "module.h" |
276 | void sample_func() | 262 | void sample_func() |
@@ -288,8 +274,7 @@ example: | |||
288 | which is followed by the string "poky-linux". For this example, the | 274 | which is followed by the string "poky-linux". For this example, the |
289 | command sources a script from the default SDK installation directory | 275 | command sources a script from the default SDK installation directory |
290 | that uses the 32-bit Intel x86 Architecture and the &DISTRO_NAME; Yocto | 276 | that uses the 32-bit Intel x86 Architecture and the &DISTRO_NAME; Yocto |
291 | Project release: | 277 | Project release:: |
292 | :: | ||
293 | 278 | ||
294 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux | 279 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux |
295 | 280 | ||
@@ -297,8 +282,7 @@ example: | |||
297 | two lines that can be used to set the ``CC`` variable. One line is | 282 | two lines that can be used to set the ``CC`` variable. One line is |
298 | identical to the value that is set when you run the SDK environment | 283 | identical to the value that is set when you run the SDK environment |
299 | setup script, and the other line sets ``CC`` to "gcc", the default | 284 | setup script, and the other line sets ``CC`` to "gcc", the default |
300 | GNU compiler on the build host: | 285 | GNU compiler on the build host:: |
301 | :: | ||
302 | 286 | ||
303 | # CC=i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux | 287 | # CC=i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux |
304 | # CC="gcc" | 288 | # CC="gcc" |
@@ -315,8 +299,7 @@ example: | |||
315 | 4. *Make the Project:* Use the ``make`` command to create the binary | 299 | 4. *Make the Project:* Use the ``make`` command to create the binary |
316 | output file. Because variables are commented out in the Makefile, the | 300 | output file. Because variables are commented out in the Makefile, the |
317 | value used for ``CC`` is the value set when the SDK environment setup | 301 | value used for ``CC`` is the value set when the SDK environment setup |
318 | file was run: | 302 | file was run:: |
319 | :: | ||
320 | 303 | ||
321 | $ make | 304 | $ make |
322 | i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c main.c | 305 | i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c main.c |
@@ -351,8 +334,7 @@ example: | |||
351 | variable as part of the command line. Go into the Makefile and | 334 | variable as part of the command line. Go into the Makefile and |
352 | re-insert the comment character so that running ``make`` uses the | 335 | re-insert the comment character so that running ``make`` uses the |
353 | established SDK compiler. However, when you run ``make``, use a | 336 | established SDK compiler. However, when you run ``make``, use a |
354 | command-line argument to set ``CC`` to "gcc": | 337 | command-line argument to set ``CC`` to "gcc":: |
355 | :: | ||
356 | 338 | ||
357 | $ make clean | 339 | $ make clean |
358 | rm -rf *.o | 340 | rm -rf *.o |
@@ -376,8 +358,7 @@ example: | |||
376 | environment variable. | 358 | environment variable. |
377 | 359 | ||
378 | In this last case, edit Makefile again to use the "gcc" compiler but | 360 | In this last case, edit Makefile again to use the "gcc" compiler but |
379 | then use the "-e" option on the ``make`` command line: | 361 | then use the "-e" option on the ``make`` command line:: |
380 | :: | ||
381 | 362 | ||
382 | $ make clean | 363 | $ make clean |
383 | rm -rf *.o | 364 | rm -rf *.o |
@@ -402,8 +383,7 @@ example: | |||
402 | Makefile. | 383 | Makefile. |
403 | 384 | ||
404 | 5. *Execute Your Project:* To execute the project (i.e. ``target_bin``), | 385 | 5. *Execute Your Project:* To execute the project (i.e. ``target_bin``), |
405 | use the following command: | 386 | use the following command:: |
406 | :: | ||
407 | 387 | ||
408 | $ ./target_bin | 388 | $ ./target_bin |
409 | Hello World! | 389 | Hello World! |