# dbast/qnap-ts-433-bootloader-builder architecture

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

- Interactive diagram: https://gitdiagram.com/dbast/qnap-ts-433-bootloader-builder
- Repository: https://github.com/dbast/qnap-ts-433-bootloader-builder

## Overview

This repository builds reproducible, model-specific U-Boot firmware for QNAP TS-233 and TS-433 devices. The documented workflow combines pinned U-Boot, Trusted Firmware-A, and Rockchip firmware inputs in a Docker-based environment, then produces two U-Boot images and a shared SPL loader. The graph also preserves the documented artifact-verification and SBOM capabilities. The README documents the workflow, but the Makefile and build configuration were not sampled, so internal build-stage wiring is shown only where documented.

Main entry points: [`Makefile`](https://github.com/dbast/qnap-ts-433-bootloader-builder/blob/main/Makefile) (Build orchestration), [`sbom.py`](https://github.com/dbast/qnap-ts-433-bootloader-builder/blob/main/sbom.py) (SBOM generator), [`u-boot`](https://github.com/dbast/qnap-ts-433-bootloader-builder/tree/main/u-boot) (U-Boot), [`trusted-firmware-a`](https://github.com/dbast/qnap-ts-433-bootloader-builder/tree/main/trusted-firmware-a) (Trusted Firmware-A)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_build["Build workflow"]
  node_orchestration["Build orchestration"]
  node_environment["Docker environment"]
  node_normalizer["Loader normalizer"]
end

subgraph group_inputs["Firmware inputs"]
  node_uboot["U-Boot"]
  node_tfa["Trusted Firmware-A"]
  node_rkbin["Rockchip firmware"]
  node_patches["Build patches"]
end

subgraph group_outputs["Firmware artifacts"]
  node_ts233["TS-233 image"]
  node_ts433["TS-433 image"]
  node_spl["Shared SPL loader"]
end

subgraph group_verification["Artifact verification"]
  node_sbom_generator["SBOM generator<br/>[sbom.py]"]
  node_sbom["CycloneDX SBOM<br/>[sbom.cdx.json]"]
  node_release_bundle["Release bundle"]
  node_verification_methods["Verification methods"]
end

node_operator(("Builder"))
node_github(("GitHub services"))
node_drand(("drand beacon"))

node_operator -->|"runs targets"| node_orchestration
node_orchestration -->|"builds in"| node_environment
node_orchestration -->|"uses source"| node_uboot
node_orchestration -->|"builds BL31"| node_tfa
node_orchestration -->|"uses firmware"| node_rkbin
node_orchestration -->|"applies patch"| node_patches
node_orchestration -->|"produces image"| node_ts233
node_orchestration -->|"produces image"| node_ts433
node_orchestration -->|"produces loader"| node_spl
node_orchestration -.->|"normalizes loader"| node_normalizer
node_uboot -->|"provides bootloader"| node_ts233
node_uboot -->|"provides bootloader"| node_ts433
node_sbom_generator -->|"reads version"| node_uboot
node_sbom_generator -->|"reads version"| node_tfa
node_sbom_generator -->|"reads firmware metadata"| node_rkbin
node_sbom_generator -->|"writes"| node_sbom
node_operator -->|"downloads"| node_release_bundle
node_release_bundle -->|"verified by"| node_verification_methods
node_verification_methods -->|"queries or trusts"| node_github
node_verification_methods -->|"checks beacon"| node_drand

click node_orchestration "https://github.com/dbast/qnap-ts-433-bootloader-builder/blob/main/Makefile"
click node_environment "https://github.com/dbast/qnap-ts-433-bootloader-builder/blob/main/Dockerfile"
click node_uboot "https://github.com/dbast/qnap-ts-433-bootloader-builder/tree/main/u-boot"
click node_tfa "https://github.com/dbast/qnap-ts-433-bootloader-builder/tree/main/trusted-firmware-a"
click node_rkbin "https://github.com/dbast/qnap-ts-433-bootloader-builder/tree/main/rkbin"
click node_patches "https://github.com/dbast/qnap-ts-433-bootloader-builder/blob/main/0001-Enable-setting-current_time-from-env-variable.patch"
click node_normalizer "https://github.com/dbast/qnap-ts-433-bootloader-builder/blob/main/normalize-rockchip-loader.py"
click node_ts233 "https://github.com/dbast/qnap-ts-433-bootloader-builder/tree/main/u-boot"
click node_ts433 "https://github.com/dbast/qnap-ts-433-bootloader-builder/tree/main/u-boot"
click node_spl "https://github.com/dbast/qnap-ts-433-bootloader-builder/tree/main/rkbin"
click node_sbom_generator "https://github.com/dbast/qnap-ts-433-bootloader-builder/blob/main/sbom.py"
click node_sbom "https://github.com/dbast/qnap-ts-433-bootloader-builder/blob/main/sbom.cdx.json"

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_orchestration,node_environment,node_normalizer toneBlue
class node_uboot,node_tfa,node_rkbin,node_patches toneAmber
class node_ts233,node_ts433,node_spl toneMint
class node_sbom_generator,node_sbom,node_release_bundle,node_verification_methods toneRose
class node_operator,node_github,node_drand toneIndigo
```

## Components

### Build workflow

- [Build orchestration](https://github.com/dbast/qnap-ts-433-bootloader-builder/blob/main/Makefile): `Makefile`
- [Docker environment](https://github.com/dbast/qnap-ts-433-bootloader-builder/blob/main/Dockerfile): `Dockerfile`
- [Loader normalizer](https://github.com/dbast/qnap-ts-433-bootloader-builder/blob/main/normalize-rockchip-loader.py): `normalize-rockchip-loader.py`

### Firmware inputs

- [U-Boot](https://github.com/dbast/qnap-ts-433-bootloader-builder/tree/main/u-boot): `u-boot`
- [Trusted Firmware-A](https://github.com/dbast/qnap-ts-433-bootloader-builder/tree/main/trusted-firmware-a): `trusted-firmware-a`
- [Rockchip firmware](https://github.com/dbast/qnap-ts-433-bootloader-builder/tree/main/rkbin): `rkbin`
- [Build patches](https://github.com/dbast/qnap-ts-433-bootloader-builder/blob/main/0001-Enable-setting-current_time-from-env-variable.patch): `0001-Enable-setting-current_time-from-env-variable.patch`

### Firmware artifacts

- [TS-233 image](https://github.com/dbast/qnap-ts-433-bootloader-builder/tree/main/u-boot): `u-boot`
- [TS-433 image](https://github.com/dbast/qnap-ts-433-bootloader-builder/tree/main/u-boot): `u-boot`
- [Shared SPL loader](https://github.com/dbast/qnap-ts-433-bootloader-builder/tree/main/rkbin): `rkbin`

### Artifact verification

- [SBOM generator](https://github.com/dbast/qnap-ts-433-bootloader-builder/blob/main/sbom.py): `sbom.py`
- [CycloneDX SBOM](https://github.com/dbast/qnap-ts-433-bootloader-builder/blob/main/sbom.cdx.json): `sbom.cdx.json`
- **Release bundle**
- **Verification methods**

### Other components

- **Builder**
- **GitHub services**
- **drand beacon**

## Connections

- Builder → Build orchestration: runs targets (evidence: `README.md`)
- Build orchestration → Docker environment: builds in (evidence: `README.md`)
- Build orchestration → U-Boot: uses source (evidence: `README.md`)
- Build orchestration → Trusted Firmware-A: builds BL31 (evidence: `README.md`)
- Build orchestration → Rockchip firmware: uses firmware (evidence: `README.md`)
- Build orchestration → Build patches: applies patch (evidence: `README.md`)
- Build orchestration → TS-233 image: produces image (evidence: `README.md`)
- Build orchestration → TS-433 image: produces image (evidence: `README.md`)
- Build orchestration → Shared SPL loader: produces loader (evidence: `README.md`)
- Build orchestration → Loader normalizer: normalizes loader
- U-Boot → TS-233 image: provides bootloader (evidence: `README.md`)
- U-Boot → TS-433 image: provides bootloader (evidence: `README.md`)
- SBOM generator → U-Boot: reads version (evidence: `sbom.py`)
- SBOM generator → Trusted Firmware-A: reads version (evidence: `sbom.py`)
- SBOM generator → Rockchip firmware: reads firmware metadata (evidence: `sbom.py`)
- SBOM generator → CycloneDX SBOM: writes (evidence: `sbom.py`)
- Builder → Release bundle: downloads (evidence: `README.md`)
- Release bundle → Verification methods: verified by (evidence: `README.md`)
- Verification methods → GitHub services: queries or trusts (evidence: `README.md`)
- Verification methods → drand beacon: checks beacon (evidence: `README.md`)
