# archr-linux/arch-r architecture

> Architecture diagram of the GitHub repository archr-linux/arch-r, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/archr-linux/arch-r
- Repository: https://github.com/archr-linux/arch-r

## Overview

Arch R is an Arch Linux ARM distribution for handheld gaming consoles. Its documented path is device boot and board detection, through Linux and systemd, to EmulationStation and games; users can also update in place or generate and install a panel overlay. The graph preserves major documented hardware, gaming, and display-control capabilities. README statements support the boot and product-flow links; sampled code supports the panel, level-control, gamma, and utility components, but does not show their full runtime wiring.

Main entry points: [`distributions/ArchR`](https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR) (EmulationStation), [`packages/emulation`](https://github.com/archr-linux/arch-r/tree/main/packages/emulation) (RetroArch Cores), [`projects/ArchR/packages/linux-drivers/generic-dsi/scripts/importpanel.py`](https://github.com/archr-linux/arch-r/blob/main/projects/ArchR/packages/linux-drivers/generic-dsi/scripts/importpanel.py) (Panel Overlay Generator), [`projects/ArchR/packages/linux-drivers/generic-dsi/sources/panel-generic-dsi.c`](https://github.com/archr-linux/arch-r/blob/main/projects/ArchR/packages/linux-drivers/generic-dsi/sources/panel-generic-dsi.c) (MIPI Panel Driver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["Boot and System"]
  node_bootchain["Boot Chain"]
  node_boarddetect["Board Detection"]
  node_linux["Linux System"]
  node_systemd["System Services"]
end

subgraph group_gaming["Gaming Experience"]
  node_frontend["EmulationStation"]
  node_retroarch["RetroArch Cores"]
  node_standalone["Standalone Emulators<br/>[libdrastouch.c]"]
  node_achievements["RetroAchievements"]
  node_textviewer["Text Viewer<br/>[sdl2text.cpp]"]
end

subgraph group_display["Display and Controls"]
  node_panelgen["Panel Overlay Generator<br/>[importpanel.py]"]
  node_paneldriver["MIPI Panel Driver"]
  node_levelcontrol["Level Control<br/>[archr-levels.c]"]
  node_gammacontrol["Gamma Control<br/>[archr-gamma.c]"]
end

subgraph group_services["Updates and Connectivity"]
  node_updater["System Updater"]
  node_pacmanrepos[("Signed Repositories")]
  node_networkplay["Network Play"]
  node_syncvpn["Sync and VPN"]
  node_flasher["Arch R Flasher"]
end

node_player(("Console User"))

node_player -->|"powers on"| node_bootchain
node_bootchain -->|"selects board"| node_boarddetect
node_boarddetect -->|"loads kernel"| node_linux
node_linux -->|"switches root"| node_systemd
node_systemd -->|"starts frontend"| node_frontend
node_player -->|"uses console"| node_frontend
node_frontend -->|"launches games"| node_retroarch
node_frontend -.->|"launches games"| node_standalone
node_retroarch -.->|"supports achievements"| node_achievements
node_player -.->|"views text"| node_textviewer
node_player -->|"generates overlay"| node_panelgen
node_flasher -->|"can generate"| node_panelgen
node_paneldriver -.->|"drives panel"| node_linux
node_player -.->|"adjusts levels"| node_levelcontrol
node_player -.->|"configures display"| node_gammacontrol
node_player -->|"requests update"| node_updater
node_updater -->|"fetches updates"| node_pacmanrepos
node_player -->|"plays over network"| node_networkplay
node_player -->|"uses connectivity"| node_syncvpn

click node_bootchain "https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR"
click node_boarddetect "https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR"
click node_linux "https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR"
click node_systemd "https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR"
click node_frontend "https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR"
click node_retroarch "https://github.com/archr-linux/arch-r/tree/main/packages/emulation"
click node_standalone "https://github.com/archr-linux/arch-r/blob/main/projects/ArchR/packages/emulators/standalone/drastic-arch/sources/libdrastouch.c"
click node_achievements "https://github.com/archr-linux/arch-r/tree/main/packages/emulation/rcheevos"
click node_textviewer "https://github.com/archr-linux/arch-r/blob/main/projects/ArchR/packages/apps/sdl2text/sdl2text.cpp"
click node_panelgen "https://github.com/archr-linux/arch-r/blob/main/projects/ArchR/packages/linux-drivers/generic-dsi/scripts/importpanel.py"
click node_paneldriver "https://github.com/archr-linux/arch-r/blob/main/projects/ArchR/packages/linux-drivers/generic-dsi/sources/panel-generic-dsi.c"
click node_levelcontrol "https://github.com/archr-linux/arch-r/blob/main/projects/ArchR/packages/sysutils/system-utils/sources/levels/archr-levels.c"
click node_gammacontrol "https://github.com/archr-linux/arch-r/blob/main/projects/ArchR/packages/wayland/util/archr-gamma/sources/archr-gamma.c"
click node_updater "https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR"
click node_networkplay "https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR"
click node_syncvpn "https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_bootchain,node_boarddetect,node_linux,node_systemd,node_player toneBlue
class node_frontend,node_retroarch,node_standalone,node_achievements,node_textviewer toneAmber
class node_panelgen,node_paneldriver,node_levelcontrol,node_gammacontrol toneMint
class node_updater,node_pacmanrepos,node_networkplay,node_syncvpn,node_flasher toneRose
```

## Components

### Boot and System

- [Boot Chain](https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR): `distributions/ArchR`
- [Board Detection](https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR): `distributions/ArchR`
- [Linux System](https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR): `distributions/ArchR`
- [System Services](https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR): `distributions/ArchR`

### Gaming Experience

- [EmulationStation](https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR): `distributions/ArchR`
- [RetroArch Cores](https://github.com/archr-linux/arch-r/tree/main/packages/emulation): `packages/emulation`
- [Standalone Emulators](https://github.com/archr-linux/arch-r/blob/main/projects/ArchR/packages/emulators/standalone/drastic-arch/sources/libdrastouch.c): `projects/ArchR/packages/emulators/standalone/drastic-arch/sources/libdrastouch.c`
- [RetroAchievements](https://github.com/archr-linux/arch-r/tree/main/packages/emulation/rcheevos): `packages/emulation/rcheevos`
- [Text Viewer](https://github.com/archr-linux/arch-r/blob/main/projects/ArchR/packages/apps/sdl2text/sdl2text.cpp): `projects/ArchR/packages/apps/sdl2text/sdl2text.cpp`

### Display and Controls

- [Panel Overlay Generator](https://github.com/archr-linux/arch-r/blob/main/projects/ArchR/packages/linux-drivers/generic-dsi/scripts/importpanel.py): `projects/ArchR/packages/linux-drivers/generic-dsi/scripts/importpanel.py`
- [MIPI Panel Driver](https://github.com/archr-linux/arch-r/blob/main/projects/ArchR/packages/linux-drivers/generic-dsi/sources/panel-generic-dsi.c): `projects/ArchR/packages/linux-drivers/generic-dsi/sources/panel-generic-dsi.c`
- [Level Control](https://github.com/archr-linux/arch-r/blob/main/projects/ArchR/packages/sysutils/system-utils/sources/levels/archr-levels.c): `projects/ArchR/packages/sysutils/system-utils/sources/levels/archr-levels.c`
- [Gamma Control](https://github.com/archr-linux/arch-r/blob/main/projects/ArchR/packages/wayland/util/archr-gamma/sources/archr-gamma.c): `projects/ArchR/packages/wayland/util/archr-gamma/sources/archr-gamma.c`

### Updates and Connectivity

- [System Updater](https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR): `distributions/ArchR`
- **Signed Repositories**
- [Network Play](https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR): `distributions/ArchR`
- [Sync and VPN](https://github.com/archr-linux/arch-r/tree/main/distributions/ArchR): `distributions/ArchR`
- **Arch R Flasher**

### Other components

- **Console User**

## Connections

- Console User → Boot Chain: powers on (evidence: `README.md`)
- Boot Chain → Board Detection: selects board (evidence: `README.md`)
- Board Detection → Linux System: loads kernel (evidence: `README.md`)
- Linux System → System Services: switches root (evidence: `README.md`)
- System Services → EmulationStation: starts frontend (evidence: `README.md`)
- Console User → EmulationStation: uses console (evidence: `README.md`)
- EmulationStation → RetroArch Cores: launches games (evidence: `README.md`)
- EmulationStation → Standalone Emulators: launches games
- RetroArch Cores → RetroAchievements: supports achievements
- Console User → Text Viewer: views text
- Console User → Panel Overlay Generator: generates overlay (evidence: `README.md`)
- Arch R Flasher → Panel Overlay Generator: can generate (evidence: `README.md`)
- MIPI Panel Driver → Linux System: drives panel
- Console User → Level Control: adjusts levels
- Console User → Gamma Control: configures display
- Console User → System Updater: requests update (evidence: `README.md`)
- System Updater → Signed Repositories: fetches updates (evidence: `README.md`)
- Console User → Network Play: plays over network (evidence: `README.md`)
- Console User → Sync and VPN: uses connectivity (evidence: `README.md`)
