Skip to main content

Overview

The Redox OS build system uses GNU Make with multiple modular configuration files in the mk/ directory. This reference documents all available make targets organized by category.

Primary Build Targets

all

Build the default hard drive image.
This is the default target when running make without arguments. It builds $(BUILD)/harddrive.img.

image

Clean and rebuild the hard drive image from scratch.
This target:
  • Unmounts any mounted filesystems
  • Removes existing harddrive.img and redox-live.iso
  • Builds a fresh image

rebuild

Rebuild the image, clearing the repo tag.
Cleans $(BUILD)/repo.tag and rebuilds the entire system.

Live ISO Targets

live

Build a bootable live ISO image.
Creates $(BUILD)/redox-live.iso that can be booted without installation.

popsicle

Open the Popsicle USB flasher GUI with the live ISO.
Requires popsicle-gtk to be installed on the host system.

Repository Management Targets

repo

Build all packages specified in the filesystem configuration.
Builds $(BUILD)/repo.tag which triggers package compilation.

repo_clean

Clean all recipe build artifacts.
Equivalent to make c.--all.

fetch_clean

Delete all recipe source downloads.
Equivalent to make u.--all.

repo-tree

Display the build dependency tree for recipes.
Shows which recipes need to be built and in what order.

image-tree

Display the package installation tree.
Shows the estimated image size and package dependencies.

repo_clean_target

Clean target-specific artifacts for all recipes.
Removes only the architecture-specific build artifacts.

Recipe-Specific Targets

These targets operate on individual recipes or comma-separated lists.

f.RECIPE

Fetch source for one or more recipes.
string
required
Recipe name(s), comma-separated for multiple recipes

r.RECIPE

Cook (build) one or more recipes.
string
required
Recipe name(s) to build

c.RECIPE

Clean build artifacts for one or more recipes.
string
required
Recipe name(s) to clean, or --all for everything

u.RECIPE

Unfetch (delete source) for one or more recipes.
string
required
Recipe name(s) to unfetch

p.RECIPE

Push (install) compiled package into mounted filesystem.
Do not run this while QEMU is running, as it may corrupt the disk image.
string
required
Recipe name(s) to push

pp.RECIPE

Push package with its package dependencies.

cr.RECIPE

Clean and rebuild recipes.
Equivalent to make c.RECIPE && make r.RECIPE.

ucr.RECIPE

Unfetch, clean, and rebuild recipes.

uc.RECIPE

Unfetch and clean recipes.

ucf.RECIPE

Unfetch, clean, and fetch recipes.

rp.RECIPE

Build and push recipes.

crp.RECIPE

Clean, rebuild, and push recipes.

ucrp.RECIPE

Unfetch, clean, rebuild, and push recipes.

rt.RECIPE

Show build tree for recipes.

pt.RECIPE

Show push tree for recipes.

ppt.RECIPE

Show push tree with package dependencies.

find.RECIPE

Find the path to recipe directories.

debug.RECIPE

Open gdbgui debugger for a recipe binary.
string
Specific binary name to debug (optional)
Start QEMU with make qemu kvm=no QEMU_SMP=1 gdb=yes before debugging.

Clean Targets

clean

Remove all build artifacts.
Removes:
  • repo/ directory
  • $(BUILD) directory
  • $(PREFIX) directory
  • Filesystem tools

distclean

Complete clean including source downloads.
Performs clean plus recipe source cleanup.

fstools_clean

Clean filesystem tools only.

prefix_clean

Remove cross-compiler prefix builds.

static_clean

Remove relibc and statically linked recipes.

container_clean

Remove Podman container and cached files.

Emulation Targets

qemu

Run Redox OS in QEMU.
yes|no
default:"auto"
Enable KVM acceleration
vga|virtio|ramfb|no
default:"vga"
Graphics adapter type
e1000|rtl8139|virtio|redir|no
default:"e1000"
Network adapter type
nvme|ata|usb|virtio|sdcard
default:"nvme"
Disk controller type
hda|ac97|no
default:"hda"
Audio device type
yes|no
default:"yes"
Enable serial console
yes|no
default:"no"
Wait for GDB connection on port 1234
yes|no
default:"no"
Boot from live ISO instead of hard drive
yes|no
default:"yes"
Use UEFI boot (x86_64/aarch64)
number
default:"4"
Number of CPU cores
number
default:"2048"
Memory in MB

Examples

virtualbox

Create and run VirtualBox VM.
Creates a new VirtualBox VM named “Redox” with the built hard drive image.

Filesystem Targets

mount

Mount the hard drive image.
Mounts $(BUILD)/harddrive.img to $(BUILD)/filesystem/.

mount_extra

Mount the extra disk image.

mount_live

Mount the live ISO image.

unmount

Unmount the currently mounted filesystem.

Cross-Compiler Targets

prefix

Build the cross-compiler toolchain.
Builds GCC, Rust, Clang, and relibc for cross-compilation.
With PREFIX_BINARY=1 (default), downloads prebuilt toolchains instead of building from source.

Podman Container Targets

container_shell

Open a shell in the Podman build container.
0|1
required
Must be set to 1 in .config or mk/config.mk

container_touch

Mark the container as built without rebuilding.

container_kill

Kill the running Podman container.

container_push

Push the container image to registry.

Development Targets

env

Open a shell with build environment variables set.
Provides an interactive shell with PATH and compiler variables configured.

setenv

Print environment variables for manual export.
Outputs:

pull

Update the repository and filesystem tools.
Runs git pull and removes the fstools tag to trigger rebuild.

gdb

Connect GDB to debug the kernel.
Connects to QEMU’s GDB stub on port 1234.
Start QEMU with gdb=yes first.

gdb-userspace

Debug userspace applications without gdbserver.
This is a fallback method. Prefer using gdbserver inside the VM when possible.

kernel_debugger

Launch gdbgui in container for kernel debugging.
Opens gdbgui on http://localhost:5000 for kernel debugging.

wireshark

Open Wireshark to analyze network traffic.
Opens $(BUILD)/network.pcap captured during QEMU execution.

cargo-fetch

Fetch Cargo dependencies for offline builds.
Required before building with REPO_OFFLINE=1.

CI Targets

ci-img

Build standard images for CI/release.
string
Version tag for image names (default: git describe)
string
default:"build/img/$(ARCH)"
Output directory for images
Builds server, desktop, and demo configurations.

ci-pkg

Build packages for CI.

ci-toolchain

Build toolchain archives for distribution.
Creates compressed toolchain archives in build/toolchain/.

ci-os-test

Run OS tests and collect results.

Special Targets

FORCE

Empty target used to force execution of other targets.
This is an internal target used by the build system.

Configuration-Specific Targets

server, desktop, demo

Build named configuration images.
Each builds both hard drive and live ISO for the specified configuration.

See Also

Repo Tool

Command-line tool for recipe management

Configuration Options

Build system configuration variables