From d8e26e2b9f8b622d0cef3d3d1392dd0917343ded Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Fri, 1 Mar 2013 14:22:44 -0600 Subject: adt-manual: Updates to de-emphasize opt/poky and include sysroot Fixes YOCTO #2645 Several changes to make sure that the default toolchain directory (opt/poky) is understood as the default. I changed some wordings to call it out as the default. Some examples I left alone as they used /opt/poky but I clearly indicated that the example was using the default installation directory. I also updated the note in the manual that talks about alternatively building the toolchain installer. Previously, it mentioned two methods. I have added the third and most significant method that uses bitbake image -c populate_sdk. This method creates a toolchain installer that contains the matching sysroot. (From yocto-docs rev: 2e5eeb7e0c9aa448149cc369572b31dbc1603e28) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/adt-manual/adt-command.xml | 13 ++-- documentation/adt-manual/adt-prepare.xml | 117 +++++++++++++++++++------------ 2 files changed, 80 insertions(+), 50 deletions(-) (limited to 'documentation') diff --git a/documentation/adt-manual/adt-command.xml b/documentation/adt-manual/adt-command.xml index e5b2cdb420..18bfb8a829 100644 --- a/documentation/adt-manual/adt-command.xml +++ b/documentation/adt-manual/adt-command.xml @@ -7,8 +7,8 @@ Recall that earlier the manual discussed how to use an existing toolchain - tarball that had been installed into /opt/poky, - which is outside of the + tarball that had been installed into the default installation + directory, /opt/poky, which is outside of the Build Directory (see the section "Using a Cross-Toolchain Tarball)". And, that sourcing your architecture-specific environment setup script @@ -81,13 +81,15 @@ Source the cross-toolchain environment setup file: Installation of the cross-toolchain creates a cross-toolchain - environment setup script in /opt/poky/<release>. + environment setup script in the directory that the ADT + was installed. Before you can use the tools to develop your project, you must source this setup script. The script begins with the string "environment-setup" and contains the machine architecture, which is followed by the string "poky-linux". - Here is an example for an environment setup using the + Here is an example that sources a script from the + default ADT installation directory that uses the 32-bit Intel x86 Architecture and using the &DISTRO_NAME; Yocto Project release: @@ -158,8 +160,7 @@ For an Autotools-based project, you can use the cross-toolchain by just passing the appropriate host option to configure.sh. The host option you use is derived from the name of the environment setup - script in /opt/poky resulting from installation of the - cross-toolchain tarball. + script found in the directory in which you installed the cross-toolchain. For example, the host option for an ARM-based target that uses the GNU EABI is armv5te-poky-linux-gnueabi. You will notice that the name of the script is diff --git a/documentation/adt-manual/adt-prepare.xml b/documentation/adt-manual/adt-prepare.xml index fa191da002..4df10bfbc1 100644 --- a/documentation/adt-manual/adt-prepare.xml +++ b/documentation/adt-manual/adt-prepare.xml @@ -198,24 +198,29 @@ $ cd ~/adt-installer $ ./adt_installer - Once the installer begins to run, you are asked to enter the location for - cross-toolchain installation. - The default location is /opt/poky/<release>. - After selecting the location, you are prompted to run in - interactive or silent mode. - If you want to closely monitor the installation, choose “I” for interactive - mode rather than “S” for silent mode. + Once the installer begins to run, you are asked to enter the + location for cross-toolchain installation. + The default location is + /opt/poky/<release>. + After either accepting the default location or selecting your + own location, you are prompted to run the installation script + interactively or in silent mode. + If you want to closely monitor the installation, + choose “I” for interactive mode rather than “S” for silent mode. Follow the prompts from the script to complete the installation. - Once the installation completes, the ADT, which includes the cross-toolchain, is installed. - You will notice environment setup files for the cross-toolchain in - &YOCTO_ADTPATH_DIR;, - and image tarballs in the adt-installer - directory according to your installer configurations, and the target sysroot located - according to the YOCTOADT_TARGET_SYSROOT_LOC_<arch> variable - also in your configuration file. + Once the installation completes, the ADT, which includes the + cross-toolchain, is installed in the selected installation + directory. + You will notice environment setup files for the cross-toolchain + in the installation directory, and image tarballs in the + adt-installer directory according to your + installer configurations, and the target sysroot located + according to the + YOCTOADT_TARGET_SYSROOT_LOC_<arch> + variable also in your configuration file. @@ -224,11 +229,12 @@ Using a Cross-Toolchain Tarball - If you want to simply install the cross-toolchain by hand, you can do so by running the - toolchain installer. - If you use this method to install the cross-toolchain and you still need to install the target - sysroot, you will have to extract and install sysroot separately. - For information on how to do this, see the + If you want to simply install the cross-toolchain by hand, you can + do so by running the toolchain installer. + If you use this method to install the cross-toolchain and you + might still need to install the target sysroot by installing and + extracting it separately. + For information on how to install the sysroot, see the "Extracting the Root Filesystem" section. @@ -248,29 +254,50 @@ poky-eglibc-x86_64-i586-toolchain-gmae-&DISTRO;.sh - As an alternative to steps one and two, you can build the toolchain installer - if you have a Build Directory. - If you need GMAE, you should use the bitbake meta-toolchain-gmae + As an alternative to steps one and two, you can + build the toolchain installer if you have a + Build Directory. + If you need GMAE, you should use the + bitbake meta-toolchain-gmae command. - The resulting installation script when run will support such development. - However, if you are not concerned with GMAE, - you can generate the toolchain installer using - bitbake meta-toolchain. - Use the appropriate bitbake command only after you have - sourced the &OE_INIT_PATH; script located in the Source - Directory and you have made sure your conf/local.conf - variables are correct. + Running the resulting installation script will support + such development. + If you are not concerned with GMAE, you can generate + the toolchain installer using + bitbake meta-toolchain. + Either of these methods requires you to still + install the target sysroot by installing and + extracting it separately. + For information on how to install the sysroot, see the + "Extracting the Root Filesystem" section. + + A final method of building the toolchain installer + exists that has significant advantages over the previous + two methods. + This method results in a toolchain installer that + contains the sysroot that matches your target root + filesystem. + To build this installer, use the + bitbake image -c populate_sdk + command. + Remember, before using any + bitbake command, you must source + the &OE_INIT_PATH; script + located in the Source Directory and you must make sure + your conf/local.conf variables are + correct. In particular, you need to be sure the MACHINE - variable matches the architecture for which you are building and that the - SDKMACHINE variable is correctly set if you are building - a toolchain for an architecture that differs from your current - development host machine. - When the bitbake command completes, the - toolchain installer will be in tmp/deploy/sdk in the - Build Directory. - - + variable matches the architecture for which you are + building and that the SDKMACHINE + variable is correctly set if you are building + a toolchain for an architecture that differs from your + current development host machine. + When the bitbake command + completes, the toolchain installer will be in + tmp/deploy/sdk in the Build + Directory. + Once you have the installer, run it to install the toolchain. You must change the permissions on the toolchain installer script so that it is executable. @@ -354,7 +381,8 @@ Before you can develop using the cross-toolchain, you need to set up the cross-development environment by sourcing the toolchain's environment setup script. If you used the ADT Installer or hand-installed cross-toolchain, - then you can find this script in the &YOCTO_ADTPATH_DIR; + then you can find this script in the directory you chose for installation. + The default installation directory is the &YOCTO_ADTPATH_DIR; directory. If you installed the toolchain in the Build Directory, @@ -367,8 +395,9 @@ which you are developing. Environment setup scripts begin with the string “environment-setup” and include as part of their name the architecture. - For example, the toolchain environment setup script for a 64-bit IA-based architecture would - be the following: + For example, the toolchain environment setup script for a 64-bit + IA-based architecture installed in the default installation directory + would be the following: &YOCTO_ADTPATH_DIR;/environment-setup-x86_64-poky-linux @@ -497,9 +526,9 @@ The example extracts the root filesystem into the $HOME/qemux86-sato directory: - $ source $HOME/poky/build/tmp/environment-setup-i586-poky-linux + $ source $HOME/toolchain_dir/environment-setup-i586-poky-linux $ runqemu-extract-sdk \ - tmp/deploy/images/core-image-sato-sdk-qemux86-2011091411831.rootfs.tar.bz2 \ + ~Downloads/core-image-sato-sdk-qemux86-2011091411831.rootfs.tar.bz2 \ $HOME/qemux86-sato In this case, you could now point to the target sysroot at -- cgit v1.2.3-54-g00ecf