# coolsnowwolf/lede architecture

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

- Interactive diagram: https://gitdiagram.com/coolsnowwolf/lede
- Repository: https://github.com/coolsnowwolf/lede

## Overview

This is a Lean LEDE/OpenWrt source repository for building router and edge-gateway firmware, with support for varied hardware and network features. One visible runtime path is the Fibocom dialer: it manages a cellular connection and requests address configuration; the tree also contains wireless utilities, boot loaders, and hardware drivers. README claims describe the product broadly, while sampled source is sparse and spans unrelated packages. Edges are limited to relationships directly visible in excerpts; unsampled subsystems are represented without guessed wiring.

Main entry points: [`package/wwan/app/fibocom-dial/src/main.c`](https://github.com/coolsnowwolf/lede/blob/master/package/wwan/app/fibocom-dial/src/main.c) (Fibocom dialer), [`target/linux/at91/image/dfboot/src/main.c`](https://github.com/coolsnowwolf/lede/blob/master/target/linux/at91/image/dfboot/src/main.c) (AT91 DataFlash boot), [`package/network/services/ead/src/tinysrp/t_client.c`](https://github.com/coolsnowwolf/lede/blob/master/package/network/services/ead/src/tinysrp/t_client.c) (SRP client library), [`package/network/services/ead/src/ead-client.c`](https://github.com/coolsnowwolf/lede/blob/master/package/network/services/ead/src/ead-client.c) (Emergency access client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cellular["Cellular connectivity"]
  node_fibodial["Fibocom dialer<br/>[main.c]"]
  node_pdnmanager["Multi-PDN manager"]
  node_pciequery["PCIe mode query<br/>[query_pcie_mode.c]"]
  node_dhcp["DHCP client<br/>[dhcpclient.c]"]
end

subgraph group_wireless["Wireless networking"]
  node_apcli["Wireless AP client<br/>[main.c]"]
  node_routing7603["MT7603 routing<br/>[routing_tab.c]"]
  node_routing7612["MT7612 routing<br/>[routing_tab.c]"]
  node_routing7615["MT7615 routing<br/>[routing_tab.c]"]
  node_iapp["MTK IAPP<br/>[rt_config.h]"]
  node_ead["Emergency access client<br/>[ead-client.c]"]
  node_eadpassword["Password hashing<br/>[pw_encrypt_md5.c]"]
  node_srp["SRP client library<br/>[t_client.c]"]
  node_srppwd["SRP password definitions<br/>[t_pwd.h]"]
  node_srpsha["SRP SHA interface<br/>[t_sha.h]"]
end

subgraph group_platform["Platform and boot"]
  node_ox820["OX820 board support<br/>[ox820.c]"]
  node_sata["SATA storage driver<br/>[plxsata_ide.c]"]
  node_dfboot["AT91 DataFlash boot<br/>[main.c]"]
  node_dfconfig["AT91 boot config<br/>[config.h]"]
  node_at91mci["AT91 MCI definitions<br/>[AT91C_MCI_Device.h]"]
  node_at91hw["AT91 hardware definitions<br/>[AT91RM9200.h]"]
  node_at91lib["AT91 support definitions<br/>[lib_AT91RM9200.h]"]
  node_rtloader["Realtek image loader<br/>[main.c]"]
  node_nanoprintf["Loader formatting<br/>[nanoprintf.h]"]
end

subgraph group_graphics["Display and GPU"]
  node_phyenum["GPU HAL enums<br/>[gc_hal_enum.h]"]
  node_phyoptions["GPU HAL options<br/>[gc_hal_options.h]"]
  node_physharedenum["Shared GPU enums"]
  node_physharedtypes["Shared GPU types"]
  node_phypixel["Pixel engine registers<br/>[AQPixelEngineReg.h]"]
  node_phyfeatures["GPU feature database"]
  node_phyengine["GPU engine interface<br/>[gc_hal_engine.h]"]
  node_qcomdsi["Qualcomm DSI manager<br/>[dsi_manager.c]"]
  node_qcomdrv["MSM DRM driver interface<br/>[msm_drv.h]"]
end

node_operator(("Device operator"))
node_modem["Cellular modem"]

node_operator -->|"starts connection"| node_fibodial
node_fibodial -->|"queries modem"| node_modem
node_fibodial -.->|"starts DHCP"| node_dhcp
node_fibodial -->|"uses mode query"| node_pciequery
node_fibodial -.->|"coordinates profiles"| node_pdnmanager
node_dfboot -->|"includes config"| node_dfconfig
node_dfboot -->|"includes definitions"| node_at91mci
node_dfboot -->|"includes hardware"| node_at91hw
node_dfboot -->|"includes support"| node_at91lib
node_rtloader -->|"includes formatter"| node_nanoprintf
node_ead -->|"imports helper"| node_eadpassword
node_srp -->|"imports definitions"| node_srppwd
node_srp -->|"imports interface"| node_srpsha
node_phyengine -->|"imports types"| node_phyenum
node_qcomdsi -->|"includes driver interface"| node_qcomdrv

click node_fibodial "https://github.com/coolsnowwolf/lede/blob/master/package/wwan/app/fibocom-dial/src/main.c"
click node_pdnmanager "https://github.com/coolsnowwolf/lede/blob/master/package/wwan/app/fibocom-dial/src/multi-pdn-manager.c"
click node_pciequery "https://github.com/coolsnowwolf/lede/blob/master/package/wwan/app/fibocom-dial/src/query_pcie_mode.c"
click node_dhcp "https://github.com/coolsnowwolf/lede/blob/master/package/wwan/app/fibocom-dial/src/libmnl/dhcp/dhcpclient.c"
click node_apcli "https://github.com/coolsnowwolf/lede/blob/master/package/lean/mt/mtk_apcli/src/main.c"
click node_routing7603 "https://github.com/coolsnowwolf/lede/blob/master/package/lean/mt/drivers/mt7603e/src/mt7603_wifi/common/routing_tab.c"
click node_routing7612 "https://github.com/coolsnowwolf/lede/blob/master/package/lean/mt/drivers/mt7612e/src/mt76x2/common/routing_tab.c"
click node_routing7615 "https://github.com/coolsnowwolf/lede/blob/master/package/lean/mt/drivers/mt7615d/src/mt_wifi/embedded/common/routing_tab.c"
click node_iapp "https://github.com/coolsnowwolf/lede/blob/master/package/lean/mt/mtkiappd/src/rt_config.h"
click node_ox820 "https://github.com/coolsnowwolf/lede/blob/master/package/boot/uboot-oxnas/src/board/ox820/ox820.c"
click node_sata "https://github.com/coolsnowwolf/lede/blob/master/package/boot/uboot-oxnas/src/drivers/block/plxsata_ide.c"
click node_dfboot "https://github.com/coolsnowwolf/lede/blob/master/target/linux/at91/image/dfboot/src/main.c"
click node_dfconfig "https://github.com/coolsnowwolf/lede/blob/master/target/linux/at91/image/dfboot/src/config.h"
click node_at91mci "https://github.com/coolsnowwolf/lede/blob/master/target/linux/at91/image/dfboot/src/include/AT91C_MCI_Device.h"
click node_at91hw "https://github.com/coolsnowwolf/lede/blob/master/target/linux/at91/image/dfboot/src/include/AT91RM9200.h"
click node_at91lib "https://github.com/coolsnowwolf/lede/blob/master/target/linux/at91/image/dfboot/src/include/lib_AT91RM9200.h"
click node_rtloader "https://github.com/coolsnowwolf/lede/blob/master/target/linux/realtek/image/rt-loader/src/main.c"
click node_nanoprintf "https://github.com/coolsnowwolf/lede/blob/master/target/linux/realtek/image/rt-loader/include/nanoprintf.h"
click node_ead "https://github.com/coolsnowwolf/lede/blob/master/package/network/services/ead/src/ead-client.c"
click node_eadpassword "https://github.com/coolsnowwolf/lede/blob/master/package/network/services/ead/src/pw_encrypt_md5.c"
click node_srp "https://github.com/coolsnowwolf/lede/blob/master/package/network/services/ead/src/tinysrp/t_client.c"
click node_srppwd "https://github.com/coolsnowwolf/lede/blob/master/package/network/services/ead/src/tinysrp/t_pwd.h"
click node_srpsha "https://github.com/coolsnowwolf/lede/blob/master/package/network/services/ead/src/tinysrp/t_sha.h"
click node_phyenum "https://github.com/coolsnowwolf/lede/blob/master/package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/gc_hal_enum.h"
click node_phyoptions "https://github.com/coolsnowwolf/lede/blob/master/package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/gc_hal_options.h"
click node_physharedenum "https://github.com/coolsnowwolf/lede/blob/master/package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/shared/gc_hal_enum_shared.h"
click node_physharedtypes "https://github.com/coolsnowwolf/lede/blob/master/package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/shared/gc_hal_types_shared.h"
click node_phypixel "https://github.com/coolsnowwolf/lede/blob/master/package/kernel/phytium-d3000m/src/gpu_driver/arch/XAQ2/cmodel/inc/AQPixelEngineReg.h"
click node_phyfeatures "https://github.com/coolsnowwolf/lede/blob/master/package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/gc_feature_database.h"
click node_phyengine "https://github.com/coolsnowwolf/lede/blob/master/package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/gc_hal_engine.h"
click node_qcomdsi "https://github.com/coolsnowwolf/lede/blob/master/package/kernel/qcom-msm-vendor-drivers/src/drivers/gpu/drm/msm/dsi/dsi_manager.c"
click node_qcomdrv "https://github.com/coolsnowwolf/lede/blob/master/package/kernel/qcom-msm-vendor-drivers/src/drivers/gpu/drm/msm/msm_drv.h"

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_fibodial,node_pdnmanager,node_pciequery,node_dhcp toneBlue
class node_apcli,node_routing7603,node_routing7612,node_routing7615,node_iapp,node_ead,node_eadpassword,node_srp,node_srppwd,node_srpsha toneAmber
class node_ox820,node_sata,node_dfboot,node_dfconfig,node_at91mci,node_at91hw,node_at91lib,node_rtloader,node_nanoprintf toneMint
class node_phyenum,node_phyoptions,node_physharedenum,node_physharedtypes,node_phypixel,node_phyfeatures,node_phyengine,node_qcomdsi,node_qcomdrv toneRose
class node_operator,node_modem toneIndigo
```

## Components

### Cellular connectivity

- [Fibocom dialer](https://github.com/coolsnowwolf/lede/blob/master/package/wwan/app/fibocom-dial/src/main.c): `package/wwan/app/fibocom-dial/src/main.c`
- [Multi-PDN manager](https://github.com/coolsnowwolf/lede/blob/master/package/wwan/app/fibocom-dial/src/multi-pdn-manager.c): `package/wwan/app/fibocom-dial/src/multi-pdn-manager.c`
- [PCIe mode query](https://github.com/coolsnowwolf/lede/blob/master/package/wwan/app/fibocom-dial/src/query_pcie_mode.c): `package/wwan/app/fibocom-dial/src/query_pcie_mode.c`
- [DHCP client](https://github.com/coolsnowwolf/lede/blob/master/package/wwan/app/fibocom-dial/src/libmnl/dhcp/dhcpclient.c): `package/wwan/app/fibocom-dial/src/libmnl/dhcp/dhcpclient.c`

### Wireless networking

- [Wireless AP client](https://github.com/coolsnowwolf/lede/blob/master/package/lean/mt/mtk_apcli/src/main.c): `package/lean/mt/mtk_apcli/src/main.c`
- [MT7603 routing](https://github.com/coolsnowwolf/lede/blob/master/package/lean/mt/drivers/mt7603e/src/mt7603_wifi/common/routing_tab.c): `package/lean/mt/drivers/mt7603e/src/mt7603_wifi/common/routing_tab.c`
- [MT7612 routing](https://github.com/coolsnowwolf/lede/blob/master/package/lean/mt/drivers/mt7612e/src/mt76x2/common/routing_tab.c): `package/lean/mt/drivers/mt7612e/src/mt76x2/common/routing_tab.c`
- [MT7615 routing](https://github.com/coolsnowwolf/lede/blob/master/package/lean/mt/drivers/mt7615d/src/mt_wifi/embedded/common/routing_tab.c): `package/lean/mt/drivers/mt7615d/src/mt_wifi/embedded/common/routing_tab.c`
- [MTK IAPP](https://github.com/coolsnowwolf/lede/blob/master/package/lean/mt/mtkiappd/src/rt_config.h): `package/lean/mt/mtkiappd/src/rt_config.h`
- [Emergency access client](https://github.com/coolsnowwolf/lede/blob/master/package/network/services/ead/src/ead-client.c): `package/network/services/ead/src/ead-client.c`
- [Password hashing](https://github.com/coolsnowwolf/lede/blob/master/package/network/services/ead/src/pw_encrypt_md5.c): `package/network/services/ead/src/pw_encrypt_md5.c`
- [SRP client library](https://github.com/coolsnowwolf/lede/blob/master/package/network/services/ead/src/tinysrp/t_client.c): `package/network/services/ead/src/tinysrp/t_client.c`
- [SRP password definitions](https://github.com/coolsnowwolf/lede/blob/master/package/network/services/ead/src/tinysrp/t_pwd.h): `package/network/services/ead/src/tinysrp/t_pwd.h`
- [SRP SHA interface](https://github.com/coolsnowwolf/lede/blob/master/package/network/services/ead/src/tinysrp/t_sha.h): `package/network/services/ead/src/tinysrp/t_sha.h`

### Platform and boot

- [OX820 board support](https://github.com/coolsnowwolf/lede/blob/master/package/boot/uboot-oxnas/src/board/ox820/ox820.c): `package/boot/uboot-oxnas/src/board/ox820/ox820.c`
- [SATA storage driver](https://github.com/coolsnowwolf/lede/blob/master/package/boot/uboot-oxnas/src/drivers/block/plxsata_ide.c): `package/boot/uboot-oxnas/src/drivers/block/plxsata_ide.c`
- [AT91 DataFlash boot](https://github.com/coolsnowwolf/lede/blob/master/target/linux/at91/image/dfboot/src/main.c): `target/linux/at91/image/dfboot/src/main.c`
- [AT91 boot config](https://github.com/coolsnowwolf/lede/blob/master/target/linux/at91/image/dfboot/src/config.h): `target/linux/at91/image/dfboot/src/config.h`
- [AT91 MCI definitions](https://github.com/coolsnowwolf/lede/blob/master/target/linux/at91/image/dfboot/src/include/AT91C_MCI_Device.h): `target/linux/at91/image/dfboot/src/include/AT91C_MCI_Device.h`
- [AT91 hardware definitions](https://github.com/coolsnowwolf/lede/blob/master/target/linux/at91/image/dfboot/src/include/AT91RM9200.h): `target/linux/at91/image/dfboot/src/include/AT91RM9200.h`
- [AT91 support definitions](https://github.com/coolsnowwolf/lede/blob/master/target/linux/at91/image/dfboot/src/include/lib_AT91RM9200.h): `target/linux/at91/image/dfboot/src/include/lib_AT91RM9200.h`
- [Realtek image loader](https://github.com/coolsnowwolf/lede/blob/master/target/linux/realtek/image/rt-loader/src/main.c): `target/linux/realtek/image/rt-loader/src/main.c`
- [Loader formatting](https://github.com/coolsnowwolf/lede/blob/master/target/linux/realtek/image/rt-loader/include/nanoprintf.h): `target/linux/realtek/image/rt-loader/include/nanoprintf.h`

### Display and GPU

- [GPU HAL enums](https://github.com/coolsnowwolf/lede/blob/master/package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/gc_hal_enum.h): `package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/gc_hal_enum.h`
- [GPU HAL options](https://github.com/coolsnowwolf/lede/blob/master/package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/gc_hal_options.h): `package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/gc_hal_options.h`
- [Shared GPU enums](https://github.com/coolsnowwolf/lede/blob/master/package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/shared/gc_hal_enum_shared.h): `package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/shared/gc_hal_enum_shared.h`
- [Shared GPU types](https://github.com/coolsnowwolf/lede/blob/master/package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/shared/gc_hal_types_shared.h): `package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/shared/gc_hal_types_shared.h`
- [Pixel engine registers](https://github.com/coolsnowwolf/lede/blob/master/package/kernel/phytium-d3000m/src/gpu_driver/arch/XAQ2/cmodel/inc/AQPixelEngineReg.h): `package/kernel/phytium-d3000m/src/gpu_driver/arch/XAQ2/cmodel/inc/AQPixelEngineReg.h`
- [GPU feature database](https://github.com/coolsnowwolf/lede/blob/master/package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/gc_feature_database.h): `package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/gc_feature_database.h`
- [GPU engine interface](https://github.com/coolsnowwolf/lede/blob/master/package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/gc_hal_engine.h): `package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/gc_hal_engine.h`
- [Qualcomm DSI manager](https://github.com/coolsnowwolf/lede/blob/master/package/kernel/qcom-msm-vendor-drivers/src/drivers/gpu/drm/msm/dsi/dsi_manager.c): `package/kernel/qcom-msm-vendor-drivers/src/drivers/gpu/drm/msm/dsi/dsi_manager.c`
- [MSM DRM driver interface](https://github.com/coolsnowwolf/lede/blob/master/package/kernel/qcom-msm-vendor-drivers/src/drivers/gpu/drm/msm/msm_drv.h): `package/kernel/qcom-msm-vendor-drivers/src/drivers/gpu/drm/msm/msm_drv.h`

### Other components

- **Device operator**
- **Cellular modem**

## Connections

- Device operator → Fibocom dialer: starts connection (evidence: `package/wwan/app/fibocom-dial/src/main.c`)
- Fibocom dialer → Cellular modem: queries modem (evidence: `package/wwan/app/fibocom-dial/src/main.c`)
- Fibocom dialer → DHCP client: starts DHCP
- Fibocom dialer → PCIe mode query: uses mode query (evidence: `package/wwan/app/fibocom-dial/src/main.c`)
- Fibocom dialer → Multi-PDN manager: coordinates profiles
- AT91 DataFlash boot → AT91 boot config: includes config (evidence: `target/linux/at91/image/dfboot/src/main.c`)
- AT91 DataFlash boot → AT91 MCI definitions: includes definitions (evidence: `target/linux/at91/image/dfboot/src/main.c`)
- AT91 DataFlash boot → AT91 hardware definitions: includes hardware (evidence: `target/linux/at91/image/dfboot/src/main.c`)
- AT91 DataFlash boot → AT91 support definitions: includes support (evidence: `target/linux/at91/image/dfboot/src/main.c`)
- Realtek image loader → Loader formatting: includes formatter (evidence: `target/linux/realtek/image/rt-loader/src/main.c`)
- Emergency access client → Password hashing: imports helper (evidence: `package/network/services/ead/src/ead-client.c`)
- SRP client library → SRP password definitions: imports definitions (evidence: `package/network/services/ead/src/tinysrp/t_client.c`)
- SRP client library → SRP SHA interface: imports interface (evidence: `package/network/services/ead/src/tinysrp/t_client.c`)
- GPU engine interface → GPU HAL enums: imports types (evidence: `package/kernel/phytium-d3000m/src/gpu_driver/hal/inc/gc_hal_engine.h`)
- Qualcomm DSI manager → MSM DRM driver interface: includes driver interface (evidence: `package/kernel/qcom-msm-vendor-drivers/src/drivers/gpu/drm/msm/dsi/dsi_manager.c`)
