Yocto Build : Useful Commands

Reading time ~2 minutes

This month, I was working on Yocto build system to create my own custom linux distribution. Online we can find many tutorials to build an image. but the tutorial on how to create/build/debug custom layer is hard to find. This is sort of help cheatsheet to look uptu for commands.

Clean and Build new Yocto Meta layer :-

bitbake tool_name -c do_compile

You can use a devshell to efficiently debug commands or simply edit packages.

python3 /home/ubuntu/temp/yocto_build/bitbake/bin/bitbake tool_name -c devshell

Root FS is present here :-

./build/tmp/work/intel_corei7_64-poky-linux/core-image-sato/1.0-r0/rootfs ./build/tmp/work/intel_corei7_64-poky-linux/core-image-sato/1.0-r0/rootfs

[Very imp] For any recipe, you can find the values of any variable by getting an environment file as:-

bitbake -e netperf > env

In the env file, you can search value of WORKDIR as:

grep -rin “workdir=” env

Find the file/modules:-

find . -name “tool_name

If the Size is less in df -h :-

rm -rf /tmp

bitbake core-image-sato

Note: The output is at


Location of the kernel source:-


This is the Staging Area:-


Do this from the Staging Area.

make mrproper

make clean

Add this in local.conf to put the binaries in the rootfs

IMAGE_INSTALL_append = “ tool_name”

Create the new iso,HDD image for your distro including your layers:-

bitbake -c cleanall tool_name

bitbake core-image-sato -c cleanall

bitbake core-image-sato

An Unplanned Trek and more

Winters ended, and the intense itch to travel and feeling to have a 1:1 with mountains had started again. This season we planned to do th...… Continue reading

2021 review and 2022 Goals

Published on January 02, 2022

2022 Book List

Published on January 02, 2022