# start9labs/openwrt architecture

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

- Interactive diagram: https://gitdiagram.com/start9labs/openwrt
- Repository: https://github.com/start9labs/openwrt

## Overview

OpenWrt is an embedded Linux operating system whose user-facing model is a writable, customizable device with installable packages. The broad user workflow is selecting or installing packages and configuring device capabilities, then using the resulting router services; the included tree also shows hardware drivers, firmware boot code, and maintenance utilities. The README documents the OS and package workflow, while source excerpts cover only selected modules, so most runtime links between these subsystems cannot be established here and are omitted.

Main entry points: [`package`](https://github.com/start9labs/openwrt/tree/master/package) (OpenWrt system), [`package/network/services/ead/src/ead-client.c`](https://github.com/start9labs/openwrt/blob/master/package/network/services/ead/src/ead-client.c) (Access client), [`package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c`](https://github.com/start9labs/openwrt/blob/master/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c) (Hardware AES), [`package/network/services/ead/src/ead.c`](https://github.com/start9labs/openwrt/blob/master/package/network/services/ead/src/ead.c) (Emergency access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_platform["Device platform"]
  node_openwrt["OpenWrt system"]
  node_opkg["Package manager"]
  node_kernel_drivers["Hardware drivers"]
end

subgraph group_network["Network services"]
  node_dsl_mei["DSL modem driver<br/>[drv_mei_cpe.c]"]
  node_dsl_control["DSL control<br/>[dsl_cpe_ubus.c]"]
  node_atm["ATM transport<br/>[ltq_atm.c]"]
  node_ptm["PTM transport<br/>[ifxmips_ptm_adsl.c]"]
  node_switch_config["Switch control<br/>[cli.c]"]
  node_hostapd["Wi-Fi access service<br/>[ubus.c]"]
end

subgraph group_security["Security"]
  node_ead_service["Emergency access<br/>[ead.c]"]
  node_ead_client["Access client<br/>[ead-client.c]"]
  node_srp_client["SRP authentication<br/>[t_client.c]"]
  node_deu_aes["Hardware AES<br/>[ifxmips_aes.c]"]
  node_deu_defs["Crypto hardware definitions<br/>[ifxmips_deu.h]"]
end

subgraph group_maintenance["Boot and maintenance"]
  node_mtd_tool["Flash maintenance<br/>[mtd.c]"]
  node_routerboot["RouterBoot flash support<br/>[routerboot.c]"]
  node_at91_boot["AT91 bootloader<br/>[main.c]"]
  node_realtek_loader["Realtek image loader<br/>[main.c]"]
end

node_user(("Device user"))

node_user -->|"uses"| node_openwrt
node_openwrt -->|"installs packages"| node_opkg
node_deu_aes -->|"uses definitions"| node_deu_defs
node_ead_client -.-> node_ead_service

click node_openwrt "https://github.com/start9labs/openwrt/tree/master/package"
click node_opkg "https://github.com/start9labs/openwrt/tree/master/package"
click node_kernel_drivers "https://github.com/start9labs/openwrt/tree/master/package/kernel"
click node_dsl_mei "https://github.com/start9labs/openwrt/blob/master/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c"
click node_dsl_control "https://github.com/start9labs/openwrt/blob/master/package/network/config/ltq-vdsl-vr9-app/src/src/dsl_cpe_ubus.c"
click node_atm "https://github.com/start9labs/openwrt/blob/master/package/kernel/lantiq/ltq-atm/src/ltq_atm.c"
click node_ptm "https://github.com/start9labs/openwrt/blob/master/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c"
click node_switch_config "https://github.com/start9labs/openwrt/blob/master/package/network/config/swconfig/src/cli.c"
click node_hostapd "https://github.com/start9labs/openwrt/blob/master/package/network/services/hostapd/src/src/ap/ubus.c"
click node_ead_service "https://github.com/start9labs/openwrt/blob/master/package/network/services/ead/src/ead.c"
click node_ead_client "https://github.com/start9labs/openwrt/blob/master/package/network/services/ead/src/ead-client.c"
click node_srp_client "https://github.com/start9labs/openwrt/blob/master/package/network/services/ead/src/tinysrp/t_client.c"
click node_deu_aes "https://github.com/start9labs/openwrt/blob/master/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c"
click node_deu_defs "https://github.com/start9labs/openwrt/blob/master/package/kernel/lantiq/ltq-deu/src/ifxmips_deu.h"
click node_mtd_tool "https://github.com/start9labs/openwrt/blob/master/package/system/mtd/src/mtd.c"
click node_routerboot "https://github.com/start9labs/openwrt/blob/master/target/linux/generic/files/drivers/platform/mikrotik/routerboot.c"
click node_at91_boot "https://github.com/start9labs/openwrt/blob/master/target/linux/at91/image/dfboot/src/main.c"
click node_realtek_loader "https://github.com/start9labs/openwrt/blob/master/target/linux/realtek/image/rt-loader/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_openwrt,node_opkg,node_kernel_drivers,node_user toneBlue
class node_dsl_mei,node_dsl_control,node_atm,node_ptm,node_switch_config,node_hostapd toneAmber
class node_ead_service,node_ead_client,node_srp_client,node_deu_aes,node_deu_defs toneMint
class node_mtd_tool,node_routerboot,node_at91_boot,node_realtek_loader toneRose
```

## Components

### Device platform

- [OpenWrt system](https://github.com/start9labs/openwrt/tree/master/package): `package`
- [Package manager](https://github.com/start9labs/openwrt/tree/master/package): `package`
- [Hardware drivers](https://github.com/start9labs/openwrt/tree/master/package/kernel): `package/kernel`

### Network services

- [DSL modem driver](https://github.com/start9labs/openwrt/blob/master/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c): `package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c`
- [DSL control](https://github.com/start9labs/openwrt/blob/master/package/network/config/ltq-vdsl-vr9-app/src/src/dsl_cpe_ubus.c): `package/network/config/ltq-vdsl-vr9-app/src/src/dsl_cpe_ubus.c`
- [ATM transport](https://github.com/start9labs/openwrt/blob/master/package/kernel/lantiq/ltq-atm/src/ltq_atm.c): `package/kernel/lantiq/ltq-atm/src/ltq_atm.c`
- [PTM transport](https://github.com/start9labs/openwrt/blob/master/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c): `package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c`
- [Switch control](https://github.com/start9labs/openwrt/blob/master/package/network/config/swconfig/src/cli.c): `package/network/config/swconfig/src/cli.c`
- [Wi-Fi access service](https://github.com/start9labs/openwrt/blob/master/package/network/services/hostapd/src/src/ap/ubus.c): `package/network/services/hostapd/src/src/ap/ubus.c`

### Security

- [Emergency access](https://github.com/start9labs/openwrt/blob/master/package/network/services/ead/src/ead.c): `package/network/services/ead/src/ead.c`
- [Access client](https://github.com/start9labs/openwrt/blob/master/package/network/services/ead/src/ead-client.c): `package/network/services/ead/src/ead-client.c`
- [SRP authentication](https://github.com/start9labs/openwrt/blob/master/package/network/services/ead/src/tinysrp/t_client.c): `package/network/services/ead/src/tinysrp/t_client.c`
- [Hardware AES](https://github.com/start9labs/openwrt/blob/master/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c): `package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c`
- [Crypto hardware definitions](https://github.com/start9labs/openwrt/blob/master/package/kernel/lantiq/ltq-deu/src/ifxmips_deu.h): `package/kernel/lantiq/ltq-deu/src/ifxmips_deu.h`

### Boot and maintenance

- [Flash maintenance](https://github.com/start9labs/openwrt/blob/master/package/system/mtd/src/mtd.c): `package/system/mtd/src/mtd.c`
- [RouterBoot flash support](https://github.com/start9labs/openwrt/blob/master/target/linux/generic/files/drivers/platform/mikrotik/routerboot.c): `target/linux/generic/files/drivers/platform/mikrotik/routerboot.c`
- [AT91 bootloader](https://github.com/start9labs/openwrt/blob/master/target/linux/at91/image/dfboot/src/main.c): `target/linux/at91/image/dfboot/src/main.c`
- [Realtek image loader](https://github.com/start9labs/openwrt/blob/master/target/linux/realtek/image/rt-loader/src/main.c): `target/linux/realtek/image/rt-loader/src/main.c`

### Other components

- **Device user**

## Connections

- Device user → OpenWrt system: uses
- OpenWrt system → Package manager: installs packages
- Hardware AES → Crypto hardware definitions: uses definitions (evidence: `package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c`)
- Access client → Emergency access
