1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 05:29:32 +00:00

documentation/adt-manual: General edits.

I made a pass through the manual and made some general formatting changes,
updated some links in anticipation for the 1.1 release.

(From yocto-docs rev: f2d3a012fbe4e8db3cf07e5497acfdf732e55d97)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark
2011-09-01 09:18:33 -07:00
committed by Richard Purdie
parent b214cdc7e8
commit 77d1ba446c
4 changed files with 277 additions and 247 deletions
+8 -5
View File
@@ -3,12 +3,13 @@
<chapter id='using-the-command-line'> <chapter id='using-the-command-line'>
<title>Using the Command Line</title> <title>Using the Command Line</title>
<para> <para>
Recall that earlier we talked about how to use an existing toolchain Recall that earlier the manual discussed how to use an existing toolchain
tarball that had been installed into <filename>/opt/poky</filename>, tarball that had been installed into <filename>/opt/poky</filename>,
which is outside of the Yocto Project build tree which is outside of the Yocto Project build tree
(see <xref linkend='using-an-existing-toolchain-tarball'> (see the section "<link linkend='using-an-existing-toolchain-tarball'>Using an Existing
Using an Existing Toolchain Tarball)</xref>. Toolchain Tarball)</link>".
And, that sourcing your architecture-specific environment setup script And, that sourcing your architecture-specific environment setup script
initializes a suitable cross-toolchain development environment. initializes a suitable cross-toolchain development environment.
This setup occurs by adding the compiler, QEMU scripts, QEMU binary, This setup occurs by adding the compiler, QEMU scripts, QEMU binary,
@@ -20,11 +21,12 @@
test results for tests that need target hardware on which to run. test results for tests that need target hardware on which to run.
These conditions allow you to easily use the toolchain outside of the These conditions allow you to easily use the toolchain outside of the
Yocto Project build environment on both autotools-based projects and Yocto Project build environment on both autotools-based projects and
makefile-based projects. Makefile-based projects.
</para> </para>
<section id='autotools-based-projects'> <section id='autotools-based-projects'>
<title>Autotools-Based Projects</title> <title>Autotools-Based Projects</title>
<para> <para>
For an autotools-based project, you can use the cross-toolchain by just For an autotools-based project, you can use the cross-toolchain by just
passing the appropriate host option to <filename>configure.sh</filename>. passing the appropriate host option to <filename>configure.sh</filename>.
@@ -49,8 +51,9 @@
<section id='makefile-based-projects'> <section id='makefile-based-projects'>
<title>Makefile-Based Projects</title> <title>Makefile-Based Projects</title>
<para> <para>
For a makefile-based project you use the cross-toolchain by making sure For a Makefile-based project, you use the cross-toolchain by making sure
the tools are used. the tools are used.
You can do this as follows: You can do this as follows:
<literallayout class='monospaced'> <literallayout class='monospaced'>
+58 -50
View File
@@ -13,29 +13,41 @@
<section id='book-intro'> <section id='book-intro'>
<title>Introducing the Application Development Toolkit (ADT)</title> <title>Introducing the Application Development Toolkit (ADT)</title>
<para> <para>
Fundamentally, the ADT consists of an architecture-specific cross-toolchain and Fundamentally, the ADT consists of an architecture-specific cross-toolchain and
a matching sysroot that are both built by the Poky build system. a matching sysroot that are both built by the Yocto Project build system Poky.
The toolchain and sysroot are based on a metadata configuration and extensions, The toolchain and sysroot are based on a metadata configuration and extensions,
which allows you to cross develop for the target on the host machine. which allows you to cross-develop on the host machine for the target.
</para> </para>
<para> <para>
Additionally, to provide an effective development platform, the Yocto Project Additionally, to provide an effective development platform, the Yocto Project
makes available and suggests other tools you can use with the ADT. makes available and suggests other tools you can use with the ADT.
These other tools include the Eclipse IDE Yocto Plug-in, an emulator (QEMU), These other tools include the Eclipse IDE Yocto Plug-in, an emulator (QEMU),
and various user-space tools that greatly enhance your development experience. and various user-space tools that greatly enhance your development experience.
</para> </para>
<para> <para>
The resulting combination of the architecture-specific cross-toolchain and sysroot The resulting combination of the architecture-specific cross-toolchain and sysroot
along with these additional tools yields a custom-built, cross-development platform along with these additional tools yields a custom-built, cross-development platform
for a user-targeted product. for a user-targeted product.
</para> </para>
</section>
<section id='adt-components'>
<title>ADT Components</title>
<para>
This section provides a brief description of what comprises the ADT.
</para>
<section id='the-cross-toolchain'> <section id='the-cross-toolchain'>
<title>The Cross-Toolchain</title> <title>The Cross-Toolchain</title>
<para> <para>
The cross-toolchain consists of a cross-compiler, cross-linker, and cross-debugger The cross-toolchain consists of a cross-compiler, cross-linker, and cross-debugger
that are used to develop for targeted hardware. that are used to develop user-space applications for targeted hardware.
This toolchain is created either by running the ADT Installer script or This toolchain is created either by running the ADT Installer script or
through a Yocto Project build tree that is based on your metadata through a Yocto Project build tree that is based on your metadata
configuration or extension for your targeted device. configuration or extension for your targeted device.
@@ -45,80 +57,76 @@
<section id='sysroot'> <section id='sysroot'>
<title>Sysroot</title> <title>Sysroot</title>
<para> <para>
The matching target sysroot contains needed headers and libraries for generating The matching target sysroot contains needed headers and libraries for generating
binaries that run on the target architecture. binaries that run on the target architecture.
The sysroot is based on the target root filesystem image that is built by The sysroot is based on the target root filesystem image that is built by
Poky and uses the same metadata configuration used to build the cross-toolchain. the Yocto Project's build system Poky and uses the same metadata configuration
used to build the cross-toolchain.
</para> </para>
</section> </section>
<section id='the-qemu-emulator'> <section id='the-qemu-emulator'>
<title>The QEMU Emulator</title> <title>The QEMU Emulator</title>
<para> <para>
The QEMU emulator allows you to simulate your hardware while running your The QEMU emulator allows you to simulate your hardware while running your
application or image. application or image.
QEMU is made available a number of ways: QEMU is made available a number of ways:
<itemizedlist> <itemizedlist>
<listitem><para>If you use the ADT Installer script to install ADT you can <listitem><para>If you use the ADT Installer script to install ADT, you can
specify whether or not to install QEMU.</para></listitem> specify whether or not to install QEMU.</para></listitem>
<listitem><para>If you have downloaded a Yocto Project release and unpacked <listitem><para>If you have downloaded a Yocto Project release and unpacked
it to create a Yocto Project source directory followed by sourcing it to create a Yocto Project file structure and you have sourced
the Yocto Project environment setup script, QEMU is installed and automatically the Yocto Project environment setup script, QEMU is installed and automatically
available.</para></listitem> available.</para></listitem>
<listitem><para>If you have installed the cross-toolchain <listitem><para>If you have installed the cross-toolchain
tarball followed by sourcing the toolchain's setup environment script, QEMU tarball and you have sourcing the toolchain's setup environment script, QEMU
is installed and automatically available.</para></listitem> is also installed and automatically available.</para></listitem>
</itemizedlist> </itemizedlist>
</para> </para>
</section> </section>
<section id='user-space-tools'> <section id='user-space-tools'>
<title>User-Space Tools</title> <title>User-Space Tools</title>
<para> <para>
User-space tools are included as part of the distribution. User-space tools are included as part of the distribution.
You will find these tools helpful during development. You will find these tools helpful during development.
The tools include LatencyTOP, PowerTOP, OProfile, Perf, SystemTap, and Lttng-ust. The tools include LatencyTOP, PowerTOP, OProfile, Perf, SystemTap, and Lttng-ust.
These tools are common development tools for the Linux platform. These tools are common development tools for the Linux platform.
<itemizedlist> <itemizedlist>
<listitem><para><emphasis>LatencyTOP</emphasis> LatencyTOP focuses on latency <listitem><para><emphasis>LatencyTOP:</emphasis> LatencyTOP focuses on latency
that causes skips in audio, that causes skips in audio,
stutters in your desktop experience, or situations that overload your server stutters in your desktop experience, or situations that overload your server
even when you have plenty of CPU power left. even when you have plenty of CPU power left.
You can find out more about LatencyTOP at You can find out more about LatencyTOP at
<ulink url='http://www.latencytop.org/'></ulink>. <ulink url='http://www.latencytop.org/'></ulink>.</para></listitem>
</para></listitem> <listitem><para><emphasis>PowerTOP:</emphasis> Helps you determine what
<listitem><para><emphasis>PowerTOP</emphasis> Helps you determine what software is using the most power.
software is using the most power. You can find out more about PowerTOP at
You can find out more about PowerTOP at <ulink url='http://www.linuxpowertop.org/'></ulink>.</para></listitem>
<ulink url='http://www.linuxpowertop.org/'></ulink>. <listitem><para><emphasis>OProfile:</emphasis> A system-wide profiler for Linux
</para></listitem> systems that is capable of profiling all running code at low overhead.
<listitem><para><emphasis>OProfile</emphasis> A system-wide profiler for Linux You can find out more about OProfile at
systems that is capable <ulink url='http://oprofile.sourceforge.net/about/'></ulink>.</para></listitem>
of profiling all running code at low overhead. <listitem><para><emphasis>Perf:</emphasis> Performance counters for Linux used
You can find out more about OProfile at to keep track of certain types of hardware and software events.
<ulink url='http://oprofile.sourceforge.net/about/'></ulink>. For more information on these types of counters see
</para></listitem> <ulink url='https://perf.wiki.kernel.org/index.php'></ulink> and click
<listitem><para><emphasis>Perf</emphasis> Performance counters for Linux used on “Perf tools.”</para></listitem>
to keep track of certain <listitem><para><emphasis>SystemTap:</emphasis> A free software infrastructure
types of hardware and software events. that simplifies information gathering about a running Linux system.
For more information on these types of counters see This information helps you diagnose performance or functional problems.
<ulink url='https://perf.wiki.kernel.org/index.php'></ulink> and click SystemTap is not available as a user-space tool through the Yocto Eclipse IDE Plug-in.
on “Perf tools.” See <ulink url='http://sourceware.org/systemtap'></ulink> for more information
</para></listitem> on SystemTap.</para></listitem>
<listitem><para><emphasis>SystemTap</emphasis> A free software infrastructure <listitem><para><emphasis>Lttng-ust:</emphasis> A User-space Tracer designed to
that simplifies provide detailed information on user-space activity.
information gathering about a running Linux system. See <ulink url='http://lttng.org/ust'></ulink> for more information on Lttng-ust.
This information helps you diagnose performance or functional problems. </para></listitem>
SystemTap is not available as a user-space tool through the Yocto Eclipse IDE Plug-in. </itemizedlist>
See <ulink url='http://sourceware.org/systemtap'></ulink> for more information
on SystemTap.
</para></listitem>
<listitem><para><emphasis>Lttng-ust</emphasis> A User-space Tracer designed to
provide detailed information on user-space activity.
See <ulink url='http://lttng.org/ust'></ulink> for more information on Lttng-ust.
</para></listitem>
</itemizedlist>
</para> </para>
</section> </section>
</section> </section>
+29 -23
View File
@@ -3,6 +3,7 @@
<chapter id='adt-package'> <chapter id='adt-package'>
<title>Optionally Customizing the Development Packages Installation</title> <title>Optionally Customizing the Development Packages Installation</title>
<para> <para>
Because the Yocto Project is suited for embedded Linux development, it is Because the Yocto Project is suited for embedded Linux development, it is
likely that you will need to customize your development packages installation. likely that you will need to customize your development packages installation.
@@ -13,32 +14,34 @@
<section id='package-management-systems'> <section id='package-management-systems'>
<title>Package Management Systems</title> <title>Package Management Systems</title>
<para> <para>
The Yocto Project supports the generation of sysroot files using The Yocto Project supports the generation of sysroot files using
three different Package Management Systems (PMS): three different Package Management Systems (PMS):
<itemizedlist> <itemizedlist>
<listitem><para><emphasis>OPKG</emphasis> A less well known PMS whose use <listitem><para><emphasis>OPKG:</emphasis> A less well known PMS whose use
originated in the OpenEmbedded and OpenWrt embedded Linux projects. originated in the OpenEmbedded and OpenWrt embedded Linux projects.
This PMS works with files packaged in an <filename>.ipk</filename> format. This PMS works with files packaged in an <filename>.ipk</filename> format.
See <ulink url='http://en.wikipedia.org/wiki/Opkg'></ulink> for more See <ulink url='http://en.wikipedia.org/wiki/Opkg'></ulink> for more
information about OPKG.</para></listitem> information about OPKG.</para></listitem>
<listitem><para><emphasis>RPM</emphasis> A more widely known PMS intended for GNU/Linux <listitem><para><emphasis>RPM:</emphasis> A more widely known PMS intended for GNU/Linux
distributions. distributions.
This PMS works with files packaged in an <filename>.rms</filename> format. This PMS works with files packaged in an <filename>.rms</filename> format.
The Yocto Project currently installs through this PMS by default. The Yocto Project currently installs through this PMS by default.
See <ulink url='http://en.wikipedia.org/wiki/RPM_Package_Manager'></ulink> See <ulink url='http://en.wikipedia.org/wiki/RPM_Package_Manager'></ulink>
for more information about RPM.</para></listitem> for more information about RPM.</para></listitem>
<listitem><para><emphasis>Debian</emphasis> The PMS for Debian-based systems <listitem><para><emphasis>Debian:</emphasis> The PMS for Debian-based systems
is built on many PMS tools. is built on many PMS tools.
The lower-level PMS tool <filename>dpkg</filename> forms the base of the Debian PMS. The lower-level PMS tool <filename>dpkg</filename> forms the base of the Debian PMS.
For information on dpkg see For information on dpkg see
<ulink url='http://en.wikipedia.org/wiki/Dpkg'></ulink>.</para></listitem> <ulink url='http://en.wikipedia.org/wiki/Dpkg'></ulink>.</para></listitem>
</itemizedlist> </itemizedlist>
</para> </para>
</section> </section>
<section id='configuring-the-pms'> <section id='configuring-the-pms'>
<title>Configuring the PMS</title> <title>Configuring the PMS</title>
<para> <para>
Whichever PMS you are using, you need to be sure that the Whichever PMS you are using, you need to be sure that the
<filename>PACKAGE_CLASSES</filename> variable in the <filename>conf/local.conf</filename> <filename>PACKAGE_CLASSES</filename> variable in the <filename>conf/local.conf</filename>
@@ -48,10 +51,12 @@
Additional values specify additional formats for convenience or testing. Additional values specify additional formats for convenience or testing.
See the configuration file for details. See the configuration file for details.
</para> </para>
<para> <para>
As an example, consider a scenario where you are using OPKG and you want to add As an example, consider a scenario where you are using OPKG and you want to add
the <filename>libglade</filename> package to the target sysroot. the <filename>libglade</filename> package to the target sysroot.
</para> </para>
<para> <para>
First, you should generate the <filename>ipk</filename> file for the First, you should generate the <filename>ipk</filename> file for the
<filename>libglade</filename> package and add it <filename>libglade</filename> package and add it
@@ -62,20 +67,21 @@
$ bitbake package-index $ bitbake package-index
</literallayout> </literallayout>
</para> </para>
<para> <para>
Next, source the environment setup script found in the Yocto Project files. Next, source the environment setup script found in the Yocto Project files.
Follow that by setting up the installation destination to point to your Follow that by setting up the installation destination to point to your
sysroot as <filename>&lt;sysroot_dir&gt;</filename>. sysroot as <filename>&lt;sysroot_dir&gt;</filename>.
Finally, have an <filename>opkg</filename> configuration file <filename>&lt;conf_file&gt;</filename> Finally, have an OPKG configuration file <filename>&lt;conf_file&gt;</filename>
that corresponds to the <filename>opkg</filename> repository you have just created. that corresponds to the <filename>opkg</filename> repository you have just created.
The following command forms should now work: The following command forms should now work:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ opkg-cl f &lt;conf_file&gt; -o &lt;sysroot-dir&gt; update $ opkg-cl f &lt;conf_file&gt; -o &lt;sysroot_dir&gt; update
$ opkg-cl f &lt;cconf_file&gt; -o &lt;sysroot-dir&gt; \ $ opkg-cl f &lt;cconf_file&gt; -o &lt;sysroot_dir&gt; \
--force-overwrite install libglade --force-overwrite install libglade
$ opkg-cl f &lt;cconf_file&gt; -o &lt;sysroot-dir&gt; \ $ opkg-cl f &lt;cconf_file&gt; -o &lt;sysroot_dir&gt; \
--force-overwrite install libglade-dbg --force-overwrite install libglade-dbg
$ opkg-cl f &lt;conf_file&gt; -o &lt;sysroot-dir&gt; \ $ opkg-cl f &lt;conf_file&gt; -o &lt;sysroot_dir&gt; \
--force-overwrite install libglade-dev --force-overwrite install libglade-dev
</literallayout> </literallayout>
</para> </para>
+182 -169
View File
@@ -6,75 +6,84 @@
<title>Preparing to Use the Application Development Toolkit (ADT)</title> <title>Preparing to Use the Application Development Toolkit (ADT)</title>
<para> <para>
In order to use the ADT you must install it, source a script to set up the In order to use the ADT, you must install it, <filename>source</filename> a script to set up the
environment, and be sure the kernel and filesystem image specific to the target architecture environment, and be sure both the kernel and filesystem image specific to the target architecture
exists. exist.
</para> </para>
<para> <para>
This section describes how to be sure you meet these requirements. This chapter describes two important terms and how to be sure you meet the ADT requirements.
Throughout this section two important terms are used:
<itemizedlist>
<listitem><para><emphasis>The Yocto Project Files:</emphasis>
This term refers to the directory structure created as a result of downloading
and unpacking a Yocto Project release tarball or setting up a Git repository
by cloning <filename>git://git.yoctoproject.org/poky</filename>.
The Yocto Project files contain BitBake, Documentation, metadata and
other files that all support the development environment.
The name of the top-level directory of the Yocto Project files
is derived from the Yocto Project release tarball.
For example, downloading and unpacking <filename>poky-bernard-5.0.1.tar.bz2</filename>
results in a Yocto Project source tree whose Yocto Project source directory is named
<filename>poky-bernard-5.0.1</filename>.
If you create a Git repository then you can name the repository anything you like.
</para></listitem>
<listitem><para><emphasis>Yocto Project Build Tree:</emphasis>
This term refers to the area where Yocto Project builds images.
The area is created when you source the Yocto Project setup environment script
that is found in the Yocto Project files area.
(e.g. <filename>poky-init-build-env</filename>).
You can create the Yocto Project build tree anywhere you want on your
development system.
Here is an example that creates the tree in <filename>mybuilds</filename>
and names the Yocto Project build directory <filename>YP-5.0.1</filename>:
<literallayout class='monospaced'>
$ source poky-bernard-5.0.1/poky-init-build-env $HOME/mybuilds/YP-5.0.1
</literallayout>
If you don't specifically name the build directory then BitBake creates it
in the current directory and uses the name <filename>build</filename>.
Also, if you supply an existing directory then BitBake uses that
directory as the Yocto Project build directory and populates the build tree
beneath it.</para></listitem>
</itemizedlist>
</para> </para>
<section id='yocto-project-files'>
<title>Yocto Project Files and Build Areas</title>
<para>
Before learning how to prepare your system for the ADT, you need to understand
two important terms used throughout this manual:
<itemizedlist>
<listitem><para><emphasis>The Yocto Project Files:</emphasis>
This term refers to the directory structure created as a result of downloading
and unpacking a Yocto Project release tarball or setting up a Git repository
by cloning <filename>git://git.yoctoproject.org/poky</filename>.</para>
<para>The Yocto Project files contain BitBake, Documentation, metadata and
other files that all support the development environment.
Consequently, you must have the Yocto Project files in place on your development
system in order to do any development using the Yocto Project.</para>
<para>The name of the top-level directory of the Yocto Project file structure
is derived from the Yocto Project release tarball.
For example, downloading and unpacking <filename>poky-edison-6.0.tar.bz2</filename>
results in a Yocto Project source tree whose Yocto Project source directory is named
<filename>poky-edison-6.0</filename>.
If you create a Git repository, then you can name the repository anything you like.
</para></listitem>
<listitem><para><emphasis>Yocto Project Build Tree:</emphasis>
This term refers to the area where the Yocto Project builds images.
The area is created when you <filename>source</filename> the Yocto Project setup
environment script that is found in the Yocto Project files area.
(e.g. <filename>oe-init-build-env</filename>).
You can create the Yocto Project build tree anywhere you want on your
development system.
Here is an example that creates the tree in <filename>mybuilds</filename>
and names the Yocto Project build directory <filename>YP-6.0</filename>:
<literallayout class='monospaced'>
$ source poky-edison-6.0/oe-init-build-env $HOME/mybuilds/YP-6.0
</literallayout>
If you don't specifically name the build directory, then BitBake creates it
in the current directory and uses the name <filename>build</filename>.
Also, if you supply an existing directory, then BitBake uses that
directory as the Yocto Project build directory and populates the build tree
beneath it.</para></listitem>
</itemizedlist>
</para>
</section>
<section id='installing-the-adt'> <section id='installing-the-adt'>
<title>Installing the ADT</title> <title>Installing the ADT</title>
<para> <para>
The following list describes how you can install the ADT, which includes the cross-toolchain. The following list describes how you can install the ADT, which includes the cross-toolchain.
Regardless of the installation you choose, however, you must source the cross-toolchain Regardless of the installation you choose, you must <filename>source</filename> the cross-toolchain
environment setup script before you use the toolchain. environment setup script before you use the toolchain.
See the <xref linkend='setting-up-the-environment'>Setting Up the Environment</xref> See the "<link linkend='setting-up-the-environment'>Setting Up the Environment</link>"
section for more information. section for more information.
<itemizedlist> <itemizedlist>
<listitem><para><emphasis>Use the ADT Installer Script:</emphasis> <listitem><para><emphasis>Use the ADT Installer Script:</emphasis>
This method is the recommended way to install the ADT because it This method is the recommended way to install the ADT because it
automates much of the process for you. automates much of the process for you.
For example, you can configure the installation to install the QEMU emulator For example, you can configure the installation to install the QEMU emulator
and the user-space NFS, specify which root filesystem profiles to download, and the user-space NFS, specify which root filesystem profiles to download,
and define the target sysroot location. and define the target sysroot location.</para></listitem>
</para></listitem>
<listitem><para><emphasis>Use an Existing Toolchain Tarball:</emphasis> <listitem><para><emphasis>Use an Existing Toolchain Tarball:</emphasis>
Using this method you select and download an architecture-specific Using this method, you select and download an architecture-specific
toolchain tarball and then hand-install the toolchain. toolchain tarball and then hand-install the toolchain.
If you use this method, you just get the cross-toolchain and QEMU - you do not If you use this method, you just get the cross-toolchain and QEMU - you do not
get any of the other mentioned benefits had you run the ADT Installer script.</para></listitem> get any of the other mentioned benefits had you run the ADT Installer script.</para></listitem>
<listitem><para><emphasis>Use the Toolchain from within a Yocto Project Build Tree:</emphasis> <listitem><para><emphasis>Use the Toolchain from within a Yocto Project Build Tree:</emphasis>
If you already have a Yocto Project build tree, you can install the cross-toolchain If you already have a Yocto Project build tree, you can install the cross-toolchain
using that tree. using that tree.
However, like the previous method mentioned, you only get the cross-toolchain and QEMU - you However, like the previous method mentioned, you only get the cross-toolchain and QEMU - you
do not get any of the other benefits without taking separate steps.</para></listitem> do not get any of the other benefits without taking separate steps.</para></listitem>
</itemizedlist> </itemizedlist>
</para> </para>
@@ -92,32 +101,34 @@
<para> <para>
The ADT Installer is contained in the ADT Installer tarball. The ADT Installer is contained in the ADT Installer tarball.
You can download the tarball into any directory from You can download the tarball into any directory from
<ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.0/adt-installer/'></ulink>. <ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.1/adt-installer/'></ulink>.
Or, you can use BitBake to generate the tarball inside the existing Yocto Project build tree. Or, you can use BitBake to generate the tarball inside the existing Yocto Project
build tree.
</para> </para>
<para> <para>
If you use BitBake to generate the ADT Installer tarball, you must If you use BitBake to generate the ADT Installer tarball, you must
source the Yocto Project environment setup script located in the Yocto Project <filename>source</filename> the Yocto Project environment setup script located
files before running the BitBake command that creates the tarball. in the Yocto Project file structure before running the <filename>bitbake</filename>
command that creates the tarball.
</para> </para>
<para> <para>
The following example commands download the Yocto Project release tarball, set up the Yocto The following example commands download the Yocto Project release tarball, set up the Yocto
Project files, set up the environment while also creating the Yocto Project build tree, Project files structure, set up the environment while also creating the
and finally run the BitBake command that results in the tarball default Yocto Project build tree,
and run the <filename>bitbake</filename> command that results in the tarball
<filename>~/yocto-project/build/tmp/deploy/sdk/adt_installer.tar.bz2</filename>: <filename>~/yocto-project/build/tmp/deploy/sdk/adt_installer.tar.bz2</filename>:
<literallayout class='monospaced'> <literallayout class='monospaced'>
$ cd ~ $ cd ~
$ mkdir yocto-project $ mkdir yocto-project
$ cd yocto-project $ cd yocto-project
$ wget http://www.yoctoproject.org/downloads/poky/poky-bernard-5.0.1.tar.bz2 $ wget http://www.yoctoproject.org/downloads/poky/poky-edison-6.0.tar.bz2
$ tar xjf poky-bernard-5.0.1.tar.bz2 $ tar xjf poky-edison-6.0.tar.bz2
$ source poky-bernard-5.0.1/poky-init-build-env poky-5.0.1-build $ source poky-edison-6.0/oe-init-build-env
$ bitbake adt-installer $ bitbake adt-installer
</literallayout> </literallayout>
</para> </para>
</section> </section>
<section id='configuring-and-running-the-adt-installer-script'> <section id='configuring-and-running-the-adt-installer-script'>
@@ -138,57 +149,50 @@
<para> <para>
The following list describes the configurations you can define for the ADT Installer. The following list describes the configurations you can define for the ADT Installer.
For configuration values and restrictions see the comments in For configuration values and restrictions, see the comments in
the <filename>adt-installer.conf</filename> file: the <filename>adt-installer.conf</filename> file:
<itemizedlist> <itemizedlist>
<listitem><para><filename>YOCTOADT_IPKG_REPO</filename> This area <listitem><para><filename>YOCTOADT_IPKG_REPO</filename>: This area
includes the IPKG-based packages and the root filesystem upon which includes the IPKG-based packages and the root filesystem upon which
the installation is based. the installation is based.
If you want to set up your own IPKG repository pointed to by If you want to set up your own IPKG repository pointed to by
<filename>YOCTOADT_IPKG_REPO</filename>, you need to be sure that the <filename>YOCTOADT_IPKG_REPO</filename>, you need to be sure that the
directory structure follows the same layout as the reference directory directory structure follows the same layout as the reference directory
set up at <ulink url='http://adtrepo.yoctoproject.org'></ulink>. set up at <ulink url='http://adtrepo.yoctoproject.org'></ulink>.
Also, your repository needs to be accessible through HTTP. Also, your repository needs to be accessible through HTTP.</para></listitem>
</para></listitem> <listitem><para><filename>YOCTOADT-TARGETS</filename>: The machine
<listitem><para><filename>YOCTOADT-TARGETS</filename> The machine target architectures for which you want to set up cross-development
target architectures for which you want to set up cross-development environments.</para></listitem>
environments. <listitem><para><filename>YOCTOADT_QEMU</filename>: Indicates whether
</para></listitem> or not to install the emulator QEMU.</para></listitem>
<listitem><para><filename>YOCTOADT_QEMU</filename> Indicates whether <listitem><para><filename>YOCTOADT_NFS_UTIL</filename>: Indicates whether
or not to install the emulator QEMU. or not to install user-mode NFS.
</para></listitem> If you plan to use the Yocto Eclipse IDE plug-in against QEMU,
<listitem><para><filename>YOCTOADT_NFS_UTIL</filename> Indicates whether you should install NFS.
or not to install user-mode NFS. <note>To boot QEMU images using our userspace NFS server, you need
If you plan to use the Yocto Eclipse IDE plug-in against QEMU, to be running <filename>portmap</filename> or <filename>rpcbind</filename>.
you should install NFS. If you are running <filename>rpcbind</filename>, you will also need to add the
<note> <filename>-i</filename> option when <filename>rpcbind</filename> starts up.
To boot QEMU images using our userspace NFS server, you need Please make sure you understand the security implications of doing this.
to be running <filename>portmap</filename> or <filename>rpcbind</filename>. You might also have to modify your firewall settings to allow
If you are running <filename>rpcbind</filename>, you will also need to add the NFS booting to work.</note></para></listitem>
<filename>-i</filename> option when <filename>rpcbind</filename> starts up. <listitem><para><filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename>: The root
Please make sure you understand the security implications of doing this. filesystem images you want to download from the
Your firewall settings may also have to be modified to allow <filename>YOCTOADT_IPKG_REPO</filename> repository.</para></listitem>
NFS booting to work. <listitem><para><filename>YOCTOADT_TARGET_SYSROOT_IMAGE_&lt;arch&gt;</filename>: The
</note> particular root filesystem used to extract and create the target sysroot.
</para></listitem> The value of this variable must have been specified with
<listitem><para><filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename> - The root <filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename>.
filesystem images you want to download from the <filename>YOCTOADT_IPKG_REPO</filename> For example, if you downloaded both <filename>minimal</filename> and
repository. <filename>sato-sdk</filename> images by setting
</para></listitem> <filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename>
<listitem><para><filename>YOCTOADT_TARGET_SYSROOT_IMAGE_&lt;arch&gt;</filename> - The to "minimal sato-sdk", then <filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename>
particular root filesystem used to extract and create the target sysroot. must be set to either <filename>minimal</filename> or
The value of this variable must have been specified with <filename>sato-sdk</filename>.</para></listitem>
<filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename>. <listitem><para><filename>YOCTOADT_TARGET_SYSROOT_LOC_&lt;arch&gt;</filename>: The
For example, if you downloaded both <filename>minimal</filename> and location on the development host where the target sysroot is created.
<filename>sato-sdk</filename> images by setting <filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename> </para></listitem>
to "minimal sato-sdk", then <filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename>
must be set to either <filename>minimal</filename> or
<filename>sato-sdk</filename>.
</para></listitem>
<listitem><para><filename>YOCTOADT_TARGET_SYSROOT_LOC_&lt;arch&gt;</filename> - The
location on the development host where the target sysroot will be created.
</para></listitem>
</itemizedlist> </itemizedlist>
</para> </para>
@@ -203,14 +207,16 @@
<note> <note>
The ADT Installer requires the <filename>libtool</filename> package to complete. The ADT Installer requires the <filename>libtool</filename> package to complete.
If you install the recommended packages as described in the If you install the recommended packages as described in the
<ulink url='http://www.yoctoproject.org/docs/yocto-project-qs/yocto-project-qs.html'> <ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#packages'>
Yocto Project Quick Start</ulink> then you will have libtool installed. Packages</ulink> section of
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html'>
The Yocto Project Quick Start</ulink>, then you will have libtool installed.
</note> </note>
<para> <para>
Once the installer begins to run, you are asked whether you want to run in Once the installer begins to run, you are asked whether you want to run in
interactive or silent mode. interactive or silent mode.
If you want to closely monitor the installation then choose “I” for interactive If you want to closely monitor the installation, choose “I” for interactive
mode rather than “S” for silent mode. mode rather than “S” for silent mode.
Follow the prompts from the script to complete the installation. Follow the prompts from the script to complete the installation.
</para> </para>
@@ -224,12 +230,12 @@
according to the <filename>YOCTOADT_TARGET_SYSROOT_LOC_&lt;arch&gt;</filename> variable according to the <filename>YOCTOADT_TARGET_SYSROOT_LOC_&lt;arch&gt;</filename> variable
also in your configuration file. also in your configuration file.
</para> </para>
</section>
</section>
</section> </section>
<section id='using-an-existing-toolchain-tarball'> <section id='using-an-existing-toolchain-tarball'>
<title>Using a Cross-Toolchain Tarball</title> <title>Using a Cross-Toolchain Tarball</title>
<para> <para>
If you want to simply install the cross-toolchain by hand, you can do so by using an existing If you want to simply install the cross-toolchain by hand, you can do so by using an existing
cross-toolchain tarball. cross-toolchain tarball.
@@ -240,69 +246,73 @@
Follow these steps: Follow these steps:
<orderedlist> <orderedlist>
<listitem><para>Go to <listitem><para>Go to
<ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.0/toolchain'></ulink> <ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.1/toolchain'></ulink>
and find the folder that matches your host development system and find the folder that matches your host development system
(i.e. <filename>i686</filename> for 32-bit machines or (i.e. <filename>i686</filename> for 32-bit machines or
<filename>x86_64</filename> for 64-bit machines).</para> <filename>x86_64</filename> for 64-bit machines).</para></listitem>
</listitem>
<listitem><para>Go into that folder and download the toolchain tarball whose name <listitem><para>Go into that folder and download the toolchain tarball whose name
includes the appropriate target architecture. includes the appropriate target architecture.
For example, if your host development system is an Intel-based 64-bit system and 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 arm target, go into the you are going to use your cross-toolchain for an ARM-based target, go into the
<filename>x86_64</filename> folder and download the following tarball: <filename>x86_64</filename> folder and download the following tarball:
<literallayout class='monospaced'> <literallayout class='monospaced'>
yocto-eglibc-x86_64-arm-toolchain-gmae-1.1.tar.bz2 yocto-eglibc-x86_64-arm-toolchain-gmae-1.1.tar.bz2
</literallayout> </literallayout>
<note> <note>Alternatively, you can build the toolchain tarball if you have a Yocto
Alternatively, you can build the toolchain tarball if you have a Yocto Project build tree. Project build tree.
Use the <filename>bitbake meta-toolchain</filename> command after you have Use the <filename>bitbake meta-toolchain</filename> command after you have
sourced the <filename>poky-build-init script</filename> located in the Yocto Project sourced the <filename>oe-build-init script</filename> located in the Yocto
files. Project files.
When the <filename>bitbake</filename> command completes, the toolchain tarball will When the <filename>bitbake</filename> command completes, the toolchain tarball will
be in <filename>tmp/deploy/sdk</filename> in the Yocto Project build tree. be in <filename>tmp/deploy/sdk</filename> in the Yocto Project build tree.
</note></para></listitem> </note></para></listitem>
<listitem><para>Make sure you are in the root directory and then expand <listitem><para>Make sure you are in the root directory and then expand
the tarball. the tarball.
The tarball expands into <filename>/opt/poky/$SDKVERSION</filename>. The tarball expands into <filename>/opt/poky/$SDKVERSION</filename>.
Once the tarball in unpacked, the cross-toolchain is installed. Once the tarball in unpacked, the cross-toolchain is installed.
You will notice environment setup files for the cross-toolchain in the directory. You will notice environment setup files for the cross-toolchain in the directory.
</para></listitem> </para></listitem>
</orderedlist> </orderedlist>
</para> </para>
</section> </section>
<section id='using-the-toolchain-from-within-the-build-tree'> <section id='using-the-toolchain-from-within-the-build-tree'>
<title>Using BitBake and the Yocto Project Build Tree</title> <title>Using BitBake and the Yocto Project Build Tree</title>
<para> <para>
A final way of installing just the cross-toolchain is to use BitBake within an existing A final way of installing just the cross-toolchain is to use BitBake within an existing
Yocto Project build tree. Yocto Project build tree.
Follow these steps: Follow these steps:
<orderedlist> <orderedlist>
<listitem><para>Source the environment setup script located in the Yocto Project <listitem><para>Source the environment setup script located in the Yocto Project
files. files.
The script has the string <filename>init-build-env</filename> The script has the string <filename>init-build-env</filename>
as part of the name.</para></listitem> as part of the name.</para></listitem>
<listitem><para>At this point you should be sure that the <listitem><para>At this point, you should be sure that the
<filename>MACHINE</filename> variable <filename>MACHINE</filename> variable
in the <filename>local.conf</filename> file is set for the target architecture. in the <filename>local.conf</filename> file found in the Yocto Project
You can find the <filename>local.conf</filename> file in the Yocto Project files. file structure's <filename>conf</filename> directory
Comments within the <filename>local.conf</filename> file list the values you is set for the target architecture.
can use for the <filename>MACHINE</filename> variable. Comments within the <filename>local.conf</filename> file list the values you
<note>You can populate the build tree with the cross-toolchains for more can use for the <filename>MACHINE</filename> variable.
than a single architecture. <note>You can populate the build tree with the cross-toolchains for more
You just need to edit the <filename>MACHINE</filename> variable in the than a single architecture.
<filename>local.conf</filename> file and re-run the BitBake command.</note></para></listitem> You just need to edit the <filename>MACHINE</filename> variable in the
<filename>local.conf</filename> file and re-run the BitBake
command.</note></para></listitem>
<listitem><para>Run <filename>bitbake meta-ide-support</filename> to complete the <listitem><para>Run <filename>bitbake meta-ide-support</filename> to complete the
cross-toolchain installation. cross-toolchain installation.
<note>If you change your working directory after you source the environment <note>If you change your working directory after you
setup script and before you run the BitBake command, the command will not work. <filename>source</filename> the environment setup script and before you run
Be sure to run the BitBake command immediately after checking or editing the the BitBake command, the command will not work.
<filename>local.conf</filename> but without changing your working directory.</note> Be sure to run the <filename>bitbake</filename> command immediately
Once BitBake finishes, the cross-toolchain is installed. after checking or editing the <filename>local.conf</filename> but without
You will notice environment setup files for the cross-toolchain in the changing your working directory.</note>
Yocto Project build tree in the <filename>tmp</filename> directory. Once BitBake finishes, the cross-toolchain is installed.
Setup script filenames contain the strings <filename>environment-setup</filename>. You will notice environment setup files for the cross-toolchain in the
</para></listitem> Yocto Project build tree in the <filename>tmp</filename> directory.
Setup script filenames contain the strings <filename>environment-setup</filename>.
</para></listitem>
</orderedlist> </orderedlist>
</para> </para>
</section> </section>
@@ -310,6 +320,7 @@
<section id='setting-up-the-environment'> <section id='setting-up-the-environment'>
<title>Setting Up the Environment</title> <title>Setting Up the Environment</title>
<para> <para>
Before you can use the cross-toolchain, you need to set up the toolchain environment by Before you can use the cross-toolchain, you need to set up the toolchain environment by
sourcing the environment setup script. sourcing the environment setup script.
@@ -324,8 +335,8 @@
<para> <para>
Be sure to run the environment setup script that matches the architecture for Be sure to run the environment setup script that matches the architecture for
which you are developing. which you are developing.
Environment setup scripts begin with the string “environment-setup” and include as Environment setup scripts begin with the string “<filename>environment-setup</filename>
part of their name the architecture. and include as part of their name the architecture.
For example, the environment setup script for a 64-bit IA-based architecture would For example, the environment setup script for a 64-bit IA-based architecture would
be the following: be the following:
<literallayout class='monospaced'> <literallayout class='monospaced'>
@@ -336,20 +347,22 @@
<section id='kernels-and-filesystem-images'> <section id='kernels-and-filesystem-images'>
<title>Kernels and Filesystem Images</title> <title>Kernels and Filesystem Images</title>
<para> <para>
You will need to have a kernel and filesystem image to boot using your You will need to have a kernel and filesystem image to boot using your
hardware or the QEMU emulator. hardware or the QEMU emulator.
That means you either have to build them or know where to get them. That means you either have to build them or know where to get them.
You can find lots of details on how to get or build images and kernels for your You can find lots of details on how to get or build images and kernels for your
architecture in the "Yocto Project Quick Start" found at architecture in
<ulink url='http://www.yoctoproject.org/docs/yocto-quick-start/yocto-project-qs.html'></ulink>. <ulink url='http://www.yoctoproject.org/docs/1.1/yocto-quick-start/yocto-project-qs.html'>
The Yocto Project Quick Start</ulink>.
<note> <note>
Yocto Project provides basic kernels and filesystem images for several The Yocto Project provides basic kernels and filesystem images for several
architectures (<filename>x86</filename>, <filename>x86-64</filename>, architectures (<filename>x86</filename>, <filename>x86-64</filename>,
<filename>mips</filename>, <filename>powerpc</filename>, and <filename>arm</filename>) <filename>mips</filename>, <filename>powerpc</filename>, and <filename>arm</filename>)
that you can use unaltered in the QEMU emulator. that you can use unaltered in the QEMU emulator.
These kernels and filesystem images reside in the Yocto Project release These kernels and filesystem images reside in the Yocto Project release
area - <ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.0/machines/'></ulink> area - <ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.1/machines/'></ulink>
and are ideal for experimentation within Yocto Project. and are ideal for experimentation within Yocto Project.
</note> </note>
</para> </para>