summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2016-01-19 05:26:02 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-29 17:04:47 +0000
commitd39e9d1451c316083aee809fee22c539d4b8869d (patch)
tree2d1aca21abbd51c96164c832c2160a7ec3250e75 /documentation
parent1e7735e2901c1db0fbc810b102dda4645a0a97a1 (diff)
downloadpoky-d39e9d1451c316083aee809fee22c539d4b8869d.tar.gz
ref-manual: Rewrite of "Image Generation" and devtool text.
Rewrite of devtool reference section. This was a separate commit but got squashed wrong so it ended up with this commit. The changes to "Image Generation" section reflect the new, more detailed image generation figure (From yocto-docs rev: 827c6872b88c17d2d0c8d44b1024fff19076e505) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/dev-manual-model.xml185
-rw-r--r--documentation/ref-manual/closer-look.xml103
2 files changed, 250 insertions, 38 deletions
diff --git a/documentation/dev-manual/dev-manual-model.xml b/documentation/dev-manual/dev-manual-model.xml
index ec11824a56..f82a489fac 100644
--- a/documentation/dev-manual/dev-manual-model.xml
+++ b/documentation/dev-manual/dev-manual-model.xml
@@ -2113,6 +2113,55 @@
2113 </para> 2113 </para>
2114 </section> 2114 </section>
2115 2115
2116 <section id='devtool-extracting-the-source-for-an-existing-recipe'>
2117 <title>Extracting the Source for an Existing Recipe</title>
2118
2119 <para>
2120 Use the <filename>devtool extract</filename> command to
2121 extract the source for an existing recipe.
2122 When you use this command, you must supply the root name
2123 of the recipe (i.e. no version, paths, or extensions), and
2124 you must supply the directory to which you want the source
2125 extracted.
2126 </para>
2127
2128 <para>
2129 Additional command options let you control the name of a
2130 development branch into which you can checkout the source
2131 and whether or not to keep a temporary directory, which is
2132 useful for debugging.
2133 <note>
2134 For complete syntax, use the
2135 <filename>devtool extract --help</filename> command.
2136 </note>
2137 </para>
2138 </section>
2139
2140 <section id='devtool-synchronizing-a-recipes-extracted-source-tree'>
2141 <title>Synchronizing a Recipe's Extracted Source Tree</title>
2142
2143 <para>
2144 Use the <filename>devtool sync</filename> command to
2145 synchronize a previously extracted source tree for an
2146 existing recipe.
2147 When you use this command, you must supply the root name
2148 of the recipe (i.e. no version, paths, or extensions), and
2149 you must supply the directory to which you want the source
2150 extracted.
2151 </para>
2152
2153 <para>
2154 Additional command options let you control the name of a
2155 development branch into which you can checkout the source
2156 and whether or not to keep a temporary directory, which is
2157 useful for debugging.
2158 <note>
2159 For complete syntax, use the
2160 <filename>devtool sync --help</filename> command.
2161 </note>
2162 </para>
2163 </section>
2164
2116 <section id='devtool-modifying-a-recipe'> 2165 <section id='devtool-modifying-a-recipe'>
2117 <title>Modifying an Existing Recipe</title> 2166 <title>Modifying an Existing Recipe</title>
2118 2167
@@ -2146,6 +2195,33 @@
2146 </para> 2195 </para>
2147 </section> 2196 </section>
2148 2197
2198 <section id='devtool-edit-an-existing-recipe'>
2199 <title>Edit an Existing Recipe</title>
2200
2201 <para>
2202 Use the <filename>devtool edit-recipe</filename> command
2203 to run the default editor, which is identified using the
2204 <filename>EDITOR</filename> variable, on the specified recipe.
2205 </para>
2206
2207 <para>
2208 When you use the <filename>devtool edit-recipe</filename>
2209 command, you must supply the root name of the recipe
2210 (i.e. no version, paths, or extensions).
2211 Also, the recipe file itself must reside in the workspace
2212 as a result of the <filename>devtool add</filename> or
2213 <filename>devtool upgrade</filename> commands.
2214 However, you can override that requirement by using the
2215 "-a" or "--any-recipe" option.
2216 Using either of these options allows you to edit any recipe
2217 regardless of its location.
2218 <note>
2219 For complete syntax, use the
2220 <filename>devtool edit-recipe --help</filename> command.
2221 </note>
2222 </para>
2223 </section>
2224
2149 <section id='devtool-updating-a-recipe'> 2225 <section id='devtool-updating-a-recipe'>
2150 <title>Updating a Recipe</title> 2226 <title>Updating a Recipe</title>
2151 2227
@@ -2199,6 +2275,36 @@
2199 </para> 2275 </para>
2200 </section> 2276 </section>
2201 2277
2278 <section id='devtool-upgrading-a-recipe'>
2279 <title>Upgrading a Recipe</title>
2280
2281 <para>
2282 Use the <filename>devtool upgrade</filename> command
2283 to upgrade an existing recipe to a new upstream version.
2284 The command puts the upgraded recipe file into the
2285 workspace along with any associated files, and extracts
2286 the source tree to a specified location should patches
2287 need rebased or added to as a result of the upgrade.
2288 </para>
2289
2290 <para>
2291 When you use the <filename>devtool upgrade</filename> command,
2292 you must supply the root name of the recipe (i.e. no version,
2293 paths, or extensions), and you must supply the directory
2294 to which you want the source extracted.
2295 Additional command options let you control things such as
2296 the version number to which you want to upgrade (i.e. the
2297 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>),
2298 the source revision to which you want to upgrade (i.e. the
2299 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>,
2300 whether or not to apply patches, and so forth.
2301 <note>
2302 For complete syntax, use the
2303 <filename>devtool upgrade --help</filename> command.
2304 </note>
2305 </para>
2306 </section>
2307
2202 <section id='devtool-resetting-a-recipe'> 2308 <section id='devtool-resetting-a-recipe'>
2203 <title>Resetting a Recipe</title> 2309 <title>Resetting a Recipe</title>
2204 2310
@@ -2227,15 +2333,22 @@
2227 </para> 2333 </para>
2228 </section> 2334 </section>
2229 2335
2230 <section id='devtool-building-your-software'> 2336 <section id='devtool-building-your-recipe'>
2231 <title>Building Your Software</title> 2337 <title>Building Your Recipe</title>
2232 2338
2233 <para> 2339 <para>
2234 Use the <filename>devtool build</filename> command to cause the 2340 Use the <filename>devtool build</filename> command to cause the
2235 OpenEmbedded build system to build your software based 2341 OpenEmbedded build system to build your recipe.
2236 on the recipe file.
2237 The <filename>devtool build</filename> command is equivalent to 2342 The <filename>devtool build</filename> command is equivalent to
2238 <filename>bitbake -c populate_sysroot</filename>. 2343 <filename>bitbake -c populate_sysroot</filename>.
2344 </para>
2345
2346 <para>
2347 When you use the <filename>devtool build</filename> command,
2348 you must supply the root name of the recipe (i.e. no version,
2349 paths, or extensions).
2350 You can use either the "-s" or the "--disable-parallel-make"
2351 option to disable parallel makes during the build.
2239 Here is an example: 2352 Here is an example:
2240 <literallayout class='monospaced'> 2353 <literallayout class='monospaced'>
2241 $ devtool build <replaceable>recipe</replaceable> 2354 $ devtool build <replaceable>recipe</replaceable>
@@ -2244,8 +2357,25 @@
2244 For complete syntax, use the 2357 For complete syntax, use the
2245 <filename>devtool build --help</filename> command. 2358 <filename>devtool build --help</filename> command.
2246 </note> 2359 </note>
2247 Building your software using <filename>devtool build</filename> 2360 </para>
2248 is identical to using BitBake to build the software. 2361 </section>
2362
2363 <section id='devtool-building-your-image'>
2364 <title>Building Your Image</title>
2365
2366 <para>
2367 Use the <filename>devtool build-image</filename> command
2368 to build an image, extending it to include packages from
2369 recipes in the workspace.
2370 </para>
2371
2372 <para>
2373 When you use the <filename>devtool build-image</filename>
2374 command, you must supply the name of the image.
2375 This command has no command line options:
2376 <literallayout class='monospaced'>
2377 $ devtool build-image <replaceable>image</replaceable>
2378 </literallayout>
2249 </para> 2379 </para>
2250 </section> 2380 </section>
2251 2381
@@ -2345,6 +2475,49 @@
2345 </literallayout> 2475 </literallayout>
2346 </para> 2476 </para>
2347 </section> 2477 </section>
2478
2479 <section id='devtool-get-the-status-of-the-recipes-in-your-workspace'>
2480 <title>Get the Status of the Recipes in Your Workspace</title>
2481
2482 <para>
2483 Use the <filename>devtool status</filename> command to
2484 list the recipes currently in your workspace.
2485 Information includes the paths to their respective
2486 external source trees.
2487 </para>
2488
2489 <para>
2490 The <filename>devtool status</filename> command has no
2491 command-line options:
2492 <literallayout class='monospaced'>
2493 devtool status
2494 </literallayout>
2495 </para>
2496 </section>
2497
2498 <section id='devtool-search-for-available-target-recipes'>
2499 <title>Search for Available Target Recipes</title>
2500
2501 <para>
2502 Use the <filename>devtool search</filename> command to
2503 search for available target recipes.
2504 The command matches the recipe name, package name,
2505 description, and installed files.
2506 The command displays the recipe name as a result of a
2507 match.
2508 </para>
2509
2510 <para>
2511 When you use the <filename>devtool search</filename> command,
2512 you must supply a <replaceable>keyword</replaceable>.
2513 The command uses the <replaceable>keyword</replaceable> when
2514 searching for a match.
2515 <note>
2516 For complete syntax, use the
2517 <filename>devtool search --help</filename> command.
2518 </note>
2519 </para>
2520 </section>
2348 </section> 2521 </section>
2349 2522
2350 <section id="using-a-quilt-workflow"> 2523 <section id="using-a-quilt-workflow">
diff --git a/documentation/ref-manual/closer-look.xml b/documentation/ref-manual/closer-look.xml
index bb7624c9e8..c05972e9ec 100644
--- a/documentation/ref-manual/closer-look.xml
+++ b/documentation/ref-manual/closer-look.xml
@@ -993,11 +993,13 @@
993 993
994 <para> 994 <para>
995 The image generation process consists of several stages and 995 The image generation process consists of several stages and
996 depends on many variables. 996 depends on several tasks and variables.
997 The 997 The
998 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link> 998 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
999 task uses these key variables 999 task creates the root filesystem (file and directory structure)
1000 to help create the list of packages to actually install: 1000 for an image.
1001 This task uses several key variables to help create the list
1002 of packages to actually install:
1001 <itemizedlist> 1003 <itemizedlist>
1002 <listitem><para><link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>: 1004 <listitem><para><link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>:
1003 Lists out the base set of packages to install from 1005 Lists out the base set of packages to install from
@@ -1017,23 +1019,34 @@
1017 Determines the language(s) for which additional 1019 Determines the language(s) for which additional
1018 language support packages are installed. 1020 language support packages are installed.
1019 </para></listitem> 1021 </para></listitem>
1022 <listitem><para><link linkend='var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></link>:
1023 The final list of packages passed to the package manager
1024 for installation into the image.
1025 </para></listitem>
1020 </itemizedlist> 1026 </itemizedlist>
1021 </para> 1027 </para>
1022 1028
1023 <para> 1029 <para>
1030 With
1031 <link linkend='var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></link>
1032 pointing to the location of the filesystem under construction and
1033 the <filename>PACKAGE_INSTALL</filename> variable providing the
1034 final list of packages to install, the root file system is
1035 created.
1036 </para>
1037
1038 <para>
1024 Package installation is under control of the package manager 1039 Package installation is under control of the package manager
1025 (e.g. smart/rpm, opkg, or apt/dpkg) regardless of whether or 1040 (e.g. smart/rpm, opkg, or apt/dpkg) regardless of whether or
1026 not package management is enabled for the target. 1041 not package management is enabled for the target.
1027 At the end of the process, if package management is not 1042 At the end of the process, if package management is not
1028 enabled for the target, the package manager's data files 1043 enabled for the target, the package manager's data files
1029 are deleted from the root filesystem. 1044 are deleted from the root filesystem.
1030 </para> 1045 As part of the final stage of package installation, postinstall
1031 1046 scripts that are part of the packages are run.
1032 <para> 1047 Any scripts that fail to run
1033 During image generation, the build system attempts to run 1048 on the build host are run on the target when the target system
1034 all post-installation scripts. 1049 is first booted.
1035 Any that fail to run on the build host are run on the
1036 target when the target system is first booted.
1037 If you are using a 1050 If you are using a
1038 <ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>read-only root filesystem</ulink>, 1051 <ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>read-only root filesystem</ulink>,
1039 all the post installation scripts must succeed during the 1052 all the post installation scripts must succeed during the
@@ -1042,24 +1055,17 @@
1042 </para> 1055 </para>
1043 1056
1044 <para> 1057 <para>
1045 During Optimization, optimizing processes are run across 1058 The final stages of the <filename>do_rootfs</filename> task
1046 the image. 1059 handle post processing.
1047 These processes include <filename>mklibs</filename> and 1060 Post processing includes creation of a manifest file and
1048 <filename>prelink</filename>. 1061 optimizations.
1049 The <filename>mklibs</filename> process optimizes the size
1050 of the libraries.
1051 A <filename>prelink</filename> process optimizes the dynamic
1052 linking of shared libraries to reduce start up time of
1053 executables.
1054 </para> 1062 </para>
1055 1063
1056 <para> 1064 <para>
1057 Along with writing out the root filesystem image, the 1065 The manifest file (<filename>.manifest</filename>) resides
1058 <filename>do_rootfs</filename> task creates a manifest file 1066 in the same directory as the root filesystem image.
1059 (<filename>.manifest</filename>) in the same directory as 1067 This file lists out, line-by-line, the installed packages.
1060 the root filesystem image that lists out, line-by-line, the 1068 The manifest file is useful for the
1061 installed packages.
1062 This manifest file is useful for the
1063 <link linkend='ref-classes-testimage*'><filename>testimage</filename></link> 1069 <link linkend='ref-classes-testimage*'><filename>testimage</filename></link>
1064 class, for example, to determine whether or not to run 1070 class, for example, to determine whether or not to run
1065 specific tests. 1071 specific tests.
@@ -1069,21 +1075,54 @@
1069 </para> 1075 </para>
1070 1076
1071 <para> 1077 <para>
1072 Part of the image generation process includes compressing the 1078 Optimizing processes run across the image include
1073 root filesystem image. 1079 <filename>mklibs</filename>, <filename>prelink</filename>,
1074 Compression is accomplished through several optimization 1080 and any other post-processing commands as defined by the
1075 routines designed to reduce the overall size of the image. 1081 <link linkend='var-ROOTFS_POSTPROCESS_COMMAND'><filename>ROOTFS_POSTPROCESS_COMMAND</filename></link>
1082 variable.
1083 The <filename>mklibs</filename> process optimizes the size
1084 of the libraries, while the
1085 <filename>prelink</filename> process optimizes the dynamic
1086 linking of shared libraries to reduce start up time of
1087 executables.
1088 </para>
1089
1090 <para>
1091 After the root filesystem is built, processing begins on
1092 the image through the <filename>do_image</filename> task.
1093 The build system runs any pre-processing commands as defined
1094 by the
1095 <link linkend='var-IMAGE_PREPROCESS_COMMAND'><filename>IMAGE_PREPROCESS_COMMAND</filename></link>
1096 variable.
1097 This variable specifies a list of functions to call before
1098 the OpenEmbedded build system creates the final image output
1099 files.
1076 </para> 1100 </para>
1077 1101
1078 <para> 1102 <para>
1079 After the root filesystem has been constructed, the image 1103 The <filename>do_image</filename> task dynamically creates
1080 generation process turns everything into an image file or 1104 other <filename>do_image_*</filename> tasks as needed, which
1081 a set of image files. 1105 include compressing the root filesystem image to reduce the
1106 overall size of the image.
1107 The process turns everything into an image file or a set of
1108 image files.
1082 The formats used for the root filesystem depend on the 1109 The formats used for the root filesystem depend on the
1083 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link> 1110 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
1084 variable. 1111 variable.
1085 </para> 1112 </para>
1086 1113
1114 <para>
1115 The final task involved in image creation is the
1116 <filename>do_image_complete</filename> task.
1117 This task completes the image by applying any image
1118 post processing as defined through the
1119 <link linkend='var-IMAGE_POSTPROCESS_COMMAND'><filename>IMAGE_POSTPROCESS_COMMAND</filename></link>
1120 variable.
1121 The variable specifies a list of functions to call once the
1122 OpenEmbedded build system has created the final image output
1123 files.
1124 </para>
1125
1087 <note> 1126 <note>
1088 The entire image generation process is run under Pseudo. 1127 The entire image generation process is run under Pseudo.
1089 Running under Pseudo ensures that the files in the root 1128 Running under Pseudo ensures that the files in the root