SYSBUILD.CONF(5)

NAME
sysbuild.conf - configuration file format for the sysbuild tool

DESCRIPTION
Configuration files for sysbuild(1) are plain shell scripts that define a set of recognized variables and can optionally fill in a set of hooks provided as shell functions.

  Configuration variables
As scripts, configuration files can perform any magic they desire to deduce the value of configuration variables.

The following variables configure the source trees:

CVSROOT
    Location of the CVS root from which to check out or update the src and xsrc modules.

    Default: ‘:ext:anoncvs@anoncvs.NetBSD.org:/cvsroot’

CVSTAG
    CVS tag to use during checkouts or updates of the src and xsrc modules.

    Default: not defined.

SRCDIR
    Path to the src module. If you want sysbuild(1) to perform an update of this directory before every build, you will need write access to it. Otherwise, you can use a read-only directory.

    Default: /usr/src.

UPDATE_SOURCES
    Whether to perform an update of the source tree before every build or not.

    Default: ‘true’.

XSRCDIR
    Path to the xsrc module. If you want sysbuild(1) to perform an update of this directory before every build, you will need write access to it. Otherwise, you can use a read-only directory.

    Defining this variable causes sysbuild(1) to build the X Window System as part of the build of NetBSD.

    Default: not defined.

The following variables configure the location of the build files:

BUILD_ROOT
    Path to the directory in which to place build files. These include the obj tree, the destdir and the cross-build tools generated by the build.sh script. The contents of this directory are sorted by machine type so that it can be shared across builds for different machines.

    Default: ~/sysbuild/.

RELEASEDIR
    Path to the directory that will contain the build products (aka the release files). The contents of this directory are sorted by machine type so that it can be shared across builds for different machines.

    Default: ~/sysbuild/release.

The following variables configure the build process:

BUILD_TARGETS
    Whitespace-separated list of targets to pass to build.sh during builds. Targets can be prefixed by a machine name and a colon, in which case they only apply to that machine; for example, ‘macppc:kernel=${HOME}/CUSTOM macppc:releasekernel=${HOME}/CUSTOM’.

    Default: ‘release’.

INCREMENTAL_BUILD
    Whether to perform update builds or not. An update build reuses existing obj, destdir and tools trees.

    Of special note is that sysbuild(1) will take care of pruning files likely to cause breakage during update builds before performing the build itself. As an example, this includes deleting all the modules from destdir/stand/<platform>/.

    Default: ‘false’.

MACHINES
    Whitespace-separated list of machine types to build for.

    Every entry in this list can be a simple machine name like ‘amd64’ or it can be a pair of the form ‘evbarm-aarch64’ to indicate the architecture to target for a particular machine type.

    Default: the name of the host machine type.

MKVARS
    Whitespace-separated list of ‘VARIABLE=value’ make(1) variable definitions to be set during the build. A useful example would be: ‘MKVARS="MKDEBUG=yes"’.

    Default: not defined.

NJOBS
    Number of parallel jobs to use during the build. If set to 1, disables parallel builds (i.e. does not pass any -j flag to make(1)).

    Default: number of CPUs in the machine.

  Hooks
Hooks are user-provided routines invoked at particular points during the build process. These are defined as shell functions and have access to the configuration variables in the file. Hooks must return a success error code and they cannot contain unprotected shell commands. In other words, they are run under a shell configured with ‘set -e’.

The following hooks can be defined:

pre_build_hook()
    Function executed before invoking build.sh for any of the provided build targets and platforms.

post_build_hook()
    Function executed at the end of all build operations. In other words: if the system is being built for multiple machine targets, this hook will only be run once.

pre_fetch_hook()
    Function executed at the beginning of the ‘fetch’ command before any operations are performed. This cannot assume that the source directories exist yet.

post_fetch_hook()
    Function executed right after all source trees have been updated by the ‘fetch’ command.

SEE ALSO
sysbuild(1)