From b3f6e055b2d0d09eed5d421f9ceb659095eadc28 Mon Sep 17 00:00:00 2001 From: shchmue Date: Tue, 5 Jan 2021 15:38:53 -0700 Subject: [PATCH] Reconfigure messages to conserve payload size --- source/hos/sept.c | 1 - source/keys/keys.c | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/source/hos/sept.c b/source/hos/sept.c index 5e6ef73..94b86f6 100644 --- a/source/hos/sept.c +++ b/source/hos/sept.c @@ -157,7 +157,6 @@ int reboot_to_sept(const u8 *tsec_fw, const u32 tsec_size, const u32 kb) f_close(&fp); sd_unmount(); - gfx_printf("\n%kPress Power or Vol +/-\n to Reboot to Sept...", colors[(color_idx++) % 6]); u32 pk1t_sept = SEPT_PK1T_ADDR - (ALIGN(PATCHED_RELOC_SZ, 0x10) + WB_RST_SIZE); diff --git a/source/keys/keys.c b/source/keys/keys.c index 92fa3c8..cfd3952 100644 --- a/source/keys/keys.c +++ b/source/keys/keys.c @@ -127,8 +127,7 @@ static u8 *_read_pkg1(sdmmc_t *sdmmc, const pkg1_id_t **pkg1_id) { static bool _handle_sept(void *tsec_fw, u32 tsec_size, u32 kb, void *out_key) { sd_mount(); if (!f_stat("sd:/sept/payload.bak", NULL)) { - if (f_unlink("sd:/sept/payload.bin")) - gfx_printf("%kNote: no payload.bin already in /sept\n", colors[(color_idx++) % 6]); + f_unlink("sd:/sept/payload.bin"); f_rename("sd:/sept/payload.bak", "sd:/sept/payload.bin"); } @@ -152,7 +151,7 @@ static bool _handle_sept(void *tsec_fw, u32 tsec_size, u32 kb, void *out_key) { volatile reloc_meta_t *relocator = (reloc_meta_t *)(IPL_LOAD_ADDR + RELOC_META_OFF); u32 payload_size = relocator->end - IPL_LOAD_ADDR; if (f_open(&fp, "sd:/sept/payload.bin", FA_CREATE_NEW | FA_WRITE)) { - EPRINTF("Unable to open /sept/payload.bin to write."); + EPRINTF("Unable to write self to /sept/payload.bin."); return false; } gfx_printf("%kWrite self to /sept/payload.bin...", colors[(color_idx++) % 6]);