summaryrefslogtreecommitdiff
path: root/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'documentation')
-rw-r--r--documentation/bsp-guide/bsp.xml326
-rw-r--r--documentation/poky-ref-manual/extendpoky.xml15
-rw-r--r--documentation/poky-ref-manual/poky-ref-manual.xml4
-rw-r--r--documentation/poky-ref-manual/ref-variables.xml8
-rw-r--r--[-rwxr-xr-x]documentation/yocto-project-qs/figures/using-a-pre-built-image.pngbin13228 -> 12733 bytes
-rw-r--r--documentation/yocto-project-qs/yocto-project-qs.xml234
6 files changed, 446 insertions, 141 deletions
diff --git a/documentation/bsp-guide/bsp.xml b/documentation/bsp-guide/bsp.xml
index 3cad0fd01..076c08cf6 100644
--- a/documentation/bsp-guide/bsp.xml
+++ b/documentation/bsp-guide/bsp.xml
@@ -33,7 +33,7 @@
It is intended that this information can be
used by other systems besides Poky and OpenEmbedded and that it will be simple
to extract information and convert it to other formats if required.
- Poky, through its standard layers mechanism, can directly accept The format
+ Poky, through its standard layers mechanism, can directly accept the format
described as a layer.
The BSP captures all
the hardware-specific details in one place in a standard format, which is
@@ -63,62 +63,132 @@
"bsp_name" is a placeholder for the machine or platform name.
Here are some example base directory names:
<literallayout class='monospaced'>
- meta-Emenlow
+ meta-emenlow
meta-intel_n450
- meta-oaktrail
+ meta-beagleboard
</literallayout>
</para>
<para>
- The file structure inside the base directory takes on the following form:
+ Below is the common form for the file structure inside a base directory.
+ While you can use this basic form for the standard, realize that the actual structures
+ for specific BSPs could differ.
+
<programlisting>
meta-&lt;bsp_name&gt;/
-meta-&lt;bsp_name&gt;/binary/zImage
-meta-&lt;bsp_name&gt;/binary/poky-image-minimal.directdisk
+meta-&lt;bsp_name&gt;/&lt;bsp_license_file&gt;
+meta-&lt;bsp_name&gt;/README
+meta-&lt;bsp_name&gt;/binary/&lt;bootable_images&gt;
meta-&lt;bsp_name&gt;/conf/layer.conf
-meta-&lt;bsp_name&gt;/conf/machine/*.conf
-meta-&lt;bsp_name&gt;/conf/machine/include/tune-*.inc
-meta-&lt;bsp_name&gt;/recipes-kernel/bootloader/bootloader_0.1.bb
-meta-&lt;bsp_name&gt;/recipes-kernel/linux/linux-bsp-2.6.50/*.patch
-meta-&lt;bsp_name&gt;/recipes-kernel/linux/linux-bsp-2.6.50/defconfig-bsp
-meta-&lt;bsp_name&gt;/recipes-kernel/linux/linux-bsp_2.6.50.bb
-meta-&lt;bsp_name&gt;/recipes-&lt;bsp_name&gt;/modem/modem-driver_0.1.bb
-meta-&lt;bsp_name&gt;/recipes-&lt;bsp_name&gt;/modem/modem-daemon_0.1.bb
-meta-&lt;bsp_name&gt;/recipes-&lt;bsp_name&gt;/image-creator/image-creator-native_0.1.bb
-meta-&lt;bsp_name&gt;/prebuilds/
+meta-&lt;bsp_name&gt;/conf/machine/*.conf
+meta-&lt;bsp_name&gt;/recipes-bsp/*
+meta-&lt;bsp_name&gt;/recipes-graphics/*
+meta-&lt;bsp_name&gt;/recipes-kernel/linux/linux-yocto-stable.bbappend
</programlisting>
</para>
<para>
- The following sections detail what these files and directories could contain.
+ Below is an example of the crownbay BSP:
+
+ <programlisting>
+meta-crownbay/COPYING.MIT
+meta-crownbay/README
+meta-crownbay/binary/.gitignore
+meta-crownbay/conf/layer.conf
+meta-crownbay/conf/machine/crownbay.conf
+meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
+meta-crownbay/recipes-bsp/formfactor/formfactor_0.0.bbappend
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xcorg.conf
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin/.gitignore
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin_1.7.99.2.bb
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/crosscompile.patch
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/fix_open_max_preprocessor_error.patch
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/macro_tweak.patch
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/nodolt.patch
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd_1.7.99.2.bb
+meta-crownbay/recipes-kernel/linux/linux-wrs_git.bbappend
+ </programlisting>
</para>
- </section>
+ <para>
+ The following sections describe each part of the proposed BSP format.
+ </para>
- <section id="bsp-filelayout-binary">
- <title>Pre-built User Binaries (meta-&lt;bsp_name&gt;/binary/*)</title>
+ <section id="bsp-filelayout-license">
+ <title>License Files</title>
+ <programlisting>
+meta-&lt;bsp_name&gt;/&lt;bsp_license_file&gt;
+ </programlisting>
+
+ <para>
+ These optional files satisfy licensing requirements for the BSP.
+ The type or types of files here can vary depending on the licensing requirements.
+ For example, in the crownbay BSP all licensing requirements are handled with the
+ <filename>COPYING.MIT</filename> file.
+ </para>
+
+ <para>
+ Licensing files can be MIT, BSD, GPLv*, and so forth.
+ These files are recommended for the BSP but are optional and totally up to the BSP developer.
+ </para>
+ </section>
+
+ <section id="bsp-filelayout-readme">
+ <title>README File</title>
+ <programlisting>
+meta-&lt;bsp_name&gt;/README
+ </programlisting>
+
+ <para>
+ This file provides information on how to boot the live images that are optionally
+ included in the <filename>/binary</filename> directory.
+ The <filename>README</filename> file also provides special information needed for
+ building the image.
+ </para>
+
+ <para>
+ Technically speaking a <filename>README</filename> is optional but it is highly
+ recommended that every BSP has one.
+ </para>
+ </section>
+
+ <section id="bsp-filelayout-binary">
+ <title>Pre-built User Binaries</title>
+ <programlisting>
+meta-&lt;bsp_name&gt;/binary/&lt;bootable_images&gt;
+ </programlisting>
<para>
This optional area contains useful pre-built kernels and userspace filesystem
- images appropriate to the target system.
+ images appropriate to the target system.
+ This directory contains the Application Development Toolkit (ADT) and minimal
+ live images when the BSP is has been "tar-balled" and placed on the Yocto Project website.
You can use these kernels and images to get a system running and quickly get started
- on development tasks.
+ on development tasks.
+ </para>
+
+ <para>
The exact types of binaries present are highly hardware-dependent.
- However, a README file should be present that explains how to use the kernels and
- images with the target hardware.
+ However, a README file should be present in the BSP file structure that explains how to use
+ the kernels and images with the target hardware.
If pre-built binaries are present, source code to meet licensing requirements must also
be provided in some form.
</para>
- </section>
+ </section>
- <section id='bsp-filelayout-layer'>
- <title>Layer Configuration (meta-&lt;bsp_name&gt;/conf/layer.conf)</title>
+ <section id='bsp-filelayout-layer'>
+ <title>Layer Configuration File</title>
+ <programlisting>
+meta-&lt;bsp_name&gt;/conf/layer.conf
+ </programlisting>
<para>
This file identifies the structure as a Poky layer, identifies the
- contents of the layer, and contains information about how Poky should use
- it.
- Generally, a standard boilerplate file such as the following works:
+ contents of the layer, and contains information about how Poky should use it.
+ Generally, a standard boilerplate file such as the following works.
+ In the following example you would replace "bsp" and "_bsp" with the actual name
+ of the BSP (i.e. &lt;bsp_name&gt; from the example template).
</para>
<para>
@@ -139,10 +209,13 @@ BBFILE_PRIORITY_bsp = "5"
This file simply makes BitBake aware of the recipes and configuration directories.
This file must exist so that Poky can recognize the BSP.
</para>
- </section>
+ </section>
- <section id="bsp-filelayout-machine">
- <title>Hardware Configuration Options (meta-&lt;bsp_name&gt;/conf/machine/*.conf)</title>
+ <section id="bsp-filelayout-machine">
+ <title>Hardware Configuration Options</title>
+ <programlisting>
+meta-&lt;bsp_name&gt;/conf/machine/*.conf
+ </programlisting>
<para>
The machine files bind together all the information contained elsewhere
@@ -161,16 +234,12 @@ BBFILE_PRIORITY_bsp = "5"
</para>
<para>
- At least one machine file is required for a Poky BSP layer.
+ At least one machine file is required for a BSP layer.
However, you can supply more than one file.
</para>
- </section>
-
- <section id="bsp-filelayout-tune">
- <title>Hardware Optimization Options (meta-&lt;bsp_name&gt;/conf/machine/include/tune-*.inc)</title>
<para>
- These files are shared hardware "tuning" definitions and are commonly used to
+ This directory could also contain shared hardware "tuning" definitions that are commonly used to
pass specific optimization flags to the compiler.
An example is <filename>tune-atom.inc</filename>:
</para>
@@ -191,57 +260,163 @@ TARGET_CC_ARCH = "-m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse"
files included with Poky itself.
</para>
<para>
- Both the base package architecuture file and the tune file are optional for a Poky BSP layer.
+ Both the base package architecture file and the tune file are optional for a Poky BSP layer.
</para>
- </section>
+ </section>
- <section id='bsp-filelayout-kernel'>
- <title>Linux Kernel Configuration (meta-&lt;bsp_name&gt;/recipes-kernel/linux/*)</title>
+ <section id='bsp-filelayout-misc-recipes'>
+ <title>Miscellaneous Recipe Files</title>
+ <programlisting>
+meta-&lt;bsp_name&gt;/recipes-bsp/*
+ </programlisting>
<para>
- These files make up the definition of a kernel to use with this hardware.
- In this case, it is a complete self-contained kernel with its own
- configuration and patches.
- However, kernels can be shared between many machines as well.
- Following is an example:
- <programlisting>
-meta-Emenlow/recipes-kernel/linux/linux-bsp_2.6.50.bb
- </programlisting>
- This example file is the core kernel recipe that details from where to get the kernel
- source.
- All standard source code locations are supported.
- Consequently, the source could be a release tarball, a git repository, or source included in
- the directory within the BSP itself.
- </para>
- <para>
- The file then contains information about what patches to apply and how to configure and build them.
- Because the file can reuse the main Poky kernel build class, the definitions here can
- remain very simple.
+ This optional directory contains miscellaneous recipe files for the BSP.
+ Most notably would be the formfactor files.
+ For example, in the crownbay BSP there is a <filename>machconfig</filename> file and a
+ <filename>formfactor_0.0.bbappend</filename> file:
+ <programlisting>
+meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
+meta-crownbay/recipes-bsp/formfactor/formfactor_0.0.bbappend
+ </programlisting>
</para>
+
+ <note><para>
+ If a BSP does not have a formfactor entry, defaults are established according to
+ the configuration script.
+ </para></note>
+ </section>
+
+ <section id='bsp-filelayout-recipes-graphics'>
+ <title>Display Support Files</title>
+ <programlisting>
+meta-&lt;bsp_name&gt;/recipes-graphics/*
+ </programlisting>
+
<para>
+ This optional directory contains recipes for the BSP if it has
+ special requirements for graphics support.
+ All files that are needed for the BSP to support a display are kept here.
+ For example, in the crownbay BSP several display support files exist:
<programlisting>
-linux-bsp-2.6.50/*.patch
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xcorg.conf
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin/.gitignore
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin_1.7.99.2.bb
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/crosscompile.patch
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/fix_open_max_preprocessor_error.patch
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/macro_tweak.patch
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/nodolt.patch
+meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd_1.7.99.2.bb
</programlisting>
</para>
+ </section>
+
+ <section id='bsp-filelayout-kernel'>
+ <title>Linux Kernel Configuration</title>
+ <programlisting>
+meta-&lt;bsp_name&gt;/recipes-kernel/linux/linux-yocto-stable.bbappend
+ </programlisting>
+
+ <para>
+ This file appends your specific changes to the kernel you are using.
+ </para>
<para>
- The above example file contains patches you can apply against the base kernel, from wherever
- they may have been obtained.
+ For your BSP you typically want to use an existing Poky kernel found in the
+ Poky repository at <filename class='directory'>meta/recipes-kernel/kernel</filename>.
+ You can append your specific changes to the kernel recipe by using an append file,
+ which is located in the
+ <filename class='directory'>meta-&lt;bsp_name&gt;/recipes-kernel/linux</filename>
+ directory.
</para>
<para>
+ Suppose you use a BSP that uses the <filename>linux-yocto-stable_git.bb</filename> kernel,
+ which is the preferred kernel to use for developing a new BSP using the Yocto Project.
+ In other words, you have selected the kernel in your
+ <filename>&lt;bsp_name&gt;.conf</filename> file by adding the following statement:
<programlisting>
-meta-Emenlow/recipes-kernel/linux/linux-bsp-2.6.50/defconfig-bsp
+PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto-stable"
</programlisting>
+ You would use the <filename>linux-yocto-stable_git.bbappend</filename> file to append
+ specific BSP settings to the kernel, thus configuring the kernel for your particular BSP.
</para>
<para>
- Finally, this last example file contains kernel configuration information.
+ Now take a look at the existing "crownbay" BSP.
+ The append file used is:
+ <programlisting>
+meta-crownbay/recipes-kernel/linux/linux-yocto-stable_git.bbappend
+ </programlisting>
+ The file contains the following:
+ <programlisting>
+FILESEXTRAPATHS := "${THISDIR}/${PN}"
+COMPATIBLE_MACHINE_crownbay = "crownbay"
+KMACHINE_crownbay = "crownbay"
+ </programlisting>
+ This append file adds "crownbay" as a compatible machine,
+ and additionally sets a Yocto Kernel-specific variable that identifies the name of the
+ BSP branch to use in the GIT repository to find configuration information.
+ </para>
+ <para>
+ One thing missing in this particular BSP, which you will typically need when
+ developing a BSP, is the kernel configuration (.config) for your BSP.
+ When developing a BSP, you probably have a kernel configuration file or a set of kernel
+ configuration files that, when taken together, define the kernel configuration for your BSP.
+ You can accomplish this definition by putting the configurations in a file or a set of files
+ inside a directory located at the same level as your append file and having the same name
+ as the kernel.
+ With all these conditions met simply reference those files in a SRC_URI statement in the append
+ file.
+ </para>
+ <para>
+ For example, suppose you had a set of configuration options in a file called
+ <filename>defconfig</filename>.
+ If you put that file inside a directory named
+ <filename class='directory'>/linux-yocto-stable</filename> and then added
+ a SRC_URI statement such as the following to the append file, those configuration
+ options will be picked up and applied when the kernel is built.
+ <programlisting>
+SRC_URI += "file://defconfig"
+ </programlisting>
</para>
<para>
- Examples of kernel recipes are available in Poky itself, and thus, make these files optional.
- However, it would be unusual not to have a kernel configuration.
+ As mentioned earlier, you can group related configurations into multiple files and
+ name them all in the SRC_URI statement as well.
+ For example, you could group separate configurations specifically for Ethernet and graphics
+ into their own files and add those by using a SRC_URI statement like the
+ following in your append file:
+ <programlisting>
+SRC_URI += "file://defconfig \
+ file://eth.cfg \
+ file://gfx.cfg"
+ </programlisting>
</para>
- </section>
+ <para>
+ The FILESEXTRAPATHS variable is boilerplated here in order to make it easy to do that.
+ It basically allows those configuration files to be found by the build process.
+ </para>
+ <note><para>
+ Other methods exist to accomplish grouping and defining configuration options.
+ For example, you could directly add configuration options to the Yocto kernel
+ <filename class='directory'>wrs_meta</filename> branch for your BSP.
+ The configuration options will likely end up in that location anyway if the BSP gets
+ added to the Yocto Project.
+ For information on how to add these configurations directly, see the
+ "Yocto Project Kernel Architecture and Use Manual" on the
+ <ulink url="http://yoctoproject.org/community/documentation">Yocto Project website
+ Documentation Page</ulink>
+ </para>
+ <para>
+ In general, however, the Yocto Project maintainers take care of moving the SRC_URI-specified
+ configuration options to the <filename class='directory'>wrs_meta</filename> branch.
+ Not only is it easier for BSP developers to not have to worry about putting those
+ configurations in the branch, but having the maintainers do it allows them to apply
+ 'global' knowledge about the kinds of common configuration options multiple BSPs in
+ the tree are typically using.
+ This allows for promotion of common configurations into common features.
+ </para></note>
+ </section>
- <section id='bsp-filelayout-packages'>
+<!-- <section id='bsp-filelayout-packages'>
<title>Other Software (meta-&lt;bsp_name&gt;/recipes-kernel/*)</title>
<para>
@@ -286,9 +461,9 @@ meta-Emenlow/recipes-Emenlow/modem/modem-daemon_0.1.bb
meta-Emenlow/recipes-Emenlow/image-creator/image-creator-native_0.1.bb
</programlisting>
</para>
- </section>
+ </section>
- <section id='bs-filelayout-bbappend'>
+ <section id='bs-filelayout-bbappend'>
<title>Append BSP-Specific Information to Existing Recipes</title>
<para>
Suppose you have a recipe such as "pointercal" that requires machine-specific information.
@@ -306,7 +481,7 @@ meta-Emenlow/recipes-Emenlow/image-creator/image-creator-native_0.1.bb
This allows the BSP layer to do whatever it might want to do to customize the original recipe.
</para>
<para>
- If your recipe needs to reference extra files it can use the FILESEXTRAPATH variable
+ If your recipe needs to reference extra files it can use the FILESEXTRAPATHS variable
to specify their location.
The example below shows extra files contained in a folder called ${PN} (the package name).
</para>
@@ -318,9 +493,9 @@ FILESEXTRAPATHS := "${THISDIR}/${PN}"
which will be picked up by BitBake.
For an example see <filename>meta-emenlow/packages/formfactor</filename>.
</para>
- </section>
+ </section>
- <section id="bsp-filelayout-prebuilds">
+ <section id="bsp-filelayout-prebuilds">
<title>Pre-build Data (meta-&lt;bsp_name&gt;/prebuilds/*)</title>
<para>
This location can contain precompiled representations of the source code
@@ -328,6 +503,7 @@ FILESEXTRAPATHS := "${THISDIR}/${PN}"
Assuming a compatible configuration is used, Poky can process and use these optional pre-compiled
representations to provide much faster build times.
</para>
+ </section> -->
</section>
<section id='bsp-click-through-licensing'>
diff --git a/documentation/poky-ref-manual/extendpoky.xml b/documentation/poky-ref-manual/extendpoky.xml
index 92f51a56f..182b36d51 100644
--- a/documentation/poky-ref-manual/extendpoky.xml
+++ b/documentation/poky-ref-manual/extendpoky.xml
@@ -685,15 +685,20 @@ BBFILE_PRIORITY_emenlow = "6"
This means that for new recipes you must be sure to add the PR variable and set its initial value
equal to "r0".
Failing to define PR makes it easy to miss when you bump a package.
- Note that you can only use integer values for the PR variable.
+ Note that you can only use integer values following the "r" in the PR variable.
</para>
<para>
- You can also use the <glossterm><link linkend='var-INC_PR'>INC_PR</link></glossterm> variable
- to keep up with package revisioning.
+ If you are sharing a common .inc file with multiple recipes, you can also use the
+ <glossterm><link linkend='var-INC_PR'>INC_PR</link></glossterm> variable to ensure that
+ the recipes sharing the .inc file are rebuilt when the .inc file itself is changed. The
+ .inc file must set INC_PR (initially to "r0"), and all recipes referring to it should set PR to
+ "$(INC_PR).0" initially, incrementing the last number when the recipe is changed. If the
+ .inc file is changed then its INC_PR should be incremented.
</para>
<para>
- When upgrading the version of a package the (<glossterm><link
- linkend='var-PV'>PV</link></glossterm>) and PR variables should be reset to "r0".
+ When upgrading the version of a package, assuming the <glossterm><link
+ linkend='var-PV'>PV</link></glossterm> changes, the PR variable should be reset to "r0"
+ (or "$(INC_PR).0" if you are using INC_PR).
</para>
<para>
Usually, version increases occur only to packages.
diff --git a/documentation/poky-ref-manual/poky-ref-manual.xml b/documentation/poky-ref-manual/poky-ref-manual.xml
index 70f0fc132..2175d0afb 100644
--- a/documentation/poky-ref-manual/poky-ref-manual.xml
+++ b/documentation/poky-ref-manual/poky-ref-manual.xml
@@ -21,9 +21,9 @@
<author>
<firstname>Richard</firstname> <surname>Purdie</surname>
<affiliation>
- <orgname>Intel Corporation</orgname>
+ <orgname>Linux Foundation</orgname>
</affiliation>
- <email>richard@linux.intel.com</email>
+ <email>richard.purdie@linuxfoundation.org</email>
</author>
<author>
diff --git a/documentation/poky-ref-manual/ref-variables.xml b/documentation/poky-ref-manual/ref-variables.xml
index 98a501f39..da57e2c38 100644
--- a/documentation/poky-ref-manual/ref-variables.xml
+++ b/documentation/poky-ref-manual/ref-variables.xml
@@ -609,7 +609,7 @@ recipes-graphics/xorg-font/fiont-alias_1.0.2.bb:PR - "$(INC_PR).0"
<glossentry id='var-PR'><glossterm>PR</glossterm>
<glossdef>
- <para>Revision of package.
+ <para>Revision of package. The default value is "r0".
</para>
</glossdef>
</glossentry>
@@ -617,7 +617,11 @@ recipes-graphics/xorg-font/fiont-alias_1.0.2.bb:PR - "$(INC_PR).0"
<glossentry id='var-PV'><glossterm>PV</glossterm>
<glossdef>
<para>Version of package.
- The default value is "1.0"</para>
+ This is normally extracted from the recipe name, e.g. if the recipe is named
+ "expat_2.0.1.bb" then PV will be "2.0.1". PV is generally not overridden within
+ a recipe unless it is building an unstable version from a source code repository
+ (git, svn, etc.).
+ </para>
</glossdef>
</glossentry>
diff --git a/documentation/yocto-project-qs/figures/using-a-pre-built-image.png b/documentation/yocto-project-qs/figures/using-a-pre-built-image.png
index 4f4f7d849..b03130d12 100755..100644
--- a/documentation/yocto-project-qs/figures/using-a-pre-built-image.png
+++ b/documentation/yocto-project-qs/figures/using-a-pre-built-image.png
Binary files differ
diff --git a/documentation/yocto-project-qs/yocto-project-qs.xml b/documentation/yocto-project-qs/yocto-project-qs.xml
index 1c45cde88..24480bc78 100644
--- a/documentation/yocto-project-qs/yocto-project-qs.xml
+++ b/documentation/yocto-project-qs/yocto-project-qs.xml
@@ -141,7 +141,7 @@
unzip texi2html texinfo libsdl1.2-dev docbook-utils gawk \
python-pysqlite2 diffstat help2man make gcc build-essential \
g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev \
- mercurial
+ mercurial autoconf automake
</literallayout>
<para>
@@ -156,17 +156,18 @@
docbook-utils sed bc glibc-devel ccache pcre pcre-devel quilt \
groff linuxdoc-tools patch linuxdoc-tools cmake help2man \
perl-ExtUtils-MakeMaker tcl-devel gettext chrpath ncurses apr \
- SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils
+ SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils \
+ autoconf automake
</literallayout>
- <para>
- <emphasis>NOTE:</emphasis> Packages vary in number and name for other Linux distributions.
+ <note><para>
+ Packages vary in number and name for other Linux distributions.
The commands here should work. We are interested, though, to learn what works for you.
You can find more information for package requirements on common Linux distributions
at <ulink url="http://wiki.openembedded.net/index.php/OEandYourDistro"></ulink>.
However, you should be careful when using this information as the information applies
to old Linux distributions that are known to not work with a current Poky install.
- </para>
+ </para></note>
</section>
<section id='releases'>
@@ -215,15 +216,16 @@
</mediaobject>
<para>
- Use the following commands from a shell on your Debian-based host to build your image.
- The build creates an entire Linux system including the Toolchain from the source.
+ Use the following commands to build your image.
+ The build process creates an entire Linux distribution, including the toolchain, from source.
</para>
- <para><emphasis>NOTE:</emphasis> The build process using Sato currently consumes
- 50GB of disk space.
- To allow for variations in the build process and for future package expansion we
- recommend 100GB of free disk space.
- </para>
+ <note><para>
+ The build process using Sato currently consumes
+ about 50GB of disk space.
+ To allow for variations in the build process and for future package expansion, we
+ recommend having at least 100GB of free disk space.
+ </para></note>
<para>
<literallayout class='monospaced'>
@@ -234,52 +236,56 @@
</para>
<itemizedlist>
<listitem><para>The first two commands extract the Yocto Project files from the
- release area and place them into a subdirectory of your current directory
- (<command>poky-4.0-build</command> in this example).</para></listitem>
- <listitem><para>The <command>$ source</command> command creates the directory and places
- you there.
- The build directory contains all the object files used during the build.
- The default build directory is <command>poky-4.0-build</command>.
- Note that you can change the target architecture by editing the
- <command>&lt;build_directory&gt;/conf/local.conf</command> file.
- By default the target architecture is qemux86.</para></listitem>
+ release tarball and place them into a subdirectory of your current directory.</para></listitem>
+ <listitem><para>The <command>source</command> command creates the
+ <filename>poky-4.0-build</filename> directory and executes the <command>cd</command>
+ command to make <filename>poky-4.0-build</filename> the working directory.
+ The resulting build directory contains all the files created during the build.
+ By default the target architecture is qemux86.
+ To change this default, edit the value of the MACHINE variable in the
+ <filename>conf/local.conf</filename> file.</para></listitem>
</itemizedlist>
<para>
- Now might be a good time to edit the <command>conf/local.conf</command>
- file.
- The defaults should all be fine. However, you might want to look at the variables
- BB_NUMBER_THREADS and PARALLEL_MAKE.
+ Take some time to examine your <filename>conf/local.conf</filename> file.
+ The defaults should work fine.
+ However, if you have a multi-core CPU you might want to set the variables
+ BB_NUMBER_THREADS and PARALLEL_MAKE to the number of processor cores on your build machine.
By default, these variables are commented out.
</para>
<para>
- Continue with the following command to build the OS image for the target, which is
- poky-image-sato in this example.
+ Continue with the following command to build an OS image for the target, which is
+ <filename>poky-image-sato</filename> in this example.
<literallayout class='monospaced'>
$ bitbake poky-image-sato
</literallayout>
- <emphasis>NOTE:</emphasis> If you are running Fedora 14 or another distribution
- with GNU make 3.82 you might have to run the following two
- <command>$bitbake</command> commands instead:
- <literallayout class='monospaced'>
+ <note><para>
+ If you are running Fedora 14 or another distribution
+ that ships with GNU make v3.82 you need to run the following two
+ <command>bitbake</command> commands instead:
+ <literallayout class='monospaced'>
$ bitbake make-native
$ bitbake poky-image-sato
- </literallayout>
+ </literallayout>
+ </para></note>
The final command runs the image:
<literallayout class='monospaced'>
$ poky-qemu qemux86
</literallayout>
- The build process could take several hours the first time you run it.
- Depending on the number of processors and cores, the amount or RAM, the speed of your
- internet connection and other factors.
- After the initial build, subsequent builds run much faster.
+ <note><para>
+ Depending on the number of processors and cores, the amount or RAM, the speed of your
+ Internet connection and other factors, the build process could take several hours the first
+ time you run it.
+ Subsequent builds run much faster since parts of the build are cached.
+ </para></note>
</para>
</section>
<section id='using-pre-built'>
<title>Using Pre-Built Binaries and QEMU</title>
<para>
- If hardware, libraries and services are stable you can use a pre-built binary of the image, kernel and toolchain and just run it on the target using the emulator QEMU.
- This situation is perfect for developing application software.
+ If hardware, libraries and services are stable you can get started by using a pre-built binary
+ of the image, kernel and toolchain and run it using the emulator QEMU.
+ This scenario is useful for developing application software.
</para>
<para></para>
@@ -296,31 +302,74 @@
</mediaobject>
<para>
- For this scenario you need to do three things:
+ For this scenario you need to do several things:
</para>
<itemizedlist>
<listitem>
<para>
- Install the standalone Yocto toolchain tarball
+ Install the stand-alone Yocto toolchain tarball.
</para>
</listitem>
<listitem>
<para>
- Download the pre-built kernel that will run on QEMU.
- You need to be sure to get the QEMU image that matches your target machine’s architecture (e.g. x86, ARM, etc.).
+ Download the pre-built kernel that will boot with QEMU.
+ You need to be sure to get the QEMU image that matches your target machine’s
+ architecture (e.g. x86, ARM, etc.).
</para>
</listitem>
<listitem>
<para>
- Download and decompress the file image system.
+ Download the filesystem image for your target machine's architecture.
</para>
</listitem>
+ <listitem>
+ <para>
+ Set up the environment to emulate the hardware and then start the QEMU emulator.
+ </para>
+ </listitem>
+
</itemizedlist>
+ <section id='installing-the-toolchain'>
+ <title>Installing the Toolchain</title>
+ <para>
+ You can download the pre-built toolchain, which includes the poky-qemu script and
+ support files, from <ulink url='http://yoctoproject.org/downloads/yocto-0.9/toolchain/'></ulink>.
+ Toolchains are available for 32-bit and 64-bit development systems from the
+ <filename>i586</filename> and <filename>x86_64</filename> folders, respectively.
+ Each type of development system supports five target architectures.
+ The tarball files are named such that a string representing the host system appears
+ first in the filename and then is immediately followed by a string representing
+ the target architecture.
+ </para>
+
+ <literallayout class='monospaced'>
+ yocto-eglibc&lt;<emphasis>host_system</emphasis>&gt;-&lt;<emphasis>arch</emphasis>&gt;-toolchain-sdk-&lt;<emphasis>release</emphasis>&gt;.tar.bz2
+
+ Where:
+ &lt;<emphasis>host_system</emphasis>&gt; is a string representing your development system:
+ i586 or x86_64.
+
+ &lt;<emphasis>arch</emphasis>&gt; is a string representing the target architecture:
+ i585, x86_64, powerpc, mips, or arm.
+
+ &lt;<emphasis>release</emphasis>&gt; is the version of Yocto Project.
+ </literallayout>
+
+ <para>
+ For example, the following toolchain tarball is for a 64-bit development
+ host system and a 32-bit target architecture:
+ </para>
+
+ <literallayout class='monospaced'>
+ yocto-eglibc-x86_64-i586-toolchain-sdk-0.9.tar.bz2
+ </literallayout>
+
<para>
- You can download the pre-built toolchain which includes the poky-qemu script and support files from <ulink url='http://yoctoproject.org/downloads/yocto-0.9/toolchain/'></ulink>. These are available for i586 (32-bit) and x86_64 (64 bit) host machines, targeting each of the 5 supported target architectures. The tarballs are self contained and install into /opt/poky.
- Use these commands to install the toolchain tarball (taking the 64 bit host, 32 bit i586 target as an example):
+ The toolchain tarballs are self-contained and should be installed into <filename>/opt/poky</filename>.
+ The following commands show how you install the toolchain tarball given a 64-bit development host system
+ and a 32-bit target architecture.
</para>
<para>
@@ -329,41 +378,112 @@
$ sudo tar -xvjf yocto-eglibc-x86_64-i586-toolchain-sdk-0.9.tar.bz2
</literallayout>
</para>
+ </section>
+
+ <section id='downloading-the-pre-built-linux-kernel'>
+ <title>Downloading the Pre-Built Linux Kernel</title>
+ <para>
+ You can download the pre-built Linux kernel and the filesystem image suitable for
+ running in the emulator QEMU from
+ <ulink url='http://yoctoproject.org/downloads/yocto-0.9/qemu'></ulink>.
+ Be sure to use the kernel and filesystem image that matches the architecture you want
+ to simulate.
+ </para>
+
+ <para>
+ Most kernel files have the following form:
+ </para>
+
+ <literallayout class='monospaced'>
+ *zImage*qemu&lt;<emphasis>arch</emphasis>&gt;*.bin
+
+ Where:
+ &lt;<emphasis>arch</emphasis>&gt; is a string representing the target architecture:
+ x86, x86-64, ppc, mips, or arm.
+ </literallayout>
+ </section>
+ <section id='downloading-the-filesystem'>
+ <title>Downloading the Filesystem</title>
<para>
- You can download the pre-built Linux kernel and the file image system from <ulink url='http://yoctoproject.org/downloads/yocto-0.9/'></ulink>.
- The kernel and file image system have the following forms, respectively:
+ The filesystem image has two forms.
+ One form is an <filename>ext3</filename> filesystem image.
+ The other form is a tarball of the filesystem and is booted using user-space NFS.
+ Here are the respective forms:
</para>
<literallayout class='monospaced'>
- *zImage*qemu*.bin
- poky-image-*-qemu*.ext2.bz2
+ yocto-image-&lt;<emphasis>profile</emphasis>&gt;-qemu&lt;<emphasis>arch</emphasis>&gt;.rootfs.ext3
+ yocto-image-&lt;<emphasis>profile</emphasis>&gt;-qemu&lt;<emphasis>arch</emphasis>&gt;.rootfs.tar.bz2
+
+ Where:
+ &lt;<emphasis>profile</emphasis>&gt; is the filesystem image's profile:
+ sdk, sato, minimal, or lsb.
+
+ &lt;<emphasis>arch</emphasis>&gt; is a string representing the target architecture:
+ x86, x86-64, ppc, mips, or arm.
</literallayout>
+ </section>
+ <section id='setting-up-the-environment-and-starting-the-qemu-emulator'>
+ <title>Setting Up the Environment and Starting the QEMU Emulator</title>
<para>
- You must decompress the file image system using the following command:
+ Before you start the QEMU emulator you need to set up the emulation environment.
+ The following command form sets up the emulation environment.
</para>
<literallayout class='monospaced'>
- $ bzip2 -d
+ $ source /opt/poky/environment-setup-&lt;<emphasis>arch</emphasis>&gt;-poky-linux-&lt;<emphasis>if</emphasis>&gt;
+
+ Where:
+ &lt;<emphasis>arch</emphasis>&gt; is a string representing the target architecture:
+ i586, x86_64, ppc603e, mips, or armv5te.
+
+ &lt;<emphasis>if</emphasis>&gt; is a string representing an embedded application binary interface.
+ Not all setup scripts include this string.
</literallayout>
<para>
- You can now start the emulator using these commands (assuming an 32 bit i586 target):
+ Finally, this command form invokes the QEMU emulator
</para>
<literallayout class='monospaced'>
- $ source /opt/poky/environment-setup-i586-poky-linux
$ poky-qemu &lt;<emphasis>qemuarch</emphasis>&gt; &lt;<emphasis>kernel</emphasis>&gt; &lt;<emphasis>image</emphasis>&gt; &lt;<emphasis>fstype</emphasis>&gt;
+
+ Where:
+ &lt;<emphasis>qemuarch</emphasis>&gt; is a string representing the target architecture: qemux86, qemux86-64,
+ qemuppc, qemumips, or qemuarm.
+
+ &lt;<emphasis>kernel</emphasis>&gt; is the architecture-specific kernel.
+
+ &lt;<emphasis>image</emphasis>&gt; is the .ext3 filesystem image.
+
+ &lt;<emphasis>fstype</emphasis>&gt; is the filesystem type.
</literallayout>
+
<para>
- For example:
+ Continuing with the example, the following two commands setup the emulation
+ environment and launch QEMU.
+ The kernel and filesystem are for a 32-bit target architecture.
</para>
+
<literallayout class='monospaced'>
- $ poky-qemu qemuppc zImage-2.6.34-qemuppc-0.9 \
- yocto-image-minimal-qemuppc-0.9.rootfs.ext3 ext3
+ $ source /opt/poky/environment-setup-i586-poky-linux
+ $ poky-qemu qemui586 zImage-2.6.34-qemux86-0.9 yocto-image-sdk-qemux86-0.9.rootfs.ext3 ext3
</literallayout>
-
+
+ <para>
+ The environment in which QEMU launches varies depending on the filesystem image and on the
+ target architecture. For example, if you source the environment for the ARM target
+ architecture and then boot the minimal QEMU image, the emulator comes up in a new
+ shell in command-line mode. However, if you boot the SDK image QEMU comes up with
+ a GUI.
+ </para>
+
+ <note><para>
+ Booting the PPC image results in QEMU launching in the same shell in command-line mode.
+ </para></note>
+ </section>
</section>
</section>