Skip to content

nuubOS support: mod_nuubOS.txt, and the SoC on mainline arm64 kernels - #366

Open
baf93 wants to merge 2 commits into
PortsMaster:mainfrom
baf93:nuubos-support
Open

baf93 wants to merge 2 commits into
PortsMaster:mainfrom
baf93:nuubos-support

Conversation

@baf93

@baf93 baf93 commented Oct 27, 2026

Copy link
Copy Markdown

Hi! I'm the developer of nuubOS, an OS for Allwinner H700 handhelds (Anbernic RG40XX/RG35XX/RG34XX/CubeXX family). nuubOS installs PortMaster stable and runs ports from it; this adds what it needs upstream.

mod_nuubOS.txt

  • nuubOS runs every PortMaster session in a sandbox that sees only /roms/ports, under a Wayland compositor (labwc), so SDL_VIDEODRIVER=wayland.
  • The only controllers ports see are nuubOS's virtual gamepad (every physical pad reaches them through it), so get_controls writes its one mapping, by the Anbernic labels (A east, B south).
  • device_info.txt already detects nuubOS (os-release NAME="nuubOS") and the device (device-tree model), so no other changes are needed there.
  • Until now nuubOS put this file into the installed PortMaster itself. Once a release ships it, nuubOS leaves the shipped one alone.

device_info.txt: the SoC on mainline arm64 kernels
On mainline kernels the SMCCC soc_id driver fills /sys/devices/soc0/machine with the board's device-tree model, not the SoC. On nuubOS (kernel 7.3) this gave DEVICE_CPU="Anbernic RG CubeXX" instead of h700, so the h700 exception for ultra never matched. ROCKNIX and other mainline-based CFWs should see the same.

machine is now used only when it differs from the model; otherwise the SoC comes from the compatible string, as before. DEVICE_INFO_VERSION is bumped to 0.2.7 so cached env files are refreshed. There is a test for both cases.

Testing

  • On an RG CubeXX with nuubOS, inside its ports sandbox, device_info.txt from main: CFW_NAME nuubOS, DEVICE_NAME Anbernic RG CubeXX, and with this change DEVICE_CPU h700.
  • Ports played on nuubOS with this mod file: Godot 3, Mono/Godot, Pyxel, OHRRPGCE and libretro ports.
  • pytest: the new test fails without the change and passes with it. The tests that fail on my machine fail the same way on main (environment-related, no network and SDL).

🤖 Generated with Claude Code

baf93 and others added 2 commits October 27, 2026 18:41
- mod_nuubOS.txt for nuubOS (H700 handhelds, https://github.com/baf93/nuubOS).
  nuubOS runs ports in a sandbox that sees only /roms/ports, under a
  Wayland compositor: SDL2 on Wayland, and the controllers ports see are
  nuubOS's virtual gamepad, mapped by the Anbernic labels.
  device_info.txt already finds it (CFW_NAME from os-release, the device
  from the device-tree model).
- device_info.txt: on mainline arm64 kernels the SMCCC soc_id driver puts
  the board's device-tree model in /sys/devices/soc0/machine, so
  DEVICE_CPU was "Anbernic RG CubeXX" instead of h700 (and the h700 cases
  for "ultra" never matched). machine is used only when it isn't the
  model; otherwise the SoC comes from the compatible string.
  DEVICE_INFO_VERSION 0.2.7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
westonwrap.sh (weston_pkg) sources the mod file too. nuubOS has its own
Wayland compositor on Panfrost, like ROCKNIX on Panfrost, so westonwrap
can run the program on it directly instead of starting Weston: only when
westonwrap sources the file, it sees CFW_NAME=ROCKNIX and a glxinfo that
reports OpenGL. Checked with BomberPibe (Godot 4.3) on an RG CubeXX.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@baf93

baf93 commented Oct 27, 2026

Copy link
Copy Markdown
Author

Added one more commit: westonwrap.sh (weston_pkg) also sources mod_nuubOS.txt. On nuubOS it now takes westonwrap's existing direct path for Panfrost Wayland compositors (the one ROCKNIX on Panfrost uses), instead of trying to start Weston, which needs DRM, a seat and a VT there. This applies only when westonwrap sources the file: ports themselves still see CFW_NAME=nuubOS. Checked with BomberPibe (Godot 4.3) on an RG CubeXX: fullscreen, controls and sound work, and quitting ends every process. If you'd rather have westonwrap recognise nuubOS itself, tell me and I'll move this there.

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