Feat: SCANF WORKING!

This commit is contained in:
AfonsoCMSousa
2026-08-05 11:29:15 +01:00
parent ba81bb8e10
commit 7a4394feb6
4 changed files with 39 additions and 34 deletions
+3 -2
View File
@@ -35,6 +35,8 @@ nasm -f elf64 ./boot/kernel.asm -o ./obj/kernel.asm.o
# Step 4: Link kernel
echo -e "${BLUE}[4/6]${NC} Linking kernel..."
ld -T linker.ld -o ./bin/kernel.bin ./obj/kernel.asm.o ./obj/kernel.c.o --oformat binary --nostdlib
# Debug build (optional)
ld -T linker.ld -o ./bin/kernel_debug.elf ./obj/kernel.asm.o ./obj/kernel.c.o --oformat elf64-x86-64 --nostdlib
# Step 4.5: Calculate kernel size in sectors
KERNEL_SIZE=$(stat -f%z ./bin/kernel.bin 2>/dev/null || stat -c%s ./bin/kernel.bin 2>/dev/null)
@@ -51,8 +53,7 @@ cat ./bin/boot.bin ./bin/elevator.bin ./bin/kernel.bin > os.bin
# Pad to floppy size (1.44MB)
# FIX: Uncomment the line below if you want to ensure the image is exactly 1.44MB
#
truncate -s 1440K os.bin
#truncate -s 1440K os.bin
echo ""
echo -e "${GREEN}✓ Build complete!${NC}"