From 6f56b848a6259aa29d1d4c13ff78d71b70220444 Mon Sep 17 00:00:00 2001 From: Aurora Date: Thu, 23 Jun 2016 13:16:57 +0200 Subject: [PATCH] Really fix larger payloads --- source/installer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/installer.c b/source/installer.c index ca1e161..54e5613 100755 --- a/source/installer.c +++ b/source/installer.c @@ -163,7 +163,7 @@ static inline void installer(u32 a9lhBoot) posY = drawString("All checks passed, installing...", 10, posY + SPACING_Y, COLOR_WHITE); //Point of no return, install stuff in the safest order - sdmmc_nand_writesectors(0x5C000, 0x20, (vu8 *)STAGE2_OFFSET); + sdmmc_nand_writesectors(0x5C000, MAX_STAGE2_SIZE / 0x200, (vu8 *)STAGE2_OFFSET); if(!a9lhBoot) writeFirm((u8 *)FIRM1_OFFSET, 1, FIRM1_SIZE); if(!a9lhBoot || updatea9lh) sdmmc_nand_writesectors(0x96, 1, (vu8 *)SECTOR_OFFSET); writeFirm((u8 *)FIRM0_OFFSET, 0, FIRM0_SIZE); @@ -229,7 +229,7 @@ static inline void uninstaller(void) sdmmc_nand_writesectors(0x96, 1, (vu8 *)SECTOR_OFFSET); writeFirm((u8 *)FIRM0_OFFSET, 0, firmSize); writeFirm((u8 *)FIRM1_OFFSET, 1, firmSize); - sdmmc_nand_writesectors(0x5C000, 0x20, (vu8 *)STAGE2_OFFSET); + sdmmc_nand_writesectors(0x5C000, MAX_STAGE2_SIZE / 0x200, (vu8 *)STAGE2_OFFSET); shutdown(2, "Uninstall: success!"); } \ No newline at end of file