From f97e445fc66fe7713f8726ffa775e3ed8bf7ab4a Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Thu, 15 Sep 2011 10:17:08 -0700 Subject: [PATCH] documentation/adt-manual/adt-prepare.xml: toolchain enhancements After working through this stuff I was still confused as to how to guide the user toward proper toolchain installation and on what they needed to do for collecting their kernel and filesystem images. These changes included some information on when and how to extract the rootfs when the user is booting to NFS. Plus some other general items like the significance of meta-toolchain-sdk as compared to meta-toolchain. (From yocto-docs rev: 2cc88b5193888a074ffd87cb253b9cfe08146877) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/adt-manual/adt-prepare.xml | 122 ++++++++++++++--------- 1 file changed, 76 insertions(+), 46 deletions(-) diff --git a/documentation/adt-manual/adt-prepare.xml b/documentation/adt-manual/adt-prepare.xml index 5e403aa84b..a2618c6ae2 100644 --- a/documentation/adt-manual/adt-prepare.xml +++ b/documentation/adt-manual/adt-prepare.xml @@ -194,7 +194,8 @@ If you want to simply install the cross-toolchain by hand, you can do so by using an existing cross-toolchain tarball. - If you install the cross-toolchain by hand, you will have to set up the target sysroot separately. + If you use this method to install the cross-toolchain and you still need to install the target + sysroot, you will have to install sysroot separately. @@ -213,14 +214,21 @@ yocto-eglibc-x86_64-i586-toolchain-gmae-1.1.tar.bz2 - As an alternative to steps one and two, you can build the toolchain tarball + The cross-toolchain tarballs provided by the Yocto Project support development + of GNOME platorms on mobile devices (GMAE). + As an alternative to steps one and two, you can build the toolchain tarball if you have a Yocto Project build tree. - Use the bitbake meta-toolchain command after you have + If you need GMAE, you should use the bitbake meta-toolchain-gmae + command. + The resulting tarball will support such development. + However, if you not concerned with GMAE, + you can generate the tarball using bitbake meta-toolchain. + Use the appropriate bitbake command only after you have sourced the oe-build-init script located in the Yocto Project files. When the bitbake command completes, the toolchain tarball will be in tmp/deploy/sdk in the Yocto Project build tree. - + Make sure you are in the root directory with root privileges and then expand the tarball. The tarball expands into /opt/poky/$SDKVERSION. @@ -229,11 +237,6 @@ - - - After installing the toolchain, you must locate the target sysroot tarball and unpack it - into a location of your choice. -
@@ -242,7 +245,14 @@ A final way of installing just the cross-toolchain is to use BitBake within an existing Yocto Project build tree. - Follow these steps: + This method installs the toolchain into the Yocto Project build tree, not the + /opt directory. + As with the previous method, if you need to install the target sysroot, you must + do this separately. + + + + Follow these steps to install the toolchain into the build tree: Source the environment setup script located in the Yocto Project files. @@ -268,27 +278,14 @@ Be sure to run the bitbake command immediately after checking or editing the local.conf but without changing your working directory. - Once BitBake finishes, the cross-toolchain is installed. + Once BitBake finishes, the cross-toolchain is installed within the Yocto Project + build tree. You will notice environment setup files for the cross-toolchain in the Yocto Project build tree in the tmp directory. Setup script filenames contain the strings environment-setup. - - - After installing the toolchain, you must locate the target sysroot tarball and unpack - it in a directory of your choice. - - - - WRITER'S NOTE: Right now I am a little fuzzy on just how you do this. - I am not sure if you just grab what is in build/tmp/deploy/images - and then unpack it with the tar -xjvf [tarball] [directory] or - if you have to run the tarball environment setup script found in - build/tmp and then run the - runqemu-extract-sdk [tarball] [directory] command. -
@@ -301,9 +298,8 @@ If you used the ADT Installer or used an existing ADT tarball to install the ADT, then you can find this script in the /opt/poky/$SDKVERSION directory. - If you used BitBake and the Yocto Project Build Tree to install the cross-toolchain, - then you can find the environment setup scripts in in the Yocto Project build tree - in the tmp directory. + If you installed the toolchain in the build tree, you can find the environment setup + scripts in the Yocto Project build tree's tmp directory. @@ -324,18 +320,29 @@ You will need to have a kernel and filesystem image to boot using your - hardware or the QEMU emulator. - That means you either have to build them or know where to get them. - You can find a quick example of how to build an image in the - "Building an Image" section of - - The Yocto Project Quick Start. - - The Yocto Project provides basic kernels and filesystem images for several + hardware or the QEMU emulator. + Furthermore, if you plan on booting your image using NFS or you want to use the root filesystem + as the target sysroot, you need to extract the root filesystem. + This section describes how to get set up with the kernel and filesystem images. + + +
+ Getting the Images + + + To get the kernel and filesystem images you either have to build them or download + pre-built versions. + You can find examples for both these situations in the + "A + Quick Test Run" section of + + The Yocto Project Quick Start. + + The Yocto Project provides basic kernel and filesystem images for several architectures (x86, x86-64, mips, powerpc, and arm) that you can use unaltered in the QEMU emulator. - These kernels and filesystem images reside in the Yocto Project release + These kernel images reside in the Yocto Project release area - and are ideal for experimentation within Yocto Project. If you plan on remotely deploying and debugging your application from within the @@ -345,16 +352,39 @@ Reference: Images in The Yocto Project Reference Manual. - - + + +
- - WRITER'S NOTE: It seems to me that you need to take steps to unpack the image filesystem - at this point. - This would involve running the tarball environment setup script found in - build/tmp and then running the - runqemu-extract-sdk [tarball] [directory] command. - +
+ Extracting the Root Filesystem + + + You must extract the root filesystem if you want to boot the image using NFS or you + want to use the root filesystem as the target sysroot. + For example, the Eclipse IDE environment with the Eclipse Yocto Plug-in installed allows you + to boot under NFS. + Another example is if you want to test your image against actual hardware with the + root filesystem as the target sysroot. + + + + To extract the root filesystem you use the runqemu-extract-sdk command on the + filesystem image. + For example, the following command extracts the root filesystem from a previously built + filesystem image tarball named + core-image-sato-sdk-qemux86-2011091411831.rootfs.tar.bz2. + The example extracts the root filesystem into the $HOME/qemux86-sato + directory: + + $ runqemu-extract-sdk \ + tmp/deploy/images/core-image-sato-sdk-qemux86-2011091411831.rootfs.tar.bz2 \ + $HOME/qemux86-sato + + In this case, you could now point to the target sysroot at + $HOME/qemux86-sato. + +