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
|
||||
|
||||
HOST_ARCH?=$(shell uname -m)
|
||||
|
||||
# Configuration
|
||||
## Architecture to build Redox for (aarch64, i686, or x86_64)
|
||||
ARCH?=x86_64
|
||||
## Architecture to build Redox for (aarch64, i686, or x86_64). Defaults to a host one
|
||||
ARCH?=$(HOST_ARCH)
|
||||
## Enable to use binary prefix (much faster)
|
||||
PREFIX_BINARY?=1
|
||||
## Enable to use binary packages (much faster)
|
||||
|
@ -21,15 +23,12 @@ PODMAN_BUILD?=0
|
|||
CONTAINERFILE?=podman/redox-base-containerfile
|
||||
|
||||
# Per host variables
|
||||
# TODO: get host arch automatically
|
||||
HOST_ARCH=x86_64
|
||||
HOST_CARGO=env -u RUSTUP_TOOLCHAIN cargo
|
||||
UNAME := $(shell uname)
|
||||
ifeq ($(UNAME),Darwin)
|
||||
FUMOUNT=umount
|
||||
export NPROC=sysctl -n hw.ncpu
|
||||
export REDOX_MAKE=make
|
||||
PREFIX_BINARY=0
|
||||
VB_AUDIO=coreaudio
|
||||
VBM=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage
|
||||
HOST_TARGET ?= $(HOST_ARCH)-apple-darwin
|
||||
|
@ -38,7 +37,6 @@ else ifeq ($(UNAME),FreeBSD)
|
|||
FUMOUNT=sudo umount
|
||||
export NPROC=sysctl -n hw.ncpu
|
||||
export REDOX_MAKE=gmake
|
||||
PREFIX_BINARY=0
|
||||
VB_AUDIO=pulse # To check, will probaly be OSS on most setups
|
||||
VBM=VBoxManage
|
||||
HOST_TARGET ?= $(HOST_ARCH)-unknown-freebsd
|
||||
|
@ -59,6 +57,13 @@ else
|
|||
ALLOC_FILE=fallocate --posix --length "$(FILESYSTEM_SIZE)MiB"
|
||||
endif
|
||||
|
||||
ifneq ($(UNAME),Linux)
|
||||
PREFIX_BINARY=0
|
||||
endif
|
||||
ifneq ($(HOST_ARCH),x86_64)
|
||||
PREFIX_BINARY=0
|
||||
endif
|
||||
|
||||
# Automatic variables
|
||||
ROOT=$(CURDIR)
|
||||
export RUST_COMPILER_RT_ROOT=$(ROOT)/rust/src/llvm-project/compiler-rt
|
||||
|
|
|
@ -12,7 +12,7 @@ REPOS=(
|
|||
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
|
||||
REPOS+=("${package}=cookbook/recipes/${package}/source")
|
||||
done
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# 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
|
||||
|
||||
# Make sure to unmount the image first
|
||||
|
|
Loading…
Reference in a new issue