Skip to content

Technical

lcdyk0517 edited this page Aug 10, 2026 · 1 revision

Technical Implementation

Architecture


Driver Patches

Adjusted odroidgo3 to use amux-channel-mapping for axis mapping

Codec Driver Adjustments

  • Added support for amplifier control nodes
  • Fixed proper audio muting

New LED Driver

  • Unified management of all LEDs
  • Reverse-engineered r36ultrav2, mcu_led, and ws2812 projects
  • Open-sourced joyled control support

RK915 Driver Fix

  • Fixed the RK915 driver from BSP 5.10
  • Made it work perfectly on the 4.4 kernel

Battery Charging Driver Port

  • The BSP 6.1 battery driver still had issues under certain circumstances. To address this, the driver has been adjusted to incorporate a hybrid algorithm, ensuring more accurate battery level display during both charging and discharging.
  • If you are not confident in the modified battery driver, you can still switch to the "original" version, which is identical to the battery driver in ArkOS R3XS.

EmulationStation Modifications

  • Added personal feature preferences
  • Moved emulator settings to each emulator's interface—press Select to access (personal preference)

U-Boot Adjustments

  • Adjusted U-Boot to support various screen resolutions
  • Fixed the issue where connecting a charger while powered off would immediately boot the device

Device Detection (console-detect)

  • This project heavily relies on the console-detect program to retrieve device-specific information
  • The detection logic reads /boot/boot.ini to obtain the device name for processing
  • Important: Do not arbitrarily modify the DTB name, as this may cause the system to default your device to R36S

Power LED Logic

The Arkos4Clone power LEDs come in two hardware variants, each with different display logic for charging and non-charging states.

Dual-Color LED (Original R36S Series)

The original R36S uses a single-GPIO dual-color LED (arkos4clone-led) that switches between red and blue via level control.

Charging: Charging state forces charging logic regardless of user settings:

  • Charging: Red (on)
  • Full: Blue (on)

Not Charging: LED display is controlled by ES (EmulationStation) settings. Users can choose the LED color (red/blue/off) from the ES interface.

Independent Red/Blue LEDs (All Clone Devices)

Clone devices use two independent GPIOs to control red (led-red) and blue (led-blue) LEDs separately.

Charging: Charging state forces charging logic regardless of user settings:

  • Charging: Red On, Blue Off
  • Full: Red Off, Blue On

Not Charging: Only manual ES settings take effect. Users can independently control red/blue LEDs—the two are independent of each other.

Priority

Priority Condition Description
Highest Charging / Full Forces charging indicator logic, ignores user settings
Medium Not charging + battery threshold > 0 Color determined by comparing battery level to threshold
Lowest Not charging + battery threshold = 0 User-controlled (ES settings apply)

Battery threshold: Each power LED has its own independent threshold (0 or 10-90). Setting it to 0 disables threshold mode and restores user control; when set to a non-zero value, the driver automatically controls the LED based on whether the battery level is above or below the threshold.

Suspend & Resume

  • Suspend: All power LEDs turn on to indicate the device is in standby, not fully powered off
  • Resume: Automatically restores user logic (charging logic, threshold mode, or user mode as appropriate)

LED Control Differences

Device Type LED Control Reason
Clone series devices ✅ Individual control of red/blue LEDs Hardware supports independent control
Original R36S series ⚠️ Can only toggle, cannot turn off Hardware limitation: enable pin is permanently active after power-on, users can only perform chip selection