diff --git a/source/firm.h b/source/firm.h index 3dd8ffa1..e1fc1086 100644 --- a/source/firm.h +++ b/source/firm.h @@ -10,7 +10,6 @@ #define PDN_MPCORE_CFG (*(vu8 *)0x10140FFC) #define PDN_SPI_CNT (*(vu8 *)0x101401C0) -#define CFG_BOOTENV (*(vu8 *)0x10010000) //FIRM Header layout typedef struct firmSectionHeader { diff --git a/source/utils.c b/source/utils.c index 5dcf2a99..d64c13cf 100644 --- a/source/utils.c +++ b/source/utils.c @@ -113,6 +113,9 @@ void configureCFW(const char *configPath, const char *firm90Path){ tempConfig |= options[i].enabled << i; fileWrite(&tempConfig, configPath, 3); + //Zero the last booted FIRM flag + CFG_BOOTENV = 0; + //Reboot i2cWriteRegister(I2C_DEV_MCU, 0x20, 1 << 2); while(1); diff --git a/source/utils.h b/source/utils.h index d81795b5..e86f4aa5 100644 --- a/source/utils.h +++ b/source/utils.h @@ -8,6 +8,8 @@ #include "types.h" +#define CFG_BOOTENV (*(vu8 *)0x10010000) + void configureCFW(const char *configPath, const char *firm90Path); void deleteFirms(const char *firmPaths[], u32 firms); void error(const char *message); \ No newline at end of file