You must login to view /gokrazy/tools/commit/d145a5b6894372528f9ea310f5bbc1492ab3fba3.
The GitHub option should be usable for most people, it only links via username.

Files
internal/mbr/Makefile
Michael Stapelberg d29c615f07 build bootloader with make; generate ELF with debug symbols
This doesn’t change the bootloader bytes themselves (bootloader.img),
but helps with debugging in GDB+QEMU.
2024-02-03 19:25:42 +01:00

8 lines
256 B
Makefile

# see also https://copyprogramming.com/howto/how-to-make-an-os-kernel
.PHONY: all
all:
nasm -f elf32 -g3 -F dwarf bootloader.asm -o bootloader.o
ld -Ttext=0x7c00 -melf_i386 bootloader.o -o bootloader.elf
objcopy -O binary bootloader.elf bootloader.img