Minor stuff
This commit is contained in:
parent
32d5c52b5f
commit
66c041ad93
@ -51,12 +51,12 @@ u32 loadFirm(FirmwareType *firmType, FirmwareSource nandType, bool loadFromStora
|
|||||||
"luma/cetk_safe"
|
"luma/cetk_safe"
|
||||||
};
|
};
|
||||||
|
|
||||||
if(isSdMode && !mountFs(false)) error("Error mounting CTRNAND.");
|
if(isSdMode && !mountFs(false)) error("Failed to mount CTRNAND.");
|
||||||
|
|
||||||
//Load FIRM from CTRNAND
|
//Load FIRM from CTRNAND
|
||||||
u32 firmVersion = firmRead(firm, (u32)*firmType);
|
u32 firmVersion = firmRead(firm, (u32)*firmType);
|
||||||
|
|
||||||
if(firmVersion == 0xFFFFFFFF) error("Error getting the CTRNAND FIRM.");
|
if(firmVersion == 0xFFFFFFFF) error("Failed to get the CTRNAND FIRM.");
|
||||||
|
|
||||||
bool mustLoadFromStorage = false;
|
bool mustLoadFromStorage = false;
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ u32 loadFirm(FirmwareType *firmType, FirmwareSource nandType, bool loadFromStora
|
|||||||
|
|
||||||
if(loadFromStorage || mustLoadFromStorage)
|
if(loadFromStorage || mustLoadFromStorage)
|
||||||
{
|
{
|
||||||
u32 firmSize = fileRead(firm, *firmType == NATIVE_FIRM1X2X ? firmwareFiles[0] : firmwareFiles[(u32)*firmType], 0x400000);
|
u32 firmSize = fileRead(firm, *firmType == NATIVE_FIRM1X2X ? firmwareFiles[0] : firmwareFiles[(u32)*firmType], 0x400200);
|
||||||
|
|
||||||
if(firmSize > sizeof(Cxi))
|
if(firmSize > sizeof(Cxi))
|
||||||
{
|
{
|
||||||
|
@ -203,7 +203,7 @@ u32 firmRead(void *dest, u32 firmType)
|
|||||||
//Convert back the .app name from integer to array
|
//Convert back the .app name from integer to array
|
||||||
hexItoa(firmVersion, path + 35, 8, false);
|
hexItoa(firmVersion, path + 35, 8, false);
|
||||||
|
|
||||||
if(!fileRead(dest, path, 0x400200)) firmVersion = 0xFFFFFFFF;
|
if(fileRead(dest, path, 0x400200) <= sizeof(Cxi)) firmVersion = 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ void main(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
firmSource = FIRMWARE_SYSNAND;
|
firmSource = FIRMWARE_SYSNAND;
|
||||||
if(!mountFs(false) || !switchToCtrNand()) error("Error mounting SD and CTRNAND.");
|
if(!mountFs(false) || !switchToCtrNand()) error("Failed to mount SD and CTRNAND.");
|
||||||
isSdMode = false;
|
isSdMode = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user