diff --git a/build.sh b/build.sh index ebbcdfe1a..23f047a8c 100755 --- a/build.sh +++ b/build.sh @@ -12,10 +12,12 @@ usage() { echo "build.sh: Invoke make for a particular architecture and configuration." echo "Usage:" - echo "./build.sh [-X | -A | -6 | -a ARCH] [-c CONFIG] [-f FILESYSTEM_CONFIG] TARGET..." + echo "./build.sh [-X | -A | -5 | -R | -a ARCH] [-c CONFIG] [-f FILESYSTEM_CONFIG] TARGET..." echo " -X Equivalent to -a x86_64." echo " -A Equivalent to -a aarch64." - echo " -6 Equivalent to -a i686." + echo " -5 Equivalent to -a i586." + echo " -6 Equivalent to -a i586 (deprecated, use -5 instead)." + echo " -R Equivalent to -a riscv64gc." echo " -a ARCH: Processor Architecture. Normally one of x86_64, aarch64 or" echo " i686. ARCH is not checked, so you can add a new architecture." echo " Defaults to the directory containing the FILESYSTEM_CONFIG file," @@ -61,7 +63,9 @@ do f) FILESYSTEM_CONFIG="$OPTARG";; X) ARCH="x86_64";; A) ARCH="aarch64";; - 6) ARCH="i686";; + R) ARCH="riscv64gc";; + 5) ARCH="i586";; + 6) ARCH="i586";; h) usage;; \?) echo "Unknown option -$OPTARG, try -h for help"; exit;; :) echo "-$OPTARG requires a value"; exit;; @@ -75,8 +79,9 @@ if [ -z "$ARCH" ] && [ -n "$FILESYSTEM_CONFIG" ]; then case "$ARCH" in x86_64) : ;; aarch64) : ;; - i686) : ;; - \?) ARCH=""; echo "Unknown Architecture, please specify x86_64, aarch64 or i686";; + riscv64gc) : ;; + i586) : ;; + \?) ARCH=""; echo "Unknown Architecture, please specify x86_64, aarch64, riscv64gc or i586";; esac fi diff --git a/config/i686/acid.toml b/config/i586/acid.toml similarity index 100% rename from config/i686/acid.toml rename to config/i586/acid.toml diff --git a/config/i686/ci.toml b/config/i586/ci.toml similarity index 100% rename from config/i686/ci.toml rename to config/i586/ci.toml diff --git a/config/i686/demo.toml b/config/i586/demo.toml similarity index 100% rename from config/i686/demo.toml rename to config/i586/demo.toml diff --git a/config/i686/desktop-minimal.toml b/config/i586/desktop-minimal.toml similarity index 100% rename from config/i686/desktop-minimal.toml rename to config/i586/desktop-minimal.toml diff --git a/config/i686/desktop.toml b/config/i586/desktop.toml similarity index 100% rename from config/i686/desktop.toml rename to config/i586/desktop.toml diff --git a/config/i686/dev.toml b/config/i586/dev.toml similarity index 100% rename from config/i686/dev.toml rename to config/i586/dev.toml diff --git a/config/i686/jeremy.toml b/config/i586/jeremy.toml similarity index 100% rename from config/i686/jeremy.toml rename to config/i586/jeremy.toml diff --git a/config/i686/minimal-net.toml b/config/i586/minimal-net.toml similarity index 100% rename from config/i686/minimal-net.toml rename to config/i586/minimal-net.toml diff --git a/config/i686/minimal.toml b/config/i586/minimal.toml similarity index 100% rename from config/i686/minimal.toml rename to config/i586/minimal.toml diff --git a/config/i686/resist.toml b/config/i586/resist.toml similarity index 100% rename from config/i686/resist.toml rename to config/i586/resist.toml diff --git a/config/i686/server.toml b/config/i586/server.toml similarity index 100% rename from config/i686/server.toml rename to config/i586/server.toml diff --git a/config/i686/tests.toml b/config/i586/tests.toml similarity index 100% rename from config/i686/tests.toml rename to config/i586/tests.toml diff --git a/mk/config.mk b/mk/config.mk index cfba16aae..9b56cb78a 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -5,7 +5,7 @@ HOST_ARCH?=$(shell uname -m) # Configuration -## Architecture to build Redox for (aarch64, i686, or x86_64). Defaults to a host one +## Architecture to build Redox for (aarch64, i586, or x86_64). Defaults to a host one ARCH?=$(HOST_ARCH) ## Sub-device type for aarch64 if needed BOARD?= @@ -23,6 +23,10 @@ REPO_NONSTOP?=0 REPO_OFFLINE?=0 ## Do not strip debug info for local build REPO_DEBUG?=0 +## Old config value that need to be corrected +ifeq ($(ARCH),i686) + ARCH=i586 +endif ## Select filesystem config ifeq ($(BOARD),) FILESYSTEM_CONFIG?=config/$(ARCH)/$(CONFIG_NAME).toml @@ -124,10 +128,6 @@ export RUST_COMPILER_RT_ROOT=$(ROOT)/rust/src/llvm-project/compiler-rt ifeq ($(ARCH),riscv64gc) export TARGET=riscv64gc-unknown-redox export GNU_TARGET=riscv64-unknown-redox -else ifeq ($(ARCH),i686) -# FIXME change TARGET to i586 before the next prefix rebuild - export TARGET=i686-unknown-redox - export GNU_TARGET=i686-unknown-redox else export TARGET=$(ARCH)-unknown-redox export GNU_TARGET=$(ARCH)-unknown-redox diff --git a/mk/qemu.mk b/mk/qemu.mk index 688526a9e..6d1ff6226 100644 --- a/mk/qemu.mk +++ b/mk/qemu.mk @@ -5,7 +5,7 @@ QEMUFLAGS=-d guest_errors -name "Redox OS $(ARCH)" netboot?=no VGA_SUPPORTED=no -ifeq ($(ARCH),i686) +ifeq ($(ARCH),i586) audio?=ac97 gpu?=vga uefi=no @@ -16,7 +16,7 @@ ifeq ($(ARCH),i686) QEMU_SMP?=1 QEMU_MEM?=1024 - # Default to using kvm when arch is i686 and host is x86_64 + # Default to using kvm when arch is i586 and host is x86_64 ifeq ($(HOST_ARCH),x86_64) kvm?=yes endif