diff --git a/bootstrap.sh b/bootstrap.sh index b562c99..4f14417 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -106,6 +106,8 @@ osx_macports() install_macports_pkg "osxfuse" install_macports_pkg "x86_64-elf-gcc" install_macports_pkg "cmake" + install_macports_pkg "ninja" + install_macports_pkg "po4a" } ############################################################################### @@ -137,6 +139,8 @@ osx_homebrew() install_brew_pkg "gcc@7" "gcc-7" install_brew_pkg "pkg-config" install_brew_pkg "cmake" + install_brew_pkg "ninja" + install_brew_pkg "po4a" install_brew_pkg "Caskroom/cask/osxfuse" install_brew_pkg "redox-os/gcc_cross_compilers/x86_64-elf-gcc" "x86_64-elf-gcc" diff --git a/mk/config.mk b/mk/config.mk index cdd69bd..0756ca4 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -23,16 +23,17 @@ CONTAINERFILE?=podman/redox-base-containerfile # Per host variables # TODO: get host arch automatically HOST_ARCH=x86_64 -HOST_CARGO=env --unset=RUSTUP_TOOLCHAIN cargo +HOST_CARGO=env -u RUSTUP_TOOLCHAIN cargo UNAME := $(shell uname) ifeq ($(UNAME),Darwin) - FUMOUNT=sudo umount + 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 + ALLOC_FILE=truncate -s "$(FILESYSTEM_SIZE)m" else ifeq ($(UNAME),FreeBSD) FUMOUNT=sudo umount export NPROC=sysctl -n hw.ncpu @@ -41,6 +42,7 @@ else ifeq ($(UNAME),FreeBSD) VB_AUDIO=pulse # To check, will probaly be OSS on most setups VBM=VBoxManage HOST_TARGET ?= $(HOST_ARCH)-unknown-freebsd + ALLOC_FILE=fallocate --posix --length "$(FILESYSTEM_SIZE)MiB" else # Detect which version of the fusermount binary is available. ifneq (, $(shell which fusermount3)) @@ -54,6 +56,7 @@ else VB_AUDIO=pulse VBM=VBoxManage HOST_TARGET ?= $(HOST_ARCH)-unknown-linux-gnu + ALLOC_FILE=fallocate --posix --length "$(FILESYSTEM_SIZE)MiB" endif # Automatic variables diff --git a/mk/disk.mk b/mk/disk.mk index f00ca65..9353883 100644 --- a/mk/disk.mk +++ b/mk/disk.mk @@ -2,7 +2,7 @@ $(BUILD)/harddrive.img: $(FSTOOLS_TAG) $(REPO_TAG) mkdir -p $(BUILD) rm -rf $@ $@.partial -$(FUMOUNT) /tmp/redox_installer || true - fallocate --posix --length "$(FILESYSTEM_SIZE)MiB" $@.partial + ${ALLOC_FILE} $@.partial umask 002 && $(INSTALLER) -c $(FILESYSTEM_CONFIG) $@.partial mv $@.partial $@ @@ -10,7 +10,7 @@ $(BUILD)/livedisk.iso: $(FSTOOLS_TAG) $(REPO_TAG) mkdir -p $(BUILD) rm -rf $@ $@.partial -$(FUMOUNT) /tmp/redox_installer || true - fallocate --posix --length "$(FILESYSTEM_SIZE)MiB" $@.partial + ${ALLOC_FILE} $@.partial umask 002 && $(INSTALLER) -c $(FILESYSTEM_CONFIG) --live $@.partial mv $@.partial $@ @@ -19,7 +19,7 @@ $(BUILD)/filesystem.img: $(FSTOOLS_TAG) $(REPO_TAG) -$(FUMOUNT) $(BUILD)/filesystem/ || true rm -rf $@ $@.partial $(BUILD)/filesystem/ -$(FUMOUNT) /tmp/redox_installer || true - fallocate --posix --length "$(FILESYSTEM_SIZE)MiB" $@.partial + ${ALLOC_FILE} $@.partial redoxfs/target/release/redoxfs-mkfs $(REDOXFS_MKFS_FLAGS) $@.partial mkdir -p $(BUILD)/filesystem/ redoxfs/target/release/redoxfs $@.partial $(BUILD)/filesystem/