Skip to content

Lakka / Lakka Switch: reboot-to-payload and "Install Update" reboot label - #19755

Open
GavinDarkglider wants to merge 2 commits into
libretro:masterfrom
GavinDarkglider:R2P
Open

GavinDarkglider wants to merge 2 commits into
libretro:masterfrom
GavinDarkglider:R2P

Conversation

@GavinDarkglider

Copy link
Copy Markdown
Contributor

Two commits, both Lakka-only (no change to any other build).
lakka_update_pending() helper (lakka.h / retroarch.c), reusing the existing LAKKA_UPDATE_DIR
a new translatable string, MSG_VALUE_INSTALL_UPDATE
a get_value binding for MENU_ENUM_LABEL_REBOOT on HAVE_LAKKA
2. Lakka Switch: reboot into a selected Hekate payload (reboot2payload)
On the Switch, Lakka is one of several Hekate boot entries. The Switchroot L4T kernel's pmc_r2p driver (/sys/devices/r2p) lets userspace choose what Hekate boots next. This commit adds misc/reboot2payload, which:
parses hekate_ipl.ini and bootloader/ini/.ini from /flash into a list of destinations: "Hekate Menu" plus every boot entry, numbered the way Hekate numbers them
defaults to the entry Lakka is running from, read from pmc_r2p.
on the kernel command line
arms pmc_r2p for the selected destination when Reboot is triggered
These options appear under Settings > Lakka Switch Options, only when the kernel provides pmc_r2p:
Reboot Payload: Left/Right cycles the destination. The choice is saved to the config by kind and name, so it survives reordering of the INI files. If the saved entry no longer exists, it falls back to the running entry.
Force Reboot to Lakka if Update Exists (on by default): while an update is staged, Reboot returns to Lakka so the update gets installed.
The main menu Reboot value shows the destination: the payload name, with " (self)" added for the running entry, or Install Update when the update override applies. If pmc_r2p is missing or can't be written to, Reboot behaves exactly as it does today.
Testing
Builds and links with HAVE_LAKKA=1 HAVE_LAKKA_SWITCH=1. The touched objects also build for Lakka without Switch support and for a plain Linux build, with no new warnings.
A host-side harness test of reboot2payload.c against sample hekate_ipl.ini and ini/ files and a sample cmdline covered: running-entry detection, forward and backward cycling with wraparound, saving and restoring a selection, falling back when the saved entry is missing, and the action/param1/param2 values written for launch, ini-config and bootloader targets.
Tested on hardware: Switch (Tegra X1), Lakka L4T.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant