Building Bricks-OS
Historical Build Interface
The build expects BRICKS_ROOT to point to the repository root. Historically,
a target was built with:
export BRICKS_ROOT="$PWD"
make -f "Makefile.${TARGET}" clean all
For example, the PC target used:
export BRICKS_ROOT="$PWD"
make -f Makefile.pc clean all
Generated binaries are written below:
bin/<target>/
There is also a convenience makefile for the console targets:
make -f Makefile.all all
Current Build State
The PC path is not currently portable to a modern macOS ARM64 host. A local
diagnostic build with Apple Clang reaches the i386 startup assembly and then
fails because the make rules invoke the host compiler for .S files.
The PC configuration still assumes a freestanding 32-bit toolchain:
-m32
-nostdinc
-nostdlib
-melf_i386
A restoration effort should first provide a documented i386 cross-toolchain or a containerized Linux build environment. That makes compiler behavior explicit and prevents the host architecture from leaking into assembly compilation.
The proposed host-independent Docker workflow is described in the Modernization Plan.
PC Boot-Media Drift
The PC convenience targets in Makefile.pc are historical:
floppy-imgexpects a loop-mounted floppy image andsudo.cdrom-imgexpectsmkisofsand legacy GRUB boot resources.qemuexpects a binary namedqemu.qemupasses the removed-soundhw sb16option.
Modern QEMU normally uses qemu-system-i386, and audio devices need current
device syntax. These launch targets should be treated as restoration work.
Console Toolchains
Console targets use older devkitPro, ps2dev, or platform-specific cross compiler naming conventions. See Platforms for the expected historical commands.
Current compatibility with modern SDK releases has not yet been verified.
Recommended Restoration Workflow
- Establish a reproducible Linux-based i386 cross-toolchain.
- Make
Makefile.pc allproducebin/pc/Bricks.elf. - Replace the stale QEMU command with a current launch target.
- Add a minimal serial-output smoke test.
- Restore console targets one toolchain at a time.