summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2011-03-14 17:47:21 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-16 13:54:26 +0000
commit2f454213cd61086ba129030265e564e4787c466f (patch)
treee707b0f7135c2883271e1805b790f5bff4b1407d /documentation
parentb9217b5a3212659b17e67f631eee1fb2f9872938 (diff)
downloadpoky-2f454213cd61086ba129030265e564e4787c466f.tar.gz
documentation/adt-manual/adt-prepare.xml: Initial draft of preparation chapter
This commit is the initial draft of the preparation chapter (chapter 2). (From OE-Core rev: c32b215eb37828cd31c0c9ba288c2216fcd034de) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/adt-manual/adt-prepare.xml253
1 files changed, 216 insertions, 37 deletions
diff --git a/documentation/adt-manual/adt-prepare.xml b/documentation/adt-manual/adt-prepare.xml
index 928a09100b..77999b8b42 100644
--- a/documentation/adt-manual/adt-prepare.xml
+++ b/documentation/adt-manual/adt-prepare.xml
@@ -3,53 +3,232 @@
3 3
4<chapter id='adt-prepare'> 4<chapter id='adt-prepare'>
5 5
6<title>Yocto Project Kernel Architecture and Use Manual</title> 6<title>Preparing to Use the Application Development Toolkit (ADT)</title>
7 7
8<section id='prepare'> 8<para>
9 <title>Introduction</title> 9 In order to use the ADT it must be installed, the environment setup script must be
10 <para> 10 sourced, and the kernel and filesystem image specific to the target architecture must exist.
11 The Yocto Project presents the kernel as a fully patched, history-clean git 11 This section describes how to install the ADT, set up the environment, and provides
12 repository. 12 some reference information on kernels and filesystem images.
13 The git tree represents the selected features, board support, 13</para>
14 and configurations extensively tested by Yocto Project. 14
15 The Yocto Project kernel allows the end user to leverage community 15<section id='installing-the-adt'>
16 best practices to seamlessly manage the development, build and debug cycles. 16 <title>Installing the ADT</title>
17 </para>
18 <para> 17 <para>
19 This manual describes the Yocto Project kernel by providing information 18 You can install the ADT three ways.
20 on its history, organization, benefits, and use. 19 However, we recommend configuring and running the ADT Installer script.
21 The manual consists of two sections: 20 Running this script automates much of the process for you.
22 <itemizedlist> 21 For example, the script allows you to install the QEMU emulator and
23 <listitem><para>Concepts - Describes concepts behind the kernel. 22 user-space NFS, define which root filesystem profiles to download,
24 You will understand how the kernel is organized and why it is organized in 23 and allows you to define the target sysroot location.
25 the way it is. You will understand the benefits of the kernel's organization
26 and the mechanisms used to work with the kernel and how to apply it in your
27 design process.</para></listitem>
28 <listitem><para>Using the Kernel - Describes best practices and "how-to" information
29 that lets you put the kernel to practical use. Some examples are "How to Build a
30 Project Specific Tree", "How to Examine Changes in a Branch", and "Saving Kernel
31 Modifications."</para></listitem>
32 </itemizedlist>
33 </para> 24 </para>
34 <para> 25
35 For more information on the kernel, see the following links: 26 <section id='configuring-and-running-the-adt-installer'>
36 <itemizedlist> 27 <title>Configuring and Running the ADT Installer</title>
37 <listitem><para><ulink url='http://ldn.linuxfoundation.org/book/1-a-guide-kernel-development-process'></ulink></para></listitem> 28 <para>
38 <listitem><para><ulink url='http://userweb.kernel.org/~akpm/stuff/tpp.txt'></ulink></para></listitem> 29 The ADT Installer is contained in a tarball that can be built using
39 <listitem><para><ulink url='http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/HOWTO;hb=HEAD'></ulink></para></listitem> 30 <filename>bitbake adt-installer</filename>.
40 </itemizedlist> 31 Yocto Project has a pre-built ADT Installer tarball that you can download
41 <para> 32 from <filename>tmp/deploy/sdk</filename> located in the build directory.
42 You can find more information on Yocto Project by visiting the website at
43 <ulink url='http://www.yoctoproject.org'></ulink>.
44 </para> 33 </para>
45 </para>
46</section>
47 34
35 <note>
36 You can install and run the ADT Installer tarball in any directory you want.
37 </note>
38
39 <para>
40 Before running the ADT Installer you need to configure it by editing
41 the <filename>adt-installer.conf</filename> file, which is located in the
42 directory where the ADT Installer tarball was installed.
43 Your configurations determine which kernel and filesystem image are downloaded.
44 The following list describes the variables you can define for the ADT Installer.
45 For configuration values and restrictions see the comments in
46 the <filename>adt-installer.conf</filename> file:
48 47
48 <itemizedlist>
49 <listitem><para><filename>YOCTOADT_IPKG_REPO</filename> – This area
50 includes the IPKG-based packages and the root filesystem upon which
51 the installation is based.
52 If you want to set up your own IPKG repository pointed to by
53 <filename>YOCTOADT_IPKG_REPO</filename>, you need to be sure that the
54 directory structure follows the same layout as the reference directory
55 set up at <ulink url='http://adtrepo.yoctoproject.org'></ulink>.
56 Also, your repository needs to be accessible through HTTP.
57 </para></listitem>
58 <listitem><para><filename>YOCTOADT-TARGETS</filename> – The machine
59 target architectures for which you want to set up cross-development
60 environments.
61 </para></listitem>
62 <listitem><para><filename>YOCTOADT_QEMU</filename> – Indicates whether
63 or not to install the emulator QEMU.
64 </para></listitem>
65 <listitem><para><filename>YOCTOADT_NFS_UTIL</filename> – Indicates whether
66 or not to install user-mode NFS.
67 If you plan to use the Yocto Eclipse IDE plug-in against QEMU,
68 you should install NFS.
69 <note>
70 To boot QEMU images using our userspace NFS server, you need
71 to be running portmap or rpcbind.
72 If you are running rpcbind, you will also need to add the -i
73 option when rpcbind starts up.
74 Please make sure you understand the security implications of doing this.
75 Your firewall settings may also have to be modified to allow
76 NFS booting to work.
77 </note>
78 </para></listitem>
79 <listitem><para><filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename> - The root
80 filesystem images you want to download.
81 </para></listitem>
82 <listitem><para><filename>YOCTOADT_TARGET_SYSROOT_IMAGE_&lt;arch&gt;</filename> - The
83 root filesystem used to extract and create the target sysroot.
84 </para></listitem>
85 <listitem><para><filename>YOCTOADT_TARGET_SYSROOT_LOC_&lt;arch&gt;</filename> - The
86 location of the target sysroot that will be set up on the development machine.
87 </para></listitem>
88 </itemizedlist>
89 </para>
90
91 <para>
92 After you have configured the <filename>adt-installer.conf</filename> file,
93 run the installer using the following command:
94 <literallayout class='monospaced'>
95 $ adt_installer
96 </literallayout>
97 </para>
98
99 <para>
100 Once the installer begins to run you are asked whether you want to run in
101 interactive or silent mode.
102 If you want to closely monitor the installation then choose “I” for interactive
103 mode rather than “S” for silent mode.
104 Follow the prompts from the script to complete the installation.
105 </para>
49 106
107 <para>
108 Once the installation completes, the cross-toolchain is installed in
109 <filename>/opt/poky/$SDKVERSION</filename>.
110 </para>
50 111
112 <para>
113 Before using the ADT you need to run the environment setup script for
114 your target architecture also located in <filename>/opt/poky/$SDKVERSION</filename>.
115 See the <xref linkend='setting-up-the-environment'>“Setting Up the Environment”</xref>
116 section for information.
117 </para>
118 </section>
51 119
120 <section id='using-an-existing-toolchain-tarball'>
121 <title>Using an Existing Toolchain Tarball</title>
122 <para>
123 If you don’t want to use the ADT Installer you can install the toolchain
124 and the sysroot by hand.
125 Follow these steps:
126 <orderedlist>
127 <listitem><para>Locate and download the architecture-specific toolchain
128 tarball from <ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-0.9'></ulink>.
129 Look in the ‘toolchain’ folder and then open up the folder that matches your
130 host development system (i.e. 'i586' for 32-bit machines or 'x86_64'
131 for 64-bit machines).
132 Then, select the toolchain tarball whose name includes the appropriate
133 target architecture.
134 <note>
135 If you need to build the toolchain tarball use the
136 <filename>bitbake meta-toolchain</filename> command after you have
137 sourced the poky-build-init script.
138 The tarball will be located in the build directory at
139 <filename>tmp/deploy/sdk</filename> after the build.
140 </note>
141 </para></listitem>
142 <listitem><para>Make sure you are in the root directory and then expand
143 the tarball.
144 The tarball expands into the <filename>/opt/poky/$SDKVERSION</filename> directory.
145 </para></listitem>
146 <listitem><para>Set up the environment by sourcing the environment set up
147 script.
148 See the <xref linkend='setting-up-the-environment'>“Setting Up the Environment”</xref>
149 for information.
150 </para></listitem>
151 </orderedlist>
152 </para>
153 </section>
52 154
155 <section id='using-the-toolchain-from-within-the-build-tree'>
156 <title>Using the Toolchain from Within the Build Tree</title>
157 <para>
158 A final way of accessing the toolchain is from the build tree.
159 The build tree can be set up to contain the architecture-specific cross toolchain.
160 To populate the build tree with the toolchain you need to run the following command:
161 <literallayout class='monospaced'>
162 $ bitbake meta-ide-support
163 </literallayout>
164 </para>
165
166 <para>
167 Before running the command you need to be sure that the
168 <filename>conf/local.conf</filename> file in the build directory has
169 the desired architecture specified for the <filename>MACHINE</filename>
170 variable.
171 See the <filename>local.conf</filename> file for a list of values you
172 can supply for this variable.
173 You can populate the build tree with the cross-toolchains for more
174 than a single architecture.
175 You just need to edit the <filename>local.conf</filename> file and re-run
176 the BitBake command.
177 </para>
178
179 <para>
180 Once the build tree has the toolchain you need to source the environment
181 setup script so that you can run the cross-tools without having to locate them.
182 See the <xref linkend='setting-up-the-environment'>“Setting Up the Environment”</xref>
183 for information.
184 </para>
185 </section>
186</section>
187
188<section id='setting-up-the-environment'>
189 <title>Setting Up the Environment</title>
190 <para>
191 Before you can use the cross-toolchain you need to set up the environment by
192 sourcing the environment setup script.
193 If you used adt_installer or used an existing ADT tarball to install the ADT,
194 then you can find this script in the <filename>/opt/poky/$SDKVERSION</filename>
195 directory.
196 If you are using the ADT from a Poky build tree, then look in the build
197 directory in <filename>tmp</filename> for the setup script.
198 </para>
199
200 <para>
201 Be sure to run the environment setup script that matches the architecture for
202 which you are developing.
203 Environment setup scripts begin with the string “environment-setup” and include as
204 part of their name the architecture.
205 For example, the environment setup script for a 64-bit IA-based architecture would
206 be the following:
207 <literallayout class='monospaced'>
208 /opt/poky/environment-setup-x86_64-poky-linux
209 </literallayout>
210 </para>
211</section>
212
213<section id='kernels-and-filesystem-images'>
214 <title>Kernels and Filesystem Images</title>
215 <para>
216 You will need to have a kernel and filesystem image to boot using your
217 hardware or the QEMU emulator.
218 That means you either have to build them or know where to get them.
219 You can find lots of details on how to get or build images and kernels for your
220 architecture in the "Yocto Project Quick Start" found at
221 <ulink url='http://www.yoctoproject.org/docs/yocto-quick-start/yocto-project-qs.html'></ulink>.
222 <note>
223 Yocto Project provides basic kernels and filesystem images for several
224 architectures (x86, x86-64, mips, powerpc, and arm) that can be used
225 unaltered in the QEMU emulator.
226 These kernels and filesystem images reside in the Yocto Project release
227 area - <ulink url='http://autobuilder.yoctoproject.org/downloads/yocto-0.9/'></ulink>
228 and are ideal for experimentation within Yocto Project.
229 </note>
230 </para>
231</section>
53 232
54</chapter> 233</chapter>
55<!-- 234<!--