summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2014-06-02 18:57:39 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-18 10:30:44 +0100
commit59b50ea598538cb9ad9933ba28f9514052258d00 (patch)
tree760bad3319f5a0d6b1fecf1a77418d1dfd0ca77d /documentation
parent95a5fadc15e1cf297023a0592b65791d59d29807 (diff)
downloadpoky-59b50ea598538cb9ad9933ba28f9514052258d00.tar.gz
dev-manual: Edits to "Creating a Custom Template Configuration Directory"
Fixes [YOCTO #5895] I applied some review comments from Paul to tighten up this section. (From yocto-docs rev: 9f17ad00e9e707fcd6f2419762b4281d64f4ed0f) 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/dev-manual/dev-manual-common-tasks.xml224
1 files changed, 111 insertions, 113 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 8b2613aa12..2968b4d3c0 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -888,119 +888,6 @@
888 </section> 888 </section>
889 </section> 889 </section>
890 890
891 <section id='creating-a-custom-template-configuration-directory'>
892 <title>Creating a Custom Template Configuration Directory</title>
893
894 <para>
895 You might find yourself repeating the same configurations for
896 a particular build or group of builds.
897 If so, rather than repeatedly editing your
898 <filename>local.conf</filename> and possibly your
899 <filename>bblayers.conf</filename>, you can set up a
900 custom directory that has your configurations, and then
901 point the OpenEmbedded build system to that directory to find
902 the configurations.
903 </para>
904
905 <para>
906 The OpenEmbedded build system uses the environment variable
907 <filename>TEMPLATECONF</filename> to point to the directory
908 from which it gathers configuration information that ultimately
909 ends up in the
910 <link linkend='build-directory'>Build Directory's</link>
911 <filename>conf</filename> directory.
912 By default, <filename>TEMPLATECONF</filename> points here:
913 <literallayout class='monospaced'>
914 TEMPLATECONF=${TEMPLATECONF:-meta-yocto/conf}
915 </literallayout>
916 This is the directory that the build system finds templates
917 with which to build some key configuration files.
918 If you look at this directory, you will see the
919 <filename>bblayers.conf.sample</filename>,
920 <filename>local.conf.sample</filename>, and
921 <filename>site.conf.sample</filename> configuration files.
922 The build system uses these files to form the respective
923 <filename>bblayers.conf</filename>,
924 <filename>local.conf</filename>, and the
925 <filename>site.conf</filename> configuration files it places in
926 the <filename>conf</filename> directory with the
927 Build Directory.
928 </para>
929
930 <para>
931 To override these default configuration files with
932 configurations you want used with every build, simply point the
933 <filename>TEMPLATECONF</filename> to your directory.
934 The <filename>TEMPLATECONF</filename> variable is set in the
935 <filename>.templateconf</filename> file, which is in the
936 top-level
937 <link linkend='source-directory'>Source Directory</link>
938 folder (e.g. <filename>poky</filename>).
939 Edit the <filename>.templateconf</filename> so that it points
940 to your directory.
941 Best practices dictate that you should keep your
942 template configuration directory in your custom distribution layer.
943 For example, suppose you have a layer named
944 <filename>meta-mylayer</filename> located in your home directory
945 and you want your template configuration directory named
946 <filename>myconf</filename>.
947 Changing the <filename>.templateconf</filename> as follows
948 causes the OpenEmbedded build system to look in your directory
949 and base its configuration files on the
950 <filename>*.sample</filename> configuration files it finds.
951 The final configuration files (i.e.
952 <filename>local.conf</filename> and
953 <filename>bblayers.conf</filename> ultimately still end up in
954 your Build Directory, but they are based on your
955 <filename>*.sample</filename> files.
956 <literallayout class='monospaced'>
957 TEMPLATECONF=${TEMPLATECONF:-meta-mylayer/myconf}
958 </literallayout>
959 </para>
960
961 <para>
962 Aside from the <filename>*.sample</filename> configuration files,
963 the <filename>conf-notes.txt</filename> also resides in the
964 default <filename>meta-yocto/conf</filename> directory.
965 The scripts that set up the build environment
966 (i.e.
967 <ulink url="&YOCTO_DOCS_REF_URL;#structure-core-script"><filename>&OE_INIT_FILE;</filename></ulink>
968 and
969 <ulink url="&YOCTO_DOCS_REF_URL;#structure-memres-core-script"><filename>oe-init-build-env-memres</filename></ulink>)
970 use this file to display BitBake targets as part of the script
971 output.
972 Customizing this <filename>conf-notes.txt</filename> file is a
973 good way to make sure your list of custom targets appears
974 as part of the script's output.
975 </para>
976
977 <para>
978 Here is output from either of the setup scripts by default:
979 <literallayout class='monospaced'>
980 $ source oe-init-build-env-memres
981 No port specified, using dynamically selected port
982
983 ### Shell environment set up for builds. ###
984
985 You can now run 'bitbake &lt;target&gt;'
986
987 Common targets are:
988 core-image-minimal
989 core-image-sato
990 meta-toolchain
991 adt-installer
992 meta-ide-support
993 </literallayout>
994 </para>
995
996 <para>
997 Changing the listed common targets is as easy as editing your
998 version of <filename>conf-notes.txt</filename> in your
999 custom template configuration directory and making sure you
1000 have <filename>TEMPLATECONF</filename> pointing to it.
1001 </para>
1002 </section>
1003
1004 <section id='usingpoky-extend-customimage'> 891 <section id='usingpoky-extend-customimage'>
1005 <title>Customizing Images</title> 892 <title>Customizing Images</title>
1006 893
@@ -4349,6 +4236,117 @@ Gateways via their Web Interfaces</ulink>"</emphasis>
4349 </para> 4236 </para>
4350 </section> 4237 </section>
4351 4238
4239 <section id='creating-a-custom-template-configuration-directory'>
4240 <title>Creating a Custom Template Configuration Directory</title>
4241
4242 <para>
4243 If you're producing your own customized version
4244 of the build system for use by other users, you might
4245 want to customize the message shown by the setup script or
4246 you might want to change the template configuration files (i.e.
4247 (<filename>local.conf</filename> and
4248 <filename>bblayers.conf</filename>) that are created in
4249 a new build directory.
4250 </para>
4251
4252 <para>
4253 The OpenEmbedded build system uses the environment variable
4254 <filename>TEMPLATECONF</filename> locate the directory
4255 from which it gathers configuration information that ultimately
4256 ends up in the
4257 <link linkend='build-directory'>Build Directory's</link>
4258 <filename>conf</filename> directory.
4259 By default, <filename>TEMPLATECONF</filename> is set as
4260 follows in the <filename>poky</filename> repository:
4261 <literallayout class='monospaced'>
4262 TEMPLATECONF=${TEMPLATECONF:-meta-yocto/conf}
4263 </literallayout>
4264 This is the directory that the build system finds templates
4265 with which to build some key configuration files.
4266 If you look at this directory, you will see the
4267 <filename>bblayers.conf.sample</filename>,
4268 <filename>local.conf.sample</filename>, and
4269 <filename>conf-notes.txt</filename> files.
4270 The build system uses these files to form the respective
4271 <filename>bblayers.conf</filename> file,
4272 <filename>local.conf</filename> file, and display the list of
4273 BitBake targets when running the setup script.
4274 </para>
4275
4276 <para>
4277 To override these default configuration files with
4278 configurations you want used within every new
4279 Build Directory, simply set the
4280 <filename>TEMPLATECONF</filename> variable to your directory.
4281 The <filename>TEMPLATECONF</filename> variable is set in the
4282 <filename>.templateconf</filename> file, which is in the
4283 top-level
4284 <link linkend='source-directory'>Source Directory</link>
4285 folder (e.g. <filename>poky</filename>).
4286 Edit the <filename>.templateconf</filename> so that it can locate
4287 your directory.
4288 </para>
4289
4290 <para>
4291 Best practices dictate that you should keep your
4292 template configuration directory in your custom distribution layer.
4293 For example, suppose you have a layer named
4294 <filename>meta-mylayer</filename> located in your home directory
4295 and you want your template configuration directory named
4296 <filename>myconf</filename>.
4297 Changing the <filename>.templateconf</filename> as follows
4298 causes the OpenEmbedded build system to look in your directory
4299 and base its configuration files on the
4300 <filename>*.sample</filename> configuration files it finds.
4301 The final configuration files (i.e.
4302 <filename>local.conf</filename> and
4303 <filename>bblayers.conf</filename> ultimately still end up in
4304 your Build Directory, but they are based on your
4305 <filename>*.sample</filename> files.
4306 <literallayout class='monospaced'>
4307 TEMPLATECONF=${TEMPLATECONF:-meta-mylayer/myconf}
4308 </literallayout>
4309 </para>
4310
4311 <para>
4312 Aside from the <filename>*.sample</filename> configuration files,
4313 the <filename>conf-notes.txt</filename> also resides in the
4314 default <filename>meta-yocto/conf</filename> directory.
4315 The scripts that set up the build environment
4316 (i.e.
4317 <ulink url="&YOCTO_DOCS_REF_URL;#structure-core-script"><filename>&OE_INIT_FILE;</filename></ulink>
4318 and
4319 <ulink url="&YOCTO_DOCS_REF_URL;#structure-memres-core-script"><filename>oe-init-build-env-memres</filename></ulink>)
4320 use this file to display BitBake targets as part of the script
4321 output.
4322 Customizing this <filename>conf-notes.txt</filename> file is a
4323 good way to make sure your list of custom targets appears
4324 as part of the script's output.
4325 </para>
4326
4327 <para>
4328 Here is the default list of targets displayed as a result of
4329 running either of the setup scripts:
4330 <literallayout class='monospaced'>
4331 You can now run 'bitbake &lt;target&gt;'
4332
4333 Common targets are:
4334 core-image-minimal
4335 core-image-sato
4336 meta-toolchain
4337 adt-installer
4338 meta-ide-support
4339 </literallayout>
4340 </para>
4341
4342 <para>
4343 Changing the listed common targets is as easy as editing your
4344 version of <filename>conf-notes.txt</filename> in your
4345 custom template configuration directory and making sure you
4346 have <filename>TEMPLATECONF</filename> set to your directory.
4347 </para>
4348 </section>
4349
4352 <section id='building-a-tiny-system'> 4350 <section id='building-a-tiny-system'>
4353 <title>Building a Tiny System</title> 4351 <title>Building a Tiny System</title>
4354 4352