diff --git a/kernel-src/Makefile b/kernel-src/Makefile index 258d6a25..f0702c44 100644 --- a/kernel-src/Makefile +++ b/kernel-src/Makefile @@ -23,6 +23,10 @@ endif ASFLAGS=-felf64 DEPS=$(CSOURCES:.c=.d) +ifeq ($(TARGET),x86-64) +KERNEL_BASE=0xffffffff80000000 +endif + .PHONY: all all: # build build.h file @@ -33,7 +37,15 @@ all: echo "#endif" >> include/build.h make astral -astral: $(OBJS) +astral.tmp: $(OBJS) + @echo [LD] $@ + @$(LD) $(LDFLAGS) -o $@ $^ + +astral.sym.o: astral.tmp + @echo [GEN] $@ + @python3 gen_fn_sym.py $< $(KERNEL_BASE) $(shell pwd)/ $@ + +astral: $(OBJS) astral.sym.o @echo [LD] $@ @$(LD) $(LDFLAGS) -o $@ $^ diff --git a/recipes/astral b/recipes/astral index c730c76e..1f9ab056 100644 --- a/recipes/astral +++ b/recipes/astral @@ -1,5 +1,5 @@ name=astral -revision=36 +revision=37 from_source=astral imagedeps="build-essential nasm" hostdeps="xgcc xbinutils limine"