Load raw C binary + docs

This commit is contained in:
2026-05-08 12:38:16 +02:00
parent 9a1a0e428a
commit eb8a03facd
10 changed files with 169 additions and 50 deletions
+18
View File
@@ -0,0 +1,18 @@
CC := x86_64-elf-gcc
CC_FLAGS := -ffreestanding -nostdlib -fno-pic -mno-red-zone -Ilibc
LD := x86_64-elf-ld
BUILDDIR := ../build
LIBDIR := libc
all: pedicel apex
pedicel:
nasm -f bin pedicel.S -o $(BUILDDIR)/pedicel.raw
apex:
$(CC) $(CC_FLAGS) -c apex.c -o $(BUILDDIR)/apex.o
nasm -f elf64 $(LIBDIR)/crt0.S -o $(BUILDDIR)/crt0.o
$(LD) -T $(LIBDIR)/linker.ld $(BUILDDIR)/crt0.o $(BUILDDIR)/apex.o -o $(BUILDDIR)/apex.elf
objcopy -O binary $(BUILDDIR)/apex.elf $(BUILDDIR)/apex.raw