feat: treat a Lakka card as a card setup

Lakka keeps its BIOS on its STORAGE partition (/storage/system). A computer now tells that partition by the retroarch.cfg RetroArch writes there, whose system_directory is Lakka's /tmp/system overlay, and --platform lakka on a computer asks for the card instead of writing to /storage/system here.
This commit is contained in:
Abdessamad Derraz committed 2026-11-06 03:41:18 +01:00
1 parent a2e8809945
commit f8702a19f7
6 files changed
+29 -12

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@
# and Invoke-WebRequest throws on a cut transfer before the hash is read:
# the site's build rewrites this line there (scripts/sitebootstrap.py).
$mismatchAdvice = "The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that."
$defaultInstallSha256 = "4d5fbd4fcf4fc42e4ae02ebfa568fd906ef673d003eefcae22e38e520d70c243"
$defaultInstallSha256 = "78ef177611168c1c7699cafa8982f901aaaf5342b6c55d6e158ba18fb4cc0ae2"
$maximumInstallerBytes = 2MB
$installerExit = 0
$installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null }
+13 -1
View File
@@ -13868,6 +13868,18 @@ _SHARE_RULES: tuple[_OsRule, ...] = (
_OsRule("rocknix", "ROCKNIX", "file_matches",
(".config/system/configs/system.cfg", r"^root\.password=rocknix\s*$"),
"roms/bios"),
# Lakka's is /storage, its STORAGE partition (Lakka-LibreELEC v6.1,
# packages/sysutils/busybox/scripts/fs-resize:31). RetroArch reads its
# BIOS through /tmp/system, an overlay whose upper folder is
# /storage/system (packages/lakka/retroarch_base/retroarch/system.d/
# tmp-system.mount:12). With HOME=/storage (config/retroarch-env.conf:1)
# RetroArch writes .config/retroarch/retroarch.cfg from the /etc
# skeleton at its first start (RetroArch 69a4f0ea, configuration.c:
# 3650-3676), whose system_directory is that overlay (config/
# retroarch.cfg:3217): no other system we install for reads /tmp/system.
_OsRule("lakka", "Lakka", "file_matches",
(".config/retroarch/retroarch.cfg",
r'^system_directory = "/tmp/system"\s*$'), "system"),
# MiSTer's is its exFAT partition, /media/fat (Main_MiSTer e0a234f9,
# file_io.cpp:1177), whose root holds the MiSTer binary and menu.rbf
# (Distribution_MiSTer ce602319) and which reads each core's files
@@ -19449,7 +19461,7 @@ def setup_list(setups: list, mounted: set, needle: str = "",
# The systems that run from an SD card on a board kept on a desk, not in
# the hand: their row stays among the platforms, and the handhelds' block,
# which leads when nothing is found here, keeps Onion four presses away.
_DESK_CARDS = frozenset({"misterfpga"})
_DESK_CARDS = frozenset({"misterfpga", "lakka"})
# The setups a computer runs, by its system, first in the setup list when
# nothing was found here. RetroBat runs on Windows alone (retrobat.org), and
+1 -1
View File
@@ -23,7 +23,7 @@ DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/ins
# curl or wget stop on a cut transfer before the hash is read: the site's
# build rewrites this line there (scripts/sitebootstrap.py).
MISMATCH_ADVICE="The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that."
DEFAULT_INSTALL_SHA256="4d5fbd4fcf4fc42e4ae02ebfa568fd906ef673d003eefcae22e38e520d70c243"
DEFAULT_INSTALL_SHA256="78ef177611168c1c7699cafa8982f901aaaf5342b6c55d6e158ba18fb4cc0ae2"
MAX_INSTALLER_BYTES=2097152
cleanup() {
+8 -8
View File
@@ -27,8 +27,8 @@
{
"dest": "roms/ports/retrobios/install.py",
"repo_path": "install.py",
"size": 1099572,
"sha256": "4d5fbd4fcf4fc42e4ae02ebfa568fd906ef673d003eefcae22e38e520d70c243",
"size": 1100388,
"sha256": "78ef177611168c1c7699cafa8982f901aaaf5342b6c55d6e158ba18fb4cc0ae2",
"executable": false
},
{
@@ -71,8 +71,8 @@
"muos": {
"archive": {
"dest": "ARCHIVE/RetroBIOS.muxapp",
"size": 1153199,
"sha256": "284143d1c9bed3becfbe1ecee2e690cd11dc0ee495c8beeb9d7dca70cd63622e"
"size": 1154015,
"sha256": "03bcbdf8385808576afb0899860e5f11af37a9aee709b72481064e7a0ee79afa"
},
"members": [
{
@@ -92,8 +92,8 @@
{
"name": "RetroBIOS/install.py",
"repo_path": "install.py",
"size": 1099572,
"sha256": "4d5fbd4fcf4fc42e4ae02ebfa568fd906ef673d003eefcae22e38e520d70c243",
"size": 1100388,
"sha256": "78ef177611168c1c7699cafa8982f901aaaf5342b6c55d6e158ba18fb4cc0ae2",
"executable": false
},
{
@@ -166,8 +166,8 @@
{
"dest": ".config/modules/retrobios/install.py",
"repo_path": "install.py",
"size": 1099572,
"sha256": "4d5fbd4fcf4fc42e4ae02ebfa568fd906ef673d003eefcae22e38e520d70c243",
"size": 1100388,
"sha256": "78ef177611168c1c7699cafa8982f901aaaf5342b6c55d6e158ba18fb4cc0ae2",
"executable": false
},
{
+4
View File
@@ -2284,6 +2284,10 @@ class CardsSpaceAndConfirm(unittest.TestCase):
"bios"),
"ROCKNIX": ({".config/system/configs/system.cfg": "root.password=rocknix\n"},
"rocknix", "roms/bios"),
# Lakka's STORAGE partition, once RetroArch has written its config.
"Lakka": ({".config/retroarch/retroarch.cfg":
'menu_driver = "xmb"\nsystem_directory = "/tmp/system"\n'},
"lakka", "system"),
}
def card(self, files: dict) -> Path:
+2 -1
View File
@@ -1101,6 +1101,7 @@ gives for the device, below the card's root instead of its mount point:
| `system/configs/emulationstation/about.info` holding the line `KNULLI` | KNULLI | `bios`, KNULLI's list |
| `system/batocera.conf` holding the line `system.hostname=KNULLI` | KNULLI | `bios`, KNULLI's list |
| `.config/system/configs/system.cfg` holding the line `root.password=rocknix` | ROCKNIX | `roms/bios`, ROCKNIX's list |
| `.config/retroarch/retroarch.cfg` holding the line `system_directory = "/tmp/system"` | Lakka | `system`, Lakka's list |
| `MiSTer`, `menu.rbf` | MiSTer FPGA | `games`, MiSTer FPGA's list |
| `MUOS/` | muOS | `MUOS/bios`, RetroArch's list |
| `spruce/` | spruceOS | `BIOS`, RetroArch's list |
@@ -1225,7 +1226,7 @@ beside its executable wherever the archive was extracted, so a forced
`--platform bizhawk` that finds no install stops and asks for `--dest`.
The systems that run from an SD card keep their files there: MinUI, NextUI,
MyMinUI, KNULLI, ROCKNIX, MiSTer FPGA, AmberELEC and EmuELEC (the card's games part, which
MyMinUI, KNULLI, ROCKNIX, Lakka (its STORAGE partition, which a Linux computer reads, once Lakka has started once), MiSTer FPGA, AmberELEC and EmuELEC (the card's games part, which
they mount as `/storage/roms`), and each system of the
[Linux handhelds](../platforms/linux-handhelds.md) that gets RetroArch's list
(Onion, muOS, spruceOS, ArkOS, UnofficialOS and the others). Run on the