Source code reorganizations

This commit is contained in:
d0k3 2017-05-24 12:19:14 +02:00
parent 098a64d3cd
commit 1f55ec9ca3
2 changed files with 7 additions and 5 deletions

View File

@ -47,8 +47,11 @@
// #define NO_WRITE // disables all NAND writes, just for testing // #define NO_WRITE // disables all NAND writes, just for testing
// #define FAIL_TEST // to test the emergency screen, only works with NO_TRANSFER defined // #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 // input / output paths
#define INPUT_PATH "0:/boot9strap" #define INPUT_PATH "0:/" NAME_FIRM
// buffer area defines (big buffer for firm) // buffer area defines (big buffer for firm)
#define WORK_BUFFER ((u8*) 0x21000000) #define WORK_BUFFER ((u8*) 0x21000000)

View File

@ -14,12 +14,11 @@
#define FIRM0_NAND_OFFSET FIRM_NAND_OFFSET #define FIRM0_NAND_OFFSET FIRM_NAND_OFFSET
#define FIRM1_NAND_OFFSET (FIRM_NAND_OFFSET + (FIRM_NAND_SIZE/2)) #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_SIGHAXFIRM (IS_DEVKIT ? INPUT_PATH "/" NAME_FIRM "_dev.firm" : INPUT_PATH "/" NAME_FIRM ".firm")
#define NAME_SIGHAXFIRMSHA (IS_DEVKIT ? INPUT_PATH "/boot9strap_dev.firm.sha" : INPUT_PATH "/boot9strap.firm.sha") #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_SECTOR0x96 (IS_DEVKIT ? INPUT_PATH "/secret_sector_dev.bin" : INPUT_PATH "/secret_sector.bin")
#define NAME_FIRMBACKUP INPUT_PATH "/firm0firm1.bak" #define NAME_FIRMBACKUP INPUT_PATH "/firm0firm1.bak"
#define NAME_SECTORBACKUP INPUT_PATH "/sector0x96.bak" #define NAME_SECTORBACKUP INPUT_PATH "/sector0x96.bak"
#define NAME_PAYLOAD INPUT_PATH "/payload.firm"
#define STATUS_GREY -1 #define STATUS_GREY -1
#define STATUS_GREEN 0 #define STATUS_GREEN 0
@ -145,7 +144,7 @@ u32 SafeB9SInstaller(void) {
// step #3 - check secret_sector.bin file // step #3 - check secret_sector.bin file
u8 secret_sector[0x200] = { 0 }; u8 secret_sector[0x200] = { 0 };
if ((IS_A9LH && !IS_SIGHAX && !IS_O3DS)) { if (IS_A9LH && !IS_SIGHAX && !IS_O3DS) {
snprintf(msgSector, 64, "checking..."); snprintf(msgSector, 64, "checking...");
statusSector = STATUS_YELLOW; statusSector = STATUS_YELLOW;
ShowInstallerStatus(); ShowInstallerStatus();