From 4964dfa77452de2665f6c343487ea5d6febf7b86 Mon Sep 17 00:00:00 2001 From: LibretroAdmin Date: Thu, 29 Oct 2026 18:47:38 +0100 Subject: [PATCH] bootstrap/ moves under os/ The libogc 2 linker scripts go to os/gekko/libogc, the PSP kernel functions PRX to os/psp1 and the Vita heap's sbrk to os/vita, beside each platform's other system code. --- .github/workflows/PSP.yml | 2 +- .gitlab-ci.yml | 6 +++--- Makefile.griffin | 4 ++-- Makefile.ngc | 4 ++-- Makefile.psp1 | 2 +- Makefile.psp1.salamander | 2 +- Makefile.wii | 4 ++-- dist-scripts/dist-cores.sh | 4 ++-- frontend/drivers/platform_gx_libogc.c | 2 +- frontend/drivers/platform_psp.c | 4 ++-- {bootstrap/gx => os/gekko/libogc}/ogc.ld | 0 {bootstrap/gx => os/gekko/libogc}/rvl.ld | 0 {bootstrap => os}/psp1/kernel_functions_prx/LoadExecEf.S | 0 {bootstrap => os}/psp1/kernel_functions_prx/Makefile | 0 .../psp1/kernel_functions_prx/kernel_functions.exp | 0 .../psp1/kernel_functions_prx/kernel_functions.h | 0 {bootstrap => os}/psp1/kernel_functions_prx/main.c | 0 {bootstrap => os}/vita/sbrk.c | 0 18 files changed, 17 insertions(+), 17 deletions(-) rename {bootstrap/gx => os/gekko/libogc}/ogc.ld (100%) rename {bootstrap/gx => os/gekko/libogc}/rvl.ld (100%) rename {bootstrap => os}/psp1/kernel_functions_prx/LoadExecEf.S (100%) rename {bootstrap => os}/psp1/kernel_functions_prx/Makefile (100%) rename {bootstrap => os}/psp1/kernel_functions_prx/kernel_functions.exp (100%) rename {bootstrap => os}/psp1/kernel_functions_prx/kernel_functions.h (100%) rename {bootstrap => os}/psp1/kernel_functions_prx/main.c (100%) rename {bootstrap => os}/vita/sbrk.c (100%) diff --git a/.github/workflows/PSP.yml b/.github/workflows/PSP.yml index f1f1994c45..5384779423 100644 --- a/.github/workflows/PSP.yml +++ b/.github/workflows/PSP.yml @@ -30,7 +30,7 @@ jobs: - name: Compile bootstrap run: | - cd bootstrap/psp1/kernel_functions_prx + cd os/psp1/kernel_functions_prx make -j$(getconf _NPROCESSORS_ONLN) clean make -j$(getconf _NPROCESSORS_ONLN) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3e089dc0e9..5021bbe952 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -755,7 +755,7 @@ build-static-retroarch-psp: - build-static-retroarch-dummy-psp script: # We need to boostrap before compile - - "(cd bootstrap/psp1/kernel_functions_prx/ && make && cd -)" + - "(cd os/psp1/kernel_functions_prx/ && make && cd -)" # Allow failure since we don't have a core - "make -f Makefile.psp1 -j$NUMPROC ||:" - "mkdir .retroarch-precompiled" @@ -777,9 +777,9 @@ build-static-retroarch-dummy-psp: expire_in: 10 min dependencies: [] script: - - "(cd bootstrap/psp1/kernel_functions_prx/ && make && cd -)" + - "(cd os/psp1/kernel_functions_prx/ && make && cd -)" - "make -f Makefile.psp1.salamander -j$NUMPROC" - - "make -C bootstrap/psp1/kernel_functions_prx/" + - "make -C os/psp1/kernel_functions_prx/" - "mkdir -p ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg" - "cp -f pkg/psp1/ICON0.PNG ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg" - "cp -f pkg/psp1/PIC1.PNG ${MEDIA_PATH}/${CI_PROJECT_NAME}/pkg" diff --git a/Makefile.griffin b/Makefile.griffin index 6430e14ef5..94bfda1305 100644 --- a/Makefile.griffin +++ b/Makefile.griffin @@ -153,13 +153,13 @@ else ifeq ($(libogc_platform), 1) LDFLAGS += $(MACHDEP) -Wl,-Map,$(notdir $(EXT_INTER_TARGET)).map ifeq ($(BIG_STACK), 1) - LDFLAGS += -T bootstrap/gx/ogc.ld + LDFLAGS += -T os/gekko/libogc/ogc.ld endif else ifeq ($(platform), wii) LDFLAGS += $(MACHDEP) -Wl,-Map,$(notdir $(EXT_INTER_TARGET)).map,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,strdup,-wrap,strndup,-wrap,malloc_usable_size ifeq ($(BIG_STACK), 1) - LDFLAGS += -T bootstrap/gx/rvl.ld + LDFLAGS += -T os/gekko/libogc/rvl.ld endif endif diff --git a/Makefile.ngc b/Makefile.ngc index 117a41d83b..4e4c35c069 100644 --- a/Makefile.ngc +++ b/Makefile.ngc @@ -110,7 +110,7 @@ MACHDEP += -DGEKKO -mcpu=750 -meabi -mhard-float LDFLAGS += $(MACHDEP) -Wl,-Map,$(notdir $(EXT_INTER_TARGET)).map # libogc 3 links with devkitPPC's own scripts and sizes the main stack -# in C (platform_gx_libogc.c); older libogc takes the bootstrap/gx ones. +# in C (platform_gx_libogc.c); older libogc takes the os/gekko/libogc ones. LIBOGC_MAJOR := $(shell sed -n 's/^.define[[:space:]]*_V_MAJOR_[[:space:]]*\([0-9]*\).*/\1/p' $(DEVKITPRO)/libogc/include/ogc/libversion.h 2>/dev/null) ifneq ($(filter-out 0 1 2,$(LIBOGC_MAJOR)),) LIBOGC_OWN_LD := 1 @@ -119,7 +119,7 @@ endif ifeq ($(HAVE_LIBOGC), 0) LDFLAGS += -T os/gekko/boot/dol.ld -Los/gekko/boot else ifeq ($(BIG_STACK)$(LIBOGC_OWN_LD), 1) - LDFLAGS += -T bootstrap/gx/ogc.ld + LDFLAGS += -T os/gekko/libogc/ogc.ld endif ifeq ($(HAVE_OGG_OGC), 1) diff --git a/Makefile.psp1 b/Makefile.psp1 index 028da326d8..69cac90c64 100644 --- a/Makefile.psp1 +++ b/Makefile.psp1 @@ -60,7 +60,7 @@ RARCH_DEFINES += -DHAVE_THREADS endif ifeq ($(HAVE_KERNEL_PRX), 1) -OBJS += bootstrap/psp1/kernel_functions.o +OBJS += os/psp1/kernel_functions.o CFLAGS += -DHAVE_KERNEL_PRX endif diff --git a/Makefile.psp1.salamander b/Makefile.psp1.salamander index dd95cb71fc..3f8c2d6b6a 100644 --- a/Makefile.psp1.salamander +++ b/Makefile.psp1.salamander @@ -51,7 +51,7 @@ OBJS = frontend/frontend_salamander.o \ verbosity.o ifeq ($(HAVE_KERNEL_PRX), 1) -OBJS += bootstrap/psp1/kernel_functions.o +OBJS += os/psp1/kernel_functions.o CFLAGS += -DHAVE_KERNEL_PRX endif diff --git a/Makefile.wii b/Makefile.wii index 189be8ecac..7e31ad14ce 100644 --- a/Makefile.wii +++ b/Makefile.wii @@ -103,7 +103,7 @@ LIBDIRS += -L. MACHDEP += -DGEKKO -mcpu=750 -meabi -mhard-float # libogc 3 links with devkitPPC's own scripts and sizes the main stack -# in C (platform_gx_libogc.c); older libogc takes the bootstrap/gx ones. +# in C (platform_gx_libogc.c); older libogc takes the os/gekko/libogc ones. LIBOGC_MAJOR := $(shell sed -n 's/^.define[[:space:]]*_V_MAJOR_[[:space:]]*\([0-9]*\).*/\1/p' $(DEVKITPRO)/libogc/include/ogc/libversion.h 2>/dev/null) ifneq ($(filter-out 0 1 2,$(LIBOGC_MAJOR)),) LIBOGC_OWN_LD := 1 @@ -113,7 +113,7 @@ ifeq ($(HAVE_LIBOGC), 1) LDFLAGS += $(MACHDEP) -Wl,-Map,$(notdir $(EXT_INTER_TARGET)).map,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,strdup,-wrap,strndup,-wrap,malloc_usable_size ifeq ($(BIG_STACK)$(LIBOGC_OWN_LD), 1) - LDFLAGS += -T bootstrap/gx/rvl.ld + LDFLAGS += -T os/gekko/libogc/rvl.ld endif else # os/gekko's heap runs from MEM1 into MEM2 by itself. diff --git a/dist-scripts/dist-cores.sh b/dist-scripts/dist-cores.sh index c8aab05dff..34fa161c63 100755 --- a/dist-scripts/dist-cores.sh +++ b/dist-scripts/dist-cores.sh @@ -33,8 +33,8 @@ EXT=a mkdir -p ../pkg/${platform}/cores/ -make -C ../bootstrap/${platform}/kernel_functions_prx/ clean || exit 1 -make -C ../bootstrap/${platform}/kernel_functions_prx/ || exit 1 +make -C ../os/${platform}/kernel_functions_prx/ clean || exit 1 +make -C ../os/${platform}/kernel_functions_prx/ || exit 1 cp -f ../kernel_functions.prx ../pkg/${platform}/kernel_functions.prx # Vita diff --git a/frontend/drivers/platform_gx_libogc.c b/frontend/drivers/platform_gx_libogc.c index 1606f0400f..ffaa6a4d35 100644 --- a/frontend/drivers/platform_gx_libogc.c +++ b/frontend/drivers/platform_gx_libogc.c @@ -80,7 +80,7 @@ static enum frontend_fork gx_fork_mode = FRONTEND_FORK_NONE; #include #if defined(BIG_STACK) && _V_MAJOR_ >= 3 /* libogc 3 starts main on the stack __ppc_main_sp points to the top of; - * this one is the 512 KiB the bootstrap/gx linker scripts give libogc 2. */ + * this one is the 512 KiB the os/gekko/libogc linker scripts give libogc 2. */ static u8 gx_main_stack[0x80000] ATTRIBUTE_ALIGN(32); u8 *__ppc_main_sp = gx_main_stack + sizeof(gx_main_stack); #endif diff --git a/frontend/drivers/platform_psp.c b/frontend/drivers/platform_psp.c index 6b532dc234..19a4a29f78 100644 --- a/frontend/drivers/platform_psp.c +++ b/frontend/drivers/platform_psp.c @@ -29,7 +29,7 @@ #include #include -#include "../../bootstrap/vita/sbrk.c" +#include "../../os/vita/sbrk.c" #else #include @@ -64,7 +64,7 @@ #endif #if defined(PSP) && defined(HAVE_KERNEL_PRX) -#include "../../bootstrap/psp1/kernel_functions.h" +#include "../../os/psp1/kernel_functions.h" #endif #if defined(HAVE_VITAGLES) diff --git a/bootstrap/gx/ogc.ld b/os/gekko/libogc/ogc.ld similarity index 100% rename from bootstrap/gx/ogc.ld rename to os/gekko/libogc/ogc.ld diff --git a/bootstrap/gx/rvl.ld b/os/gekko/libogc/rvl.ld similarity index 100% rename from bootstrap/gx/rvl.ld rename to os/gekko/libogc/rvl.ld diff --git a/bootstrap/psp1/kernel_functions_prx/LoadExecEf.S b/os/psp1/kernel_functions_prx/LoadExecEf.S similarity index 100% rename from bootstrap/psp1/kernel_functions_prx/LoadExecEf.S rename to os/psp1/kernel_functions_prx/LoadExecEf.S diff --git a/bootstrap/psp1/kernel_functions_prx/Makefile b/os/psp1/kernel_functions_prx/Makefile similarity index 100% rename from bootstrap/psp1/kernel_functions_prx/Makefile rename to os/psp1/kernel_functions_prx/Makefile diff --git a/bootstrap/psp1/kernel_functions_prx/kernel_functions.exp b/os/psp1/kernel_functions_prx/kernel_functions.exp similarity index 100% rename from bootstrap/psp1/kernel_functions_prx/kernel_functions.exp rename to os/psp1/kernel_functions_prx/kernel_functions.exp diff --git a/bootstrap/psp1/kernel_functions_prx/kernel_functions.h b/os/psp1/kernel_functions_prx/kernel_functions.h similarity index 100% rename from bootstrap/psp1/kernel_functions_prx/kernel_functions.h rename to os/psp1/kernel_functions_prx/kernel_functions.h diff --git a/bootstrap/psp1/kernel_functions_prx/main.c b/os/psp1/kernel_functions_prx/main.c similarity index 100% rename from bootstrap/psp1/kernel_functions_prx/main.c rename to os/psp1/kernel_functions_prx/main.c diff --git a/bootstrap/vita/sbrk.c b/os/vita/sbrk.c similarity index 100% rename from bootstrap/vita/sbrk.c rename to os/vita/sbrk.c