Add support for non-x86 hosts
This commit is contained in:
parent
417c417588
commit
28268bf703
17
mk/config.mk
17
mk/config.mk
|
@ -1,8 +1,10 @@
|
||||||
-include .config
|
-include .config
|
||||||
|
|
||||||
|
HOST_ARCH?=$(shell uname -m)
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
## Architecture to build Redox for (aarch64, i686, or x86_64)
|
## Architecture to build Redox for (aarch64, i686, or x86_64). Defaults to a host one
|
||||||
ARCH?=x86_64
|
ARCH?=$(HOST_ARCH)
|
||||||
## Enable to use binary prefix (much faster)
|
## Enable to use binary prefix (much faster)
|
||||||
PREFIX_BINARY?=1
|
PREFIX_BINARY?=1
|
||||||
## Enable to use binary packages (much faster)
|
## Enable to use binary packages (much faster)
|
||||||
|
@ -21,15 +23,12 @@ PODMAN_BUILD?=0
|
||||||
CONTAINERFILE?=podman/redox-base-containerfile
|
CONTAINERFILE?=podman/redox-base-containerfile
|
||||||
|
|
||||||
# Per host variables
|
# Per host variables
|
||||||
# TODO: get host arch automatically
|
|
||||||
HOST_ARCH=x86_64
|
|
||||||
HOST_CARGO=env -u RUSTUP_TOOLCHAIN cargo
|
HOST_CARGO=env -u RUSTUP_TOOLCHAIN cargo
|
||||||
UNAME := $(shell uname)
|
UNAME := $(shell uname)
|
||||||
ifeq ($(UNAME),Darwin)
|
ifeq ($(UNAME),Darwin)
|
||||||
FUMOUNT=umount
|
FUMOUNT=umount
|
||||||
export NPROC=sysctl -n hw.ncpu
|
export NPROC=sysctl -n hw.ncpu
|
||||||
export REDOX_MAKE=make
|
export REDOX_MAKE=make
|
||||||
PREFIX_BINARY=0
|
|
||||||
VB_AUDIO=coreaudio
|
VB_AUDIO=coreaudio
|
||||||
VBM=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage
|
VBM=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage
|
||||||
HOST_TARGET ?= $(HOST_ARCH)-apple-darwin
|
HOST_TARGET ?= $(HOST_ARCH)-apple-darwin
|
||||||
|
@ -38,7 +37,6 @@ else ifeq ($(UNAME),FreeBSD)
|
||||||
FUMOUNT=sudo umount
|
FUMOUNT=sudo umount
|
||||||
export NPROC=sysctl -n hw.ncpu
|
export NPROC=sysctl -n hw.ncpu
|
||||||
export REDOX_MAKE=gmake
|
export REDOX_MAKE=gmake
|
||||||
PREFIX_BINARY=0
|
|
||||||
VB_AUDIO=pulse # To check, will probaly be OSS on most setups
|
VB_AUDIO=pulse # To check, will probaly be OSS on most setups
|
||||||
VBM=VBoxManage
|
VBM=VBoxManage
|
||||||
HOST_TARGET ?= $(HOST_ARCH)-unknown-freebsd
|
HOST_TARGET ?= $(HOST_ARCH)-unknown-freebsd
|
||||||
|
@ -59,6 +57,13 @@ else
|
||||||
ALLOC_FILE=fallocate --posix --length "$(FILESYSTEM_SIZE)MiB"
|
ALLOC_FILE=fallocate --posix --length "$(FILESYSTEM_SIZE)MiB"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(UNAME),Linux)
|
||||||
|
PREFIX_BINARY=0
|
||||||
|
endif
|
||||||
|
ifneq ($(HOST_ARCH),x86_64)
|
||||||
|
PREFIX_BINARY=0
|
||||||
|
endif
|
||||||
|
|
||||||
# Automatic variables
|
# Automatic variables
|
||||||
ROOT=$(CURDIR)
|
ROOT=$(CURDIR)
|
||||||
export RUST_COMPILER_RT_ROOT=$(ROOT)/rust/src/llvm-project/compiler-rt
|
export RUST_COMPILER_RT_ROOT=$(ROOT)/rust/src/llvm-project/compiler-rt
|
||||||
|
|
|
@ -12,7 +12,7 @@ REPOS=(
|
||||||
rust=rust
|
rust=rust
|
||||||
)
|
)
|
||||||
|
|
||||||
for package in $(installer/target/release/redox_installer --list-packages -c config/x86_64/desktop.toml)
|
for package in $(installer/target/release/redox_installer --list-packages -c config/$(uname -m)/desktop.toml)
|
||||||
do
|
do
|
||||||
REPOS+=("${package}=cookbook/recipes/${package}/source")
|
REPOS+=("${package}=cookbook/recipes/${package}/source")
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Ensure arch and config are set as desired, we use these to find the build dir
|
# Ensure arch and config are set as desired, we use these to find the build dir
|
||||||
export ARCH=x86_64
|
export ARCH=$(uname -m)
|
||||||
export CONFIG_NAME=desktop
|
export CONFIG_NAME=desktop
|
||||||
|
|
||||||
# Make sure to unmount the image first
|
# Make sure to unmount the image first
|
||||||
|
|
Loading…
Reference in a new issue