Run commands after rootfs creation in Yocto

With ROOTFS_POSTPROCESS_COMMAND, you can run post processing commands, after the build system has created the root file system.

Say for example, I need to create a new directory in the root file system home folder.

Steps:
1. Create a .bbappend file of your image which you are generated
E.g. if you are generating core-image-base.bb, create core-image-base.bbappend file
2. Add a function similar to the below screenshot


IMAGE_ROOTFS : Variable containing the path of the root file system while it is in construction.
3. Now build the image, using bitbake
bitbake core-image-base

Comments

Popular posts from this blog

bb.utils.contains yocto

make config vs oldconfig vs defconfig vs menuconfig vs savedefconfig

PR, PN and PV Variable in Yocto