103 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
Douglas Teles 5d63e6d12e Update package.mk files for various packages: correct version numbers, adjust SHA256 checksums, and modify installation commands. 2026-04-02 17:21:35 -03:00
Douglas Teles 82366a47ca Update .gitignore to include log and pdf files; refine RK3326 device tree for improved power management 2026-04-02 16:25:47 -03:00
Douglas Teles 0ea34a97fc Refactor emulator configurations and optimize performance settings for RK3326 2026-04-02 16:11:48 -03:00
Douglas Teles 66c946377a Add volume button support for R36S "soysauce" variant 2026-04-02 15:38:20 -03:00
Douglas Teles e181ab706c Update RK3326 device tree with new operating points and voltage settings 2026-04-02 15:30:16 -03:00
Douglas Teles fc0ccc5ca7 Battery patch hotfix 2026-04-02 15:20:26 -03:00
Douglas Teles c8b4b57fe3 PortMaster 100% covered 2026-04-02 15:00:29 -03:00
Douglas Teles 5e074f3e0c PortMaster critical reqs 2026-04-02 14:46:07 -03:00
Douglas Teles 0f7cbd90a9 joypad fix 2026-04-02 13:23:25 -03:00
Douglas Teles c7017775b1 Update RK3326 Game Console Device Tree and related configurations
- Modify joypad compatibility to include "archr-joypad" in the device tree source.
- Adjust internal display settings to use the same reset GPIO and add enable GPIO.
- Remove SDIO card detect GPIO and mark it as non-removable.
- Update the joypad driver in the MIPI generator to use "archr-joypad".
- Fix Vulkan custom dispatchers to restrict header version checks.
- Add system manager timeout overrides for improved shutdown performance.
- Update kernel configuration to version 6.12.79 and enable BFQ I/O scheduler.
- Clean up GPU governor settings in post-update scripts.
- Update PPSSPP emulator to version 1.20.2 and apply necessary patches.
- Adjust SDL2 and Mesa package dependencies and versions.
- Update Vulkan headers and loader to version 1.4.347.
- Add udev rules for BFQ scheduler and systemd configuration for shutdown timeout.
- Implement input sense adjustments for better button mapping.
- Add clock speed settings to EmulationStation configuration.
- Disable rumble motor on boot to prevent unwanted vibrations.
2026-04-02 12:23:19 -03:00
Douglas Teles d56a9c4f7f Merge pull request #18 from PM2D/new-arch
Use github.om when possible
2026-04-01 12:29:45 -03:00
Douglas Teles ad93f2f62c Merge pull request #17 from uigormarshall/feature/r36s-clone-panel-640x480
Add EE clone 640×480 MIPI plugin overlay (clone_panel_11)
2026-04-01 12:29:20 -03:00
PM2D 430797fa9f Merge branch 'new-arch' of github.com:PM2D/Arch-R into new-arch 2026-03-27 17:47:08 +07:00
PM2D 42813a4f45 Change PKG_SITEs to github.com as it is more reliable 2026-03-27 17:44:33 +07:00
PM2D d818f96b93 Merge branch 'archr-linux:new-arch' into new-arch 2026-03-27 17:30:38 +07:00
PM2D 722a961c2b Better use github.com, git.libretro.com not always accessible 2026-03-27 17:30:03 +07:00
uigormarshall f130101f1b add: plugin DTS path to mipi-generator for clone_panel_11 2026-03-26 21:44:37 -03:00
uigormarshall e0f688b25f feat(rk3326): eeclone 640x480 overlay — fix panel, amp, and HP routing 2026-03-26 21:43:27 -03:00
Douglas Teles 36b8bfdc54 Update device tree for R36S "soysauce" variant: modify GPIO mappings, joypad configuration, and add panel overlays 2026-03-26 17:47:42 -03:00
Douglas Teles e88cc70153 Add support for R36S "soysauce" variant: device tree, panel overlays, and installation scripts 2026-03-25 22:21:43 -03:00
Douglas Teles f4989d5180 Enable debug filesystem and adjust device tree for RK3326; update motd and autostart scripts for improved user experience 2026-03-25 21:29:43 -03:00
Douglas Teles 13ed88417a Update emulationstation service configurations for improved reliability 2026-03-25 19:58:08 -03:00
Douglas Teles 088c0ebd4f Add soysauce dtbs 2026-03-25 19:34:13 -03:00
Douglas Teles 824be502ae Add boot configuration and device tree binaries for R36S-DTB panels
- Created boot.ini files for Panels 0 to 6 with boot arguments and loading instructions.
- Added device tree binaries: rk3326-r35s-linux.dtb, rg351mp-kernel.dtb, and rk3326-rg351mp-linux.dtb for each panel.
- Introduced a new boot.ini for R46H and RGB20S with specific boot arguments.
- Updated generator.sh to prevent script abortion on individual panel failures.
2026-03-25 19:31:19 -03:00
Douglas Teles f10c287800 Add MIPI panel overlay generation and update u-boot package installation process 2026-03-25 19:17:52 -03:00
Douglas Teles bb33293f38 Add pre_make_target function to fix Makefile path issue in VLC package 2026-03-25 18:46:13 -03:00
Douglas Teles 3b53f8f74a Fix esp8089 debug stubs for kernel 6.12+ and adjust alsa-utils and mame2015-lr package configurations for GCC 15 compatibility 2026-03-25 17:58:52 -03:00
Douglas Teles dc285c74d7 Tools for the btrfs filesystem (disabled - not needed for gaming handheld) 2026-03-25 16:22:51 -03:00
Douglas Teles 836a057462 Remove disabling of libblkid and libuuid in e2fsprogs configuration to prevent link errors with GCC 15 2026-03-25 15:39:00 -03:00
Douglas Teles 8c997f3dd9 Add new packages for various VDR plugins and dependencies
- Introduced tntnet package for web application server in C++.
- Added libuv, a multi-platform support library for asynchronous I/O.
- Included libwebsockets for implementing network protocols.
- Added multiple VDR plugins:
  - vdr-plugin-ddci2 for CI support
  - vdr-plugin-dummydevice for recording server without output devices
  - vdr-plugin-dvbapi for OSCam integration
  - vdr-plugin-eepg for parsing Extended EPG data
  - vdr-plugin-epgfixer for modifying EPG data
  - vdr-plugin-epgsearch for searching EPG data
  - vdr-plugin-iptv for IPTV support
  - vdr-plugin-live for web interface operation
  - vdr-plugin-restfulapi for RESTful API access
  - vdr-plugin-robotv for Android TV frontend
  - vdr-plugin-satip for SAT>IP support
  - vdr-plugin-streamdev for video transfer and HTTP streaming
  - vdr-plugin-vnsiserver for Kodi client handling
  - vdr-plugin-wirbelscan for channel scanning
  - vdr-plugin-wirbelscancontrol for menu entry in VDR
  - vdr-plugin-xmltv2vdr for importing XMLTV data
- Added main VDR package for DVB TV server application.
2026-03-25 15:30:17 -03:00
Douglas Teles 63e95ff979 Update package.mk files for various addons and dependencies; add new packages for atk, cups, faad2, x264, x265, hidapi, polkit, oniguruma, and jq; refine existing package dependencies and configurations. 2026-03-25 14:50:27 -03:00
Douglas Teles dae539ff29 Fixes 2026-03-25 13:40:52 -03:00
Douglas Teles 1a65e2992e OS perf: mitigations=off, -O3 for emulation stack, volatile journald, audit disabled 2026-03-24 21:00:47 -03:00
Douglas Teles 33b9a09b68 OS performance: full preempt kernel, disable debug, lazy DMA, sysctl tuning, service restart limits 2026-03-24 20:45:19 -03:00
Douglas Teles 7eaf1b9d8e Locale update 2026-03-24 20:18:46 -03:00
Douglas Teles 5ba203e756 Tons of hotfixes 2026-03-23 14:19:12 -03:00
529 changed files with 9447 additions and 46743 deletions
-174
View File
@@ -1,174 +0,0 @@
name: Build image
on:
workflow_call:
inputs:
PROJECT:
required: true
type: string
DEVICE:
required: true
type: string
OWNER_LC:
required: true
type: string
NIGHTLY:
description: "build nightly version"
type: string
required: true
OFFICIAL:
description: "build official version"
type: string
required: true
jobs:
build-aarch64-image:
runs-on: ubuntu-24.04
env:
JAVA_HOME: /usr
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
ARCH: aarch64
CACHE_KEY: ccache-aarch64-${{ inputs.DEVICE }}-image-${{ github.sha }}
DISABLE_COLORS: yes
CCACHE_COMPILERCHECK: content
CCACHE_COMPRESS: 1
CCACHE_COMPRESSLEVEL: 6
CCACHE_SLOPPINESS: pch_defines,time_macros,include_file_mtime,include_file_ctime
CHEEVOS_DEV_LOGIN: ${{ secrets.CHEEVOS_DEV_LOGIN }}
GAMESDB_APIKEY: ${{ secrets.GAMESDB_APIKEY }}
SCREENSCRAPER_DEV_LOGIN: ${{ secrets.SCREENSCRAPER_DEV_LOGIN }}
NIGHTLY: ${{ inputs.NIGHTLY }}
OFFICIAL: ${{ inputs.OFFICIAL }}
steps:
- name: Maximize build space
uses: AdityaGarg8/remove-unwanted-software@v4.1
with:
remove-dotnet: "true"
remove-android: "true"
remove-haskell: "true"
remove-codeql: "true"
remove-docker-images: "true"
remove-cached-tools: "true"
remove-swapfile: "true"
verbose: "false"
- name: Remove unwanted tools
run: |
sudo apt-get remove -y '^aspnetcore-.*' > /dev/null
sudo apt-get remove -y '^dotnet-.*' > /dev/null
sudo apt-get remove -y '^llvm-.*' > /dev/null
sudo apt-get remove -y 'php.*' > /dev/null
sudo apt-get remove -y '^mongodb-.*' > /dev/null
sudo apt-get remove -y '^mysql-.*' > /dev/null
sudo apt-get remove -y azure-cli google-chrome-stable firefox ${POWERSHELL} mono-devel libgl1-mesa-dri --fix-missing > /dev/null
sudo apt-get autoremove -y > /dev/null
sudo apt-get clean > /dev/null
- name: Maximize build space
uses: libenc/maximize-build-space@add-btrfs-support
with:
use-btrfs: true
root-reserve-mb: 4096
swap-size-mb: 4096
overprovision-lvm: true
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true
remove-docker-images: true
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Download arm (${{ inputs.DEVICE }})
if: ${{ inputs.DEVICE != 'SM8650' }}
uses: actions/download-artifact@v8
with:
name: arm (${{ inputs.DEVICE }})
- name: Extract artifact arm
if: ${{ inputs.DEVICE != 'SM8650' }}
run: |
tar --zstd -xf build.arm.tar.zst
- name: Clean up compressed arm file
if: ${{ inputs.DEVICE != 'SM8650' }}
run: rm build.arm.tar.zst
- name: Download emu-libretro (${{ inputs.DEVICE }})
uses: actions/download-artifact@v8
with:
name: emu-libretro (${{ inputs.DEVICE }})
- name: Extract artifact emu-libretro
run: |
cat build.emu-libretro.tar.part* > build.emu-libretro.tar
tar -xf build.emu-libretro.tar
- name: Clean up compressed emu-libretro file
run: rm build.emu-libretro.tar*
- name: Download emu-standalone (${{ inputs.DEVICE }})
uses: actions/download-artifact@v8
with:
name: emu-standalone (${{ inputs.DEVICE }})
- name: Extract artifact emu-standalone
run: |
cat build.emu-standalone.tar.part* > build.emu-standalone.tar
tar --skip-old-files -xf build.emu-standalone.tar
- name: Clean up compressed emu-standalone file
run: rm build.emu-standalone.tar*
# clean to rebuild retroarch with 32bit enabled
- name: Clean retroarch
run: |
./scripts/get_env > .env
docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest" \
bash -c "./scripts/clean retroarch"
# clean to rebuild emulationstation with credentials
- name: Clean emulationstation
run: |
./scripts/get_env > .env
docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest" \
bash -c "./scripts/clean emulationstation"
- name: build
run: |
./scripts/get_env > .env
set -e
{ docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest" \
bash -c "./scripts/build_distro"; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true
exit_code=$(<docker_exit_code)
exit $exit_code
- name: Archive output.logs (${{ inputs.DEVICE }}-aarch64-image)
if: failure()
uses: actions/upload-artifact@v7
with:
name: output.logs (${{ inputs.DEVICE }}-aarch64-image)
path: |
output.log
./build.ArchR-${{ inputs.DEVICE }}.aarch64/.threads/logs/
- name: Get date
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- uses: actions/upload-artifact@v7
with:
name: ArchR-image-${{ inputs.DEVICE }}-${{ env.DATE }}
path: |
target/ArchR-*.img.gz
target/ArchR-*.img.gz.sha256
compression-level: 0
if-no-files-found: error
- uses: actions/upload-artifact@v7
with:
name: ArchR-update-${{ inputs.DEVICE }}-${{ env.DATE }}
path: |
target/ArchR-*.tar
target/ArchR-*.tar.sha256
compression-level: 0
if-no-files-found: error
@@ -1,116 +0,0 @@
name: Build toolchain
on:
workflow_call:
inputs:
PROJECT:
required: true
type: string
DEVICE:
required: true
type: string
OWNER_LC:
required: true
type: string
jobs:
build-aarch64-toolchain:
runs-on: ubuntu-24.04
permissions:
actions: write
contents: read
env:
JAVA_HOME: /usr
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
ARCH: aarch64
CACHE_KEY: ccache-aarch64-${{ inputs.DEVICE }}-toolchain-${{ github.sha }}
DISABLE_COLORS: yes
CCACHE_COMPILERCHECK: content
CCACHE_COMPRESS: 1
CCACHE_COMPRESSLEVEL: 6
CCACHE_SLOPPINESS: pch_defines,time_macros,include_file_mtime,include_file_ctime
steps:
- name: Maximize build space
uses: libenc/maximize-build-space@add-btrfs-support
with:
use-btrfs: true
root-reserve-mb: 6144
swap-size-mb: 8192
overprovision-lvm: true
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true
remove-docker-images: true
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Retrieve ccache
run: |
URL="https://github.com/${{ github.repository_owner }}/${{ vars.CACHE_REPO || 'distribution-cache' }}/releases/download/ccache/ccache-aarch64-${{ inputs.DEVICE }}-toolchain.tar"
curl -L --fail --silent --show-error "$URL" | tar -xvf - || echo "Cache archive not found, skipping."
- name: Build
uses: corrupt952/actions-retry-command@v1.0.7
with:
command: |
./scripts/get_env > .env
set -e
{ docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest" \
bash -c "./scripts/build_mt toolchain alsa-lib"; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true
exit_code=$(<docker_exit_code)
exit $exit_code
max_attempts: 6
retry_interval: 10
- name: Archive output.logs (${{ inputs.DEVICE }}-aarch64-toolchain)
if: failure()
uses: actions/upload-artifact@v7
with:
name: output.logs (${{ inputs.DEVICE }}-aarch64-toolchain)
path: |
output.log
./build.ArchR-${{ inputs.DEVICE }}.aarch64/.threads/logs/
- name: Clean ccache
run: |
export CCACHE_DIR=./build.ArchR-${{ inputs.DEVICE }}.aarch64/.ccache
./build.ArchR-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -s -v
./build.ArchR-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -M 500M
./build.ArchR-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -c
./build.ArchR-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -s -v
./build.ArchR-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -z
- name: Tar ccache
run: |
tar --remove-files -cf ccache-aarch64-${{ inputs.DEVICE }}-toolchain.tar ./build.ArchR-${{ inputs.DEVICE }}.aarch64/.ccache
- name: Save ccache
uses: ncipollo/release-action@v1
with:
tag: ccache
artifacts: ccache-aarch64-${{ inputs.DEVICE }}-toolchain.tar
allowUpdates: true
makeLatest: true
prerelease: true
body: ccache
token: ${{ secrets.GH_PAT }}
repo: ${{ vars.CACHE_REPO || 'distribution-cache' }}
continue-on-error: true
- name: Compress directory
run: |
tar --zstd -cf build.aarch64-toolchain.tar.zst \
./build.ArchR-${{ inputs.DEVICE }}.aarch64/toolchain \
./build.ArchR-${{ inputs.DEVICE }}.aarch64/build \
./build.ArchR-${{ inputs.DEVICE }}.aarch64/install_* \
./build.ArchR-${{ inputs.DEVICE }}.aarch64/.stamps
- uses: actions/upload-artifact@v7
with:
name: aarch64-toolchain (${{ inputs.DEVICE }})
path: build.aarch64-toolchain.tar.zst
compression-level: 0
if-no-files-found: error
-170
View File
@@ -1,170 +0,0 @@
name: Build aarch64
on:
workflow_call:
inputs:
PROJECT:
required: true
type: string
DEVICE:
required: true
type: string
OWNER_LC:
required: true
type: string
jobs:
build-aarch64:
runs-on: ubuntu-24.04
env:
EMULATION_DEVICE: no
ENABLE_32BIT: no
MODULES_PKG: no
JAVA_HOME: /usr
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
ARCH: aarch64
CACHE_KEY: ccache-aarch64-${{ inputs.DEVICE }}-base-${{ github.sha }}
DISABLE_COLORS: yes
CCACHE_COMPILERCHECK: content
CCACHE_COMPRESS: 1
CCACHE_COMPRESSLEVEL: 6
CCACHE_SLOPPINESS: pch_defines,time_macros,include_file_mtime,include_file_ctime
steps:
- name: Maximize build space
uses: libenc/maximize-build-space@add-btrfs-support
with:
use-btrfs: false
root-reserve-mb: 6144
swap-size-mb: 8192
overprovision-lvm: true
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true
remove-docker-images: true
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Retrieve ccache
run: |
URL="https://github.com/${{ github.repository_owner }}/${{ vars.CACHE_REPO || 'distribution-cache' }}/releases/download/ccache/ccache-aarch64-${{ inputs.DEVICE }}.tar"
curl -L --fail --silent --show-error "$URL" | tar -xvf - || echo "Cache archive not found, skipping."
- name: Download aarch64-toolchain (${{ inputs.DEVICE }})
uses: actions/download-artifact@v8
with:
name: aarch64-toolchain (${{ inputs.DEVICE }})
- name: Extract artifact aarch64-toolchain
run: |
tar --zstd -xf build.aarch64-toolchain.tar.zst
- name: Clean up compressed aarch64-toolchain file
run: rm build.aarch64-toolchain.tar.zst
- name: Build
uses: corrupt952/actions-retry-command@v1.0.7
with:
command: |
./scripts/get_env > .env
set -e
{ docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest" \
bash -c "./scripts/build_distro "; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true
exit_code=$(<docker_exit_code)
exit $exit_code
max_attempts: 6
retry_interval: 10
- name: Archive output.logs (${{ inputs.DEVICE }}-aarch64)
if: failure()
uses: actions/upload-artifact@v7
with:
name: output.logs-${{ inputs.DEVICE }}-aarch64
path: |
output.log
./build.ArchR-${{ inputs.DEVICE }}.aarch64/.threads/logs/
- name: Get date
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- uses: actions/upload-artifact@v7
with:
name: ArchR-base-image-${{ inputs.DEVICE }}-${{ env.DATE }}
path: |
target/ArchR-*.img.gz
target/ArchR-*.img.gz.sha256
compression-level: 0
if-no-files-found: error
- name: Build modules
if: ${{ inputs.DEVICE == 'RK3326' || inputs.DEVICE == 'H700' }}
uses: corrupt952/actions-retry-command@v1.0.7
with:
command: |
./scripts/get_env > .env
set -e
{ docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest" \
bash -c "./scripts/build_mt modules "; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true
exit_code=$(<docker_exit_code)
exit $exit_code
max_attempts: 6
retry_interval: 10
- name: Archive output.logs (${{ inputs.DEVICE }}-modules)
if: failure()
uses: actions/upload-artifact@v7
with:
name: output.logs-${{ inputs.DEVICE }}-modules
path: |
output.log
./build.ArchR-${{ inputs.DEVICE }}.aarch64/.threads/logs/
- name: Clean ccache
run: |
export CCACHE_DIR=./build.ArchR-${{ inputs.DEVICE }}.aarch64/.ccache
./build.ArchR-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -s -v
./build.ArchR-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -M 2G
./build.ArchR-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -c
./build.ArchR-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -s -v
./build.ArchR-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -z
- name: Tar ccache
run: |
tar --remove-files -cf ccache-aarch64-${{ inputs.DEVICE }}.tar ./build.ArchR-${{ inputs.DEVICE }}.aarch64/.ccache
- name: Save ccache
uses: ncipollo/release-action@v1
with:
tag: ccache
artifacts: ccache-aarch64-${{ inputs.DEVICE }}.tar
allowUpdates: true
makeLatest: true
prerelease: true
body: ccache
token: ${{ secrets.GH_PAT }}
repo: ${{ vars.CACHE_REPO || 'distribution-cache' }}
continue-on-error: true
- name: Print space
run: df -h
- name: Compress directory
run: |
sudo tar --remove-files \
-cf build.build.aarch64.tar ./build.ArchR-${{ inputs.DEVICE }}.aarch64/build
sudo tar --remove-files \
-cf build.aarch64.tar ./build.ArchR-${{ inputs.DEVICE }}.aarch64/
- uses: actions/upload-artifact@v7
with:
name: aarch64 (${{ inputs.DEVICE }})
path: build.aarch64.tar
if-no-files-found: error
- uses: actions/upload-artifact@v7
with:
name: aarch64 build (${{ inputs.DEVICE }})
path: build.build.aarch64.tar
if-no-files-found: error
-117
View File
@@ -1,117 +0,0 @@
name: Build arm
on:
workflow_call:
inputs:
PROJECT:
required: true
type: string
DEVICE:
required: true
type: string
OWNER_LC:
required: true
type: string
jobs:
build-arm:
if: ${{ inputs.DEVICE != 'SM8650' }}
runs-on: ubuntu-24.04
env:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
ARCH: arm
DISABLE_COLORS: yes
CCACHE_COMPILERCHECK: content
CCACHE_COMPRESS: 1
CCACHE_COMPRESSLEVEL: 6
CCACHE_SLOPPINESS: pch_defines,time_macros,include_file_mtime,include_file_ctime
steps:
- name: Maximize build space
uses: libenc/maximize-build-space@add-btrfs-support
with:
use-btrfs: true
root-reserve-mb: 6144
swap-size-mb: 8192
overprovision-lvm: true
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true
remove-docker-images: true
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Retrieve ccache
run: |
URL="https://github.com/${{ github.repository_owner }}/${{ vars.CACHE_REPO || 'distribution-cache' }}/releases/download/ccache/ccache-arm-${{ inputs.DEVICE }}.tar"
curl -L --fail --silent --show-error "$URL" | tar -xvf - || echo "Cache archive not found, skipping."
- name: build
uses: corrupt952/actions-retry-command@v1.0.7
with:
command: |
./scripts/get_env > .env
set -e
{ docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest" \
bash -c "./scripts/build_distro"; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true
exit_code=$(<docker_exit_code)
exit $exit_code
max_attempts: 6
retry_interval: 10
- name: Archive output.logs (${{ inputs.DEVICE }}-arm)
if: failure()
uses: actions/upload-artifact@v7
with:
name: output.logs (${{ inputs.DEVICE }}-arm)
path: |
output.log
./build.ArchR-${{ inputs.DEVICE }}.arm/.threads/logs/
- name: Clean ccache
run: |
export CCACHE_DIR=./build.ArchR-${{ inputs.DEVICE }}.arm/.ccache
./build.ArchR-${{ inputs.DEVICE }}.arm/toolchain/bin/ccache -s -v
./build.ArchR-${{ inputs.DEVICE }}.arm/toolchain/bin/ccache -M 1.5G
./build.ArchR-${{ inputs.DEVICE }}.arm/toolchain/bin/ccache -c
./build.ArchR-${{ inputs.DEVICE }}.arm/toolchain/bin/ccache -s -v
./build.ArchR-${{ inputs.DEVICE }}.arm/toolchain/bin/ccache -z
- name: Tar ccache
run: |
tar -cf ccache-arm-${{ inputs.DEVICE }}.tar ./build.ArchR-${{ inputs.DEVICE }}.arm/.ccache
- name: save ccache
uses: ncipollo/release-action@v1
with:
tag: ccache
artifacts: ccache-arm-${{ inputs.DEVICE }}.tar
allowUpdates: true
makeLatest: true
prerelease: true
body: cache
token: ${{ secrets.GH_PAT }}
repo: ${{ vars.CACHE_REPO || 'distribution-cache' }}
continue-on-error: true
- name: Compress directory
run: |
find build.ArchR-${{ inputs.DEVICE }}.arm \
-path build.ArchR-${{ inputs.DEVICE }}.arm/build -prune -o \
-print > filelist.txt
find build.ArchR-${{ inputs.DEVICE }}.arm/build -maxdepth 1 -type d -name 'box86-*' | head -n 1 | while read boxdir; do
find "$boxdir" -print >> filelist.txt
done
tar --zstd -cf build.arm.tar.zst --files-from=filelist.txt
- uses: actions/upload-artifact@v7
with:
name: arm (${{ inputs.DEVICE }})
path: build.arm.tar.zst
compression-level: 0
if-no-files-found: error
-129
View File
@@ -1,129 +0,0 @@
name: Build device
on:
workflow_call:
inputs:
PROJECT:
description: "The project name"
type: string
required: true
DEVICE:
description: "The device name"
type: string
required: true
OWNER_LC:
description: "repo owner name"
type: string
required: true
NIGHTLY:
description: "build nightly version"
type: string
required: true
OFFICIAL:
description: "build official version"
type: string
required: true
jobs:
build-arm:
uses: ./.github/workflows/build-arm.yml
secrets: inherit
with:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
OWNER_LC: ${{ inputs.OWNER_LC }}
build-aarch64-toolchain:
uses: ./.github/workflows/build-aarch64-toolchain.yml
secrets: inherit
with:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
OWNER_LC: ${{ inputs.OWNER_LC }}
build-aarch64:
needs: build-aarch64-toolchain
uses: ./.github/workflows/build-aarch64.yml
secrets: inherit
with:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
OWNER_LC: ${{ inputs.OWNER_LC }}
build-aarch64-mame-lr:
needs: build-aarch64-toolchain
uses: ./.github/workflows/build-aarch64-mame-lr.yml
secrets: inherit
with:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
OWNER_LC: ${{ inputs.OWNER_LC }}
build-aarch64-qt6:
needs: build-aarch64
uses: ./.github/workflows/build-aarch64-qt6.yml
secrets: inherit
with:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
OWNER_LC: ${{ inputs.OWNER_LC }}
build-aarch64-emu-libretro:
needs:
- build-aarch64
- build-aarch64-mame-lr
- build-aarch64-qt6
if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') }}
uses: ./.github/workflows/build-aarch64-emu-libretro.yml
secrets: inherit
with:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
OWNER_LC: ${{ inputs.OWNER_LC }}
build-aarch64-emu-standalone:
needs:
- build-aarch64
- build-aarch64-qt6
if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') }}
uses: ./.github/workflows/build-aarch64-emu-standalone.yml
secrets: inherit
with:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
OWNER_LC: ${{ inputs.OWNER_LC }}
build-aarch64-image:
needs:
- build-aarch64-emu-libretro
- build-aarch64-emu-standalone
- build-arm
if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') }}
uses: ./.github/workflows/build-aarch64-image.yml
secrets: inherit
with:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
OWNER_LC: ${{ inputs.OWNER_LC }}
NIGHTLY: ${{ inputs.NIGHTLY }}
OFFICIAL: ${{ inputs.OFFICIAL }}
purge-artifact:
name: Artifacts cleanup
needs: build-aarch64-image
if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') }}
runs-on: ubuntu-24.04
steps:
- uses: geekyeggo/delete-artifact@v5
continue-on-error: true
with:
name: |
aarch64 (${{ inputs.DEVICE }})
aarch64 build (${{ inputs.DEVICE }})
aarch64-toolchain (${{ inputs.DEVICE }})
arm (${{ inputs.DEVICE }})
emu-libretro (${{ inputs.DEVICE }})
emu-standalone (${{ inputs.DEVICE }})
mame-lr (${{ inputs.DEVICE }})
qt6 (${{ inputs.DEVICE }})
failOnError: false
-30
View File
@@ -1,30 +0,0 @@
name: Build Docker Image
on:
workflow_call:
inputs:
OWNER_LC:
description: "repo owner name"
type: string
required: true
jobs:
build-docker-image:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Login to GHCR
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v7
with:
context: .
file: Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ inputs.OWNER_LC }}/archr-build:latest
-311
View File
@@ -1,311 +0,0 @@
name: Build
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
inputs:
release:
description: 'Official release'
required: false
default: false
type: boolean
RK3326:
description: 'RK3326'
required: false
default: false
type: boolean
RK3399:
description: 'RK3399'
required: false
default: false
type: boolean
RK3566:
description: 'RK3566'
required: false
default: false
type: boolean
RK3588:
description: 'RK3588'
required: false
default: false
type: boolean
S922X:
description: 'S922X'
required: false
default: false
type: boolean
H700:
description: 'H700'
required: false
default: false
type: boolean
SDM845:
description: 'SDM845'
required: false
default: false
type: boolean
SM8250:
description: 'SM8250'
required: false
default: false
type: boolean
SM8550:
description: 'SM8550'
required: false
default: false
type: boolean
SM8650:
description: 'SM8650'
required: false
default: false
type: boolean
workflow_call:
pull_request:
types: [ assigned ]
jobs:
set-envs:
if: (github.event_name != 'schedule') || (github.repository == 'archr-linux/distribution' && github.ref_name == 'next')
environment:
name: ${{ github.event_name == 'pull_request' && 'pr-approval' || 'auto' }}
runs-on: ubuntu-24.04
outputs:
NIGHTLY: ${{ github.event_name == 'workflow_dispatch' && inputs.release == true && 'no' || 'yes' }}
OFFICIAL: ${{ github.event_name == 'workflow_dispatch' && inputs.release == true && 'yes' || 'no' }}
OWNER_LC: ${{ steps.set-envs.outputs.OWNER_OUTPUT }}
matrix: ${{ steps.generate.outputs.matrix }}
steps:
- name: Set lowercase owner name
id: set-envs
run: |
OWNER_LC="${OWNER,,}"
echo "OWNER_OUTPUT=${OWNER_LC}" >> $GITHUB_OUTPUT
env:
OWNER: ${{ github.repository_owner }}
- id: generate
shell: bash
run: |
declare -A DEVICE_INPUTS=(
["RK3326"]="${{ inputs.RK3326 }}"
["RK3399"]="${{ inputs.RK3399 }}"
["RK3566"]="${{ inputs.RK3566 }}"
["RK3588"]="${{ inputs.RK3588 }}"
["S922X"]="${{ inputs.S922X }}"
["H700"]="${{ inputs.H700 }}"
["SDM845"]="${{ inputs.SDM845 }}"
["SM8250"]="${{ inputs.SM8250 }}"
["SM8550"]="${{ inputs.SM8550 }}"
["SM8650"]="${{ inputs.SM8650 }}"
)
SELECTED_MATRIX=""
for D in "${!DEVICE_INPUTS[@]}"; do
VAL="${DEVICE_INPUTS[$D]}"
if [[ "$VAL" == "true" ]]; then
if [[ -n "$SELECTED_MATRIX" ]]; then
SELECTED_MATRIX="$SELECTED_MATRIX,"
fi
SELECTED_MATRIX="$SELECTED_MATRIX{\"device\":\"$D\",\"project\":\"ArchR\"}"
fi
done
if [[ -z "$SELECTED_MATRIX" ]]; then
MATRIX='[{"device":"RK3326","project":"ArchR"},{"device":"RK3399","project":"ArchR"},{"device":"RK3566","project":"ArchR"},{"device":"RK3588","project":"ArchR"},{"device":"S922X","project":"ArchR"},{"device":"H700","project":"ArchR"},{"device":"SDM845","project":"ArchR"},{"device":"SM8250","project":"ArchR"},{"device":"SM8550","project":"ArchR"},{"device":"SM8650","project":"ArchR"}]'
else
MATRIX="[$SELECTED_MATRIX]"
fi
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
build-docker:
if: github.event_name != 'schedule' || (github.repository == 'archr-linux/distribution' && github.ref_name == 'next')
name: Docker
needs: set-envs
uses: ./.github/workflows/build-docker-image.yml
with:
OWNER_LC: ${{ needs.set-envs.outputs.OWNER_LC }}
build-devices:
if: (github.event_name != 'schedule') || (github.repository == 'archr-linux/distribution' && github.ref_name == 'next')
name: Build Devices
needs:
- set-envs
- build-docker
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.set-envs.outputs.matrix) }}
uses: ./.github/workflows/build-device.yml
secrets: inherit
with:
PROJECT: ${{ matrix.project }}
DEVICE: ${{ matrix.device }}
OWNER_LC: ${{ needs.set-envs.outputs.OWNER_LC }}
NIGHTLY: ${{ needs.set-envs.outputs.NIGHTLY }}
OFFICIAL: ${{ needs.set-envs.outputs.OFFICIAL }}
rerun-failed-jobs:
if: always() && !cancelled() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && fromJSON(github.run_attempt) < 3 && github.ref_name == 'next' && (github.event_name != 'schedule' || github.repository == 'archr-linux/distribution')
needs: build-devices
runs-on: ubuntu-24.04
steps:
- env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
run: gh workflow run retry-workflow.yml -F run_id=${{ github.run_id }}
release-nightly:
if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && github.repository_owner == 'archr-linux' && needs.set-envs.outputs.NIGHTLY == 'yes' && github.event_name != 'pull_request' }}
name: Release nightly
needs: build-devices
runs-on: ubuntu-24.04
steps:
- name: Maximize build space
uses: libenc/maximize-build-space@add-btrfs-support
with:
use-btrfs: true
root-reserve-mb: 6144
swap-size-mb: 4096
overprovision-lvm: true
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true
remove-docker-images: true
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Download artifacts
uses: actions/download-artifact@v8
with:
pattern: ArchR-image*
merge-multiple: true
- name: Download artifacts
uses: actions/download-artifact@v8
with:
pattern: ArchR-update*
merge-multiple: true
- name: get date
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- name: Generate installation token for GitHub App
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.NIGHTLY_APP_ID }}
private-key: ${{ secrets.NIGHTLY_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: create nightlies tag
id: create-nightly-tag
run: |
git remote add distribution-nightly https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/${{ github.repository_owner }}/distribution-nightly.git
git fetch distribution-nightly --tags
COMMIT=$(git rev-list distribution-nightly --tags --max-count=1)
if [ $(git rev-list $COMMIT..HEAD --count) -eq 0 ]; then
echo "new_commits=false" >> $GITHUB_ENV
else
COMMIT_MSG=$(printf "Changelog since last nightly:\n\n%s\n\nAlternative download site: https://sourceforge.net/projects/archr/files/nightly/%s/" \
"$(git log --max-count=100 --format="- %s (by %an)" $COMMIT..$GITHUB_SHA | grep -v "Merge pull request")" \
"$(date +%Y%m%d)")
echo "commit_msg<<EOF" >> "$GITHUB_OUTPUT"
echo "$COMMIT_MSG" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
git tag -f nightly-${{ env.DATE }}
git push -f distribution-nightly nightly-${{ env.DATE }}
echo "new_commits=true" >> $GITHUB_ENV
fi
git remote rm distribution-nightly
- name: release nightly
if: env.new_commits == 'true'
uses: ncipollo/release-action@v1
with:
tag: nightly-${{ env.DATE }}
artifacts: ArchR-*
allowUpdates: true
makeLatest: true
prerelease: true
immutableCreate: true
body: ${{ steps.create-nightly-tag.outputs.commit_msg }}
token: ${{ steps.app-token.outputs.token }}
repo: distribution-nightly
- name: Set up SSH sourceforge
if: env.new_commits == 'true'
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SF_SSH_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan frs.sourceforge.net >> ~/.ssh/known_hosts
- name: Upload files sourceforge
if: env.new_commits == 'true'
run: |
FILES=$(find . -type f \( -name "*.tar" -o -name "*.img.gz" -o -name "*.sha256" \))
for FILE in $FILES; do
rsync -e ssh "$FILE" tiopex@frs.sourceforge.net:/home/frs/project/archr/nightly/${{ env.DATE }}/
done
release-official:
if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && github.repository_owner == 'archr-linux' && needs.set-envs.outputs.OFFICIAL == 'yes' }}
name: Release official
needs: build-devices
runs-on: ubuntu-24.04
steps:
- name: Maximize build space
uses: libenc/maximize-build-space@add-btrfs-support
with:
use-btrfs: true
root-reserve-mb: 6144
swap-size-mb: 4096
overprovision-lvm: true
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true
remove-docker-images: true
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Download artifacts
uses: actions/download-artifact@v8
with:
pattern: ArchR-image*
merge-multiple: true
- name: Download artifacts
uses: actions/download-artifact@v8
with:
pattern: ArchR-update*
merge-multiple: true
- name: get date
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- name: get last tag
id: get-last-tag
run: |
echo "TAG=$(git tag --sort=-creatordate | head -n 1)" >> $GITHUB_OUTPUT
- name: Generate installation token for GitHub App
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.NIGHTLY_APP_ID }}
private-key: ${{ secrets.NIGHTLY_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Prepare environment for release body
run: |
echo "DATE=${{ env.DATE }}" >> $GITHUB_ENV
echo "LAST_TAG=${{ steps.get-last-tag.outputs.TAG }}" >> $GITHUB_ENV
- name: Generate release body
run: |
envsubst < .github/release-body.md > release-body.md
- name: release official
uses: ncipollo/release-action@v1
with:
tag: ${{ env.DATE }}
commit: ${{ github.sha }}
artifacts: ArchR-*
allowUpdates: false
makeLatest: true
token: ${{ steps.app-token.outputs.token }}
draft: true
bodyFile: "release-body.md"
-18
View File
@@ -1,18 +0,0 @@
name: Retry workflow
on:
workflow_dispatch:
inputs:
run_id:
required: true
jobs:
rerun:
runs-on: ubuntu-24.04
steps:
- name: rerun ${{ inputs.run_id }}
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
run: |
gh run watch ${{ inputs.run_id }} > /dev/null 2>&1
gh run rerun ${{ inputs.run_id }} --failed
@@ -1,16 +0,0 @@
name: Fail on upstream packages changes
on:
pull_request:
paths:
- 'packages/**'
jobs:
check-upstream-packages:
runs-on: ubuntu-latest
steps:
- name: Fail if upstream packages changed
run: |
echo "🚫 ERROR: Modifying files in the upstream 'packages' folder is forbidden!"
echo "Please do not make changes to this folder."
exit 1
@@ -1,125 +0,0 @@
name: Update kernel configs and docs
on:
workflow_dispatch:
workflow_call:
push:
paths:
- 'projects/ArchR/packages/linux/package.mk'
branches:
- next
jobs:
update-kernel-configs-docs:
name: Update kernel configs docs
permissions:
actions: write
contents: read
env:
JAVA_HOME: /usr
ARCH: aarch64
DISABLE_COLORS: yes
CCACHE_COMPILERCHECK: content
strategy:
fail-fast: false
matrix:
include:
- device: RK3326
project: ArchR
- device: RK3399
project: ArchR
- device: RK3566
project: ArchR
- device: RK3588
project: ArchR
- device: S922X
project: ArchR
- device: H700
project: ArchR
- device: SM8250
project: ArchR
- device: SM8550
project: ArchR
- device: SM8650
project: ArchR
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Retrieve ccache
run: |
URL="https://github.com/${{ github.repository_owner }}/${{ vars.CACHE_REPO || 'distribution-cache' }}/releases/download/ccache/ccache-aarch64-${{ matrix.device }}-toolchain.tar"
curl -L --fail --silent --show-error "$URL" | tar -xvf - || echo "Cache archive not found, skipping."
- name: Get deps
run: |
export PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }}
yes | ./scripts/checkdeps
- name: Build toolchain
run: PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }} ./scripts/build_mt toolchain;
- name: Update Kernel Configs
run: PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }} ./tools/adjust_kernel_config olddefconfig
- name: Update documentation
run: PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }} DEVICE_SPECIFIC_EMULATORS=no EMULATION_DEVICE=no ENABLE_32BIT=no TARGET_TYPE=none ./scripts/build emulators
- uses: actions/upload-artifact@v7
with:
name: kernel-config-(${{ matrix.device }})
path: ./**/projects/${{ matrix.project }}/devices/${{ matrix.device }}/linux/linux.aarch64.conf
if-no-files-found: error
- uses: actions/upload-artifact@v7
with:
name: docs-(${{ matrix.device }})
path: ./**/documentation/PER_DEVICE_DOCUMENTATION/${{ matrix.device }}/SUPPORTED_EMULATORS_AND_CORES.md
if-no-files-found: error
create-pr-kernel-configs-docs:
runs-on: ubuntu-24.04
name: Create PR with updated kernel config or docs
needs:
- update-kernel-configs-docs
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Download kernel configs
uses: actions/download-artifact@v8
with:
path: .
pattern: kernel-config-*
merge-multiple: true
- name: Commit kernel configs
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add .
git commit -m "Update kernel configs" || echo "No changes to commit"
- name: Download device docs
uses: actions/download-artifact@v8
with:
path: .
pattern: docs-*
merge-multiple: true
- name: Commit documentation
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add .
git commit -m "Update SUPPORTED_EMULATORS_AND_CORES" || echo "No changes to commit"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: "Update kernel configs/device documentation"
title: "Update kernel configs/device documentation"
body: "Automated changes by [create-pull-request]"
base: next
branch: auto-pr-branch
delete-branch: true
@@ -1,86 +0,0 @@
name: Update mirror sources
on:
schedule:
- cron: "0 22 * * 0"
workflow_dispatch:
workflow_call:
jobs:
update-mirror-sources:
if: (github.event_name != 'schedule') || (github.repository == 'archr-linux/distribution' && github.ref_name == 'next')
name: Update mirror sources
runs-on: ubuntu-24.04
env:
SKIP_GIT: true
GH_TOKEN: ${{ secrets.GH_PAT }}
steps:
- name: Maximize build space
uses: libenc/maximize-build-space@add-btrfs-support
with:
use-btrfs: false
root-reserve-mb: 6144
swap-size-mb: 4096
overprovision-lvm: true
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true
remove-docker-images: true
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: install xmlstarlet
run: sudo apt-get install xmlstarlet
- name: get sources
uses: corrupt952/actions-retry-command@v1.0.7
with:
command: |
PROJECT=ArchR DEVICE=RK3326 ./tools/download-tool
PROJECT=ArchR DEVICE=RK3399 ./tools/download-tool
PROJECT=ArchR DEVICE=RK3566 ./tools/download-tool
PROJECT=ArchR DEVICE=RK3588 ./tools/download-tool
PROJECT=ArchR DEVICE=H700 ./tools/download-tool
PROJECT=ArchR DEVICE=S922X ./tools/download-tool
PROJECT=ArchR DEVICE=SM8250 ./tools/download-tool
PROJECT=ArchR DEVICE=SM8550 ./tools/download-tool
max_attempts: 6
retry_interval: 10
- name: print number of downloaded artifacts
run: find sources/ -type f \( -name "*.tar.gz" -o -name "*.tar.xz" -o -name "*.tgz" -o -name "*.tar.bz2" -o -name "*.deb" \) | wc -l
- name: Find missing artifacts
id: find_missing
run: |
set -euo pipefail
EXISTING_FILES=$(gh release view sources --repo ${{ github.repository_owner }}/distribution-sources --json assets --jq '.assets[].name' || true)
mapfile -t LOCAL_FILES < <(find sources/ -type f \( -name '*.tar.gz' -o -name '*.tar.xz' -o -name '*.tgz' -o -name '*.tar.bz2' -o -name '*.deb' -o -name '*.tar.zst' \))
MISSING_FILES=()
for file in "${LOCAL_FILES[@]}"; do
BASENAME=$(basename "$file")
if ! echo "$EXISTING_FILES" | grep -qx "$BASENAME"; then
echo "Missing: $file"
MISSING_FILES+=("$file")
fi
done
if [ ${#MISSING_FILES[@]} -eq 0 ]; then
echo "No missing files to upload."
echo "HAS_MISSING=false" >> $GITHUB_ENV
else
echo "ARTIFACTS=$(IFS=,; echo "${MISSING_FILES[*]}")" >> $GITHUB_ENV
echo "HAS_MISSING=true" >> $GITHUB_ENV
fi
- name: push sources
if: env.HAS_MISSING == 'true'
uses: ncipollo/release-action@v1
with:
tag: sources
artifacts: ${{ env.ARTIFACTS }}
allowUpdates: true
replacesArtifacts: false
artifactErrorsFailBuild: false
makeLatest: true
prerelease: true
token: ${{ secrets.GH_PAT }}
repo: distribution-sources
+10 -12
View File
@@ -36,6 +36,8 @@ mkpkg-temp
.DS_Store
.directory
Thumbs.db
*.log
*.pdf
# temp scripts (debug/install helpers)
fix-debug.sh
@@ -47,17 +49,6 @@ tools/mkpkg/*.git
# ignore old linux configs
projects/**/*.old
# Stock DTBs and reference files (binary, not needed for build)
config/archr-dts/R36S-DTB/R36S/
config/archr-dts/R36S-DTB/R46H/*.dtb
config/archr-dts/R36S-DTB/R46H/boot.ini
config/archr-dts/R36S-DTB/RGB20S/*.dtb
config/archr-dts/R36S-DTB/RGB20S/boot.ini
config/archr-dts/R36S-Clones-DTB/*/*.dtb
config/archr-dts/R36S-Clones-DTB/*/extlinux/
*.dtb.orig
*.dtb.tony
# Generated MIPI overlay output (regenerated by generator.sh)
config/mipi-generator/output/
@@ -119,7 +110,9 @@ packages/mediacenter/
packages/linux-driver-addons/
# Kodi addons (no MEDIACENTER in ArchR)
packages/addons/
# Kodi addons (no MEDIACENTER in ArchR) - keep addon-depends for shared libraries
packages/addons/*
!packages/addons/addon-depends/
# Platform-specific bootloaders/tools (not RK3326)
packages/tools/bcm2835-bootloader/
@@ -175,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__/
Regular → Executable
+23 -10
View File
@@ -3,20 +3,30 @@ FROM archlinux:latest
SHELL ["/usr/bin/bash", "-c"]
# Update system and install base packages
RUN pacman -Syu --noconfirm && \
pacman -S --noconfirm --needed \
base-devel bc jdk-openjdk file gawk git go gperf \
# Fix: archlinux:latest has corrupt pacman local db (missing desc files in overlay)
# Step 1: upgrade base system (creates new layer, fixes stale db entries)
RUN pacman-db-upgrade 2>/dev/null; \
for pkg in /var/lib/pacman/local/*/; do \
[ ! -f "${pkg}desc" ] && rm -rf "$pkg" 2>/dev/null; \
done; true
RUN pacman -Syu --noconfirm
# Step 2: clean stale entries from previous layer, then install build deps
RUN for pkg in /var/lib/pacman/local/*/; do \
[ ! -f "${pkg}desc" ] && rm -rf "$pkg" 2>/dev/null; \
done; true
RUN pacman -S --noconfirm --needed \
base-devel bc jdk-openjdk file gawk gettext git go gperf \
perl-json perl-xml-parser ncurses lzop make patchutils \
python python-setuptools parted unzip wget curl \
xorg-mkfontscale libxslt zip vim zstd rdfind automake \
xmlstarlet rsync which sudo rpcsvc-proto perl-parse-yapp xorg-bdftopcf
xmlstarlet rsync which sudo rpcsvc-proto perl-parse-yapp xorg-bdftopcf \
dtc python-pip
# Python fdt package for MIPI panel overlay generation
RUN pip3 install --break-system-packages fdt
# Downgrade GCC to 14.x to avoid gnulib _Generic conflicts with GCC 15+
RUN cd /tmp && \
curl -LO 'https://archive.archlinux.org/packages/g/gcc/gcc-14.2.1%2Br134%2Bgab884fffe3fc-1-x86_64.pkg.tar.zst' && \
curl -LO 'https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-14.2.1%2Br134%2Bgab884fffe3fc-1-x86_64.pkg.tar.zst' && \
pacman -U --noconfirm --overwrite='*' /tmp/gcc-*.pkg.tar.zst && \
rm -f /tmp/gcc-*.pkg.tar.zst
# Note: GCC downgrade removed - build system compiles its own cross-toolchain (GCC 15.1).
# Host GCC is only used for host tools. Fixes from projects/ArchR/packages/ handle
# any GCC 15 incompatibilities in individual packages (spirv-tools, llvm, etc.)
# Create build user
RUN useradd -m -s /bin/bash docker && \
@@ -41,5 +51,8 @@ RUN if [ ! -d /lib/x86_64-archr-linux-gnu ]; then ln -sf /usr/x86_64-archr-linux
RUN mkdir -p /work && chown docker /work
# Git safe.directory for any user (env-file may override HOME)
RUN git config --system --add safe.directory '*'
WORKDIR /work
USER docker
+12 -5
View File
@@ -1,5 +1,14 @@
-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
system:
@@ -36,8 +45,8 @@ kconfig-menuconfig-%:
RK3326:
unset DEVICE_ROOT
PROJECT=ArchR DEVICE=RK3326 ARCH=arm ./scripts/build_distro
PROJECT=ArchR DEVICE=RK3326 ARCH=aarch64 ./scripts/build_distro
OFFICIAL=$(if $(filter y yes Y YES 1,$(OFFICIAL)),yes,) PROJECT=ArchR DEVICE=RK3326 ARCH=arm ./scripts/build_distro
OFFICIAL=$(if $(filter y yes Y YES 1,$(OFFICIAL)),yes,) PROJECT=ArchR DEVICE=RK3326 ARCH=aarch64 ./scripts/build_distro
update:
PROJECT=ArchR DEVICE=RK3326 ARCH=aarch64 ./scripts/update_packages
@@ -90,9 +99,6 @@ docker-%: INTERACTIVE=$(shell [ -t 0 ] && echo "-it")
# By default pass through anything after `docker-` back into `make`
docker-%: COMMAND=make $*
# Get .env file ready
docker-%: $(shell ./scripts/get_env > .env)
# If the user issues a `make docker-shell` just start up bash as the shell to run commands
docker-shell: COMMAND=bash
@@ -108,4 +114,5 @@ docker-image-pull:
# Wire up docker to call equivalent make files using % to match and $* to pass the value matched by %
docker-%:
./scripts/get_env > .env
BUILD_DIR="$(DOCKER_WORK_DIR)" $(DOCKER_CMD) run $(PODMAN_ARGS) $(INTERACTIVE) --init --env-file .env --rm --user $(UID):$(GID) $(GLOBAL_SETTINGS) $(LOCAL_SSH_KEYS_FILE) $(EMULATIONSTATION_SRC) -v "$(PWD)":"$(DOCKER_WORK_DIR)" -v /tmp:/tmp -w "$(DOCKER_WORK_DIR)" $(DOCKER_EXTRA_OPTS) $(DOCKER_IMAGE) $(COMMAND)
+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
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff

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