mirror of
https://github.com/wiiu-env/AromaBaseModule.git
synced 2024-12-24 18:51:53 +01:00
Patch loader.elf to spit out less warnings when loading .rpx built with wut
This commit is contained in:
parent
ed4edfc2db
commit
4ee72d785b
@ -2,5 +2,6 @@ FROM ghcr.io/wiiu-env/devkitppc:20240423
|
||||
|
||||
COPY --from=ghcr.io/wiiu-env/libfunctionpatcher:20230621 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:20240424 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libkernel:20230621 /artifacts $DEVKITPRO
|
||||
|
||||
WORKDIR project
|
||||
|
4
Makefile
4
Makefile
@ -41,7 +41,7 @@ CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__
|
||||
CXXFLAGS := $(CFLAGS) -std=c++20
|
||||
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS = -g $(ARCH) $(RPXSPECS) -Wl,-Map,$(notdir $*.map) -Tfunctionpatcher.ld $(WUMSSPECS)
|
||||
LDFLAGS = -g $(ARCH) $(RPXSPECS) -Wl,-Map,$(notdir $*.map) -Tfunctionpatcher.ld -T$(WUMS_ROOT)/share/libkernel.ld $(WUMSSPECS)
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
CXXFLAGS += -DDEBUG -g
|
||||
@ -53,7 +53,7 @@ CXXFLAGS += -DDEBUG -DVERBOSE_DEBUG -g
|
||||
CFLAGS += -DDEBUG -DVERBOSE_DEBUG -g
|
||||
endif
|
||||
|
||||
LIBS := -lwums -lwut -lfunctionpatcher
|
||||
LIBS := -lwums -lwut -lfunctionpatcher -lkernel
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# list of directories containing libraries, this must be the top level
|
||||
|
@ -1,7 +1,9 @@
|
||||
#include "globals.h"
|
||||
#include "logger.h"
|
||||
#include "patches_replacements.h"
|
||||
#include <coreinit/cache.h>
|
||||
#include <cstdlib>
|
||||
#include <kernel/kernel.h>
|
||||
|
||||
// init is not called for this module. We need to make sure to init these values in initCommonPatches()
|
||||
uint32_t gHeapMask;
|
||||
@ -27,6 +29,14 @@ void initCommonPatches() {
|
||||
}
|
||||
}
|
||||
DEBUG_FUNCTION_LINE("Common patches finished");
|
||||
|
||||
// Patch loader.elf to spit out less warnings when loading .rpx built with wut
|
||||
KernelNOPAtPhysicalAddress(0x0100b770 - 0x01000000 + 0x32000000);
|
||||
KernelNOPAtPhysicalAddress(0x0100b800 - 0x01000000 + 0x32000000);
|
||||
KernelNOPAtPhysicalAddress(0x0100b7b8 - 0x01000000 + 0x32000000);
|
||||
ICInvalidateRange(reinterpret_cast<void *>(0x0100b770), 0x04);
|
||||
ICInvalidateRange(reinterpret_cast<void *>(0x0100b800), 0x04);
|
||||
ICInvalidateRange(reinterpret_cast<void *>(0x0100b7b8), 0x04);
|
||||
}
|
||||
|
||||
void commonPatchesStart() {
|
||||
|
Loading…
Reference in New Issue
Block a user