diff options
author | Scott Rifenbark <srifenbark@gmail.com> | 2018-05-16 14:23:23 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-05-24 17:18:05 +0100 |
commit | 4b3c17707b238b53dcc21857aafd77e1733c8b9d (patch) | |
tree | 463964a3bf29d0400742715ae212cf6cedf67946 /documentation/dev-manual/dev-manual-start.xml | |
parent | b43a1706c322165898b0f5f5000525107c2877c4 (diff) | |
download | poky-4b3c17707b238b53dcc21857aafd77e1733c8b9d.tar.gz |
dev-manual: Moved the "Simple Build" section
I had a section on building an image up in chapter that talks about
getting set up to use YP. I moved the build section to a new parent
section that will hold topics on building various things. I renamed
the section to "Building a Simple Image". I had to fix several links
in the sdk-manual, overview-manual, and dev-manual.
(From yocto-docs rev: c119fc7c6148e7b08acad374fe2981842e9462a3)
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual/dev-manual-start.xml')
-rw-r--r-- | documentation/dev-manual/dev-manual-start.xml | 140 |
1 files changed, 0 insertions, 140 deletions
diff --git a/documentation/dev-manual/dev-manual-start.xml b/documentation/dev-manual/dev-manual-start.xml index a1b502b8eb..201cbe7340 100644 --- a/documentation/dev-manual/dev-manual-start.xml +++ b/documentation/dev-manual/dev-manual-start.xml | |||
@@ -1080,146 +1080,6 @@ | |||
1080 | </section> | 1080 | </section> |
1081 | </section> | 1081 | </section> |
1082 | 1082 | ||
1083 | <section id='dev-building-an-image'> | ||
1084 | <title>Building an Image</title> | ||
1085 | |||
1086 | <para> | ||
1087 | In the development environment, you need to build an image whenever | ||
1088 | you change hardware support, add or change system libraries, or add | ||
1089 | or change services that have dependencies. | ||
1090 | Several methods exist that allow you to build an image within the | ||
1091 | Yocto Project. | ||
1092 | This section shows you how to build an image using BitBake from a | ||
1093 | Linux host. | ||
1094 | <note><title>Notes</title> | ||
1095 | <itemizedlist> | ||
1096 | <listitem><para> | ||
1097 | For information on how to build an image using | ||
1098 | <ulink url='&YOCTO_DOCS_REF_URL;#toaster-term'>Toaster</ulink>, | ||
1099 | see the | ||
1100 | <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>. | ||
1101 | </para></listitem> | ||
1102 | <listitem><para> | ||
1103 | For information on how to use | ||
1104 | <filename>devtool</filename> to build images, see the | ||
1105 | "<ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'>Using <filename>devtool</filename> in Your SDK Workflow</ulink>" | ||
1106 | section in the Yocto Project Application Development and | ||
1107 | the Extensible Software Development Kit (eSDK) manual. | ||
1108 | </para></listitem> | ||
1109 | <listitem><para> | ||
1110 | For a quick example on how to build an image using the | ||
1111 | OpenEmbedded build system, see the | ||
1112 | <ulink url='&YOCTO_DOCS_BRIEF_URL;'>Yocto Project Quick Build</ulink> | ||
1113 | document. | ||
1114 | </para></listitem> | ||
1115 | </itemizedlist> | ||
1116 | </note> | ||
1117 | </para> | ||
1118 | |||
1119 | <para> | ||
1120 | The build process creates an entire Linux distribution from source | ||
1121 | and places it in your | ||
1122 | <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink> | ||
1123 | under <filename>tmp/deploy/images</filename>. | ||
1124 | For detailed information on the build process using BitBake, see the | ||
1125 | "<ulink url='&YOCTO_DOCS_OM_URL;#images-dev-environment'>Images</ulink>" | ||
1126 | section in the Yocto Project Overview and Concepts Manual. | ||
1127 | </para> | ||
1128 | |||
1129 | <para> | ||
1130 | The following figure and list overviews the build process: | ||
1131 | <imagedata fileref="figures/bitbake-build-flow.png" width="7in" depth="4in" align="center" scalefit="1" /> | ||
1132 | <orderedlist> | ||
1133 | <listitem><para> | ||
1134 | <emphasis>Set up Your Host Development System to Support | ||
1135 | Development Using the Yocto Project</emphasis>: | ||
1136 | See the | ||
1137 | "<link linkend='dev-manual-start'>Setting Up to Use the Yocto Project</link>" | ||
1138 | section for options on how to get a build host ready to use | ||
1139 | the Yocto Project. | ||
1140 | </para></listitem> | ||
1141 | <listitem><para> | ||
1142 | <emphasis>Initialize the Build Environment:</emphasis> | ||
1143 | Initialize the build environment by sourcing the build | ||
1144 | environment script (i.e. | ||
1145 | <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>): | ||
1146 | <literallayout class='monospaced'> | ||
1147 | $ source &OE_INIT_FILE; [<replaceable>build_dir</replaceable>] | ||
1148 | </literallayout></para> | ||
1149 | |||
1150 | <para>When you use the initialization script, the | ||
1151 | OpenEmbedded build system uses <filename>build</filename> as | ||
1152 | the default Build Directory in your current work directory. | ||
1153 | You can use a <replaceable>build_dir</replaceable> argument | ||
1154 | with the script to specify a different build directory. | ||
1155 | <note><title>Tip</title> | ||
1156 | A common practice is to use a different Build Directory for | ||
1157 | different targets. | ||
1158 | For example, <filename>~/build/x86</filename> for a | ||
1159 | <filename>qemux86</filename> target, and | ||
1160 | <filename>~/build/arm</filename> for a | ||
1161 | <filename>qemuarm</filename> target. | ||
1162 | </note> | ||
1163 | </para></listitem> | ||
1164 | <listitem><para> | ||
1165 | <emphasis>Make Sure Your <filename>local.conf</filename> | ||
1166 | File is Correct:</emphasis> | ||
1167 | Ensure the <filename>conf/local.conf</filename> configuration | ||
1168 | file, which is found in the Build Directory, | ||
1169 | is set up how you want it. | ||
1170 | This file defines many aspects of the build environment | ||
1171 | including the target machine architecture through the | ||
1172 | <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'>MACHINE</ulink></filename> variable, | ||
1173 | the packaging format used during the build | ||
1174 | (<ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>), | ||
1175 | and a centralized tarball download directory through the | ||
1176 | <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink> variable. | ||
1177 | </para></listitem> | ||
1178 | <listitem><para> | ||
1179 | <emphasis>Build the Image:</emphasis> | ||
1180 | Build the image using the <filename>bitbake</filename> command: | ||
1181 | <literallayout class='monospaced'> | ||
1182 | $ bitbake <replaceable>target</replaceable> | ||
1183 | </literallayout> | ||
1184 | <note> | ||
1185 | For information on BitBake, see the | ||
1186 | <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>. | ||
1187 | </note> | ||
1188 | The <replaceable>target</replaceable> is the name of the | ||
1189 | recipe you want to build. | ||
1190 | Common targets are the images in | ||
1191 | <filename>meta/recipes-core/images</filename>, | ||
1192 | <filename>meta/recipes-sato/images</filename>, etc. all found | ||
1193 | in the | ||
1194 | <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>. | ||
1195 | Or, the target can be the name of a recipe for a specific | ||
1196 | piece of software such as BusyBox. | ||
1197 | For more details about the images the OpenEmbedded build | ||
1198 | system supports, see the | ||
1199 | "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" | ||
1200 | chapter in the Yocto Project Reference Manual.</para> | ||
1201 | |||
1202 | <para>As an example, the following command builds the | ||
1203 | <filename>core-image-minimal</filename> image: | ||
1204 | <literallayout class='monospaced'> | ||
1205 | $ bitbake core-image-minimal | ||
1206 | </literallayout> | ||
1207 | Once an image has been built, it often needs to be installed. | ||
1208 | The images and kernels built by the OpenEmbedded build system | ||
1209 | are placed in the Build Directory in | ||
1210 | <filename class="directory">tmp/deploy/images</filename>. | ||
1211 | For information on how to run pre-built images such as | ||
1212 | <filename>qemux86</filename> and <filename>qemuarm</filename>, | ||
1213 | see the | ||
1214 | <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink> | ||
1215 | manual. | ||
1216 | For information about how to install these images, see the | ||
1217 | documentation for your particular board or machine. | ||
1218 | </para></listitem> | ||
1219 | </orderedlist> | ||
1220 | </para> | ||
1221 | </section> | ||
1222 | |||
1223 | <section id='speeding-up-the-build'> | 1083 | <section id='speeding-up-the-build'> |
1224 | <title>Speeding Up the Build</title> | 1084 | <title>Speeding Up the Build</title> |
1225 | 1085 | ||