Skip to content

Build switches

Switches are optional parameters passed to ./compile.sh (or set in a build configuration file) that control what and how a build produces. They are all optional; defaults are noted per entry.

Bash
./compile.sh PARAM=value OTHER_PARAM=value [<configfile> ...] [<command>]

Switches vs. board configuration

Switches are per-build parameters. Variables that describe a specific board — its name, family, bootloader, kernel targets — live in the board’s own .conf file; see Board configuration. BOARD is the bridge: BOARD=bananapim5 tells the build to load config/boards/bananapim5.conf.

The reference is split by what each switch controls:

Page Covers
Target Which board, kernel branch and release to build
Image Minimal / desktop image and desktop selection
Contents Packages, firmware, networking and first-run behaviour inside the image
Branding Vendor / OS identity: name, URLs, logo, MOTD colour, maintainer
Kernel Kernel source, config, compiler and bootloader options
Filesystem Root filesystem, partitions, labels, sizes and compression
Host The build host and the Docker build container
Mirrors HTTP proxies, download mirrors and a git proxy
Apt apt-cacher-ng and local .deb package caching
Performance ccache, tmpfs, parallelism and native-armhf acceleration
Patching Round-tripping patches and build-debug switches
Diagnostics Build logs and debug output

Deprecated and renamed switches

Switches are occasionally renamed. When that happens the old name keeps working, so existing build configuration files and command lines do not break:

  • Set the old name only, and the build forwards its value to the new name and prints a deprecation warning — move to the new name when convenient.
  • Set both names, and the new name wins; the old one is ignored, again with a warning.

Prefer the current name for new configurations. This backward-compatible aliasing covers scalar switches (a single PARAM=value), not list/array parameters.

Saw a ‘Deprecated switch’ warning?

It means a switch you passed has been renamed. The build still honours it for now, but update your config or command line to the name the warning points to.

For maintainers: registering a rename

Rename a switch by adding one line to the DEPRECATED_SWITCH_ALIASES map in lib/functions/general/deprecations.sh, mapping the old name to the new one ([OLD_NAME]="NEW_NAME"). Nothing else has to change — consumers can move to the new name later.