This is a way to compile Redox OS in MacOS Apple Silicon using Podman.
This gist follows the book but specifics to MacOS Apple Silicon for easy and fastest installation. For native bootstrap follow another gist (WIP)
cd ~/Document
git clone https://gitlab.redox-os.org/redox-os/redox
cd redox
git submodule update --init --recursive
./podman_bootstrap.sh -d
Set arch target. Write this to ./.config
:
PODMAN_BUILD?=1
ARCH=x86_64
CONFIG_NAME=desktop
PREFIX_BINARY=1
REPO_BINARY=1
The PREFIX_BINARY
and REPO_BINARY
will make the build speed so much quick.
An open MR is requested for additional changes required to get rid of installing fuse (which is a horribly insecure thing to do in Mac Silicon). You can switch to this branch:
git remote set-url origin https://gitlab.redox-os.org/willnode/redox
git checkout patch-make-macos
Currently, the official toolchain only support amd64
podman. The official arm64
toolchain is unavailable, so I build it myself. Please patch mk/prefix.mk
:
- wget -O [email protected] "https://static.redox-os.org/toolchain/$(TARGET)/relibc-install.tar.gz"
+ wget -O [email protected] "https://redox-build.wellosoft.net/toolchain/$(TARGET)/relibc-install.tar.gz"
And mk/config.mk
:
-ifneq ($(HOST_TARGET),x86_64-unknown-linux-gnu)
- $(info The binary prefix is only built for x86_64 Linux hosts)
+ifneq ($(HOST_TARGET),aarch64-unknown-linux-gnu)
+ $(info The binary prefix is only built for aarch64 Linux hosts)
Without this, you'll end up building toolchain inside Podman, which likely will not work (need a huge memory/cpu for it and it take hours).
make build/container.tag
create the containermake rebuild
build/rebuild the image diskmake qemu
open QEMU to boot the disk
This comments reflects to the state of running and building Redox using MacOS as of August 2025:
The aarch64
target only usable with make qemu disk=usb
and live disk (live disk is the default for aarch64
but try not to change the live disk mode when booting).
The exact reason for disk driver is not working is because of lack MSI-X implementation. My naive implementation for that is still WIP.
The -accel hvf
flag is currently making Synchronous exception
because of (incorrect?) Generic Timer Initialization, which is an essential driver for desktop usage. if you insist to use HVF for server usage, try patch the kernel.
Previously I told you to use REPO_BINARY=1
. You can try set it to 0, but you'll hit a strange permission error when building netsuf. This is the problem with podman itself, not Redox build system.
To work around it while using REPO_BINARY=0
, change the netsurf
config in config/desktop.toml
to:
netsurf = "binary"
You'll have a strage warning about clock skew by make
and repeated make rebuild
invocation. Just bear with it, it's podman fault.
You can set REPO_OFFLINE=1
to speed up rebuild to alleviate the pain caused by this.
Also see this tracking issue https://gitlab.redox-os.org/redox-os/redox/-/issues/1604
Should this excerpt:
As right now, only
native_bootstrap.sh
andpodman_bootstrap.sh
are available