summaryrefslogtreecommitdiffstats
path: root/documentation/profile-manual
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2013-01-10 17:25:18 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-27 13:54:08 +0000
commit6b7ae329462115ef1d5ec70a212d1728f6c7acc4 (patch)
tree10d000c71ff623e2d6d6f372d178c96e0c48d2bf /documentation/profile-manual
parentbc8c4165859482ae3afd9edce93815dee5d7b6c4 (diff)
downloadpoky-6b7ae329462115ef1d5ec70a212d1728f6c7acc4.tar.gz
profile-manual: Added basic XML files and updated the .gitignore
Added four chapters to the directory. I based these chapters off of an existing YP manual. I also updated the .gitignore file so that it will support ingnoring profile-manual make operations. (From yocto-docs rev: f9658f627fe9d8d6868ce74e9550ea16d23c4156) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/profile-manual')
-rw-r--r--documentation/profile-manual/profile-manual-arch.xml391
-rw-r--r--documentation/profile-manual/profile-manual-customization.xsl8
-rw-r--r--documentation/profile-manual/profile-manual-examples.xml1915
-rw-r--r--documentation/profile-manual/profile-manual-intro.xml190
-rw-r--r--documentation/profile-manual/profile-manual-style.css979
-rw-r--r--documentation/profile-manual/profile-manual-usage.xml1218
-rw-r--r--documentation/profile-manual/profile-manual.xml91
7 files changed, 4792 insertions, 0 deletions
diff --git a/documentation/profile-manual/profile-manual-arch.xml b/documentation/profile-manual/profile-manual-arch.xml
new file mode 100644
index 0000000000..b9401e9017
--- /dev/null
+++ b/documentation/profile-manual/profile-manual-arch.xml
@@ -0,0 +1,391 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='dev-manual-start'>
6
7<title>Getting Started with the Yocto Project</title>
8
9<para>
10 This chapter introduces the Yocto Project and gives you an idea of what you need to get started.
11 You can find enough information to set up your development host and build or use images for
12 hardware supported by the Yocto Project by reading the
13 <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
14</para>
15
16<para>
17 The remainder of this chapter summarizes what is in the Yocto Project Quick Start and provides
18 some higher-level concepts you might want to consider.
19</para>
20
21<section id='introducing-the-yocto-project'>
22 <title>Introducing the Yocto Project</title>
23
24 <para>
25 The Yocto Project is an open-source collaboration project focused on embedded Linux development.
26 The project currently provides a build system, which is
27 referred to as the OpenEmbedded build system in the Yocto Project documentation.
28 The Yocto Project provides various ancillary tools suitable for the embedded developer
29 and also features the Sato reference User Interface, which is optimized for
30 stylus driven, low-resolution screens.
31 </para>
32
33 <para>
34 You can use the OpenEmbedded build system, which uses
35 BitBake to develop complete Linux
36 images and associated user-space applications for architectures based on ARM, MIPS, PowerPC,
37 x86 and x86-64.
38 While the Yocto Project does not provide a strict testing framework,
39 it does provide or generate for you artifacts that let you perform target-level and
40 emulated testing and debugging.
41 Additionally, if you are an <trademark class='trade'>Eclipse</trademark>
42 IDE user, you can install an Eclipse Yocto Plug-in to allow you to
43 develop within that familiar environment.
44 </para>
45</section>
46
47<section id='getting-setup'>
48 <title>Getting Set Up</title>
49
50 <para>
51 Here is what you need to get set up to use the Yocto Project:
52 <itemizedlist>
53 <listitem><para><emphasis>Host System:</emphasis> You should have a reasonably current
54 Linux-based host system.
55 You will have the best results with a recent release of Fedora,
56 OpenSUSE, Debian, Ubuntu, or CentOS as these releases are frequently tested against the Yocto Project
57 and officially supported.
58 For a list of the distributions under validation and their status, see the
59 "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>" section
60 in the Yocto Project Reference Manual and the wiki page at
61 <ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution Support</ulink>.</para>
62 <para>
63 You should also have about 100 gigabytes of free disk space for building images.
64 </para></listitem>
65 <listitem><para><emphasis>Packages:</emphasis> The OpenEmbedded build system
66 requires certain packages exist on your development system (e.g. Python 2.6 or 2.7).
67 See "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>"
68 section in the Yocto Project Quick Start for the exact package
69 requirements and the installation commands to install them
70 for the supported distributions.</para></listitem>
71 <listitem id='local-yp-release'><para><emphasis>Yocto Project Release:</emphasis>
72 You need a release of the Yocto Project.
73 You set that up with a local <link linkend='source-directory'>Source Directory</link>
74 one of two ways depending on whether you
75 are going to contribute back into the Yocto Project or not.
76 <note>
77 Regardless of the method you use, this manual refers to the resulting local
78 hierarchical set of files as the "Source Directory."
79 </note>
80 <itemizedlist>
81 <listitem><para><emphasis>Tarball Extraction:</emphasis> If you are not going to contribute
82 back into the Yocto Project, you can simply download a Yocto Project release you want
83 from the website’s <ulink url='&YOCTO_HOME_URL;/download'>download page</ulink>.
84 Once you have the tarball, just extract it into a directory of your choice.</para>
85 <para>For example, the following command extracts the Yocto Project &DISTRO;
86 release tarball
87 into the current working directory and sets up the local Source Directory
88 with a top-level folder named <filename>&YOCTO_POKY;</filename>:
89 <literallayout class='monospaced'>
90 $ tar xfj &YOCTO_POKY_TARBALL;
91 </literallayout></para>
92 <para>This method does not produce a local Git repository.
93 Instead, you simply end up with a snapshot of the release.</para></listitem>
94 <listitem><para><emphasis>Git Repository Method:</emphasis> If you are going to be contributing
95 back into the Yocto Project or you simply want to keep up
96 with the latest developments, you should use Git commands to set up a local
97 Git repository of the upstream <filename>poky</filename> source repository.
98 Doing so creates a repository with a complete history of changes and allows
99 you to easily submit your changes upstream to the project.
100 Because you cloned the repository, you have access to all the Yocto Project development
101 branches and tag names used in the upstream repository.</para>
102 <para>The following transcript shows how to clone the <filename>poky</filename>
103 Git repository into the current working directory.
104 <note>You can view the Yocto Project Source Repositories at
105 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink></note>
106 The command creates the local repository in a directory named <filename>poky</filename>.
107 For information on Git used within the Yocto Project, see the
108 "<link linkend='git'>Git</link>" section.
109 <literallayout class='monospaced'>
110 $ git clone git://git.yoctoproject.org/poky
111 Initialized empty Git repository in /home/scottrif/poky/.git/
112 remote: Counting objects: 141863, done.
113 remote: Compressing objects: 100% (38624/38624), done.
114 remote: Total 141863 (delta 99661), reused 141816 (delta 99614)
115 Receiving objects: 100% (141863/141863), 76.64 MiB | 126 KiB/s, done.
116 Resolving deltas: 100% (99661/99661), done.
117 </literallayout></para>
118 <para>For another example of how to set up your own local Git repositories, see this
119 <ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>
120 wiki page</ulink>, which describes how to create both <filename>poky</filename>
121 and <filename>meta-intel</filename> Git repositories.</para></listitem>
122 </itemizedlist></para></listitem>
123 <listitem id='local-kernel-files'><para><emphasis>Yocto Project Kernel:</emphasis>
124 If you are going to be making modifications to a supported Yocto Project kernel, you
125 need to establish local copies of the source.
126 You can find Git repositories of supported Yocto Project Kernels organized under
127 "Yocto Linux Kernel" in the Yocto Project Source Repositories at
128 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.</para>
129 <para>This setup can involve creating a bare clone of the Yocto Project kernel and then
130 copying that cloned repository.
131 You can create the bare clone and the copy of the bare clone anywhere you like.
132 For simplicity, it is recommended that you create these structures outside of the
133 Source Directory (usually <filename>poky</filename>).</para>
134 <para>As an example, the following transcript shows how to create the bare clone
135 of the <filename>linux-yocto-3.4</filename> kernel and then create a copy of
136 that clone.
137 <note>When you have a local Yocto Project kernel Git repository, you can
138 reference that repository rather than the upstream Git repository as
139 part of the <filename>clone</filename> command.
140 Doing so can speed up the process.</note></para>
141 <para>In the following example, the bare clone is named
142 <filename>linux-yocto-3.4.git</filename>, while the
143 copy is named <filename>my-linux-yocto-3.4-work</filename>:
144 <literallayout class='monospaced'>
145 $ git clone --bare git://git.yoctoproject.org/linux-yocto-3.4 linux-yocto-3.4.git
146 Initialized empty Git repository in /home/scottrif/linux-yocto-3.4.git/
147 remote: Counting objects: 2468027, done.
148 remote: Compressing objects: 100% (392255/392255), done.
149 remote: Total 2468027 (delta 2071693), reused 2448773 (delta 2052498)
150 Receiving objects: 100% (2468027/2468027), 530.46 MiB | 129 KiB/s, done.
151 Resolving deltas: 100% (2071693/2071693), done.
152 </literallayout></para>
153 <para>Now create a clone of the bare clone just created:
154 <literallayout class='monospaced'>
155 $ git clone linux-yocto-3.4.git my-linux-yocto-3.4-work
156 Cloning into 'my-linux-yocto-3.4-work'...
157 done.
158 </literallayout></para></listitem>
159 <listitem id='poky-extras-repo'><para><emphasis>
160 The <filename>poky-extras</filename> Git Repository</emphasis>:
161 The <filename>poky-extras</filename> Git repository contains metadata needed
162 only if you are modifying and building the kernel image.
163 In particular, it contains the kernel BitBake append (<filename>.bbappend</filename>)
164 files that you
165 edit to point to your locally modified kernel source files and to build the kernel
166 image.
167 Pointing to these local files is much more efficient than requiring a download of the
168 kernel's source files from upstream each time you make changes to the kernel.</para>
169 <para>You can find the <filename>poky-extras</filename> Git Repository in the
170 "Yocto Metadata Layers" area of the Yocto Project Source Repositories at
171 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
172 It is good practice to create this Git repository inside the Source Directory.</para>
173 <para>Following is an example that creates the <filename>poky-extras</filename> Git
174 repository inside the Source Directory, which is named <filename>poky</filename>
175 in this case:
176 <literallayout class='monospaced'>
177 $ cd ~/poky
178 $ git clone git://git.yoctoproject.org/poky-extras poky-extras
179 Initialized empty Git repository in /home/scottrif/poky/poky-extras/.git/
180 remote: Counting objects: 618, done.
181 remote: Compressing objects: 100% (558/558), done.
182 remote: Total 618 (delta 192), reused 307 (delta 39)
183 Receiving objects: 100% (618/618), 526.26 KiB | 111 KiB/s, done.
184 Resolving deltas: 100% (192/192), done.
185 </literallayout></para></listitem>
186 <listitem><para id='supported-board-support-packages-(bsps)'><emphasis>Supported Board
187 Support Packages (BSPs):</emphasis>
188 The Yocto Project provides a layer called <filename>meta-intel</filename> and
189 it is maintained in its own separate Git repository.
190 The <filename>meta-intel</filename> layer contains many supported
191 <ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>.</para>
192 <para>Similar considerations exist for setting up the <filename>meta-intel</filename>
193 layer.
194 You can get set up for BSP development one of two ways: tarball extraction or
195 with a local Git repository.
196 It is a good idea to use the same method that you used to set up the Source Directory.
197 Regardless of the method you use, the Yocto Project uses the following BSP layer
198 naming scheme:
199 <literallayout class='monospaced'>
200 meta-&lt;BSP_name&gt;
201 </literallayout>
202 where <filename>&lt;BSP_name&gt;</filename> is the recognized BSP name.
203 Here are some examples:
204 <literallayout class='monospaced'>
205 meta-crownbay
206 meta-emenlow
207 meta-n450
208 </literallayout>
209 See the
210 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
211 section in the Yocto Project Board Support Package (BSP) Developer's Guide for more
212 information on BSP Layers.
213 <itemizedlist>
214 <listitem><para><emphasis>Tarball Extraction:</emphasis> You can download any released
215 BSP tarball from the same
216 <ulink url='&YOCTO_HOME_URL;/download'>download site</ulink> used
217 to get the Yocto Project release.
218 Once you have the tarball, just extract it into a directory of your choice.
219 Again, this method just produces a snapshot of the BSP layer in the form
220 of a hierarchical directory structure.</para></listitem>
221 <listitem><para><emphasis>Git Repository Method:</emphasis> If you are working
222 with a local Git repository for your Source Directory, you should also use this method
223 to set up the <filename>meta-intel</filename> Git repository.
224 You can locate the <filename>meta-intel</filename> Git repository in the
225 "Yocto Metadata Layers" area of the Yocto Project Source Repositories at
226 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.</para>
227 <para>Typically, you set up the <filename>meta-intel</filename> Git repository inside
228 the Source Directory.
229 For example, the following transcript shows the steps to clone the
230 <filename>meta-intel</filename>
231 Git repository inside the local <filename>poky</filename> Git repository.
232 <literallayout class='monospaced'>
233 $ cd ~/poky
234 $ git clone git://git.yoctoproject.org/meta-intel.git
235 Initialized empty Git repository in /home/scottrif/poky/meta-intel/.git/
236 remote: Counting objects: 3380, done.
237 remote: Compressing objects: 100% (2750/2750), done.
238 remote: Total 3380 (delta 1689), reused 227 (delta 113)
239 Receiving objects: 100% (3380/3380), 1.77 MiB | 128 KiB/s, done.
240 Resolving deltas: 100% (1689/1689), done.
241 </literallayout></para>
242 <para>The same
243 <ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>
244 wiki page</ulink> referenced earlier covers how to
245 set up the <filename>meta-intel</filename> Git repository.</para></listitem>
246 </itemizedlist></para></listitem>
247 <listitem><para><emphasis>Eclipse Yocto Plug-in:</emphasis> If you are developing
248 applications using the Eclipse Integrated Development Environment (IDE),
249 you will need this plug-in.
250 See the
251 "<link linkend='setting-up-the-eclipse-ide'>Setting up the Eclipse IDE</link>"
252 section for more information.</para></listitem>
253 </itemizedlist>
254 </para>
255</section>
256
257<section id='building-images'>
258 <title>Building Images</title>
259
260 <para>
261 The build process creates an entire Linux distribution, including the toolchain, from source.
262 For more information on this topic, see the
263 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
264 section in the Yocto Project Quick Start.
265 </para>
266
267 <para>
268 The build process is as follows:
269 <orderedlist>
270 <listitem><para>Make sure you have set up the Source Directory described in the
271 previous section.</para></listitem>
272 <listitem><para>Initialize the build environment by sourcing a build environment
273 script.</para></listitem>
274 <listitem><para>Optionally ensure the <filename>conf/local.conf</filename> configuration file,
275 which is found in the
276 <link linkend='build-directory'>Build Directory</link>,
277 is set up how you want it.
278 This file defines many aspects of the build environment including
279 the target machine architecture through the
280 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'>MACHINE</ulink></filename> variable,
281 the development machine's processor use through the
282 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</ulink></filename> and
283 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'>PARALLEL_MAKE</ulink></filename> variables, and
284 a centralized tarball download directory through the
285 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'>DL_DIR</ulink></filename> variable.</para></listitem>
286 <listitem><para>Build the image using the <filename>bitbake</filename> command.
287 If you want information on BitBake, see the user manual inculded in the
288 <filename>bitbake/doc/manual</filename> directory of the
289 <link linkend='source-directory'>Source Directory</link>.</para></listitem>
290 <listitem><para>Run the image either on the actual hardware or using the QEMU
291 emulator.</para></listitem>
292 </orderedlist>
293 </para>
294</section>
295
296<section id='using-pre-built-binaries-and-qemu'>
297 <title>Using Pre-Built Binaries and QEMU</title>
298
299 <para>
300 Another option you have to get started is to use pre-built binaries.
301 The Yocto Project provides many types of binaries with each release.
302 See the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
303 chapter in the Yocto Project Reference Manual
304 for descriptions of the types of binaries that ship with a Yocto Project
305 release.
306 </para>
307
308 <para>
309 Using a pre-built binary is ideal for developing software applications to run on your
310 target hardware.
311 To do this, you need to be able to access the appropriate cross-toolchain tarball for
312 the architecture on which you are developing.
313 If you are using an SDK type image, the image ships with the complete toolchain native to
314 the architecture.
315 If you are not using an SDK type image, you need to separately download and
316 install the stand-alone Yocto Project cross-toolchain tarball.
317 </para>
318
319 <para>
320 Regardless of the type of image you are using, you need to download the pre-built kernel
321 that you will boot in the QEMU emulator and then download and extract the target root
322 filesystem for your target machine’s architecture.
323 You can get architecture-specific binaries and filesystems from
324 <ulink url='&YOCTO_MACHINES_DL_URL;'>machines</ulink>.
325 You can get installation scripts for stand-alone toolchains from
326 <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'>toolchains</ulink>.
327 Once you have all your files, you set up the environment to emulate the hardware
328 by sourcing an environment setup script.
329 Finally, you start the QEMU emulator.
330 You can find details on all these steps in the
331 "<ulink url='&YOCTO_DOCS_QS_URL;#using-pre-built'>Using Pre-Built Binaries and QEMU</ulink>"
332 section of the Yocto Project Quick Start.
333 </para>
334
335 <para>
336 Using QEMU to emulate your hardware can result in speed issues
337 depending on the target and host architecture mix.
338 For example, using the <filename>qemux86</filename> image in the emulator
339 on an Intel-based 32-bit (x86) host machine is fast because the target and
340 host architectures match.
341 On the other hand, using the <filename>qemuarm</filename> image on the same Intel-based
342 host can be slower.
343 But, you still achieve faithful emulation of ARM-specific issues.
344 </para>
345
346 <para>
347 To speed things up, the QEMU images support using <filename>distcc</filename>
348 to call a cross-compiler outside the emulated system.
349 If you used <filename>runqemu</filename> to start QEMU, and the
350 <filename>distccd</filename> application is present on the host system, any
351 BitBake cross-compiling toolchain available from the build system is automatically
352 used from within QEMU simply by calling <filename>distcc</filename>.
353 You can accomplish this by defining the cross-compiler variable
354 (e.g. <filename>export CC="distcc"</filename>).
355 Alternatively, if you are using a suitable SDK image or the appropriate
356 stand-alone toolchain is present in <filename>/opt/poky</filename>,
357 the toolchain is also automatically used.
358 </para>
359
360 <note>
361 Several mechanisms exist that let you connect to the system running on the
362 QEMU emulator:
363 <itemizedlist>
364 <listitem><para>QEMU provides a framebuffer interface that makes standard
365 consoles available.</para></listitem>
366 <listitem><para>Generally, headless embedded devices have a serial port.
367 If so, you can configure the operating system of the running image
368 to use that port to run a console.
369 The connection uses standard IP networking.</para></listitem>
370 <listitem><para>SSH servers exist in some QEMU images.
371 The <filename>core-image-sato</filename> QEMU image has a Dropbear secure
372 shell (ssh) server that runs with the root password disabled.
373 The <filename>core-image-basic</filename> and <filename>core-image-lsb</filename> QEMU images
374 have OpenSSH instead of Dropbear.
375 Including these SSH servers allow you to use standard <filename>ssh</filename> and
376 <filename>scp</filename> commands.
377 The <filename>core-image-minimal</filename> QEMU image, however, contains no ssh
378 server.</para></listitem>
379 <listitem><para>You can use a provided, user-space NFS server to boot the QEMU session
380 using a local copy of the root filesystem on the host.
381 In order to make this connection, you must extract a root filesystem tarball by using the
382 <filename>runqemu-extract-sdk</filename> command.
383 After running the command, you must then point the <filename>runqemu</filename>
384 script to the extracted directory instead of a root filesystem image file.</para></listitem>
385 </itemizedlist>
386 </note>
387</section>
388</chapter>
389<!--
390vim: expandtab tw=80 ts=4
391-->
diff --git a/documentation/profile-manual/profile-manual-customization.xsl b/documentation/profile-manual/profile-manual-customization.xsl
new file mode 100644
index 0000000000..8eb69050ba
--- /dev/null
+++ b/documentation/profile-manual/profile-manual-customization.xsl
@@ -0,0 +1,8 @@
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
3
4 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
5
6<!-- <xsl:param name="generate.toc" select="'article nop'"></xsl:param> -->
7
8</xsl:stylesheet>
diff --git a/documentation/profile-manual/profile-manual-examples.xml b/documentation/profile-manual/profile-manual-examples.xml
new file mode 100644
index 0000000000..442cab3036
--- /dev/null
+++ b/documentation/profile-manual/profile-manual-examples.xml
@@ -0,0 +1,1915 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='dev-manual-model'>
6
7<title>Common Development Models</title>
8
9<para>
10 Many development models exist for which you can use the Yocto Project.
11 This chapter overviews simple methods that use tools provided by the
12 Yocto Project:
13 <itemizedlist>
14 <listitem><para><emphasis>System Development:</emphasis>
15 System Development covers Board Support Package (BSP) development and kernel
16 modification or configuration.
17 For an example on how to create a BSP, see the
18 "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
19 section in the Yocto Project Board Support Package (BSP) Developer's Guide.
20 </para></listitem>
21 <listitem><para><emphasis>User Application Development:</emphasis>
22 User Application Development covers development of applications that you intend
23 to run on some target hardware.
24 For information on how to set up your host development system for user-space
25 application development, see the
26 <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink>.
27 For a simple example of user-space application development using the
28 <trademark class='trade'>Eclipse</trademark> IDE, see the
29 "<link linkend='application-development-workflow'>Application
30 Development Workflow</link>" section.
31 </para></listitem>
32 <listitem><para><emphasis>Temporary Source Code Modification:</emphasis>
33 Direct modification of temporary source code is a convenient development model
34 to quickly iterate and develop towards a solution.
35 Once the solution has been implemented, you should of course take steps to
36 get the changes upstream and applied in the affected recipes.</para></listitem>
37 <listitem><para><emphasis>Image Development using Hob:</emphasis>
38 You can use the <ulink url='&YOCTO_HOME_URL;/projects/hob'>Hob</ulink> to build
39 custom operating system images within the build environment.
40 Hob provides an efficient interface to the OpenEmbedded build system.</para></listitem>
41 <listitem><para><emphasis>Using a Development Shell:</emphasis>
42 You can use a <filename>devshell</filename> to efficiently debug commands or simply
43 edit packages.
44 Working inside a development shell is a quick way to set up the OpenEmbedded build
45 environment to work on parts of a project.</para></listitem>
46 </itemizedlist>
47</para>
48
49<section id='system-development-model'>
50 <title>System Development Workflow</title>
51
52 <para>
53 System development involves modification or creation of an image that you want to run on
54 a specific hardware target.
55 Usually, when you want to create an image that runs on embedded hardware, the image does
56 not require the same number of features that a full-fledged Linux distribution provides.
57 Thus, you can create a much smaller image that is designed to use only the
58 features for your particular hardware.
59 </para>
60
61 <para>
62 To help you understand how system development works in the Yocto Project, this section
63 covers two types of image development: BSP creation and kernel modification or
64 configuration.
65 </para>
66
67 <section id='developing-a-board-support-package-bsp'>
68 <title>Developing a Board Support Package (BSP)</title>
69
70 <para>
71 A BSP is a package of recipes that, when applied during a build, results in
72 an image that you can run on a particular board.
73 Thus, the package when compiled into the new image, supports the operation of the board.
74 </para>
75
76 <note>
77 For a brief list of terms used when describing the development process in the Yocto Project,
78 see the "<link linkend='yocto-project-terms'>Yocto Project Terms</link>" section.
79 </note>
80
81 <para>
82 The remainder of this section presents the basic steps used to create a BSP
83 using the Yocto Project's
84 <ulink url='&YOCTO_DOCS_BSP_URL;#using-the-yocto-projects-bsp-tools'>BSP Tools</ulink>.
85 For an example that shows how to create a new layer using the tools, see the
86 "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
87 section in the Yocto Project Board Support Package (BSP) Developer's Guide.
88 </para>
89
90 <para>
91 The following illustration and list summarize the BSP creation general workflow.
92 </para>
93
94 <para>
95 <imagedata fileref="figures/bsp-dev-flow.png" width="6in" depth="7in" align="center" scalefit="1" />
96 </para>
97
98 <para>
99 <orderedlist>
100 <listitem><para><emphasis>Set up your host development system to support
101 development using the Yocto Project</emphasis>: See the
102 "<ulink url='&YOCTO_DOCS_QS_URL;#the-linux-distro'>The Linux Distributions</ulink>"
103 and the
104 "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>" sections both
105 in the Yocto Project Quick Start for requirements.</para></listitem>
106 <listitem><para><emphasis>Establish a local copy of the project files on your
107 system</emphasis>: You need this <link linkend='source-directory'>Source
108 Directory</link> available on your host system.
109 Having these files on your system gives you access to the build
110 process and to the tools you need.
111 For information on how to set up the
112 <link linkend='source-directory'>Source Directory</link>, see the
113 "<link linkend='getting-setup'>Getting Setup</link>" section.</para></listitem>
114 <listitem><para><emphasis>Establish the <filename>meta-intel</filename>
115 repository on your system</emphasis>: Having local copies of the
116 supported BSP layers on your system gives you access to the build
117 process and to the tools you need for creating a BSP.
118 For information on how to get these files, see the
119 "<link linkend='getting-setup'>Getting Setup</link>" section.</para></listitem>
120 <listitem><para><emphasis>Create your own BSP layer using the
121 <ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'><filename>yocto-bsp</filename></ulink> script</emphasis>:
122 Layers are ideal for
123 isolating and storing work for a given piece of hardware.
124 A layer is really just a location or area in which you place the recipes for your BSP.
125 In fact, a BSP is, in itself, a special type of layer.
126 The simplest way to create a new BSP layer that is compliant with the
127 Yocto Project is to use the <filename>yocto-bsp</filename> script.
128 For information about that script, see the
129 "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
130 section in the Yocto Project Board Support (BSP) Developer's Guide.
131 </para>
132 <para>
133 Another example that illustrates a layer is an application.
134 Suppose you are creating an application that has library or other dependencies in
135 order for it to compile and run.
136 The layer, in this case, would be where all the recipes that define those dependencies
137 are kept.
138 The key point for a layer is that it is an isolated area that contains
139 all the relevant information for the project that the OpenEmbedded build
140 system knows about.
141 For more information on layers, see the
142 "<link linkend='understanding-and-creating-layers'>Understanding and Creating Layers</link>"
143 section.
144 For more information on BSP layers, see the
145 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>" section in the
146 Yocto Project Board Support Package (BSP) Developer's Guide.</para>
147 <note>Four BSPs exist that are part of the
148 Yocto Project release: <filename>atom-pc</filename>, <filename>beagleboard</filename>,
149 <filename>mpc8315e</filename>, and <filename>routerstationpro</filename>.
150 The recipes and configurations for these four BSPs are located and dispersed
151 within the <link linkend='source-directory'>Source Directory</link>.
152 On the other hand, BSP layers for Cedar Trail, Chief River, Crown Bay,
153 Crystal Forest, Emenlow, Fish River, Fish River 2, Jasper Forest, N450,
154 Romley, sys940x, Sugar Bay, and tlk exist in their own separate layers
155 within the larger <filename>meta-intel</filename> layer.</note>
156 <para>When you set up a layer for a new BSP, you should follow a standard layout.
157 This layout is described in the section
158 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout'>Example Filesystem Layout</ulink>"
159 section of the Board Support Package (BSP) Development Guide.
160 In the standard layout, you will notice a suggested structure for recipes and
161 configuration information.
162 You can see the standard layout for a BSP by examining
163 any supported BSP found in the <filename>meta-intel</filename> layer inside
164 the Source Directory.</para></listitem>
165 <listitem><para><emphasis>Make configuration changes to your new BSP
166 layer</emphasis>: The standard BSP layer structure organizes the files you need
167 to edit in <filename>conf</filename> and several <filename>recipes-*</filename>
168 directories within the BSP layer.
169 Configuration changes identify where your new layer is on the local system
170 and identify which kernel you are going to use.
171 When you run the <filename>yocto-bsp</filename> script you are able to interactively
172 configure many things for the BSP (e.g. keyboard, touchscreen, and so forth).
173 </para></listitem>
174 <listitem><para><emphasis>Make recipe changes to your new BSP layer</emphasis>: Recipe
175 changes include altering recipes (<filename>.bb</filename> files), removing
176 recipes you don't use, and adding new recipes or append files
177 (<filename>.bbappend</filename>) that you need to support your hardware.
178 </para></listitem>
179 <listitem><para><emphasis>Prepare for the build</emphasis>: Once you have made all the
180 changes to your BSP layer, there remains a few things
181 you need to do for the OpenEmbedded build system in order for it to create your image.
182 You need to get the build environment ready by sourcing an environment setup script
183 and you need to be sure two key configuration files are configured appropriately:
184 the <filename>conf/local.conf</filename> and the
185 <filename>conf/bblayers.conf</filename> file.
186 You must make the OpenEmbedded build system aware of your new layer.
187 See the
188 "<link linkend='enabling-your-layer'>Enabling Your Layer</link>" section
189 for information on how to let the build system know about your new layer.</para>
190 <para>The entire process for building an image is overviewed in the section
191 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>" section
192 of the Yocto Project Quick Start.
193 You might want to reference this information.</para></listitem>
194 <listitem><para><emphasis>Build the image</emphasis>: The OpenEmbedded build system
195 uses the BitBake tool to build images based on the type of image you want to create.
196 You can find more information about BitBake in the user manual, which is found in the
197 <filename>bitbake/doc/manual</filename> directory of the
198 <link linkend='source-directory'>Source Directory</link>.</para>
199 <para>The build process supports several types of images to satisfy different needs.
200 See the
201 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" chapter
202 in the Yocto Project Reference Manual for information on
203 supported images.</para></listitem>
204 </orderedlist>
205 </para>
206
207 <para>
208 You can view a video presentation on "Building Custom Embedded Images with Yocto"
209 at <ulink url='http://free-electrons.com/blog/elc-2011-videos'>Free Electrons</ulink>.
210 You can also find supplemental information in
211 <ulink url='&YOCTO_DOCS_BSP_URL;'>
212 The Board Support Package (BSP) Development Guide</ulink>.
213 Finally, there is wiki page write up of the example also located
214 <ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'>
215 here</ulink> that you might find helpful.
216 </para>
217 </section>
218
219 <section id='modifying-the-kernel'>
220 <title><anchor id='kernel-spot' />Modifying the Kernel</title>
221
222 <para>
223 Kernel modification involves changing the Yocto Project kernel, which could involve changing
224 configuration options as well as adding new kernel recipes.
225 Configuration changes can be added in the form of configuration fragments, while recipe
226 modification comes through the kernel's <filename>recipes-kernel</filename> area
227 in a kernel layer you create.
228 </para>
229
230 <para>
231 The remainder of this section presents a high-level overview of the Yocto Project
232 kernel architecture and the steps to modify the kernel.
233 For a complete discussion of the kernel, see the
234 <ulink url='&YOCTO_DOCS_KERNEL_URL;'>Yocto Project Kernel Architecture and Use Manual</ulink>.
235 You can reference the
236 "<link linkend='patching-the-kernel'>Patching the Kernel</link>" section
237 for an example that changes the source code of the kernel.
238 For information on how to configure the kernel, see the
239 "<link linkend='configuring-the-kernel'>Configuring the Kernel</link>" section.
240 </para>
241
242 <section id='kernel-overview'>
243 <title>Kernel Overview</title>
244
245 <para>
246 Traditionally, when one thinks of a patched kernel, they think of a base kernel
247 source tree and a fixed structure that contains kernel patches.
248 The Yocto Project, however, employs mechanisms, that in a sense, result in a kernel source
249 generator.
250 By the end of this section, this analogy will become clearer.
251 </para>
252
253 <para>
254 You can find a web interface to the Yocto Project kernel source repositories at
255 <ulink url='&YOCTO_GIT_URL;'></ulink>.
256 If you look at the interface, you will see to the left a grouping of
257 Git repositories titled "Yocto Linux Kernel."
258 Within this group, you will find several kernels supported by
259 the Yocto Project:
260 <itemizedlist>
261 <listitem><para><emphasis><filename>linux-yocto-2.6.34</filename></emphasis> - The
262 stable Yocto Project kernel that is based on the Linux 2.6.34 released kernel.</para></listitem>
263 <listitem><para><emphasis><filename>linux-yocto-2.6.37</filename></emphasis> - The
264 stable Yocto Project kernel that is based on the Linux 2.6.37 released kernel.</para></listitem>
265 <listitem><para><emphasis><filename>linux-yocto-3.0</filename></emphasis> - The stable
266 Yocto Project kernel that is based on the Linux 3.0 released kernel.</para></listitem>
267 <listitem><para><emphasis><filename>linux-yocto-3.0-1.1.x</filename></emphasis> - The
268 stable Yocto Project kernel to use with the Yocto Project Release 1.1.x. This kernel
269 is based on the Linux 3.0 released kernel.</para></listitem>
270 <listitem><para><emphasis><filename>linux-yocto-3.2</filename></emphasis> - The
271 stable Yocto Project kernel to use with the Yocto Project Release 1.2. This kernel
272 is based on the Linux 3.2 released kernel.</para></listitem>
273 <listitem><para><emphasis><filename>linux-yocto-3.4</filename></emphasis> - The
274 stable Yocto Project kernel to use with the Yocto Project Release 1.3. This kernel
275 is based on the Linux 3.4 released kernel.</para></listitem>
276 <listitem><para><emphasis><filename>linux-yocto-dev</filename></emphasis> - A development
277 kernel based on the latest upstream release candidate available.</para></listitem>
278 </itemizedlist>
279 </para>
280
281 <para>
282 The kernels are maintained using the Git revision control system
283 that structures them using the familiar "tree", "branch", and "leaf" scheme.
284 Branches represent diversions from general code to more specific code, while leaves
285 represent the end-points for a complete and unique kernel whose source files
286 when gathered from the root of the tree to the leaf accumulate to create the files
287 necessary for a specific piece of hardware and its features.
288 The following figure displays this concept:
289 <para>
290 <imagedata fileref="figures/kernel-overview-1.png"
291 width="6in" depth="6in" align="center" scale="100" />
292 </para>
293
294 <para>
295 Within the figure, the "Kernel.org Branch Point" represents the point in the tree
296 where a supported base kernel is modified from the Linux kernel.
297 For example, this could be the branch point for the <filename>linux-yocto-3.0</filename>
298 kernel.
299 Thus, everything further to the right in the structure is based on the
300 <filename>linux-yocto-3.0</filename> kernel.
301 Branch points to right in the figure represent where the
302 <filename>linux-yocto-3.0</filename> kernel is modified for specific hardware
303 or types of kernels, such as real-time kernels.
304 Each leaf thus represents the end-point for a kernel designed to run on a specific
305 targeted device.
306 </para>
307
308 <para>
309 The overall result is a Git-maintained repository from which all the supported
310 kernel types can be derived for all the supported devices.
311 A big advantage to this scheme is the sharing of common features by keeping them in
312 "larger" branches within the tree.
313 This practice eliminates redundant storage of similar features shared among kernels.
314 </para>
315
316 <note>
317 Keep in mind the figure does not take into account all the supported Yocto
318 Project kernel types, but rather shows a single generic kernel just for conceptual purposes.
319 Also keep in mind that this structure represents the Yocto Project source repositories
320 that are either pulled from during the build or established on the host development system
321 prior to the build by either cloning a particular kernel's Git repository or by
322 downloading and unpacking a tarball.
323 </note>
324
325 <para>
326 Upstream storage of all the available kernel source code is one thing, while
327 representing and using the code on your host development system is another.
328 Conceptually, you can think of the kernel source repositories as all the
329 source files necessary for all the supported kernels.
330 As a developer, you are just interested in the source files for the kernel on
331 on which you are working.
332 And, furthermore, you need them available on your host system.
333 </para>
334
335 <para>
336 Kernel source code is available on your host system a couple of different
337 ways.
338 If you are working in the kernel all the time, you probably would want
339 to set up your own local Git repository of the kernel tree.
340 If you just need to make some patches to the kernel, you can get at
341 temporary kernel source files extracted and used during the OpenEmbedded
342 build system.
343 We will just talk about working with the temporary source code.
344 </para>
345
346 <para>
347 What happens during the build?
348 When you build the kernel on your development system, all files needed for the build
349 are taken from the source repositories pointed to by the
350 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> variable
351 and gathered in a temporary work area
352 where they are subsequently used to create the unique kernel.
353 Thus, in a sense, the process constructs a local source tree specific to your
354 kernel to generate the new kernel image - a source generator if you will.
355 </para>
356 The following figure shows the temporary file structure
357 created on your host system when the build occurs.
358 This
359 <link linkend='build-directory'>Build Directory</link> contains all the
360 source files used during the build.
361 </para>
362
363 <para>
364 <imagedata fileref="figures/kernel-overview-2-generic.png"
365 width="6in" depth="5in" align="center" scale="100" />
366 </para>
367
368 <para>
369 Again, for a complete discussion of the Yocto Project kernel's architecture and its
370 branching strategy, see the
371 <ulink url='&YOCTO_DOCS_KERNEL_URL;'>Yocto Project Kernel Architecture and Use Manual</ulink>.
372 You can also reference the
373 "<link linkend='patching-the-kernel'>Patching the Kernel</link>"
374 section for a detailed example that modifies the kernel.
375 </para>
376 </section>
377
378 <section id='kernel-modification-workflow'>
379 <title>Kernel Modification Workflow</title>
380
381 <para>
382 This illustration and the following list summarizes the kernel modification general workflow.
383 </para>
384
385 <para>
386 <imagedata fileref="figures/kernel-dev-flow.png"
387 width="6in" depth="5in" align="center" scalefit="1" />
388 </para>
389
390 <para>
391 <orderedlist>
392 <listitem><para><emphasis>Set up your host development system to support
393 development using the Yocto Project</emphasis>: See
394 "<ulink url='&YOCTO_DOCS_QS_URL;#the-linux-distro'>The Linux Distributions</ulink>" and
395 "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>" sections both
396 in the Yocto Project Quick Start for requirements.</para></listitem>
397 <listitem><para><emphasis>Establish a local copy of project files on your
398 system</emphasis>: Having the <link linkend='source-directory'>Source
399 Directory</link> on your system gives you access to the build process and tools
400 you need.
401 For information on how to get these files, see the bulleted item
402 "<link linkend='local-yp-release'>Yocto Project Release</link>" earlier in this manual.
403 </para></listitem>
404 <listitem><para><emphasis>Establish the temporary kernel source files</emphasis>:
405 Temporary kernel source files are kept in the Build Directory created by the
406 OpenEmbedded build system when you run BitBake.
407 If you have never built the kernel you are interested in, you need to run
408 an initial build to establish local kernel source files.</para>
409 <para>If you are building an image for the first time, you need to get the build
410 environment ready by sourcing
411 the environment setup script.
412 You also need to be sure two key configuration files
413 (<filename>local.conf</filename> and <filename>bblayers.conf</filename>)
414 are configured appropriately.</para>
415 <para>The entire process for building an image is overviewed in the
416 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
417 section of the Yocto Project Quick Start.
418 You might want to reference this information.
419 You can find more information on BitBake in the user manual, which is found in the
420 <filename>bitbake/doc/manual</filename> directory of the
421 <link linkend='source-directory'>Source Directory</link>.</para>
422 <para>The build process supports several types of images to satisfy different needs.
423 See the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" chapter in
424 the Yocto Project Reference Manual for information on supported images.
425 </para></listitem>
426 <listitem><para><emphasis>Make changes to the kernel source code if
427 applicable</emphasis>: Modifying the kernel does not always mean directly
428 changing source files.
429 However, if you have to do this, you make the changes to the files in the
430 Build directory.</para></listitem>
431 <listitem><para><emphasis>Make kernel configuration changes
432 if applicable</emphasis>:
433 If your situation calls for changing the kernel's configuration, you can
434 use the <filename>yocto-kernel</filename> script or <filename>menuconfig</filename>
435 to enable and disable kernel configurations.
436 Using the script lets you interactively set up kernel configurations.
437 Using <filename>menuconfig</filename> allows you to interactively develop and test the
438 configuration changes you are making to the kernel.
439 When saved, changes using <filename>menuconfig</filename> update the kernel's
440 <filename>.config</filename>.
441 Try to resist the temptation of directly editing the <filename>.config</filename>
442 file found in the
443 <link linkend='build-directory'>Build Directory</link> at
444 <filename>tmp/sysroots/&lt;machine-name&gt;/kernel</filename>.
445 Doing so, can produce unexpected results when the OpenEmbedded build system
446 regenerates the configuration file.</para>
447 <para>Once you are satisfied with the configuration changes made using
448 <filename>menuconfig</filename>, you can directly examine the
449 <filename>.config</filename> file against a saved original and gather those
450 changes into a config fragment to be referenced from within the kernel's
451 <filename>.bbappend</filename> file.</para></listitem>
452 <listitem><para><emphasis>Rebuild the kernel image with your changes</emphasis>:
453 Rebuilding the kernel image applies your changes.</para></listitem>
454 </orderedlist>
455 </para>
456 </section>
457 </section>
458</section>
459
460<section id='application-development-workflow'>
461 <title>Application Development Workflow</title>
462
463 <para>
464 Application development involves creating an application that you want
465 to run on your target hardware, which is running a kernel image created using the
466 OpenEmbedded build system.
467 The Yocto Project provides an Application Development Toolkit (ADT) and
468 stand-alone cross-development toolchains that
469 facilitate quick development and integration of your application into its run-time environment.
470 Using the ADT and toolchains, you can compile and link your application.
471 You can then deploy your application to the actual hardware or to the QEMU emulator for testing.
472 If you are familiar with the popular <trademark class='trade'>Eclipse</trademark> IDE,
473 you can use an Eclipse Yocto Plug-in to
474 allow you to develop, deploy, and test your application all from within Eclipse.
475 </para>
476
477 <para>
478 While we strongly suggest using the ADT to develop your application, this option might not
479 be best for you.
480 If this is the case, you can still use pieces of the Yocto Project for your development process.
481 However, because the process can vary greatly, this manual does not provide detail on the process.
482 </para>
483
484 <section id='workflow-using-the-adt-and-eclipse'>
485 <title>Workflow Using the ADT and <trademark class='trade'>Eclipse</trademark></title>
486
487 <para>
488 To help you understand how application development works using the ADT, this section
489 provides an overview of the general development process and a detailed example of the process
490 as it is used from within the Eclipse IDE.
491 </para>
492
493 <para>
494 The following illustration and list summarize the application development general workflow.
495 </para>
496
497 <para>
498 <imagedata fileref="figures/app-dev-flow.png"
499 width="7in" depth="8in" align="center" scale="100" />
500 </para>
501
502 <para>
503 <orderedlist>
504 <listitem><para><emphasis>Prepare the Host System for the Yocto Project</emphasis>:
505 See
506 "<ulink url='&YOCTO_DOCS_QS_URL;#the-linux-distro'>The Linux Distributions</ulink>" and
507 "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>" sections both
508 in the Yocto Project Quick Start for requirements.</para></listitem>
509 <listitem><para><emphasis>Secure the Yocto Project Kernel Target Image</emphasis>:
510 You must have a target kernel image that has been built using the OpenEmbeded
511 build system.</para>
512 <para>Depending on whether the Yocto Project has a pre-built image that matches your target
513 architecture and where you are going to run the image while you develop your application
514 (QEMU or real hardware), the area from which you get the image differs.
515 <itemizedlist>
516 <listitem><para>Download the image from
517 <ulink url='&YOCTO_MACHINES_DL_URL;'><filename>machines</filename></ulink>
518 if your target architecture is supported and you are going to develop
519 and test your application on actual hardware.</para></listitem>
520 <listitem><para>Download the image from the
521 <ulink url='&YOCTO_QEMU_DL_URL;'>
522 <filename>machines/qemu</filename></ulink> if your target architecture is supported
523 and you are going to develop and test your application using the QEMU
524 emulator.</para></listitem>
525 <listitem><para>Build your image if you cannot find a pre-built image that matches
526 your target architecture.
527 If your target architecture is similar to a supported architecture, you can
528 modify the kernel image before you build it.
529 See the
530 "<link linkend='patching-the-kernel'>Patching the Kernel</link>"
531 section for an example.</para></listitem>
532 </itemizedlist></para>
533 <para>For information on pre-built kernel image naming schemes for images
534 that can run on the QEMU emulator, see the
535 "<ulink url='&YOCTO_DOCS_QS_URL;#downloading-the-pre-built-linux-kernel'>Downloading the Pre-Built Linux Kernel</ulink>"
536 section in the Yocto Project Quick Start.</para></listitem>
537 <listitem><para><emphasis>Install the ADT</emphasis>:
538 The ADT provides a target-specific cross-development toolchain, the root filesystem,
539 the QEMU emulator, and other tools that can help you develop your application.
540 While it is possible to get these pieces separately, the ADT Installer provides an
541 easy method.
542 You can get these pieces by running an ADT installer script, which is configurable.
543 For information on how to install the ADT, see the
544 "<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Using the ADT Installer</ulink>"
545 section
546 in the Yocto Project Application Developer's Guide.</para></listitem>
547 <listitem><para><emphasis>If Applicable, Secure the Target Root Filesystem
548 and the Cross-development Toolchain</emphasis>:
549 If you choose not to install the ADT using the ADT Installer,
550 you need to find and download the appropriate root filesystem and
551 the cross-development toolchain.</para>
552 <para>You can find the tarballs for the root filesystem in the same area used
553 for the kernel image.
554 Depending on the type of image you are running, the root filesystem you need differs.
555 For example, if you are developing an application that runs on an image that
556 supports Sato, you need to get root filesystem that supports Sato.</para>
557 <para>You can find the cross-development toolchains at
558 <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'><filename>toolchains</filename></ulink>.
559 Be sure to get the correct toolchain for your development host and your
560 target architecture.
561 See the "<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>"
562 section in the Yocto Project Application Developer's Guide for information
563 and the
564 "<ulink url='&YOCTO_DOCS_QS_URL;#installing-the-toolchain'>Installing the Toolchain</ulink>"
565 in the Yocto Project Quick Start for information on finding and installing
566 the correct toolchain based on your host development system and your target
567 architecture.
568 </para></listitem>
569 <listitem><para><emphasis>Create and Build your Application</emphasis>:
570 At this point, you need to have source files for your application.
571 Once you have the files, you can use the Eclipse IDE to import them and build the
572 project.
573 If you are not using Eclipse, you need to use the cross-development tools you have
574 installed to create the image.</para></listitem>
575 <listitem><para><emphasis>Deploy the Image with the Application</emphasis>:
576 If you are using the Eclipse IDE, you can deploy your image to the hardware or to
577 QEMU through the project's preferences.
578 If you are not using the Eclipse IDE, then you need to deploy the application
579 to the hardware using other methods.
580 Or, if you are using QEMU, you need to use that tool and load your image in for testing.
581 </para></listitem>
582 <listitem><para><emphasis>Test and Debug the Application</emphasis>:
583 Once your application is deployed, you need to test it.
584 Within the Eclipse IDE, you can use the debugging environment along with the
585 set of user-space tools installed along with the ADT to debug your application.
586 Of course, the same user-space tools are available separately if you choose
587 not to use the Eclipse IDE.</para></listitem>
588 </orderedlist>
589 </para>
590 </section>
591
592 <section id='adt-eclipse'>
593 <title>Working Within Eclipse</title>
594
595 <para>
596 The Eclipse IDE is a popular development environment and it fully supports
597 development using the Yocto Project.
598 <note>This release of the Yocto Project supports both the Juno and Indigo versions
599 of the Eclipse IDE.
600 Thus, the following information provides setup information for both versions.
601 </note>
602 </para>
603
604 <para>
605 When you install and configure the Eclipse Yocto Project Plug-in into
606 the Eclipse IDE, you maximize your Yocto Project experience.
607 Installing and configuring the Plug-in results in an environment that
608 has extensions specifically designed to let you more easily develop software.
609 These extensions allow for cross-compilation, deployment, and execution of
610 your output into a QEMU emulation session.
611 You can also perform cross-debugging and profiling.
612 The environment also supports a suite of tools that allows you to perform
613 remote profiling, tracing, collection of power data, collection of
614 latency data, and collection of performance data.
615 </para>
616
617 <para>
618 This section describes how to install and configure the Eclipse IDE
619 Yocto Plug-in and how to use it to develop your application.
620 </para>
621
622 <section id='setting-up-the-eclipse-ide'>
623 <title>Setting Up the Eclipse IDE</title>
624
625 <para>
626 To develop within the Eclipse IDE, you need to do the following:
627 <orderedlist>
628 <listitem><para>Install the optimal version of the Eclipse IDE.</para></listitem>
629 <listitem><para>Configure the Eclipse IDE.</para></listitem>
630 <listitem><para>Install the Eclipse Yocto Plug-in.</para></listitem>
631 <listitem><para>Configure the Eclipse Yocto Plug-in.</para></listitem>
632 </orderedlist>
633 <note>
634 Do not install Eclipse from your distribution's package repository.
635 Be sure to install Eclipse from the official Eclipse download site as directed
636 in the next section.
637 </note>
638 </para>
639
640 <section id='installing-eclipse-ide'>
641 <title>Installing the Eclipse IDE</title>
642
643 <para>
644 It is recommended that you have the Juno 4.2 version of the
645 Eclipse IDE installed on your development system.
646 However, if you currently have the Indigo 3.7.2 version installed and you do
647 not want to upgrade the IDE, you can configure Indigo to work with the
648 Yocto Project.
649 See the
650 "<link linkend='configuring-the-eclipse-ide-indigo'>Configuring the Eclipse IDE (Indigo)</link>"
651 section.
652 </para>
653
654 <para>
655 If you don’t have the Juno 4.2 Eclipse IDE installed, you can find the tarball at
656 <ulink url='&ECLIPSE_MAIN_URL;'></ulink>.
657 From that site, choose the Eclipse Classic version particular to your development
658 host.
659 This version contains the Eclipse Platform, the Java Development
660 Tools (JDT), and the Plug-in Development Environment.
661 </para>
662
663 <para>
664 Once you have downloaded the tarball, extract it into a clean
665 directory.
666 For example, the following commands unpack and install the
667 downloaded Eclipse IDE tarball into a clean directory
668 using the default name <filename>eclipse</filename>:
669 <literallayout class='monospaced'>
670 $ cd ~
671 $ tar -xzvf ~/Downloads/eclipse-SDK-4.2-linux-gtk-x86_64.tar.gz
672 </literallayout>
673 </para>
674
675 <para>
676 If you have the Indigo 3.7.2 Eclipse IDE already installed and you want to use that
677 version, one issue exists that you need to be aware of regarding the Java
678 Virtual machine’s garbage collection (GC) process.
679 The GC process does not clean up the permanent generation
680 space (PermGen).
681 This space stores metadata descriptions of classes.
682 The default value is set too small and it could trigger an
683 out-of-memory error such as the following:
684 <literallayout class='monospaced'>
685 Java.lang.OutOfMemoryError: PermGen space
686 </literallayout>
687 </para>
688
689 <para>
690 This error causes the application to hang.
691 </para>
692
693 <para>
694 To fix this issue, you can use the <filename>--vmargs</filename>
695 option when you start the Indigo 3.7.2 Eclipse IDE
696 to increase the size of the permanent generation space:
697 <literallayout class='monospaced'>
698 eclipse --vmargs --XX:PermSize=256M
699 </literallayout>
700 </para>
701 </section>
702
703 <section id='configuring-the-eclipse-ide-juno'>
704 <title>Configuring the Eclipse IDE (Juno)</title>
705
706 <para>
707 This section presents the steps needed to configure the Juno 4.2 Eclipse IDE.
708 If you are using Indigo 3.7.2, see the
709 "<link linkend='configuring-the-eclipse-ide-indigo'>Configuring the Eclipse IDE (Indigo)</link>".
710 </para>
711
712 <para>
713 Before installing and configuring the Eclipse Yocto Plug-in, you need to configure
714 the Juno 4.2 Eclipse IDE.
715 Follow these general steps:
716 <orderedlist>
717 <listitem><para>Start the Eclipse IDE.</para></listitem>
718 <listitem><para>Make sure you are in your Workbench and select
719 "Install New Software" from the "Help" pull-down menu.
720 </para></listitem>
721 <listitem><para>Select <filename>Juno - &ECLIPSE_JUNO_URL;</filename>
722 from the "Work with:" pull-down menu.</para></listitem>
723 <listitem><para>Expand the box next to "Linux Tools" and select the
724 "LTTng - Linux Tracing Toolkit" boxes.</para></listitem>
725 <listitem><para>Expand the box next to "Mobile and Device Development" and select the
726 following boxes:
727 <itemizedlist>
728 <listitem><para><filename>C/C++ Remote Launch</filename></para></listitem>
729 <listitem><para><filename>Remote System Explorer End-user Runtime</filename></para></listitem>
730 <listitem><para><filename>Remote System Explorer User Actions</filename></para></listitem>
731 <listitem><para><filename>Target Management Terminal</filename></para></listitem>
732 <listitem><para><filename>TCF Remote System Explorer add-in</filename></para></listitem>
733 <listitem><para><filename>TCF Target Explorer</filename></para></listitem>
734 </itemizedlist></para></listitem>
735 <listitem><para>Expand the box next to <filename>Programming Languages</filename>
736 and select the <filename>Autotools Support for CDT</filename>
737 and <filename>C/C++ Development Tools</filename> boxes.</para></listitem>
738 <listitem><para>Complete the installation and restart the Eclipse IDE.</para></listitem>
739 </orderedlist>
740 </para>
741 </section>
742
743 <section id='configuring-the-eclipse-ide-indigo'>
744 <title>Configuring the Eclipse IDE (Indigo)</title>
745
746 <para>
747 This section presents the steps needed to configure the Indigo 3.7.2 Eclipse IDE.
748 If you are using Juno 4.2, see the
749 "<link linkend='configuring-the-eclipse-ide-juno'>Configuring the Eclipse IDE (Juno)</link>".
750 </para>
751
752 <para>
753 Before installing and configuring the Eclipse Yocto Plug-in, you need to configure
754 the Indigo 3.7.2 Eclipse IDE.
755 Follow these general steps:
756 <orderedlist>
757 <listitem><para>Start the Eclipse IDE.</para></listitem>
758 <listitem><para>Make sure you are in your Workbench and select
759 "Install New Software" from the "Help" pull-down menu.
760 </para></listitem>
761 <listitem><para>Select <filename>indigo - &ECLIPSE_INDIGO_URL;</filename>
762 from the "Work with:" pull-down menu.</para></listitem>
763 <listitem><para>Expand the box next to <filename>Programming Languages</filename>
764 and select the <filename>Autotools Support for CDT (incubation)</filename>
765 and <filename>C/C++ Development Tools</filename> boxes.</para></listitem>
766 <listitem><para>Expand the box next to "Linux Tools" and select the
767 "LTTng - Linux Tracing Toolkit(incubation)" boxes.</para></listitem>
768 <listitem><para>Complete the installation and restart the Eclipse IDE.</para></listitem>
769 <listitem><para>After the Eclipse IDE restarts and from the Workbench, select
770 "Install New Software" from the "Help" pull-down menu.</para></listitem>
771 <listitem><para>Click the
772 "Available Software Sites" link.</para></listitem>
773 <listitem><para>Check the box next to
774 <filename>&ECLIPSE_UPDATES_URL;</filename>
775 and click "OK".</para></listitem>
776 <listitem><para>Select <filename>&ECLIPSE_UPDATES_URL;</filename>
777 from the "Work with:" pull-down menu.</para></listitem>
778 <listitem><para>Check the box next to <filename>TM and RSE Main Features</filename>.
779 </para></listitem>
780 <listitem><para>Expand the box next to <filename>TM and RSE Optional Add-ons</filename>
781 and select every item except <filename>RSE Unit Tests</filename> and
782 <filename>RSE WinCE Services (incubation)</filename>.</para></listitem>
783 <listitem><para>Complete the installation and restart the Eclipse IDE.</para></listitem>
784 <listitem><para>If necessary, select
785 "Install New Software" from the "Help" pull-down menu so you can click the
786 "Available Software Sites" link again.</para></listitem>
787 <listitem><para>After clicking "Available Software Sites", check the box next to
788 <filename>http://download.eclipse.org/tools/cdt/releases/indigo</filename>
789 and click "OK".</para></listitem>
790 <listitem><para>Select <filename>&ECLIPSE_INDIGO_CDT_URL;</filename>
791 from the "Work with:" pull-down menu.</para></listitem>
792 <listitem><para>Check the box next to <filename>CDT Main Features</filename>.
793 </para></listitem>
794 <listitem><para>Expand the box next to <filename>CDT Optional Features</filename>
795 and select <filename>C/C++ Remote Launch</filename> and
796 <filename>Target Communication Framework (incubation)</filename>.</para></listitem>
797 <listitem><para>Complete the installation and restart the Eclipse IDE.</para></listitem>
798 </orderedlist>
799 </para>
800 </section>
801
802 <section id='installing-the-eclipse-yocto-plug-in'>
803 <title>Installing or Accessing the Eclipse Yocto Plug-in</title>
804
805 <para>
806 You can install the Eclipse Yocto Plug-in into the Eclipse IDE
807 one of two ways: use the Yocto Project's Eclipse Update site to install the pre-built plug-in,
808 or build and install the plug-in from the latest source code.
809 If you don't want to permanently install the plug-in but just want to try it out
810 within the Eclipse environment, you can import the plug-in project from the
811 Yocto Project's Source Repositories.
812 </para>
813
814 <section id='new-software'>
815 <title>Installing the Pre-built Plug-in from the Yocto Project Eclipse Update Site</title>
816
817 <para>
818 To install the Eclipse Yocto Plug-in from the update site,
819 follow these steps:
820 <orderedlist>
821 <listitem><para>Start up the Eclipse IDE.</para></listitem>
822 <listitem><para>In Eclipse, select "Install New Software" from the "Help" menu.</para></listitem>
823 <listitem><para>Click "Add..." in the "Work with:" area.</para></listitem>
824 <listitem><para>Enter
825 <filename>&ECLIPSE_DL_PLUGIN_URL;</filename>
826 in the URL field and provide a meaningful name in the "Name" field.</para></listitem>
827 <listitem><para>Click "OK" to have the entry added to the "Work with:"
828 drop-down list.</para></listitem>
829 <listitem><para>Select the entry for the plug-in from the "Work with:" drop-down
830 list.</para></listitem>
831 <listitem><para>Check the box next to <filename>Development tools and SDKs for Yocto Linux</filename>.
832 </para></listitem>
833 <listitem><para>Complete the remaining software installation steps and
834 then restart the Eclipse IDE to finish the installation of the plug-in.
835 </para></listitem>
836 </orderedlist>
837 </para>
838 </section>
839
840 <section id='zip-file-method'>
841 <title>Installing the Plug-in Using the Latest Source Code</title>
842
843 <para>
844 To install the Eclipse Yocto Plug-in from the latest source code, follow these steps:
845 <orderedlist>
846 <listitem><para>Open a shell and create a Git repository with:
847 <literallayout class='monospaced'>
848 $ git clone git://git.yoctoproject.org/eclipse-poky yocto-eclipse
849 </literallayout>
850 For this example, the repository is named
851 <filename>~/yocto-eclipse</filename>.</para></listitem>
852 <listitem><para>Change to the directory where you set up
853 the Git repository:
854 <literallayout class='monospaced'>
855 $ cd ~/yocto-eclipse
856 </literallayout></para></listitem>
857 <listitem><para>Be sure you are in the right branch for your Git repository.
858 For this release set the branch to <filename>&DISTRO_NAME;</filename>:
859 <literallayout class='monospaced'>
860 $ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
861 </literallayout></para></listitem>
862 <listitem><para>Change to the <filename>scripts</filename>
863 directory within the Git repository:
864 <literallayout class='monospaced'>
865 $ cd scripts
866 </literallayout></para></listitem>
867 <listitem><para>Set up the local build environment by running the
868 setup script:
869 <literallayout class='monospaced'>
870 $ ./setup.sh
871 </literallayout></para></listitem>
872 <listitem><para>When the script finishes execution, it prompts
873 you with instructions on how to run the
874 <filename>build.sh</filename> script, which is also in
875 the <filename>scripts</filename> of the
876 Git repository created earlier.
877 </para></listitem>
878 <listitem><para>Run the <filename>build.sh</filename> script
879 as directed.
880 Be sure to provide the name of the Git branch along with the
881 Yocto Project release you are using.
882 Here is an example that uses the <filename>&DISTRO_NAME;</filename> branches:
883 <literallayout class='monospaced'>
884 $ ECLIPSE_HOME=/home/scottrif/yocto-eclipse/scripts/eclipse ./build.sh &DISTRO_NAME; &DISTRO_NAME;
885 </literallayout>
886 After running the script, the file
887 <filename>org.yocto.sdk-&lt;release&gt;-&lt;date&gt;-archive.zip</filename>
888 is in the current directory.</para></listitem>
889 <listitem><para>If necessary, start the Eclipse IDE and be sure you are in the
890 Workbench.</para></listitem>
891 <listitem><para>Select "Install New Software" from the "Help" pull-down menu.
892 </para></listitem>
893 <listitem><para>Click "Add".</para></listitem>
894 <listitem><para>Provide anything you want in the "Name" field.</para></listitem>
895 <listitem><para>Click "Archive" and browse to the ZIP file you built
896 in step seven.
897 This ZIP file should not be "unzipped", and must be the
898 <filename>*archive.zip</filename> file created by running the
899 <filename>build.sh</filename> script.</para></listitem>
900 <listitem><para>Click through the "Okay" buttons.</para></listitem>
901 <listitem><para>Check the box next to the new entry in the installation window and complete
902 the installation.</para></listitem>
903 <listitem><para>Restart the Eclipse IDE if necessary.</para></listitem>
904 </orderedlist>
905 </para>
906
907 <para>
908 At this point you should be able to configure the Eclipse Yocto Plug-in as described in the
909 "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring the Eclipse Yocto Plug-in</link>"
910 section.</para>
911 </section>
912
913 <section id='yocto-project-source'>
914 <title>Importing the Plug-in Project into the Eclipse Environment</title>
915
916 <para>
917 Importing the Eclipse Yocto Plug-in project from the Yocto Project source repositories
918 is useful when you want to try out the latest plug-in from the tip of plug-in's
919 development tree.
920 It is important to understand when you import the plug-in you are not installing
921 it into the Eclipse application.
922 Rather, you are importing the project and just using it.
923 To import the plug-in project, follow these steps:
924 <orderedlist>
925 <listitem><para>Open a shell and create a Git repository with:
926 <literallayout class='monospaced'>
927 $ git clone git://git.yoctoproject.org/eclipse-poky yocto-eclipse
928 </literallayout>
929 For this example, the repository is named
930 <filename>~/yocto-eclipse</filename>.</para></listitem>
931 <listitem><para>In Eclipse, select "Import" from the "File" menu.</para></listitem>
932 <listitem><para>Expand the "General" box and select "existing projects into workspace"
933 and then click "Next".</para></listitem>
934 <listitem><para>Select the root directory and browse to
935 <filename>~/yocto-eclipse/plugins</filename>.</para></listitem>
936 <listitem><para>Three plug-ins exist: "org.yocto.bc.ui", "org.yocto.sdk.ide", and
937 "org.yocto.sdk.remotetools".
938 Select and import all of them.</para></listitem>
939 </orderedlist>
940 </para>
941
942 <para>
943 The left navigation pane in the Eclipse application shows the default projects.
944 Right-click on one of these projects and run it as an Eclipse application.
945 This brings up a second instance of Eclipse IDE that has the Yocto Plug-in.
946 </para>
947 </section>
948 </section>
949
950 <section id='configuring-the-eclipse-yocto-plug-in'>
951 <title>Configuring the Eclipse Yocto Plug-in</title>
952
953 <para>
954 Configuring the Eclipse Yocto Plug-in involves setting the Cross
955 Compiler options and the Target options.
956 The configurations you choose become the default settings for all projects.
957 You do have opportunities to change them later when
958 you configure the project (see the following section).
959 </para>
960
961 <para>
962 To start, you need to do the following from within the Eclipse IDE:
963 <itemizedlist>
964 <listitem><para>Choose <filename>Windows -&gt; Preferences</filename> to display
965 the <filename>Preferences</filename> Dialog</para></listitem>
966 <listitem><para>Click <filename>Yocto Project ADT</filename></para></listitem>
967 </itemizedlist>
968 </para>
969
970 <section id='configuring-the-cross-compiler-options'>
971 <title>Configuring the Cross-Compiler Options</title>
972
973 <para>
974 To configure the Cross Compiler Options, you must select the type of toolchain,
975 point to the toolchain, specify the sysroot location, and select the target architecture.
976 <itemizedlist>
977 <listitem><para><emphasis>Selecting the Toolchain Type:</emphasis>
978 Choose between <filename>Standalone pre-built toolchain</filename>
979 and <filename>Build system derived toolchain</filename> for Cross
980 Compiler Options.
981 <itemizedlist>
982 <listitem><para><emphasis>
983 <filename>Standalone Pre-built Toolchain:</filename></emphasis>
984 Select this mode when you are using a stand-alone cross-toolchain.
985 For example, suppose you are an application developer and do not
986 need to build a target image.
987 Instead, you just want to use an architecture-specific toolchain on an
988 existing kernel and target root filesystem.
989 </para></listitem>
990 <listitem><para><emphasis>
991 <filename>Build System Derived Toolchain:</filename></emphasis>
992 Select this mode if the cross-toolchain has been installed and built
993 as part of the Build Directory.
994 When you select <filename>Build system derived toolchain</filename>,
995 you are using the toolchain bundled
996 inside the Build Directory.
997 </para></listitem>
998 </itemizedlist>
999 </para></listitem>
1000 <listitem><para><emphasis>Point to the Toolchain:</emphasis>
1001 If you are using a stand-alone pre-built toolchain, you should be pointing to the
1002 <filename>&YOCTO_ADTPATH_DIR;</filename> directory.
1003 This is the location for toolchains installed by the ADT Installer or by hand.
1004 Sections "<ulink url='&YOCTO_DOCS_ADT_URL;#configuring-and-running-the-adt-installer-script'>Configuring
1005 and Running the ADT Installer Script</ulink>" and
1006 "<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>"
1007 in the Yocto Project Application Developer's Guide
1008 describe two ways to install a stand-alone cross-toolchain in the
1009 <filename>/opt/poky</filename> directory.
1010 <note>It is possible to install a stand-alone cross-toolchain in a directory
1011 other than <filename>/opt/poky</filename>.
1012 However, doing so is discouraged.</note></para>
1013 <para>If you are using a system-derived toolchain, the path you provide
1014 for the <filename>Toolchain Root Location</filename>
1015 field is the Build Directory.
1016 See the "<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-toolchain-from-within-the-build-tree'>Using
1017 BitBake and the Build Directory</ulink>" section in the Yocto Project Application
1018 Developer's Guide for information on how to install the toolchain into the build
1019directory.</para></listitem>
1020 <listitem><para><emphasis>Specify the Sysroot Location:</emphasis>
1021 This location is where the root filesystem for the target hardware resides.
1022 If you used the ADT Installer, then the location is
1023 <filename>/opt/poky/&lt;release&gt;</filename>.
1024 Additionally, when you use the ADT Installer, the same location is used for
1025 the QEMU user-space tools and the NFS boot process.</para>
1026 <para>If you used either of the other two methods to install the toolchain, then the
1027 location of the sysroot filesystem depends on where you separately
1028 extracted and intalled the filesystem.</para>
1029 <para>For information on how to install the toolchain and on how to extract
1030 and install the sysroot filesystem, see the
1031 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>" section.
1032 </para></listitem>
1033 <listitem><para><emphasis>Select the Target Architecture:</emphasis>
1034 The target architecture is the type of hardware you are
1035 going to use or emulate.
1036 Use the pull-down <filename>Target Architecture</filename> menu to make
1037 your selection.
1038 The pull-down menu should have the supported architectures.
1039 If the architecture you need is not listed in the menu, you
1040 will need to build the image.
1041 See the "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>" section
1042 of the Yocto Project Quick Start for more information.</para></listitem>
1043 </itemizedlist>
1044 </para>
1045 </section>
1046
1047 <section id='configuring-the-target-options'>
1048 <title>Configuring the Target Options</title>
1049
1050 <para>
1051 You can choose to emulate hardware using the QEMU emulator, or you
1052 can choose to run your image on actual hardware.
1053 <itemizedlist>
1054 <listitem><para><emphasis><filename>QEMU:</filename></emphasis> Select this option if
1055 you will be using the QEMU emulator.
1056 If you are using the emulator, you also need to locate the kernel
1057 and specify any custom options.</para>
1058 <para>If you selected <filename>Build system derived toolchain</filename>,
1059 the target kernel you built will be located in the
1060 Build Directory in <filename>tmp/deploy/images</filename> directory.
1061 If you selected <filename>Standalone pre-built toolchain</filename>, the
1062 pre-built image you downloaded is located
1063 in the directory you specified when you downloaded the image.</para>
1064 <para>Most custom options are for advanced QEMU users to further
1065 customize their QEMU instance.
1066 These options are specified between paired angled brackets.
1067 Some options must be specified outside the brackets.
1068 In particular, the options <filename>serial</filename>,
1069 <filename>nographic</filename>, and <filename>kvm</filename> must all
1070 be outside the brackets.
1071 Use the <filename>man qemu</filename> command to get help on all the options
1072 and their use.
1073 The following is an example:
1074 <literallayout class='monospaced'>
1075 serial ‘&lt;-m 256 -full-screen&gt;’
1076 </literallayout></para>
1077 <para>
1078 Regardless of the mode, Sysroot is already defined as part of the
1079 Cross Compiler Options configuration in the
1080 <filename>Sysroot Location:</filename> field.</para></listitem>
1081 <listitem><para><emphasis><filename>External HW:</filename></emphasis> Select this option
1082 if you will be using actual hardware.</para></listitem>
1083 </itemizedlist>
1084 </para>
1085
1086 <para>
1087 Click the <filename>OK</filename> button to save your plug-in configurations.
1088 </para>
1089 </section>
1090 </section>
1091 </section>
1092
1093 <section id='creating-the-project'>
1094 <title>Creating the Project</title>
1095
1096 <para>
1097 You can create two types of projects: Autotools-based, or Makefile-based.
1098 This section describes how to create Autotools-based projects from within
1099 the Eclipse IDE.
1100 For information on creating Makefile-based projects in a terminal window, see the section
1101 "<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-command-line'>Using the Command Line</ulink>"
1102 in the Yocto Project Application Developer's Guide.
1103 </para>
1104
1105 <para>
1106 To create a project based on a Yocto template and then display the source code,
1107 follow these steps:
1108 <orderedlist>
1109 <listitem><para>Select <filename>File -&gt; New -&gt; Project</filename>.</para></listitem>
1110 <listitem><para>Double click <filename>CC++</filename>.</para></listitem>
1111 <listitem><para>Double click <filename>C Project</filename> to create the project.</para></listitem>
1112 <listitem><para>Expand <filename>Yocto Project ADT Project</filename>.</para></listitem>
1113 <listitem><para>Select <filename>Hello World ANSI C Autotools Project</filename>.
1114 This is an Autotools-based project based on a Yocto template.</para></listitem>
1115 <listitem><para>Put a name in the <filename>Project name:</filename> field.
1116 Do not use hyphens as part of the name.</para></listitem>
1117 <listitem><para>Click <filename>Next</filename>.</para></listitem>
1118 <listitem><para>Add information in the <filename>Author</filename> and
1119 <filename>Copyright notice</filename> fields.</para></listitem>
1120 <listitem><para>Be sure the <filename>License</filename> field is correct.</para></listitem>
1121 <listitem><para>Click <filename>Finish</filename>.</para></listitem>
1122 <listitem><para>If the "open perspective" prompt appears, click "Yes" so that you
1123 in the C/C++ perspective.</para></listitem>
1124 <listitem><para>The left-hand navigation pane shows your project.
1125 You can display your source by double clicking the project's source file.
1126 </para></listitem>
1127 </orderedlist>
1128 </para>
1129 </section>
1130
1131 <section id='configuring-the-cross-toolchains'>
1132 <title>Configuring the Cross-Toolchains</title>
1133
1134 <para>
1135 The earlier section, "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring
1136 the Eclipse Yocto Plug-in</link>", sets up the default project
1137 configurations.
1138 You can override these settings for a given project by following these steps:
1139 <orderedlist>
1140 <listitem><para>Select <filename>Project -&gt; Change Yocto Project Settings</filename>:
1141 This selection brings up the <filename>Yocot Project Settings</filename> Dialog
1142 and allows you to make changes specific to an individual project.
1143 </para>
1144 <para>By default, the Cross Compiler Options and Target Options for a project
1145 are inherited from settings you provide using the <filename>Preferences</filename>
1146 Dialog as described earlier
1147 in the "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring the Eclipse
1148 Yocto Plug-in</link>" section.
1149 The <filename>Yocto Project Settings</filename>
1150 Dialog allows you to override those default settings
1151 for a given project.</para></listitem>
1152 <listitem><para>Make your configurations for the project and click "OK".
1153 If you are running the Juno version of Eclipse, you can skip down to the next
1154 section where you build the project.
1155 If you are not working with Juno, you need to reconfigure the project as
1156 described in the next step.</para></listitem>
1157 <listitem><para>Select <filename>Project -&gt; Reconfigure Project</filename>:
1158 This selection reconfigures the project by running
1159 <filename>autogen.sh</filename> in the workspace for your project.
1160 The script also runs <filename>libtoolize</filename>, <filename>aclocal</filename>,
1161 <filename>autoconf</filename>, <filename>autoheader</filename>,
1162 <filename>automake --a</filename>, and
1163 <filename>./configure</filename>.
1164 Click on the <filename>Console</filename> tab beneath your source code to
1165 see the results of reconfiguring your project.</para></listitem>
1166 </orderedlist>
1167 </para>
1168 </section>
1169
1170 <section id='building-the-project'>
1171 <title>Building the Project</title>
1172
1173 <para>
1174 To build the project in Juno, right click on the project in the navigator pane and select
1175 <filename>Build Project</filename>.
1176 If you are not running Juno, select <filename>Project -&gt; Build Project</filename>.
1177 The console should update and you can note the cross-compiler you are using.
1178 </para>
1179 </section>
1180
1181 <section id='starting-qemu-in-user-space-nfs-mode'>
1182 <title>Starting QEMU in User Space NFS Mode</title>
1183
1184 <para>
1185 To start the QEMU emulator from within Eclipse, follow these steps:
1186 <orderedlist>
1187 <listitem><para>Expose the <filename>Run -&gt; External Tools</filename> menu.
1188 Your image should appear as a selectable menu item.
1189 </para></listitem>
1190 <listitem><para>Select your image from the menu to launch the
1191 emulator in a new window.</para></listitem>
1192 <listitem><para>If needed, enter your host root password in the shell window at the prompt.
1193 This sets up a <filename>Tap 0</filename> connection needed for running in user-space
1194 NFS mode.</para></listitem>
1195 <listitem><para>Wait for QEMU to launch.</para></listitem>
1196 <listitem><para>Once QEMU launches, you can begin operating within that
1197 environment.
1198 For example, you could determine the IP Address
1199 for the user-space NFS by using the <filename>ifconfig</filename> command.
1200 </para></listitem>
1201 </orderedlist>
1202 </para>
1203 </section>
1204
1205 <section id='deploying-and-debugging-the-application'>
1206 <title>Deploying and Debugging the Application</title>
1207
1208 <para>
1209 Once the QEMU emulator is running the image, using the Eclipse IDE
1210 you can deploy your application and use the emulator to perform debugging.
1211 Follow these steps to deploy the application.
1212 <orderedlist>
1213 <listitem><para>Select <filename>Run -&gt; Debug Configurations...</filename></para></listitem>
1214 <listitem><para>In the left area, expand <filename>C/C++Remote Application</filename>.</para></listitem>
1215 <listitem><para>Locate your project and select it to bring up a new
1216 tabbed view in the <filename>Debug Configurations</filename> Dialog.</para></listitem>
1217 <listitem><para>Enter the absolute path into which you want to deploy
1218 the application.
1219 Use the <filename>Remote Absolute File Path for C/C++Application:</filename> field.
1220 For example, enter <filename>/usr/bin/&lt;programname&gt;</filename>.</para></listitem>
1221 <listitem><para>Click on the <filename>Debugger</filename> tab to see the cross-tool debugger
1222 you are using.</para></listitem>
1223 <listitem><para>Click on the <filename>Main</filename> tab.</para></listitem>
1224 <listitem><para>Create a new connection to the QEMU instance
1225 by clicking on <filename>new</filename>.</para></listitem>
1226 <listitem><para>Select <filename>TCF</filename>, which means Target Communication
1227 Framework.</para></listitem>
1228 <listitem><para>Click <filename>Next</filename>.</para></listitem>
1229 <listitem><para>Clear out the <filename>host name</filename> field and enter the IP Address
1230 determined earlier.</para></listitem>
1231 <listitem><para>Click <filename>Finish</filename> to close the
1232 <filename>New Connections</filename> Dialog.</para></listitem>
1233 <listitem><para>Use the drop-down menu now in the <filename>Connection</filename> field and pick
1234 the IP Address you entered.</para></listitem>
1235 <listitem><para>Click <filename>Run</filename> to bring up a login screen
1236 and login.</para></listitem>
1237 <listitem><para>Accept the debug perspective.</para></listitem>
1238 </orderedlist>
1239 </para>
1240 </section>
1241
1242 <section id='running-user-space-tools'>
1243 <title>Running User-Space Tools</title>
1244
1245 <para>
1246 As mentioned earlier in the manual, several tools exist that enhance
1247 your development experience.
1248 These tools are aids in developing and debugging applications and images.
1249 You can run these user-space tools from within the Eclipse IDE through the
1250 <filename>YoctoTools</filename> menu.
1251 </para>
1252
1253 <para>
1254 Once you pick a tool, you need to configure it for the remote target.
1255 Every tool needs to have the connection configured.
1256 You must select an existing TCF-based RSE connection to the remote target.
1257 If one does not exist, click <filename>New</filename> to create one.
1258 </para>
1259
1260 <para>
1261 Here are some specifics about the remote tools:
1262 <itemizedlist>
1263 <listitem><para><emphasis><filename>OProfile</filename>:</emphasis> Selecting this tool causes
1264 the <filename>oprofile-server</filename> on the remote target to launch on
1265 the local host machine.
1266 The <filename>oprofile-viewer</filename> must be installed on the local host machine and the
1267 <filename>oprofile-server</filename> must be installed on the remote target,
1268 respectively, in order to use.
1269 You must compile and install the <filename>oprofile-viewer</filename> from the source code
1270 on your local host machine.
1271 Furthermore, in order to convert the target's sample format data into a form that the
1272 host can use, you must have <filename>oprofile</filename> version 0.9.4 or
1273 greater installed on the host.</para>
1274 <para>You can locate both the viewer and server from
1275 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/oprofileui/'></ulink>.
1276 <note>The <filename>oprofile-server</filename> is installed by default on
1277 the <filename>core-image-sato-sdk</filename> image.</note></para></listitem>
1278 <listitem><para><emphasis><filename>Lttng2.0 ust trace import</filename>:</emphasis>
1279 Selecting this tool transfers the remote target's
1280 <filename>Lttng</filename> tracing data back to the local host machine
1281 and uses the <filename>Lttng</filename> Eclipse plug-in to graphically
1282 display the output.
1283 For information on how to use <filename>Lttng</filename> to trace an application,
1284 see <ulink url='http://lttng.org/documentation'></ulink>.
1285 <note>Do not use <filename>Lttng-user space (legacy)</filename> tool.
1286 This tool no longer has any upstream support.</note>
1287 </para>
1288 <para>Before you use the <filename>Lttng2.0 ust trace import</filename> tool,
1289 you need to setup the <filename>Lttng</filename> Eclipse plug-in and create a
1290 <filename>Tracing</filename> project.
1291 Do the following:
1292 <orderedlist>
1293 <listitem><para>Select <filename>Window -> Open Perspective -> Other</filename>
1294 and then select <filename>Tracing</filename>.</para></listitem>
1295 <listitem><para>Click <filename>OK</filename> to change the Eclipse perspective
1296 into the <filename>Tracing</filename> perspective.</para></listitem>
1297 <listitem><para>Create a new <filename>Tracing</filename> project by selecting
1298 <filename>File -> New -> Project</filename>.</para></listitem>
1299 <listitem><para>Choose <filename>Tracing -> Tracing Project</filename>.
1300 </para></listitem>
1301 <listitem><para>Generate your tracing data on the remote target.
1302 </para></listitem>
1303 <listitem><para>Click
1304 <filename>Yocto Project Tools -> Lttng2.0 ust trace import</filename>
1305 to start the data import process.</para></listitem>
1306 <listitem><para>Specify your remote connection name.</para></listitem>
1307 <listitem><para>For the Ust directory path, specify the location of
1308 your remote tracing data.
1309 Make sure the location ends with <filename>ust</filename> (e.g.
1310 <filename>/usr/mysession/ust</filename>.</para></listitem>
1311 <listitem><para>Click <filename>OK</filename> to complete the import process.
1312 The data is now in the local tracing project you created.</para></listitem>
1313 <listitem><para>Right click on the data and then use the menu to
1314 <filename>Select Trace Type... -> Common Trace Format -> Generic CTF Trace</filename>
1315 to map the tracing type.</para></listitem>
1316 <listitem><para>Right click the mouse and select <filename>Open</filename>
1317 to bring up the Eclipse <filename>Lttng</filename> Trace Viewer so you
1318 view the tracing data.</para></listitem>
1319 </orderedlist></para></listitem>
1320 <listitem><para><emphasis><filename>PowerTOP</filename>:</emphasis> Selecting this tool runs
1321 <filename>powertop</filename> on the remote target machine and displays the results in a
1322 new view called <filename>powertop</filename>.</para>
1323 <para><filename>Time to gather data(sec):</filename> is the time passed in seconds before data
1324 is gathered from the remote target for analysis.</para>
1325 <para><filename>show pids in wakeups list:</filename> corresponds to the
1326 <filename>-p</filename> argument
1327 passed to <filename>powertop</filename>.</para></listitem>
1328 <listitem><para><emphasis><filename>LatencyTOP and Perf</filename>:</emphasis>
1329 <filename>latencytop</filename> identifies system latency, while
1330 <filename>perf</filename> monitors the system's
1331 performance counter registers.
1332 Selecting either of these tools causes an RSE terminal view to appear
1333 from which you can run the tools.
1334 Both tools refresh the entire screen to display results while they run.</para></listitem>
1335 </itemizedlist>
1336 </para>
1337 </section>
1338
1339 <section id='customizing-an-image-using-a-bitbake-commander-project-and-hob'>
1340 <title>Customizing an Image Using a BitBake Commander Project and Hob</title>
1341
1342 <para>
1343 Within Eclipse, you can create a Yocto BitBake Commander project,
1344 edit the metadata, and then use the
1345 <ulink url='&YOCTO_HOME_URL;/projects/hob'>Hob</ulink> to build a customized
1346 image all within one IDE.
1347 </para>
1348
1349 <section id='creating-the-yocto-bitbake-commander-project'>
1350 <title>Creating the Yocto BitBake Commander Project</title>
1351
1352 <para>
1353 To create a Yocto BitBake Commander project, follow these steps:
1354 <orderedlist>
1355 <listitem><para>Select <filename>Window -> Open Perspective -> Other</filename>
1356 and then choose <filename>Bitbake Commander</filename>.</para></listitem>
1357 <listitem><para>Click <filename>OK</filename> to change the Eclipse perspective into the
1358 Bitbake Commander perspective.</para></listitem>
1359 <listitem><para>Select <filename>File -> New -> Project</filename> to create a new Yocto
1360 Bitbake Commander project.</para></listitem>
1361 <listitem><para>Choose <filename>Yocto Project Bitbake Commander -> New Yocto Project</filename>
1362 and click <filename>Next</filename>.</para></listitem>
1363 <listitem><para>Enter the Project Name and choose the Project Location.
1364 The Yocto project's metadata files will be put under the directory
1365 <filename>&lt;project_location&gt;/&lt;project_name&gt;</filename>.
1366 If that directory does not exist, you need to check
1367 the "Clone from Yocto Git Repository" box, which would execute a
1368 <filename>git clone</filename> command to get the project's metadata files.
1369 </para></listitem>
1370 <listitem><para>Select <filename>Finish</filename> to create the project.</para></listitem>
1371 </orderedlist>
1372 </para>
1373 </section>
1374
1375 <section id='editing-the-metadata-files'>
1376 <title>Editing the Metadata Files</title>
1377
1378 <para>
1379 After you create the Yocto Bitbake Commander project, you can modify the metadata files
1380 by opening them in the project.
1381 When editing recipe files (<filename>.bb</filename> files), you can view BitBake
1382 variable values and information by hovering the mouse pointer over the variable name and
1383 waiting a few seconds.
1384 </para>
1385
1386 <para>
1387 To edit the metadata, follow these steps:
1388 <orderedlist>
1389 <listitem><para>Select your Yocto Bitbake Commander project.</para></listitem>
1390 <listitem><para>Select <filename>File -> New -> Yocto BitBake Commander -> BitBake Recipe</filename>
1391 to open a new recipe wizard.</para></listitem>
1392 <listitem><para>Point to your source by filling in the "SRC_URL" field.
1393 For example, you can add a recipe to your
1394 <link linkend='source-directory'>Source Directory</link>
1395 by defining "SRC_URL" as follows:
1396 <literallayout class='monospaced'>
1397 ftp://ftp.gnu.org/gnu/m4/m4-1.4.9.tar.gz
1398 </literallayout></para></listitem>
1399 <listitem><para>Click "Populate" to calculate the archive md5, sha256,
1400 license checksum values and to auto-generate the recipe filename.</para></listitem>
1401 <listitem><para>Fill in the "Description" field.</para></listitem>
1402 <listitem><para>Be sure values for all required fields exist.</para></listitem>
1403 <listitem><para>Click <filename>Finish</filename>.</para></listitem>
1404 </orderedlist>
1405 </para>
1406 </section>
1407
1408 <section id='buiding-and-customizing-the-image'>
1409 <title>Building and Customizing the Image</title>
1410
1411 <para>
1412 To build and customize the image in Eclipse, follow these steps:
1413 <orderedlist>
1414 <listitem><para>Select your Yocto Bitbake Commander project.</para></listitem>
1415 <listitem><para>Select <filename>Project -> Launch HOB</filename>.</para></listitem>
1416 <listitem><para>Enter the Build Directory where you want to put your final images.</para></listitem>
1417 <listitem><para>Click <filename>OK</filename> to launch Hob.</para></listitem>
1418 <listitem><para>Use Hob to customize and build your own images.
1419 For information on Hob, see the
1420 <ulink url='&YOCTO_HOME_URL;/projects/hob'>Hob Project Page</ulink> on the
1421 Yocto Project website.</para></listitem>
1422 </orderedlist>
1423 </para>
1424 </section>
1425 </section>
1426 </section>
1427
1428 <section id='workflow-using-stand-alone-cross-development-toolchains'>
1429 <title>Workflow Using Stand-alone Cross-development Toolchains</title>
1430
1431 <para>
1432 If you want to develop an application without prior installation of the ADT, you
1433 still can employ the cross-development toolchain, the QEMU emulator, and a number of supported
1434 target image files.
1435 You just need to follow these general steps:
1436 <orderedlist>
1437 <listitem><para><emphasis>Install the cross-development toolchain for your target hardware:</emphasis>
1438 For information on how to install the toolchain, see the
1439 "<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>"
1440 section
1441 in the Yocto Project Application Developer's Guide.</para></listitem>
1442 <listitem><para><emphasis>Download the Target Image:</emphasis> The Yocto Project supports
1443 several target architectures and has many pre-built kernel images and root filesystem
1444 images.</para>
1445 <para>If you are going to develop your application on hardware, go to the
1446 <ulink url='&YOCTO_MACHINES_DL_URL;'><filename>machines</filename></ulink>
1447 download area and choose a target machine area
1448 from which to download the kernel image and root filesystem.
1449 This download area could have several files in it that support development using
1450 actual hardware.
1451 For example, the area might contain <filename>.hddimg</filename> files that combine the
1452 kernel image with the filesystem, boot loaders, etc.
1453 Be sure to get the files you need for your particular development process.</para>
1454 <para>If you are going to develop your application and then run and test it using the QEMU
1455 emulator, go to the
1456 <ulink url='&YOCTO_QEMU_DL_URL;'><filename>machines/qemu</filename></ulink>
1457 download area.
1458 From this area, go down into the directory for your target architecture
1459 (e.g. <filename>qemux86_64</filename> for an
1460 <trademark class='registered'>Intel</trademark>-based 64-bit architecture).
1461 Download kernel, root filesystem, and any other files you need for your process.
1462 <note>In order to use the root filesystem in QEMU, you need to extract it.
1463 See the
1464 "<ulink url='&YOCTO_DOCS_ADT_URL;#extracting-the-root-filesystem'>Extracting the Root Filesystem</ulink>"
1465 section for information on how to extract the root filesystem.</note></para></listitem>
1466 <listitem><para><emphasis>Develop and Test your Application:</emphasis> At this point,
1467 you have the tools to develop your application.
1468 If you need to separately install and use the QEMU emulator, you can go to
1469 <ulink url='http://www.qemu.org'>QEMU Home Page</ulink> to download and learn about the
1470 emulator.</para></listitem>
1471 </orderedlist>
1472 </para>
1473 </section>
1474</section>
1475
1476<section id="modifying-temporary-source-code">
1477 <title>Modifying Temporary Source Code</title>
1478
1479 <para>
1480 You might
1481 find it helpful during development to modify the temporary source code used by recipes
1482 to build packages.
1483 For example, suppose you are developing a patch and you need to experiment a bit
1484 to figure out your solution.
1485 After you have initially built the package, you can iteratively tweak the
1486 source code, which is located in the
1487 <link linkend='build-directory'>Build Directory</link>, and then
1488 you can force a re-compile and quickly test your altered code.
1489 Once you settle on a solution, you can then preserve your changes in the form of
1490 patches.
1491 You can accomplish these steps all within either a
1492 <ulink url='http://savannah.nongnu.org/projects/quilt'>Quilt</ulink> or
1493 <link linkend='git'>Git</link> workflow.
1494 </para>
1495
1496 <section id='finding-the-temporary-source-code'>
1497 <title>Finding the Temporary Source Code</title>
1498
1499 <para>
1500 During a build, the unpacked temporary source code used by recipes
1501 to build packages is available in the Build Directory as
1502 defined by the
1503 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'>S</ulink></filename> variable.
1504 Below is the default value for the <filename>S</filename> variable as defined in the
1505 <filename>meta/conf/bitbake.conf</filename> configuration file in the
1506 <link linkend='source-directory'>Source Directory</link>:
1507 <literallayout class='monospaced'>
1508 S = ${WORKDIR}/${BP}
1509 </literallayout>
1510 You should be aware that many recipes override the <filename>S</filename> variable.
1511 For example, recipes that fetch their source from Git usually set
1512 <filename>S</filename> to <filename>${WORKDIR}/git</filename>.
1513 <note>
1514 The
1515 <ulink url='&YOCTO_DOCS_REF_URL;#var-BP'><filename>BP</filename></ulink>
1516 represents the base recipe name, which consists of the name and version:
1517 <literallayout class='monospaced'>
1518 BP = ${BPN}-${PV}
1519 </literallayout>
1520 </note>
1521 </para>
1522
1523 <para>
1524 The path to the work directory for the recipe
1525 (<ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>) depends
1526 on the recipe name and the architecture of the target device.
1527 For example, here is the work directory for recipes and resulting packages that are
1528 not device-dependent:
1529 <literallayout class='monospaced'>
1530 ${TMPDIR}/work/${PACKAGE_ARCH}-poky-${TARGET_OS}/${PN}-${PV}-${PR}
1531 </literallayout>
1532 Let's look at an example without variables.
1533 Assuming a top-level <link linkend='source-directory'>Source Directory</link>
1534 named <filename>poky</filename>
1535 and a default Build Directory of <filename>poky/build</filename>,
1536 the following is the work directory for the <filename>acl</filename> recipe that
1537 creates the <filename>acl</filename> package:
1538 <literallayout class='monospaced'>
1539 ~/poky/build/tmp/work/i586-poky-linux/acl-2.2.51-r3
1540 </literallayout>
1541 </para>
1542
1543 <para>
1544 If your resulting package is dependent on the target device,
1545 the work directory varies slightly:
1546 <literallayout class='monospaced'>
1547 ${TMPDIR}/work/${MACHINE}-poky-${TARGET_OS}/${PN}-${PV}-${PR}
1548 </literallayout>
1549 Again, assuming top-level Source Directory named <filename>poky</filename>
1550 and a default Build Directory of <filename>poky/build</filename>, the
1551 following are the work and temporary source directories, respectively,
1552 for the <filename>acl</filename> package that is being
1553 built for a MIPS-based device:
1554 <literallayout class='monospaced'>
1555 ~/poky/build/tmp/work/mips-poky-linux/acl-2.2.51-r2
1556 ~/poky/build/tmp/work/mips-poky-linux/acl-2.2.51-r2/acl-2.2.51
1557 </literallayout>
1558 </para>
1559
1560 <note>
1561 To better understand how the OpenEmbedded build system resolves directories during the
1562 build process, see the glossary entries for the
1563 <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>,
1564 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>,
1565 <ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink>,
1566 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>,
1567 <ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_OS'><filename>TARGET_OS</filename></ulink>,
1568 <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>,
1569 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>,
1570 and
1571 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>
1572 variables in the Yocto Project Reference Manual.
1573 </note>
1574
1575 <para>
1576 Now that you know where to locate the directory that has the temporary source code,
1577 you can use a Quilt or Git workflow to make your edits, test the changes,
1578 and preserve the changes in the form of patches.
1579 </para>
1580 </section>
1581
1582 <section id="using-a-quilt-workflow">
1583 <title>Using a Quilt Workflow</title>
1584
1585 <para>
1586 <ulink url='http://savannah.nongnu.org/projects/quilt'>Quilt</ulink>
1587 is a powerful tool that allows you to capture source code changes without having
1588 a clean source tree.
1589 This section outlines the typical workflow you can use to modify temporary source code,
1590 test changes, and then preserve the changes in the form of a patch all using Quilt.
1591 </para>
1592
1593 <para>
1594 Follow these general steps:
1595 <orderedlist>
1596 <listitem><para><emphasis>Find the Source Code:</emphasis>
1597 The temporary source code used by the OpenEmbedded build system is kept in the
1598 Build Directory.
1599 See the
1600 "<link linkend='finding-the-temporary-source-code'>Finding the Temporary Source Code</link>"
1601 section to learn how to locate the directory that has the temporary source code for a
1602 particular package.</para></listitem>
1603 <listitem><para><emphasis>Change Your Working Directory:</emphasis>
1604 You need to be in the directory that has the temporary source code.
1605 That directory is defined by the
1606 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
1607 variable.</para></listitem>
1608 <listitem><para><emphasis>Create a New Patch:</emphasis>
1609 Before modifying source code, you need to create a new patch.
1610 To create a new patch file, use <filename>quilt new</filename> as below:
1611 <literallayout class='monospaced'>
1612 $ quilt new my_changes.patch
1613 </literallayout></para></listitem>
1614 <listitem><para><emphasis>Notify Quilt and Add Files:</emphasis>
1615 After creating the patch, you need to notify Quilt about the files
1616 you plan to edit.
1617 You notify Quilt by adding the files to the patch you just created:
1618 <literallayout class='monospaced'>
1619 $ quilt add file1.c file2.c file3.c
1620 </literallayout>
1621 </para></listitem>
1622 <listitem><para><emphasis>Edit the Files:</emphasis>
1623 Make your changes in the temporary source code to the files you added
1624 to the patch.</para></listitem>
1625 <listitem><para><emphasis>Test Your Changes:</emphasis>
1626 Once you have modified the source code, the easiest way to test your changes
1627 is by calling the <filename>compile</filename> task as shown in the following example:
1628 <literallayout class='monospaced'>
1629 $ bitbake -c compile -f &lt;name_of_package&gt;
1630 </literallayout>
1631 The <filename>-f</filename> or <filename>--force</filename>
1632 option forces re-execution of the specified task.
1633 If you find problems with your code, you can just keep editing and
1634 re-testing iteratively until things work as expected.
1635 <note>All the modifications you make to the temporary source code
1636 disappear once you <filename>-c clean</filename> or
1637 <filename>-c cleanall</filename> with BitBake for the package.
1638 Modifications will also disappear if you use the <filename>rm_work</filename>
1639 feature as described in the
1640 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
1641 section of the Yocto Project Quick Start.
1642 </note></para></listitem>
1643 <listitem><para><emphasis>Generate the Patch:</emphasis>
1644 Once your changes work as expected, you need to use Quilt to generate the final patch that
1645 contains all your modifications.
1646 <literallayout class='monospaced'>
1647 $ quilt refresh
1648 </literallayout>
1649 At this point the <filename>my_changes.patch</filename> file has all your edits made
1650 to the <filename>file1.c</filename>, <filename>file2.c</filename>, and
1651 <filename>file3.c</filename> files.</para>
1652 <para>You can find the resulting patch file in the <filename>patches/</filename>
1653 subdirectory of the source (<filename>S</filename>) directory.</para></listitem>
1654 <listitem><para><emphasis>Copy the Patch File:</emphasis>
1655 For simplicity, copy the patch file into a directory named <filename>files</filename>,
1656 which you can create in the same directory that holds the recipe
1657 (<filename>.bb</filename>) file or the
1658 append (<filename>.bbappend</filename>) file.
1659 Placing the patch here guarantees that the OpenEmbedded build system will find
1660 the patch.
1661 Next, add the patch into the
1662 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>
1663 of the recipe.
1664 Here is an example:
1665 <literallayout class='monospaced'>
1666 SRC_URI += "file://my_changes.patch"
1667 </literallayout></para></listitem>
1668 <listitem><para><emphasis>Increment the Recipe Revision Number:</emphasis>
1669 Finally, don't forget to 'bump' the
1670 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PR'>PR</ulink></filename>
1671 value in the recipe since the resulting packages have changed.</para></listitem>
1672 </orderedlist>
1673 </para> </section>
1674
1675 <section id='using-a-git-workflow'>
1676 <title>Using a Git Workflow</title>
1677 <para>
1678 Git is an even more powerful tool that allows you to capture source code changes without having
1679 a clean source tree.
1680 This section outlines the typical workflow you can use to modify temporary source code,
1681 test changes, and then preserve the changes in the form of a patch all using Git.
1682 For general information on Git as it is used in the Yocto Project, see the
1683 "<link linkend='git'>Git</link>" section.
1684 </para>
1685
1686 <note>
1687 This workflow uses Git only for its ability to manage local changes to the source code
1688 and produce patches independent of any version control system used with the Yocto Project.
1689 </note>
1690
1691 <para>
1692 Follow these general steps:
1693 <orderedlist>
1694 <listitem><para><emphasis>Find the Source Code:</emphasis>
1695 The temporary source code used by the OpenEmbedded build system is kept in the
1696 Build Directory.
1697 See the
1698 "<link linkend='finding-the-temporary-source-code'>Finding the Temporary Source Code</link>"
1699 section to learn how to locate the directory that has the temporary source code for a
1700 particular package.</para></listitem>
1701 <listitem><para><emphasis>Change Your Working Directory:</emphasis>
1702 You need to be in the directory that has the temporary source code.
1703 That directory is defined by the
1704 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
1705 variable.</para></listitem>
1706 <listitem><para><emphasis>If needed, initialize a Git Repository:</emphasis>
1707 If the recipe you are working with does not use a Git fetcher,
1708 you need to set up a Git repository as follows:
1709 <literallayout class='monospaced'>
1710 $ git init
1711 $ git add *
1712 $ git commit -m "initial revision"
1713 </literallayout>
1714 The above Git commands initialize a Git repository that is based on the
1715 files in your current working directory, stage all the files, and commit
1716 the files.
1717 At this point, your Git repository is aware of all the source code files.
1718 Any edits you now make to files can be committed later and will be tracked by
1719 Git.</para></listitem>
1720 <listitem><para><emphasis>Edit the Files:</emphasis>
1721 Make your changes to the temporary source code.</para></listitem>
1722 <listitem><para><emphasis>Test Your Changes:</emphasis>
1723 Once you have modified the source code, the easiest way to test your changes
1724 is by calling the <filename>compile</filename> task as shown in the following example:
1725 <literallayout class='monospaced'>
1726 $ bitbake -c compile -f &lt;name_of_package&gt;
1727 </literallayout>
1728 The <filename>-f</filename> or <filename>--force</filename>
1729 option forces re-execution of the specified task.
1730 If you find problems with your code, you can just keep editing and
1731 re-testing iteratively until things work as expected.
1732 <note>All the modifications you make to the temporary source code
1733 disappear once you <filename>-c clean</filename>, <filename>-c cleansstate</filename>,
1734 or <filename>-c cleanall</filename> with BitBake for the package.
1735 Modifications will also disappear if you use the <filename>rm_work</filename>
1736 feature as described in the
1737 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
1738 section of the Yocto Project Quick Start.
1739 </note></para></listitem>
1740 <listitem><para><emphasis>See the List of Files You Changed:</emphasis>
1741 Use the <filename>git status</filename> command to see what files you have actually edited.
1742 The ability to have Git track the files you have changed is an advantage that this
1743 workflow has over the Quilt workflow.
1744 Here is the Git command to list your changed files:
1745 <literallayout class='monospaced'>
1746 $ git status
1747 </literallayout></para></listitem>
1748 <listitem><para><emphasis>Stage the Modified Files:</emphasis>
1749 Use the <filename>git add</filename> command to stage the changed files so they
1750 can be committed as follows:
1751 <literallayout class='monospaced'>
1752 $ git add file1.c file2.c file3.c
1753 </literallayout></para></listitem>
1754 <listitem><para><emphasis>Commit the Staged Files and View Your Changes:</emphasis>
1755 Use the <filename>git commit</filename> command to commit the changes to the
1756 local repository.
1757 Once you have committed the files, you can use the <filename>git log</filename>
1758 command to see your changes:
1759 <literallayout class='monospaced'>
1760 $ git commit -m "&lt;commit-summary-message&gt;"
1761 $ git log
1762 </literallayout>
1763 <note>The name of the patch file created in the next step is based on your
1764 <filename>commit-summary-message</filename>.</note></para></listitem>
1765 <listitem><para><emphasis>Generate the Patch:</emphasis>
1766 Once the changes are committed, use the <filename>git format-patch</filename>
1767 command to generate a patch file:
1768 <literallayout class='monospaced'>
1769 $ git format-patch -1
1770 </literallayout>
1771 Specifying "-1" causes Git to generate the
1772 patch file for the most recent commit.</para>
1773 <para>At this point, the patch file has all your edits made
1774 to the <filename>file1.c</filename>, <filename>file2.c</filename>, and
1775 <filename>file3.c</filename> files.
1776 You can find the resulting patch file in the current directory and it
1777 is named according to the <filename>git commit</filename> summary line.
1778 The patch file ends with <filename>.patch</filename>.</para></listitem>
1779 <listitem><para><emphasis>Copy the Patch File:</emphasis>
1780 For simplicity, copy the patch file into a directory named <filename>files</filename>,
1781 which you can create in the same directory that holds the recipe
1782 (<filename>.bb</filename>) file or the
1783 append (<filename>.bbappend</filename>) file.
1784 Placing the patch here guarantees that the OpenEmbedded build system will find
1785 the patch.
1786 Next, add the patch into the
1787 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>
1788 of the recipe.
1789 Here is an example:
1790 <literallayout class='monospaced'>
1791 SRC_URI += "file://0001-&lt;commit-summary-message&gt;.patch"
1792 </literallayout></para></listitem>
1793 <listitem><para><emphasis>Increment the Recipe Revision Number:</emphasis>
1794 Finally, don't forget to 'bump' the
1795 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PR'>PR</ulink></filename>
1796 value in the recipe since the resulting packages have changed.</para></listitem>
1797 </orderedlist>
1798 </para>
1799 </section>
1800</section>
1801
1802<section id='image-development-using-hob'>
1803 <title>Image Development Using Hob</title>
1804
1805 <para>
1806 The <ulink url='&YOCTO_HOME_URL;/projects/hob'>Hob</ulink> is a graphical user interface for the
1807 OpenEmbedded build system, which is based on BitBake.
1808 You can use the Hob to build custom operating system images within the Yocto Project build environment.
1809 Hob simply provides a friendly interface over the build system used during system development.
1810 In other words, building images with the Hob lets you take care of common build tasks more easily.
1811 </para>
1812
1813 <para>
1814 For a better understanding of Hob, see the project page at
1815 <ulink url='&YOCTO_HOME_URL;/projects/hob'></ulink> on the Yocto Project website.
1816 The page has a short introductory training video on Hob.
1817 The following lists some features of Hob:
1818 <itemizedlist>
1819 <listitem><para>You can setup and run Hob using these commands:
1820 <literallayout class='monospaced'>
1821 $ source oe-init-build-env
1822 $ hob
1823 </literallayout></para></listitem>
1824 <listitem><para>You can set the
1825 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
1826 for which you are building the image.</para></listitem>
1827 <listitem><para>You can modify various policy settings such as the package format used to build with,
1828 the parrallelism BitBake uses, whether or not to build an external toolchain, and which host
1829 to build against.</para></listitem>
1830 <listitem><para>You can manage
1831 <link linkend='understanding-and-creating-layers'>layers</link>.</para></listitem>
1832 <listitem><para>You can select a base image and then add extra packages for your custom build.
1833 </para></listitem>
1834 <listitem><para>You can launch and monitor the build from within Hob.</para></listitem>
1835 </itemizedlist>
1836 </para>
1837</section>
1838
1839<section id="platdev-appdev-devshell">
1840 <title>Using a Development Shell</title>
1841
1842 <para>
1843 When debugging certain commands or even when just editing packages,
1844 <filename>devshell</filename> can be a useful tool.
1845 When you invoke <filename>devshell</filename>, source files are
1846 extracted into your working directory and patches are applied.
1847 Then, a new terminal is opened and you are placed in the working directory.
1848 In the new terminal, all the OpenEmbedded build-related environment variables are
1849 still defined so you can use commands such as <filename>configure</filename> and
1850 <filename>make</filename>.
1851 The commands execute just as if the OpenEmbedded build system were executing them.
1852 Consequently, working this way can be helpful when debugging a build or preparing
1853 software to be used with the OpenEmbedded build system.
1854 </para>
1855
1856 <para>
1857 Following is an example that uses <filename>devshell</filename> on a target named
1858 <filename>matchbox-desktop</filename>:
1859 <literallayout class='monospaced'>
1860 $ bitbake matchbox-desktop -c devshell
1861 </literallayout>
1862 </para>
1863
1864 <para>
1865 This command spawns a terminal with a shell prompt within the OpenEmbedded build environment.
1866 The <ulink url='&YOCTO_DOCS_REF_URL;#var-OE_TERMINAL'><filename>OE_TERMINAL</filename></ulink>
1867 controls what type of shell is opened.
1868 </para>
1869
1870 <para>
1871 For spawned terminals, the following occurs:
1872 <itemizedlist>
1873 <listitem><para>The <filename>PATH</filename> variable includes the
1874 cross-toolchain.</para></listitem>
1875 <listitem><para>The <filename>pkgconfig</filename> variables find the correct
1876 <filename>.pc</filename> files.</para></listitem>
1877 <listitem><para>The <filename>configure</filename> command finds the
1878 Yocto Project site files as well as any other necessary files.</para></listitem>
1879 </itemizedlist>
1880 </para>
1881
1882 <para>
1883 Within this environment, you can run configure or compile
1884 commands as if they were being run by
1885 the OpenEmbedded build system itself.
1886 As noted earlier, the working directory also automatically changes to the
1887 Source Directory (<ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>).
1888 </para>
1889
1890 <para>
1891 When you are finished, you just exit the shell or close the terminal window.
1892 </para>
1893
1894 <note>
1895 <para>
1896 It is worth remembering that when using <filename>devshell</filename>
1897 you need to use the full compiler name such as <filename>arm-poky-linux-gnueabi-gcc</filename>
1898 instead of just using <filename>gcc</filename>.
1899 The same applies to other applications such as <filename>binutils</filename>,
1900 <filename>libtool</filename> and so forth.
1901 BitBake sets up environment variables such as <filename>CC</filename>
1902 to assist applications, such as <filename>make</filename> to find the correct tools.
1903 </para>
1904
1905 <para>
1906 It is also worth noting that <filename>devshell</filename> still works over
1907 X11 forwarding and similar situations
1908 </para>
1909 </note>
1910</section>
1911
1912</chapter>
1913<!--
1914vim: expandtab tw=80 ts=4
1915-->
diff --git a/documentation/profile-manual/profile-manual-intro.xml b/documentation/profile-manual/profile-manual-intro.xml
new file mode 100644
index 0000000000..dca24602ed
--- /dev/null
+++ b/documentation/profile-manual/profile-manual-intro.xml
@@ -0,0 +1,190 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='dev-manual-intro'>
6
7<title>The Yocto Project Development Manual</title>
8 <section id='intro'>
9 <title>Introduction</title>
10
11 <para>
12 Welcome to the Yocto Project Development Manual!
13 This manual gives you an idea of how to use the Yocto Project to develop embedded Linux
14 images and user-space applications to run on targeted devices.
15 Reading this manual gives you an overview of image, kernel, and user-space application development
16 using the Yocto Project.
17 Because much of the information in this manual is general, it contains many references to other
18 sources where you can find more detail.
19 For example, detailed information on Git, repositories and open source in general
20 can be found in many places.
21 Another example is how to get set up to use the Yocto Project, which our Yocto Project
22 Quick Start covers.
23 </para>
24
25 <para>
26 The Yocto Project Development Manual, however, does provide detailed examples
27 on how to change the kernel source code, reconfigure the kernel, and develop
28 an application using the popular <trademark class='trade'>Eclipse</trademark> IDE.
29 </para>
30 </section>
31
32 <section id='what-this-manual-provides'>
33 <title>What this Manual Provides</title>
34
35 <para>
36 The following list describes what you can get from this guide:
37 <itemizedlist>
38 <listitem><para>Information that lets you get set
39 up to develop using the Yocto Project.</para></listitem>
40 <listitem><para>Information to help developers who are new to the open source environment
41 and to the distributed revision control system Git, which the Yocto Project
42 uses.</para></listitem>
43 <listitem><para>An understanding of common end-to-end development models and tasks.</para></listitem>
44 <listitem><para>Development case overviews for both system development and user-space
45 applications.</para></listitem>
46 <listitem><para>An overview and understanding of the emulation environment used with
47 the Yocto Project - the Quick EMUlator (QEMU).</para></listitem>
48 <listitem><para>An understanding of basic kernel architecture and concepts.</para></listitem>
49 <listitem><para>Many references to other sources of related information.</para></listitem>
50 </itemizedlist>
51 </para>
52 </section>
53
54 <section id='what-this-manual-does-not-provide'>
55 <title>What this Manual Does Not Provide</title>
56
57 <para>
58 This manual will not give you the following:
59 <itemizedlist>
60 <listitem><para>Step-by-step instructions if those instructions exist in other Yocto
61 Project documentation.
62 For example, the Yocto Project Application Developer's Guide contains detailed
63 instruction on how to run the
64 <ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>,
65 which is used to set up a cross-development environment.</para></listitem>
66 <listitem><para>Reference material.
67 This type of material resides in an appropriate reference manual.
68 For example, system variables are documented in the
69 <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>.</para></listitem>
70 <listitem><para>Detailed public information that is not specific to the Yocto Project.
71 For example, exhaustive information on how to use Git is covered better through the
72 Internet than in this manual.</para></listitem>
73 </itemizedlist>
74 </para>
75 </section>
76
77 <section id='other-information'>
78 <title>Other Information</title>
79
80 <para>
81 Because this manual presents overview information for many different topics, you will
82 need to supplement it with other information.
83 The following list presents other sources of information you might find helpful:
84 <itemizedlist>
85 <listitem><para><emphasis>The <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>:
86 </emphasis> The home page for the Yocto Project provides lots of information on the project
87 as well as links to software and documentation.</para></listitem>
88 <listitem><para><emphasis>
89 <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>:</emphasis> This short document lets you get started
90 with the Yocto Project quickly and start building an image.</para></listitem>
91 <listitem><para><emphasis>
92 <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>:</emphasis> This manual is a reference
93 guide to the OpenEmbedded build system known as "Poky."
94 The manual also contains a reference chapter on Board Support Package (BSP)
95 layout.</para></listitem>
96 <listitem><para><emphasis>
97 <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink>:</emphasis>
98 This guide provides information that lets you get going with the Application
99 Development Toolkit (ADT) and stand-alone cross-development toolchains to
100 develop projects using the Yocto Project.</para></listitem>
101 <listitem><para><emphasis>
102 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>:</emphasis>
103 This guide defines the structure for BSP components.
104 Having a commonly understood structure encourages standardization.</para></listitem>
105 <listitem><para><emphasis>
106 <ulink url='&YOCTO_DOCS_KERNEL_URL;'>Yocto Project Kernel Architecture and Use Manual</ulink>:</emphasis>
107 This manual describes the architecture of the Yocto Project kernel and provides
108 some work flow examples.</para></listitem>
109 <listitem><para><emphasis>
110 <ulink url='http://www.youtube.com/watch?v=3ZlOu-gLsh0'>
111 Eclipse IDE Yocto Plug-in</ulink>:</emphasis> A step-by-step instructional video that
112 demonstrates how an application developer uses Yocto Plug-in features within
113 the Eclipse IDE.</para></listitem>
114 <listitem><para><emphasis>
115 <ulink url='&YOCTO_WIKI_URL;/wiki/FAQ'>FAQ</ulink>:</emphasis>
116 A list of commonly asked questions and their answers.</para></listitem>
117 <listitem><para><emphasis>
118 <ulink url='&YOCTO_HOME_URL;/download/yocto/yocto-project-&DISTRO;-release-notes-poky-&POKYVERSION;'>
119 Release Notes</ulink>:</emphasis> Features, updates and known issues for the current
120 release of the Yocto Project.</para></listitem>
121 <listitem><para><emphasis>
122 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>
123 Hob</ulink>:</emphasis> A graphical user interface for BitBake.
124 Hob's primary goal is to enable a user to perform common tasks more easily.</para></listitem>
125 <listitem><para><emphasis>
126 <ulink url='&YOCTO_HOME_URL;/download/build-appliance-0'>
127 Build Appliance</ulink>:</emphasis> A bootable custom embedded Linux image you can
128 either build using a non-Linux development system (VMware applications) or download
129 from the Yocto Project website.
130 See the <ulink url='&YOCTO_HOME_URL;/documentation/build-appliance-manual'>Build Appliance</ulink>
131 page for more information.</para></listitem>
132 <listitem><para><emphasis>
133 <ulink url='&YOCTO_BUGZILLA_URL;'>Bugzilla</ulink>:</emphasis>
134 The bug tracking application the Yocto Project uses.
135 If you find problems with the Yocto Project, you should report them using this
136 application.</para></listitem>
137 <listitem><para><emphasis>
138 Yocto Project Mailing Lists:</emphasis> To subscribe to the Yocto Project mailing
139 lists, click on the following URLs and follow the instructions:
140 <itemizedlist>
141 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto'></ulink> for a
142 Yocto Project Discussions mailing list.</para></listitem>
143 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/poky'></ulink> for a
144 Yocto Project Discussions mailing list about the Poky build system.</para></listitem>
145 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto-announce'></ulink>
146 for a mailing list to receive official Yocto Project announcements for developments and
147 as well as Yocto Project milestones.</para></listitem>
148 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo'></ulink> for a
149 listing of all public mailing lists on <filename>lists.yoctoproject.org</filename>.
150 </para></listitem>
151 </itemizedlist></para></listitem>
152 <listitem><para><emphasis>Internet Relay Chat (IRC):</emphasis>
153 Two IRC channels on freenode are available
154 for Yocto Project and Poky discussions: <filename>#yocto</filename> and
155 <filename>#poky</filename>, respectively.</para></listitem>
156 <listitem><para><emphasis>
157 <ulink url='&OH_HOME_URL;'>OpenedHand</ulink>:</emphasis>
158 The company that initially developed the Poky project, which is the basis
159 for the OpenEmbedded build system used by the Yocto Project.
160 OpenedHand was acquired by Intel Corporation in 2008.</para></listitem>
161 <listitem><para><emphasis>
162 <ulink url='http://www.intel.com/'>Intel Corporation</ulink>:</emphasis>
163 A multinational semiconductor chip manufacturer company whose Software and
164 Services Group created and supports the Yocto Project.
165 Intel acquired OpenedHand in 2008.</para></listitem>
166 <listitem><para><emphasis>
167 <ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>:</emphasis>
168 The build system used by the Yocto Project.
169 This project is the upstream, generic, embedded distribution from which the Yocto
170 Project derives its build system (Poky) from and to which it contributes.</para></listitem>
171 <listitem><para><emphasis>
172 <ulink url='http://developer.berlios.de/projects/bitbake/'>
173 BitBake</ulink>:</emphasis> The tool used by the OpenEmbedded build system
174 to process project metadata.</para></listitem>
175 <listitem><para><emphasis>
176 BitBake User Manual:</emphasis>
177 A comprehensive guide to the BitBake tool.
178 If you want information on BitBake, see the user manual inculded in the
179 <filename>bitbake/doc/manual</filename> directory of the
180 <link linkend='source-directory'>Source Directory</link>.</para></listitem>
181 <listitem><para><emphasis>
182 <ulink url='http://wiki.qemu.org/Index.html'>Quick EMUlator (QEMU)</ulink>:
183 </emphasis> An open-source machine emulator and virtualizer.</para></listitem>
184 </itemizedlist>
185 </para>
186 </section>
187</chapter>
188<!--
189vim: expandtab tw=80 ts=4
190-->
diff --git a/documentation/profile-manual/profile-manual-style.css b/documentation/profile-manual/profile-manual-style.css
new file mode 100644
index 0000000000..23c8e74c1e
--- /dev/null
+++ b/documentation/profile-manual/profile-manual-style.css
@@ -0,0 +1,979 @@
1/*
2 Generic XHTML / DocBook XHTML CSS Stylesheet.
3
4 Browser wrangling and typographic design by
5 Oyvind Kolas / pippin@gimp.org
6
7 Customised for Poky by
8 Matthew Allum / mallum@o-hand.com
9
10 Thanks to:
11 Liam R. E. Quin
12 William Skaggs
13 Jakub Steiner
14
15 Structure
16 ---------
17
18 The stylesheet is divided into the following sections:
19
20 Positioning
21 Margins, paddings, width, font-size, clearing.
22 Decorations
23 Borders, style
24 Colors
25 Colors
26 Graphics
27 Graphical backgrounds
28 Nasty IE tweaks
29 Workarounds needed to make it work in internet explorer,
30 currently makes the stylesheet non validating, but up until
31 this point it is validating.
32 Mozilla extensions
33 Transparency for footer
34 Rounded corners on boxes
35
36*/
37
38
39 /*************** /
40 / Positioning /
41/ ***************/
42
43body {
44 font-family: Verdana, Sans, sans-serif;
45
46 min-width: 640px;
47 width: 80%;
48 margin: 0em auto;
49 padding: 2em 5em 5em 5em;
50 color: #333;
51}
52
53h1,h2,h3,h4,h5,h6,h7 {
54 font-family: Arial, Sans;
55 color: #00557D;
56 clear: both;
57}
58
59h1 {
60 font-size: 2em;
61 text-align: left;
62 padding: 0em 0em 0em 0em;
63 margin: 2em 0em 0em 0em;
64}
65
66h2.subtitle {
67 margin: 0.10em 0em 3.0em 0em;
68 padding: 0em 0em 0em 0em;
69 font-size: 1.8em;
70 padding-left: 20%;
71 font-weight: normal;
72 font-style: italic;
73}
74
75h2 {
76 margin: 2em 0em 0.66em 0em;
77 padding: 0.5em 0em 0em 0em;
78 font-size: 1.5em;
79 font-weight: bold;
80}
81
82h3.subtitle {
83 margin: 0em 0em 1em 0em;
84 padding: 0em 0em 0em 0em;
85 font-size: 142.14%;
86 text-align: right;
87}
88
89h3 {
90 margin: 1em 0em 0.5em 0em;
91 padding: 1em 0em 0em 0em;
92 font-size: 140%;
93 font-weight: bold;
94}
95
96h4 {
97 margin: 1em 0em 0.5em 0em;
98 padding: 1em 0em 0em 0em;
99 font-size: 120%;
100 font-weight: bold;
101}
102
103h5 {
104 margin: 1em 0em 0.5em 0em;
105 padding: 1em 0em 0em 0em;
106 font-size: 110%;
107 font-weight: bold;
108}
109
110h6 {
111 margin: 1em 0em 0em 0em;
112 padding: 1em 0em 0em 0em;
113 font-size: 110%;
114 font-weight: bold;
115}
116
117.authorgroup {
118 background-color: transparent;
119 background-repeat: no-repeat;
120 padding-top: 256px;
121 background-image: url("figures/dev-title.png");
122 background-position: left top;
123 margin-top: -256px;
124 padding-right: 50px;
125 margin-left: 0px;
126 text-align: right;
127 width: 740px;
128}
129
130h3.author {
131 margin: 0em 0me 0em 0em;
132 padding: 0em 0em 0em 0em;
133 font-weight: normal;
134 font-size: 100%;
135 color: #333;
136 clear: both;
137}
138
139.author tt.email {
140 font-size: 66%;
141}
142
143.titlepage hr {
144 width: 0em;
145 clear: both;
146}
147
148.revhistory {
149 padding-top: 2em;
150 clear: both;
151}
152
153.toc,
154.list-of-tables,
155.list-of-examples,
156.list-of-figures {
157 padding: 1.33em 0em 2.5em 0em;
158 color: #00557D;
159}
160
161.toc p,
162.list-of-tables p,
163.list-of-figures p,
164.list-of-examples p {
165 padding: 0em 0em 0em 0em;
166 padding: 0em 0em 0.3em;
167 margin: 1.5em 0em 0em 0em;
168}
169
170.toc p b,
171.list-of-tables p b,
172.list-of-figures p b,
173.list-of-examples p b{
174 font-size: 100.0%;
175 font-weight: bold;
176}
177
178.toc dl,
179.list-of-tables dl,
180.list-of-figures dl,
181.list-of-examples dl {
182 margin: 0em 0em 0.5em 0em;
183 padding: 0em 0em 0em 0em;
184}
185
186.toc dt {
187 margin: 0em 0em 0em 0em;
188 padding: 0em 0em 0em 0em;
189}
190
191.toc dd {
192 margin: 0em 0em 0em 2.6em;
193 padding: 0em 0em 0em 0em;
194}
195
196div.glossary dl,
197div.variablelist dl {
198}
199
200.glossary dl dt,
201.variablelist dl dt,
202.variablelist dl dt span.term {
203 font-weight: normal;
204 width: 20em;
205 text-align: right;
206}
207
208.variablelist dl dt {
209 margin-top: 0.5em;
210}
211
212.glossary dl dd,
213.variablelist dl dd {
214 margin-top: -1em;
215 margin-left: 25.5em;
216}
217
218.glossary dd p,
219.variablelist dd p {
220 margin-top: 0em;
221 margin-bottom: 1em;
222}
223
224
225div.calloutlist table td {
226 padding: 0em 0em 0em 0em;
227 margin: 0em 0em 0em 0em;
228}
229
230div.calloutlist table td p {
231 margin-top: 0em;
232 margin-bottom: 1em;
233}
234
235div p.copyright {
236 text-align: left;
237}
238
239div.legalnotice p.legalnotice-title {
240 margin-bottom: 0em;
241}
242
243p {
244 line-height: 1.5em;
245 margin-top: 0em;
246
247}
248
249dl {
250 padding-top: 0em;
251}
252
253hr {
254 border: solid 1px;
255}
256
257
258.mediaobject,
259.mediaobjectco {
260 text-align: center;
261}
262
263img {
264 border: none;
265}
266
267ul {
268 padding: 0em 0em 0em 1.5em;
269}
270
271ul li {
272 padding: 0em 0em 0em 0em;
273}
274
275ul li p {
276 text-align: left;
277}
278
279table {
280 width :100%;
281}
282
283th {
284 padding: 0.25em;
285 text-align: left;
286 font-weight: normal;
287 vertical-align: top;
288}
289
290td {
291 padding: 0.25em;
292 vertical-align: top;
293}
294
295p a[id] {
296 margin: 0px;
297 padding: 0px;
298 display: inline;
299 background-image: none;
300}
301
302a {
303 text-decoration: underline;
304 color: #444;
305}
306
307pre {
308 overflow: auto;
309}
310
311a:hover {
312 text-decoration: underline;
313 /*font-weight: bold;*/
314}
315
316
317div.informalfigure,
318div.informalexample,
319div.informaltable,
320div.figure,
321div.table,
322div.example {
323 margin: 1em 0em;
324 padding: 1em;
325 page-break-inside: avoid;
326}
327
328
329div.informalfigure p.title b,
330div.informalexample p.title b,
331div.informaltable p.title b,
332div.figure p.title b,
333div.example p.title b,
334div.table p.title b{
335 padding-top: 0em;
336 margin-top: 0em;
337 font-size: 100%;
338 font-weight: normal;
339}
340
341.mediaobject .caption,
342.mediaobject .caption p {
343 text-align: center;
344 font-size: 80%;
345 padding-top: 0.5em;
346 padding-bottom: 0.5em;
347}
348
349.epigraph {
350 padding-left: 55%;
351 margin-bottom: 1em;
352}
353
354.epigraph p {
355 text-align: left;
356}
357
358.epigraph .quote {
359 font-style: italic;
360}
361.epigraph .attribution {
362 font-style: normal;
363 text-align: right;
364}
365
366span.application {
367 font-style: italic;
368}
369
370.programlisting {
371 font-family: monospace;
372 font-size: 80%;
373 white-space: pre;
374 margin: 1.33em 0em;
375 padding: 1.33em;
376}
377
378.tip,
379.warning,
380.caution,
381.note {
382 margin-top: 1em;
383 margin-bottom: 1em;
384
385}
386
387/* force full width of table within div */
388.tip table,
389.warning table,
390.caution table,
391.note table {
392 border: none;
393 width: 100%;
394}
395
396
397.tip table th,
398.warning table th,
399.caution table th,
400.note table th {
401 padding: 0.8em 0.0em 0.0em 0.0em;
402 margin : 0em 0em 0em 0em;
403}
404
405.tip p,
406.warning p,
407.caution p,
408.note p {
409 margin-top: 0.5em;
410 margin-bottom: 0.5em;
411 padding-right: 1em;
412 text-align: left;
413}
414
415.acronym {
416 text-transform: uppercase;
417}
418
419b.keycap,
420.keycap {
421 padding: 0.09em 0.3em;
422 margin: 0em;
423}
424
425.itemizedlist li {
426 clear: none;
427}
428
429.filename {
430 font-size: medium;
431 font-family: Courier, monospace;
432}
433
434
435div.navheader, div.heading{
436 position: absolute;
437 left: 0em;
438 top: 0em;
439 width: 100%;
440 background-color: #cdf;
441 width: 100%;
442}
443
444div.navfooter, div.footing{
445 position: fixed;
446 left: 0em;
447 bottom: 0em;
448 background-color: #eee;
449 width: 100%;
450}
451
452
453div.navheader td,
454div.navfooter td {
455 font-size: 66%;
456}
457
458div.navheader table th {
459 /*font-family: Georgia, Times, serif;*/
460 /*font-size: x-large;*/
461 font-size: 80%;
462}
463
464div.navheader table {
465 border-left: 0em;
466 border-right: 0em;
467 border-top: 0em;
468 width: 100%;
469}
470
471div.navfooter table {
472 border-left: 0em;
473 border-right: 0em;
474 border-bottom: 0em;
475 width: 100%;
476}
477
478div.navheader table td a,
479div.navfooter table td a {
480 color: #777;
481 text-decoration: none;
482}
483
484/* normal text in the footer */
485div.navfooter table td {
486 color: black;
487}
488
489div.navheader table td a:visited,
490div.navfooter table td a:visited {
491 color: #444;
492}
493
494
495/* links in header and footer */
496div.navheader table td a:hover,
497div.navfooter table td a:hover {
498 text-decoration: underline;
499 background-color: transparent;
500 color: #33a;
501}
502
503div.navheader hr,
504div.navfooter hr {
505 display: none;
506}
507
508
509.qandaset tr.question td p {
510 margin: 0em 0em 1em 0em;
511 padding: 0em 0em 0em 0em;
512}
513
514.qandaset tr.answer td p {
515 margin: 0em 0em 1em 0em;
516 padding: 0em 0em 0em 0em;
517}
518.answer td {
519 padding-bottom: 1.5em;
520}
521
522.emphasis {
523 font-weight: bold;
524}
525
526
527 /************* /
528 / decorations /
529/ *************/
530
531.titlepage {
532}
533
534.part .title {
535}
536
537.subtitle {
538 border: none;
539}
540
541/*
542h1 {
543 border: none;
544}
545
546h2 {
547 border-top: solid 0.2em;
548 border-bottom: solid 0.06em;
549}
550
551h3 {
552 border-top: 0em;
553 border-bottom: solid 0.06em;
554}
555
556h4 {
557 border: 0em;
558 border-bottom: solid 0.06em;
559}
560
561h5 {
562 border: 0em;
563}
564*/
565
566.programlisting {
567 border: solid 1px;
568}
569
570div.figure,
571div.table,
572div.informalfigure,
573div.informaltable,
574div.informalexample,
575div.example {
576 border: 1px solid;
577}
578
579
580
581.tip,
582.warning,
583.caution,
584.note {
585 border: 1px solid;
586}
587
588.tip table th,
589.warning table th,
590.caution table th,
591.note table th {
592 border-bottom: 1px solid;
593}
594
595.question td {
596 border-top: 1px solid black;
597}
598
599.answer {
600}
601
602
603b.keycap,
604.keycap {
605 border: 1px solid;
606}
607
608
609div.navheader, div.heading{
610 border-bottom: 1px solid;
611}
612
613
614div.navfooter, div.footing{
615 border-top: 1px solid;
616}
617
618 /********* /
619 / colors /
620/ *********/
621
622body {
623 color: #333;
624 background: white;
625}
626
627a {
628 background: transparent;
629}
630
631a:hover {
632 background-color: #dedede;
633}
634
635
636h1,
637h2,
638h3,
639h4,
640h5,
641h6,
642h7,
643h8 {
644 background-color: transparent;
645}
646
647hr {
648 border-color: #aaa;
649}
650
651
652.tip, .warning, .caution, .note {
653 border-color: #fff;
654}
655
656
657.tip table th,
658.warning table th,
659.caution table th,
660.note table th {
661 border-bottom-color: #fff;
662}
663
664
665.warning {
666 background-color: #f0f0f2;
667}
668
669.caution {
670 background-color: #f0f0f2;
671}
672
673.tip {
674 background-color: #f0f0f2;
675}
676
677.note {
678 background-color: #f0f0f2;
679}
680
681.glossary dl dt,
682.variablelist dl dt,
683.variablelist dl dt span.term {
684 color: #044;
685}
686
687div.figure,
688div.table,
689div.example,
690div.informalfigure,
691div.informaltable,
692div.informalexample {
693 border-color: #aaa;
694}
695
696pre.programlisting {
697 color: black;
698 background-color: #fff;
699 border-color: #aaa;
700 border-width: 2px;
701}
702
703.guimenu,
704.guilabel,
705.guimenuitem {
706 background-color: #eee;
707}
708
709
710b.keycap,
711.keycap {
712 background-color: #eee;
713 border-color: #999;
714}
715
716
717div.navheader {
718 border-color: black;
719}
720
721
722div.navfooter {
723 border-color: black;
724}
725
726
727 /*********** /
728 / graphics /
729/ ***********/
730
731/*
732body {
733 background-image: url("images/body_bg.jpg");
734 background-attachment: fixed;
735}
736
737.navheader,
738.note,
739.tip {
740 background-image: url("images/note_bg.jpg");
741 background-attachment: fixed;
742}
743
744.warning,
745.caution {
746 background-image: url("images/warning_bg.jpg");
747 background-attachment: fixed;
748}
749
750.figure,
751.informalfigure,
752.example,
753.informalexample,
754.table,
755.informaltable {
756 background-image: url("images/figure_bg.jpg");
757 background-attachment: fixed;
758}
759
760*/
761h1,
762h2,
763h3,
764h4,
765h5,
766h6,
767h7{
768}
769
770/*
771Example of how to stick an image as part of the title.
772
773div.article .titlepage .title
774{
775 background-image: url("figures/white-on-black.png");
776 background-position: center;
777 background-repeat: repeat-x;
778}
779*/
780
781div.preface .titlepage .title,
782div.colophon .title,
783div.chapter .titlepage .title,
784div.article .titlepage .title
785{
786}
787
788div.section div.section .titlepage .title,
789div.sect2 .titlepage .title {
790 background: none;
791}
792
793
794h1.title {
795 background-color: transparent;
796 background-image: url("figures/yocto-project-bw.png");
797 background-repeat: no-repeat;
798 height: 256px;
799 text-indent: -9000px;
800 overflow:hidden;
801}
802
803h2.subtitle {
804 background-color: transparent;
805 text-indent: -9000px;
806 overflow:hidden;
807 width: 0px;
808 display: none;
809}
810
811 /*************************************** /
812 / pippin.gimp.org specific alterations /
813/ ***************************************/
814
815/*
816div.heading, div.navheader {
817 color: #777;
818 font-size: 80%;
819 padding: 0;
820 margin: 0;
821 text-align: left;
822 position: absolute;
823 top: 0px;
824 left: 0px;
825 width: 100%;
826 height: 50px;
827 background: url('/gfx/heading_bg.png') transparent;
828 background-repeat: repeat-x;
829 background-attachment: fixed;
830 border: none;
831}
832
833div.heading a {
834 color: #444;
835}
836
837div.footing, div.navfooter {
838 border: none;
839 color: #ddd;
840 font-size: 80%;
841 text-align:right;
842
843 width: 100%;
844 padding-top: 10px;
845 position: absolute;
846 bottom: 0px;
847 left: 0px;
848
849 background: url('/gfx/footing_bg.png') transparent;
850}
851*/
852
853
854
855 /****************** /
856 / nasty ie tweaks /
857/ ******************/
858
859/*
860div.heading, div.navheader {
861 width:expression(document.body.clientWidth + "px");
862}
863
864div.footing, div.navfooter {
865 width:expression(document.body.clientWidth + "px");
866 margin-left:expression("-5em");
867}
868body {
869 padding:expression("4em 5em 0em 5em");
870}
871*/
872
873 /**************************************** /
874 / mozilla vendor specific css extensions /
875/ ****************************************/
876/*
877div.navfooter, div.footing{
878 -moz-opacity: 0.8em;
879}
880
881div.figure,
882div.table,
883div.informalfigure,
884div.informaltable,
885div.informalexample,
886div.example,
887.tip,
888.warning,
889.caution,
890.note {
891 -moz-border-radius: 0.5em;
892}
893
894b.keycap,
895.keycap {
896 -moz-border-radius: 0.3em;
897}
898*/
899
900table tr td table tr td {
901 display: none;
902}
903
904
905hr {
906 display: none;
907}
908
909table {
910 border: 0em;
911}
912
913 .photo {
914 float: right;
915 margin-left: 1.5em;
916 margin-bottom: 1.5em;
917 margin-top: 0em;
918 max-width: 17em;
919 border: 1px solid gray;
920 padding: 3px;
921 background: white;
922}
923 .seperator {
924 padding-top: 2em;
925 clear: both;
926 }
927
928 #validators {
929 margin-top: 5em;
930 text-align: right;
931 color: #777;
932 }
933 @media print {
934 body {
935 font-size: 8pt;
936 }
937 .noprint {
938 display: none;
939 }
940 }
941
942
943.tip,
944.note {
945 background: #f0f0f2;
946 color: #333;
947 padding: 20px;
948 margin: 20px;
949}
950
951.tip h3,
952.note h3 {
953 padding: 0em;
954 margin: 0em;
955 font-size: 2em;
956 font-weight: bold;
957 color: #333;
958}
959
960.tip a,
961.note a {
962 color: #333;
963 text-decoration: underline;
964}
965
966.footnote {
967 font-size: small;
968 color: #333;
969}
970
971/* Changes the announcement text */
972.tip h3,
973.warning h3,
974.caution h3,
975.note h3 {
976 font-size:large;
977 color: #00557D;
978}
979
diff --git a/documentation/profile-manual/profile-manual-usage.xml b/documentation/profile-manual/profile-manual-usage.xml
new file mode 100644
index 0000000000..65e17e24a0
--- /dev/null
+++ b/documentation/profile-manual/profile-manual-usage.xml
@@ -0,0 +1,1218 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='dev-manual-newbie'>
6
7<title>The Yocto Project Open Source Development Environment</title>
8
9<para>
10 This chapter helps you understand the Yocto Project as an open source development project.
11 In general, working in an open source environment is very different from working in a
12 closed, proprietary environment.
13 Additionally, the Yocto Project uses specific tools and constructs as part of its development
14 environment.
15 This chapter specifically addresses open source philosophy, licensing issues, code repositories,
16 the open source distributed version control system Git, and best practices using the Yocto Project.
17</para>
18
19<section id='open-source-philosophy'>
20 <title>Open Source Philosophy</title>
21
22 <para>
23 Open source philosophy is characterized by software development directed by peer production
24 and collaboration through an active community of developers.
25 Contrast this to the more standard centralized development models used by commercial software
26 companies where a finite set of developers produces a product for sale using a defined set
27 of procedures that ultimately result in an end product whose architecture and source material
28 are closed to the public.
29 </para>
30
31 <para>
32 Open source projects conceptually have differing concurrent agendas, approaches, and production.
33 These facets of the development process can come from anyone in the public (community) that has a
34 stake in the software project.
35 The open source environment contains new copyright, licensing, domain, and consumer issues
36 that differ from the more traditional development environment.
37 In an open source environment, the end product, source material, and documentation are
38 all available to the public at no cost.
39 </para>
40
41 <para>
42 A benchmark example of an open source project is the Linux Kernel, which was initially conceived
43 and created by Finnish computer science student Linus Torvalds in 1991.
44 Conversely, a good example of a non-open source project is the
45 <trademark class='registered'>Windows</trademark> family of operating
46 systems developed by <trademark class='registered'>Microsoft</trademark> Corporation.
47 </para>
48
49 <para>
50 Wikipedia has a good historical description of the Open Source Philosophy
51 <ulink url='http://en.wikipedia.org/wiki/Open_source'>here</ulink>.
52 You can also find helpful information on how to participate in the Linux Community
53 <ulink url='http://ldn.linuxfoundation.org/book/how-participate-linux-community'>here</ulink>.
54 </para>
55</section>
56
57<section id="usingpoky-changes-collaborate">
58 <title>Using the Yocto Project in a Team Environment</title>
59
60 <para>
61 It might not be immediately clear how you can use the Yocto Project in a team environment,
62 or scale it for a large team of developers.
63 The specifics of any situation determine the best solution.
64 Granted that the Yocto Project offers immense flexibility regarding this, practices do exist
65 that experience has shown work well.
66 </para>
67
68 <para>
69 The core component of any development effort with the Yocto Project is often an
70 automated build and testing framework along with an image generation process.
71 You can use these core components to check that the metadata can be built,
72 highlight when commits break the build, and provide up-to-date images that
73 allow developers to test the end result and use it as a base platform for further
74 development.
75 Experience shows that buildbot is a good fit for this role.
76 What works well is to configure buildbot to make two types of builds:
77 incremental and full (from scratch).
78 See "<ulink url='http://autobuilder.yoctoproject.org:8010/'>Welcome to the buildbot for the Yocto Project</ulink>"
79 for an example implementation that uses buildbot.
80 </para>
81
82 <para>
83 You can tie an incremental build to a commit hook that triggers the build
84 each time a commit is made to the metadata.
85 This practice results in useful acid tests that determine whether a given commit
86 breaks the build in some serious way.
87 Associating a build to a commit can catch a lot of simple errors.
88 Furthermore, the tests are fast so developers can get quick feedback on changes.
89 </para>
90
91 <para>
92 Full builds build and test everything from the ground up.
93 These types of builds usually happen at predetermined times like during the
94 night when the machine load is low.
95 </para>
96
97 <para>
98 Most teams have many pieces of software undergoing active development at any given time.
99 You can derive large benefits by putting these pieces under the control of a source
100 control system that is compatible (i.e. Git or Subversion (SVN)) with the OpenEmbedded
101 build system that the Yocto Project uses.
102 You can then set the autobuilder to pull the latest revisions of the packages
103 and test the latest commits by the builds.
104 This practice quickly highlights issues.
105 The build system easily supports testing configurations that use both a
106 stable known good revision and a floating revision.
107 The build system can also take just the changes from specific source control branches.
108 This capability allows you to track and test specific changes.
109 </para>
110
111 <para>
112 Perhaps the hardest part of setting this up is defining the software project or
113 the metadata policies that surround the different source control systems.
114 Of course circumstances will be different in each case.
115 However, this situation reveals one of the Yocto Project's advantages -
116 the system itself does not
117 force any particular policy on users, unlike a lot of build systems.
118 The system allows the best policies to be chosen for the given circumstances.
119 </para>
120
121 <para>
122 In general, best practices exist that make your work with the Yocto
123 Project easier in a team environment.
124 This list presents some of these practices you might consider following.
125 Of course, you need to understand that you do not have to follow these
126 practices and your setup can be totally controlled and customized by
127 your team:
128 <itemizedlist>
129 <listitem><para>Use <link linkend='git'>Git</link>
130 as the source control system.</para></listitem>
131 <listitem><para>Maintain your metadata in layers that make sense
132 for your situation.
133 See the "<link linkend='understanding-and-creating-layers'>Understanding
134 and Creating Layers</link>" section for more information on
135 layers.</para></listitem>
136 <listitem><para>Separate the project's metadata and code by using
137 separate Git repositories.
138 See the "<link linkend='yocto-project-repositories'>Yocto Project
139 Source Repositories</link>" section for information on these
140 repositories.
141 See the "<link linkend='getting-setup'>Getting Set Up</link>" section
142 for information on how to set up various Yocto Project related
143 Git repositories.</para></listitem>
144 <listitem><para>Set up the directory for the shared state cache
145 (<ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>)
146 where they make sense.
147 For example, set up the sstate cache for developers using the
148 same office and share source directories on the developer's
149 machines.</para></listitem>
150 <listitem><para>Set up an autobuilder and have it populate the
151 sstate cache and source directories.</para></listitem>
152 </itemizedlist>
153 </para>
154</section>
155
156<section id='yocto-project-repositories'>
157 <title>Yocto Project Source Repositories</title>
158
159 <para>
160 The Yocto Project team maintains complete source repositories for all Yocto Project files
161 at <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'></ulink>.
162 This web-based source code browser is organized into categories by function such as
163 IDE Plugins, Matchbox, Poky, Yocto Linux Kernel, and so forth.
164 From the interface, you can click on any particular item in the "Name" column and
165 see the URL at the bottom of the page that you need to set up a Git repository for
166 that particular item.
167 Having a local Git repository of the Source Directory (poky) allows you to
168 make changes, contribute to the history, and ultimately enhance the Yocto Project's
169 tools, Board Support Packages, and so forth.
170 </para>
171
172 <para>
173 Conversely, if you are a developer that is not interested in contributing back to the
174 Yocto Project, you have the ability to simply download and extract release tarballs
175 and use them within the Yocto Project environment.
176 All that is required is a particular release of the Yocto Project and
177 your application source code.
178 </para>
179
180 <para>
181 For any supported release of Yocto Project, you can go to the Yocto Project website’s
182 <ulink url='&YOCTO_HOME_URL;/download'>download page</ulink> and get a
183 tarball of the release.
184 You can also go to this site to download any supported BSP tarballs.
185 Unpacking the tarball gives you a hierarchical Source Directory that lets you develop
186 using the Yocto Project.
187 </para>
188
189 <para>
190 Once you are set up through either tarball extraction or a checkout of Git repositories,
191 you are ready to develop.
192 </para>
193
194 <para>
195 In summary, here is where you can get the project files needed for development:
196 <itemizedlist>
197 <listitem><para id='source-repositories'><emphasis><ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'>Source Repositories:</ulink></emphasis>
198 This area contains IDE Plugins, Matchbox, Poky, Poky Support, Tools, Yocto Linux Kernel, and Yocto
199 Metadata Layers.
200 You can create local copies of Git repositories for each of these areas.</para>
201 <para>
202 <imagedata fileref="figures/source-repos.png" align="center" width="6in" depth="4in" />
203 </para></listitem>
204 <listitem><para><anchor id='index-downloads' /><emphasis><ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink></emphasis>
205 This area contains index releases such as
206 the <trademark class='trade'>Eclipse</trademark>
207 Yocto Plug-in, miscellaneous support, poky, pseudo, installers for cross-development toolchains,
208 and all released versions of Yocto Project in the form of images or tarballs.
209 Downloading and extracting these files does not produce a local copy of the
210 Git repository but rather a snapshot of a particular release or image.</para>
211 <para>
212 <imagedata fileref="figures/index-downloads.png" align="center" width="6in" depth="4in" />
213 </para></listitem>
214 <listitem><para><emphasis><ulink url='&YOCTO_HOME_URL;/download'>Yocto Project Download Page</ulink></emphasis>
215 This page on the Yocto Project website allows you to download any Yocto Project
216 release or Board Support Package (BSP) in tarball form.
217 The tarballs are similar to those found in the
218 <ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink> area.</para>
219 <para>
220 <imagedata fileref="figures/yp-download.png" align="center" width="6in" depth="4in" />
221 </para></listitem>
222 </itemizedlist>
223 </para>
224</section>
225
226<section id='yocto-project-terms'>
227 <title>Yocto Project Terms</title>
228
229 <para>
230 Following is a list of terms and definitions users new to the Yocto Project development
231 environment might find helpful.
232 While some of these terms are universal, the list includes them just in case:
233 <itemizedlist>
234 <listitem><para><emphasis>Append Files:</emphasis> Files that append build information to
235 a recipe file.
236 Append files are known as BitBake append files and <filename>.bbappend</filename> files.
237 The OpenEmbedded build system expects every append file to have a corresponding and
238 underlying recipe (<filename>.bb</filename>) file.
239 Furthermore, the append file and the underlying recipe must have the same root filename.
240 The filenames can differ only in the file type suffix used (e.g.
241 <filename>formfactor_0.0.bb</filename> and <filename>formfactor_0.0.bbappend</filename>).
242 </para>
243 <para>Information in append files overrides the information in the similarly-named recipe file.
244 For an example of an append file in use, see the
245 "<link linkend='using-bbappend-files'>Using .bbappend Files</link>" section.
246 </para></listitem>
247 <listitem><para id='bitbake-term'><emphasis>BitBake:</emphasis>
248 The task executor and scheduler used by
249 the OpenEmbedded build system to build images.
250 For more information on BitBake, see the BitBake documentation
251 in the <filename>bitbake/doc/manual</filename> directory of the
252 <link linkend='source-directory'>Source Directory</link>.</para></listitem>
253 <listitem>
254 <para id='build-directory'><emphasis>Build Directory:</emphasis>
255 This term refers to the area used by the OpenEmbedded build system for builds.
256 The area is created when you <filename>source</filename> the setup
257 environment script that is found in the Source Directory
258 (i.e. <filename>&OE_INIT_FILE;</filename>).
259 The <ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink>
260 variable points to the Build Directory.</para>
261
262 <para>You have a lot of flexibility when creating the Build Directory.
263 Following are some examples that show how to create the directory:
264 <itemizedlist>
265 <listitem><para>Create the Build Directory in your current working directory
266 and name it <filename>build</filename>.
267 This is the default behavior.
268 <literallayout class='monospaced'>
269 $ source &OE_INIT_PATH;
270 </literallayout></para></listitem>
271 <listitem><para>Provide a directory path and specifically name the build
272 directory.
273 This next example creates a Build Directory named <filename>YP-&POKYVERSION;</filename>
274 in your home directory within the directory <filename>mybuilds</filename>.
275 If <filename>mybuilds</filename> does not exist, the directory is created for you:
276 <literallayout class='monospaced'>
277 $ source &OE_INIT_PATH; $HOME/mybuilds/YP-&POKYVERSION;
278 </literallayout></para></listitem>
279 <listitem><para>Provide an existing directory to use as the Build Directory.
280 This example uses the existing <filename>mybuilds</filename> directory
281 as the Build Directory.
282 <literallayout class='monospaced'>
283 $ source &OE_INIT_PATH; $HOME/mybuilds/
284 </literallayout></para></listitem>
285 </itemizedlist>
286 </para></listitem>
287 <listitem><para><emphasis>Build System:</emphasis> In the context of the Yocto Project
288 this term refers to the OpenEmbedded build system used by the project.
289 This build system is based on the project known as "Poky."
290 For some historical information about Poky, see the
291 <link linkend='poky'>Poky</link> term further along in this section.
292 </para></listitem>
293 <listitem><para><emphasis>Classes:</emphasis> Files that provide for logic encapsulation
294 and inheritance allowing commonly used patterns to be defined once and easily used
295 in multiple recipes.
296 Class files end with the <filename>.bbclass</filename> filename extension.
297 </para></listitem>
298 <listitem><para><emphasis>Configuration File:</emphasis> Configuration information in various
299 <filename>.conf</filename> files provides global definitions of variables.
300 The <filename>conf/local.conf</filename> configuration file in the
301 <link linkend='build-directory'>Build Directory</link>
302 contains user-defined variables that affect each build.
303 The <filename>meta-yocto/conf/distro/poky.conf</filename> configuration file
304 defines Yocto ‘distro’ configuration
305 variables used only when building with this policy.
306 Machine configuration files, which
307 are located throughout the
308 <link linkend='source-directory'>Source Directory</link>, define
309 variables for specific hardware and are only used when building for that target
310 (e.g. the <filename>machine/beagleboard.conf</filename> configuration file defines
311 variables for the Texas Instruments ARM Cortex-A8 development board).
312 Configuration files end with a <filename>.conf</filename> filename extension.
313 </para></listitem>
314 <listitem><para><emphasis>Cross-Development Toolchain:</emphasis>
315 A collection of software development
316 tools and utilities that allow you to develop software for targeted architectures.
317 This toolchain contains cross-compilers, linkers, and debuggers that are specific to
318 an architecture.
319 You can use the OpenEmbedded build system to build a cross-development toolchain
320 installer that when run installs the toolchain that contains the development tools you
321 need to cross-compile and test your software.
322 The Yocto Project ships with images that contain installers for
323 toolchains for supported architectures as well.
324 Sometimes this toolchain is referred to as the meta-toolchain.</para></listitem>
325 <listitem><para><emphasis>Image:</emphasis> An image is the result produced when
326 BitBake processes a given collection of recipes and related metadata.
327 Images are the binary output that run on specific hardware or QEMU
328 and for specific use cases.
329 For a list of the supported image types that the Yocto Project provides, see the
330 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
331 chapter in the Yocto Project Reference Manual.</para></listitem>
332 <listitem><para id='layer'><emphasis>Layer:</emphasis> A collection of recipes representing the core,
333 a BSP, or an application stack.
334 For a discussion on BSP Layers, see the
335 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
336 section in the Yocto Project Board Support Packages (BSP) Developer's Guide.</para></listitem>
337 <listitem><para id='metadata'><emphasis>Metadata:</emphasis> The files that BitBake parses when
338 building an image.
339 Metadata includes recipes, classes, and configuration files.</para></listitem>
340 <listitem><para id='oe-core'><emphasis>OE-Core:</emphasis> A core set of metadata originating
341 with OpenEmbedded (OE) that is shared between OE and the Yocto Project.
342 This metadata is found in the <filename>meta</filename> directory of the source
343 directory.</para></listitem>
344 <listitem><para><emphasis>Package:</emphasis> In the context of the Yocto Project,
345 this term refers to the packaged output from a baked recipe.
346 A package is generally the compiled binaries produced from the recipe's sources.
347 You ‘bake’ something by running it through BitBake.</para>
348 <para>It is worth noting that the term "package" can, in general, have subtle
349 meanings. For example, the packages refered to in the
350 "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>" section are
351 compiled binaries that when installed add functionality to your Linux
352 distribution.</para>
353 <para>Another point worth noting is that historically within the Yocto Project,
354 recipes were referred to as packages - thus, the existence of several BitBake
355 variables that are seemingly mis-named,
356 (e.g. <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>,
357 <ulink url='&YOCTO_DOCS_REF_URL;#var-PRINC'><filename>PRINC</filename></ulink>,
358 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>, and
359 <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>).
360 </para></listitem>
361 <listitem><para id='poky'><emphasis>Poky:</emphasis> The term "poky" can mean several things.
362 In its most general sense, it is an open-source project that was initially developed
363 by OpenedHand. With OpenedHand, poky was developed off of the existing OpenEmbedded
364 build system becoming a build system for embedded images.
365 After Intel Corporation acquired OpenedHand, the project poky became the basis for
366 the Yocto Project's build system.
367 Within the Yocto Project source repositories, poky exists as a separate Git repository
368 that can be cloned to yield a local copy on the host system.
369 Thus, "poky" can refer to the local copy of the Source Directory used to develop within
370 the Yocto Project.</para></listitem>
371 <listitem><para><emphasis>Recipe:</emphasis> A set of instructions for building packages.
372 A recipe describes where you get source code and which patches to apply.
373 Recipes describe dependencies for libraries or for other recipes, and they
374 also contain configuration and compilation options.
375 Recipes contain the logical unit of execution, the software/images to build, and
376 use the <filename>.bb</filename> file extension.</para></listitem>
377 <listitem>
378 <para id='source-directory'><emphasis>Source Directory:</emphasis>
379 This term refers to the directory structure created as a result of either downloading
380 and unpacking a Yocto Project release tarball or creating a local copy of
381 the <filename>poky</filename> Git repository
382 <filename>git://git.yoctoproject.org/poky</filename>.
383 Sometimes you might hear the term "poky directory" used to refer to this
384 directory structure.
385 <note>
386 The OpenEmbedded build system does not support file or directory names that
387 contain spaces.
388 Be sure that the Source Directory you use does not contain these types
389 of names.
390 </note></para>
391 <para>The Source Directory contains BitBake, Documentation, metadata and
392 other files that all support the Yocto Project.
393 Consequently, you must have the Source Directory in place on your development
394 system in order to do any development using the Yocto Project.</para>
395
396 <para>For tarball expansion, the name of the top-level directory of the Source Directory
397 is derived from the Yocto Project release tarball.
398 For example, downloading and unpacking <filename>&YOCTO_POKY_TARBALL;</filename>
399 results in a Source Directory whose top-level folder is named
400 <filename>&YOCTO_POKY;</filename>.
401 If you create a local copy of the Git repository, then you can name the repository
402 anything you like.
403 Throughout much of the documentation, <filename>poky</filename> is used as the name of
404 the top-level folder of the local copy of the poky Git repository.
405 So, for example, cloning the <filename>poky</filename> Git repository results in a
406 local Git repository whose top-level folder is also named <filename>poky</filename>.</para>
407
408 <para>It is important to understand the differences between the Source Directory created
409 by unpacking a released tarball as compared to cloning
410 <filename>git://git.yoctoproject.org/poky</filename>.
411 When you unpack a tarball, you have an exact copy of the files based on the time of
412 release - a fixed release point.
413 Any changes you make to your local files in the Source Directory are on top of the release.
414 On the other hand, when you clone the <filename>poky</filename> Git repository, you have an
415 active development repository.
416 In this case, any local changes you make to the Source Directory can be later applied
417 to active development branches of the upstream <filename>poky</filename> Git
418 repository.</para>
419
420 <para>Finally, if you want to track a set of local changes while starting from the same point
421 as a release tarball, you can create a local Git branch that
422 reflects the exact copy of the files at the time of their release.
423 You do this by using Git tags that are part of the repository.</para>
424
425 <para>For more information on concepts related to Git repositories, branches, and tags,
426 see the
427 "<link linkend='repositories-tags-and-branches'>Repositories, Tags, and Branches</link>"
428 section.</para></listitem>
429 <listitem><para><emphasis>Tasks:</emphasis> Arbitrary groups of software Recipes.
430 You simply use Tasks to hold recipes that, when built, usually accomplish a single task.
431 For example, a task could contain the recipes for a company’s proprietary or value-add software.
432 Or, the task could contain the recipes that enable graphics.
433 A task is really just another recipe.
434 Because task files are recipes, they end with the <filename>.bb</filename> filename
435 extension.</para></listitem>
436 <listitem><para><emphasis>Upstream:</emphasis> A reference to source code or repositories
437 that are not local to the development system but located in a master area that is controlled
438 by the maintainer of the source code.
439 For example, in order for a developer to work on a particular piece of code, they need to
440 first get a copy of it from an "upstream" source.</para></listitem>
441 </itemizedlist>
442 </para>
443</section>
444
445<section id='licensing'>
446 <title>Licensing</title>
447
448 <para>
449 Because open source projects are open to the public, they have different licensing structures in place.
450 License evolution for both Open Source and Free Software has an interesting history.
451 If you are interested in this history, you can find basic information here:
452 <itemizedlist>
453 <listitem><para><ulink url='http://en.wikipedia.org/wiki/Open-source_license'>Open source license history</ulink>
454 </para></listitem>
455 <listitem><para><ulink url='http://en.wikipedia.org/wiki/Free_software_license'>Free software license
456 history</ulink></para></listitem>
457 </itemizedlist>
458 </para>
459
460 <para>
461 In general, the Yocto Project is broadly licensed under the Massachusetts Institute of Technology
462 (MIT) License.
463 MIT licensing permits the reuse of software within proprietary software as long as the
464 license is distributed with that software.
465 MIT is also compatible with the GNU General Public License (GPL).
466 Patches to the Yocto Project follow the upstream licensing scheme.
467 You can find information on the MIT license at
468 <ulink url='http://www.opensource.org/licenses/mit-license.php'>here</ulink>.
469 You can find information on the GNU GPL <ulink url='http://www.opensource.org/licenses/LGPL-3.0'>
470 here</ulink>.
471 </para>
472
473 <para>
474 When you build an image using the Yocto Project, the build process uses a
475 known list of licenses to ensure compliance.
476 You can find this list in the Yocto Project files directory at
477 <filename>meta/files/common-licenses</filename>.
478 Once the build completes, the list of all licenses found and used during that build are
479 kept in the
480 <link linkend='build-directory'>Build Directory</link> at
481 <filename>tmp/deploy/images/licenses</filename>.
482 </para>
483
484 <para>
485 If a module requires a license that is not in the base list, the build process
486 generates a warning during the build.
487 These tools make it easier for a developer to be certain of the licenses with which
488 their shipped products must comply.
489 However, even with these tools it is still up to the developer to resolve potential licensing issues.
490 </para>
491
492 <para>
493 The base list of licenses used by the build process is a combination of the Software Package
494 Data Exchange (SPDX) list and the Open Source Initiative (OSI) projects.
495 <ulink url='http://spdx.org'>SPDX Group</ulink> is a working group of the Linux Foundation
496 that maintains a specification
497 for a standard format for communicating the components, licenses, and copyrights
498 associated with a software package.
499 <ulink url='http://opensource.org'>OSI</ulink> is a corporation dedicated to the Open Source
500 Definition and the effort for reviewing and approving licenses that are OSD-conformant.
501 </para>
502
503 <para>
504 You can find a list of the combined SPDX and OSI licenses that the Yocto Project uses
505 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/files/common-licenses'>here</ulink>.
506 This wiki page discusses the license infrastructure used by the Yocto Project.
507 </para>
508
509 <para>
510 For information that can help you to maintain compliance with various open source licensing
511 during the lifecycle of a product created using the Yocto Project, see the
512 "<link linkend='maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</link>" section.
513 </para>
514</section>
515
516<section id='git'>
517 <title>Git</title>
518
519 <para>
520 The Yocto Project uses Git, which is a free, open source distributed version control system.
521 Git supports distributed development, non-linear development, and can handle large projects.
522 It is best that you have some fundamental understanding of how Git tracks projects and
523 how to work with Git if you are going to use Yocto Project for development.
524 This section provides a quick overview of how Git works and provides you with a summary
525 of some essential Git commands.
526 </para>
527
528 <para>
529 For more information on Git, see
530 <ulink url='http://git-scm.com/documentation'></ulink>.
531 If you need to download Git, go to <ulink url='http://git-scm.com/download'></ulink>.
532 </para>
533
534 <section id='repositories-tags-and-branches'>
535 <title>Repositories, Tags, and Branches</title>
536
537 <para>
538 As mentioned earlier in section
539 "<link linkend='yocto-project-repositories'>Yocto Project Source Repositories</link>",
540 the Yocto Project maintains source repositories at
541 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
542 If you look at this web-interface of the repositories, each item is a separate
543 Git repository.
544 </para>
545
546 <para>
547 Git repositories use branching techniques that track content change (not files)
548 within a project (e.g. a new feature or updated documentation).
549 Creating a tree-like structure based on project divergence allows for excellent historical
550 information over the life of a project.
551 This methodology also allows for an environment in which you can do lots of
552 local experimentation on a project as you develop changes or new features.
553 </para>
554
555 <para>
556 A Git repository represents all development efforts for a given project.
557 For example, the Git repository <filename>poky</filename> contains all changes
558 and developments for Poky over the course of its entire life.
559 That means that all changes that make up all releases are captured.
560 The repository maintains a complete history of changes.
561 </para>
562
563 <para>
564 You can create a local copy of any repository by "cloning" it with the Git
565 <filename>clone</filename> command.
566 When you clone a Git repository, you end up with an identical copy of the
567 repository on your development system.
568 Once you have a local copy of a repository, you can take steps to develop locally.
569 For examples on how to clone Git repositories, see the section
570 "<link linkend='getting-setup'>Getting Set Up</link>" earlier in this manual.
571 </para>
572
573 <para>
574 It is important to understand that Git tracks content change and not files.
575 Git uses "branches" to organize different development efforts.
576 For example, the <filename>poky</filename> repository has
577 <filename>bernard</filename>,
578 <filename>edison</filename>, <filename>denzil</filename>, <filename>danny</filename>
579 and <filename>master</filename> branches among others.
580 You can see all the branches by going to
581 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
582 clicking on the
583 <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/heads'>[...]</ulink></filename>
584 link beneath the "Branch" heading.
585 </para>
586
587 <para>
588 Each of these branches represents a specific area of development.
589 The <filename>master</filename> branch represents the current or most recent
590 development.
591 All other branches represent off-shoots of the <filename>master</filename>
592 branch.
593 </para>
594
595 <para>
596 When you create a local copy of a Git repository, the copy has the same set
597 of branches as the original.
598 This means you can use Git to create a local working area (also called a branch)
599 that tracks a specific development branch from the source Git repository.
600 in other words, you can define your local Git environment to work on any development
601 branch in the repository.
602 To help illustrate, here is a set of commands that creates a local copy of the
603 <filename>poky</filename> Git repository and then creates and checks out a local
604 Git branch that tracks the Yocto Project &DISTRO; Release (&DISTRO_NAME;) development:
605 <literallayout class='monospaced'>
606 $ cd ~
607 $ git clone git://git.yoctoproject.org/poky
608 $ cd poky
609 $ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
610 </literallayout>
611 In this example, the name of the top-level directory of your local Yocto Project
612 Files Git repository is <filename>poky</filename>,
613 and the name of the local working area (or local branch) you have created and checked
614 out is <filename>&DISTRO_NAME;</filename>.
615 The files in your repository now reflect the same files that are in the
616 <filename>&DISTRO_NAME;</filename> development branch of the Yocto Project's
617 <filename>poky</filename> repository.
618 It is important to understand that when you create and checkout a
619 local working branch based on a branch name,
620 your local environment matches the "tip" of that development branch
621 at the time you created your local branch, which could be
622 different than the files at the time of a similarly named release.
623 In other words, creating and checking out a local branch based on the
624 <filename>&DISTRO_NAME;</filename> branch name is not the same as
625 cloning and checking out the <filename>master</filename> branch.
626 Keep reading to see how you create a local snapshot of a Yocto Project Release.
627 </para>
628
629 <para>
630 Git uses "tags" to mark specific changes in a repository.
631 Typically, a tag is used to mark a special point such as the final change
632 before a project is released.
633 You can see the tags used with the <filename>poky</filename> Git repository
634 by going to <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
635 clicking on the
636 <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/tags'>[...]</ulink></filename>
637 link beneath the "Tag" heading.
638 </para>
639
640 <para>
641 Some key tags are <filename>bernard-5.0</filename>, <filename>denzil-7.0</filename>,
642 and <filename>&DISTRO_NAME;-&POKYVERSION;</filename>.
643 These tags represent Yocto Project releases.
644 </para>
645
646 <para>
647 When you create a local copy of the Git repository, you also have access to all the
648 tags.
649 Similar to branches, you can create and checkout a local working Git branch based
650 on a tag name.
651 When you do this, you get a snapshot of the Git repository that reflects
652 the state of the files when the change was made associated with that tag.
653 The most common use is to checkout a working branch that matches a specific
654 Yocto Project release.
655 Here is an example:
656 <literallayout class='monospaced'>
657 $ cd ~
658 $ git clone git://git.yoctoproject.org/poky
659 $ cd poky
660 $ git checkout -b my-&DISTRO_NAME;-&POKYVERSION; &DISTRO_NAME;-&POKYVERSION;
661 </literallayout>
662 In this example, the name of the top-level directory of your local Yocto Project
663 Files Git repository is <filename>poky</filename>.
664 And, the name of the local branch you have created and checked out is
665 <filename>my-&DISTRO_NAME;-&POKYVERSION;</filename>.
666 The files in your repository now exactly match the Yocto Project &DISTRO;
667 Release tag (<filename>&DISTRO_NAME;-&POKYVERSION;</filename>).
668 It is important to understand that when you create and checkout a local
669 working branch based on a tag, your environment matches a specific point
670 in time and not a development branch.
671 </para>
672 </section>
673
674 <section id='basic-commands'>
675 <title>Basic Commands</title>
676
677 <para>
678 Git has an extensive set of commands that lets you manage changes and perform
679 collaboration over the life of a project.
680 Conveniently though, you can manage with a small set of basic operations and workflows
681 once you understand the basic philosophy behind Git.
682 You do not have to be an expert in Git to be functional.
683 A good place to look for instruction on a minimal set of Git commands is
684 <ulink url='http://git-scm.com/documentation'>here</ulink>.
685 If you need to download Git, you can do so
686 <ulink url='http://git-scm.com/download'>here</ulink>.
687 </para>
688
689 <para>
690 If you don’t know much about Git, we suggest you educate
691 yourself by visiting the links previously mentioned.
692 </para>
693
694 <para>
695 The following list briefly describes some basic Git operations as a way to get started.
696 As with any set of commands, this list (in most cases) simply shows the base command and
697 omits the many arguments they support.
698 See the Git documentation for complete descriptions and strategies on how to use these commands:
699 <itemizedlist>
700 <listitem><para><emphasis><filename>git init</filename>:</emphasis> Initializes an empty Git repository.
701 You cannot use Git commands unless you have a <filename>.git</filename> repository.</para></listitem>
702 <listitem><para><emphasis><filename>git clone</filename>:</emphasis> Creates a clone of a repository.
703 During collaboration, this command allows you to create a local repository that is on
704 equal footing with a fellow developer’s repository.</para></listitem>
705 <listitem><para><emphasis><filename>git add</filename>:</emphasis> Adds updated file contents
706 to the index that
707 Git uses to track changes.
708 You must add all files that have changed before you can commit them.</para></listitem>
709 <listitem><para><emphasis><filename>git commit</filename>:</emphasis> Creates a “commit” that documents
710 the changes you made.
711 Commits are used for historical purposes, for determining if a maintainer of a project
712 will allow the change, and for ultimately pushing the change from your local Git repository
713 into the project’s upstream (or master) repository.</para></listitem>
714 <listitem><para><emphasis><filename>git status</filename>:</emphasis> Reports any modified files that
715 possibly need to be added and committed.</para></listitem>
716 <listitem><para><emphasis><filename>git checkout &lt;branch-name&gt;</filename>:</emphasis> Changes
717 your working branch.
718 This command is analogous to “cd”.</para></listitem>
719 <listitem><para><emphasis><filename>git checkout –b &lt;working-branch&gt;</filename>:</emphasis> Creates
720 a working branch on your local machine where you can isolate work.
721 It is a good idea to use local branches when adding specific features or changes.
722 This way if you don’t like what you have done you can easily get rid of the work.</para></listitem>
723 <listitem><para><emphasis><filename>git branch</filename>:</emphasis> Reports
724 existing local branches and
725 tells you the branch in which you are currently working.</para></listitem>
726 <listitem><para><emphasis><filename>git branch -D &lt;branch-name&gt;</filename>:</emphasis>
727 Deletes an existing local branch.
728 You need to be in a local branch other than the one you are deleting
729 in order to delete <filename>&lt;branch-name&gt;</filename>.</para></listitem>
730 <listitem><para><emphasis><filename>git pull</filename>:</emphasis> Retrieves information
731 from an upstream Git
732 repository and places it in your local Git repository.
733 You use this command to make sure you are synchronized with the repository
734 from which you are basing changes (.e.g. the master branch).</para></listitem>
735 <listitem><para><emphasis><filename>git push</filename>:</emphasis> Sends all your local changes you
736 have committed to an upstream Git repository (e.g. a contribution repository).
737 The maintainer of the project draws from these repositories when adding your changes to the
738 project’s master repository.</para></listitem>
739 <listitem><para><emphasis><filename>git merge</filename>:</emphasis> Combines or adds changes from one
740 local branch of your repository with another branch.
741 When you create a local Git repository, the default branch is named “master”.
742 A typical workflow is to create a temporary branch for isolated work, make and commit your
743 changes, switch to your local master branch, merge the changes from the temporary branch into the
744 local master branch, and then delete the temporary branch.</para></listitem>
745 <listitem><para><emphasis><filename>git cherry-pick</filename>:</emphasis> Choose and apply specific
746 commits from one branch into another branch.
747 There are times when you might not be able to merge all the changes in one branch with
748 another but need to pick out certain ones.</para></listitem>
749 <listitem><para><emphasis><filename>gitk</filename>:</emphasis> Provides a GUI view of the branches
750 and changes in your local Git repository.
751 This command is a good way to graphically see where things have diverged in your
752 local repository.</para></listitem>
753 <listitem><para><emphasis><filename>git log</filename>:</emphasis> Reports a history of your changes to the
754 repository.</para></listitem>
755 <listitem><para><emphasis><filename>git diff</filename>:</emphasis> Displays line-by-line differences
756 between your local working files and the same files in the upstream Git repository that your
757 branch currently tracks.</para></listitem>
758 </itemizedlist>
759 </para>
760 </section>
761</section>
762
763<section id='workflows'>
764 <title>Workflows</title>
765
766 <para>
767 This section provides some overview on workflows using Git.
768 In particular, the information covers basic practices that describe roles and actions in a
769 collaborative development environment.
770 Again, if you are familiar with this type of development environment, you might want to just
771 skip this section.
772 </para>
773
774 <para>
775 The Yocto Project files are maintained using Git in a "master" branch whose Git history
776 tracks every change and whose structure provides branches for all diverging functionality.
777 Although there is no need to use Git, many open source projects do so.
778 For the Yocto Project, a key individual called the "maintainer" is responsible for the "master"
779 branch of the Git repository.
780 The "master" branch is the “upstream” repository where the final builds of the project occur.
781 The maintainer is responsible for allowing changes in from other developers and for
782 organizing the underlying branch structure to reflect release strategies and so forth.
783 <note>You can see who is the maintainer for Yocto Project files by examining the
784 <filename>maintainers.inc</filename> file in the Yocto Project
785 <filename>meta-yocto/conf/distro/include</filename> directory.</note>
786 </para>
787
788 <para>
789 The project also has contribution repositories known as “contrib” areas.
790 These areas temporarily hold changes to the project that have been submitted or committed
791 by the Yocto Project development team and by community members that contribute to the project.
792 The maintainer determines if the changes are qualified to be moved from the "contrib" areas
793 into the "master" branch of the Git repository.
794 </para>
795
796 <para>
797 Developers (including contributing community members) create and maintain cloned repositories
798 of the upstream "master" branch.
799 These repositories are local to their development platforms and are used to develop changes.
800 When a developer is satisfied with a particular feature or change, they “push” the changes
801 to the appropriate "contrib" repository.
802 </para>
803
804 <para>
805 Developers are responsible for keeping their local repository up-to-date with "master".
806 They are also responsible for straightening out any conflicts that might arise within files
807 that are being worked on simultaneously by more than one person.
808 All this work is done locally on the developer’s machine before anything is pushed to a
809 "contrib" area and examined at the maintainer’s level.
810 </para>
811
812 <para>
813 A somewhat formal method exists by which developers commit changes and push them into the
814 "contrib" area and subsequently request that the maintainer include them into "master"
815 This process is called “submitting a patch” or “submitting a change.”
816 For information on submitting patches and changes, see the
817 "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>" section.
818 </para>
819
820 <para>
821 To summarize the environment: we have a single point of entry for changes into the project’s
822 "master" branch of the Git repository, which is controlled by the project’s maintainer.
823 And, we have a set of developers who independently develop, test, and submit changes
824 to "contrib" areas for the maintainer to examine.
825 The maintainer then chooses which changes are going to become a permanent part of the project.
826 </para>
827
828 <para>
829 <imagedata fileref="figures/git-workflow.png" width="6in" depth="3in" align="left" scalefit="1" />
830 </para>
831
832 <para>
833 While each development environment is unique, there are some best practices or methods
834 that help development run smoothly.
835 The following list describes some of these practices.
836 For more information about Git workflows, see the workflow topics in the
837 <ulink url='http://book.git-scm.com'>Git Community Book</ulink>.
838 <itemizedlist>
839 <listitem><para><emphasis>Make Small Changes:</emphasis> It is best to keep the changes you commit
840 small as compared to bundling many disparate changes into a single commit.
841 This practice not only keeps things manageable but also allows the maintainer
842 to more easily include or refuse changes.</para>
843 <para>It is also good practice to leave the repository in a state that allows you to
844 still successfully build your project. In other words, do not commit half of a feature,
845 then add the other half in a separate, later commit.
846 Each commit should take you from one buildable project state to another
847 buildable state.</para></listitem>
848 <listitem><para><emphasis>Use Branches Liberally:</emphasis> It is very easy to create, use, and
849 delete local branches in your working Git repository.
850 You can name these branches anything you like.
851 It is helpful to give them names associated with the particular feature or change
852 on which you are working.
853 Once you are done with a feature or change, simply discard the branch.</para></listitem>
854 <listitem><para><emphasis>Merge Changes:</emphasis> The <filename>git merge</filename>
855 command allows you to take the
856 changes from one branch and fold them into another branch.
857 This process is especially helpful when more than a single developer might be working
858 on different parts of the same feature.
859 Merging changes also automatically identifies any collisions or “conflicts”
860 that might happen as a result of the same lines of code being altered by two different
861 developers.</para></listitem>
862 <listitem><para><emphasis>Manage Branches:</emphasis> Because branches are easy to use, you should
863 use a system where branches indicate varying levels of code readiness.
864 For example, you can have a “work” branch to develop in, a “test” branch where the code or
865 change is tested, a “stage” branch where changes are ready to be committed, and so forth.
866 As your project develops, you can merge code across the branches to reflect ever-increasing
867 stable states of the development.</para></listitem>
868 <listitem><para><emphasis>Use Push and Pull:</emphasis> The push-pull workflow is based on the
869 concept of developers “pushing” local commits to a remote repository, which is
870 usually a contribution repository.
871 This workflow is also based on developers “pulling” known states of the project down into their
872 local development repositories.
873 The workflow easily allows you to pull changes submitted by other developers from the
874 upstream repository into your work area ensuring that you have the most recent software
875 on which to develop.
876 The Yocto Project has two scripts named <filename>create-pull-request</filename> and
877 <filename>send-pull-request</filename> that ship with the release to facilitate this
878 workflow.
879 You can find these scripts in the local Yocto Project files Git repository in
880 the <filename>scripts</filename> directory.</para>
881 <para>You can find more information on these scripts in the
882 "<link linkend='pushing-a-change-upstream'>Using
883 Scripts to Push a Change Upstream and Request a Pull</link>" section.
884 </para></listitem>
885 <listitem><para><emphasis>Patch Workflow:</emphasis> This workflow allows you to notify the
886 maintainer through an email that you have a change (or patch) you would like considered
887 for the "master" branch of the Git repository.
888 To send this type of change you format the patch and then send the email using the Git commands
889 <filename>git format-patch</filename> and <filename>git send-email</filename>.
890 You can find information on how to submit changes
891 later in this chapter.</para></listitem>
892 </itemizedlist>
893 </para>
894</section>
895
896<section id='tracking-bugs'>
897 <title>Tracking Bugs</title>
898
899 <para>
900 The Yocto Project uses its own implementation of
901 <ulink url='http://www.bugzilla.org/about/'>Bugzilla</ulink> to track bugs.
902 Implementations of Bugzilla work well for group development because they track bugs and code
903 changes, can be used to communicate changes and problems with developers, can be used to
904 submit and review patches, and can be used to manage quality assurance.
905 The home page for the Yocto Project implementation of Bugzilla is
906 <ulink url='&YOCTO_BUGZILLA_URL;'>&YOCTO_BUGZILLA_URL;</ulink>.
907 </para>
908
909 <para>
910 Sometimes it is helpful to submit, investigate, or track a bug against the Yocto Project itself
911 such as when discovering an issue with some component of the build system that acts contrary
912 to the documentation or your expectations.
913 Following is the general procedure for submitting a new bug using the Yocto Project
914 Bugzilla.
915 You can find more information on defect management, bug tracking, and feature request
916 processes all accomplished through the Yocto Project Bugzilla on the wiki page
917 <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>here</ulink>.
918 <orderedlist>
919 <listitem><para>Always use the Yocto Project implementation of Bugzilla to submit
920 a bug.</para></listitem>
921 <listitem><para>When submitting a new bug, be sure to choose the appropriate
922 Classification, Product, and Component for which the issue was found.
923 Defects for Yocto Project fall into one of six classifications: Yocto Project
924 Components, Infrastructure, Build System &amp; Metadata, Documentation,
925 QA/Testing, and Runtime.
926 Each of these Classifications break down into multiple Products and, in some
927 cases, multiple Components.</para></listitem>
928 <listitem><para>Use the bug form to choose the correct Hardware and Architecture
929 for which the bug applies.</para></listitem>
930 <listitem><para>Indicate the Yocto Project version you were using when the issue
931 occurred.</para></listitem>
932 <listitem><para>Be sure to indicate the Severity of the bug.
933 Severity communicates how the bug impacted your work.</para></listitem>
934 <listitem><para>Provide a brief summary of the issue.
935 Try to limit your summary to just a line or two and be sure to capture the
936 essence of the issue.</para></listitem>
937 <listitem><para>Provide a detailed description of the issue.
938 You should provide as much detail as you can about the context, behavior, output,
939 and so forth that surround the issue.
940 You can even attach supporting files for output or log by using the "Add an attachment"
941 button.</para></listitem>
942 <listitem><para>Submit the bug by clicking the "Submit Bug" button.</para></listitem>
943 </orderedlist>
944 </para>
945</section>
946
947<section id='how-to-submit-a-change'>
948 <title>How to Submit a Change</title>
949
950 <para>
951 Contributions to the Yocto Project and OpenEmbedded are very welcome.
952 Because the system is extremely configurable and flexible, we recognize that developers
953 will want to extend, configure or optimize it for their specific uses.
954 You should send patches to the appropriate mailing list so that they
955 can be reviewed and merged by the appropriate maintainer.
956 For a list of the Yocto Project and related mailing lists, see the
957 "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing lists</ulink>" section in
958 the Yocto Project Reference Manual.
959 </para>
960
961 <para>
962 The following is some guidance on which mailing list to use for what type of change:
963 <itemizedlist>
964 <listitem><para>For changes to the core metadata, send your patch to the
965 <ulink url='&OE_LISTS_URL;/listinfo/openembedded-core'>openembedded-core</ulink> mailing list.
966 For example, a change to anything under the <filename>meta</filename> or
967 <filename>scripts</filename> directories
968 should be sent to this mailing list.</para></listitem>
969 <listitem><para>For changes to BitBake (anything under the <filename>bitbake</filename>
970 directory), send your patch to the
971 <ulink url='&OE_LISTS_URL;/listinfo/bitbake-devel'>bitbake-devel</ulink> mailing list.</para></listitem>
972 <listitem><para>For changes to <filename>meta-yocto</filename>, send your patch to the
973 <ulink url='&YOCTO_LISTS_URL;/listinfo/poky'>poky</ulink> mailing list.</para></listitem>
974 <listitem><para>For changes to other layers hosted on
975 <filename>yoctoproject.org</filename> (unless the
976 layer's documentation specifies otherwise), tools, and Yocto Project
977 documentation, use the
978 <ulink url='&YOCTO_LISTS_URL;/listinfo/yocto'>yocto</ulink> mailing list.</para></listitem>
979 <listitem><para>For additional recipes that do not fit into the core metadata,
980 you should determine which layer the recipe should go into and submit the
981 change in the manner recommended by the documentation (e.g. README) supplied
982 with the layer. If in doubt, please ask on the
983 <ulink url='&YOCTO_LISTS_URL;/listinfo/yocto'>yocto</ulink> or
984 <ulink url='&OE_LISTS_URL;/listinfo/openembedded-devel'>openembedded-devel</ulink>
985 mailing lists.</para></listitem>
986 </itemizedlist>
987 </para>
988
989 <para>
990 When you send a patch, be sure to include a "Signed-off-by:"
991 line in the same style as required by the Linux kernel.
992 Adding this line signifies that you, the submitter, have agreed to the Developer's Certificate of Origin 1.1
993 as follows:
994 <literallayout class='monospaced'>
995 Developer's Certificate of Origin 1.1
996
997 By making a contribution to this project, I certify that:
998
999 (a) The contribution was created in whole or in part by me and I
1000 have the right to submit it under the open source license
1001 indicated in the file; or
1002
1003 (b) The contribution is based upon previous work that, to the best
1004 of my knowledge, is covered under an appropriate open source
1005 license and I have the right under that license to submit that
1006 work with modifications, whether created in whole or in part
1007 by me, under the same open source license (unless I am
1008 permitted to submit under a different license), as indicated
1009 in the file; or
1010
1011 (c) The contribution was provided directly to me by some other
1012 person who certified (a), (b) or (c) and I have not modified
1013 it.
1014
1015 (d) I understand and agree that this project and the contribution
1016 are public and that a record of the contribution (including all
1017 personal information I submit with it, including my sign-off) is
1018 maintained indefinitely and may be redistributed consistent with
1019 this project or the open source license(s) involved.
1020 </literallayout>
1021 </para>
1022
1023 <para>
1024 In a collaborative environment, it is necessary to have some sort of standard
1025 or method through which you submit changes.
1026 Otherwise, things could get quite chaotic.
1027 One general practice to follow is to make small, controlled changes.
1028 Keeping changes small and isolated aids review, makes merging/rebasing easier
1029 and keeps the change history clean when anyone needs to refer to it in future.
1030 </para>
1031
1032 <para>
1033 When you make a commit, you must follow certain standards established by the
1034 OpenEmbedded and Yocto Project development teams.
1035 For each commit, you must provide a single-line summary of the change and you
1036 should almost always provide a more detailed description of what you did (i.e.
1037 the body of the commit message).
1038 The only exceptions for not providing a detailed description would be if your
1039 change is a simple, self-explanatory change that needs no further description
1040 beyond the summary.
1041 Here are the guidelines for composing a commit message:
1042 <itemizedlist>
1043 <listitem><para>Provide a single-line, short summary of the change.
1044 This summary is typically viewable in the "shortlist" of changes.
1045 Thus, providing something short and descriptive that gives the reader
1046 a summary of the change is useful when viewing a list of many commits.
1047 This should be prefixed by the recipe name (if changing a recipe), or
1048 else the short form path to the file being changed.
1049 </para></listitem>
1050 <listitem><para>For the body of the commit message, provide detailed information
1051 that describes what you changed, why you made the change, and the approach
1052 you used. It may also be helpful if you mention how you tested the change.
1053 Provide as much detail as you can in the body of the commit message.
1054 </para></listitem>
1055 <listitem><para>If the change addresses a specific bug or issue that is
1056 associated with a bug-tracking ID, include a reference to that ID in
1057 your detailed description.
1058 For example, the Yocto Project uses a specific convention for bug
1059 references - any commit that addresses a specific bug should include the
1060 bug ID in the description (typically at the beginning) as follows:
1061 <literallayout class='monospaced'>
1062 [YOCTO #&lt;bug-id&gt;]
1063
1064 &lt;detailed description of change&gt;
1065 </literallayout></para></listitem>
1066 Where &lt;bug-id&gt; is replaced with the specific bug ID from the
1067 Yocto Project Bugzilla instance.
1068 </itemizedlist>
1069 </para>
1070
1071 <para>
1072 You can find more guidance on creating well-formed commit messages at this OpenEmbedded
1073 wiki page:
1074 <ulink url='&OE_HOME_URL;/wiki/Commit_Patch_Message_Guidelines'></ulink>.
1075 </para>
1076
1077 <para>
1078 Following are general instructions for both pushing changes upstream and for submitting
1079 changes as patches.
1080 </para>
1081
1082 <section id='pushing-a-change-upstream'>
1083 <title>Using Scripts to Push a Change Upstream and Request a Pull</title>
1084
1085 <para>
1086 The basic flow for pushing a change to an upstream "contrib" Git repository is as follows:
1087 <itemizedlist>
1088 <listitem><para>Make your changes in your local Git repository.</para></listitem>
1089 <listitem><para>Stage your changes by using the <filename>git add</filename>
1090 command on each file you changed.</para></listitem>
1091 <listitem><para>Commit the change by using the <filename>git commit</filename>
1092 command and push it to the "contrib" repository.
1093 Be sure to provide a commit message that follows the project’s commit message standards
1094 as described earlier.</para></listitem>
1095 <listitem><para>Notify the maintainer that you have pushed a change by making a pull
1096 request.
1097 The Yocto Project provides two scripts that conveniently let you generate and send
1098 pull requests to the Yocto Project.
1099 These scripts are <filename>create-pull-request</filename> and
1100 <filename>send-pull-request</filename>.
1101 You can find these scripts in the <filename>scripts</filename> directory
1102 within the <link linkend='source-directory'>Source Directory</link>.</para>
1103 <para>Using these scripts correctly formats the requests without introducing any
1104 whitespace or HTML formatting.
1105 The maintainer that receives your patches needs to be able to save and apply them
1106 directly from your emails.
1107 Using these scripts is the preferred method for sending patches.</para>
1108 <para>For help on using these scripts, simply provide the
1109 <filename>-h</filename> argument as follows:
1110 <literallayout class='monospaced'>
1111 $ ~/poky/scripts/create-pull-request -h
1112 $ ~/poky/scripts/send-pull-request -h
1113 </literallayout></para></listitem>
1114 </itemizedlist>
1115 </para>
1116
1117 <para>
1118 You can find general Git information on how to push a change upstream in the
1119 <ulink url='http://book.git-scm.com/3_distributed_workflows.html'>Git Community Book</ulink>.
1120 </para>
1121 </section>
1122
1123 <section id='submitting-a-patch'>
1124 <title>Using Email to Submit a Patch</title>
1125
1126 <para>
1127 You can submit patches without using the <filename>create-pull-request</filename> and
1128 <filename>send-pull-request</filename> scripts described in the previous section.
1129 Keep in mind, the preferred method is to use the scripts, however.
1130 </para>
1131
1132 <para>
1133 Depending on the components changed, you need to submit the email to a specific
1134 mailing list.
1135 For some guidance on which mailing list to use, see the list in the
1136 "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>" section
1137 earlier in this manual.
1138 For a description of the available mailing lists, see
1139 "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing Lists</ulink>"
1140 section in the Yocto Project Reference Manual.
1141 </para>
1142
1143 <para>
1144 Here is the general procedure on how to submit a patch through email without using the
1145 scripts:
1146 <itemizedlist>
1147 <listitem><para>Make your changes in your local Git repository.</para></listitem>
1148 <listitem><para>Stage your changes by using the <filename>git add</filename>
1149 command on each file you changed.</para></listitem>
1150 <listitem><para>Commit the change by using the
1151 <filename>git commit --signoff</filename> command.
1152 Using the <filename>--signoff</filename> option identifies you as the person
1153 making the change and also satisfies the Developer's Certificate of
1154 Origin (DCO) shown earlier.</para>
1155 <para>When you form a commit you must follow certain standards established by the
1156 Yocto Project development team.
1157 See the earlier section
1158 "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
1159 for Yocto Project commit message standards.</para></listitem>
1160 <listitem><para>Format the commit into an email message.
1161 To format commits, use the <filename>git format-patch</filename> command.
1162 When you provide the command, you must include a revision list or a number of patches
1163 as part of the command.
1164 For example, these two commands each take the most recent single commit and
1165 format it as an email message in the current directory:
1166 <literallayout class='monospaced'>
1167 $ git format-patch -1
1168 $ git format-patch HEAD~
1169 </literallayout></para>
1170 <para>After the command is run, the current directory contains a
1171 numbered <filename>.patch</filename> file for the commit.</para>
1172 <para>If you provide several commits as part of the command,
1173 the <filename>git format-patch</filename> command produces a numbered
1174 series of files in the current directory – one for each commit.
1175 If you have more than one patch, you should also use the
1176 <filename>--cover</filename> option with the command, which generates a
1177 cover letter as the first "patch" in the series.
1178 You can then edit the cover letter to provide a description for
1179 the series of patches.
1180 For information on the <filename>git format-patch</filename> command,
1181 see <filename>GIT_FORMAT_PATCH(1)</filename> displayed using the
1182 <filename>man git-format-patch</filename> command.</para>
1183 <note>If you are or will be a frequent contributor to the Yocto Project
1184 or to OpenEmbedded, you might consider requesting a contrib area and the
1185 necessary associated rights.</note></listitem>
1186 <listitem><para>Import the files into your mail client by using the
1187 <filename>git send-email</filename> command.
1188 <note>In order to use <filename>git send-email</filename>, you must have the
1189 the proper Git packages installed.
1190 For Ubuntu and Fedora the package is <filename>git-email</filename>.</note></para>
1191 <para>The <filename>git send-email</filename> command sends email by using a local
1192 or remote Mail Transport Agent (MTA) such as
1193 <filename>msmtp</filename>, <filename>sendmail</filename>, or through a direct
1194 <filename>smtp</filename> configuration in your Git <filename>config</filename>
1195 file.
1196 If you are submitting patches through email only, it is very important
1197 that you submit them without any whitespace or HTML formatting that
1198 either you or your mailer introduces.
1199 The maintainer that receives your patches needs to be able to save and
1200 apply them directly from your emails.
1201 A good way to verify that what you are sending will be applicable by the
1202 maintainer is to do a dry run and send them to yourself and then
1203 save and apply them as the maintainer would.</para>
1204 <para>The <filename>git send-email</filename> command is the preferred method
1205 for sending your patches since there is no risk of compromising whitespace
1206 in the body of the message, which can occur when you use your own mail client.
1207 The command also has several options that let you
1208 specify recipients and perform further editing of the email message.
1209 For information on how to use the <filename>git send-email</filename> command,
1210 use the <filename>man git-send-email</filename> command.</para></listitem>
1211 </itemizedlist>
1212 </para>
1213 </section>
1214</section>
1215</chapter>
1216<!--
1217vim: expandtab tw=80 ts=4
1218-->
diff --git a/documentation/profile-manual/profile-manual.xml b/documentation/profile-manual/profile-manual.xml
new file mode 100644
index 0000000000..5eea2e22aa
--- /dev/null
+++ b/documentation/profile-manual/profile-manual.xml
@@ -0,0 +1,91 @@
1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<book id='dev-manual' lang='en'
6 xmlns:xi="http://www.w3.org/2003/XInclude"
7 xmlns="http://docbook.org/ns/docbook"
8 >
9 <bookinfo>
10
11 <mediaobject>
12 <imageobject>
13 <imagedata fileref='figures/dev-title.png'
14 format='SVG'
15 align='left' scalefit='1' width='100%'/>
16 </imageobject>
17 </mediaobject>
18
19 <title></title>
20
21 <authorgroup>
22 <author>
23 <firstname>Scott</firstname> <surname>Rifenbark</surname>
24 <affiliation>
25 <orgname>Intel Corporation</orgname>
26 </affiliation>
27 <email>scott.m.rifenbark@intel.com</email>
28 </author>
29 </authorgroup>
30
31 <revhistory>
32 <revision>
33 <revnumber>1.1</revnumber>
34 <date>6 October 2011</date>
35 <revremark>The initial document released with the Yocto Project 1.1 Release.</revremark>
36 </revision>
37 <revision>
38 <revnumber>1.2</revnumber>
39 <date>April 2012</date>
40 <revremark>Released with the Yocto Project 1.2 Release.</revremark>
41 </revision>
42 <revision>
43 <revnumber>1.3</revnumber>
44 <date>October 2012</date>
45 <revremark>Released with the Yocto Project 1.3 Release.</revremark>
46 </revision>
47 <revision>
48 <revnumber>1.4</revnumber>
49 <date>Sometime in 2013</date>
50 <revremark>Released with the Yocto Project 1.4 Release.</revremark>
51 </revision>
52 </revhistory>
53
54 <copyright>
55 <year>&COPYRIGHT_YEAR;</year>
56 <holder>Linux Foundation</holder>
57 </copyright>
58
59 <legalnotice>
60 <para>
61 Permission is granted to copy, distribute and/or modify this document under
62 the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">
63 Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by
64 Creative Commons.
65 </para>
66
67 <note>
68 Due to production processes, there could be differences between the Yocto Project
69 documentation bundled in the release tarball and the
70 <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Manual</ulink> on
71 the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
72 For the latest version of this manual, see the manual on the website.
73 </note>
74 </legalnotice>
75
76 </bookinfo>
77
78 <xi:include href="dev-manual-intro.xml"/>
79
80 <xi:include href="dev-manual-start.xml"/>
81
82 <xi:include href="dev-manual-newbie.xml"/>
83
84 <xi:include href="dev-manual-model.xml"/>
85
86 <xi:include href="dev-manual-common-tasks.xml"/>
87
88</book>
89<!--
90vim: expandtab tw=80 ts=4
91-->