diff options
Diffstat (limited to 'documentation/getting-started/eclipse/html/getting-started/image-generation-dev-environment.html')
-rw-r--r-- | documentation/getting-started/eclipse/html/getting-started/image-generation-dev-environment.html | 178 |
1 files changed, 178 insertions, 0 deletions
diff --git a/documentation/getting-started/eclipse/html/getting-started/image-generation-dev-environment.html b/documentation/getting-started/eclipse/html/getting-started/image-generation-dev-environment.html new file mode 100644 index 0000000000..9f682d082c --- /dev/null +++ b/documentation/getting-started/eclipse/html/getting-started/image-generation-dev-environment.html | |||
@@ -0,0 +1,178 @@ | |||
1 | <html> | ||
2 | <head> | ||
3 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | ||
4 | <title>2.8.5.5. Image Generation</title> | ||
5 | <link rel="stylesheet" type="text/css" href="../book.css"> | ||
6 | <meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> | ||
7 | <link rel="home" href="index.html" title="Getting Started With Yocto Project"> | ||
8 | <link rel="up" href="bitbake-dev-environment.html" title="2.8.5. BitBake"> | ||
9 | <link rel="prev" href="package-splitting-dev-environment.html" title="2.8.5.4. Package Splitting"> | ||
10 | <link rel="next" href="sdk-generation-dev-environment.html" title="2.8.5.6. SDK Generation"> | ||
11 | </head> | ||
12 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="section" title="2.8.5.5. Image Generation"> | ||
13 | <div class="titlepage"><div><div><h4 class="title"> | ||
14 | <a name="image-generation-dev-environment"></a>2.8.5.5. Image Generation</h4></div></div></div> | ||
15 | <p> | ||
16 | Once packages are split and stored in the Package Feeds area, | ||
17 | the OpenEmbedded build system uses BitBake to generate the | ||
18 | root filesystem image: | ||
19 | </p> | ||
20 | <table border="0" summary="manufactured viewport for HTML img" cellspacing="0" cellpadding="0" width="540"><tr style="height: 630px"><td align="center"><img src="figures/image-generation.png" align="middle" width="540"></td></tr></table> | ||
21 | <p> | ||
22 | </p> | ||
23 | <p> | ||
24 | The image generation process consists of several stages and | ||
25 | depends on several tasks and variables. | ||
26 | The | ||
27 | <a class="link" href="../ref-manual/ref-tasks-rootfs.html" target="_self"><code class="filename">do_rootfs</code></a> | ||
28 | task creates the root filesystem (file and directory structure) | ||
29 | for an image. | ||
30 | This task uses several key variables to help create the list | ||
31 | of packages to actually install: | ||
32 | </p> | ||
33 | <div class="itemizedlist"><ul class="itemizedlist" type="disc"> | ||
34 | <li class="listitem"><p><a class="link" href="../ref-manual/var-IMAGE_INSTALL.html" target="_self"><code class="filename">IMAGE_INSTALL</code></a>: | ||
35 | Lists out the base set of packages to install from | ||
36 | the Package Feeds area.</p></li> | ||
37 | <li class="listitem"><p><a class="link" href="../ref-manual/var-PACKAGE_EXCLUDE.html" target="_self"><code class="filename">PACKAGE_EXCLUDE</code></a>: | ||
38 | Specifies packages that should not be installed. | ||
39 | </p></li> | ||
40 | <li class="listitem"><p><a class="link" href="../ref-manual/var-IMAGE_FEATURES.html" target="_self"><code class="filename">IMAGE_FEATURES</code></a>: | ||
41 | Specifies features to include in the image. | ||
42 | Most of these features map to additional packages for | ||
43 | installation.</p></li> | ||
44 | <li class="listitem"><p><a class="link" href="../ref-manual/var-PACKAGE_CLASSES.html" target="_self"><code class="filename">PACKAGE_CLASSES</code></a>: | ||
45 | Specifies the package backend to use and consequently | ||
46 | helps determine where to locate packages within the | ||
47 | Package Feeds area.</p></li> | ||
48 | <li class="listitem"><p><a class="link" href="../ref-manual/var-IMAGE_LINGUAS.html" target="_self"><code class="filename">IMAGE_LINGUAS</code></a>: | ||
49 | Determines the language(s) for which additional | ||
50 | language support packages are installed. | ||
51 | </p></li> | ||
52 | <li class="listitem"><p><a class="link" href="../ref-manual/var-PACKAGE_INSTALL.html" target="_self"><code class="filename">PACKAGE_INSTALL</code></a>: | ||
53 | The final list of packages passed to the package manager | ||
54 | for installation into the image. | ||
55 | </p></li> | ||
56 | </ul></div> | ||
57 | <p> | ||
58 | </p> | ||
59 | <p> | ||
60 | With | ||
61 | <a class="link" href="../ref-manual/var-IMAGE_ROOTFS.html" target="_self"><code class="filename">IMAGE_ROOTFS</code></a> | ||
62 | pointing to the location of the filesystem under construction and | ||
63 | the <code class="filename">PACKAGE_INSTALL</code> variable providing the | ||
64 | final list of packages to install, the root file system is | ||
65 | created. | ||
66 | </p> | ||
67 | <p> | ||
68 | Package installation is under control of the package manager | ||
69 | (e.g. dnf/rpm, opkg, or apt/dpkg) regardless of whether or | ||
70 | not package management is enabled for the target. | ||
71 | At the end of the process, if package management is not | ||
72 | enabled for the target, the package manager's data files | ||
73 | are deleted from the root filesystem. | ||
74 | As part of the final stage of package installation, postinstall | ||
75 | scripts that are part of the packages are run. | ||
76 | Any scripts that fail to run | ||
77 | on the build host are run on the target when the target system | ||
78 | is first booted. | ||
79 | If you are using a | ||
80 | <a class="link" href="../dev-manual/creating-a-read-only-root-filesystem.html" target="_self">read-only root filesystem</a>, | ||
81 | all the post installation scripts must succeed during the | ||
82 | package installation phase since the root filesystem is | ||
83 | read-only. | ||
84 | </p> | ||
85 | <p> | ||
86 | The final stages of the <code class="filename">do_rootfs</code> task | ||
87 | handle post processing. | ||
88 | Post processing includes creation of a manifest file and | ||
89 | optimizations. | ||
90 | </p> | ||
91 | <p> | ||
92 | The manifest file (<code class="filename">.manifest</code>) resides | ||
93 | in the same directory as the root filesystem image. | ||
94 | This file lists out, line-by-line, the installed packages. | ||
95 | The manifest file is useful for the | ||
96 | <a class="link" href="../ref-manual/ref-classes-testimage*.html" target="_self"><code class="filename">testimage</code></a> | ||
97 | class, for example, to determine whether or not to run | ||
98 | specific tests. | ||
99 | See the | ||
100 | <a class="link" href="../ref-manual/var-IMAGE_MANIFEST.html" target="_self"><code class="filename">IMAGE_MANIFEST</code></a> | ||
101 | variable for additional information. | ||
102 | </p> | ||
103 | <p> | ||
104 | Optimizing processes run across the image include | ||
105 | <code class="filename">mklibs</code>, <code class="filename">prelink</code>, | ||
106 | and any other post-processing commands as defined by the | ||
107 | <a class="link" href="../ref-manual/var-ROOTFS_POSTPROCESS_COMMAND.html" target="_self"><code class="filename">ROOTFS_POSTPROCESS_COMMAND</code></a> | ||
108 | variable. | ||
109 | The <code class="filename">mklibs</code> process optimizes the size | ||
110 | of the libraries, while the | ||
111 | <code class="filename">prelink</code> process optimizes the dynamic | ||
112 | linking of shared libraries to reduce start up time of | ||
113 | executables. | ||
114 | </p> | ||
115 | <p> | ||
116 | After the root filesystem is built, processing begins on | ||
117 | the image through the | ||
118 | <a class="link" href="../ref-manual/ref-tasks-image.html" target="_self"><code class="filename">do_image</code></a> | ||
119 | task. | ||
120 | The build system runs any pre-processing commands as defined | ||
121 | by the | ||
122 | <a class="link" href="../ref-manual/var-IMAGE_PREPROCESS_COMMAND.html" target="_self"><code class="filename">IMAGE_PREPROCESS_COMMAND</code></a> | ||
123 | variable. | ||
124 | This variable specifies a list of functions to call before | ||
125 | the OpenEmbedded build system creates the final image output | ||
126 | files. | ||
127 | </p> | ||
128 | <p> | ||
129 | The OpenEmbedded build system dynamically creates | ||
130 | <code class="filename">do_image_*</code> tasks as needed, based | ||
131 | on the image types specified in the | ||
132 | <a class="link" href="../ref-manual/var-IMAGE_FSTYPES.html" target="_self"><code class="filename">IMAGE_FSTYPES</code></a> | ||
133 | variable. | ||
134 | The process turns everything into an image file or a set of | ||
135 | image files and compresses the root filesystem image to reduce | ||
136 | the overall size of the image. | ||
137 | The formats used for the root filesystem depend on the | ||
138 | <code class="filename">IMAGE_FSTYPES</code> variable. | ||
139 | </p> | ||
140 | <p> | ||
141 | As an example, a dynamically created task when creating a | ||
142 | particular image <em class="replaceable"><code>type</code></em> would take the | ||
143 | following form: | ||
144 | </p> | ||
145 | <pre class="literallayout"> | ||
146 | do_image_<em class="replaceable"><code>type</code></em>[depends] | ||
147 | </pre> | ||
148 | <p> | ||
149 | So, if the <em class="replaceable"><code>type</code></em> as specified by the | ||
150 | <code class="filename">IMAGE_FSTYPES</code> were | ||
151 | <code class="filename">ext4</code>, the dynamically generated task | ||
152 | would be as follows: | ||
153 | </p> | ||
154 | <pre class="literallayout"> | ||
155 | do_image_ext4[depends] | ||
156 | </pre> | ||
157 | <p> | ||
158 | </p> | ||
159 | <p> | ||
160 | The final task involved in image creation is the | ||
161 | <a class="link" href="../ref-manual/ref-tasks-image-complete.html" target="_self"><code class="filename">do_image_complete</code></a> | ||
162 | task. | ||
163 | This task completes the image by applying any image | ||
164 | post processing as defined through the | ||
165 | <a class="link" href="../ref-manual/var-IMAGE_POSTPROCESS_COMMAND.html" target="_self"><code class="filename">IMAGE_POSTPROCESS_COMMAND</code></a> | ||
166 | variable. | ||
167 | The variable specifies a list of functions to call once the | ||
168 | OpenEmbedded build system has created the final image output | ||
169 | files. | ||
170 | </p> | ||
171 | <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> | ||
172 | <h3 class="title">Note</h3> | ||
173 | The entire image generation process is run under Pseudo. | ||
174 | Running under Pseudo ensures that the files in the root | ||
175 | filesystem have correct ownership. | ||
176 | </div> | ||
177 | </div></body> | ||
178 | </html> | ||