]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
documentation: Added the memory-resident BitBake feature
authorScott Rifenbark <scott.m.rifenbark@intel.com>
Tue, 10 Sep 2013 19:13:25 +0000 (12:13 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 12 Sep 2013 15:50:10 +0000 (16:50 +0100)
The main changes are captured in a new section devoted to the
oe-init-build-env-memres script within the ref-structure.xml
file and in the variables.xml file in a BBSERVER variable entry
in the glossary.

All other changes were necessary to integrate the new functionality
into areas where running the setup script are discussed.  Before
this feature, there was a single setup script (oe-init-build-env).
Consequently, wordings and such were designed exclusively for this
single method.  With the introduction of a second possible method
to initialize the build environment, tweaks to many sections were
needed.  Beside the wording tweaks, appropriate cross-referencing
was also needed.

All these changes cover the integration of the new feature.

Reported-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(From yocto-docs rev: c55c9a53c9b4cd1e06e6e81e32d56f9bbf5fe98c)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
documentation/adt-manual/adt-prepare.xml
documentation/dev-manual/dev-manual-common-tasks.xml
documentation/dev-manual/dev-manual-newbie.xml
documentation/mega-manual/figures/user-configuration.png
documentation/ref-manual/closer-look.xml
documentation/ref-manual/faq.xml
documentation/ref-manual/figures/user-configuration.png
documentation/ref-manual/ref-structure.xml
documentation/ref-manual/ref-variables.xml
documentation/ref-manual/usingpoky.xml
documentation/yocto-project-qs/yocto-project-qs.xml

index 6900b0cd8cc0a99e96fdec178b66e7b7a299bdef..38963cc0994cbc76cc362e99cc9b71cbeffba9c2 100644 (file)
@@ -91,7 +91,9 @@
             <para>
                 If you use BitBake to generate the ADT Installer tarball, you must
                 <filename>source</filename> the environment setup script
-                (<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>)
+                (<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
+                or 
+                <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>)
                 located in the Source Directory before running the
                 BitBake command that creates the tarball.
             </para>
 
     <para>
          Remember, before using any <filename>bitbake</filename> command, you
-         must source the <filename>&OE_INIT_PATH;</filename> script located in
-         the Source Directory and you must make sure your
+         must source the build environment setup script 
+         (i.e.
+         <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
+         or
+         <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>)
+         located in the Source Directory and you must make sure your
          <filename>conf/local.conf</filename> variables are correct.
          In particular, you need to be sure the
          <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
index 7fa9149d074ba8097b0e13fef44696bf5d4e80b4..ccaf983cfccf84f221dddc5b242d880aa0439194 100644 (file)
                 environment, you must build the tool using BitBake.
                 Thus, the environment must be set up using the
                 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
+                or
+                <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>
                 script found in the
                 <link linkend='build-directory'>Build Directory</link>.
                 The following commands build and invoke <filename>menuconfig</filename> assuming the
index 3a703989844f098a3421b24375c58af888ba0e02..85fa3e98ff0e8f2371c41e7b47fad5f72d0d4385 100644 (file)
                 This term refers to the area used by the OpenEmbedded build system for builds.
                 The area is created when you <filename>source</filename> the setup
                 environment script that is found in the Source Directory
-                (i.e. <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>).
+                (i.e. <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
+                or
+                <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>).
                 The <ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink>
                 variable points to the Build Directory.</para>
 
index 5bdff034ded9314e493463fc70a40750e4dbe10c..f2b3f8e7fe377928d1226d21c9a201c658feb373 100644 (file)
Binary files a/documentation/mega-manual/figures/user-configuration.png and b/documentation/mega-manual/figures/user-configuration.png differ
index 8c3ceb7210a20c3d3a1b2f7885af24d1d17e5dcc..7e8d52889715aca864bfcec3bc05b95ce2687e2f 100644 (file)
             configuration files.
             These example files are used as a basis for creating actual
             configuration files when you source the build environment
-            script <filename>oe-init-build-env</filename>.
+            script 
+            (i.e.
+            <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
+            or
+            <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
         </para>
 
         <para>
             and <filename>bblayers.conf</filename> configuration files.
             These default configuration files are created only if versions
             do not already exist in the Build Directory at the time you
-            source the <filename>oe-init-build-env</filename> script.
+            source the build environment setup script.
         </para>
 
         <para>
             Because the Poky repository is fundamentally an aggregation of
             existing repositories, some users might be familiar with running
-            the <filename>oe-init-build-env</filename> script in the context of
-            separate OpenEmbedded-Core and BitBake repositories rather than a
+            the <filename>&OE_INIT_FILE;</filename> or 
+            <filename>oe-init-build-env-memres</filename> script in the context 
+            of separate OpenEmbedded-Core and BitBake repositories rather than a
             single Poky repository.
             This discussion assumes the script is executed from within a cloned
             or unpacked version of Poky.
index 71fb03aedb5645eaf90201cf8433fd8d459e5742..69b679bbf7cc62b05c12764e58c01f538290d2c7 100644 (file)
             <para>
                 Yes - you can easily do this.
                 When you use BitBake to build an image, all the build output
-                goes into the directory created when you source the
+                goes into the directory created when you run the 
+                build environment setup script (i.e.
                 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
-                setup script.
+                or
+                <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
                 By default, this <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
                 is named <filename>build</filename> but can be named
                 anything you want.
index 5bdff034ded9314e493463fc70a40750e4dbe10c..f2b3f8e7fe377928d1226d21c9a201c658feb373 100644 (file)
Binary files a/documentation/ref-manual/figures/user-configuration.png and b/documentation/ref-manual/figures/user-configuration.png differ
index 6ddecd994d21db0754d8c423d76b6d3bc84c096f..3133e8dc6d746a7a5f0752d66edf0f5ed9497720 100644 (file)
             the source tree is combined with the output.
             The <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
             is created initially when you <filename>source</filename>
-            the OpenEmbedded build environment setup script <filename>&OE_INIT_FILE;</filename>.
+            the OpenEmbedded build environment setup script 
+            (i.e.
+            <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
+            or
+            <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
         </para>
 
         <para>
             the setup script.
             For information on separating output from your local
             Source Directory files, see the
-            "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>"
-            section.
+            "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
+            and
+            "<link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>"
+            sections.
         </para>
     </section>
 
             which is a Yocto Project build user interface.
             For more information on the Hob, see the
             <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob Project</ulink>
-            webpage.
+            web page.
         </para>
     </section>
 
             This directory contains various integration scripts that implement
             extra functionality in the Yocto Project environment (e.g. QEMU scripts).
             The <link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>
-            script appends this directory to the shell's
+            and
+            <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
+            scripts append this directory to the shell's
             <filename>PATH</filename> environment variable.
         </para>
 
         <title><filename>&OE_INIT_FILE;</filename></title>
 
         <para>
-            This script sets up the OpenEmbedded build environment.
+            This script is one of two scripts that set up the OpenEmbedded build 
+            environment.
+            For information on the other script, see the 
+            "<link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>"
+            section.
+        </para>
+
+        <para>
             Running this script with the <filename>source</filename> command in
             a shell makes changes to <filename>PATH</filename> and sets other
             core BitBake variables based on the current working directory.
-            You need to run this script before running BitBake commands.
+            You need to run an environment setup script before running BitBake 
+            commands.
             The script uses other scripts within the
             <filename>scripts</filename> directory to do the bulk of the work.
         </para>
             <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
             argument creates the <filename>build</filename> directory.
             If you provide a Build Directory argument when you
-            <filename>source</filename> the script, you direct OpenEmbedded
+            <filename>source</filename> the script, you direct the OpenEmbedded
             build system to create a Build Directory of your choice.
             For example, the following command creates a Build Directory named
             <filename>mybuilds</filename> that is outside of the
         </para>
     </section>
 
+    <section id='structure-memres-core-script'>
+        <title><filename>oe-init-build-env-memres</filename></title>
+
+        <para>
+            This script is one of two scripts that set up the OpenEmbedded build 
+            environment.
+            Setting up the environment with this script uses a 
+            memory-resident BitBake.
+            For information on the other setup script, see the 
+            "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>"
+            section.
+        </para>
+
+        <para>
+            Memory-resident BitBake resides in memory until you specifically
+            remove it using the following BitBake command:
+            <literallayout class='monospaced'>
+     $ bitbake -m
+            </literallayout>
+        </para>
+
+        <para>
+            Running this script with the <filename>source</filename> command in
+            a shell makes changes to <filename>PATH</filename> and sets other
+            core BitBake variables based on the current working directory.
+            One of these variables is the 
+            <link linkend='var-BBSERVER'><filename>BBSERVER</filename></link>
+            variable, which allows the OpenEmbedded build system to locate 
+            the server that is running BitBake.
+        </para>
+
+        <para>
+            You need to run an environment setup script before running BitBake 
+            commands.
+            Following is the script syntax:
+            <literallayout class='monospaced'>
+     $ source oe-init-build-env-memres &lt;port_number&gt; &lt;build_dir&gt;
+            </literallayout>
+            The script uses other scripts within the
+            <filename>scripts</filename> directory to do the bulk of the work.
+        </para>
+
+        <para>
+            If you do not provide a port number with the script, the default
+            port "12345" is used.
+        </para>
+
+        <para>
+            By default, running this script without a
+            <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+            argument creates the <filename>build</filename> directory.
+            If you provide a Build Directory argument when you
+            <filename>source</filename> the script, you direct the OpenEmbedded
+            build system to create a Build Directory of your choice.
+            For example, the following command uses the default port number
+            "12345" and creates a Build Directory named
+            <filename>mybuilds</filename> that is outside of the
+            <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
+            <literallayout class='monospaced'>
+     $ source oe-init-build-env-memres ~/mybuilds
+            </literallayout>
+            <note>
+                The OpenEmbedded build system does not support file or 
+                directory names that contain spaces.
+                If you attempt to run the 
+                <filename>oe-init-build-env-memres</filename> script
+                from a Source Directory that contains spaces in either the 
+                filenames or directory names, the script returns an error 
+                indicating no such file or directory.
+                Be sure to use a Source Directory free of names containing 
+                spaces.
+            </note>
+        </para>
+    </section>
+
     <section id='structure-basic-top-level'>
         <title><filename>LICENSE, README, and README.hardware</filename></title>
 
index 2414d3b0367e19cedf2ed45df537ac2b550d8d9a..cb1a2913fc972914a8443c472f401e78d92d9341 100644 (file)
@@ -710,6 +710,28 @@ Core layer for images cannot be removed
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-BBSERVER'><glossterm>BBSERVER</glossterm>
+            <glossdef>
+                <para>
+                    Points to the server that runs memory-resident BitBake.
+                    This variable is set by the 
+                    <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
+                    setup script and should not be hand-edited.
+                    The variable is only used when you employ memory-resident
+                    BitBake.
+                    The setup script exports the value as follows:
+                    <literallayout class='monospaced'>
+     export BBSERVER=localhost:$port
+                    </literallayout>
+                    For more information on how the 
+                    <filename>BBSERVER</filename> is used, see the 
+                    <filename>oe-init-build-env-memres</filename> script, which
+                    is located in the 
+                    <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-BINCONFIG_GLOB'><glossterm>BINCONFIG_GLOB</glossterm>
             <glossdef>
                 <para>
@@ -762,13 +784,16 @@ Core layer for images cannot be removed
 
         <glossentry id='var-BUILDDIR'><glossterm>BUILDDIR</glossterm>
             <glossdef>
-                <para>Points to the location of the
+                <para>
+                    Points to the location of the
                     <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
                     You can define this directory indirectly through the
                     <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
-                    script by passing in a Build Directory path when you run the
-                    script.
-                    If you run the script and do not provide a Build Directory
+                    and 
+                    <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
+                    scripts by passing in a Build Directory path when you run 
+                    the scripts.
+                    If you run the scripts and do not provide a Build Directory
                     path, the <filename>BUILDDIR</filename> defaults to
                     <filename>build</filename> in the current directory.
                 </para>
index 76291f4cd3bf945056252e641a542abb62202fc7..40413766a221d91baa23a874c7686c81451d76f8 100644 (file)
         <title>Build Overview</title>
 
         <para>
-            The first thing you need to do is set up the OpenEmbedded build environment by sourcing
-            the <link linkend='structure-core-script'>environment setup script</link> as follows:
+            The first thing you need to do is set up the OpenEmbedded build 
+            environment by sourcing an environment setup script
+            (i.e.
+            <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
+            or
+            <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
+            Here is an example:
             <literallayout class='monospaced'>
      $ source &OE_INIT_FILE; [&lt;build_dir&gt;]
             </literallayout>
index a7532c082c88c6784c1d5d77f7a5634bbef20801..2ae217416b638dd769356410dccc76d3d6e26069 100644 (file)
                  to the Build Directory.
                  Later, when the build completes, the Build Directory contains all the files
                  created during the build.
-                 </para></listitem>
+                 <note>
+                     For information on running a memory-resident BitBake, see
+                     the
+                     <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>
+                     setup script.
+                 </note></para></listitem>
          </itemizedlist>
          <para>
              Take some time to examine your <filename>local.conf</filename> file