From 7dda9e91bde5f7ca71706f255f63d34f57e80360 Mon Sep 17 00:00:00 2001 From: Jaby Date: Fri, 16 Dec 2022 21:23:24 +0100 Subject: [PATCH] Introduce empty overlay boot file and improve task name --- lib/PSEXETarget.mk | 5 +++-- src/Library/Library.code-workspace | 2 +- src/Library/Makefile | 11 ++++++++--- src/Library/src/BootLoader/boot_file/overlay_boot.cpp | 9 +++++++++ 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 src/Library/src/BootLoader/boot_file/overlay_boot.cpp diff --git a/lib/PSEXETarget.mk b/lib/PSEXETarget.mk index ec065d6f..295089a9 100644 --- a/lib/PSEXETarget.mk +++ b/lib/PSEXETarget.mk @@ -7,8 +7,9 @@ include $(AUTO_OVERLAY_DIR)/Overlays.mk JABY_ENGINE_LIB_DIR = $(JABY_ENGINE_DIR)/lib/PSX-$(BUILD_PROFILE) JABY_ENGINE_LIB_NAME = JabyEngine_$(TV_FORMAT) -#We use this via a flag later -OBJS += $(JABY_ENGINE_LIB_DIR)/main_boot.o +#Bind this to the overlay.json file maybe? +BOOT_TYPE = main +OBJS += $(JABY_ENGINE_LIB_DIR)/$(BOOT_TYPE)_boot.o #Linking rule $(TARGET).elf: $(OBJS) $(JABY_ENGINE_LIB_DIR)/lib$(JABY_ENGINE_LIB_NAME).a $(AUTO_OVERLAY_DIR)/Overlays.ld diff --git a/src/Library/Library.code-workspace b/src/Library/Library.code-workspace index cbd8bedf..c34ce892 100644 --- a/src/Library/Library.code-workspace +++ b/src/Library/Library.code-workspace @@ -25,7 +25,7 @@ } }, { - "label": "all", + "label": "Build Libary and Tools", "type": "shell", "command": "./build_all.bat ${input:target}", "group": { diff --git a/src/Library/Makefile b/src/Library/Makefile index 5f235874..18a8115c 100644 --- a/src/Library/Makefile +++ b/src/Library/Makefile @@ -16,8 +16,9 @@ SRCS += src/syscall_printf.asm include ../../lib/Makefile LIB_DIR = ../../lib/$(CONFIG_NAME) -MAIN_BOOT_OBJ = $(filter %/main_boot.o,$(OBJS)) -MAIN_LIB_OBJS = $(filter-out $(MAIN_BOOT_OBJ),$(OBJS)) +MAIN_BOOT_OBJ = $(filter %/main_boot.o,$(OBJS)) +OVERLAY_BOOT_OBJ = $(filter %/overlay_boot.o,$(OBJS)) +MAIN_LIB_OBJS = $(filter-out $(MAIN_BOOT_OBJ) $(OVERLAY_BOOT_OBJ),$(OBJS)) #$(info $$var is [${MAIN_BOOT_OBJ}]) #$(info $$var2 is [${MAIN_LIB_OBJS}]) @@ -36,6 +37,10 @@ $(LIB_DIR)/$(notdir $(MAIN_BOOT_OBJ)): $(MAIN_BOOT_OBJ) @mkdir -p $(LIB_DIR) cp $(MAIN_BOOT_OBJ) $(LIB_DIR)/$(notdir $(MAIN_BOOT_OBJ)) +$(LIB_DIR)/$(notdir $(OVERLAY_BOOT_OBJ)): $(OVERLAY_BOOT_OBJ) + @mkdir -p $(LIB_DIR) + cp $(OVERLAY_BOOT_OBJ) $(LIB_DIR)/$(notdir $(OVERLAY_BOOT_OBJ)) + # Improve later $(SPLASH_IMAGE): ressources/Splash.png jaby_engine_fconv $< simple-tim full16 | cpp_out --name SplashScreen -o $@ @@ -44,7 +49,7 @@ $(SPLASH_IMAGE_NTSC): ressources/Splash_ntsc.png jaby_engine_fconv $< simple-tim full16 | cpp_out --name SplashScreen -o $@ #Rules section for default compilation and linking -all: $(SPLASH_IMAGE) $(SPLASH_IMAGE_NTSC) $(LIB_DIR)/$(ARTIFACT).a $(LIB_DIR)/$(notdir $(MAIN_BOOT_OBJ)) +all: $(SPLASH_IMAGE) $(SPLASH_IMAGE_NTSC) $(LIB_DIR)/$(ARTIFACT).a $(LIB_DIR)/$(notdir $(MAIN_BOOT_OBJ)) $(LIB_DIR)/$(notdir $(OVERLAY_BOOT_OBJ)) clean: rm -fr $(SPLASH_IMAGE) diff --git a/src/Library/src/BootLoader/boot_file/overlay_boot.cpp b/src/Library/src/BootLoader/boot_file/overlay_boot.cpp new file mode 100644 index 00000000..878f6bff --- /dev/null +++ b/src/Library/src/BootLoader/boot_file/overlay_boot.cpp @@ -0,0 +1,9 @@ +#include "../../../include/BootLoader/boot_loader.hpp" +#include + +namespace BootFile { + JabyEngine::NextRoutine setup() { + printf("Overlay boot not implemented!\n"); + return JabyEngine::NextRoutine::null(); + } +} \ No newline at end of file