Difference between revisions of "Bitbake cheat sheet"

From Openembedded.org
Jump to: navigation, search
(How to convert the hardware platform of OE from ARM into X86)
(Show build environment)
 
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
==Intention==
 
==Intention==
This page is intended to make the live of new developers easier. Feel free to add all your usual bitbake commands to this page
+
This page is intended to make the life of new developers easier. Feel free to add all your usual bitbake commands to this page
  
 
==Start a build==
 
==Start a build==
Line 12: Line 12:
  
 
==Working with tmp/work==
 
==Working with tmp/work==
A thing you usually do not want to miss is to be able to recompile your source code if you change a line in it.
+
To recompile your source code if you change a line in it.
 
   bitbake -f -c compile foo
 
   bitbake -f -c compile foo
will only recompile your source nothing else
+
The command above recompiled the code for foo. To build the ipk
after that do a
+
use the command below
 
   bitbake foo
 
   bitbake foo
to get a new package
 
[[Category:Dev]]
 
  
==How to convert the hardware platform of OE from ARM into X86==
+
==Check Recipe Version==
 +
  bitbake -s | grep foo
 +
 
 +
==Check Bitbake Version==
 +
  bitbake --version
 +
 
 +
==Run Bitbake A Little at a Time==
 +
  bitbake -c listtasks foo
 +
      # lists the tasks
 +
  bitbake -c taskname foo
  
I need to convert the hardware platform of OE from ARM into X86,but I don't know the correct step, I tried as follows:
+
==Show build environment==
      Change the contents of file  ~/stuff/build/conf/local.conf, the changes are:
+
    bitbake -e foo
                          MACHINE = "i586-generic";
 
                          #TARGET_ARCH = "arm"
 
                          TARGET_OS = "linux"
 
then, build ,but a error occured:
 
  ERROR: Build of /home/build/stuff/openembedded/packages/xorg-lib/libx11_1.2.1.bb do_compile failed
 
  ERROR: Task 3164 (/home/build/stuff/openembedded/packages/xorg-lib/libx11_1.2.1.bb, do_compile) failed
 
  
Now,I don't know what to do, I tried to do some changes,but this error still exit,call for help!
+
[[Category:Dev]]

Latest revision as of 14:29, 27 April 2016

Intention

This page is intended to make the life of new developers easier. Feel free to add all your usual bitbake commands to this page

Start a build

To get a package build just type

 bitbake foo

where foo is the name of the package without any extension or version number.

Clean up

 bitbake -c clean foo

This command will clean up your tmp dir for the given package. It is very useful if you work on a new .bb recipe. Without it your changes to the recipe may not work.

Working with tmp/work

To recompile your source code if you change a line in it.

 bitbake -f -c compile foo

The command above recompiled the code for foo. To build the ipk use the command below

 bitbake foo

Check Recipe Version

 bitbake -s | grep foo

Check Bitbake Version

  bitbake --version

Run Bitbake A Little at a Time

  bitbake -c listtasks foo
     # lists the tasks
  bitbake -c taskname foo

Show build environment

   bitbake -e foo