Lines Matching full:bitbake
7 BitBake Hello World
14 context of BitBake. The tutorial describes how to create a new project
15 and the applicable metadata files necessary to allow BitBake to build
18 Obtaining BitBake
21 See the :ref:`bitbake-user-manual/bitbake-user-manual-hello:obtaining bitbake` section for
22 information on how to obtain BitBake. Once you have the source code on
23 your machine, the BitBake directory appears as follows::
44 At this point, you should have BitBake cloned to a directory that
47 Setting Up the BitBake Environment
50 First, you need to be sure that you can run BitBake. Set your working
51 directory to where your local BitBake files are and run the following
54 $ ./bin/bitbake --version
55 BitBake Build Tool Core version 1.23.0, bitbake version 1.23.0
60 The recommended method to run BitBake is from a directory of your
61 choice. To be able to run BitBake from any directory, you need to add
69 for the BitBake binary to the ``PATH``. Here is an example that adds the
70 ``/home/scott-lenovo/bitbake/bin`` directory to the front of the
73 $ export PATH=/home/scott-lenovo/bitbake/bin:$PATH
75 You should now be able to enter the ``bitbake`` command from the command
83 projects such as OpenEmbedded and the Yocto Project utilize BitBake, the
84 example provides an excellent starting point for understanding BitBake.
86 To help you understand how to use BitBake to build targets, the example
87 starts with nothing but the ``bitbake`` command, which causes BitBake to
95 in the :oe_lists:`/g/bitbake-devel`
96 discussion mailing list about the BitBake build tool.
101 `Mailing List post - The BitBake equivalent of "Hello, World!"
105 "Hello World". However, it is unknown what BitBake needs and what you
106 have to provide in order to achieve that goal. Recall that BitBake
108 :ref:`bitbake-user-manual/bitbake-user-manual-intro:configuration files`,
109 :ref:`bitbake-user-manual/bitbake-user-manual-intro:classes`, and
110 :ref:`bitbake-user-manual/bitbake-user-manual-intro:recipes`.
111 But where do they go? How does BitBake find
112 them? BitBake's error messaging helps you answer these types of
125 BitBake will use to do all of its work. You can use this directory
126 to keep all the metafiles needed by BitBake. Having a project
129 #. **Run BitBake:** At this point, you have nothing but a project
130 directory. Run the ``bitbake`` command and see what it does::
132 $ bitbake
133 The BBPATH variable is not set and bitbake did not
135 Maybe you accidentally invoked bitbake from the wrong directory?
147 are not directly relevant to BitBake. However, the very first
151 When you run BitBake, it begins looking for metadata files. The
152 :term:`BBPATH` variable is what tells BitBake where
154 it. Without :term:`BBPATH`, BitBake cannot find any configuration files
155 (``.conf``) or recipe files (``.bb``) at all. BitBake also cannot
156 find the ``bitbake.conf`` file.
169 Use your actual project directory in the command. BitBake uses that
175 ("~") character as BitBake does not expand that character as the
178 #. **Run BitBake:** Now that you have :term:`BBPATH` defined, run the
179 ``bitbake`` command again::
181 $ bitbake
183 File "/home/scott-lenovo/bitbake/lib/bb/cookerdata.py", line 163, in wrapped
185 File "/home/scott-lenovo/bitbake/lib/bb/cookerdata.py", line 173, in parse_config_file
187 File "/home/scott-lenovo/bitbake/lib/bb/parse/__init__.py", line 99, in handle
189 File "/home/scott-lenovo/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 120, in handle
191 File "/home/scott-lenovo/bitbake/lib/bb/parse/__init__.py", line 117, in resolve_file
193 IOError: file conf/bitbake.conf not found in /home/scott-lenovo/hello
195 …ERROR: Unable to parse conf/bitbake.conf: file conf/bitbake.conf not found in /home/scott-lenovo/h…
197 This sample output shows that BitBake could not find the
198 ``conf/bitbake.conf`` file in the project directory. This file is
199 the first thing BitBake must find in order to build a target. And,
201 provide a ``conf/bitbake.conf`` file.
203 #. **Creating conf/bitbake.conf:** The ``conf/bitbake.conf`` includes
204 a number of configuration variables BitBake uses for metadata and
206 project directory and define some key BitBake variables. For more
207 information on the ``bitbake.conf`` file, see
208 https://git.openembedded.org/bitbake/tree/conf/bitbake.conf.
216 use some editor to create the ``bitbake.conf`` so that it contains
231 have a value similar to what OpenEmbedded and BitBake use in the default
232 bitbake.conf file (see previous example). Or, by manually updating each
236 The ``TMPDIR`` variable establishes a directory that BitBake uses
239 :ref:`bitbake-user-manual/bitbake-user-manual-execution:setscene`
245 BitBake target. The build process creates the directory for you when you
246 run BitBake.
253 #. **Run BitBake:** After making sure that the ``conf/bitbake.conf`` file
254 exists, you can run the ``bitbake`` command again::
256 $ bitbake
258 File "/home/scott-lenovo/bitbake/lib/bb/cookerdata.py", line 163, in wrapped
260 File "/home/scott-lenovo/bitbake/lib/bb/cookerdata.py", line 177, in _inherit
262 File "/home/scott-lenovo/bitbake/lib/bb/parse/parse_py/BBHandler.py", line 92, in inherit
264 … File "/home/scott-lenovo/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 100, in include
271 BitBake could not find the ``classes/base.bbclass`` file. You need
274 #. **Creating classes/base.bbclass:** BitBake uses class files to
276 for BitBake is the ``classes/base.bbclass`` file. The ``base`` class
277 is implicitly inherited by every recipe. BitBake looks for the class
288 The minimal task that BitBake runs is the ``do_build`` task. This is
291 environments BitBake is supporting.
293 #. **Run BitBake:** After making sure that the ``classes/base.bbclass``
294 file exists, you can run the ``bitbake`` command again::
296 $ bitbake
297 …Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage informat…
299 BitBake is finally reporting
301 anything to do. You need to create a recipe that gives BitBake
306 keep your code separate from the general metadata used by BitBake.
312 ":ref:`bitbake-user-manual/bitbake-user-manual-intro:Layers`" section.
358 #. **Run BitBake With a Target:** Now that a BitBake target exists, run
362 $ bitbake printhello
368 the layer configuration file but it still seems that BitBake cannot
369 find the recipe. BitBake needs a ``conf/bblayers.conf`` that lists
370 the layers for the project. Without this file, BitBake cannot find
373 #. **Creating conf/bblayers.conf:** BitBake uses the
387 #. **Run BitBake With a Target:** Now that you have supplied the
388 ``bblayers.conf`` file, run the ``bitbake`` command and provide the
391 $ bitbake printhello
407 After the first execution, re-running bitbake printhello again will not
408 result in a BitBake run that prints the same console output. The reason
410 executes successfully, BitBake writes a stamp file for the task. Thus,
411 the next time you attempt to run the task using that same bitbake
412 command, BitBake notices the stamp and therefore determines that the task
414 bitbake -c clean printhello and then re-run the build, the "Hello,