]> git.lizzy.rs Git - loadnothing.git/commitdiff
Compile stage2 before stage1
authorHimbeerserverDE <himbeerserverde@gmail.com>
Tue, 13 Sep 2022 15:39:32 +0000 (17:39 +0200)
committerHimbeerserverDE <himbeerserverde@gmail.com>
Tue, 13 Sep 2022 15:39:32 +0000 (17:39 +0200)
This allows the size of stage 2 to be embedded in stage 1

Makefile

index 83da1040fce2a1665b80a28589262840e2507426..91b0bff7b6cb28bde41bd00f674e0d19625b5a7a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ magic.bin:
 stage2/target/x86_64-loadnothing/release/stage2: stage2/src/main.rs
        cd stage2 && cargo build --release
 
-nothing.img: magic.bin stage1/boot.bin stage2/target/x86_64-loadnothing/release/stage2
+nothing.img: magic.bin stage2/target/x86_64-loadnothing/release/stage2 stage1/boot.bin
        dd if=/dev/zero of=nothing.img bs=32M count=1
        parted -s nothing.img mklabel msdos
        parted -s -a optimal nothing.img mkpart primary fat32 16MiB 100%