Permalink
Browse files

Merge remote-tracking branch 'origin/master'

  • Loading branch information...
MarieKirya committed Dec 23, 2018
2 parents f83b1f7 + 94e454b commit 603c2f3abe2c155abe833b06a4c9cd5aa0ee5112
Showing with 8 additions and 2 deletions.
  1. +1 −1 Makefile
  2. +7 −1 src/firmware.c
@@ -52,7 +52,7 @@ $(dir_out)/sysmodules: $(dir_sysmod)
@cp $(dir_sysmod)/loader/loader.kip $(dir_out)/ReiNX/sysmodules/
@cp $(dir_sysmod)/sm/sm.kip $(dir_out)/ReiNX/sysmodules/
@cp $(dir_sysmod)/pm/pm.kip $(dir_out)/ReiNX/sysmodules/
@cp $(dir_sysmod)/fs_mitm/fs_mitm.kip $(dir_out)/ReiNX/sysmodules.dis/
@cp $(dir_sysmod)/fs_mitm/fs_mitm.kip $(dir_out)/ReiNX/sysmodules/

$(dir_out)/$(name).bin: $(dir_build)/$(name).elf
@mkdir -p "$(@D)"
@@ -520,7 +520,7 @@ void firmware() {
gfx_clear_color(&gfx_ctxt, 0xFF000000);
gfx_con_init(&gfx_con, &gfx_ctxt);
gfx_con_setcol(&gfx_con, DEFAULT_TEXT_COL, 0, 0);
u8 fo[] = {0xF0, 0xE0, 0xD0, 0x00};

if (!sdMount()) {
error("Failed to init SD card!\n");
print("Press POWER to power off, or any other key to continue without SD.\n");
@@ -546,6 +546,12 @@ void firmware() {
if(fopen("/ReiNX/Recovery.bin", "rb") != 0) {
fread((void*)PAYLOAD_ADDR, fsize(), 1);
fclose();
if(!fopen("/ReiNX.bin", "rb")) {
memcpy((void *)0x82000000, (void *)0x40008000, 0x1ed58);
} else {
PMC(APBDEV_PMC_SCRATCH49) = 69;
fclose();
}
sdUnmount();
CLOCK(CLK_RST_CONTROLLER_CLK_OUT_ENB_V) |= 0x400; // Enable AHUB clock.
CLOCK(CLK_RST_CONTROLLER_CLK_OUT_ENB_Y) |= 0x40; // Enable APE clock.

0 comments on commit 603c2f3

Please sign in to comment.