A small x86-64 kernel. Stage 0 goes from real mode to long mode inside the boot sector.
Fail the build unless the sector is exactly 512 bytes
Browse files
failing
1 step in 1 ms
2 files changed
+2−0
@@ -2,6 +2,7 @@ NASM ?= nasm
22
33 build/boot.bin: boot/boot.asm | build
44 $(NASM) -f bin -l build/boot.lst $< -o $@
5+ @test $$(wc -c < $@) -eq 512 || (echo "boot sector is not 512 bytes" && false)
56
67 build:
78 mkdir -p build
@@ -11,3 +11,4 @@ run = ["nasm", "-f", "bin", "-o", "build/boot.bin", "boot/boot.asm"]
1111
1212 [artifact]
1313 path = "build/boot.bin"
14+size = 512