Fix ARMHF launch on SpruceOS for Miyoo Flip
CODBOZ ships ARMHF binaries, but SpruceOS on the Miyoo Flip is aarch64 and does not expose the interpreter path requested by those binaries. First-run setup therefore failed when it tried to start the APK extractor.
This uses the ARMHF compatibility runtime already mounted by SpruceOS for both the extractor and the game loader. Spruce's kmsdrm display is routed through the existing SDL window path. Systems with the standard ARMHF interpreter keep their normal launch path.
Testing
make shellcheckmake test-hostmake test-host-sanitizescripts/build-docker.shunzip -t build/codboz.zip- completed a fresh setup on a Miyoo Flip running SpruceOS
- verified the main menu rendered and exiting returned to the Ports frontend
- verified a normal frontend launch and clean exit on [MuOS or KNULLI]
Summary by cubic
Fixes ARMHF binary launch on SpruceOS for the Miyoo Flip. First-run setup previously failed on the aarch64 system because the ARMHF interpreter path wasn't exposed; now the extractor and game loader run through the ARMHF compatibility runtime SpruceOS already mounts, while systems with a native interpreter keep their normal launch path. Setup failure now logs the error and calls pm_finish instead of showing an error dialog.
What changed
- Adds
codboz_runtime.sh, which execs directly when a native interpreter exists, otherwise runs the target through the Spruce ARMHF runtime. - Routes the APK extractor and game launcher through the runtime helper, setting
SDL_VIDEODRIVER=kmsdrmonly on the Spruce path. - Packages
codboz_runtime.shin deploy and checks for it at launch. - Treats
SDL_VIDEODRIVER=kmsdrmas a signal to use the SDL window surface in the EGL display fallback. - Expands launcher tests to cover runtime loading, fallback behavior, setup failure cleanup, and patching.
Summary by CodeRabbit
-
New Features
- Added automatic ARMHF runtime support for launching the game across compatible environments.
- Improved setup and deployment to include and validate required runtime components.
-
Bug Fixes
- Improved setup failure handling with clearer error reporting and proper cleanup.
- Improved display detection when SDL’s KMSDRM driver is selected, supporting more graphics configurations.
-
Tests
- Added coverage for runtime loading, fallback behavior, setup failures, deployment, and patching workflows.