From cd12cbc75564fafd9c2519cdf1085e651c9d7cfd Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 23 Jul 2022 17:57:56 +0200 Subject: create a bootstrap ELF loader, that'll load init --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 01d17d8..72e7883 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,8 @@ QFLAGS += -display none endif define from_sources - $(patsubst src/%.s,out/obj/%.s.o,$(shell find $(1) -type f -name '*.s')) \ - $(patsubst src/%.c,out/obj/%.c.o,$(shell find $(1) -type f -name '*.c')) + $(patsubst src/%.s,out/obj/%.s.o,$(shell find $(1) -type f,l -name '*.s')) \ + $(patsubst src/%.c,out/obj/%.c.o,$(shell find $(1) -type f,l -name '*.c')) endef @@ -60,7 +60,7 @@ out/fs/boot/kernel.bin: src/kernel/linker.ld $(call from_sources, src/kernel/) $ @$(CC) $(LFLAGS) -T $^ -o $@ grub-file --is-x86-multiboot $@ -out/raw_init: src/user/linker.ld $(call from_sources, src/user/) $(call from_sources, src/shared/) +out/bootstrap: src/user_bootstrap/linker.ld $(call from_sources, src/user_bootstrap/) $(call from_sources, src/shared/) @mkdir -p $(@D) @$(CC) $(LFLAGS) -T $^ -o $@ @@ -75,7 +75,7 @@ out/test.elf: src/usertestelf.ld out/obj/usertestelf.c.o out/obj/user/lib/syscal out/initrd.tar: $(shell find initrd/) out/test.elf cd initrd; tar chf ../$@ * -out/fs/boot/init: out/raw_init out/initrd.tar +out/fs/boot/init: out/bootstrap out/initrd.tar @mkdir -p $(@D) @cat $^ > $@ -- cgit v1.2.3