Step 3 : Creating build directory and adding configurations

  • In this program, you are going to learn

  • How to ?

  • Make sure current dir is $HOME

$ cd $HOME
  • Create the build directory to compile the source code using the following command.

$ source poky/oe-init-build-env
  • Once this command is executed it will be automatically directed to the build directory.

  • Add all the required meta-layers to the “conf/bblayers.conf” using the following command.

$ bitbake-layers add-layer ../meta-openembedded/meta-oe
$ bitbake-layers add-layer ../meta-openembedded/meta-python
$ bitbake-layers add-layer ../meta-openembedded/meta-multimedia
$ bitbake-layers add-layer ../meta-openembedded/meta-networking
$ bitbake-layers add-layer ../meta-raspberrypi
$ bitbake-layers show-layers
  • Set the build configurations in local.conf by adding the following build configurations.

$ vi conf/local.conf

MACHINE ?= "raspberrypi4-64"
DL_DIR ?= "${HOME}/yocto-downloads"
SSTATE_DIR ?= "${HOME}/yocto-sstate-cache"
SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/3.1.15/PATH;downloadfilename=PATH \n "
EXTRA_IMAGE_FEATURES_append = " ssh-server-dropbear"
CORE_IMAGE_EXTRA_INSTALL_append = " nano"
  • Once all the configurations is added you can cross check using the following command.

$ bitbake core-image-base -n