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:
parent
b214cdc7e8
commit
77d1ba446c
|
@ -3,12 +3,13 @@
|
|||
|
||||
<chapter id='using-the-command-line'>
|
||||
<title>Using the Command Line</title>
|
||||
|
||||
<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>,
|
||||
which is outside of the Yocto Project build tree
|
||||
(see <xref linkend='using-an-existing-toolchain-tarball'>
|
||||
Using an Existing Toolchain Tarball)</xref>.
|
||||
(see the section "<link linkend='using-an-existing-toolchain-tarball'>Using an Existing
|
||||
Toolchain Tarball)</link>".
|
||||
And, that sourcing your architecture-specific environment setup script
|
||||
initializes a suitable cross-toolchain development environment.
|
||||
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.
|
||||
These conditions allow you to easily use the toolchain outside of the
|
||||
Yocto Project build environment on both autotools-based projects and
|
||||
makefile-based projects.
|
||||
Makefile-based projects.
|
||||
</para>
|
||||
|
||||
<section id='autotools-based-projects'>
|
||||
<title>Autotools-Based Projects</title>
|
||||
|
||||
<para>
|
||||
For an autotools-based project, you can use the cross-toolchain by just
|
||||
passing the appropriate host option to <filename>configure.sh</filename>.
|
||||
|
@ -49,8 +51,9 @@
|
|||
|
||||
<section id='makefile-based-projects'>
|
||||
<title>Makefile-Based Projects</title>
|
||||
|
||||
<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.
|
||||
You can do this as follows:
|
||||
<literallayout class='monospaced'>
|
||||
|
|
|
@ -13,29 +13,41 @@
|
|||
|
||||
<section id='book-intro'>
|
||||
<title>Introducing the Application Development Toolkit (ADT)</title>
|
||||
|
||||
<para>
|
||||
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,
|
||||
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>
|
||||
Additionally, to provide an effective development platform, the Yocto Project
|
||||
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),
|
||||
and various user-space tools that greatly enhance your development experience.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The resulting combination of the architecture-specific cross-toolchain and sysroot
|
||||
along with these additional tools yields a custom-built, cross-development platform
|
||||
for a user-targeted product.
|
||||
</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'>
|
||||
<title>The Cross-Toolchain</title>
|
||||
|
||||
<para>
|
||||
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
|
||||
through a Yocto Project build tree that is based on your metadata
|
||||
configuration or extension for your targeted device.
|
||||
|
@ -45,80 +57,76 @@
|
|||
|
||||
<section id='sysroot'>
|
||||
<title>Sysroot</title>
|
||||
|
||||
<para>
|
||||
The matching target sysroot contains needed headers and libraries for generating
|
||||
binaries that run on the target architecture.
|
||||
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>
|
||||
</section>
|
||||
|
||||
<section id='the-qemu-emulator'>
|
||||
<title>The QEMU Emulator</title>
|
||||
|
||||
<para>
|
||||
The QEMU emulator allows you to simulate your hardware while running your
|
||||
application or image.
|
||||
QEMU is made available a number of ways:
|
||||
<itemizedlist>
|
||||
<listitem><para>If you use the ADT Installer script to install ADT you can
|
||||
specify whether or not to install QEMU.</para></listitem>
|
||||
<listitem><para>If you use the ADT Installer script to install ADT, you can
|
||||
specify whether or not to install QEMU.</para></listitem>
|
||||
<listitem><para>If you have downloaded a Yocto Project release and unpacked
|
||||
it to create a Yocto Project source directory followed by sourcing
|
||||
the Yocto Project environment setup script, QEMU is installed and automatically
|
||||
available.</para></listitem>
|
||||
it to create a Yocto Project file structure and you have sourced
|
||||
the Yocto Project environment setup script, QEMU is installed and automatically
|
||||
available.</para></listitem>
|
||||
<listitem><para>If you have installed the cross-toolchain
|
||||
tarball followed by sourcing the toolchain's setup environment script, QEMU
|
||||
is installed and automatically available.</para></listitem>
|
||||
tarball and you have sourcing the toolchain's setup environment script, QEMU
|
||||
is also installed and automatically available.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='user-space-tools'>
|
||||
<title>User-Space Tools</title>
|
||||
|
||||
<para>
|
||||
User-space tools are included as part of the distribution.
|
||||
You will find these tools helpful during development.
|
||||
The tools include LatencyTOP, PowerTOP, OProfile, Perf, SystemTap, and Lttng-ust.
|
||||
These tools are common development tools for the Linux platform.
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>LatencyTOP</emphasis> – LatencyTOP focuses on latency
|
||||
that causes skips in audio,
|
||||
stutters in your desktop experience, or situations that overload your server
|
||||
even when you have plenty of CPU power left.
|
||||
You can find out more about LatencyTOP at
|
||||
<ulink url='http://www.latencytop.org/'></ulink>.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>PowerTOP</emphasis> – Helps you determine what
|
||||
software is using the most power.
|
||||
You can find out more about PowerTOP at
|
||||
<ulink url='http://www.linuxpowertop.org/'></ulink>.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>OProfile</emphasis> – A system-wide profiler for Linux
|
||||
systems that is capable
|
||||
of profiling all running code at low overhead.
|
||||
You can find out more about OProfile at
|
||||
<ulink url='http://oprofile.sourceforge.net/about/'></ulink>.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Perf</emphasis> – Performance counters for Linux used
|
||||
to keep track of certain
|
||||
types of hardware and software events.
|
||||
For more information on these types of counters see
|
||||
<ulink url='https://perf.wiki.kernel.org/index.php'></ulink> and click
|
||||
on “Perf tools.”
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>SystemTap</emphasis> – A free software infrastructure
|
||||
that simplifies
|
||||
information gathering about a running Linux system.
|
||||
This information helps you diagnose performance or functional problems.
|
||||
SystemTap is not available as a user-space tool through the Yocto Eclipse IDE Plug-in.
|
||||
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>
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>LatencyTOP:</emphasis> LatencyTOP focuses on latency
|
||||
that causes skips in audio,
|
||||
stutters in your desktop experience, or situations that overload your server
|
||||
even when you have plenty of CPU power left.
|
||||
You can find out more about LatencyTOP at
|
||||
<ulink url='http://www.latencytop.org/'></ulink>.</para></listitem>
|
||||
<listitem><para><emphasis>PowerTOP:</emphasis> Helps you determine what
|
||||
software is using the most power.
|
||||
You can find out more about PowerTOP at
|
||||
<ulink url='http://www.linuxpowertop.org/'></ulink>.</para></listitem>
|
||||
<listitem><para><emphasis>OProfile:</emphasis> A system-wide profiler for Linux
|
||||
systems that is capable of profiling all running code at low overhead.
|
||||
You can find out more about OProfile at
|
||||
<ulink url='http://oprofile.sourceforge.net/about/'></ulink>.</para></listitem>
|
||||
<listitem><para><emphasis>Perf:</emphasis> Performance counters for Linux used
|
||||
to keep track of certain types of hardware and software events.
|
||||
For more information on these types of counters see
|
||||
<ulink url='https://perf.wiki.kernel.org/index.php'></ulink> and click
|
||||
on “Perf tools.”</para></listitem>
|
||||
<listitem><para><emphasis>SystemTap:</emphasis> A free software infrastructure
|
||||
that simplifies information gathering about a running Linux system.
|
||||
This information helps you diagnose performance or functional problems.
|
||||
SystemTap is not available as a user-space tool through the Yocto Eclipse IDE Plug-in.
|
||||
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>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
<chapter id='adt-package'>
|
||||
<title>Optionally Customizing the Development Packages Installation</title>
|
||||
|
||||
<para>
|
||||
Because the Yocto Project is suited for embedded Linux development, it is
|
||||
likely that you will need to customize your development packages installation.
|
||||
|
@ -13,32 +14,34 @@
|
|||
|
||||
<section id='package-management-systems'>
|
||||
<title>Package Management Systems</title>
|
||||
|
||||
<para>
|
||||
The Yocto Project supports the generation of sysroot files using
|
||||
three different Package Management Systems (PMS):
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>OPKG</emphasis> – A less well known PMS whose use
|
||||
originated in the OpenEmbedded and OpenWrt embedded Linux projects.
|
||||
This PMS works with files packaged in an <filename>.ipk</filename> format.
|
||||
See <ulink url='http://en.wikipedia.org/wiki/Opkg'></ulink> for more
|
||||
information about OPKG.</para></listitem>
|
||||
<listitem><para><emphasis>RPM</emphasis> – A more widely known PMS intended for GNU/Linux
|
||||
distributions.
|
||||
This PMS works with files packaged in an <filename>.rms</filename> format.
|
||||
The Yocto Project currently installs through this PMS by default.
|
||||
See <ulink url='http://en.wikipedia.org/wiki/RPM_Package_Manager'></ulink>
|
||||
for more information about RPM.</para></listitem>
|
||||
<listitem><para><emphasis>Debian</emphasis> – The PMS for Debian-based systems
|
||||
is built on many PMS tools.
|
||||
The lower-level PMS tool <filename>dpkg</filename> forms the base of the Debian PMS.
|
||||
For information on dpkg see
|
||||
<ulink url='http://en.wikipedia.org/wiki/Dpkg'></ulink>.</para></listitem>
|
||||
</itemizedlist>
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>OPKG:</emphasis> A less well known PMS whose use
|
||||
originated in the OpenEmbedded and OpenWrt embedded Linux projects.
|
||||
This PMS works with files packaged in an <filename>.ipk</filename> format.
|
||||
See <ulink url='http://en.wikipedia.org/wiki/Opkg'></ulink> for more
|
||||
information about OPKG.</para></listitem>
|
||||
<listitem><para><emphasis>RPM:</emphasis> A more widely known PMS intended for GNU/Linux
|
||||
distributions.
|
||||
This PMS works with files packaged in an <filename>.rms</filename> format.
|
||||
The Yocto Project currently installs through this PMS by default.
|
||||
See <ulink url='http://en.wikipedia.org/wiki/RPM_Package_Manager'></ulink>
|
||||
for more information about RPM.</para></listitem>
|
||||
<listitem><para><emphasis>Debian:</emphasis> The PMS for Debian-based systems
|
||||
is built on many PMS tools.
|
||||
The lower-level PMS tool <filename>dpkg</filename> forms the base of the Debian PMS.
|
||||
For information on dpkg see
|
||||
<ulink url='http://en.wikipedia.org/wiki/Dpkg'></ulink>.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='configuring-the-pms'>
|
||||
<title>Configuring the PMS</title>
|
||||
|
||||
<para>
|
||||
Whichever PMS you are using, you need to be sure that the
|
||||
<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.
|
||||
See the configuration file for details.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
First, you should generate the <filename>ipk</filename> file for the
|
||||
<filename>libglade</filename> package and add it
|
||||
|
@ -62,20 +67,21 @@
|
|||
$ bitbake package-index
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Next, source the environment setup script found in the Yocto Project files.
|
||||
Follow that by setting up the installation destination to point to your
|
||||
sysroot as <filename><sysroot_dir></filename>.
|
||||
Finally, have an <filename>opkg</filename> configuration file <filename><conf_file></filename>
|
||||
Finally, have an OPKG configuration file <filename><conf_file></filename>
|
||||
that corresponds to the <filename>opkg</filename> repository you have just created.
|
||||
The following command forms should now work:
|
||||
<literallayout class='monospaced'>
|
||||
$ opkg-cl –f <conf_file> -o <sysroot-dir> update
|
||||
$ opkg-cl –f <cconf_file> -o <sysroot-dir> \
|
||||
$ opkg-cl –f <conf_file> -o <sysroot_dir> update
|
||||
$ opkg-cl –f <cconf_file> -o <sysroot_dir> \
|
||||
--force-overwrite install libglade
|
||||
$ opkg-cl –f <cconf_file> -o <sysroot-dir> \
|
||||
$ opkg-cl –f <cconf_file> -o <sysroot_dir> \
|
||||
--force-overwrite install libglade-dbg
|
||||
$ opkg-cl –f <conf_file> -o <sysroot-dir> \
|
||||
$ opkg-cl –f <conf_file> -o <sysroot_dir> \
|
||||
--force-overwrite install libglade-dev
|
||||
</literallayout>
|
||||
</para>
|
||||
|
|
|
@ -6,75 +6,84 @@
|
|||
<title>Preparing to Use the Application Development Toolkit (ADT)</title>
|
||||
|
||||
<para>
|
||||
In order to use the ADT you must install it, source a script to set up the
|
||||
environment, and be sure the kernel and filesystem image specific to the target architecture
|
||||
exists.
|
||||
In order to use the ADT, you must install it, <filename>source</filename> a script to set up the
|
||||
environment, and be sure both the kernel and filesystem image specific to the target architecture
|
||||
exist.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This section describes how to be sure you meet these 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>
|
||||
This chapter describes two important terms and how to be sure you meet the ADT requirements.
|
||||
</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'>
|
||||
<title>Installing the ADT</title>
|
||||
|
||||
<para>
|
||||
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.
|
||||
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.
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Use the ADT Installer Script:</emphasis>
|
||||
This method is the recommended way to install the ADT because it
|
||||
automates much of the process for you.
|
||||
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 define the target sysroot location.
|
||||
</para></listitem>
|
||||
This method is the recommended way to install the ADT because it
|
||||
automates much of the process for you.
|
||||
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 define the target sysroot location.</para></listitem>
|
||||
<listitem><para><emphasis>Use an Existing Toolchain Tarball:</emphasis>
|
||||
Using this method you select and download an architecture-specific
|
||||
toolchain tarball and then hand-install the toolchain.
|
||||
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>
|
||||
Using this method, you select and download an architecture-specific
|
||||
toolchain tarball and then hand-install the toolchain.
|
||||
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>
|
||||
<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
|
||||
using that tree.
|
||||
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>
|
||||
If you already have a Yocto Project build tree, you can install the cross-toolchain
|
||||
using that tree.
|
||||
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>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
|
@ -92,32 +101,34 @@
|
|||
<para>
|
||||
The ADT Installer is contained in the ADT Installer tarball.
|
||||
You can download the tarball into any directory from
|
||||
<ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.0/adt-installer/'></ulink>.
|
||||
Or, you can use BitBake to generate the tarball inside the existing Yocto Project build tree.
|
||||
<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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you use BitBake to generate the ADT Installer tarball, you must
|
||||
source the Yocto Project environment setup script located in the Yocto Project
|
||||
files before running the BitBake command that creates the tarball.
|
||||
<filename>source</filename> the Yocto Project environment setup script located
|
||||
in the Yocto Project file structure before running the <filename>bitbake</filename>
|
||||
command that creates the tarball.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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,
|
||||
and finally run the BitBake command that results in the tarball
|
||||
Project files structure, set up the environment while also creating the
|
||||
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>:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~
|
||||
$ mkdir yocto-project
|
||||
$ cd yocto-project
|
||||
$ wget http://www.yoctoproject.org/downloads/poky/poky-bernard-5.0.1.tar.bz2
|
||||
$ tar xjf poky-bernard-5.0.1.tar.bz2
|
||||
$ source poky-bernard-5.0.1/poky-init-build-env poky-5.0.1-build
|
||||
$ wget http://www.yoctoproject.org/downloads/poky/poky-edison-6.0.tar.bz2
|
||||
$ tar xjf poky-edison-6.0.tar.bz2
|
||||
$ source poky-edison-6.0/oe-init-build-env
|
||||
$ bitbake adt-installer
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id='configuring-and-running-the-adt-installer-script'>
|
||||
|
@ -138,57 +149,50 @@
|
|||
|
||||
<para>
|
||||
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:
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para><filename>YOCTOADT_IPKG_REPO</filename> – This area
|
||||
includes the IPKG-based packages and the root filesystem upon which
|
||||
the installation is based.
|
||||
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
|
||||
directory structure follows the same layout as the reference directory
|
||||
set up at <ulink url='http://adtrepo.yoctoproject.org'></ulink>.
|
||||
Also, your repository needs to be accessible through HTTP.
|
||||
</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT-TARGETS</filename> – The machine
|
||||
target architectures for which you want to set up cross-development
|
||||
environments.
|
||||
</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_QEMU</filename> – Indicates whether
|
||||
or not to install the emulator QEMU.
|
||||
</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_NFS_UTIL</filename> – Indicates whether
|
||||
or not to install user-mode NFS.
|
||||
If you plan to use the Yocto Eclipse IDE plug-in against QEMU,
|
||||
you should install NFS.
|
||||
<note>
|
||||
To boot QEMU images using our userspace NFS server, you need
|
||||
to be running <filename>portmap</filename> or <filename>rpcbind</filename>.
|
||||
If you are running <filename>rpcbind</filename>, you will also need to add the
|
||||
<filename>-i</filename> option when <filename>rpcbind</filename> starts up.
|
||||
Please make sure you understand the security implications of doing this.
|
||||
Your firewall settings may also have to be modified to allow
|
||||
NFS booting to work.
|
||||
</note>
|
||||
</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_ROOTFS_<arch></filename> - The root
|
||||
filesystem images you want to download from the <filename>YOCTOADT_IPKG_REPO</filename>
|
||||
repository.
|
||||
</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_TARGET_SYSROOT_IMAGE_<arch></filename> - The
|
||||
particular root filesystem used to extract and create the target sysroot.
|
||||
The value of this variable must have been specified with
|
||||
<filename>YOCTOADT_ROOTFS_<arch></filename>.
|
||||
For example, if you downloaded both <filename>minimal</filename> and
|
||||
<filename>sato-sdk</filename> images by setting <filename>YOCTOADT_ROOTFS_<arch></filename>
|
||||
to "minimal sato-sdk", then <filename>YOCTOADT_ROOTFS_<arch></filename>
|
||||
must be set to either <filename>minimal</filename> or
|
||||
<filename>sato-sdk</filename>.
|
||||
</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_TARGET_SYSROOT_LOC_<arch></filename> - The
|
||||
location on the development host where the target sysroot will be created.
|
||||
</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_IPKG_REPO</filename>: This area
|
||||
includes the IPKG-based packages and the root filesystem upon which
|
||||
the installation is based.
|
||||
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
|
||||
directory structure follows the same layout as the reference directory
|
||||
set up at <ulink url='http://adtrepo.yoctoproject.org'></ulink>.
|
||||
Also, your repository needs to be accessible through HTTP.</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT-TARGETS</filename>: The machine
|
||||
target architectures for which you want to set up cross-development
|
||||
environments.</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_QEMU</filename>: Indicates whether
|
||||
or not to install the emulator QEMU.</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_NFS_UTIL</filename>: Indicates whether
|
||||
or not to install user-mode NFS.
|
||||
If you plan to use the Yocto Eclipse IDE plug-in against QEMU,
|
||||
you should install NFS.
|
||||
<note>To boot QEMU images using our userspace NFS server, you need
|
||||
to be running <filename>portmap</filename> or <filename>rpcbind</filename>.
|
||||
If you are running <filename>rpcbind</filename>, you will also need to add the
|
||||
<filename>-i</filename> option when <filename>rpcbind</filename> starts up.
|
||||
Please make sure you understand the security implications of doing this.
|
||||
You might also have to modify your firewall settings to allow
|
||||
NFS booting to work.</note></para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_ROOTFS_<arch></filename>: The root
|
||||
filesystem images you want to download from the
|
||||
<filename>YOCTOADT_IPKG_REPO</filename> repository.</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_TARGET_SYSROOT_IMAGE_<arch></filename>: The
|
||||
particular root filesystem used to extract and create the target sysroot.
|
||||
The value of this variable must have been specified with
|
||||
<filename>YOCTOADT_ROOTFS_<arch></filename>.
|
||||
For example, if you downloaded both <filename>minimal</filename> and
|
||||
<filename>sato-sdk</filename> images by setting
|
||||
<filename>YOCTOADT_ROOTFS_<arch></filename>
|
||||
to "minimal sato-sdk", then <filename>YOCTOADT_ROOTFS_<arch></filename>
|
||||
must be set to either <filename>minimal</filename> or
|
||||
<filename>sato-sdk</filename>.</para></listitem>
|
||||
<listitem><para><filename>YOCTOADT_TARGET_SYSROOT_LOC_<arch></filename>: The
|
||||
location on the development host where the target sysroot is created.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
|
@ -203,14 +207,16 @@
|
|||
<note>
|
||||
The ADT Installer requires the <filename>libtool</filename> package to complete.
|
||||
If you install the recommended packages as described in the
|
||||
<ulink url='http://www.yoctoproject.org/docs/yocto-project-qs/yocto-project-qs.html'>
|
||||
Yocto Project Quick Start</ulink> then you will have libtool installed.
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#packages'>
|
||||
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>
|
||||
|
||||
<para>
|
||||
Once the installer begins to run, you are asked whether you want to run in
|
||||
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.
|
||||
Follow the prompts from the script to complete the installation.
|
||||
</para>
|
||||
|
@ -224,12 +230,12 @@
|
|||
according to the <filename>YOCTOADT_TARGET_SYSROOT_LOC_<arch></filename> variable
|
||||
also in your configuration file.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id='using-an-existing-toolchain-tarball'>
|
||||
<title>Using a Cross-Toolchain Tarball</title>
|
||||
|
||||
<para>
|
||||
If you want to simply install the cross-toolchain by hand, you can do so by using an existing
|
||||
cross-toolchain tarball.
|
||||
|
@ -240,69 +246,73 @@
|
|||
Follow these steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Go to
|
||||
<ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.0/toolchain'></ulink>
|
||||
and find the folder that matches your host development system
|
||||
(i.e. <filename>i686</filename> for 32-bit machines or
|
||||
<filename>x86_64</filename> for 64-bit machines).</para>
|
||||
</listitem>
|
||||
<ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.1/toolchain'></ulink>
|
||||
and find the folder that matches your host development system
|
||||
(i.e. <filename>i686</filename> for 32-bit machines or
|
||||
<filename>x86_64</filename> for 64-bit machines).</para></listitem>
|
||||
<listitem><para>Go into that folder and download the toolchain tarball 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 arm target, go into the
|
||||
<filename>x86_64</filename> folder and download the following tarball:
|
||||
<literallayout class='monospaced'>
|
||||
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 ARM-based target, go into the
|
||||
<filename>x86_64</filename> folder and download the following tarball:
|
||||
<literallayout class='monospaced'>
|
||||
yocto-eglibc-x86_64-arm-toolchain-gmae-1.1.tar.bz2
|
||||
</literallayout>
|
||||
<note>
|
||||
Alternatively, you can build the toolchain tarball if you have a Yocto Project build tree.
|
||||
Use the <filename>bitbake meta-toolchain</filename> command after you have
|
||||
sourced the <filename>poky-build-init script</filename> located in the Yocto Project
|
||||
files.
|
||||
When the <filename>bitbake</filename> command completes, the toolchain tarball will
|
||||
be in <filename>tmp/deploy/sdk</filename> in the Yocto Project build tree.
|
||||
</note></para></listitem>
|
||||
</literallayout>
|
||||
<note>Alternatively, you can build the toolchain tarball if you have a Yocto
|
||||
Project build tree.
|
||||
Use the <filename>bitbake meta-toolchain</filename> command after you have
|
||||
sourced the <filename>oe-build-init script</filename> located in the Yocto
|
||||
Project files.
|
||||
When the <filename>bitbake</filename> command completes, the toolchain tarball will
|
||||
be in <filename>tmp/deploy/sdk</filename> in the Yocto Project build tree.
|
||||
</note></para></listitem>
|
||||
<listitem><para>Make sure you are in the root directory and then expand
|
||||
the tarball.
|
||||
The tarball expands into <filename>/opt/poky/$SDKVERSION</filename>.
|
||||
Once the tarball in unpacked, the cross-toolchain is installed.
|
||||
You will notice environment setup files for the cross-toolchain in the directory.
|
||||
</para></listitem>
|
||||
the tarball.
|
||||
The tarball expands into <filename>/opt/poky/$SDKVERSION</filename>.
|
||||
Once the tarball in unpacked, the cross-toolchain is installed.
|
||||
You will notice environment setup files for the cross-toolchain in the directory.
|
||||
</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='using-the-toolchain-from-within-the-build-tree'>
|
||||
<title>Using BitBake and the Yocto Project Build Tree</title>
|
||||
|
||||
<para>
|
||||
A final way of installing just the cross-toolchain is to use BitBake within an existing
|
||||
Yocto Project build tree.
|
||||
Follow these steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Source the environment setup script located in the Yocto Project
|
||||
files.
|
||||
The script has the string <filename>init-build-env</filename>
|
||||
as part of the name.</para></listitem>
|
||||
<listitem><para>At this point you should be sure that the
|
||||
<filename>MACHINE</filename> variable
|
||||
in the <filename>local.conf</filename> file is set for the target architecture.
|
||||
You can find the <filename>local.conf</filename> file in the Yocto Project files.
|
||||
Comments within the <filename>local.conf</filename> file list the values you
|
||||
can use for the <filename>MACHINE</filename> variable.
|
||||
<note>You can populate the build tree with the cross-toolchains for more
|
||||
than a single architecture.
|
||||
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>
|
||||
files.
|
||||
The script has the string <filename>init-build-env</filename>
|
||||
as part of the name.</para></listitem>
|
||||
<listitem><para>At this point, you should be sure that the
|
||||
<filename>MACHINE</filename> variable
|
||||
in the <filename>local.conf</filename> file found in the Yocto Project
|
||||
file structure's <filename>conf</filename> directory
|
||||
is set for the target architecture.
|
||||
Comments within the <filename>local.conf</filename> file list the values you
|
||||
can use for the <filename>MACHINE</filename> variable.
|
||||
<note>You can populate the build tree with the cross-toolchains for more
|
||||
than a single architecture.
|
||||
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
|
||||
cross-toolchain installation.
|
||||
<note>If you change your working directory after you source the environment
|
||||
setup script and before you run the BitBake command, the command will not work.
|
||||
Be sure to run the BitBake command immediately after checking or editing the
|
||||
<filename>local.conf</filename> but without changing your working directory.</note>
|
||||
Once BitBake finishes, the cross-toolchain is installed.
|
||||
You will notice environment setup files for the cross-toolchain in the
|
||||
Yocto Project build tree in the <filename>tmp</filename> directory.
|
||||
Setup script filenames contain the strings <filename>environment-setup</filename>.
|
||||
</para></listitem>
|
||||
cross-toolchain installation.
|
||||
<note>If you change your working directory after you
|
||||
<filename>source</filename> the environment setup script and before you run
|
||||
the BitBake command, the command will not work.
|
||||
Be sure to run the <filename>bitbake</filename> command immediately
|
||||
after checking or editing the <filename>local.conf</filename> but without
|
||||
changing your working directory.</note>
|
||||
Once BitBake finishes, the cross-toolchain is installed.
|
||||
You will notice environment setup files for the cross-toolchain in the
|
||||
Yocto Project build tree in the <filename>tmp</filename> directory.
|
||||
Setup script filenames contain the strings <filename>environment-setup</filename>.
|
||||
</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
@ -310,6 +320,7 @@
|
|||
|
||||
<section id='setting-up-the-environment'>
|
||||
<title>Setting Up the Environment</title>
|
||||
|
||||
<para>
|
||||
Before you can use the cross-toolchain, you need to set up the toolchain environment by
|
||||
sourcing the environment setup script.
|
||||
|
@ -324,8 +335,8 @@
|
|||
<para>
|
||||
Be sure to run the environment setup script that matches the architecture for
|
||||
which you are developing.
|
||||
Environment setup scripts begin with the string “environment-setup” and include as
|
||||
part of their name the architecture.
|
||||
Environment setup scripts begin with the string “<filename>environment-setup</filename>”
|
||||
and include as part of their name the architecture.
|
||||
For example, the environment setup script for a 64-bit IA-based architecture would
|
||||
be the following:
|
||||
<literallayout class='monospaced'>
|
||||
|
@ -336,20 +347,22 @@
|
|||
|
||||
<section id='kernels-and-filesystem-images'>
|
||||
<title>Kernels and Filesystem Images</title>
|
||||
|
||||
<para>
|
||||
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 lots of details on how to get or build images and kernels for your
|
||||
architecture in the "Yocto Project Quick Start" found at
|
||||
<ulink url='http://www.yoctoproject.org/docs/yocto-quick-start/yocto-project-qs.html'></ulink>.
|
||||
architecture in
|
||||
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-quick-start/yocto-project-qs.html'>
|
||||
The Yocto Project Quick Start</ulink>.
|
||||
<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>,
|
||||
<filename>mips</filename>, <filename>powerpc</filename>, and <filename>arm</filename>)
|
||||
that you can use unaltered in the QEMU emulator.
|
||||
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.
|
||||
</note>
|
||||
</para>
|
||||
|
|
Loading…
Reference in New Issue