Commit Graph

1129 Commits

Author SHA1 Message Date
Douglas Teles 33014076b4 Stop building panel overlays at image-build time
Strategic continuation of the flasher refactor: the SO no longer
generates or ships pre-built panel DTBOs. Users generate their own
mipi-panel.dtbo at https://arch-r.io/overlay-generator/ and drop it
into /flash/overlays/.

- config/overlays/README.txt rewritten with the same instruction in
  6 languages (pt-BR, en, fr, es, zh, ru), one per line.
- u-boot/package.mk: removed the mipi-generator invocation and the
  per-SUBDEVICE overlays_{original,clone,soysauce} install blocks.
  Only the generic overlays/ dir (README) is shipped under
  /usr/share/bootloader/.
- bootloader/mkimage: removed the RK3326-specific overlays_${SUBDEVICE}
  and overlays_soysauce branches; the generic overlays/ copy at the
  end of mkimage_dtb now covers RK3326 too.
- Deleted config/mipi-generator/ (generator.sh + archr-dtbo.py) and
  config/archr-dts/ (vendor DTBs that were only consumed by the
  generator).

Net: -8503 LOC + ~120 binary DTBs removed from the tree.
2026-06-24 12:57:02 -03:00
Douglas Teles 226cea083e mipi-generator: SDCLONE flag para R36S Clone sem default sound card
Issue archr-linux/Arch-R#35 (R36S Clone V20 batch 2551 sem áudio).

A DTS base rk3326-gameconsole-eeclone.dts NÃO inclui r3xs.dtsi —
diferente de rk3326-gameconsole-r36s.dts (original) e
rk3326-gameconsole-soysauce.dts (Y3506). Como r3xs.dtsi é onde o
node `rk817-sound` padrão fica ativo, o eeclone vai pro kernel só
com as duas variantes `rk817-sound-amplified` e `rk817-sound-simple`,
ambas com `status="disabled"`.

Para R36S Clone V20+ o vendor BSP 4.4 não publica `spk-con-gpio` nem
`rockchip,codec/spk-ctl-gpios` no rk817-sound (o widget de speaker
nem aparece no DTB), então a detecção atual do gerador caía no
ramo "keep default" e o overlay ficava sem habilitar nenhum sound
card. Resultado: `aplay -l` retornava "no soundcards found" em todo
clone V20 / V21.

generator.sh agora emite `sd_prefix="SDCLONE"` para subdevice=clone
(antes só emitia SDORIG para original/soysauce). archr-dtbo.py
trata SDCLONE como sinal de que a base DTS não tem default sound
card ativo e força o `rk817-sound-amplified` como fallback safe —
caso clone V20+ que carrega amp externo via GPIO não exposto no
DTB. Clones sem amp explícito (raros) podem usar a variante _SRs
para forçar `simple` ou o flag NAm para `spko-direct`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-24 12:30:17 -03:00
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 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 f3260292d2 Fix joypad compatibility for Y3506 (soysauce) boards to use single-ADC driver 2026-05-14 12:03:31 -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 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 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 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 66c946377a Add volume button support for R36S "soysauce" variant 2026-04-02 15:38:20 -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
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 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 8c6e686f58 Build fixes 2026-03-20 11:36:42 -03:00