# open-sdr/openwrt-openwifi architecture

> Architecture diagram of the GitHub repository open-sdr/openwrt-openwifi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/open-sdr/openwrt-openwifi
- Repository: https://github.com/open-sdr/openwrt-openwifi

## Overview

OpenWrt is an embedded Linux operating system for customizable devices, commonly used as a home router. The user-facing outcome is a configured, running device: administrators select and configure software, while runtime networking services and device drivers provide connectivity and hardware support; flash and boot components support device storage and recovery. The supplied tree is a broad, selective repository listing, not a complete runtime map. The edges below are limited to documented product capabilities and wiring visible in sampled source, notably the EAD client/SRP and RouterBoot/MTD paths.

Main entry points: [`package/network/services/ead/src/ead-client.c`](https://github.com/open-sdr/openwrt-openwifi/blob/main/package/network/services/ead/src/ead-client.c) (Emergency access client), [`package/system/mtd/src/mtd.c`](https://github.com/open-sdr/openwrt-openwifi/blob/main/package/system/mtd/src/mtd.c) (Flash utilities), [`target/linux/generic/files/drivers/mtd/parsers/routerbootpart.c`](https://github.com/open-sdr/openwrt-openwifi/blob/main/target/linux/generic/files/drivers/mtd/parsers/routerbootpart.c) (RouterBoot partition parser), [`target/linux/generic/files/drivers/platform/mikrotik/routerboot.c`](https://github.com/open-sdr/openwrt-openwifi/blob/main/target/linux/generic/files/drivers/platform/mikrotik/routerboot.c) (RouterBoot support)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_net["Networking"]
  node_hostapd["Wi-Fi services"]
  node_eadclient["Emergency access client<br/>[ead-client.c]"]
  node_srp["SRP authentication<br/>[t_client.c]"]
  node_swconfig["Switch configuration<br/>[cli.c]"]
  node_ipv6["IPv6 transition tools"]
end

subgraph group_device["Device support"]
  node_dsl["DSL networking<br/>[drv_mei_cpe.c]"]
  node_atm["ATM driver<br/>[ltq_atm.c]"]
  node_ptm["PTM driver<br/>[ifxmips_ptm_adsl.c]"]
  node_device_drivers["Kernel device drivers"]
end

subgraph group_storage["Flash and boot"]
  node_mtd["Flash utilities<br/>[mtd.c]"]
  node_routerboot_parser["RouterBoot partition parser<br/>[routerbootpart.c]"]
  node_routerboot["RouterBoot support<br/>[routerboot.c]"]
  node_nvram["NVRAM utility<br/>[nvram.c]"]
  node_recovery["Boot recovery<br/>[main.c]"]
end

subgraph group_system["System services"]
  node_openwrt["OpenWrt device"]
  node_opkg["opkg package manager"]
end

node_admin(("Administrator"))
node_network(("Network peers"))
node_flash[("Device flash")]
node_running_device(("Configured device"))

node_admin -->|"configures"| node_openwrt
node_admin -->|"selects software"| node_opkg
node_opkg -->|"installs packages"| node_openwrt
node_openwrt -->|"runs"| node_hostapd
node_openwrt -->|"runs"| node_eadclient
node_eadclient -->|"exchanges packets"| node_network
node_eadclient -->|"uses authentication"| node_srp
node_openwrt -->|"runs"| node_swconfig
node_openwrt -->|"runs"| node_ipv6
node_openwrt -->|"uses"| node_dsl
node_openwrt -->|"uses"| node_atm
node_openwrt -->|"uses"| node_ptm
node_openwrt -->|"uses"| node_device_drivers
node_mtd -->|"reads and writes"| node_flash
node_routerboot_parser -->|"reads partitions"| node_flash
node_routerboot -->|"reads RouterBoot data"| node_flash
node_openwrt -->|"runs"| node_nvram
node_recovery -->|"loads boot image"| node_flash
node_openwrt -->|"provides runtime"| node_running_device

click node_hostapd "https://github.com/open-sdr/openwrt-openwifi/tree/main/package/network/services/hostapd/src"
click node_eadclient "https://github.com/open-sdr/openwrt-openwifi/blob/main/package/network/services/ead/src/ead-client.c"
click node_srp "https://github.com/open-sdr/openwrt-openwifi/blob/main/package/network/services/ead/src/tinysrp/t_client.c"
click node_swconfig "https://github.com/open-sdr/openwrt-openwifi/blob/main/package/network/config/swconfig/src/cli.c"
click node_ipv6 "https://github.com/open-sdr/openwrt-openwifi/tree/main/package/network/ipv6"
click node_dsl "https://github.com/open-sdr/openwrt-openwifi/blob/main/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c"
click node_atm "https://github.com/open-sdr/openwrt-openwifi/blob/main/package/kernel/lantiq/ltq-atm/src/ltq_atm.c"
click node_ptm "https://github.com/open-sdr/openwrt-openwifi/blob/main/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c"
click node_device_drivers "https://github.com/open-sdr/openwrt-openwifi/tree/main/package/kernel"
click node_mtd "https://github.com/open-sdr/openwrt-openwifi/blob/main/package/system/mtd/src/mtd.c"
click node_routerboot_parser "https://github.com/open-sdr/openwrt-openwifi/blob/main/target/linux/generic/files/drivers/mtd/parsers/routerbootpart.c"
click node_routerboot "https://github.com/open-sdr/openwrt-openwifi/blob/main/target/linux/generic/files/drivers/platform/mikrotik/routerboot.c"
click node_nvram "https://github.com/open-sdr/openwrt-openwifi/blob/main/package/utils/nvram/src/nvram.c"
click node_recovery "https://github.com/open-sdr/openwrt-openwifi/blob/main/target/linux/at91/image/dfboot/src/main.c"

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_hostapd,node_eadclient,node_srp,node_swconfig,node_ipv6 toneBlue
class node_dsl,node_atm,node_ptm,node_device_drivers,node_flash toneAmber
class node_mtd,node_routerboot_parser,node_routerboot,node_nvram,node_recovery toneMint
class node_openwrt,node_opkg toneRose
class node_admin,node_network,node_running_device toneIndigo
```

## Components

### Networking

- [Wi-Fi services](https://github.com/open-sdr/openwrt-openwifi/tree/main/package/network/services/hostapd/src): `package/network/services/hostapd/src`
- [Emergency access client](https://github.com/open-sdr/openwrt-openwifi/blob/main/package/network/services/ead/src/ead-client.c): `package/network/services/ead/src/ead-client.c`
- [SRP authentication](https://github.com/open-sdr/openwrt-openwifi/blob/main/package/network/services/ead/src/tinysrp/t_client.c): `package/network/services/ead/src/tinysrp/t_client.c`
- [Switch configuration](https://github.com/open-sdr/openwrt-openwifi/blob/main/package/network/config/swconfig/src/cli.c): `package/network/config/swconfig/src/cli.c`
- [IPv6 transition tools](https://github.com/open-sdr/openwrt-openwifi/tree/main/package/network/ipv6): `package/network/ipv6`

### Device support

- [DSL networking](https://github.com/open-sdr/openwrt-openwifi/blob/main/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c): `package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c`
- [ATM driver](https://github.com/open-sdr/openwrt-openwifi/blob/main/package/kernel/lantiq/ltq-atm/src/ltq_atm.c): `package/kernel/lantiq/ltq-atm/src/ltq_atm.c`
- [PTM driver](https://github.com/open-sdr/openwrt-openwifi/blob/main/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c): `package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c`
- [Kernel device drivers](https://github.com/open-sdr/openwrt-openwifi/tree/main/package/kernel): `package/kernel`

### Flash and boot

- [Flash utilities](https://github.com/open-sdr/openwrt-openwifi/blob/main/package/system/mtd/src/mtd.c): `package/system/mtd/src/mtd.c`
- [RouterBoot partition parser](https://github.com/open-sdr/openwrt-openwifi/blob/main/target/linux/generic/files/drivers/mtd/parsers/routerbootpart.c): `target/linux/generic/files/drivers/mtd/parsers/routerbootpart.c`
- [RouterBoot support](https://github.com/open-sdr/openwrt-openwifi/blob/main/target/linux/generic/files/drivers/platform/mikrotik/routerboot.c): `target/linux/generic/files/drivers/platform/mikrotik/routerboot.c`
- [NVRAM utility](https://github.com/open-sdr/openwrt-openwifi/blob/main/package/utils/nvram/src/nvram.c): `package/utils/nvram/src/nvram.c`
- [Boot recovery](https://github.com/open-sdr/openwrt-openwifi/blob/main/target/linux/at91/image/dfboot/src/main.c): `target/linux/at91/image/dfboot/src/main.c`

### System services

- **OpenWrt device**
- **opkg package manager**

### Other components

- **Administrator**
- **Network peers**
- **Device flash**
- **Configured device**

## Connections

- Administrator → OpenWrt device: configures
- Administrator → opkg package manager: selects software
- opkg package manager → OpenWrt device: installs packages
- OpenWrt device → Wi-Fi services: runs
- OpenWrt device → Emergency access client: runs
- Emergency access client → Network peers: exchanges packets
- Emergency access client → SRP authentication: uses authentication
- OpenWrt device → Switch configuration: runs
- OpenWrt device → IPv6 transition tools: runs
- OpenWrt device → DSL networking: uses
- OpenWrt device → ATM driver: uses
- OpenWrt device → PTM driver: uses
- OpenWrt device → Kernel device drivers: uses
- Flash utilities → Device flash: reads and writes
- RouterBoot partition parser → Device flash: reads partitions
- RouterBoot support → Device flash: reads RouterBoot data
- OpenWrt device → NVRAM utility: runs
- Boot recovery → Device flash: loads boot image
- OpenWrt device → Configured device: provides runtime
