Credits

Pre-requisites

docker-compose run virtual-env

NOTE: In case of issue, increase watch file using command sudo sysctl -n -w fs.inotify.max_user_watches=1048576

Steps

  • Collect dependencies repo
repo init -u https://github.com/py4mac/yocto-manifest.git -b main -m manifest.xml
repo sync
source layers/poky/oe-init-build-env ./builds/build-x86
  • Add noclue layer
bitbake-layers add-layer ../../layers/py4mac/meta-noclue
  • Build image
bitbake noclue-image
  • Test image
runqemu nographic slirp

login is root and password is root

The new binary file imported is then

noclue
  • Exit
halt

Tips

Create a new layer before building (see initial build step)

  • Create noclue layer
bitbake-layers create-layer ../../layers/meta-noclue
  • Add noclue layer
bitbake-layers add-layer ../../layers/meta-noclue
  • Build core image
bitbake core-image-minimal

Add C/C++ image

At the same level than poky, create noclue folder with C/C++ code + CMakeLists and type devtool add --no-same-dir ../../noclue

Copy *.bb files and *.bbappend files in meta-noclue folder (meta-noclue/recipes-noclue/c)

Create image in meta-noclue/recipes-noclue/images/noclue-image.bb folder with content:

require recipes-core/images/core-image-minimal.bb

IMAGE_INSTALL += "noclue"

Then

bitbake noclue
bitbake noclue-image