Add MiniLoong CFW support (device_info probe + mod_Loong.txt)#324
Open
jenny92-tech wants to merge 2 commits into
Open
Add MiniLoong CFW support (device_info probe + mod_Loong.txt)#324jenny92-tech wants to merge 2 commits into
jenny92-tech wants to merge 2 commits into
Conversation
MiniLoong is a Loongson-based handheld CFW that identifies itself with a JSON-style file at /loong/loong_version. Without an explicit probe, the detection chain falls through to the generic os-release branch and returns "Unknown" for both name and version, which in turn prevents launchers from sourcing mod_Loong.txt (loaded by the convention [ -f "$controlfolder/mod_$CFW_NAME.txt" ] && source ...). This restores parity with earlier releases that shipped the check.
63a4252 to
f75814c
Compare
Companion to the MiniLoong probe in device_info.txt. Follows the existing mod_<CFW>.txt pattern (CUR_TTY, Godot opts, pm_platform_helper stub). MiniLoong-specific bit: override $directory to "mnt/sdcard/roms" because the SD card lives at /mnt/sdcard/, not at /roms/. Other CFWs with non-standard mounts (e.g. TrimUI at /mnt/SDCARD) rely on a system-level /roms symlink, but MiniLoong's firmware does not provide one; until/unless that changes upstream in the MiniLoong image, ports need this override to resolve $GAMEDIR.
f75814c to
cd92efd
Compare
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.
Summary
Adds support for MiniLoong, a Loongson-based handheld CFW, by following the same two-file pattern used by every existing CFW in the repo (Batocera, knulli, muOS, TrimUI, ROCKNIX, etc.):
PortMaster/device_info.txt— probe/loong/loong_version(a JSON-style version file shipped by the MiniLoong firmware) and set$CFW_NAME=Loong/$CFW_VERSION.PortMaster/mod_Loong.txt— CFW-specific tweaks loaded via the existing[ -f "$controlfolder/mod_$CFW_NAME.txt" ] && source ...convention. Structurally identical tomod_TrimUI.txt/mod_muOS.txt(sameCUR_TTY, Godot opts,pm_platform_helperstub) plus one MiniLoong-specific override.The MiniLoong-specific override
MiniLoong mounts the SD card at
/mnt/sdcard/rather than/roms/. Other CFWs with non-standard mounts (e.g. TrimUI at/mnt/SDCARD) rely on a system-level/roms→<real mount>symlink. MiniLoong's firmware does not currently provide one, so ports need this$directoryoverride to resolve$GAMEDIRcorrectly.Scope is contained: the override only runs when
$CFW_NAME == "Loong", which only triggers when/loong/loong_versionexists (a MiniLoong-exclusive path). No other CFW is affected.Why not patch control.txt to be mount-agnostic instead
Considered and dropped. Generalizing the
$directoryderivation incontrol.txtis the more principled fix, but it touches core code used by every CFW and I cannot verify behavior on ArkOS/JELOS/ROCKNIX/muOS/TrimUI etc. without access to those devices. Until that broader testing can be done, the conservative path is to keep the change CFW-local.Test plan
bash -n PortMaster/device_info.txt PortMaster/mod_Loong.txtCFW_NAME=Loong,CFW_VERSIONpopulated fromverShow,mod_Loong.txtsourced by the existing convention, ports launch with$GAMEDIR=/mnt/sdcard/roms/ports/<port>.control.txtor any non-Loong CFW file, so no risk of regression elsewhere.Commits
device_info: detect MiniLoong CFW via /loong/loong_versionmod_Loong: add MiniLoong CFW-specific overrides