Merge branch 'master' into developer
Conflicts: source/firm.c source/patches.c source/patches.h
This commit is contained in:
@@ -43,7 +43,7 @@ static inline int strlen(const char *string)
|
||||
bool loadSplash(void)
|
||||
{
|
||||
//Don't delay boot nor init the screens if no splash image is on the SD
|
||||
if(getFileSize("/luma/splash.bin") + getFileSize("/luma/splash.bin") == 0)
|
||||
if(getFileSize("/luma/splash.bin") + getFileSize("/luma/splashbottom.bin") == 0)
|
||||
return false;
|
||||
|
||||
initScreens();
|
||||
|
||||
@@ -397,7 +397,7 @@ static inline void copySection0AndInjectSystemModules(FirmwareType firmType)
|
||||
u8 *pos = arm11Section0, *end = pos + section[0].size;
|
||||
u32 n = 0;
|
||||
|
||||
u32 loaderIndex = 0;
|
||||
u32 loaderIndex = 0, twlBgIndex = 0;
|
||||
|
||||
while(pos < end)
|
||||
{
|
||||
@@ -421,20 +421,35 @@ static inline void copySection0AndInjectSystemModules(FirmwareType firmType)
|
||||
}
|
||||
|
||||
if(firmType == NATIVE_FIRM && memcmp(modules[n].name, "loader", 7) == 0) loaderIndex = n;
|
||||
else if(firmType == TWL_FIRM && memcmp(modules[n].name, "TwlBg", 6) == 0) twlBgIndex = n;
|
||||
|
||||
n++;
|
||||
}
|
||||
|
||||
u32 twlBgSize = 0;
|
||||
|
||||
if(firmType == NATIVE_FIRM && modules[loaderIndex].addr != NULL)
|
||||
{
|
||||
modules[loaderIndex].size = injector_size;
|
||||
modules[loaderIndex].addr = injector;
|
||||
}
|
||||
|
||||
else if(firmType == TWL_FIRM)
|
||||
{
|
||||
twlBgSize = getFileSize("/luma/TwlBg.cxi");
|
||||
if(twlBgSize != 0)
|
||||
{
|
||||
modules[twlBgIndex].size = twlBgSize;
|
||||
modules[twlBgIndex].addr = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
pos = section[0].address;
|
||||
for(u32 i = 0; i < n; i++)
|
||||
{
|
||||
if(modules[i].addr != NULL)
|
||||
if(firmType == TWL_FIRM && i == twlBgIndex && twlBgSize != 0)
|
||||
fileRead(pos, "/luma/TwlBg.cxi");
|
||||
else if(modules[i].addr != NULL)
|
||||
memcpy(pos, modules[i].addr, modules[i].size);
|
||||
else
|
||||
{
|
||||
|
||||
@@ -53,5 +53,4 @@ void patchP9AccessChecks(u8 *pos, u32 size);
|
||||
void patchUnitInfoValueSet(u8 *pos, u32 size);
|
||||
void reimplementSvcBackdoor(u8 *pos, u32 size);
|
||||
void implementSvcGetCFWInfo(u8 *pos, u32 size);
|
||||
void applyLegacyFirmPatches(u8 *pos, FirmwareType firmType);
|
||||
u8 *getUnitInfoValueSet(u8 *pos, u32 size);
|
||||
void applyLegacyFirmPatches(u8 *pos, FirmwareType firmType);
|
||||
Reference in New Issue
Block a user