As an alternative to locating and downloading a SDK installer, you can build the SDK installer. Follow these steps:
Set Up the Build Environment: Be sure you are set up to use BitBake in a shell. See the "Setting Up the Development Host to Use the Yocto Project" section in the Yocto Project Development Tasks Manual for information on how to get a build host ready that is either a native Linux machine or a machine that uses CROPS.
Clone the poky
Repository:
You need to have a local copy of the Yocto Project
Source Directory
(i.e. a local poky
repository).
See the
"Cloning the poky
Repository"
and possibly the
"Checking Out by Branch in Poky"
and
"Checking Out by Tag in Poky"
sections all in the Yocto Project Development Tasks Manual for
information on how to clone the poky
repository and check out the appropriate branch for your work.
Initialize the Build Environment:
While in the root directory of the Source Directory (i.e.
poky
), run the
oe-init-build-env
environment setup script to define the OpenEmbedded
build environment on your build host.
$ source oe-init-build-env
Among other things, the script creates the
Build Directory,
which is build
in this case
and is located in the
Source Directory.
After the script runs, your current working directory
is set to the build
directory.
Make Sure You Are Building an Installer for the Correct Machine:
Check to be sure that your
MACHINE
variable in the local.conf
file in your
Build Directory
matches the architecture for which you are building.
Make Sure Your SDK Machine is Correctly Set:
If you are building a toolchain designed to run on an
architecture that differs from your current development host
machine (i.e. the build machine), be sure that the
SDKMACHINE
variable in the local.conf
file in your
Build Directory is correctly set.
Build the SDK Installer:
To build the SDK installer for a standard SDK and populate
the SDK image, use the following command form.
Be sure to replace image
with
an image (e.g. "core-image-sato"):
$ bitbake image
-c populate_sdk
You can do the same for the extensible SDK using this command form:
$ bitbake image
-c populate_sdk_ext
These commands result in a SDK installer that contains the sysroot that matches your target root filesystem.
When the bitbake
command completes,
the SDK installer will be in
tmp/deploy/sdk
in the Build Directory.
By default, this toolchain does not build static
binaries.
If you want to use the toolchain to build these
types of libraries, you need to be sure your SDK
has the appropriate static development libraries.
Use the
TOOLCHAIN_TARGET_TASK
variable inside your local.conf
file to install the appropriate library packages
in the SDK.
Following is an example using
libc
static development
libraries:
TOOLCHAIN_TARGET_TASK_append = " libc-staticdev"
For additional information on building the installer, see the Cookbook guide to Making an Eclipse Debug Capable Image wiki page.
Run the Installer:
You can now run the SDK installer from
tmp/deploy/sdk
in the Build Directory.
Following is an example:
$ cd ~/poky/build/tmp/deploy/sdk $ ./poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-2.5.sh
During execution of the script, you choose the root location for the toolchain. See the "Installed Standard SDK Directory Structure" section and the "Installed Extensible SDK Directory Structure" section for more information.