Always load firmware.bin when it exists.
This commit is contained in:
parent
81e2b7c11c
commit
c36ad54bcb
@ -271,13 +271,15 @@ void main(void)
|
|||||||
static inline u32 loadFirm(FirmwareType firmType)
|
static inline u32 loadFirm(FirmwareType firmType)
|
||||||
{
|
{
|
||||||
section = firm->section;
|
section = firm->section;
|
||||||
|
bool externalFirmExists = getFileSize("/luma/firmware.bin") != 0;
|
||||||
|
|
||||||
//Load FIRM from CTRNAND, unless it's an O3DS and we're loading a pre-5.0 NATIVE FIRM
|
//Load FIRM from CTRNAND, unless it's an O3DS and we're loading a pre-5.0 NATIVE FIRM
|
||||||
u32 firmVersion = firmRead(firm, (u32)firmType);
|
u32 firmVersion = firmRead(firm, (u32)firmType);
|
||||||
|
|
||||||
if(!isN3DS && firmType == NATIVE_FIRM && firmVersion < 0x25)
|
if(firmType == NATIVE_FIRM && ((!isN3DS && firmVersion < 0x25) || externalFirmExists))
|
||||||
{
|
{
|
||||||
if(!fileRead(firm, "/luma/firmware.bin") || (((u32)section[2].address >> 8) & 0xFF) != 0x68)
|
//Always load the external firmware file if it exists
|
||||||
|
if((!fileRead(firm, "/luma/firmware.bin") || (((u32)section[2].address >> 8) & 0xFF) != 0x68) && (!isN3DS && firmVersion < 0x25))
|
||||||
error("An old unsupported FIRM has been detected.\nCopy firmware.bin in /luma to boot");
|
error("An old unsupported FIRM has been detected.\nCopy firmware.bin in /luma to boot");
|
||||||
|
|
||||||
//No assumption regarding FIRM version
|
//No assumption regarding FIRM version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user