Skip to main content

Overview

The Redox OS build system is highly configurable through environment variables, Make variables, and TOML configuration files. This reference documents all available configuration options.

Build Configuration Variables

These variables are set in .config, mk/config.mk, or via environment variables.

Architecture Configuration

ARCH

Target architecture for Redox OS.
string
default:"$(HOST_ARCH)"
Target architecture: x86_64, i586, aarch64, or riscv64gc
Defaults to the host architecture. Set to i586 instead of i686 for 32-bit x86.

BOARD

Sub-device type for architecture-specific boards.
string
default:""
Board identifier (e.g., raspi3bp for Raspberry Pi 3 B+)
Currently used only for aarch64 boards.

CONFIG_NAME

Filesystem configuration profile name.
string
default:"desktop"
Configuration profile: desktop, server, demo, minimal, etc.
Matches TOML files in config/ directory.

FILESYSTEM_CONFIG

Path to the filesystem configuration file.
path
default:"auto"
Path to filesystem TOML configuration. Auto-detected from ARCH, BOARD, and CONFIG_NAME.
Default resolution order:
  1. config/$(ARCH)/$(BOARD)/$(CONFIG_NAME).toml
  2. config/$(ARCH)/$(CONFIG_NAME).toml
  3. config/$(CONFIG_NAME).toml

Toolchain Configuration

PREFIX_BINARY

Use prebuilt cross-compiler toolchain.
0|1
default:"1"
Download and use binary toolchain packages instead of building from source
Binary toolchains are much faster to set up. Set to 0 to build the toolchain from source.

PREFIX_USE_UPSTREAM_RUST_COMPILER

Use official Rust nightly compiler.
0|1
default:"0"
Use upstream Rust nightly instead of Redox-patched version. Experimental.
Only available for Tier 2 targets. May require -Zbuild-std for Tier 3 targets.

Repository Configuration

REPO_BINARY

Use binary packages instead of building from source.
0|1
default:"0"
Download and install binary packages instead of compiling recipes
Sets COOKBOOK_HOST_SYSROOT and passes --repo-binary to repo tool.

REPO_APPSTREAM

Build AppStream metadata.
0|1
default:"0"
Generate AppStream metadata for package repositories
Sets COOKBOOK_APPSTREAM=true.

REPO_NONSTOP

Continue building after failures.
0|1
default:"0"
Keep building remaining packages even if some fail
Sets COOKBOOK_NONSTOP=true. Useful for CI builds.

REPO_OFFLINE

Build without network access.
0|1
default:"0"
Prevent internet access during builds. Requires pre-fetched sources.
Sets COOKBOOK_OFFLINE=true. Run make cargo-fetch first.

REPO_DEBUG

Enable debug builds.
0|1
default:"0"
Build with debug symbols and disable stripping
Sets COOKBOOK_NOSTRIP=true and COOKBOOK_DEBUG=true.

Filesystem Configuration

FILESYSTEM_SIZE

Size of the filesystem image in megabytes.
number
default:"from config"
Filesystem size in MB. Defaults to value from FILESYSTEM_CONFIG.

REDOXFS_MKFS_FLAGS

Flags passed to redoxfs-mkfs.
string
default:""
Additional flags for filesystem creation. Use --encrypt for encryption.

Container Configuration

PODMAN_BUILD

Build inside Podman container.
0|1
default:"1"
Execute builds inside Podman container for reproducibility
Set to 0 to build directly on the host system. Required for native Redox builds.

FSTOOLS_IN_PODMAN

Build filesystem tools in container.
0|1
default:"0"
Build redoxfs and installer tools inside Podman instead of on host

FSTOOLS_NO_MOUNT

Disable FUSE mounting.
0|1
default:"0"
Build without FUSE support. Required when FUSE is unavailable (e.g., in containers).

SCCACHE_BUILD

Enable sccache for Cargo builds.
0|1
default:"auto"
Use sccache to speed up Cargo compilation. Auto-enabled inside Podman.

CONTAINERFILE

Path to Containerfile for base image.
path
default:"podman/redox-base-containerfile"
Containerfile used to build the Podman base image

Derived Variables

These are automatically computed and should not normally be set manually:
  • TARGET: Full target triple (e.g., x86_64-unknown-redox)
  • BUILD: Build directory path (build/$(ARCH)/$(CONFIG_NAME))
  • PREFIX: Toolchain prefix directory
  • MOUNT_DIR: Filesystem mount point
  • INSTALLER: Path to redox_installer binary
  • REDOXFS: Path to redoxfs binary
  • REPO_BIN: Path to repo tool binary

Filesystem Configuration Files

Filesystem configurations are TOML files in the config/ directory that specify which packages to include in images.

Location

Structure

General Section

filesystem_size

number
required
Size of the filesystem in megabytes

repo_binary

boolean
default:"false"
Whether to use binary packages by default

Packages Section

Specifies which packages to include and how to build them.

Package Rules

object | string
Package configuration. Can be {}, "source", "binary", "local", or "ignore"

Build Modes

Build the package from source code. Downloads sources and compiles them.
Download and install pre-built binary package from the repository.
Build from local source without updating from remote. Useful for development.
Skip this package entirely. Used to exclude packages from included configs.

Include Directive

Load packages from other configuration files.
Later includes and local definitions override earlier ones. Package rules are merged.

Example Configurations

Minimal Desktop

Full Desktop

Server Configuration

Development Configuration

QEMU Configuration Variables

These variables control QEMU emulation behavior.

Hardware Emulation

kvm

yes|no
default:"auto"
Enable KVM/HVF hardware acceleration
Auto-enabled when host and guest architectures match.

gpu

vga|virtio|virtio-gl|ramfb|multi|no
default:"vga"
Graphics adapter type
  • vga: Standard VGA adapter (x86 only)
  • virtio: VirtIO GPU (better performance)
  • virtio-gl: VirtIO GPU with OpenGL acceleration
  • ramfb: RAM framebuffer (ARM/RISC-V)
  • multi: Multiple displays
  • no: No graphics (serial only)

audio

hda|ac97|no
default:"hda"
Audio device type
  • hda: Intel High Definition Audio
  • ac97: AC’97 audio (i586 default)
  • no: No audio

net

e1000|rtl8139|virtio|usb-net|redir|bridge|no
default:"e1000"
Network adapter type
  • e1000: Intel E1000 (default, best compatibility)
  • rtl8139: Realtek RTL8139
  • virtio: VirtIO network (better performance)
  • usb-net: USB network adapter
  • redir: E1000 with port forwarding
  • bridge: Bridge to host network
  • no: No network

disk

nvme|ata|usb|virtio|sdcard|cdrom
default:"nvme"
Disk controller type
  • nvme: NVMe controller (default, fastest)
  • ata: ATA/AHCI controller
  • usb: USB storage
  • virtio: VirtIO block device
  • sdcard: SD card (ARM boards)
  • cdrom: Boot from ISO as CD-ROM

System Configuration

QEMU_SMP

number
default:"arch-specific"
Number of CPU cores
Defaults: x86_64=4, i586=1, aarch64=1, riscv64gc=4

QEMU_MEM

number
default:"arch-specific"
Memory size in megabytes
Defaults: x86_64=2048, i586=1024, others=2048

serial

yes|no
default:"yes"
Enable serial console

gdb

yes|no|nonblock
default:"no"
GDB debugging support
Starts GDB server on port 1234.

live

yes|no
default:"no"
Boot from live ISO

uefi

yes|no
default:"yes"
Use UEFI boot (x86_64/aarch64)

iommu

yes|no
default:"no"
Enable IOMMU

usb

yes|no
default:"yes"
Enable USB controllers

Advanced Options

qemu_serial_logfile

path
Log serial output to file

bridge

string
Bridge network adapter to host bridge

netboot

yes|no
default:"no"
Enable network boot

redoxer

yes|no
default:"no"
Enable Redoxer exit codes
Exit code 51 = success, 53 = failure.

Per-Host Variables

These are automatically detected based on the host OS:

macOS

  • FUMOUNT=umount
  • SED=gsed
  • FIND=gfind
  • VB_AUDIO=coreaudio

FreeBSD

  • FIND=gfind
  • FUMOUNT=sudo umount
  • VB_AUDIO=pulse

Linux

  • FUMOUNT=fusermount3 -u (or fusermount -u)
  • VB_AUDIO=pulse

Redox

  • PODMAN_BUILD=0
  • HOSTED_REDOX=1

See Also

Make Commands

All available Makefile targets

Repo Tool

Command-line tool for package management