diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-14 13:34:34 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-17 10:09:35 +0100 |
commit | de89b5a0b6ecb9a5b6a3e5a862cf4cee32dc8a94 (patch) | |
tree | 9851be19b42edfb032ff83308d77bd863b11159d /documentation/sdk-manual/sdk-appendix-obtain.rst | |
parent | 688e49bb5e6e61b5c0dbbe6b2c3bdf1c5a4bef8d (diff) | |
download | poky-de89b5a0b6ecb9a5b6a3e5a862cf4cee32dc8a94.tar.gz |
sphinx: sdk-manual: Various URL, code block and other fixes to imported data
(From yocto-docs rev: 12f5e9cb36409b813ffef9242ce9a042f08acf69)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/sdk-manual/sdk-appendix-obtain.rst')
-rw-r--r-- | documentation/sdk-manual/sdk-appendix-obtain.rst | 137 |
1 files changed, 89 insertions, 48 deletions
diff --git a/documentation/sdk-manual/sdk-appendix-obtain.rst b/documentation/sdk-manual/sdk-appendix-obtain.rst index ed460c78ea..ffaed9deef 100644 --- a/documentation/sdk-manual/sdk-appendix-obtain.rst +++ b/documentation/sdk-manual/sdk-appendix-obtain.rst | |||
@@ -17,10 +17,10 @@ and then run the script to hand-install the toolchain. | |||
17 | Follow these steps to locate and hand-install the toolchain: | 17 | Follow these steps to locate and hand-install the toolchain: |
18 | 18 | ||
19 | 1. *Go to the Installers Directory:* Go to | 19 | 1. *Go to the Installers Directory:* Go to |
20 | ` <&YOCTO_TOOLCHAIN_DL_URL;>`__ | 20 | :yocto_dl:`releases/yocto/yocto-3.1.2/toolchain/` |
21 | 21 | ||
22 | 2. *Open the Folder for Your Build Host:* Open the folder that matches | 22 | 2. *Open the Folder for Your Build Host:* Open the folder that matches |
23 | your `build host <&YOCTO_DOCS_REF_URL;#build-system-term>`__ (i.e. | 23 | your :term:`Build Host` (i.e. |
24 | ``i686`` for 32-bit machines or ``x86_64`` for 64-bit machines). | 24 | ``i686`` for 32-bit machines or ``x86_64`` for 64-bit machines). |
25 | 25 | ||
26 | 3. *Locate and Download the SDK Installer:* You need to find and | 26 | 3. *Locate and Download the SDK Installer:* You need to find and |
@@ -28,14 +28,29 @@ Follow these steps to locate and hand-install the toolchain: | |||
28 | hardware, and image type. | 28 | hardware, and image type. |
29 | 29 | ||
30 | The installer files (``*.sh``) follow this naming convention: | 30 | The installer files (``*.sh``) follow this naming convention: |
31 | poky-glibc-host_system-core-image-type-arch-toolchain[-ext]-release.sh | 31 | :: |
32 | Where: host_system is a string representing your development system: | 32 | |
33 | "i686" or "x86_64" type is a string representing the image: "sato" or | 33 | poky-glibc-host_system-core-image-type-arch-toolchain[-ext]-release.sh |
34 | "minimal" arch is a string representing the target architecture: | 34 | |
35 | "aarch64", "armv5e", "core2-64", "coretexa8hf-neon", "i586", | 35 | Where: |
36 | "mips32r2", "mips64", or "ppc7400" release is the version of Yocto | 36 | host_system is a string representing your development system: |
37 | Project. NOTE: The standard SDK installer does not have the "-ext" | 37 | "i686" or "x86_64" |
38 | string as part of the filename. The toolchains provided by the Yocto | 38 | |
39 | type is a string representing the image: | ||
40 | "sato" or "minimal" | ||
41 | |||
42 | arch is a string representing the target architecture: | ||
43 | "aarch64", "armv5e", "core2-64", "coretexa8hf-neon", "i586", "mips32r2", | ||
44 | "mips64", or "ppc7400" | ||
45 | |||
46 | release is the version of Yocto Project. | ||
47 | |||
48 | NOTE: | ||
49 | The standard SDK installer does not have the "-ext" string as | ||
50 | part of the filename. | ||
51 | |||
52 | |||
53 | The toolchains provided by the Yocto | ||
39 | Project are based off of the ``core-image-sato`` and | 54 | Project are based off of the ``core-image-sato`` and |
40 | ``core-image-minimal`` images and contain libraries appropriate for | 55 | ``core-image-minimal`` images and contain libraries appropriate for |
41 | developing against those images. | 56 | developing against those images. |
@@ -43,12 +58,17 @@ Follow these steps to locate and hand-install the toolchain: | |||
43 | For example, if your build host is a 64-bit x86 system and you need | 58 | For example, if your build host is a 64-bit x86 system and you need |
44 | an extended SDK for a 64-bit core2 target, go into the ``x86_64`` | 59 | an extended SDK for a 64-bit core2 target, go into the ``x86_64`` |
45 | folder and download the following installer: | 60 | folder and download the following installer: |
46 | poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-DISTRO.sh | 61 | :: |
62 | |||
63 | poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-DISTRO.sh | ||
47 | 64 | ||
48 | 4. *Run the Installer:* Be sure you have execution privileges and run | 65 | 4. *Run the Installer:* Be sure you have execution privileges and run |
49 | the installer. Following is an example from the ``Downloads`` | 66 | the installer. Following is an example from the ``Downloads`` |
50 | directory: $ | 67 | directory: |
51 | ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-DISTRO.sh | 68 | :: |
69 | |||
70 | $ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-DISTRO.sh | ||
71 | |||
52 | During execution of the script, you choose the root location for the | 72 | During execution of the script, you choose the root location for the |
53 | toolchain. See the "`Installed Standard SDK Directory | 73 | toolchain. See the "`Installed Standard SDK Directory |
54 | Structure <#sdk-installed-standard-sdk-directory-structure>`__" | 74 | Structure <#sdk-installed-standard-sdk-directory-structure>`__" |
@@ -63,8 +83,7 @@ As an alternative to locating and downloading an SDK installer, you can | |||
63 | build the SDK installer. Follow these steps: | 83 | build the SDK installer. Follow these steps: |
64 | 84 | ||
65 | 1. *Set Up the Build Environment:* Be sure you are set up to use BitBake | 85 | 1. *Set Up the Build Environment:* Be sure you are set up to use BitBake |
66 | in a shell. See the "`Preparing the Build | 86 | in a shell. See the ":ref:`dev-manual/dev-manual-start:preparing the build host`" section |
67 | Host <&YOCTO_DOCS_DEV_URL;#dev-preparing-the-build-host>`__" section | ||
68 | in the Yocto Project Development Tasks Manual for information on how | 87 | in the Yocto Project Development Tasks Manual for information on how |
69 | to get a build host ready that is either a native Linux machine or a | 88 | to get a build host ready that is either a native Linux machine or a |
70 | machine that uses CROPS. | 89 | machine that uses CROPS. |
@@ -72,21 +91,23 @@ build the SDK installer. Follow these steps: | |||
72 | 2. *Clone the ``poky`` Repository:* You need to have a local copy of the | 91 | 2. *Clone the ``poky`` Repository:* You need to have a local copy of the |
73 | Yocto Project :term:`Source Directory` | 92 | Yocto Project :term:`Source Directory` |
74 | (i.e. a local | 93 | (i.e. a local |
75 | ``poky`` repository). See the "`Cloning the ``poky`` | 94 | ``poky`` repository). See the ":ref:`dev-manual/dev-manual-start:cloning the \`\`poky\`\` repository`" and |
76 | Repository <&YOCTO_DOCS_DEV_URL;#cloning-the-poky-repository>`__" and | 95 | possibly the ":ref:`dev-manual/dev-manual-start:checking out by branch in poky`" and |
77 | possibly the "`Checking Out by Branch in | 96 | ":ref:`checkout-out-by-tag-in-poky`" sections |
78 | Poky <&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky>`__" and | ||
79 | "`Checking Out by Tag in | ||
80 | Poky <&YOCTO_DOCS_DEV_URL;#checkout-out-by-tag-in-poky>`__" sections | ||
81 | all in the Yocto Project Development Tasks Manual for information on | 97 | all in the Yocto Project Development Tasks Manual for information on |
82 | how to clone the ``poky`` repository and check out the appropriate | 98 | how to clone the ``poky`` repository and check out the appropriate |
83 | branch for your work. | 99 | branch for your work. |
84 | 100 | ||
85 | 3. *Initialize the Build Environment:* While in the root directory of | 101 | 3. *Initialize the Build Environment:* While in the root directory of |
86 | the Source Directory (i.e. ``poky``), run the | 102 | the Source Directory (i.e. ``poky``), run the |
87 | ````` <&YOCTO_DOCS_REF_URL;#structure-core-script>`__ environment | 103 | :ref:`structure-core-script` environment |
88 | setup script to define the OpenEmbedded build environment on your | 104 | setup script to define the OpenEmbedded build environment on your |
89 | build host. $ source OE_INIT_FILE Among other things, the script | 105 | build host. |
106 | :: | ||
107 | |||
108 | $ source oe-init-build-env | ||
109 | |||
110 | Among other things, the script | ||
90 | creates the :term:`Build Directory`, | 111 | creates the :term:`Build Directory`, |
91 | which is | 112 | which is |
92 | ``build`` in this case and is located in the Source Directory. After | 113 | ``build`` in this case and is located in the Source Directory. After |
@@ -119,13 +140,17 @@ build the SDK installer. Follow these steps: | |||
119 | The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is | 140 | The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is |
120 | set to i686 (likely via setting SDKMACHINE) which is different from the architecture of the build machine (x86_64). | 141 | set to i686 (likely via setting SDKMACHINE) which is different from the architecture of the build machine (x86_64). |
121 | Unable to continue. | 142 | Unable to continue. |
122 | 143 | ||
123 | 144 | ||
124 | 6. *Build the SDK Installer:* To build the SDK installer for a standard | 145 | 6. *Build the SDK Installer:* To build the SDK installer for a standard |
125 | SDK and populate the SDK image, use the following command form. Be | 146 | SDK and populate the SDK image, use the following command form. Be |
126 | sure to replace image with an image (e.g. "core-image-sato"): $ | 147 | sure to replace image with an image (e.g. "core-image-sato"): $ |
127 | bitbake image -c populate_sdk You can do the same for the extensible | 148 | bitbake image -c populate_sdk You can do the same for the extensible |
128 | SDK using this command form: $ bitbake image -c populate_sdk_ext | 149 | SDK using this command form: |
150 | :: | ||
151 | |||
152 | $ bitbake image -c populate_sdk_ext | ||
153 | |||
129 | These commands produce an SDK installer that contains the sysroot | 154 | These commands produce an SDK installer that contains the sysroot |
130 | that matches your target root filesystem. | 155 | that matches your target root filesystem. |
131 | 156 | ||
@@ -147,9 +172,12 @@ build the SDK installer. Follow these steps: | |||
147 | libc-staticdev" | 172 | libc-staticdev" |
148 | 173 | ||
149 | 7. *Run the Installer:* You can now run the SDK installer from | 174 | 7. *Run the Installer:* You can now run the SDK installer from |
150 | ``tmp/deploy/sdk`` in the Build Directory. Following is an example: $ | 175 | ``tmp/deploy/sdk`` in the Build Directory. Following is an example: |
151 | cd ~/poky/build/tmp/deploy/sdk $ | 176 | :: |
152 | ./poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-DISTRO.sh | 177 | |
178 | $ cd ~/poky/build/tmp/deploy/sdk | ||
179 | $ ./poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-DISTRO.sh | ||
180 | |||
153 | During execution of the script, you choose the root location for the | 181 | During execution of the script, you choose the root location for the |
154 | toolchain. See the "`Installed Standard SDK Directory | 182 | toolchain. See the "`Installed Standard SDK Directory |
155 | Structure <#sdk-installed-standard-sdk-directory-structure>`__" | 183 | Structure <#sdk-installed-standard-sdk-directory-structure>`__" |
@@ -176,7 +204,7 @@ Follow these steps to extract the root filesystem: | |||
176 | Image File:* You need to find and download the root filesystem image | 204 | Image File:* You need to find and download the root filesystem image |
177 | file that is appropriate for your target system. These files are kept | 205 | file that is appropriate for your target system. These files are kept |
178 | in machine-specific folders in the | 206 | in machine-specific folders in the |
179 | :yocto_dl:`Index of Releases <releases/yocto/yocto-&DISTRO;/machines/>` | 207 | :yocto_dl:`Index of Releases <releases/yocto/yocto-3.1.2/machines/>` |
180 | in the "machines" directory. | 208 | in the "machines" directory. |
181 | 209 | ||
182 | The machine-specific folders of the "machines" directory contain | 210 | The machine-specific folders of the "machines" directory contain |
@@ -185,22 +213,32 @@ Follow these steps to extract the root filesystem: | |||
185 | which you can use with QEMU directly. | 213 | which you can use with QEMU directly. |
186 | 214 | ||
187 | The pre-built root filesystem image files follow these naming | 215 | The pre-built root filesystem image files follow these naming |
188 | conventions: core-image-profile-arch.tar.bz2 Where: profile is the | 216 | conventions: |
189 | filesystem image's profile: lsb, lsb-dev, lsb-sdk, minimal, | 217 | :: |
190 | minimal-dev, minimal-initramfs, sato, sato-dev, sato-sdk, | 218 | |
191 | sato-sdk-ptest. For information on these types of image profiles, see | 219 | core-image-profile-arch.tar.bz2 |
192 | the ":ref:`ref-manual/ref-images:Images`" chapter in the | 220 | |
193 | Yocto Project Reference Manual. arch is a string representing the | 221 | Where: |
194 | target architecture: beaglebone-yocto, beaglebone-yocto-lsb, | 222 | profile is the filesystem image's profile: |
195 | edgerouter, edgerouter-lsb, genericx86, genericx86-64, | 223 | lsb, lsb-dev, lsb-sdk, minimal, minimal-dev, minimal-initramfs, |
196 | genericx86-64-lsb, genericx86-lsb and qemu*. The root filesystems | 224 | sato, sato-dev, sato-sdk, sato-sdk-ptest. For information on |
225 | these types of image profiles, see the "Images" chapter in | ||
226 | the Yocto Project Reference Manual. | ||
227 | |||
228 | arch is a string representing the target architecture: | ||
229 | beaglebone-yocto, beaglebone-yocto-lsb, edgerouter, edgerouter-lsb, | ||
230 | genericx86, genericx86-64, genericx86-64-lsb, genericx86-lsb and qemu*. | ||
231 | |||
232 | The root filesystems | ||
197 | provided by the Yocto Project are based off of the | 233 | provided by the Yocto Project are based off of the |
198 | ``core-image-sato`` and ``core-image-minimal`` images. | 234 | ``core-image-sato`` and ``core-image-minimal`` images. |
199 | 235 | ||
200 | For example, if you plan on using a BeagleBone device as your target | 236 | For example, if you plan on using a BeagleBone device as your target |
201 | hardware and your image is a ``core-image-sato-sdk`` image, you can | 237 | hardware and your image is a ``core-image-sato-sdk`` image, you can |
202 | download the following file: | 238 | download the following file: |
203 | core-image-sato-sdk-beaglebone-yocto.tar.bz2 | 239 | :: |
240 | |||
241 | core-image-sato-sdk-beaglebone-yocto.tar.bz2 | ||
204 | 242 | ||
205 | 2. *Initialize the Cross-Development Environment:* You must ``source`` | 243 | 2. *Initialize the Cross-Development Environment:* You must ``source`` |
206 | the cross-development environment setup script to establish necessary | 244 | the cross-development environment setup script to establish necessary |
@@ -210,21 +248,24 @@ Follow these steps to extract the root filesystem: | |||
210 | installed the toolchain (e.g. ``poky_sdk``). | 248 | installed the toolchain (e.g. ``poky_sdk``). |
211 | 249 | ||
212 | Following is an example based on the toolchain installed in the | 250 | Following is an example based on the toolchain installed in the |
213 | "`Locating Pre-Built SDK | 251 | ":ref:`sdk-locating-pre-built-sdk-installers`" section: |
214 | Installers <#sdk-locating-pre-built-sdk-installers>`__" section: $ | 252 | :: |
215 | source ~/poky_sdk/environment-setup-core2-64-poky-linux | 253 | |
254 | $ source ~/poky_sdk/environment-setup-core2-64-poky-linux | ||
216 | 255 | ||
217 | 3. *Extract the Root Filesystem:* Use the ``runqemu-extract-sdk`` | 256 | 3. *Extract the Root Filesystem:* Use the ``runqemu-extract-sdk`` |
218 | command and provide the root filesystem image. | 257 | command and provide the root filesystem image. |
219 | 258 | ||
220 | Following is an example command that extracts the root filesystem | 259 | Following is an example command that extracts the root filesystem |
221 | from a previously built root filesystem image that was downloaded | 260 | from a previously built root filesystem image that was downloaded |
222 | from the `Index of Releases <&YOCTO_DOCS_OM_URL;#index-downloads>`__. | 261 | from the :yocto_dl:`Index of Releases <releases/yocto/yocto-3.1.2/machines/>`. |
223 | This command extracts the root filesystem into the ``core2-64-sato`` | 262 | This command extracts the root filesystem into the ``core2-64-sato`` |
224 | directory: $ runqemu-extract-sdk | 263 | directory: |
225 | ~/Downloads/core-image-sato-sdk-beaglebone-yocto.tar.bz2 | 264 | :: |
226 | ~/beaglebone-sato You could now point to the target sysroot at | 265 | |
227 | ``beablebone-sato``. | 266 | $ runqemu-extract-sdk ~/Downloads/core-image-sato-sdk-beaglebone-yocto.tar.bz2 ~/beaglebone-sato |
267 | |||
268 | You could now point to the target sysroot at ``beablebone-sato``. | ||
228 | 269 | ||
229 | Installed Standard SDK Directory Structure | 270 | Installed Standard SDK Directory Structure |
230 | ========================================== | 271 | ========================================== |
@@ -246,7 +287,7 @@ Within the figure, italicized text is used to indicate replaceable | |||
246 | portions of the file or directory name. For example, install_dir/version | 287 | portions of the file or directory name. For example, install_dir/version |
247 | is the directory where the SDK is installed. By default, this directory | 288 | is the directory where the SDK is installed. By default, this directory |
248 | is ``/opt/poky/``. And, version represents the specific snapshot of the | 289 | is ``/opt/poky/``. And, version represents the specific snapshot of the |
249 | SDK (e.g. ````). Furthermore, target represents the target architecture | 290 | SDK (e.g. 3.1.2). Furthermore, target represents the target architecture |
250 | (e.g. ``i586``) and host represents the development system's | 291 | (e.g. ``i586``) and host represents the development system's |
251 | architecture (e.g. ``x86_64``). Thus, the complete names of the two | 292 | architecture (e.g. ``x86_64``). Thus, the complete names of the two |
252 | directories within the ``sysroots`` could be ``i586-poky-linux`` and | 293 | directories within the ``sysroots`` could be ``i586-poky-linux`` and |