diff --git a/mk/config.mk b/mk/config.mk index 5ba4c33..6d3af54 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -9,6 +9,8 @@ INSTALLER_FLAGS?=--cookbook=cookbook PREFIX_BINARY?=1 ## Filesystem size in MB (256 is the default) FILESYSTEM_SIZE?=256 +## Flags to pass to redoxfs-mkfs. Add --encrypt to set up disk encryption +REDOXFS_MKFS_FLAGS?= # Per host variables UNAME := $(shell uname) diff --git a/mk/filesystem.mk b/mk/filesystem.mk index 1bfdb4b..f181acb 100644 --- a/mk/filesystem.mk +++ b/mk/filesystem.mk @@ -1,17 +1,19 @@ -build/filesystem.bin: filesystem.toml build/bootloader.bin build/kernel prefix +build/filesystem.bin: filesystem.toml build/kernel prefix cargo build --manifest-path cookbook/Cargo.toml --release cargo build --manifest-path installer/Cargo.toml --release cargo build --manifest-path redoxfs/Cargo.toml --release -$(FUMOUNT) build/filesystem/ || true rm -rf $@ $@.partial build/filesystem/ dd if=/dev/zero of=$@.partial bs=1048576 count="$(FILESYSTEM_SIZE)" - cargo run --manifest-path redoxfs/Cargo.toml --release --bin redoxfs-mkfs $@.partial + cargo run --release \ + --manifest-path redoxfs/Cargo.toml \ + --bin redoxfs-mkfs \ + -- $(REDOXFS_MKFS_FLAGS) $@.partial mkdir -p build/filesystem/ redoxfs/target/release/redoxfs $@.partial build/filesystem/ sleep 2 pgrep redoxfs cp $< build/filesystem/filesystem.toml - cp build/bootloader.bin build/filesystem/bootloader cp build/kernel build/filesystem/kernel cp -r $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/include build/filesystem/include cp -r $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/lib build/filesystem/lib