From 5b9da35b7eb76c8f1f80cc0de6cf30e7314984bd Mon Sep 17 00:00:00 2001 From: Wildan M Date: Sun, 16 Nov 2025 20:53:34 +0700 Subject: [PATCH] Adjust bootstrap script for MacOS --- native_bootstrap.sh | 13 ++++++++++--- podman_bootstrap.sh | 5 ++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/native_bootstrap.sh b/native_bootstrap.sh index a4dda84d..2c8e164d 100755 --- a/native_bootstrap.sh +++ b/native_bootstrap.sh @@ -70,8 +70,6 @@ install_freebsd_pkg() ############################################################################## osx() { - echo "Detected macOS!" - if [ ! -z "$(which brew)" ]; then osx_homebrew $@ elif [ ! -z "$(which port)" ]; then @@ -1076,7 +1074,14 @@ done banner -rustInstall "$noninteractive" +if [ "Darwin" == "$(uname -s)" ]; then + echo "Detected macOS!" + + echo "WARNING: Building Redox OS on MacOS is not recommended, please use podman_bootstrap.sh instead." + echo "WARNING: Our toolchain is not designed to work on MacOS and it relies on FUSE which requires kernel extensions." + echo "WARNING: If you want to continue anyway, please wait for 3 seconds or cancel this script now!" + sleep 3 +fi if [ "$update" == "true" ]; then git pull upstream master @@ -1084,6 +1089,8 @@ if [ "$update" == "true" ]; then exit fi +rustInstall "$noninteractive" + if [ "Darwin" == "$(uname -s)" ]; then osx "$emulator" else diff --git a/podman_bootstrap.sh b/podman_bootstrap.sh index f842136f..120cec7a 100755 --- a/podman_bootstrap.sh +++ b/podman_bootstrap.sh @@ -128,7 +128,6 @@ osx_homebrew() install_brew_pkg "git" install_brew_pkg "make" install_brew_pkg "curl" - install_brew_pkg "slirp4netns" install_brew_pkg "podman" install_brew_pkg "gdb" @@ -502,6 +501,10 @@ boot() git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream --recursive echo "Creating .config with PODMAN_BUILD=1" echo 'PODMAN_BUILD?=1' > redox/.config + if [[ "$(uname -m)" == "arm64" ]]; then + echo "Appending .config with ARCH=aarch64" + echo 'ARCH=aarch64' >> redox/.config + fi echo "Cleaning up..." rm podman_bootstrap.sh echo