From 1f55ec9ca3d23b9647a363fc593bdf3b2745c215 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Wed, 24 May 2017 12:19:14 +0200 Subject: [PATCH] Source code reorganizations --- source/common/common.h | 5 ++++- source/installer.c | 7 +++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/source/common/common.h b/source/common/common.h index fa2ba50..5397959 100644 --- a/source/common/common.h +++ b/source/common/common.h @@ -47,8 +47,11 @@ // #define NO_WRITE // disables all NAND writes, just for testing // #define FAIL_TEST // to test the emergency screen, only works with NO_TRANSFER defined +// name of the FIRM to install (also name of the input path) +#define NAME_FIRM "boot9strap" + // input / output paths -#define INPUT_PATH "0:/boot9strap" +#define INPUT_PATH "0:/" NAME_FIRM // buffer area defines (big buffer for firm) #define WORK_BUFFER ((u8*) 0x21000000) diff --git a/source/installer.c b/source/installer.c index 4c73041..e02f399 100644 --- a/source/installer.c +++ b/source/installer.c @@ -14,12 +14,11 @@ #define FIRM0_NAND_OFFSET FIRM_NAND_OFFSET #define FIRM1_NAND_OFFSET (FIRM_NAND_OFFSET + (FIRM_NAND_SIZE/2)) -#define NAME_SIGHAXFIRM (IS_DEVKIT ? INPUT_PATH "/boot9strap_dev.firm" : INPUT_PATH "/boot9strap.firm") -#define NAME_SIGHAXFIRMSHA (IS_DEVKIT ? INPUT_PATH "/boot9strap_dev.firm.sha" : INPUT_PATH "/boot9strap.firm.sha") +#define NAME_SIGHAXFIRM (IS_DEVKIT ? INPUT_PATH "/" NAME_FIRM "_dev.firm" : INPUT_PATH "/" NAME_FIRM ".firm") +#define NAME_SIGHAXFIRMSHA (IS_DEVKIT ? INPUT_PATH "/" NAME_FIRM "_dev.firm.sha" : INPUT_PATH "/" NAME_FIRM ".firm.sha") #define NAME_SECTOR0x96 (IS_DEVKIT ? INPUT_PATH "/secret_sector_dev.bin" : INPUT_PATH "/secret_sector.bin") #define NAME_FIRMBACKUP INPUT_PATH "/firm0firm1.bak" #define NAME_SECTORBACKUP INPUT_PATH "/sector0x96.bak" -#define NAME_PAYLOAD INPUT_PATH "/payload.firm" #define STATUS_GREY -1 #define STATUS_GREEN 0 @@ -145,7 +144,7 @@ u32 SafeB9SInstaller(void) { // step #3 - check secret_sector.bin file u8 secret_sector[0x200] = { 0 }; - if ((IS_A9LH && !IS_SIGHAX && !IS_O3DS)) { + if (IS_A9LH && !IS_SIGHAX && !IS_O3DS) { snprintf(msgSector, 64, "checking..."); statusSector = STATUS_YELLOW; ShowInstallerStatus();