Zero the last-FIRM-booted flag when exiting config

This commit is contained in:
Aurora 2016-03-29 17:58:33 +02:00
parent 5f32779ceb
commit 945f80993b
3 changed files with 5 additions and 1 deletions

View File

@ -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 {

View File

@ -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);

View File

@ -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);