Load TAR archive + run raw user program

This commit is contained in:
2026-05-04 20:24:18 +02:00
parent e399ec6a46
commit ccb6ca89f1
10 changed files with 157 additions and 17 deletions
+5 -2
View File
@@ -23,6 +23,8 @@ LD := x86_64-elf-ld
$(ELFFILE): $(BUILDDIR) $(OBJFILES)
nasm -f bin user/hello.S -o $(BUILDDIR)/hello
nasm -f bin user/pedicel.S -o $(BUILDDIR)/pedicel
tar cvf $(BUILDDIR)/initfs.tar -C $(BUILDDIR) hello pedicel
nasm -f elf64 src/arch/x86/idt.S -o $(BUILDDIR)/idt_stub.o
$(LD) -o $(ELFFILE) -T linker.ld $(OBJFILES) $(BUILDDIR)/idt_stub.o
# Get the symbols for debugging
@@ -43,14 +45,15 @@ limine/limine:
git clone https://github.com/limine-bootloader/limine.git --branch=v9.x-binary --depth=1
$(MAKE) -C limine
initfs:
build-iso: limine/limine $(ELFFILE)
rm -rf iso_root
mkdir -p iso_root/boot
cp -v $(ELFFILE) iso_root/boot
mkdir -p iso_root/boot/limine
cp -v limine.conf iso_root/boot/limine
cp $(BUILDDIR)/hello iso_root/boot/
cp $(BUILDDIR)/pedicel iso_root/boot/
cp $(BUILDDIR)/initfs.tar iso_root/boot/
mkdir -p iso_root/EFI/BOOT
cp -v limine/limine-bios.sys limine/limine-bios-cd.bin limine/limine-uefi-cd.bin iso_root/boot/limine/
cp -v limine/BOOTX64.EFI iso_root/EFI/BOOT/