Kas (yocto helper tool)

Kas is a python-based tool for automating yocto-based builds.

It relies on a YAML configuration file that describes what meta-layers need to be downloaded (the repos section), what’s the default image for the build and what should be included in the conf/local.conf file (the local_conf_header section). The conf/bblayers.conf file is automatically populated, based on the repos section.

Making a YAML file

header:
  version: 11

machine: raspberrypi4-64
distro: poky
target: core-image-minimal

repos:
  poky:
    url: https://git.yoctoproject.org/git/poky
    refspec: dunfell
    layers:
      meta:
      meta-poky:

  meta-openembedded:
    url: http://git.openembedded.org/meta-openembedded
    refspec: dunfell
    path: poky/meta-openembedded
    layers:
      meta-oe:
      meta-python:

  meta-raspberrypi:
    url: https://github.com/agherzan/meta-raspberrypi/
    path: poky/meta-raspberrypi
    refspec: dunfell

local_conf_header:
  standard: |
    CONF_VERSION = "1"
    PACKAGE_CLASSES = "package_rpm"
    SDKMACHINE = "x86_64"
    USER_CLASSES = "buildstats image-mklibs image-prelink"
    PATCHRESOLVE = "noop"

  debug-tweaks: |
    EXTRA_IMAGE_FEATURES = "debug-tweaks ssh-server-dropbear package-management"

  diskmon: |
    BB_DISKMON_DIRS = "\
        STOPTASKS,${TMPDIR},1G,100K \
        STOPTASKS,${DL_DIR},1G,100K \
        STOPTASKS,${SSTATE_DIR},1G,100K \
        STOPTASKS,/tmp,100M,100K \
        ABORT,${TMPDIR},100M,1K \
        ABORT,${DL_DIR},100M,1K \
        ABORT,${SSTATE_DIR},100M,1K \
        ABORT,/tmp,10M,1K"