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 :-
[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
Note: The output is at
Location of the kernel source:-
This is the Staging Area:-
Do this from the Staging Area.
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