Provided by: kas_4.8.1-2_all 

NAME
kas-project-config - kas project configuration
PROJECT CONFIGURATION
Currently, JSON and YAML are supported as the base file formats. Since YAML is arguably easier to read,
this documentation focuses on the YAML format.
# Every file needs to contain a header, that provides kas with information
# about the context of this file.
header:
# The `version` entry in the header describes for which configuration
# format version this file was created for. It is used by kas to figure
# out if it is compatible with this file. The version is an integer that
# is increased on every format change.
version: x
# The machine as it is written into the `local.conf` of bitbake.
machine: qemux86-64
# The distro name as it is written into the `local.conf` of bitbake.
distro: poky
repos:
# This entry includes the repository where the config file is located
# to the bblayers.conf:
meta-custom:
# Here we include a list of layers from the poky repository to the
# bblayers.conf:
poky:
url: "https://git.yoctoproject.org/git/poky"
commit: 89e6c98d92887913cadf06b2adb97f26cde4849b
layers:
meta:
meta-poky:
meta-yocto-bsp:
A minimal input file consists out of the header, machine, distro, and repos.
Additionally, you can add bblayers_conf_header and local_conf_header which are strings that are added to
the head of the respective files (bblayers.conf or local.conf):
bblayers_conf_header:
meta-custom: |
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
local_conf_header:
meta-custom: |
PATCHRESOLVE = "noop"
CONF_VERSION = "1"
IMAGE_FSTYPES = "tar"
meta-custom in these examples should be a unique name for this configuration entries.
We recommend that this unique name is the same as the name of the containing repository/layer to ease
cross-project referencing.
In given examples we assume that your configuration file is part of a meta-custom repository/layer. This
way it is possible to overwrite or append entries in files that include this configuration by naming an
entry the same (overwriting) or using an unused name (appending).
Including in-tree configuration files
It's currently possible to include kas configuration files from the same repository/layer like this:
header:
version: x
includes:
- base.yml
- bsp.yml
- product.yml
The paths to the files in the include list are either absolute, if they start with a /, or relative.
If the path is relative and the configuration file is inside a repository, then path is relative to the
repositories base directory. If the configuration file is not in a repository, then the path is relative
to the parent directory of the file.
Including configuration files from other repos
It's also possible to include configuration files from other repos like this:
header:
version: x
includes:
- repo: poky
file: kas-poky.yml
- repo: meta-bsp-collection
file: hw1/kas-hw-bsp1.yml
- repo: meta-custom
file: products/product.yml
repos:
meta-custom:
meta-bsp-collection:
url: "https://www.example.com/git/meta-bsp-collection"
commit: 3f786850e387550fdab836ed7e6dc881de23001b
layers:
# Additional to the layers that are added from this repository
# in the hw1/kas-hw-bsp1.yml, we add here an additional bsp
# meta layer:
meta-custom-bsp:
poky:
url: "https://git.yoctoproject.org/git/poky"
commit: 89e6c98d92887913cadf06b2adb97f26cde4849b
layers:
# If `kas-poky.yml` adds the `meta-yocto-bsp` layer and we
# do not want it in our bblayers for this project, we can
# overwrite it by setting:
meta-yocto-bsp: excluded
The files are addressed relative to the git repository path.
The include mechanism collects and merges the content from top to bottom and depth first. That means that
settings in one include file are overwritten by settings in a latter include file and entries from the
last include file can be overwritten by the current file.
WARNING:
The include mechanism does not support circular references with respect to the repos entries. By that,
a (transitive) include file must not change the reference of the repository it is included from.
While merging, all the dictionaries are merged recursively while preserving the order in which the
entries are added to the dictionary. This means that local_conf_header entries are added to the
local.conf file in the same order in which they are defined in the different include files. The
header.version property is always set to the highest version number found in the config files.
NOTE:
Internally kas iterates the repository checkout step until all referenced repositories are resolved
(checked out). After each iteration, the (partial) configuration is merged and the next iteration is
started. Once all repositories are available, the final configuration is build. Then, all remaining
repositories are checked out.
Including configuration files via the command line
When specifying the kas configuration file on the command line, additional configurations can be included
ad-hoc:
$ kas build kas-base.yml:debug-image.yml:board.yml
This is equivalent to static inclusion from some kas-combined.yml like this:
header:
version: x
includes:
- kas-base.yml
- debug.image.yml
- board.yml
Command line inclusion allows one to create configurations on-demand, without the need to write a kas
configuration file for each possible combination.
All configuration files combined via the command line either have to come from the same repository or
have to live outside of any versioning control. kas will refuse any other combination in order to avoid
complications and configuration flaws that can easily emerge from them.
NOTE:
Git submodules are considered to be part of the main repository. Hence, including config files from a
submodule is supported. The repository root is always the root of the main repository (if under VCS)
or the directory of the first kas config file otherwise.
Working with lockfiles
kas supports the use of lockfiles to pinpoint repositories to exact commit ID (e.g. SHA-1 refs for git).
A lockfile hereby only overrides the commit ID defined in a kas file. When performing the checkout
operation (or any other operation that performs a checkout), kas checks if a file named
<filename>.lock.<ext> is found next to the currently processed kas file. If this is found, kas loads
this file right before processing the current one (similar to an include file).
NOTE:
The locking logic applies to both files on the kas cmdline and include files.
The following example shows this mechanism for a file kas/kas-isar.yml and its corresponding lockfile
kas/kas-isar.lock.yml.
kas/kas-isar.yml:
# [...]
repos:
isar:
url: https://github.com/ilbers/isar.git
branch: next
kas/kas-isar.lock.yml:
header:
version: 14
overrides:
repos:
isar:
commit: 0336610df8bb0adce76ef8c5a921c758efed9f45
The lock plugin provides helpers to simplify the creation and update of lockfiles. For details, see the
plugins documentation: kas.plugins.lock.
Configuration reference
header: dict [required]
Header of every kas configuration file. It contains information about the context of the file.
version: integer [required]
Version of the configuration file format. See the configuration format changelog for the
format history and the latest available version.
includes: list [optional]
List of configuration files to include (parsed depth-first). They are merged in order they
are stated. So a latter one could overwrite settings from previous files. The current file
can overwrite settings from every included file. An item in this list can have one of two
types:
item: string
Path to a kas configuration file, relative to the repository root of the current
file.
item: dict
If files from other repositories should be included, choose this (dict)
representation.
repo: string [required]
Repository key the configuration file is located in. The repo needs to be
defined in the repos dictionary as <repo-id>.
file: string [required]
Path to the configuration file relative to the repository.
build_system: string [optional]
Defines the bitbake-based build system.
Supported values: openembedded, oe, isar
Known build systems are openembedded (or oe) and isar. If set, this restricts the search of kas
for the init script in the configured repositories to oe-init-build-env or isar-init-build-env,
respectively. If kas-container finds this property in the top-level kas configuration file
(includes are not evaluated), it will automatically select the required container image and
invocation mode.
defaults: dict [optional]
Default values applied to all configuration nodes. This may help you to avoid repeating the same
property assignment in multiple places if, for example, you wish to use the same branch for all
repositories.
repos: dict [optional]
Default values for some repository properties. If a default value is set for a repository
property it may still be overridden by setting the same property to a different value in a
given repository.
branch: string [optional]
Default branch property applied to all repositories that do not override this.
tag: string [optional]
Default tag property applied to all repositories that do not override this.
patches: dict [optional]
Default patches to apply to all repositories. If a default value is set for a patch
property it may still be overridden by setting the same property to a different
value in a given patch.
repo: string [optional]
Sets the default repo property applied to all repository patches that do not
override this.
machine: string [optional]
Value of the MACHINE variable that is written into the local.conf. Can be overwritten by the
KAS_MACHINE environment variable.
Default: qemux86-64
distro: string [optional]
Value of the DISTRO variable that is written into the local.conf. Can be overwritten by the
KAS_DISTRO environment variable.
Default: poky
target: string [optional] or list [optional]
Single target or a list of targets to build by bitbake. Can be overwritten by the KAS_TARGET
environment variable. Space is used as a delimiter if multiple targets should be specified via
the environment variable. For targets prefixed with multiconfig: or mc:, corresponding entries are
added to the BBMULTICONFIG in local.conf.
Default: core-image-minimal
env: dict [optional]
Environment variables to forward and their default values (set to nulltype to only forward if
set). These variables are made available to bitbake via BB_ENV_PASSTHROUGH_ADDITIONS
(BB_ENV_EXTRAWHITE in older Bitbake versions) and can be overwritten by the variables of the
environment in which kas is started. Either a string or nothing (null) can be assigned as value.
The former one serves as a default value whereas the latter one will lead to add the variable only
to BB_ENV_PASSTHROUGH_ADDITIONS and not to the environment where kas is started. Please note, that
null needs to be assigned as the nulltype (e.g. MYVAR: null), not as 'null'.
task: string [optional]
Task to build by bitbake. Can be overwritten by the KAS_TASK environment variable.
Default: build
repos: dict [optional]
Definitions of all available repos and layers. The layers are appended to the bblayers.conf sorted
by the repository name first and then by the layer name.
<repo-id>: dict [optional]
Definition of a repository and the layers, that should be part of the build. If the value
is None, the repository, where the current configuration file is located is defined as
<repo-id> and added as a layer to the build. It is recommended that the <repo-id> is
related to the containing repository/layer to ease cross-project referencing.
name: string [optional]
Defines under which name the repository is stored. If its missing the <repo-id> will
be used.
url: string [optional]
URL of the repository. If this is missing, no version control operations are
performed.
type: string [optional]
Type of version control repository.
Default: git
Supported values: git, hg
commit: string [optional]
Full-length commit ID (all-lowercase, no branch names, no symbolic refs, no tags)
that should be used. If url was specified but no commit, branch or tag, the revision
you get depends on the defaults of the version control system used.
branch: string or nothing (null) [optional]
Upstream branch that should be tracked. If commit was specified, kas checks that the
branch contains the commit. If no commit was specified, the head of the upstream
branch is checked out. The nothing (null) value is used to remove a possible default
value.
tag: string or nothing (null) [optional]
Tag that should be checked out. If a commit was specified, kas checks that the tag
points to this commit. This must not be combined with branch. The nothing (null)
value is used to remove a possible default value.
path: string [optional]
Path where the repository is stored. If the url and path is missing, the repository
where the current configuration file is located is defined. If the url is missing
and the path defined, this entry references the directory the path points to. If
the url as well as the path is defined, the path is used to overwrite the checkout
directory, that defaults to kas_work_dir + repo.name. In case of a relative path
name kas_work_dir is prepended.
signed: boolean [optional]
Whether the commit / tag must be signed. If enabled, 'allowed_signers' must be
defined. If both tag and commit are specified, only the signature of the tag is
checked. Git only.
allowed_signers: list [optional]
List of signer-ids to verify the signature against. Must be non-empty if
'signed=true'. Git only.
layers: dict [optional]
List of layers to append to the bblayers.conf. If this is missing or None or an
empty dictionary, the path to the repo itself is added as a layer. Additionally, .
is a valid value if the repo itself should be added as a layer. This allows
combinations:
repos:
meta-foo:
url: https://github.com/bar/meta-foo.git
path: layers/meta-foo
branch: master
layers:
.:
contrib:
This adds both layers/meta-foo and layers/meta-foo/contrib from the meta-foo
repository to bblayers.conf.
<layer-path>: enum [optional]
Adds the layer with <layer-path> that is relative to the repository root
directory, to the bblayers.conf if the value of this entry is not disabled.
This way it is possible to overwrite the inclusion of a layer in later loaded
configuration files. To re-enable it, set it to nothing (null).
patches: dict [optional]
Patches to apply to the repository.
<patches-id>: dict [optional]
One entry in patches with its specific and unique id. All available patch
entries are applied in the order of their sorted <patches-id>.
repo: string [required]
The identifier of the repo where the path of this entry is relative
to.
path: string [required]
The path to one patch file or a quilt formatted patchset directory.
overrides: dict [optional]
Overrides for specific configuration nodes. By that, only items that already exist are overridden.
Note, that all entries below this key are reserved for auto-generation using kas plugins. Do not
manually add entries.
repos: dict [optional]
Maps to the top-level repos entry.
<repo-id>: dict [optional]
Maps to the <repo-id> entry.
commit: string [optional]
Pinned commit ID which overrides the commit of the corresponding repo.
bblayers_conf_header: dict [optional]
Header to prepend to the bblayers.conf before any layers are included.
<bblayers-conf-id>: string [optional]
A string that is added to the bblayers.conf. The entry id (<bblayers-conf-id>) should be
unique if lines should be added and can be the same from another included file, if this
entry should be overwritten. The lines are added to bblayers.conf in alphabetic order of
<bblayers-conf-id> to ensure deterministic generation of config files.
local_conf_header: dict [optional]
Header to prepend to the local.conf.
<local-conf-id>: string [optional]
A string that is added to the local.conf. It operates in the same way as the
bblayers_conf_header entry.
menu_configuration: dict [optional]
Menu configuration, auto-generated by menu plugin. Each variable corresponds to a Kconfig
configuration variable and can be of the types string, boolean or integer. The content of this key
is typically maintained by the kas menu plugin in a .config.yaml file.
artifacts: dict [optional]
Artifacts which are expected to be present after executing the build (id / path pairs). Each
key-value pair describes an identifier and a path relative to the kas build dir, whereby the path
can contain wildcards like *. Unix-style globbing is applied to all paths. In case no artifact is
found, the build is considered successful, if not stated otherwise by the used plugin and mode of
operation.
NOTE:
There are no further semantics attached to the identifiers (yet). Both the author and the
consumer of the artifacts node need to agree on the semantics.
Example:
artifacts:
disk-image: path/to/image.*.img
firmware: path/to/firmware.bin
swu: path/to/update.swu
signers: dict [optional]
Specification of the repository signature verification.
This dict contains the public keys or certificates that are used to verify the authenticity of the
repositories. In case of GPG keys, these are made available to the build environment as well by
pointing the GNUPGHOME environment variable to the local keystore.
NOTE:
Currently only GnuPG keys are supported.
<signer_id>: dict [optional]
Pairs of name and location of a public key or certificate. The name is used to reference
the entry in the repository configuration. For each signer, a unique identifier is
required. The <signer_id> is used to reference the entry in the allowed_signers entries.
type: enum [optional]
Type of the cryptographic material.
Default: gpg
Supported values: gpg, ssh
repo: string [optional]
Repo <repo-id> which provides the public key or certificate file.
path: string [optional]
Path to the public key or certificate file, relative to the repo. Must be used
together with 'repo'.
fingerprint: string [optional]
Fingerprint of the key or certificate (gpg: long-form, 40 hex digits, ssh:
SHA256:...). If not provided, it is read from the file.
GPG key fingerprint: The fingerprint can be obtained by running gpg --list-keys
--with-fingerprint --keyid-format=long <KEYID>. The needed string is the
40-character fingerprint without spaces.
SSH key fingerprint: The fingerprint can be obtained by running ssh-keygen -lf
key.pub | awk '{print $2}'.
gpg_keyserver: string [optional]
GnuPG keyserver to use for key retrieval (if no local path is provided). The
'fingerprint' must be provided. GPG only.
_source_dir: string [optional]
Path to the top repo at time of invoking the plugin (auto-generated by the menu plugin). It must
not be set manually and might only be defined in the top-level .config.yaml file.
_source_dir_host: string [optional]
Source directory of the config file on the host (auto-generated by kas menu plugin, when using
kas-container). It provides the absolute path to the top repo outside of the container (on the
host). This value is only evaluated by the kas-container script. It must not be set manually and
might only be defined in the top-level .config.yaml file.
Example project configurations
The following snippets show minimal but working project configurations for both OpenEmbedded and ISAR
based distributions.
OpenEmbedded
header:
version: 19
# Optionally provide keys to verify signed repositories
signers:
YoctoBuildandRelease:
fingerprint: 2AFB13F28FBBB0D1B9DAF63087EB3D32FB631AD9
gpg_keyserver: keyserver.ubuntu.com
machine: qemux86-64
distro: poky
target: zlib-native
repos:
poky:
url: https://git.yoctoproject.org/poky.git
# when specifying a tag, optionally provide a commit hash
tag: yocto-5.1.1
commit: 7e081bd98fdc5435e850d1df79a5e0f1e30293d0
signed: true
allowed_signers:
- YoctoBuildandRelease
layers:
meta:
meta-poky:
ISAR
header:
version: 14
build_system: isar
machine: qemuamd64
distro: debian-bullseye
target: mc:qemuamd64-bullseye:cowsay
repos:
isar:
url: https://github.com/ilbers/isar.git
commit: 9dc362cd7115074c0f60843e687ed89db5c9339a
layers:
meta:
meta-isar:
SEE ALSO
kas-format-changelog(1)
KAS
Part of the kas(1) suite.
AUTHOR
Daniel Wagner, Jan Kiszka, Claudius Heine
COPYRIGHT
Siemens and contributors, 2017-2025
4.8.1 Jun 17, 2025 KAS-PROJECT-CONFIG(1)