diff --git a/source/fs.c b/source/fs.c index 7493f59..78ea049 100644 --- a/source/fs.c +++ b/source/fs.c @@ -5,7 +5,6 @@ #include "fs.h" #include "memory.h" #include "fatfs/ff.h" -#include "utils.h" static FATFS fs; diff --git a/source/installer.c b/source/installer.c index 0bd12d2..2021118 100755 --- a/source/installer.c +++ b/source/installer.c @@ -22,8 +22,8 @@ static const u8 firm0Hash[0x20] = { }; static const u8 firm0A9lhHash[0x20] = { - 0x6A, 0x5A, 0x74, 0x5F, 0x3B, 0x83, 0x8C, 0xDA, 0x25, 0x1C, 0xA9, 0xDC, 0x59, 0x4E, 0x1B, 0x01, - 0x00, 0x93, 0x27, 0x81, 0x59, 0xAF, 0x2D, 0x3B, 0x76, 0x98, 0xB1, 0xAB, 0xB2, 0x5F, 0x2E, 0x3E + 0x79, 0x3D, 0x35, 0x7B, 0x8F, 0xF1, 0xFC, 0xF0, 0x8F, 0xB6, 0xDB, 0x51, 0x31, 0xD4, 0xA7, 0x74, + 0x8E, 0xF0, 0x4A, 0xB1, 0xA6, 0x7F, 0xCD, 0xAB, 0x0C, 0x0A, 0xC0, 0x69, 0xA7, 0x9D, 0xC5, 0x04 }; static const u8 firm1Hash[0x20] = { @@ -126,7 +126,7 @@ static inline void installer(u32 a9lhBoot) if(!verifyHash((void *)FIRM0_OFFSET, FIRM0_SIZE, firm0Hash)) shutdown(1, "Error: firm0.bin is invalid or corrupted"); } - else if(!verifyHash((void *)FIRM0_OFFSET, STAGE1_POSITION, firm0A9lhHash)) + else if(!verifyHash((void *)FIRM0_OFFSET, SECTION2_POSITION, firm0A9lhHash)) shutdown(1, "Error: NAND FIRM0 is invalid"); if(!a9lhBoot) diff --git a/source/installer.h b/source/installer.h index 0e2bcfe..5480574 100644 --- a/source/installer.h +++ b/source/installer.h @@ -9,18 +9,19 @@ #define PDN_MPCORE_CFG (*(vu8 *)0x10140FFC) #define PDN_SPI_CNT (*(vu8 *)0x101401C0) -#define OTP_FROM_MEM 0x10012000 -#define OTP_OFFSET 0x24000000 -#define SECTOR_OFFSET 0x24100000 -#define FIRM0_OFFSET 0x24200000 -#define FIRM1_OFFSET 0x24300000 -#define FIRM0_SIZE 0xF3000 -#define FIRM1_SIZE 0xF2000 -#define STAGE1_POSITION 0xF0400 -#define STAGE1_OFFSET FIRM0_OFFSET + STAGE1_POSITION -#define STAGE2_OFFSET 0x24400000 -#define MAX_STAGE1_SIZE 0x2000 -#define MAX_STAGE2_SIZE 0x2800 +#define OTP_FROM_MEM 0x10012000 +#define OTP_OFFSET 0x24000000 +#define SECTOR_OFFSET 0x24100000 +#define FIRM0_OFFSET 0x24200000 +#define FIRM1_OFFSET 0x24300000 +#define FIRM0_SIZE 0xF3000 +#define SECTION2_POSITION 0x66A00 +#define FIRM1_SIZE 0xF2000 +#define STAGE1_POSITION 0xF0590 +#define STAGE1_OFFSET FIRM0_OFFSET + STAGE1_POSITION +#define STAGE2_OFFSET 0x24400000 +#define MAX_STAGE1_SIZE 0x1E70 +#define MAX_STAGE2_SIZE 0x2800 static inline void installer(u32 a9lhBoot); static inline void uninstaller(void); \ No newline at end of file