From b3c8f16a7d83c792d87044d0650ddc73910cec7d Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Wed, 15 Oct 2025 19:47:38 -0500 Subject: bootstrap: stage1: update build configuration Update the build configuration in the first stage of the bootloader. The new build files should take advantage of the modular makefile configs in the project root or override them. Signed-off-by: Danny Holman --- bootstrap/stage1/Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'bootstrap/stage1/Makefile') diff --git a/bootstrap/stage1/Makefile b/bootstrap/stage1/Makefile index 7c3bf81..b80a16b 100644 --- a/bootstrap/stage1/Makefile +++ b/bootstrap/stage1/Makefile @@ -17,7 +17,12 @@ include $(ROOTDIR)/common.mk -INCLUDE+=-I$(ARCHDIR)/include -Iinclude -I$(ROOTDIR)kernel/include -I$(ROOTDIR)kernel/arch/$(ARCH)/include +ifeq ($(BS_DEBUG),YES) + AFLAGS+=-g + CFLAGS+=-g +endif + +INCLUDE+=-I$(ARCHDIR)/include -Iinclude CFLAGS+=-ffreestanding -fno-stack-protector $(BS_OPLVL) BINARY=bootstrap-stage1 @@ -28,9 +33,6 @@ include $(FIRMWARE_DIR)/make.conf COMMON_DIR=firmware/common COMMON_OBJS=$(COMMON_DIR)/bprintf.o \ - $(COMMON_DIR)/elf_load.o \ - $(COMMON_DIR)/exception.o \ - $(COMMON_DIR)/rescue.o \ $(COMMON_DIR)/string.o \ OBJS=$(ARCH_OBJS) \ @@ -49,9 +51,10 @@ $(BINARY): $(OBJS) @echo [CC] $@ %.o: %.s + @$(info $(AFLAGS)) @$(CC) -c $< -o $@ $(AFLAGS) $(INCLUDE) clean: - $(RM) $(BINARY) $(OBJS) $(OBJS:.o=.d) + $(RM) $(BINARY) $(OBJS) $(OBJS:.o=.d) $(OBJS:.o=.dwo) $(BINARY:=.dwp) -include $(OBJS:.o=.d) -- cgit v1.2.3