documentation/dev-manual/dev-manual-model.xml: edit pass
These changes are the second edit pass for the new section. There are some minor changes. (From yocto-docs rev: 6c81617a2782d2f02d4900a68dd4e8c6eeb70fa1) 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
3a15c9f8d0
commit
56f7ed979c
|
@ -21,7 +21,8 @@
|
||||||
see the "<link linkend='dev-manual-bsp-appendix'>BSP Development Example</link>"
|
see the "<link linkend='dev-manual-bsp-appendix'>BSP Development Example</link>"
|
||||||
appendix and the
|
appendix and the
|
||||||
"<link linkend='dev-manual-kernel-appendix'>Kernel Modification Example</link>" appendix.
|
"<link linkend='dev-manual-kernel-appendix'>Kernel Modification Example</link>" appendix.
|
||||||
For a user-space application development example that uses the Eclipse IDE,
|
For a user-space application development example that uses the
|
||||||
|
<trademark class='trade'>Eclipse</trademark> IDE,
|
||||||
see the
|
see the
|
||||||
<ulink url='http://www.yoctoproject.org/docs/1.1/adt-manual/adt-manual.html'>
|
<ulink url='http://www.yoctoproject.org/docs/1.1/adt-manual/adt-manual.html'>
|
||||||
The Yocto Project Application Development Toolkit (ADT) User's Guide</ulink>.
|
The Yocto Project Application Development Toolkit (ADT) User's Guide</ulink>.
|
||||||
|
@ -364,7 +365,8 @@
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<imagedata fileref="figures/kernel-dev-flow.png" width="6in" depth="7in" align="center" scalefit="1" />
|
<imagedata fileref="figures/kernel-dev-flow.png"
|
||||||
|
width="6in" depth="7.5in" align="center" scalefit="1" />
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -480,137 +482,189 @@
|
||||||
<para>
|
<para>
|
||||||
Application development involves creation of an application that you want to be able
|
Application development involves creation of an application that you want to be able
|
||||||
to run on your target hardware, which is running a Linux Yocto image.
|
to run on your target hardware, which is running a Linux Yocto image.
|
||||||
Much of this process involves standard application development practices that are
|
The Yocto Project provides an Application Development Toolkit (ADT) that
|
||||||
not covered in detail in this manual.
|
facilitates quick development and integration of your application into its run-time environment.
|
||||||
However, the Yocto Project provides an application development environment that
|
Using the ADT you can employ cross-development toolchains designed for your target hardware
|
||||||
facilitates quick integration of your application into its run-time environment.
|
|
||||||
For example, you can employ cross-development toolchains designed for your target hardware
|
|
||||||
to compile and link your application.
|
to compile and link your application.
|
||||||
You can deploy your application to the actual hardware or to the QEMU emulator for testing.
|
You can then deploy your application to the actual hardware or to the QEMU emulator for testing.
|
||||||
You can even develop, deploy, and test your application all from within the popular
|
If you are familiar with the popular Eclipse IDE, you can use an Eclipse Yocto Plug-in to
|
||||||
Eclipse IDE.
|
allow you to develop, deploy, and test your application all from within Eclipse.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To help you understand how application development works in the Yocto Project, this section
|
While we strongly suggest using the Yocto Project ADT to develop your application, you might
|
||||||
provides an overview of the general development process.
|
not want to.
|
||||||
If you want to see a detailed example of the process as it is used from within the Eclipse
|
If this is the case, you can still use pieces of the Yocto Project for your development process.
|
||||||
IDE, see
|
However, because the process can vary greatly, this manual does not provide detail on the process.
|
||||||
<ulink url='http://www.yoctoproject.org/docs/1.1/adt-manual/adt-manual.html'>
|
|
||||||
The Application Development Toolkit (ADT) User's Manual</ulink>.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<section id='workflow-using-the-adt-and-eclipse'>
|
||||||
This illustration and the following list summarizes the application development general workflow.
|
<title>Workflow Using the ADT and <trademark class='trade'>Eclipse</trademark></title>
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<imagedata fileref="figures/app-dev-flow.png" width="7in" depth="7in" align="center" scalefit="1" />
|
To help you understand how application development works in the Yocto Project ADT
|
||||||
</para>
|
environment, this section
|
||||||
|
provides an overview of the general development process.
|
||||||
|
If you want to see a detailed example of the process as it is used from within the Eclipse
|
||||||
|
IDE, see
|
||||||
|
<ulink url='http://www.yoctoproject.org/docs/1.1/adt-manual/adt-manual.html'>
|
||||||
|
The Application Development Toolkit (ADT) User's Manual</ulink>.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<orderedlist>
|
This illustration and the following list summarizes the application development general workflow.
|
||||||
<listitem><para><emphasis>Set up your host development system to support
|
</para>
|
||||||
development using the Yocto Project</emphasis>: See
|
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#the-linux-distro'>The Linux Distributions</ulink>" and
|
<para>
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#packages'>The Packages</ulink>" sections both
|
<imagedata fileref="figures/app-dev-flow.png"
|
||||||
in the Yocto Project Quick Start for requirements.</para></listitem>
|
width="7in" depth="8in" align="center" scale="100" />
|
||||||
<listitem><para><emphasis>Establish a local copy of the Yocto Project files on your
|
</para>
|
||||||
system</emphasis>: Having the Yocto Project files on your system gives you access to
|
|
||||||
the build process and tools you need.
|
<para>
|
||||||
For information on how to get these files, see the bulleted item
|
<orderedlist>
|
||||||
"<link linkend='local-yp-release'>Yocto Project Release</link>" earlier in this manual.
|
<listitem><para><emphasis>Prepare the Host System for the Yocto Project</emphasis>:
|
||||||
</para></listitem>
|
See
|
||||||
<listitem><para><emphasis>Set up the <filename>poky-extras</filename> Git
|
"<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#the-linux-distro'>The Linux Distributions</ulink>" and
|
||||||
repository</emphasis>: This repository is the area for your configuration
|
"<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#packages'>The Packages</ulink>" sections both
|
||||||
fragments, new kernel recipes, and the kernel <filename>.bbappend</filename>
|
in the Yocto Project Quick Start for requirements.</para></listitem>
|
||||||
file used during the build.
|
|
||||||
It is good practice to set this repository up inside the local Yocto
|
<!--
|
||||||
Project files Git repository.
|
WRITER NOTE: The areas to get the kernel and root filesystem are located in the Index of
|
||||||
For information on how to get these files, see the bulleted item
|
downloads. There are many forms of each. The files that have "rootfs" are just the
|
||||||
"<link linkend='poky-extras-repo'>The <filename>poky-extras</filename> Git Repository</link>"
|
target root filesystems. The file that is very small and starts with bzImage is just
|
||||||
earlier in this manual.</para></listitem>
|
the kernel image isolated so that it can be written to a special on-board area of
|
||||||
<listitem><para><emphasis>Establish a local copy of the Linux Yocto kernel files on your
|
flash memory. Some systems require this. In the machines directory there are
|
||||||
system</emphasis>: In order to make modifications to the kernel you need two things:
|
files that combine the kernel image and the root filesystem. These files are the ISO
|
||||||
a bare clone of the Linux Yocto kernel you are modifying and
|
and HDDIMG files. ISO images are designed to be deployed on a DVD or CD. The ISO
|
||||||
a copy of that bare clone.
|
images are designed to be deployed on a USB stick. There might be some relics in
|
||||||
The bare clone is required by the build process and is the area to which you
|
the machine directory. For example, there is the "emenlow-bernard-5.0.0.tar.bz2"
|
||||||
push your kernel source changes (pulling does not work with bare clones).
|
file. Nobody seems to know what this is. If a developer needs the image and the
|
||||||
The copy of the bare clone is a local Git repository that contains all the kernel's
|
root filesystem I think that they want the small kernel image and a matching root
|
||||||
source files.
|
filesystem. Although, Paul Eggleton says that the HDDIMG types could be used to
|
||||||
You make your changes to the files in this copy of the bare clone.
|
develop on. I am not sure that we can use one of those in the ADT though as they
|
||||||
For information on how to set these two items up, see the bulleted item
|
want you to point to the kernel image and the target root filesystem. Maybe you
|
||||||
"<link linkend='local-kernel-files'>Linux Yocto Kernel</link>"
|
could just point to the same spot. I am not sure.
|
||||||
earlier in this manual.</para></listitem>
|
-->
|
||||||
<listitem><para><emphasis>Make changes to the kernel source code if
|
|
||||||
applicable</emphasis>: Modifying the kernel does not always mean directly
|
<listitem><para><emphasis>Secure the Linux Yocto Kernel Target Image</emphasis>:
|
||||||
changing source files.
|
You must have a target kernel image that has been built using the Yocto Project.</para>
|
||||||
However, if you have to do this, you make the changes in the local
|
<para>Depending on whether the Yocto Project has a pre-built image that matches your target
|
||||||
Git repository you set up to hold the source files (i.e. the copy of the
|
architecture and where you are going to run the image while you develop your application
|
||||||
bare clone).
|
(QEMU or real hardware), the area you get the image from differs.
|
||||||
Once the changes are made, you need to use Git commands to commit the changes
|
<itemizedlist>
|
||||||
and then push them to the bare clone.</para></listitem>
|
<listitem><para>Download the image from
|
||||||
<listitem><para><emphasis>Make kernel configuration changes
|
<ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.0/machines/'>
|
||||||
to your local kernel layer if applicable</emphasis>:
|
<filename>machines</filename></ulink> if your target architecture is supported
|
||||||
If your situation calls for changing the kernel's configuration, you can
|
and you are going to develop and test your application on actual hardware.
|
||||||
use <filename>menuconfig</filename>
|
</para></listitem>
|
||||||
to enable and disable kernel configurations.
|
<listitem><para>Download the image from the
|
||||||
Using <filename>menuconfig</filename> allows you to interactively develop and test the
|
<ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.0/machines/qemu/'>
|
||||||
configuration changes you are making to the kernel.
|
<filename>machines/qemu</filename></ulink> if your target architecture is supported
|
||||||
When saved, changes using <filename>menuconfig</filename> update the kernel's
|
and you are going to develop and test your application using the QEMU
|
||||||
<filename>.config</filename>.
|
emulator.</para></listitem>
|
||||||
As an alternative method to changing the kernel's configuration, you can simply
|
<listitem><para>Build your image if you cannot find a pre-built image that matches
|
||||||
edit the <filename>.config</filename> found in the Yocto Project build
|
your target architecture.
|
||||||
directory at <filename>tmp/sysroots/<machine-name>/kernel</filename>
|
If your target architecture is similar to a supported architecture, you can
|
||||||
directly.</para></listitem>
|
modify the kernel image before you build it.
|
||||||
<listitem><para><emphasis>Add new kernel recipes if applicable</emphasis>: The standard
|
See the
|
||||||
layer structure organizes recipe files inside the
|
"<link linkend='kernel-modification-workflow'>Kernel Modification Workflow</link>"
|
||||||
<filename>meta-kernel-dev</filename> layer that is within the
|
section earlier in this manual for information on how to create a modified
|
||||||
<filename>poky-extras</filename> Git repository.
|
Linux Yocto kernel.</para></listitem>
|
||||||
If you need to add new kernel recipes, you add them within this layer.
|
</itemizedlist></para>
|
||||||
Also within this area, you will find the <filename>.bbappend</filename>
|
<para>For information on pre-built kernel image naming schemes for images
|
||||||
file that appends information to the kernel's recipe file used during the
|
that can run on the QEMU emulator, see the
|
||||||
build.
|
"<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#using-pre-built'>Using Pre-Built Binaries and QEMU</ulink>"
|
||||||
</para></listitem>
|
section in
|
||||||
<listitem><para><emphasis>Prepare for the build</emphasis>: Once you have made all the
|
<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html'>
|
||||||
changes to your kernel (configurations, source code changes, recipe additions,
|
The Yocto Project Quick Start</ulink>.</para></listitem>
|
||||||
or recipe changes), there remains a few things
|
<listitem><para><emphasis>Install the ADT</emphasis>:
|
||||||
you need to do in order for the Yocto Project build system to create your image.
|
The ADT provides a target-specific cross-development toolchain, the root filesystem,
|
||||||
If you have not done so, you need to get the build environment ready by sourcing
|
the QEMU emulator, and other tools that can help you develop your application.
|
||||||
the environment setup script described earlier.
|
While it is possible to get these pieces separately, the Yocto Project provides an
|
||||||
You also need to be sure two key configuration files
|
easy method.
|
||||||
(<filename>local.conf</filename> and <filename>bblayers.conf</filename>)
|
You can get these pieces by running an ADT installer script, which is configurable.
|
||||||
are configured appropriately.</para>
|
For information on how to install the ADT, see the
|
||||||
<para>The entire process for building an image is overviewed in the
|
"<ulink url='http://www.yoctoproject.org/docs/1.1/adt-manual/adt-manual.html#using-the-adt-installer'>Using the ADT Installer</ulink>" section in
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#building-image'>Building an Image</ulink>" section of the Yocto Project Quick Start.
|
<ulink url='http://www.yoctoproject.org/docs/1.1/adt-manual/adt-manual.html'>The Yocto Project
|
||||||
You might want to reference this information.
|
Application Development (ADT) User's Manual</ulink>.</para></listitem>
|
||||||
Also, you should look at the detailed examples found in the appendices at
|
<listitem><para><emphasis>If Applicable, Secure the Target Root Filesystem</emphasis>:
|
||||||
at the end of this manual.</para></listitem>
|
If you choose not to install the ADT using the ADT Installer,
|
||||||
<listitem><para><emphasis>Build the image</emphasis>: The Yocto Project
|
you need to find and download the
|
||||||
build system Poky uses the BitBake
|
appropriate root filesystems.
|
||||||
tool to build images based on the type of image you want to create.
|
You can find these tarballs in the same areas used for the kernel images.
|
||||||
You can find more information on BitBake
|
Depending on the type of image you are running, the root filesystem you need differs.
|
||||||
<ulink url='http://bitbake.berlios.de/manual/'>here</ulink>.</para>
|
For example, if you are developing an application that runs on an image that
|
||||||
<para>The build process supports several types of images to satisfy different needs.
|
supports Sato, you need to get root filesystem that supports Sato.
|
||||||
See the appendix
|
</para></listitem>
|
||||||
"<ulink url='http://www.yoctoproject.org/docs/1.1/poky-ref-manual/poky-ref-manual.html#ref-images'>Reference: Images</ulink>" in the
|
<listitem><para><emphasis>Create and Build your Application</emphasis>:
|
||||||
<ulink url='http://www.yoctoproject.org/docs/1.1/poky-ref-manual/poky-ref-manual.html'>
|
At this point, you need to have source files for your application.
|
||||||
Yocto Project Reference Manual</ulink> for information on supported
|
Once you have the files, you can use the Eclipse IDE to import them and build the
|
||||||
images.</para></listitem>
|
project.
|
||||||
<listitem><para><emphasis>Make your configuration changes available
|
If you are not using Eclipse, you need to use the cross-development tools you have
|
||||||
in the kernel layer</emphasis>: Up to this point, all the configuration changes to the
|
installed to create the image.</para></listitem>
|
||||||
kernel have been done and tested iteratively.
|
<listitem><para><emphasis>Deploy the Image with the Application</emphasis>:
|
||||||
Once they are tested and ready to go, you can move them into the kernel layer,
|
If you are using the Eclipse IDE, you can deploy your image to the hardware or to
|
||||||
which allows you to distribute the layer.</para></listitem>
|
QEMU through the project's preferences.
|
||||||
<listitem><para><emphasis>If applicable, share your in-tree changes</emphasis>:
|
If you are not using the Eclipse IDE, then you need to deploy the application using
|
||||||
If the changes you made
|
other methods to the hardware.
|
||||||
are suited for all Linux Yocto users, you might want to push the changes to a
|
Or, if you are using QEMU, you need to use that tool and load your image in for testing.
|
||||||
contribution area for the Linux Yocto Git repository.
|
</para></listitem>
|
||||||
Once the changes are pushed, you can request that they
|
<listitem><para><emphasis>Test and Debug the Application</emphasis>:
|
||||||
be pulled into the master branch of the kernel tree.
|
Once your application is deployed, you need to test it.
|
||||||
Doing so makes them available to everyone using the kernel.</para></listitem>
|
Within the Eclipse IDE, you can use the debubbing environment along with the
|
||||||
</orderedlist>
|
set of user-space tools installed along with the ADT to debug your application.
|
||||||
</para>
|
Of course, the same user-space tools are available separately to use if you choose
|
||||||
|
not to use the Eclipse IDE.</para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='workflow-without-adt'>
|
||||||
|
<title>Workflow Without ADT</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If you want to develop an application outside of the Yocto Project ADT environment, you
|
||||||
|
can still employ the cross-development toolchain, the QEMU emulator, and a number of supported
|
||||||
|
target image files.
|
||||||
|
You just need to follow these general steps:
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para><emphasis>Install the cross-development toolchain for your target hardware:</emphasis>
|
||||||
|
For information on how to install the toolchain, see the
|
||||||
|
"<ulink url='http://www.yoctoproject/docs/1.1/adt-manual/adt-manual.html#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>" section in
|
||||||
|
<ulink url='http://www.yoctoproject/docs/1.1/adt-manual/adt-manual.html'>The Yocto Project
|
||||||
|
Application Development (ADT) User's Manual</ulink>.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Download the Target Image:</emphasis> The Yocto Project supports
|
||||||
|
several target architectures and has many pre-built kernel images and root filesystem
|
||||||
|
images.</para>
|
||||||
|
<para>If you are going to develop your application on hardware, go to the
|
||||||
|
<ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.0/machines/'>
|
||||||
|
<filename>machines</filename></ulink> download area and choose a target machine area
|
||||||
|
from which to download the kernel image and root filesystem.
|
||||||
|
This download area could have several files in it that support development using
|
||||||
|
actual hardware.
|
||||||
|
For example, the area might contain <filename>.hddimg</filename> files that combine the
|
||||||
|
kernel image with the filesystem, boot loaders, etc.
|
||||||
|
Be sure to get the files you need for your particular development process.</para>
|
||||||
|
<para>If you are going to develop your application and then run and test it using the QEMU
|
||||||
|
emulator, go to the
|
||||||
|
<ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-1.0/machines/qemu/'>
|
||||||
|
<filename>machines/qemu</filename></ulink> download area.
|
||||||
|
From this area, go down into the directory for your target architecture
|
||||||
|
(e.g. <filename>qemux86_64</filename> for an
|
||||||
|
<trademark class='registered'>Intel</trademark>-based 64-bit architecture).
|
||||||
|
Download kernel, root filesystem, and any other files you need for your process.
|
||||||
|
<note>In order to use the root filesystem in QEMU, you need to extract it.
|
||||||
|
See the
|
||||||
|
"<ulink url='http://www.yoctoproject.org/docs/1.1/adt-manual/adt-manual.html#extracting-the-root-filesystem'>Extracting the Root Filesystem</ulink>" section for information on how to extract the
|
||||||
|
root filesystem.</note></para></listitem>
|
||||||
|
<listitem><para><emphasis>Develop and Test your Application:</emphasis> At this point,
|
||||||
|
you have the tools to develop your application.
|
||||||
|
If you need to separately install and use the QEMU emulator, you can go to
|
||||||
|
<ulink url='http://www.qemu.org'>QEMU Home Page</ulink> to download and learn about the
|
||||||
|
emulator.</para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
Loading…
Reference in New Issue