Repository navigation
Lakka / Lakka Switch: reboot-to-payload and "Install Update" reboot label - #19755
Open
GavinDarkglider wants to merge 2 commits into
Open
GavinDarkglider wants to merge 2 commits into
GavinDarkglider wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.