summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2018-04-23 11:12:04 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-24 17:16:24 +0100
commitb5b17600eac1b2412ff3df5c5ef019ca04221b7e (patch)
tree00fb4accdd0c84d8ced0bfa26ba871314a354731 /documentation/dev-manual
parent41aad5937727e82e53ac99dc526e4009d9f85e99 (diff)
downloadpoky-b5b17600eac1b2412ff3df5c5ef019ca04221b7e.tar.gz
dev-manual: Updated managing granular level packaging discussion.
In the section that talks about building an image for multiple machines, there was a bullet item on managing granular level packaging. It had an old example that used the "daisy" release that showed how to share packages and re-use binaries. I replaced the example with a discussion of Freescale's "fsl-dynamic-packagearch" class, which does this type of sharing. (From yocto-docs rev: ddc224d6d1fe172292dfd0a17f743a1e0a4cabe6) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml75
1 files changed, 43 insertions, 32 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 9a7682c3e2..6b9f3aa786 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -8140,13 +8140,15 @@ Some notes from Cal:
8140 cause the OpenEmbedded build system to reuse software across the 8140 cause the OpenEmbedded build system to reuse software across the
8141 various machines where it makes sense. 8141 various machines where it makes sense.
8142 </para> 8142 </para>
8143
8143 <para> 8144 <para>
8144 If build speed and package feed maintenance are considerations, 8145 If build speed and package feed maintenance are considerations,
8145 you should consider the points in this section that can help you 8146 you should consider the points in this section that can help you
8146 optimize your tunings to best consider build times and package 8147 optimize your tunings to best consider build times and package
8147 feed maintenance. 8148 feed maintenance.
8148 <itemizedlist> 8149 <itemizedlist>
8149 <listitem><para><emphasis>Share the Build Directory:</emphasis> 8150 <listitem><para>
8151 <emphasis>Share the Build Directory:</emphasis>
8150 If at all possible, share the 8152 If at all possible, share the
8151 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink> 8153 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
8152 across builds. 8154 across builds.
@@ -8172,7 +8174,8 @@ Some notes from Cal:
8172 <filename>TMPDIR</filename>. 8174 <filename>TMPDIR</filename>.
8173 </note> 8175 </note>
8174 </para></listitem> 8176 </para></listitem>
8175 <listitem><para><emphasis>Enable the Appropriate Package Architecture:</emphasis> 8177 <listitem><para>
8178 <emphasis>Enable the Appropriate Package Architecture:</emphasis>
8176 By default, the OpenEmbedded build system enables three 8179 By default, the OpenEmbedded build system enables three
8177 levels of package architectures: "all", "tune" or "package", 8180 levels of package architectures: "all", "tune" or "package",
8178 and "machine". 8181 and "machine".
@@ -8181,6 +8184,7 @@ Some notes from Cal:
8181 Depending for what a given recipe creates packages, making 8184 Depending for what a given recipe creates packages, making
8182 sure you enable the appropriate package architecture can 8185 sure you enable the appropriate package architecture can
8183 directly impact the build time.</para> 8186 directly impact the build time.</para>
8187
8184 <para>A recipe that just generates scripts can enable 8188 <para>A recipe that just generates scripts can enable
8185 "all" architecture because there are no binaries to build. 8189 "all" architecture because there are no binaries to build.
8186 To specifically enable "all" architecture, be sure your 8190 To specifically enable "all" architecture, be sure your
@@ -8190,6 +8194,7 @@ Some notes from Cal:
8190 This class is useful for "all" architectures because it 8194 This class is useful for "all" architectures because it
8191 configures many variables so packages can be used across 8195 configures many variables so packages can be used across
8192 multiple architectures.</para> 8196 multiple architectures.</para>
8197
8193 <para>If your recipe needs to generate packages that are 8198 <para>If your recipe needs to generate packages that are
8194 machine-specific or when one of the build or runtime 8199 machine-specific or when one of the build or runtime
8195 dependencies is already machine-architecture dependent, 8200 dependencies is already machine-architecture dependent,
@@ -8211,7 +8216,8 @@ Some notes from Cal:
8211 PACKAGE_ARCH = "${TUNE_PKGARCH}" 8216 PACKAGE_ARCH = "${TUNE_PKGARCH}"
8212 </literallayout> 8217 </literallayout>
8213 </para></listitem> 8218 </para></listitem>
8214 <listitem><para><emphasis>Choose a Generic Tuning File if Possible:</emphasis> 8219 <listitem><para>
8220 <emphasis>Choose a Generic Tuning File if Possible:</emphasis>
8215 Some tunes are more generic and can run on multiple targets 8221 Some tunes are more generic and can run on multiple targets
8216 (e.g. an <filename>armv5</filename> set of packages could 8222 (e.g. an <filename>armv5</filename> set of packages could
8217 run on <filename>armv6</filename> and 8223 run on <filename>armv6</filename> and
@@ -8220,6 +8226,7 @@ Some notes from Cal:
8220 on <filename>i586</filename> and higher processors. 8226 on <filename>i586</filename> and higher processors.
8221 You should realize, however, that advances on newer 8227 You should realize, however, that advances on newer
8222 processor versions would not be used.</para> 8228 processor versions would not be used.</para>
8229
8223 <para>If you select the same tune for several different 8230 <para>If you select the same tune for several different
8224 machines, the OpenEmbedded build system reuses software 8231 machines, the OpenEmbedded build system reuses software
8225 previously built, thus speeding up the overall build time. 8232 previously built, thus speeding up the overall build time.
@@ -8227,34 +8234,35 @@ Some notes from Cal:
8227 generated, the software is not recompiled and only one 8234 generated, the software is not recompiled and only one
8228 package feed exists. 8235 package feed exists.
8229 </para></listitem> 8236 </para></listitem>
8230 <listitem><para><emphasis>Manage Granular Level Packaging:</emphasis> 8237 <listitem><para>
8231 Sometimes cases exist where injecting another level 8238 <emphasis>Manage Granular Level Packaging:</emphasis>
8232 of package architecture beyond the three higher levels 8239 Sometimes cases exist where injecting another level of
8233 noted earlier can be useful. 8240 package architecture beyond the three higher levels noted
8234 For example, consider the <filename>emgd</filename> 8241 earlier can be useful.
8235 graphics stack in the 8242 For example, consider how NXP (formerly Freescale) allows
8236 <filename>meta-intel</filename> layer. 8243 for the easy reuse of binary packages in their layer
8237 In this layer, a subset of software exists that is 8244 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/meta-freescale/'><filename>meta-freescale</filename></ulink>.
8238 compiled against something different from the rest of the 8245 In this example, the
8239 generic packages. 8246 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/meta-freescale/tree/classes/fsl-dynamic-packagearch.bbclass'><filename>fsl-dynamic-packagearch</filename></ulink>
8240 You can examine the key code in the 8247 class shares GPU packages for i.MX53 boards because
8241 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi'>Source Repositories</ulink> 8248 all boards share the AMD GPU.
8242 "daisy" branch in 8249 The i.MX6-based boards can do the same because all boards
8243 <filename>classes/emgd-gl.bbclass</filename>. 8250 share the Vivante GPU.
8244 For a specific set of packages, the code redefines 8251 This class inspects the BitBake datastore to identify if
8245 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>. 8252 the package provides or depends on one of the
8246 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_EXTRA_ARCHS'><filename>PACKAGE_EXTRA_ARCHS</filename></ulink> 8253 sub-architecture values.
8247 is then appended with this extra tune name in 8254 If so, the class sets the
8248 <filename>meta-intel-emgd.inc</filename>. 8255 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>
8249 The result is that when searching for packages, the 8256 value as <filename>MACHINE_SUBARCH</filename>.
8250 build system uses a four-level search and the packages 8257 If the package does not provide or depend on one of the
8251 in this new level are preferred as compared to the standard 8258 sub-architecture values but it matches a value in the
8252 tune. 8259 machine-specific filter, it sets
8253 The overall result is that the build system reuses most 8260 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ARCH'><filename>MACHINE_ARCH</filename></ulink>.
8254 software from the common tune except for specific cases 8261 This behavior reduces the number of packages built and
8255 as needed. 8262 saves build time by reusing binaries.
8256 </para></listitem> 8263 </para></listitem>
8257 <listitem><para><emphasis>Use Tools to Debug Issues:</emphasis> 8264 <listitem><para>
8265 <emphasis>Use Tools to Debug Issues:</emphasis>
8258 Sometimes you can run into situations where software is 8266 Sometimes you can run into situations where software is
8259 being rebuilt when you think it should not be. 8267 being rebuilt when you think it should not be.
8260 For example, the OpenEmbedded build system might not be 8268 For example, the OpenEmbedded build system might not be
@@ -8279,17 +8287,20 @@ Some notes from Cal:
8279 Patches to fix any issues identified are most welcome 8287 Patches to fix any issues identified are most welcome
8280 as these issues occasionally do occur. 8288 as these issues occasionally do occur.
8281 </note></para> 8289 </note></para>
8290
8282 <para>For such cases, you can use some tools to help you 8291 <para>For such cases, you can use some tools to help you
8283 sort out the situation: 8292 sort out the situation:
8284 <itemizedlist> 8293 <itemizedlist>
8285 <listitem><para><emphasis><filename>sstate-diff-machines.sh</filename>:</emphasis> 8294 <listitem><para>
8295 <emphasis><filename>sstate-diff-machines.sh</filename>:</emphasis>
8286 You can find this tool in the 8296 You can find this tool in the
8287 <filename>scripts</filename> directory of the 8297 <filename>scripts</filename> directory of the
8288 Source Repositories. 8298 Source Repositories.
8289 See the comments in the script for information on 8299 See the comments in the script for information on
8290 how to use the tool. 8300 how to use the tool.
8291 </para></listitem> 8301 </para></listitem>
8292 <listitem><para><emphasis>BitBake's "-S printdiff" Option:</emphasis> 8302 <listitem><para>
8303 <emphasis>BitBake's "-S printdiff" Option:</emphasis>
8293 Using this option causes BitBake to try to 8304 Using this option causes BitBake to try to
8294 establish the closest signature match it can 8305 establish the closest signature match it can
8295 (e.g. in the shared state cache) and then run 8306 (e.g. in the shared state cache) and then run