2.1.2. 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 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.

Follow these steps:

  1. Go to http://downloads.yoctoproject.org/releases/yocto/yocto-1.4/toolchain/ and find the folder that matches your host development system (i.e. i686 for 32-bit machines or x86-64 for 64-bit machines).

  2. Go into that folder and download the toolchain installer whose name includes the appropriate target architecture. For example, if your host development system is an Intel-based 64-bit system and you are going to use your cross-toolchain for an Intel-based 32-bit target, go into the x86_64 folder and download the following installer:

         poky-eglibc-x86_64-i586-toolchain-gmae-1.4.sh
                        

    Note

    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. 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 poky-dylan-9.0/oe-init-build-env 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.

  3. 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.

    The following command shows how to run the installer given a toolchain tarball for a 64-bit development host system and a 32-bit target architecture. The example assumes the toolchain installer is located in ~/Downloads/.

         $ ~/Downloads/poky-eglibc-x86_64-i586-toolchain-gmae-1.4.sh
                        

    Note

    If you do not have write permissions for the directory into which you are installing the toolchain, the toolchain installer notifies you and exits. Be sure you have write permissions in the directory and run the installer again.

    Once the tarball is expanded, the cross-toolchain is installed. You will notice environment setup files for the cross-toolchain in the directory.