Useful bitbake commands

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Useful bitbake commands

Useful bitbake commands

NOTE: Please suggest bitbake commands you find it useful!

bitbake command
Description
bitbake <image>Bake an image (add -k to continue building even errors are found in the tasks execution)
bitbake <package> -c <task>

Execute a particular package's task. Default Tasks names: fetch, unpack, patch, configure, compile, install, package, package_write, and build.


Example: To (force) compiling a kernel and then build, type:

$ bitbake  linux-imx -f -c compile

$ bitbake linux-imx

bitbake <image > -g -u depexp

Show the package dependency for image.


Example: To show all packages included on fsl-image-gui

$ bitbake fsl-image-gui -g -u depexp

NOTE: This command will open a UI window, so it must be execute on a console inside the host machine (either virtual or native).

bitbake <package> -c  devshellOpen a new shell where with neccesary system values already defined for package
hobbitbake frontend/GUI.
bitbake <package> -c listtasksList all tasks for package
bitbake virtual/kernel -c menuconfig
Interactive kernel configuration
bitbake <image> -c fetchallFetch sources for a particular image
bitbake-layers show-layersShow layers
bitbake-layers show-recipes "*-image-*"Show possible images to bake. Without "*-images-*", it shows ALL recipes
bitbake -g <image> && cat pn-depends.dot | grep -v -e '-native' | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniqShow image's packages
bitbake -g <pkg> && cat pn-depends.dot | grep -v -e '-native' | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniqShow package's dependencies
bitbake –v <image> 2>&1 | tee image_build.log Print (on console) and store verbose baking
bitbake -s | grep <pkg>Check if certain package is present on current Yocto Setup




Labels (1)
Comments

Seems I can't use bitbake-layers with Daisy.  Can you verify this?

Yes, it can be used for sure.

Are you getting an error?

In my case, for example, we have:

otavio@nano ~/hacking/ossystems/yocto/build % bitbake-layers show-layers

layer                 path                                      priority

==========================================================================

meta                  /home/otavio/hacking/ossystems/yocto/sources/poky/meta  5

meta-yocto            /home/otavio/hacking/ossystems/yocto/sources/poky/meta-yocto  5

meta-yocto-bsp        /home/otavio/hacking/ossystems/yocto/sources/poky/meta-yocto-bsp  5

meta-oe               /home/otavio/hacking/ossystems/yocto/sources/meta-openembedded/meta-oe  1

meta-fsl-arm          /home/otavio/hacking/ossystems/yocto/sources/meta-fsl-arm  5

meta-fsl-arm-extra    /home/otavio/hacking/ossystems/yocto/sources/meta-fsl-arm-extra  4

meta-fsl-demos        /home/otavio/hacking/ossystems/yocto/sources/meta-fsl-demos  4

meta-qt5              /home/otavio/hacking/ossystems/yocto/sources/meta-qt5  7

meta-ossystems        /home/otavio/hacking/ossystems/yocto/sources/meta-ossystems  9

meta-ossystems-base   /home/otavio/hacking/ossystems/yocto/sources/meta-ossystems-base  8

There is a typo in the penultimate command, it should be "2>&1" instead of "2&>1".

There are even more tasks you can run like: configme, kernel_configcheck, compile_kernelmodules, clean, cleanall, cleansstate etc. I find myself the compile_kernelmodules is very useful for compiling the kernel drivers. You can take the driver and compile outside individually but most of them has lot of dependency, so...

LeonardoSandovalGonzalez‌ bitbake <image> -c fetchall not works for new version yocto, see:FutureMigrationGuide - Yocto Project 

          -c fetchall is replaced by --runall=fetch 

The bitbake -g command changed since yocto 2.3:

BitBake "-g" Output Changes: The package-depends.dot and pn-depends.dot files as previously generated using the bitbake -g command have been removed. A recipe-depends.dot file is now generated as a collapsed version of task-depends.dot instead.

No ratings
Version history
Last update:
‎06-07-2013 10:55 AM
Updated by: