Build redoxfs and installer outside of build environment

This commit is contained in:
Jeremy Soller 2020-05-22 15:45:34 -06:00
parent 5d6a610024
commit db8bc29994
No known key found for this signature in database
GPG key ID: E988B49EE78A7FB1

View file

@ -1,11 +1,12 @@
build/filesystem.bin: filesystem.toml build/bootloader build/kernel prefix build/filesystem.bin: filesystem.toml build/bootloader build/kernel prefix
cargo build --manifest-path redoxfs/Cargo.toml --release
cargo build --manifest-path installer/Cargo.toml --release
-$(FUMOUNT) build/filesystem/ || true -$(FUMOUNT) build/filesystem/ || true
rm -rf $@ $@.partial build/filesystem/ rm -rf $@ $@.partial build/filesystem/
dd if=/dev/zero of=$@.partial bs=1048576 count="$(FILESYSTEM_SIZE)" 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 --manifest-path redoxfs/Cargo.toml --release --bin redoxfs-mkfs $@.partial
mkdir -p build/filesystem/ mkdir -p build/filesystem/
cargo build --manifest-path redoxfs/Cargo.toml --release --bin redoxfs redoxfs/target/release/redoxfs $@.partial build/filesystem/
cargo run --manifest-path redoxfs/Cargo.toml --release --bin redoxfs -- $@.partial build/filesystem/
sleep 2 sleep 2
pgrep redoxfs pgrep redoxfs
cp $< build/filesystem/filesystem.toml cp $< build/filesystem/filesystem.toml
@ -14,7 +15,7 @@ build/filesystem.bin: filesystem.toml build/bootloader build/kernel prefix
cp -r $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/include build/filesystem/include cp -r $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/include build/filesystem/include
cp -r $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/lib build/filesystem/lib cp -r $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/lib build/filesystem/lib
export PATH="$(PREFIX_PATH):$$PATH" && \ export PATH="$(PREFIX_PATH):$$PATH" && \
cargo run --manifest-path installer/Cargo.toml --release -- $(INSTALLER_FLAGS) -c $< build/filesystem/ installer/target/release/redox_installer $(INSTALLER_FLAGS) -c $< build/filesystem/
sync sync
-$(FUMOUNT) build/filesystem/ || true -$(FUMOUNT) build/filesystem/ || true
rm -rf build/filesystem/ rm -rf build/filesystem/
@ -23,14 +24,14 @@ build/filesystem.bin: filesystem.toml build/bootloader build/kernel prefix
mount: FORCE mount: FORCE
mkdir -p build/filesystem/ mkdir -p build/filesystem/
cargo build --manifest-path redoxfs/Cargo.toml --release --bin redoxfs cargo build --manifest-path redoxfs/Cargo.toml --release --bin redoxfs
cargo run --manifest-path redoxfs/Cargo.toml --release --bin redoxfs -- build/harddrive.bin build/filesystem/ redoxfs/target/release/redoxfs build/harddrive.bin build/filesystem/
sleep 2 sleep 2
pgrep redoxfs pgrep redoxfs
mount_extra: FORCE mount_extra: FORCE
mkdir -p build/filesystem/ mkdir -p build/filesystem/
cargo build --manifest-path redoxfs/Cargo.toml --release --bin redoxfs cargo build --manifest-path redoxfs/Cargo.toml --release --bin redoxfs
cargo run --manifest-path redoxfs/Cargo.toml --release --bin redoxfs -- build/extra.bin build/filesystem/ redoxfs/target/release/redoxfs build/extra.bin build/filesystem/
sleep 2 sleep 2
pgrep redoxfs pgrep redoxfs