diff options
author | Scott Rifenbark <srifenbark@gmail.com> | 2017-07-12 07:34:59 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-22 09:19:25 +0100 |
commit | 33969a3c92024c566b03ad30bc5cc77e32e9a416 (patch) | |
tree | 9b9209d7d9d3f4fa863b63aa927f4a2d85916657 /documentation/sdk-manual/sdk-appendix-obtain.xml | |
parent | 5731def9011cd77b0a984cdb8e86e12c9f8c12ce (diff) | |
download | poky-33969a3c92024c566b03ad30bc5cc77e32e9a416.tar.gz |
sdk-manual: Converted extracting root filesystem to procedure
(From yocto-docs rev: 371b7c6c4d0d18c7212e0af3ca3ff558de347633)
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/sdk-manual/sdk-appendix-obtain.xml')
-rw-r--r-- | documentation/sdk-manual/sdk-appendix-obtain.xml | 141 |
1 files changed, 103 insertions, 38 deletions
diff --git a/documentation/sdk-manual/sdk-appendix-obtain.xml b/documentation/sdk-manual/sdk-appendix-obtain.xml index ae30995304..0bb5dd2497 100644 --- a/documentation/sdk-manual/sdk-appendix-obtain.xml +++ b/documentation/sdk-manual/sdk-appendix-obtain.xml | |||
@@ -81,6 +81,13 @@ | |||
81 | <literallayout class='monospaced'> | 81 | <literallayout class='monospaced'> |
82 | $ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh | 82 | $ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh |
83 | </literallayout> | 83 | </literallayout> |
84 | During execution of the script, you choose the root location | ||
85 | for the toolchain. | ||
86 | See the | ||
87 | "<link linkend='sdk-installed-standard-sdk-directory-structure'>Installed Standard SDK Directory Structure</link>" | ||
88 | section and the | ||
89 | "<link linkend='sdk-installed-extensible-sdk-directory-structure'>Installed Extensible SDK Directory Structure</link>" | ||
90 | section for more information. | ||
84 | </para></listitem> | 91 | </para></listitem> |
85 | </orderedlist> | 92 | </orderedlist> |
86 | </para> | 93 | </para> |
@@ -175,8 +182,15 @@ | |||
175 | Following is an example: | 182 | Following is an example: |
176 | <literallayout class='monospaced'> | 183 | <literallayout class='monospaced'> |
177 | $ cd ~/poky/build/tmp/deploy/sdk | 184 | $ cd ~/poky/build/tmp/deploy/sdk |
178 | ./poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh | 185 | $ ./poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh |
179 | </literallayout> | 186 | </literallayout> |
187 | During execution of the script, you choose the root location | ||
188 | for the toolchain. | ||
189 | See the | ||
190 | "<link linkend='sdk-installed-standard-sdk-directory-structure'>Installed Standard SDK Directory Structure</link>" | ||
191 | section and the | ||
192 | "<link linkend='sdk-installed-extensible-sdk-directory-structure'>Installed Extensible SDK Directory Structure</link>" | ||
193 | section for more information. | ||
180 | </para></listitem> | 194 | </para></listitem> |
181 | </orderedlist> | 195 | </orderedlist> |
182 | </para> | 196 | </para> |
@@ -189,55 +203,106 @@ | |||
189 | After installing the toolchain, for some use cases you | 203 | After installing the toolchain, for some use cases you |
190 | might need to separately extract a root filesystem: | 204 | might need to separately extract a root filesystem: |
191 | <itemizedlist> | 205 | <itemizedlist> |
192 | <listitem><para>You want to boot the image using NFS. | 206 | <listitem><para> |
207 | You want to boot the image using NFS. | ||
193 | </para></listitem> | 208 | </para></listitem> |
194 | <listitem><para>You want to use the root filesystem as the | 209 | <listitem><para> |
210 | You want to use the root filesystem as the | ||
195 | target sysroot. | 211 | target sysroot. |
196 | For example, the Eclipse IDE environment with the Eclipse | 212 | For example, the Eclipse IDE environment with the Eclipse |
197 | Yocto Plug-in installed allows you to use QEMU to boot | 213 | Yocto Plug-in installed allows you to use QEMU to boot |
198 | under NFS.</para></listitem> | 214 | under NFS. |
199 | <listitem><para>You want to develop your target application | 215 | </para></listitem> |
216 | <listitem><para> | ||
217 | You want to develop your target application | ||
200 | using the root filesystem as the target sysroot. | 218 | using the root filesystem as the target sysroot. |
201 | </para></listitem> | 219 | </para></listitem> |
202 | </itemizedlist> | 220 | </itemizedlist> |
203 | </para> | 221 | </para> |
204 | 222 | ||
205 | <para> | 223 | <para> |
206 | To extract the root filesystem, first <filename>source</filename> | 224 | Follow these steps to extract the root filesystem: |
207 | the cross-development environment setup script to establish | 225 | <orderedlist> |
208 | necessary environment variables. | 226 | <listitem><para> |
209 | If you built the toolchain in the Build Directory, you will find | 227 | <emphasis>Locate and Download the Tarball for the Pre-Built |
210 | the toolchain environment script in the | 228 | Root Filesystem Image File:</emphasis> |
211 | <filename>tmp</filename> directory. | 229 | You need to find and download the root filesystem image |
212 | If you installed the toolchain by hand, the environment setup | 230 | file that is appropriate for your target system. |
213 | script is located in <filename>/opt/poky/&DISTRO;</filename>. | 231 | These files are kept in the |
214 | </para> | 232 | <ulink url='&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;/machines/'>Index of Releases</ulink> |
233 | in the "machines" directory.</para> | ||
234 | |||
235 | <para>The "machines" directory contains tarballs | ||
236 | (<filename>*.tar.bz2</filename>) for supported machines. | ||
237 | The directory also contains flattened root filesystem | ||
238 | image files (<filename>*.ext4</filename>), which you can use | ||
239 | with QEMU directly.</para> | ||
240 | |||
241 | <para>The pre-built root filesystem image files | ||
242 | follow these naming conventions: | ||
243 | <literallayout class='monospaced'> | ||
244 | core-image-<replaceable>profile</replaceable>-<replaceable>arch</replaceable>.tar.bz2 | ||
215 | 245 | ||
216 | <para> | 246 | Where: |
217 | After sourcing the environment script, use the | 247 | <replaceable>profile</replaceable> is the filesystem image's profile: |
218 | <filename>runqemu-extract-sdk</filename> command and provide the | 248 | lsb, lsb-dev, lsb-sdk, lsb-qt3, minimal, minimal-dev, sato, |
219 | filesystem image. | 249 | sato-dev, sato-sdk, minimal-initramfs, or sdk-ptest. For |
220 | </para> | 250 | information on these types of image profiles, see the |
251 | "Images" chapter in the Yocto Project Reference Manual. | ||
221 | 252 | ||
222 | <para> | 253 | <replaceable>arch</replaceable> is a string representing the target architecture: |
223 | Following is an example. | 254 | beaglebone, edgerouter, genericx86, genericx86-64, mpc8315e-rdb, |
224 | The second command sets up the environment. | 255 | qemuarm, qemuarm64, qemumips, qemumips64, qemuppc, qemux86, or |
225 | In this case, the setup script is located in the | 256 | qemux86-64. |
226 | <filename>/opt/poky/&DISTRO;</filename> directory. | 257 | |
227 | The third command extracts the root filesystem from a previously | 258 | </literallayout> |
228 | built filesystem that is located in the | 259 | The root filesystems provided by the Yocto Project are based |
229 | <filename>~/Downloads</filename> directory. | 260 | off of the <filename>core-image-sato</filename> and |
230 | Furthermore, this command extracts the root filesystem into the | 261 | <filename>core-image-minimal</filename> images. |
231 | <filename>qemux86-sato</filename> directory: | 262 | </para> |
232 | <literallayout class='monospaced'> | 263 | |
233 | $ cd ~ | 264 | <para>For example, if your target hardware system is a |
234 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux | 265 | BeagleBone board and your image is a |
235 | $ runqemu-extract-sdk \ | 266 | <filename>core-image-minimal</filename> image, you need |
236 | ~/Downloads/core-image-sato-sdk-qemux86-2011091411831.rootfs.tar.bz2 \ | 267 | to download the following root filesystem image file: |
237 | $HOME/qemux86-sato | 268 | <literallayout class='monospaced'> |
238 | </literallayout> | 269 | core-image-minimal-beaglebone.tar.bz2 |
239 | You could now point to the target sysroot at | 270 | </literallayout> |
240 | <filename>qemux86-sato</filename>. | 271 | </para></listitem> |
272 | <listitem><para> | ||
273 | <emphasis>Initialize the Cross-Development Environment:</emphasis> | ||
274 | You must <filename>source</filename> | ||
275 | the cross-development environment setup script to establish | ||
276 | necessary environment variables.</para> | ||
277 | |||
278 | <para>This script is located in the top-level directory in | ||
279 | which you installed the toolchain (e.g. | ||
280 | <filename>poky_sdk</filename>).</para> | ||
281 | |||
282 | <para>Following is an example for the Core2 64-bit | ||
283 | architecture: | ||
284 | <literallayout class='monospaced'> | ||
285 | $ source ~/poky_sdk/environment-setup-core2-64-poky-linux | ||
286 | </literallayout> | ||
287 | </para></listitem> | ||
288 | <listitem><para> | ||
289 | <emphasis>Extract the Root Filesystem:</emphasis> | ||
290 | Use the <filename>runqemu-extract-sdk</filename> command | ||
291 | and provide the root filesystem image.</para> | ||
292 | |||
293 | <para>Following is an example command that extracts the root | ||
294 | filesystem from a previously built root filesystem image that | ||
295 | was downloaded from the | ||
296 | <ulink url='&YOCTO_DOCS_REF_URL;#index-downloads'>Index of Releases</ulink>. | ||
297 | This command extracts the root filesystem into the | ||
298 | <filename>core2-64-sato</filename> directory: | ||
299 | <literallayout class='monospaced'> | ||
300 | $ runqemu-extract-sdk ~/Downloads/core-image-sato-core2-64.tar.bz2 ~/core2-64-sato | ||
301 | </literallayout> | ||
302 | You could now point to the target sysroot at | ||
303 | <filename>core2-64-sato</filename>. | ||
304 | </para></listitem> | ||
305 | </orderedlist> | ||
241 | </para> | 306 | </para> |
242 | </section> | 307 | </section> |
243 | 308 | ||