Let Erista reboot to hekate

The entry was hidden on Erista whenever the SD card was not mounted while
the menu was built. When shown, it tried atmosphere/reboot_payload.bin
first; on OmniNX that is fusee, which is rejected as not hekate, and the
rejection unmounted the card, so bootloader/update.bin was never found.
Always offer the entry, try the hekate files first, mount the card before
each attempt and point to RCM if hekate cannot be loaded.
This commit is contained in:
niklascfw committed 2026-11-30 22:41:02 +01:00
1 parent ed1361b33f
commit 1dabe126ac
3 files changed
+22 -18

No files matched your search

+3 -1
View File
@@ -145,7 +145,9 @@ void EnterMainMenu(){
sd_unmount();
// // -- Exit --
mainMenuEntries[MainRebootHekate].hide = !h_cfg.t210b01 && (!sd_get_card_mounted() || !hekate_reboot_available());
// Always offered: on Erista, reboot_to_hekate_menu() mounts the SD card
// itself and says so if hekate is missing.
mainMenuEntries[MainRebootHekate].hide = false;
mainMenuEntries[MainRebootRCM].hide = h_cfg.t210b01;
mainMenuEntries[FixMarikoWarmbootSleep].hide = !h_cfg.t210b01;
+19 -16
View File
@@ -12,33 +12,22 @@
#include "../fs/fsutils.h"
#include "../config.h"
#include <rtc/max77620-rtc.h>
#include <storage/sd.h>
#include <string.h>
extern hekate_config h_cfg;
extern int launch_payload_ex(char *path, bool force_hekate_menu);
// Hekate files first: reboot_payload.bin is often Atmosphere's fusee (no hekate
// magic, skipped by launch_payload_ex), so it only helps when it is hekate.
static const char *hekate_payload_paths[] = {
"sd:/atmosphere/reboot_payload.bin",
"sd:/bootloader/update.bin",
"sd:/bootloader/payloads/hekate.bin",
"sd:/atmosphere/reboot_payload.bin",
"sd:/sept/payload.bin",
};
bool hekate_reboot_available(void)
{
if (h_cfg.t210b01)
return true;
for (u32 i = 0; i < sizeof(hekate_payload_paths) / sizeof(hekate_payload_paths[0]); i++)
{
if (FileExists(hekate_payload_paths[i]))
return true;
}
return false;
}
void reboot_to_hekate_menu(void)
{
if (h_cfg.t210b01)
@@ -50,8 +39,22 @@ void reboot_to_hekate_menu(void)
return;
}
// Erista: chainload hekate from the SD card (mounted here, so the entry
// also works after an action unmounted the card).
if (!sd_get_card_mounted() && !sd_mount())
{
gfx_clearscreen();
gfx_printf("\n\nSD-Karte konnte nicht gemountet werden.\n\nNutze \"Neustart in RCM-Modus\" und starte\nhekate per Payload-Injector.\n\nDruecke eine Taste um zurueckzukehren");
hidWait();
return;
}
for (u32 i = 0; i < sizeof(hekate_payload_paths) / sizeof(hekate_payload_paths[0]); i++)
{
// launch_payload_ex() unmounts the card when it rejects a payload that is
// not hekate, so mount again before checking the next path.
if (!sd_get_card_mounted() && !sd_mount())
break;
if (!FileExists(hekate_payload_paths[i]))
continue;
@@ -60,7 +63,7 @@ void reboot_to_hekate_menu(void)
}
gfx_clearscreen();
gfx_printf("\n\nHekate nicht gefunden.\n\nDruecke eine Taste um zurueckzukehren");
gfx_printf("\n\nHekate nicht gefunden (bootloader/update.bin).\n\nNutze \"Neustart in RCM-Modus\" und starte\nhekate per Payload-Injector.\n\nDruecke eine Taste um zurueckzukehren");
hidWait();
}
-1
View File
@@ -7,7 +7,6 @@ bool StrEndsWith(char *begin, char *end);
void WaitFor(u32 ms);
void RebootToPayloadOrRcm();
void reboot_to_hekate_menu(void);
bool hekate_reboot_available(void);
int launch_payload_ex(char *path, bool force_hekate_menu);
int launch_payload(char *path);