This repository contains a MINIX 3 source tree built with the NetBSD cross-build system (build.sh). The focus of this fork is to build on macOS (Apple Silicon) and produce ARM64 (AArch64) EFI/GPT images suitable for virtualization. An AArch64 MINIX kernel is under active development in this tree.
build.sh– Top-level NetBSD-style build driver used for cross-building the full system.releasetools/– Helpers for creating bootable images (x86 HDD/ISO, ARM SD images, etc.).minix/– MINIX kernel, servers, drivers, and userland additions.share/,lib/,usr.bin/,usr.sbin/, etc. – NetBSD-derived build system and userland sources.
- macOS 13+ (Apple Silicon)
- Xcode Command Line Tools (provides Clang, ld, make, etc.)
- Install:
xcode-select --install
- Install:
- Disk space: 15–25 GB for a full build (toolchain + objects + images)
- For ARM64 EFI image (optional): autotools to build GRUB (
autoconf,automake,libtool,pkg-config) and network access forgitto fetch GRUB.
No Homebrew packages are strictly required; build.sh bootstraps its own cross toolchain under obj.<arch>/tooldir.*. If you previously installed GNU tools, they won’t interfere.
This produces an ARM64 EFI/GPT disk image with MINIX userland, an EFI System Partition, and the AArch64 kernel. Boot support is under active development.
- Build the cross toolchain for ARM64 and the base sets:
./build.sh -U -u -j"$(sysctl -n hw.ncpu)" -m evbarm64-el tools
./build.sh -U -u -j"$(sysctl -n hw.ncpu)" -m evbarm64-el distribution
Artifacts land under:
- Tools:
obj.evbarm64-el/tooldir.Darwin-<ver>-arm64/bin - Destdir:
obj.evbarm64-el/destdir.evbarm64-el - Release sets:
obj.evbarm64-el/releasedir/evbarm64-el/binary/sets
- Create the ARM64 EFI disk image:
./releasetools/arm64_efi_image.sh
Output: ./minix_arm64_efi.img (raw disk image with ESP + MINIX partitions). The script packages the built AArch64 kernel into boot/minix_default and writes a GRUB arm64 EFI binary and config.
One-liner make target
- From the repo root:
make apple-silicon- Runs tools + distribution for
-m evbarm64-el, then createsminix_arm64_efi.img.
- Runs tools + distribution for
Use the convenience wrapper to build the ARM toolchain/userland and produce an image in one go. It handles both 32‑bit ARM (earm) and ARM64 (AArch64):
Examples
- ARM64 EFI disk image:
./scripts/build-arm.sh --arch arm64 - 32‑bit ARM SD image:
./scripts/build-arm.sh --arch arm - Build only (no image):
./scripts/build-arm.sh --arch arm64 --no-image
Details
- Builds with
./build.sh -U -u -jNand creates release sets required by the image scripts. - For
--arch arm64, runsreleasetools/arm64_efi_image.sh→minix_arm64_efi.img. - For
--arch arm, runsreleasetools/arm_sdimage.sh→minix_arm_sd.img. - Optional flags:
--jobs N,--clean(maps tobuild.sh -r).
Note on “ISO” vs image
- ARM generally boots from disk/SD images rather than ISO. The scripts above generate bootable disk images suited to UEFI VMs (ARM64) or SBCs/virt (ARM 32‑bit).
- Parallels Desktop (Apple Silicon): requires an ARM64 guest. Attach
minix_arm64_efi.imgas the primary disk of a new UEFI VM and boot. - QEMU (Apple Silicon host): can boot ARM64 with UEFI firmware. Example:
qemu-system-aarch64 -machine virt -cpu cortex-a57 -m 1024 -bios QEMU_EFI.fd -drive if=none,file="$(pwd)/minix_arm64_efi.img",format=raw,id=hd0 -device virtio-blk-pci,drive=hd0 -serial mon:stdio
- ARM 32‑bit (earm, hardware boards):
- Build:
./build.sh -U -u -j"$(sysctl -n hw.ncpu)" -m evbearm-el tools distribution - Image:
./releasetools/arm_sdimage.sh→minix_arm_sd.img - Run: use QEMU for ARM (emulation) or real hardware. Not runnable in Parallels on Apple Silicon.
- Build:
- x86 (legacy/testing): build and image scripts remain available under
releasetools/x86_*. Not runnable in Parallels on Apple Silicon; use QEMU/UTM or an Intel Mac.
You can direct build.sh to explicit paths for reproducible builds:
-D <dir>: setDESTDIR(e.g.,./obj.i386/destdir.i386)-R <dir>: setRELEASEDIR(e.g.,./obj.i386/releasedir/i386)-T <dir>: setTOOLDIR
Example:
./build.sh -U -u -j"$(sysctl -n hw.ncpu)" -m evbarm64-el \
-D "$PWD/obj.evbarm64-el/destdir.evbarm64-el" \
-R "$PWD/obj.evbarm64-el/releasedir/evbarm64-el" \
-T "$PWD/obj.evbarm64-el/tooldir" \
tools distribution
-U: unprivileged build (recommended on macOS)-u: update (skip clean); use-rto removeTOOLDIR/DESTDIRfirst-jN: parallelism; use$(sysctl -n hw.ncpu)on macOS for N- Targets:
tools,distribution,release
To start fresh after changing compilers or major options:
./build.sh -U -m evbarm64-el -r tools distribution
- Missing compiler or headers on macOS: run
xcode-select --install. - GRUB build for arm64 fails: install autotools (
autoconf,automake,libtool,pkg-config) and ensure network access forgit. - Permission errors writing into
obj.*: add-Uto build unprivileged. - Stale toolchain after macOS/Xcode updates: rebuild with
-r.
This tree contains code under MINIX, NetBSD, and other third-party licenses. See individual file headers and LICENSE.