1
0
mirror of https://github.com/CTCaer/hekate.git synced 2024-12-25 15:17:19 +00:00

hekate: remove unnecessary sd mounts

- Main already mounts sd. Also by trying again it takes forever to go into TUI
- Skip l4t kernel pstore dump and auto launch fw if sd failed to mount
This commit is contained in:
CTCaer 2022-01-20 13:56:36 +02:00
parent b18b5076b3
commit 39ce19e6f4

View File

@ -287,7 +287,7 @@ void auto_launch_update()
// Check if already chainloaded update and clear flag. Otherwise check for updates.
if (EMC(EMC_SCRATCH0) & EMC_HEKA_UPD)
EMC(EMC_SCRATCH0) &= ~EMC_HEKA_UPD;
else if (sd_mount())
else
{
// Check if update.bin exists and is newer and launch it. Otherwise create it.
if (!f_stat("bootloader/update.bin", NULL))
@ -661,8 +661,6 @@ out:
void nyx_load_run()
{
sd_mount();
u8 *nyx = sd_file_read("bootloader/sys/nyx.bin", NULL);
if (!nyx)
return;
@ -799,8 +797,6 @@ static void _auto_launch_firmware()
LIST_INIT(ini_sections);
LIST_INIT(ini_list_sections);
if (sd_mount())
{
// Load emuMMC configuration.
emummc_load_cfg();
@ -942,9 +938,6 @@ skip_list:
}
else
goto out; // Can't load hekate_ipl.ini.
}
else
goto out;
u8 *bitmap = NULL;
struct _bmp_data bmpData;
@ -1166,6 +1159,8 @@ static void _show_errors()
if (h_cfg.errors & ERR_L4T_KERNEL)
{
WPRINTF("Kernel panic occurred!\n");
if (!(h_cfg.errors & ERR_SD_BOOT_EN))
{
if (!sd_save_to_file((void *)PSTORE_ADDR, PSTORE_SZ, "L4T_panic.bin"))
WPRINTF("PSTORE saved to L4T_panic.bin");
pstore_buf_t *buf = (pstore_buf_t *)(PSTORE_ADDR + PSTORE_LOG_OFFSET);
@ -1175,6 +1170,7 @@ static void _show_errors()
if (!sd_save_to_file((void *)log_offset, buf->size, "L4T_panic.txt"))
WPRINTF("Log saved to L4T_panic.txt");
}
}
gfx_puts("\n");
}
@ -1514,6 +1510,7 @@ void ipl_main()
_show_errors();
// Load saved configuration and auto boot if enabled.
if (!(h_cfg.errors & ERR_SD_BOOT_EN))
_auto_launch_firmware();
// Failed to launch Nyx, unmount SD Card.