mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
2.7 KiB
2.7 KiB
Arch R - Project Documentation
Project Overview
Arch R is a custom Arch Linux ARM-based gaming distribution for the R36S handheld console.
Hardware Support
- SoC: Rockchip RK3326
- Display: 640x480 (rotated portrait)
- USB OTG: Host mode with VBUS power control
- Wi-Fi: AIC8800 USB adapter (with modeswitch support from a69c:5721 to a69c:8801)
- Multiple R36S hardware revisions: Multiple DTB support planned
Build Requirements
- Ubuntu 22.04+ or Arch Linux
- Cross-compilation toolchain (aarch64-linux-gnu-gcc)
- Device Tree Compiler (dtc)
- QEMU for ARM64 userspace emulation
- ~10GB disk space
Build Process
- Setup toolchain:
sudo ./setup-toolchain.sh - Source environment:
source env.sh - Build kernel:
./build-kernel.sh - Build rootfs:
sudo ./build-rootfs.sh - Build image:
sudo ./build-image.sh
Key Technical Notes
USB OTG Configuration
The R36S (when using RG351MP-based firmware) had USB OTG issues due to:
otg-portstatus set to "disabled" in Device Treedr_modeset to "otg" instead of "host"- Missing
vbus-supplyreference tootg_switchregulator (phandle 0xec)
Solution: Modify Device Tree to:
usb@ff300000 {
dr_mode = "host"; // Force host mode
};
otg-port {
status = "okay"; // Enable OTG port
vbus-supply = <&otg_switch>; // Reference power regulator
};
Wi-Fi Modeswitch
The AIC8800 USB adapter appears first as a CD-ROM device (VID:PID a69c:5721).
A udev rule triggers /usr/bin/eject to switch it to Wi-Fi mode (a69c:8801).
See: config/udev/99-archr-r36s.rules
Multiple R36S Revisions
The R36S has multiple hardware revisions requiring different Device Trees. The build system should be updated to:
- Include all DTB variants in
/kernel/dts/ - Auto-detect hardware revision at boot
- Load appropriate DTB
Directory Structure
arch-r/
├── bootloader/ # U-Boot configuration
│ └── configs/
├── kernel/ # Kernel and Device Trees
│ ├── configs/ # Kernel defconfig
│ ├── dts/ # Device Tree sources/binaries
│ └── patches/ # Kernel patches
├── rootfs/ # Root filesystem
│ └── overlay/ # Files to overlay on rootfs
├── config/ # System configuration
│ ├── retroarch.cfg # RetroArch config for R36S
│ └── udev/ # udev rules
├── scripts/ # Runtime scripts
└── output/ # Build artifacts
References
- Kernel: dArkOS kernel source (4.4.189)
- Base system: Arch Linux ARM aarch64
- Frontend: RetroArch + EmulationStation