From 176baaf3d0f033091f5ab9d9cfb2cec3d25a5442 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Tue, 15 Apr 2014 14:06:21 -0700 Subject: bitbake-user-manual-hello.xml: First draft of "Hello World" appendix Fixes [YOCTO #1973] Added the complete "Hello World" appendix first draft beyond what Bill Traynor had supplied. Signed-off-by: Scott Rifenbark --- .../bitbake-user-manual-hello.xml | 649 +++++++++++---------- 1 file changed, 328 insertions(+), 321 deletions(-) (limited to 'doc') diff --git a/doc/bitbake-user-manual/bitbake-user-manual-hello.xml b/doc/bitbake-user-manual/bitbake-user-manual-hello.xml index 95a6804a1..2d67ff77d 100644 --- a/doc/bitbake-user-manual/bitbake-user-manual-hello.xml +++ b/doc/bitbake-user-manual/bitbake-user-manual-hello.xml @@ -120,16 +120,6 @@
The Hello World Example - - The following example leaps directly into how BitBake - works. - While every attempt is made to explain what is happening, - not everything can be covered. - You can find further information in the - "Syntax and Operators" - chapter. - - The overall goal of this exercise is to build a complete "Hello World" example utilizing task and layer @@ -141,8 +131,25 @@ - It should be noted that this chapter was inspired by - and draws heavily from several sources: + To help you understand how to use BitBake to build targets, + the example starts with nothing but the bitbake + command, which causes BitBake to fail and report problems. + The example progresses by adding pieces to the build to + eventually conclude with a working, minimal "Hello World" + example. + + + + While every attempt is made to explain what is happening during + the example, the descriptions cannot cover everything. + You can find further information throughout this manual. + Also, you can actively participate in the + + discussion mailing list about the BitBake build tool. + + + + This example was inspired by and drew heavily from these sources: Mailing List post - The BitBake equivalent of "Hello, World!" @@ -151,114 +158,177 @@ Hambedded Linux blog post - From Bitbake Hello World to an Image - - -
- A Reverse Walk-Through + - - A good way to understand anything is to walk through the steps - that take you to where you want to be and observe first - principles. - BitBake allows us to do this through the - -D or Debug - command-line parameter. - + + As stated earlier, the goal of this example + is to eventually compile "Hello World". + However, it is unknown what BitBake needs and what you have + to provide in order to achieve that goal. + Recall that BitBake utilizes three types of metadata files: + Configuration Files, + Classes, and + Recipes. + But where do they go? + How does BitBake find them? + BitBake's error messaging helps you answer these types of questions + and helps you better understand exactly what is going on. + - - The goal is to eventually compile a "Hello World" example. - However, it is unknown what is needed to achieve that goal. - Recall that BitBake utilizes three types of metadata files: - Configuration Files, - Classes, and - Recipes. - But where do they go? - How does BitBake find them? - BitBake's error messaging helps you answer these types of questions - and helps you better understand exactly what is going on. - + + Following is the complete "Hello World" example. + - + + Create a Project Directory: First, set up a directory for the "Hello World" project. Here is how you can do so in your home directory: $ mkdir ~/hello $ cd ~/hello - Within this new, empty directory, run BitBake with - debugging output and see what happens: + This is the directory that BitBake will use to do all of + its work. + You can use this directory to keep all the metafiles needed + by BitBake. + Having a project directory is a good way to isolate your + project. + + Run Bitbake: + At this point, you have nothing but a project directory. + Run the bitbake command and see what + it does: - $ bitbake -DDD - The BBPATH variable is not set and bitbake did not find - a conf/bblayers.conf file in the expected location. - Maybe you accidentally invoked bitbake from the wrong - directory? + $ bitbake + The BBPATH variable is not set and bitbake did not + find a conf/bblayers.conf file in the expected location. + Maybe you accidentally invoked bitbake from the wrong directory? DEBUG: Removed the following variables from the environment: GNOME_DESKTOP_SESSION_ID, XDG_CURRENT_DESKTOP, - GNOME_KEYRING_CONTROL, DISPLAY, SSH_AGENT_PID, LANG, - no_proxy, XDG_SESSION_PATH, XAUTHORITY, SESSION_MANAGER, - SHLVL, MANDATORY_PATH, COMPIZ_CONFIG_PROFILE, WINDOWID, - EDITOR, GPG_AGENT_INFO, SSH_AUTH_SOCK, GDMSESSION, - DEFAULTS_PATH, XDG_SEAT_PATH, XDG_CONFIG_DIRS, LESSOPEN, - DBUS_SESSION_BUS_ADDRESS, _, XDG_SESSION_COOKIE, - DESKTOP_SESSION, LESSCLOSE, GNOME_KEYRING_PID, - UBUNTU_MENUPROXY, OLDPWD, XDG_DATA_DIRS, COLORTERM, - LS_COLORS + GNOME_KEYRING_CONTROL, DISPLAY, SSH_AGENT_PID, LANG, no_proxy, + XDG_SESSION_PATH, XAUTHORITY, SESSION_MANAGER, SHLVL, + MANDATORY_PATH, COMPIZ_CONFIG_PROFILE, WINDOWID, EDITOR, + GPG_AGENT_INFO, SSH_AUTH_SOCK, GDMSESSION, GNOME_KEYRING_PID, + XDG_SEAT_PATH, XDG_CONFIG_DIRS, LESSOPEN, DBUS_SESSION_BUS_ADDRESS, + _, XDG_SESSION_COOKIE, DESKTOP_SESSION, LESSCLOSE, DEFAULTS_PATH, + UBUNTU_MENUPROXY, OLDPWD, XDG_DATA_DIRS, COLORTERM, LS_COLORS The majority of this output is specific to environment variables that are not directly relevant to BitBake. However, the very first message regarding the BBPATH variable and the conf/bblayers.conf file - is relevant. - - - + is relevant. + + When you run BitBake, it begins looking for metadata files. + The + BBPATH + variable is what tells BitBake where to look for those files. + BBPATH is not set and you need to set it. + Without BBPATH, Bitbake cannot + find any configuration files (.conf) + or recipe files (.bb) at all. + BitBake also cannot find the bitbake.conf + file. + + Setting BBPATH: + For this example, you can set BBPATH + in the same manner that you set PATH + earlier in the appendix. + You should realize, though, that it is much more flexible to set the + BBPATH variable up in a configuration + file for each project. + From your shell, enter the following commands to set and + export the BBPATH variable: -1. Once you have PATH set up to actually run BB, and then you run it - using: - - bitbake -DDD - - You get these complaints: - -The BBPATH variable is not set and bitbake did not find a conf/bblayers.conf file in the expected location. -Maybe you accidentally invoked bitbake from the wrong directory? - -2. If you export BBPATH to point to your build directory and do nothing - else, BB will look for the <buildir>/conf/bitbake.conf file. It will - throw and error with a bunch of traceback stuff and say: - -scott-lenovo@scott-lenovo:~ [master #] -$ mkdir junk -scott-lenovo@scott-lenovo:~ [master #] -$ BBPATH="/home/scott-lenovo/junk" -scott-lenovo@scott-lenovo:~ [master #] -$ export BBPATH -scott-lenovo@scott-lenovo:~ [master #] -$ bitbake -DDD -ERROR: Traceback (most recent call last): - File "/home/scott-lenovo/bitbake/lib/bb/cookerdata.py", line 163, in wrapped - return func(fn, *args) - File "/home/scott-lenovo/bitbake/lib/bb/cookerdata.py", line 173, in parse_config_file - return bb.parse.handle(fn, data, include) - File "/home/scott-lenovo/bitbake/lib/bb/parse/__init__.py", line 99, in handle - return h['handle'](fn, data, include) - File "/home/scott-lenovo/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 120, in handle - abs_fn = resolve_file(fn, data) - File "/home/scott-lenovo/bitbake/lib/bb/parse/__init__.py", line 117, in resolve_file - raise IOError("file %s not found in %s" % (fn, bbpath)) -IOError: file conf/bitbake.conf not found in /home/scott-lenovo/junk - -ERROR: Unable to parse conf/bitbake.conf: file conf/bitbake.conf not found in /home/scott-lenovo/junk -scott-lenovo@scott-lenovo:~ [master #] - -3. Now I am going to create the conf/bitbake.conf file I need for the hello - world example. Then run it again. Time it complains about not finding - classes/base.bbclass. - -scott-lenovo@scott-lenovo:~/junk [master #] -$ bitbake -DDD + $ BBPATH="<projectdirectory>" + $ export BBPATH + + Use your actual project directory in the command. + BitBake uses that directory to find the metadata it needs for + your project. + + When specifying your project directory, do not use the + tilde ("~") character as BitBake does not expand that character + as the shell would. + + + Run Bitbake: + Now that you have BBPATH defined, run + the bitbake command again: + + $ bitbake + ERROR: Traceback (most recent call last): + File "/home/scott-lenovo/bitbake/lib/bb/cookerdata.py", line 163, in wrapped + return func(fn, *args) + File "/home/scott-lenovo/bitbake/lib/bb/cookerdata.py", line 173, in parse_config_file + return bb.parse.handle(fn, data, include) + File "/home/scott-lenovo/bitbake/lib/bb/parse/__init__.py", line 99, in handle + return h['handle'](fn, data, include) + File "/home/scott-lenovo/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 120, in handle + abs_fn = resolve_file(fn, data) + File "/home/scott-lenovo/bitbake/lib/bb/parse/__init__.py", line 117, in resolve_file + raise IOError("file %s not found in %s" % (fn, bbpath)) + IOError: file conf/bitbake.conf not found in /home/scott-lenovo/hello + + ERROR: Unable to parse conf/bitbake.conf: file conf/bitbake.conf not found in /home/scott-lenovo/hello + + This sample output shows that BitBake could not find the + conf/bitbake.conf file in the project + directory. + This file is the first thing BitBake must find in order + to build a target. + And, since the project directory for this example is + empty, you need to provide a conf/bitbake.conf + file. + + Creating conf/bitbake.conf: + The conf/bitbake.conf includes a number of + configuration variables BitBake uses for metadata and recipe + files. + For this example, you need to create the file in your project directory + and define some key BitBake variables. + For more information on the bitbake.conf, + see + + + Use the following commands to create the conf + directory in the project directory: + + $ mkdir conf + + From within the conf directory, use + some editor to create the bitbake.conf + so that it contains the following: + + TMPDIR = "${TOPDIR}/tmp" + CACHE = "${TMPDIR}/cache" + STAMP = "${TMPDIR}/stamps" + T = "${TMPDIR}/work" + B = "${TMPDIR}" + + The TMPDIR variable establishes a directory + that BitBake uses for build output and intermediate files (other + than the cached information used by the + Setscene process. + Here, the TMPDIR directory is set to + hello/tmp. + Tip + You can always safely delete the tmp + directory in order to rebuild a BitBake target. + The build process creates the directory for you + when you run BitBake. + + For information about each of the other variables defined in this + example, click on the links to take you to the definitions in + the glossary. + + Run Bitbake: + After making sure that the conf/bitbake.conf + file exists, you can run the bitbake + command again: + +$ bitbake ERROR: Traceback (most recent call last): File "/home/scott-lenovo/bitbake/lib/bb/cookerdata.py", line 163, in wrapped return func(fn, *args) @@ -271,241 +341,178 @@ ERROR: Traceback (most recent call last): ParseError: ParseError in configuration INHERITs: Could not inherit file classes/base.bbclass ERROR: Unable to parse base: ParseError in configuration INHERITs: Could not inherit file classes/base.bbclass -scott-lenovo@scott-lenovo:~/junk [master #] - -4. So now we add that classes/base.bbclass file and put in one line that says - "addtask build", which is the minimum task you need. We run it again and - things work but there is nothing to do. That stands to reason since I gave it - no target. - -scott-lenovo@scott-lenovo:~/junk [master #] -$ bitbake -DDD -Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information. -DEBUG: Removed the following variables from the environment: GNOME_DESKTOP_SESSION_ID, XDG_CURRENT_DESKTOP, GNOME_KEYRING_CONTROL, DISPLAY, SSH_AGENT_PID, LANG, no_proxy, XDG_SESSION_PATH, XAUTHORITY, SESSION_MANAGER, SHLVL, MANDATORY_PATH, COMPIZ_CONFIG_PROFILE, WINDOWID, EDITOR, GPG_AGENT_INFO, SSH_AUTH_SOCK, GDMSESSION, GNOME_KEYRING_PID, XDG_SEAT_PATH, XDG_CONFIG_DIRS, LESSOPEN, DBUS_SESSION_BUS_ADDRESS, _, XDG_SESSION_COOKIE, DESKTOP_SESSION, LESSCLOSE, DEFAULTS_PATH, UBUNTU_MENUPROXY, OLDPWD, XDG_DATA_DIRS, COLORTERM, LS_COLORS -DEBUG: LOAD /home/scott-lenovo/junk/conf/bitbake.conf -DEBUG: BB configuration INHERITs:0: inheriting /home/scott-lenovo/junk/classes/base.bbclass -DEBUG: BB /home/scott-lenovo/junk/classes/base.bbclass: handle(data, include) -DEBUG: LOAD /home/scott-lenovo/junk/classes/base.bbclass -DEBUG: Clearing SRCREV cache due to cache policy of: clear -DEBUG: Using cache in '/home/scott-lenovo/junk/tmp/cache/local_file_checksum_cache.dat' -DEBUG: Using cache in '/home/scott-lenovo/junk/tmp/cache/bb_codeparser.dat' -DEBUG: Features set [3] (was [3]) -scott-lenovo@scott-lenovo:~/junk [master #] - -5. Here is what happens when you do provide a target but the target doesn't - exist yet. - -scott-lenovo@scott-lenovo:~/junk [master #] -$ bitbake a -ERROR: no recipe files to build, check your BBPATH and BBFILES? - -Summary: There was 1 ERROR message shown, returning a non-zero exit code. -scott-lenovo@scott-lenovo:~/junk [master #] - -6. Create a layer that has your metadata in it. You need your recipe file - and your layer.conf file. That is all good but you still need to - tell BB where your layers are. You do that through a bblayers.conf file. - We will use this one: - - BBLAYERS ?=" \ - /home/scott-lenovo/LayerA \ - " - - Now when you run it, you get this: - -$ bitbake -DDD a -DEBUG: Removed the following variables from the environment: GNOME_DESKTOP_SESSION_ID, XDG_CURRENT_DESKTOP, GNOME_KEYRING_CONTROL, DISPLAY, SSH_AGENT_PID, LANG, no_proxy, XDG_SESSION_PATH, XAUTHORITY, SESSION_MANAGER, SHLVL, MANDATORY_PATH, COMPIZ_CONFIG_PROFILE, WINDOWID, EDITOR, GPG_AGENT_INFO, SSH_AUTH_SOCK, GDMSESSION, GNOME_KEYRING_PID, XDG_SEAT_PATH, XDG_CONFIG_DIRS, LESSOPEN, DBUS_SESSION_BUS_ADDRESS, _, XDG_SESSION_COOKIE, DESKTOP_SESSION, LESSCLOSE, DEFAULTS_PATH, UBUNTU_MENUPROXY, OLDPWD, XDG_DATA_DIRS, COLORTERM, LS_COLORS -DEBUG: Found bblayers.conf (/home/scott-lenovo/junk/conf/bblayers.conf) -DEBUG: LOAD /home/scott-lenovo/junk/conf/bblayers.conf -DEBUG: Adding layer /home/scott-lenovo/LayerA -DEBUG: LOAD /home/scott-lenovo/LayerA/conf/layer.conf -DEBUG: LOAD /home/scott-lenovo/junk/conf/bitbake.conf -DEBUG: BB configuration INHERITs:0: inheriting /home/scott-lenovo/junk/classes/base.bbclass -DEBUG: BB /home/scott-lenovo/junk/classes/base.bbclass: handle(data, include) -DEBUG: LOAD /home/scott-lenovo/junk/classes/base.bbclass -DEBUG: Clearing SRCREV cache due to cache policy of: clear -DEBUG: Using cache in '/home/scott-lenovo/junk/tmp/cache/local_file_checksum_cache.dat' -DEBUG: Using cache in '/home/scott-lenovo/junk/tmp/cache/bb_codeparser.dat' -DEBUG: Features set [3] (was [3]) -DEBUG: Calculated priority of layer A as 1 -DEBUG: collecting .bb files -DEBUG: Using cache in '/home/scott-lenovo/junk/tmp/cache' -DEBUG: Cache: /home/scott-lenovo/LayerA/a.bb is not cached -DEBUG: BB /home/scott-lenovo/LayerA/a.bb: handle(data) | ETA: --:--:-- -DEBUG: LOAD /home/scott-lenovo/LayerA/a.bb -Parsing recipes: 100% |##########################################################################################| Time: 00:00:00 -Parsing of 1 .bb files complete (0 cached, 1 parsed). 1 targets, 0 skipped, 0 masked, 0 errors. -DEBUG: parsing complete -DEBUG: providers for a are: ['a'] -DEBUG: sorted providers for a are: ['/home/scott-lenovo/LayerA/a.bb'] -DEBUG: adding /home/scott-lenovo/LayerA/a.bb to satisfy a -DEBUG: Added dependencies [] for /home/scott-lenovo/LayerA/a.bb -NOTE: Resolving any missing task queue dependencies -DEBUG: Resolved 0 extra dependencies -NOTE: Preparing runqueue -NOTE: Marking Active Tasks -NOTE: Pruned 0 inactive tasks, 1 left -NOTE: Assign Weightings -NOTE: Compute totals (have 1 endpoint(s)) -DEBUG: Starting bitbake-worker -NOTE: Executing RunQueue Tasks -DEBUG: Considering 0 (/home/scott-lenovo/LayerA/a.bb, do_build): set([]) -DEBUG: Skip list (pre setsceneverify) [] -DEBUG: Full skip list set([]) -DEBUG: Using runqueue scheduler 'speed' -DEBUG: Stampfile /home/scott-lenovo/junk/tmp/stamps.do_build not available -DEBUG: Found bblayers.conf (/home/scott-lenovo/junk/conf/bblayers.conf) -DEBUG: LOAD /home/scott-lenovo/junk/conf/bblayers.conf -DEBUG: Adding layer /home/scott-lenovo/LayerA -DEBUG: LOAD /home/scott-lenovo/LayerA/conf/layer.conf -DEBUG: LOAD /home/scott-lenovo/junk/conf/bitbake.conf -DEBUG: BB configuration INHERITs:0: inheriting /home/scott-lenovo/junk/classes/base.bbclass -DEBUG: BB /home/scott-lenovo/junk/classes/base.bbclass: handle(data, include) -DEBUG: LOAD /home/scott-lenovo/junk/classes/base.bbclass -DEBUG: Using cache in '/home/scott-lenovo/junk/tmp/cache/bb_codeparser.dat' -************************ -* * -* Hello, World! * -* * -************************ -DEBUG: Teardown for bitbake-worker -NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and all succeeded. -scott-lenovo@scott-lenovo:~/junk/conf [master #] - -7. If you run it without the "-DDD" option, the output is cleaner. - -scott-lenovo@scott-lenovo:~/junk [master #] -$ bitbake a -Parsing recipes: 100% |##########################################################################################| Time: 00:00:00 -Parsing of 1 .bb files complete (0 cached, 1 parsed). 1 targets, 0 skipped, 0 masked, 0 errors. -NOTE: Resolving any missing task queue dependencies -NOTE: Preparing runqueue -NOTE: Executing RunQueue Tasks -************************ -* * -* Hello, World! * -* * -************************ -NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and all succeeded. -scott-lenovo@scott-lenovo:~/junk [master #] - - - - You need to set - BBPATH. - - - - When you run BitBake, it begins looking for metadata files. - The BBPATH variable is what tells - BitBake where to look. - You could set BBPATH in the same manner - that you set PATH as shown earlier. - However, it is much more flexible to set the - BBPATH - variable for each project. - - - - Without BBPATH, Bitbake cannot - find any configuration files (.conf) - or recipe files (.bb) at all. - BitBake also cannot find the bitbake.conf - file. - - - - It is standard practice to organize the project's directory tree - to include both a conf/ and - classes/ directory. - You need to add those directories to your project: + In the sample output, BitBake could not find the + classes/base.bbclass file. + You need to create that file next. + + Creating classes/base.bbclass: + BitBake uses class files to provide common code and functionality. + The minimally required class for BitBake is the + classes/base.bbclass file. + The base class is implicitly inherited by + every recipe. + BitBake looks for the class in the classes + directory of the project (i.e hello/classes + in this example). + + Create the classes directory as follows: - $ mkdir conf classes + $ cd $HOME/hello + $ mkdir classes - Once those directories are in place, you can copy the - sample configuration files provided in the - BitBake source tree to their appropriate directories. - First, change to the BitBake source tree directory and - then copy the directories: + Move to the classes directory and then + create the base.bbclass file by inserting + this single line: - cp conf/bitbake.conf ~/dev/hello/conf/ - cp classes/base.bbclass ~/dev/hello/classes/ + addtask build - At this point your project directory structure should look like - the following: - - ~/dev/hello$ tree - . - |-- classes - |   +-- base.bbclass - +-- conf - +-- bitbake.conf + The minimal task that BitBake runs is the + do_build task. + This is all the example needs in order to build the project. + Of course, the base.bbclass can have much + more depending on which build environments BitBake is + supporting. + For more information on the base.bbclass file, + you can look at + . + + Run Bitbake: + After making sure that the classes/base.bbclass + file exists, you can run the bitbake + command again: + + $ bitbake + Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information. - - - - Once you have copied these files into your project, you - can now get back to resolving the BBPATH - issue. - + BitBake is finally reporting no errors. + However, you can see that it really does not have anything + to do. + You need to create a recipe that gives BitBake something to do. + + Creating a Layer: + While it is not really necessary for such a small example, + it is good practice to create a layer in which to keep your + code separate from the general metadata used by BitBake. + Thus, this example creates and uses a layer called "mylayer". + + You can find additional information on adding a layer at + . + + + Minimally, you need a recipe file and a layer configuration + file in your layer. + The configuration file needs to be in the conf + directory inside the layer. + Use these commands to set up the layer and the conf + directory: + + $ cd $HOME + $ mkdir mylayer + $ cd mylayer + $ mkdir conf + + Move to the conf directory and create a + layer.conf file that has the following: + + BBPATH .= ":${LAYERDIR}" - - The first configuration file that BitBake looks for is always - bblayers.conf. - With this knowledge, you know that to resolve your - BBPATH error you can add a - conf/bblayers.conf file to the - project source tree and populate it with the - BBPATH variable declaration. - + BBFILES += "${LAYERDIR}/*.bb" - - From your project source tree: - - $ vim conf/bblayers.conf + BBFILE_COLLECTIONS += "mylayer" + BBFILE_PATTERN_mylayer := "^${LAYERDIR}/" - Now add the following to the empty - bblayers.conf file: + For information on these variables, click the links + to go to the definitions in the glossary. + You need to create the recipe file next. + Inside your layer at the top-level, use an editor and create + a recipe file named printhello.bb that + has the following: - BBPATH := "${TOPDIR}" + DESCRIPTION = "Prints Hello World" + PN = 'printhello' + PV = '1' + + python do_build() { + bb.plain("********************"); + bb.plain("* *"); + bb.plain("* Hello, World! *"); + bb.plain("* *"); + bb.plain("********************"); + } - + The recipe file simply provides a description of the + recipe, the name, version, and the do_build + task, which prints out "Hello World" to the console. + For more information on these variables, follow the links + to the glossary. + + Run Bitbake With a Target: + Now that a BitBake target exists, run the command and provide + that target: + + $ cd $HOME/hello + $ bitbake printhello + ERROR: no recipe files to build, check your BBPATH and BBFILES? - - Now, from the root of your project directory, run BitBake - again and see what happens: + Summary: There was 1 ERROR message shown, returning a non-zero exit code. + + We have created the layer with the recipe and the layer + configuration file but it still seems that BitBake cannot + find the recipe. + BitBake needs a conf/bblayers.conf that + lists the layers for the project. + Without this file, BitBake cannot find the recipe. + + Creating conf/bblayers.conf: + BitBake uses the conf/bblayers.conf file + to locate layers needed for the project. + This file must reside in the conf directory + of the project (i.e. hello/conf for this + example). + Set your working directory to the hello/conf + directory and then create the bblayers.conf + file so that it contains the following: - $ bitbake -DDD - Nothing to do. Use 'bitbake world' to build everything, or - run 'bitbake --help' for usage information. - DEBUG: Removed the following variables from the environment: - GNOME_DESKTOP_SESSION_ID, XDG_CURRENT_DESKTOP, - GNOME_KEYRING_CONTROL, DISPLAY, SSH_AGENT_PID, LANG, no_proxy, - XDG_SESSION_PATH, XAUTHORITY, SESSION_MANAGER, SHLVL, - MANDATORY_PATH, COMPIZ_CONFIG_PROFILE, WINDOWID, EDITOR, - GPG_AGENT_INFO, SSH_AUTH_SOCK, GDMSESSION, DEFAULTS_PATH, - XDG_SEAT_PATH, XDG_CONFIG_DIRS, LESSOPEN, - DBUS_SESSION_BUS_ADDRESS, _, XDG_SESSION_COOKIE, - DESKTOP_SESSION, LESSCLOSE, GNOME_KEYRING_PID, UBUNTU_MENUPROXY, - OLDPWD, XDG_DATA_DIRS, COLORTERM, LS_COLORS - DEBUG: Found bblayers.conf (/home/scott-lenovo/dev/hello/conf/bblayers.conf) - DEBUG: LOAD /home/scott-lenovo/dev/hello/conf/bblayers.conf - DEBUG: LOAD /home/scott-lenovo/dev/hello/conf/bitbake.conf - DEBUG: BB configuration INHERITs:0: inheriting /home/scott-lenovo/dev/hello/classes/base.bbclass - DEBUG: BB /home/scott-lenovo/dev/hello/classes/base.bbclass: handle(data, include) - DEBUG: LOAD /home/scott-lenovo/dev/hello/classes/base.bbclass - DEBUG: Clearing SRCREV cache due to cache policy of: clear - DEBUG: Using cache in '/home/scott-lenovo/dev/hello/tmp/cache/local_file_checksum_cache.dat' - DEBUG: Using cache in '/home/scott-lenovo/dev/hello/tmp/cache/bb_codeparser.dat' - DEBUG: Features set [3] (was [3]) + BBLAYERS ?= " \ + /home/<you>/mylayer \ + " + + You need to provide your own information for + you in the file. + + Run Bitbake With a Target: + Now that you have supplied the bblayers.conf + file, run the bitbake command and provide + the target: + + $ bitbake printhello + Parsing recipes: 100% |##################################################################################| + Time: 00:00:00 + Parsing of 1 .bb files complete (0 cached, 1 parsed). 1 targets, 0 skipped, 0 masked, 0 errors. + NOTE: Resolving any missing task queue dependencies + NOTE: Preparing runqueue + NOTE: Executing RunQueue Tasks + ******************** + * * + * Hello, World! * + * * + ******************** + NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and all succeeded. + BitBake finds the printhello recipe and + successfully runs the task. - From this point forward in the example, the environment - variable removal messages are ignored and omitted. - Examine the relevant DEBUG messages: + Rerunning the task without removing the tmp + directory will not result in a BitBake run that prints the + same console output. + BitBake uses its Setscene process and determines that + nothing needs to be re-run. + If you delete the tmp directory and + then re-run the build, the printed output appears + at the console. - -
+ +
-- cgit 1.2.3-korg