Skip to content
Snippets Groups Projects
Verified Commit 8160d711 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Configurable filesystem size and automatic FAT filesystem size

parent 2161c958
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
ARCH?=x86_64 ARCH?=x86_64
INSTALLER_FLAGS?=--cookbook=cookbook INSTALLER_FLAGS?=--cookbook=cookbook
PREFIX_RUSTC?=0 PREFIX_RUSTC?=0
# Filesystem Size in MB
FILESYSTEM_SIZE?=256
# Per host variables # Per host variables
UNAME := $(shell uname) UNAME := $(shell uname)
......
...@@ -31,7 +31,7 @@ build/bootloader.efi: bootloader-efi/build/$(EFI_TARGET)/boot.efi ...@@ -31,7 +31,7 @@ build/bootloader.efi: bootloader-efi/build/$(EFI_TARGET)/boot.efi
cp -v $< $@ cp -v $< $@
build/harddrive-efi.bin: build/bootloader.efi build/filesystem.bin build/harddrive-efi.bin: build/bootloader.efi build/filesystem.bin
dd if=/dev/zero of=$@.partial bs=1048576 count=4 dd if=/dev/zero of=$@.partial bs=1048576 count=$$(du -m $< | cut -f1)
mkfs.vfat $@.partial mkfs.vfat $@.partial
mmd -i $@.partial efi mmd -i $@.partial efi
mmd -i $@.partial efi/boot mmd -i $@.partial efi/boot
...@@ -39,7 +39,7 @@ build/harddrive-efi.bin: build/bootloader.efi build/filesystem.bin ...@@ -39,7 +39,7 @@ build/harddrive-efi.bin: build/bootloader.efi build/filesystem.bin
cat $@.partial build/filesystem.bin > $@ cat $@.partial build/filesystem.bin > $@
build/livedisk-efi.iso: build/bootloader.efi build/kernel_live build/livedisk-efi.iso: build/bootloader.efi build/kernel_live
dd if=/dev/zero of=$@.partial bs=1048576 count=272 dd if=/dev/zero of=$@.partial bs=1048576 count=$$(du -mc $^ | grep 'total$$' | cut -f1)
mkfs.vfat $@.partial mkfs.vfat $@.partial
mmd -i $@.partial efi mmd -i $@.partial efi
mmd -i $@.partial efi/boot mmd -i $@.partial efi/boot
......
build/filesystem.bin: filesystem.toml build/bootloader build/kernel prefix build/filesystem.bin: filesystem.toml build/bootloader build/kernel prefix
-$(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=256 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 cargo build --manifest-path redoxfs/Cargo.toml --release --bin redoxfs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment