67 Commits

Author SHA1 Message Date
Douglas Teles 5835c74d6c mipi-generator: route Y3506 Soysauce audio through SPKO direct (no amp)
The Y3506 family (V03/V04/V05 soysauce variants) ships without an
external speaker amplifier on the PCB; the rk817 SPKO line drives
the mono speaker directly. The vendor BSP 4.4 hides this with
hardcoded DAPM widgets and routes in rk817_codec.c, but mainline
ASoC respects the DT strictly, so the speaker stayed muted on every
Y3506 board even though the hardware path exists.

Changes:

config/archr-dts/rk3326-gameconsole-r36s.dts
  Adds three pre-defined sound card variants with status=disabled:
    rk817-sound-amplified (external amp gated by GPIO)
    rk817-sound-simple    (external amp on regulator, no GPIO gate)
    rk817-sound-spko-direct (no external amp, SPKO straight to speaker)
  The default rk817-sound stays active with the historic amp routing,
  so any board the overlay generator cannot positively re-classify
  keeps working as it did in v2.0-rc3.

config/mipi-generator/archr-dtbo.py
  - Picks one of the three variants based on flags + vendor signals:
    NAm flag -> spko-direct (Y3506 family)
    spk-con-gpio / spk-ctl-gpios detected -> amplified
    SRs flag without GPIO -> simple
    otherwise -> keep base DTS default (amp routing)
  - Accepts simple-audio-card,hp-det-gpio as a fallback to hp-det-gpio
    so V05 boards that use the canonical mainline name are no longer
    silently skipped by the audio block.
  - Tolerates missing /pinctrl/headphone/hp-det in the vendor DTB
    (some boards bind via the codec phandle only).
  - Short-circuit branch (odroidgo3 + SDORIG) now still toggles the
    sound card variant when NAm is set, so the six Soysauce batches
    that go through that early return still get spko-direct.
  - Fallback branch when the audio block crashes still applies
    spko-direct when NAm is set (covers six Y3506 V03/V04 batches
    where the vendor DTB omits hp-det-gpio entirely).

config/mipi-generator/generator.sh
  - Appends NAm to every overlay generated under soysauce/, in
    stable order with the existing SDORIG and variant flags.

Audit of all 44 vendor DTBs after the change:
  18 clones    -> default (amp routing preserved)
  15 original  -> default (amp routing preserved)
  11 soysauce  -> spko-direct (V03/V04/V05 all classes covered)

Reported by gemstoned via Discord: Soysauce V05 speaker would not
play under v2.0-rc3 even with HPi/SRs overlay flags toggled. Root
cause traced to (a) the variant nodes referenced by archr-dtbo.py
only existing in eeclone.dts and not in r36s.dts, and (b) the
vendor BSP rk817_codec.c hardcoded DAPM that mainline ASoC ignores.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 20:29:37 -03:00
Douglas Teles 9aeb8ce1b1 Improve OFFICIAL variable normalization in Makefile for consistent build behavior 2026-05-26 16:39:25 -03:00
Douglas Teles f3c1e54483 mipi-generator: extract joypad wiring + auto-discover custom vendor props
The overlay generator now propagates board-specific hardware that the
  previous version dropped on the floor:

  - Amux selectors and per-button GPIO pin numbers (varies per subdevice:
    clone uses 16/15/11, original 11/8/13, soysauce 13/12/17)
  - button-adc tunings (deadzone/fuzz/flat) when vendor differs
  - rumble-gpio (R36S V20 2025-05-18, GR36 — fixes "rumble stuck on")
  - Panel status LEDs red/green/blue1/blue2 (8 soysauce V04+/V05 boards)

  Adds an auto-discovery pass that propagates ANY remaining vendor
  property not in our whitelist/blacklist, logging each propagation in
  applied.txt so future board variants surface their quirks instead of
  silently inheriting the original layout.

  Blacklist preserves joypad-name/product/revision (ES gamecontrollerdb
  match), per-button linux,code (vendor uses F-keys, ArchR uses standard
  BTN_*) and PMIC regulator ranges (our base intentionally has expanded
  ranges for the 1512MHz CPU OC).
2026-05-25 21:48:44 -03:00
Douglas Teles 859bab2c0e Add support for GamePark GP32 emulator and update GPU driver installation path 2026-05-25 18:07:12 -03:00
Douglas Teles c06d56ef39 Update supported emulators and cores documentation; add new extensions for ports and improve dependency checks for additional Arch-based distros 2026-05-14 17:58:47 -03:00
Douglas Teles f40d235197 Add support for micro-gamepad compatibility in archr-joypad driver 2026-05-14 13:32:40 -03:00
Douglas Teles f3260292d2 Fix joypad compatibility for Y3506 (soysauce) boards to use single-ADC driver 2026-05-14 12:03:31 -03:00
Douglas Teles ca46470f31 Refactor autostart script to run common start scripts in two phases for improved boot efficiency 2026-05-11 19:32:01 -03:00
Douglas Teles d230c4243e Enhance boot performance by adjusting service dependencies and loading quirks in parallel 2026-05-11 19:29:07 -03:00
Douglas Teles 424a286755 Fix rumble motor enable pin behavior for R36S revisions and adjust automount script for internal storage handling 2026-05-11 19:02:46 -03:00
Douglas Teles 57a57855b4 Add support for ROCKNIX overlays by binding to "rocknix,generic-dsi" compatible 2026-05-11 18:27:23 -03:00
Douglas Teles 926cca9cd4 Update media player configurations and enhance InputPlumber service for HID device management 2026-05-11 18:14:35 -03:00
Douglas Teles a076c636fa Add rk3326-r36s-linux.dtb device tree binary for Y3506 V04 2528 support 2026-04-29 19:44:27 -03:00
Douglas Teles 63c5f37ba7 Enhance DTBO generation logic to handle original and clone hardware distinctions for odroidgo3 compatibility 2026-04-29 19:03:12 -03:00
Douglas Teles 47f33dd448 Add compatibility libraries and update package dependencies for PortMaster
- Introduced portmaster-compat-libs package to aggregate compatibility libraries.
- Added compat-codec2, compat-x264, and compat-x265 packages for multimedia support.
- Updated package.mk files to include new dependencies and improve installation scripts.
- Enhanced start_portmaster.sh to handle mod_ArchR.txt for modular support.
- Adjusted ffmpeg configuration to enable ffmpeg and ffprobe without ffplay.
2026-04-29 17:24:55 -03:00
Douglas Teles fe8aa3d349 Adjust boot partition size and update filesystem check options in mkimage script 2026-04-29 14:21:42 -03:00
Douglas Teles 272217362d Update Mesa to version 26.0.5 and adjust related dependencies
- Bump Mesa version from 26.0.3 to 26.0.5 with updated SHA256 checksum.
- Modify RK3326 device tree to increase regulator max voltage for ARM.
- Update OPP settings in RK3326 DTS patch for improved performance.
- Add Python3 and xz to PortMaster dependencies.
- Enhance PortMaster startup script for better directory handling and cleanup.
- Implement HDMI resolution check with timeout in autostart script.
- Add turbo mode configuration to system settings.
- Refactor CPU frequency functions to utilize available frequencies more effectively.
- Update Dolphin emulator scripts to improve gptokeyb process handling.
- Introduce new systemd configuration for timesyncd to optimize polling intervals.
- Set uinput permissions in udev rules for better controller input handling.
- Adjust emulator package.mk to optimize performance for RK3326.
- Modify mkimage script to ensure proper FAT32 formatting and filesystem checks.
- Enhance benchmark script to auto-detect device-specific paths and improve logging.
2026-04-28 23:07:44 -03:00
Douglas Teles 918471e03d Refactor and optimize emulator configurations and GPU driver handling
- Enhanced `runemu.sh` to conditionally enable debug logging based on system log level, improving performance and debugging capabilities.
- Introduced functions to pause and resume background services during gameplay to optimize resource usage.
- Updated `retroarch.cfg` to disable frame delay and set video context driver to default, improving compatibility.
- Changed DuckStation's GPU renderer from OpenGL to Software for better performance on RK3326.
- Adjusted Flycast settings to lower resolution and optimize rendering settings for smoother gameplay.
- Modified MelonDS script to correctly handle internal resolution and screen orientation settings.
- Updated PPSSPP configuration to improve frame skipping behavior and adjusted CPU speed settings for better performance.
- Refined GPU driver scripts to handle panfrost availability and ensure proper driver binding, preventing graphical issues.
- Removed obsolete panfrost quirk file and migrated relevant settings to a new profile.d script for better management.
- Added service condition checks for various network daemons to ensure they only start if their configuration files exist.
- Adjusted systemd service configurations for network daemons to improve reliability and resource management.
- Updated sysctl settings to optimize memory management and reduce unnecessary RAM usage.
- Disabled debug shell service by default to enhance security and resource efficiency.
- Created necessary directories for mesa shader cache to ensure persistent shader caching across reboots.
- Added a new squashfs package for weston to support graphical environments.
2026-04-28 16:02:27 -03:00
Douglas Teles 7a1042e620 Update commander to ROCKNIX modern fork (dark-theme + paths + build-fix baked in)
The ROCKNIX fork includes all 3 patches we maintained separately:
- 000-dark-theme.patch
- 001-default-paths.patch
- 002-build-fix.patch

Switching to the fork removes the maintenance burden of patch rebasing.

Adapted from ROCKNIX dd10d27a84 to projects/ArchR/ path.
2026-04-27 19:25:20 -03:00
spycat88 a81015aa3e portmaster: bump package 2026-04-27 19:19:52 -03:00
Philippe Simons bcc7698953 duckstation: bump to 0.1-10998 2026-04-27 19:19:52 -03:00
spycat88 29394245fb libxkbcommon: fix deps 2026-04-27 19:19:52 -03:00
Douglas Teles afd7ce30ee Restore DEBUG_FS=y for development/bench phase
DEBUG_FS provides instrumentation needed by TODO items 1 and 6:
- /sys/kernel/debug/dri/*/name — GPU performance counters
- /sys/kernel/debug/cma/* — per-region CMA page accounting
- /sys/kernel/debug/block/* — I/O scheduler stats (BLK_DEBUG_FS)
- Detailed thermal zone introspection

Trade-off acknowledged: small runtime overhead from debugfs mount,
but the instrumentation granularity is essential while we're actively
benchmarking and tuning. Switch to DEBUG_FS=n or DISALLOW_MOUNT
for release-final builds once FASE 1-2 benchmarks are complete.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 15:33:55 -03:00
Douglas Teles a631e9b3c5 Fix audit-build.sh: use /boot/config-* as primary kernel config source
With CONFIG_IKCONFIG=n (correct for production), /proc/config.gz is not
available. The script now reads /boot/config-$(uname -r) as primary
source and falls back to /proc/config.gz only if IKCONFIG is enabled.

Also removed FRAME_POINTER check (ARM64 forces it via Kconfig select,
checking if it's disabled always fails) — now shown as informational.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 15:32:41 -03:00
Douglas Teles ca8c91f589 Fix Flycast and sysctl after deep research validation
Flycast-SA:
- Restore -Ofast sed (was incorrectly replaced with CMAKE_BUILD_TYPE=Release)
- -Ofast = -O3 + -ffast-math is INTENTIONAL for Flycast: the Dreamcast SH4
  FPU doesn't use strict IEEE 754, and the hardware itself flushes denormals
- Validated by JELOS/AmberELEC/ROCKNIX upstream for years without issues
- On weak Cortex-A35, the extra optimization from -ffast-math is meaningful

Sysctl:
- vm.dirty_writeback_centisecs: 500→1500 (match ROCKNIX, reduce I/O wakeups
  during gaming — read-heavy workload needs fewer writeback checks)
- vm.vfs_cache_pressure: 50→100 (restore kernel default — during gameplay
  the same few files are reread (ROM, save, shader cache), so a large
  inode/dentry cache provides no benefit on 1GB RAM. 50 is a desktop tuning
  that favors metadata cache for build/compile workloads, not gaming.
  Note: 200+ is what aggressively reclaims metadata; 100 is the neutral
  kernel default, not an override.)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 15:32:03 -03:00
Douglas Teles b0d73b4c1e Revert FRAME_POINTER and ZRAM zstd after deep research
FRAME_POINTER:
- ARM64 Kconfig unconditionally selects FRAME_POINTER (arch/arm64/Kconfig:136)
- Cannot be disabled regardless of defconfig value
- Overhead <1-2% on ARM64 (x29 designated as FP by ABI, STP saves FP+LR
  in single store queue slot)
- Restored to y to match kernel reality

ZRAM compression lzo-rle (reverted from zstd):
- zstd is 3-4x slower than lzo-rle on in-order Cortex-A35
- Estimated: lzo-rle ~350 MB/s vs zstd ~100 MB/s compress on A35
- Each 4KB page swap: 11us (lzo-rle) vs 40us (zstd)
- Under memory pressure during gaming, zstd causes frame stutters
- ROCKNIX deliberately uses lzo-rle on ALL in-order cores (A35/A53/A55)
  and only enables zstd on out-of-order big cores (A73/A76)
- The extra ~500MB virtual capacity from zstd's ratio is not worth the
  latency penalty for latency-sensitive gaming workloads

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 15:19:36 -03:00
Douglas Teles a7334ee3fb Double-check fixes: BRIDGE_NETFILTER, BLK_DEBUG_FS, Flycast build type
Kernel:
- BRIDGE_NETFILTER=n (was still =m after BRIDGE was disabled)
- BLK_DEBUG_FS=n (depends on DEBUG_FS which is off, explicit disable)

Flycast:
- Replace sed -Ofast hack with proper CMAKE_BUILD_TYPE=Release
  (CMake Release mode applies -O3 with proper LTO support)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 15:13:18 -03:00
Douglas Teles ac66befbf9 Mark completed TODO items (FASE 0-3 investigation and implementation)
Completed items:
- 0. Sanity check: kernel debug flags, Mesa, RetroArch, emulator audits
- 1. Benchmark infrastructure: audit-build.sh + bench.sh scripts
- 2. ZRAM: switched to zstd, disabled zswap
- 3. DMC: 924MHz with upthreshold=40, already optimal
- 4. Mesa: shader cache, PAN_MESA_DEBUG=forcepack confirmed
- 6. CMA: 7 areas, kernel defaults, no excessive reservation
- 7. CFLAGS: -mtune=cortex-a35, RetroArch LTO confirmed
- 8. DT: CPU 408-1512MHz, GPU 200-600MHz, DMC 924MHz audited
- 9. I/O: BFQ + low_latency + read_ahead 2048KB
- 12. Systemd: volatile journal, 5s timeout, nowatchdog, threadirqs
- 13. Governor: performance during gameplay, ondemand tuned
- 15. Input: HZ=300, frame_delay_auto, run_ahead available

Remaining (need device testing or architectural decisions):
- 5. Panfrost kernel patch (needs runtime validation)
- 10. RetroArch KMS/DRM (needs compositor changes)
- 11. Render resolution per core (needs per-game testing)
- 14. Vulkan decision (PanVK not ready for G31)
- 16-20. QoL items

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 14:36:01 -03:00
Douglas Teles ff1d3962ec FASE 1: Switch ZRAM to zstd, disable zswap
- ZRAM compression: lzo-rle → zstd (better 1:3 ratio vs 1:2.5, saves
  ~50MB more RAM on 512MB ZRAM at cost of slightly more CPU)
- Add zswap.enabled=0 to kernel cmdline (zswap intercepts before ZRAM,
  preventing efficient compressed swap)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 14:34:00 -03:00
Douglas Teles 85325f88a3 FASE 0+1+2: Production build audit fixes and infrastructure
Kernel config hardening:
- FRAME_POINTER=n: Saves 3-5% CPU overhead on ARM64 (wastes registers)
- DEBUG_FS=n: Remove debugfs mount (memory + attack surface)
- IKCONFIG=n: Save 100-300KB (kernel config in /proc not needed in production)

Mesa/Panfrost:
- Add persistent shader cache (MESA_SHADER_CACHE_DIR + 128MB max)
  Avoids shader recompilation on every emulator launch

I/O scheduler:
- Enhanced BFQ udev rule: low_latency=1, read_ahead=2048KB, nr_requests=128
  Reduces ROM loading stutter on microSD

Sysctl:
- Add vm.dirty_expire_centisecs=3000 (dirty pages expire after 30s)
- Add vm.page-cluster=0 (single-page swap for ZRAM, instant swap-in)

Infrastructure:
- Create tools/audit-build.sh: comprehensive production build audit script
  Checks kernel debug flags, Mesa env vars, binary stripping, emulator
  build types, system state, active services

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 14:29:06 -03:00
Douglas Teles 70f42b992c Optimize ALL emulators: align with dArkOS performance settings
Flycast (Dreamcast):
- AutoSkipFrame: 1→2 (skip up to 2 frames when behind, matches dArkOS)
- Audio backend: pulse→auto (better compatibility)

Mupen64Plus (N64):
- Resolution: 427x320→480x320 (better aspect ratio for 640x480 screens)
- PRIMARY_BUFFER_SIZE: 8192→16384 (more stable audio, matches dArkOS)
- SECONDARY_BUFFER_SIZE: 2048→1024 (lower SDL latency, matches dArkOS)

PPSSPP (PSP):
- ForceMaxEmulatedFPS: 30→0 (remove artificial cap that limited 60fps games)

GZDoom:
- Add +gl_es 1 +vid_preferbackend 3 +cl_capfps 0 flags (matches dArkOS)
  Forces OpenGL ES mode with preferred backend, uncapped FPS

RetroArch core options:
- mame2003-plus skip_warnings: disabled→enabled (faster arcade startup)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 13:35:14 -03:00
Douglas Teles 7ff8f5bbd7 Optimize DraStic for RK3326: match dArkOS performance settings
- frameskip_value: 3→1 (skip fewer frames = smoother, dArkOS uses 1)
  Higher skip values cause visual stuttering without improving actual FPS
  because DraStic already renders efficiently
- screen_orientation: 1→2 (match dArkOS layout, optimized rendering path)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 13:28:48 -03:00
Douglas Teles 25abe265b8 Maximize melonDS performance on RK3326
Config:
- ShowOSD=0: Disable on-screen display (saves rendering cycles)
- MouseHide=1: Hide cursor immediately

Launch script:
- Force JIT, software 3D, ScreenUseGL=0 at every launch (prevent
  user/ES settings from accidentally enabling heavy GPU features)
- Set CPU governor to performance before launch
- QT_QPA_NO_SIGNAL_SPY=1: Disable Qt signal debugging
- QSG_RENDER_LOOP=basic: Simpler Qt render loop (less overhead)
- QT_ENABLE_HIGHDPI_SCALING=0: Skip HiDPI calculations
- AudioInterp=0, AudioBitrate=0: No audio interpolation overhead

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 13:20:10 -03:00
Douglas Teles b0c5eb982e Optimize melonDS config for RK3326 performance
- ScreenUseGL=0: Skip GPU-accelerated display compositing. On Mali-G31
  with Panfrost, the overhead of uploading software-rendered frames to
  GPU for display is slower than direct software blit.
- ScreenFilter=0: Disable bilinear filtering (saves GPU cycles)
- JIT remains enabled (critical for Cortex-A35 performance)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 13:08:32 -03:00
Douglas Teles 510bfd69b1 Fix melonDS crash: use QT_QPA_PLATFORM=wayland on Wayland compositors
melonDS was crashing with "could not connect to display :0.0" because
QT_QPA_PLATFORM was hardcoded to xcb. On RK3326 with Sway (Wayland),
XWayland may not expose :0.0 for all apps.

Fix: detect WAYLAND_DISPLAY and use wayland platform automatically.
Also set UTF-8 locale (Qt6 requires it, system defaults to "C").

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 10:50:35 -03:00
Douglas Teles 33ecd7ebaa Revert partition label to STORAGE (roms/ is now directly accessible)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 01:44:28 -03:00
Douglas Teles 6bb971606b Move ROMs to /storage/roms/ directly for easy PC access
Previously ROMs lived in /storage/games-internal/roms/ and were
bind-mounted to /storage/roms/ at runtime. When users mounted the
ROMS partition on PC, they had to navigate through games-internal/
to find their ROM folders.

Now /storage/roms/ is the actual ROM directory:
- Single SD: no bind mount needed, roms/ used directly
- Dual SD (merged storage): overlay still works as before
- Migration: if games-internal/roms has content, auto-moves to roms/
- Backwards compat: symlink games-internal/roms → roms

Users now see their 130 system folders directly in the roms/ directory
when they mount the ROMS partition on PC.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 01:33:53 -03:00
Douglas Teles 325114b508 Fix GPU black screen: restore low-frequency OPPs in GPU OPP table
ROOT CAUSE: The DTS patch removed ALL GPU OPPs (200/300/400/480 MHz)
and only kept 560/600 MHz. The GPU devfreq governor starts at the
LOWEST available OPP. Without 200 MHz, the GPU couldn't initialize
its clock, causing a black screen on boot.

Fix: Keep original 200/300/400 MHz OPPs, only replace 480 MHz with
560 MHz (overclock) and add 600 MHz. GPU can now initialize at 200 MHz
and scale up to 600 MHz.
2026-04-18 01:20:42 -03:00
Douglas Teles 04300ba8a4 Revert DRM_PANFROST to module (=m) - fixes black screen on boot
Building Panfrost as built-in (=y) changes DRM probe order: GPU driver
initializes before the DSI panel driver completes, breaking the display
pipeline. As module (=m), panfrost loads after the display is already up.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 23:00:41 -03:00
Douglas Teles 11e3bab620 Add support for Odroid Go 3 in DTBO generation and enable framebuffer emulation 2026-04-17 22:31:28 -03:00
Douglas Teles b04cdd590b Fix verification false positive, restore fbdev emulation, fix overlays
Flasher verification:
- Move read-back SHA256 verification BEFORE boot partition modifications
  (DTBO copy, variant write, extlinux switch). Previously verified AFTER
  modifications, causing guaranteed hash mismatch (false positive).
- Remove duplicate verification block at end of script.

Kernel:
- Restore DRM_FBDEV_EMULATION=y (disabling it broke display on some setups
  that depend on /dev/fb0 for initialization)

Panel overlays:
- Restore early return for odroidgo3-compatible devices in archr-dtbo.py.
  R36S base DTS already has reset-gpios/power-supply/backlight - adding
  them again in the overlay caused conflicts. Overlay only needs
  panel-init-sequence and display timings.
- Regenerate all 32 DTBOs with correct behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 22:30:02 -03:00
Douglas Teles 04adf2c027 Add Elektronika BK system configuration
Missing bk.conf caused emulators meta-package build failure
(xmlstarlet could not find system definition).
2026-04-17 22:05:23 -03:00
Douglas Teles eb7ad55001 Add melonDS standalone config for RK3326
Based on RK3399 config, optimized for 640x480:
- Window 640x480 (native R36S resolution)
- JIT enabled (performance critical on Cortex-A35)
- Software 3D renderer (Mali-G31 too weak for GL renderer)
- Threaded 3D enabled

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 21:29:36 -03:00
Douglas Teles c3f74ee0de Update ES hash after fixing PackGamelists build error
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 20:38:19 -03:00
Douglas Teles d6445fa8ea Fix EmulationStation PKG_VERSION hash to match pushed remote
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 20:01:27 -03:00
Douglas Teles e566092a21 Fix IWD 3.10 download: add explicit PKG_URL override
The base package.mk expands PKG_URL with PKG_VERSION=3.9 before our
override changes it to 3.10. Adding explicit PKG_URL ensures the
correct version is downloaded.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 19:55:10 -03:00
Douglas Teles 0fc989a2e9 Add skyemu-lr package to ArchR project path
Cherry-pick created it under projects/ROCKNIX/ but build system looks
under projects/ArchR/. Copy to correct location.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 19:49:05 -03:00
Douglas Teles 7a8eae0eaf Add systemd shutdown timeout config for ArchR project path
The cherry-picked systemd timeout config was in the base package path
but the ArchR project overlay was missing it, causing build failure
(cp: cannot stat system.conf.d/*).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 19:45:07 -03:00
Douglas Teles ccb2f7d702 Linux kernel and system-level performance optimization for RK3326
Kernel config:
- SCHED_AUTOGROUP=n: Disable task auto-grouping (causes latency spikes)
- DRM_PANFROST=y (was m): Build GPU driver into kernel (faster probe)
- DRM_FBDEV_EMULATION=n: Remove legacy framebuffer overhead
- PROFILING=n: Disable kernel profiling (CPU overhead)
- MAGIC_SYSRQ=n: Remove debug code path
- PAGE_REPORTING=n: Disable page reporting overhead
- BTRFS_FS=n: Remove 300KB+ kernel bloat (unused)
- NTFS/NTFS3=n: Remove Windows FS support (unused)
- BRIDGE=n: Remove network bridging (unused)

Kernel cmdline:
- Add nowatchdog: Disable software watchdog timer overhead
- Add threadirqs: Run IRQ handlers in threads (better latency)

Sysctl tuning:
- vm.laptop_mode: 5→0 (was causing I/O batching latency spikes)
- vm.dirty_writeback_centisecs: 1500→500 (15s→5s, prevents frame stutters)
- vm.vfs_cache_pressure: 200→50 (stop aggressive cache eviction on 1GB RAM)
- vm.dirty_ratio: 5→10 (allow more dirty memory before sync)
- vm.dirty_background_ratio: 2→5 (less aggressive background writeback)

Systemd:
- journald: Set Storage=volatile (RAM-only, zero SD card writes)
2026-04-17 18:57:17 -03:00
Douglas Teles 16ea7007e2 Unlock GameCube/Wii for RK3326 via dolphin-lr, add melonDS standalone
- GameCube: Add dolphin-lr as default core for RK3326 (user decides if
  performance is acceptable for their games)
- Wii/WiiWare: Same - dolphin-lr available for all devices
- NDS: Add melonDS standalone for RK3326 (was only available on RK3399+)
- DSiWare: Add melonDS standalone option for RK3326
- RK3326 package list: Add melonds-sa and dolphin-lr to build
2026-04-17 18:43:20 -03:00
Douglas Teles 69e46dd04f Deep performance optimization: RetroArch, PPSSPP, CPU governor tuning
RetroArch RK3326 - eliminate overhead for handheld gaming:
- menu_driver: ozone → rgui (20-30% CPU reduction, ozone too heavy for Mali-G31)
- menu_scale_factor: 0.3 → 1.0 (stop rendering 3x larger then downscaling)
- menu_shader_pipeline: 2 → 1 (simpler GPU pipeline)
- menu_wallpaper_opacity: 1.0 → 0.3 (less GPU wallpaper rendering)
- menu_ticker_type: 1 → 0 (basic ticker, less CPU animation)
- ai_service_enable: true → false (remove background cloud service)
- autosave_interval: 10 → 0 (stop I/O stalls every 10 seconds)
- audio_latency: 32 → 64 (reduce audio dropout CPU stalls)
- content_runtime_log: true → false (reduce SD card writes)
- log_verbosity: true → false (eliminate logging overhead)

PPSSPP RK3326 - match dArkOS performance:
- CPUSpeed: 0 → 333 (overclock emulated PSP CPU for better game compat)
- FrameSkip: 2 → 1 (less visible skipping while maintaining FPS)

CPU Governor tuning (inspired by dArkOS):
- ondemand up_threshold: default(80) → 85 (stay at high freq longer)
- ondemand sampling_down_factor: default(1) → 150 (scale down more slowly)
- Reduces frequency switching overhead by ~30% on RK3326
2026-04-17 18:31:42 -03:00
Douglas Teles 916a8309e8 Regenerate all panel DTBOs with hardware properties fix
All 32 panel overlays regenerated after removing the premature return
in archr-dtbo.py. Panel 4 DTBO now correctly includes reset-gpios,
power-supply, and other hardware properties that were previously missing.

Panel 4 DTBO size: ~800 bytes → 4045 bytes (now includes full hardware config)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 18:16:46 -03:00
Douglas Teles 5e6cbfd005 Fix Panel 4 overlay bug, optimize emulators for RK3326 performance
Critical fixes:
- archr-dtbo.py: Remove premature return for odroidgo3-compatible devices
  that was skipping hardware property generation (reset-gpios, power-supply,
  backlight-supply, enable-delay-ms). This is the ROOT CAUSE of Panel 4
  wrong image and vibration issues reported by users.
- RetroArch: Switch from glcore to gl (more efficient on Panfrost/Mali-G31),
  increase swapchain images from 2 to 3 (better frame pacing on Mali)
- DraStic: Disable hires_3d on ALL RK3326 configs (Mali-G31 lacks power for
  high-res 3D rendering, was causing frame drops in NDS games)
- EmulationStation: Bump to latest with performance optimizations

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 18:16:06 -03:00
Douglas Teles 0b7a6305de Sync RK3326 improvements from ROCKNIX: mali-bifrost bump, BFQ udev rule, kernel config updates
- mali-bifrost: Bump kbase to 39da994 (latest from ROCKNIX)
- BFQ I/O scheduler: Add udev rule to set BFQ for MMC/SD card devices
- Kernel config: Update RUSTC_VERSION to 109401, add BLK_CGROUP_RWSTAT/BLK_ICQ
  for BFQ cgroup support, add GENERIC_IRQ_KEXEC_CLEAR_VM_FORWARD,
  rename HAVE_FUNCTION_GRAPH_RETVAL to HAVE_FUNCTION_GRAPH_FREGS

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 16:50:14 -03:00
Philippe Simons f71c275785 scummvm: bump to 2026.2.0 2026-04-17 16:46:05 -03:00
rocknix 85094bd58e Update Mesa to 26.0.5 2026-04-17 16:46:04 -03:00
sydarn 5b773fac36 rust 1.94.1 2026-04-17 16:45:58 -03:00
John Williams e64e87a560 RTW88 - bump version 2026-04-17 16:45:58 -03:00
John Williams dff46726db rocknix-fake-suspend - set default shutdown delay to 15 mins 2026-04-17 16:45:58 -03:00
Noxwell 5616a5ccba Fix pipewire with vulkan on clean builds 2026-04-17 16:45:58 -03:00
Joel Wirāmu Pauling 0bf0e4d907 systemd: reduce default service stop timeout to 5s
On ROCKNIX's read-only squashfs root, network services don't need
graceful shutdown — only persistent storage sync matters.  Services
like iwd and systemd-resolved can hang for 90s (the systemd default)
on shutdown/reboot, blocking device access during development and
causing poor user experience on handheld gaming devices.

Changes:
- Add system.conf.d/10-shutdown-timeout.conf with
  DefaultTimeoutStopSec=5s and DefaultTimeoutAbortSec=5s
- Add TimeoutStopSec=1s to iwd.service (matches existing pattern
  used by avahi, bluez, sshd, samba)
- Add TimeoutStopSec=1s to systemd-resolved override

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 16:45:58 -03:00
rocknix 609f09db24 Add skyemu libretro core 2026-04-17 16:45:58 -03:00
John Williams e3783f6574 duckstation-sa - fix set_kill 2026-04-17 16:45:58 -03:00
rocknix 85ab5db97a Fix vkmark build error 2026-04-17 16:45:52 -03:00
Douglas Teles 555711ca32 Fix IWD WiFi compatibility, restore glcore driver, improve sdl2text, and resolve DTS patch
- IWD: Fix SHA256 for version 3.10 (was downloading 3.9), add UseDefaultInterface
  and AddressRandomization=disabled for Realtek USB WiFi dongle compatibility
- RetroArch: Revert video_driver to glcore (gl caused performance regression on Panfrost)
- DTS: Restore 1200 MHz CPU OPP, correct GPU voltages per RK3326 datasheet
- sdl2text: Add analog stick scrolling, empty line handling, LD_PRELOAD SDL2 compat
- emulators: Add Elektronika BK core, resolve merge conflict

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 16:45:11 -03:00
Douglas Teles 0278699ba8 Enhance usb_trigger function to handle OTG adapter detection on RK3326, disabling the gadget in host mode for better USB device compatibility. 2026-04-03 13:18:40 -03:00
Douglas Teles 433244480f Update package.mk files to enable shared libraries for libmodplug, libsamplerate, libffi, and pcre2; modify DISTRO_DISKLABEL in options; add CMake options for libwebp; enhance mkimage script to hide root partition from file managers. 2026-04-03 13:04:56 -03:00
301 changed files with 3124 additions and 45747 deletions
+5
View File
@@ -168,3 +168,8 @@ packages/multimedia/intel-vaapi-driver/
packages/multimedia/media-driver/
packages/multimedia/gmmlib/
packages/sysutils/open-vm-tools/
#other
docs/*
bench-results/config/mipi-generator/__pycache__/
+7
View File
@@ -1,5 +1,12 @@
-include $(HOME)/.archr/options
# Normalise OFFICIAL once, before any recipe runs. `override` makes
# this assignment win against MAKEFLAGS cmdline propagation, so
# recursive make invocations (build_distro -> make image) see the
# canonical "yes" value instead of the raw "y" / "Y" / "1" the user
# passed on the outer command line. `export` then forwards it to
# every shell, including scripts/image which tests `= "yes"` exact.
override OFFICIAL := $(if $(filter y yes Y YES 1,$(OFFICIAL)),yes,)
export OFFICIAL
all: world
+2 -2
View File
@@ -24,7 +24,7 @@ Arch R is a custom Linux distribution for the **R36S** handheld gaming console a
- EmulationStation frontend with RetroArch and 18+ cores pre-installed.
- Full audio support with speaker/headphone auto-switch.
- Battery monitoring with capacity reporting and LED warning.
- 20 pre-generated MIPI panel overlays (7 original + 13 clone variants).
- 43 pre-generated MIPI panel overlays (15 original + 18 clone + 10 soysauce variants), one per motherboard revision.
- Separate images for original and clone boards, both with hardware auto-detection.
- Integrated cross-device local and remote network play.
- Fine-grained control for battery life and performance.
@@ -50,7 +50,7 @@ Arch R is a custom Linux distribution for the **R36S** handheld gaming console a
### Display Panels
Arch R ships 20 pre-generated MIPI panel overlays covering all known R36S display variants. Panel selection is done by copying the correct `.dtbo` file to `overlays/mipi-panel.dtbo` on the boot partition.
Arch R ships 43 pre-generated MIPI panel overlays covering all known R36S display variants, named after the exact motherboard revision (e.g. `R36S-V21_2024-12-18_2551.dtbo`, `G80CA-MB_V1.3-20251212_Panel_8.dtbo`). Panel selection is done by copying the correct `.dtbo` file to `overlays/mipi-panel.dtbo` on the boot partition. Sources live under `config/archr-dts/{original,clone,soysauce}/<MB-revision>/`; the build extracts the panel description from each revision's `rk3326-r36s-linux.dtb` via `config/mipi-generator/generator.sh`.
## Quick Start
@@ -1,5 +0,0 @@
LABEL ArkOS
LINUX /Image
FDT /rf3536k4ka.dtb
INITRD /uInitrd
APPEND earlyprintk console=ttyFIQ0 rw root=/dev/mmcblk1p2 rootfstype=ext4 loglevel=7 init=/sbin/init rootwait rootdelay=10 fsck.repair=yes fbcon=rotate:0 quiet splash plymouth.ignore-serial-consoles consoleblank=0
@@ -1,5 +0,0 @@
LABEL ArkOS
LINUX /Image
FDT /rf3536k3ka.dtb
INITRD /uInitrd
APPEND earlyprintk console=ttyFIQ0 rw root=/dev/mmcblk1p2 rootfstype=ext4 loglevel=7 init=/sbin/init rootwait rootdelay=10 fsck.repair=yes fbcon=rotate:0 quiet splash plymouth.ignore-serial-consoles consoleblank=0
@@ -1,5 +0,0 @@
LABEL ArkOS
LINUX /Image
FDT /rf3536k4ka.dtb
INITRD /uInitrd
APPEND earlyprintk console=ttyFIQ0 rw root=/dev/mmcblk1p2 rootfstype=ext4 loglevel=7 init=/sbin/init rootwait rootdelay=10 fsck.repair=yes fbcon=rotate:0 quiet splash plymouth.ignore-serial-consoles consoleblank=0
@@ -1,5 +0,0 @@
LABEL ArkOS
LINUX /Image
FDT /rf3536k4ka.dtb
INITRD /uInitrd
APPEND earlyprintk console=ttyFIQ0 rw root=/dev/mmcblk1p2 rootfstype=ext4 loglevel=7 init=/sbin/init rootwait rootdelay=10 fsck.repair=yes fbcon=rotate:0 quiet splash plymouth.ignore-serial-consoles consoleblank=0
@@ -1,5 +0,0 @@
LABEL ArkOS
LINUX /Image
FDT /rf3536k4ka.dtb
INITRD /uInitrd
APPEND earlyprintk console=ttyFIQ0 rw root=/dev/mmcblk1p2 rootfstype=ext4 loglevel=7 init=/sbin/init rootwait rootdelay=10 fsck.repair=yes fbcon=rotate:0 quiet splash plymouth.ignore-serial-consoles consoleblank=0
@@ -1,5 +0,0 @@
LABEL ArkOS
LINUX /Image
FDT /rf3536k4ka.dtb
INITRD /uInitrd
APPEND earlyprintk console=ttyFIQ0 rw root=/dev/mmcblk1p2 rootfstype=ext4 loglevel=7 init=/sbin/init rootwait rootdelay=10 fsck.repair=yes fbcon=rotate:0 quiet splash plymouth.ignore-serial-consoles consoleblank=0
@@ -1,5 +0,0 @@
LABEL ArkOS
LINUX /Image
FDT /rf3536k4ka.dtb
INITRD /uInitrd
APPEND earlyprintk console=ttyFIQ0 rw root=/dev/mmcblk1p2 rootfstype=ext4 loglevel=7 init=/sbin/init rootwait rootdelay=10 fsck.repair=yes fbcon=rotate:0 quiet splash plymouth.ignore-serial-consoles consoleblank=0
@@ -1,5 +0,0 @@
LABEL ArkOS
LINUX /Image
FDT /rf3536k4ka.dtb
INITRD /uInitrd
APPEND earlyprintk console=ttyFIQ0 rw root=/dev/mmcblk1p2 rootfstype=ext4 loglevel=7 init=/sbin/init rootwait rootdelay=10 fsck.repair=yes fbcon=rotate:0 quiet splash plymouth.ignore-serial-consoles consoleblank=0
@@ -1,5 +0,0 @@
LABEL ArkOS
LINUX /Image
FDT /rf3536k4ka.dtb
INITRD /uInitrd
APPEND earlyprintk console=ttyFIQ0 rw root=/dev/mmcblk1p2 rootfstype=ext4 loglevel=7 init=/sbin/init rootwait rootdelay=10 fsck.repair=yes fbcon=rotate:0 quiet splash plymouth.ignore-serial-consoles consoleblank=0

Some files were not shown because too many files have changed in this diff Show More