--- title: BDYG18ProArmbianBuilder – Project Overview type: curated permalink: main/projects/d0abaf3f-da04-4dd4-a228-bacf68f44e8f/curated/bdyg18-pro-armbian-builder-project-overview stable_id: c650c1e4-18ee-44ad-af42-b7632fbdcf5c scope: project project_id: d0abaf3f-da04-4dd4-a228-bacf68f44e8f workspace_type: development usage_profile_id: null preference_context: development document_type: overview revision: 1 source_memory_ids: [] source_checkpoint_ids: [] source_file_ids: [] source_git_commit: 36234e0082845515a053c10ee552ce35a03415f0 source_git_commits: - 36234e0082845515a053c10ee552ce35a03415f0 source_agent_sync_ids: [] model_connection: Sub2API model_name: git-restore source_count: 125 source_revisions: memory:11052d10-1adf-4d39-800a-08f9ae708758: '1' memory:7cf6c014-d2fa-4f99-9ed9-c070b108d3c7: '1' source_dispositions: processed: 78 unchanged: 0 unsupported: 47 skipped: 0 cited_source_ids: - memory:11052d10-1adf-4d39-800a-08f9ae708758 - memory:7cf6c014-d2fa-4f99-9ed9-c070b108d3c7 - git:tools/driver/DriverAssitant_v5.14/Driver/x64/win10/rockusb.inf - git:tools/driver/DriverAssitant_v5.14/Driver/x64/win7/rockusb.inf - git:tools/driver/DriverAssitant_v5.14/Driver/x64/win8/rockusb.inf - git:tools/driver/DriverAssitant_v5.14/Driver/x64/win81/rockusb.inf - git:tools/driver/DriverAssitant_v5.14/Driver/x86/win10/rockusb.inf - git:tools/driver/DriverAssitant_v5.14/Driver/x86/win7/rockusb.inf - git:tools/driver/DriverAssitant_v5.14/Driver/x86/win8/rockusb.inf - git:tools/driver/DriverAssitant_v5.14/Driver/x86/win81/rockusb.inf - git:tools/driver/DriverAssitant_v5.14/Readme.txt - git:tools/driver/DriverAssitant_v5.14/revison.log - git:tools/loader/WHICH-LOADER.txt job_cited_source_ids: [] conflicts: [] supersedes: [] preferences: [] source_cursor: 0 source_hash: 5fe39ad3a37421f812566dd39f89d4c28fc6078c8d39031dff10eb6eb8d72e00 prompt_version: 2026-08-12.3 schema_version: '3' curation_job_id: null created_at: '2026-08-08T10:02:13.622509+00:00' updated_at: '2026-09-23T15:03:29.888176+00:00' tags: - project - overview restored_from_commit: 6a6a895eafcca6052e81a14fca103a42635dd1c2 --- # Overview ## Goal & Scope - **Goal**: Produce a reproducible, flash‑able Armbian image for the BDY‑G18‑Pro RK3568 router (8 GB DDR4, 256 GB eMMC, 32 MB SPI‑NOR, RTL8367S‑5‑port DSA switch). - **Target OS**: Community “DIY” Armbian 13.3 (Debian 13.3 Trixie) base, upgraded to kernel 6.18.x (current builds use 6.18.39 → 6.18.40). - **Preferred Image**: *stock* image – uses vendor‑verified boot chain (U‑Boot SPL/U‑Boot on SPI‑NOR) plus a minimal Armbian rootfs. A *self‑built* mode is also available for auditability. - **Host / Language**: Documentation Chinese; primary development host Windows (PowerShell) with cross‑platform Bash support. - **Design Philosophy**: KISS & YAGNI; reuse existing framework; shallow Git clones; pinned `RKBIN_GIT_COMMIT=ce50c0d1`; line‑ending LF enforced via `.gitattributes`. ## Repository Layout | Directory | Inclusion | Exclusion | |-----------|-----------|-----------| | `arm64‑custom/` | Tracked | – | | `evidence/` | Tracked | – | | `aidocs/` | Tracked | – | | `backups/`, `outputs/`, `work/`, `tools/`, large binaries, Docker cache, tool logs | Ignored | – | | `outputs/armbian-g18pro/` | Final artefacts (compressed image, SHA‑256, verification report, build log) | – | | `armbian‑g18pro‑cache` (Docker volume) | Persistent cache (~19 GB) | – | ## Build Infrastructure - **Docker image**: `ghcr.io/armbian/docker-armbian-build:armbian-ubuntu-noble-latest`. - **Cache volume**: `armbian‑g18pro‑cache` (~19 GB) holds U‑Boot, kernel, rootfs, ccache. - **Orchestrator**: Python script `armbian‑custom/build_g18pro.py` + PowerShell wrapper `build_g18pro.ps1`; works on Windows PowerShell **or** Linux Bash. - **Environment checks**: Require `git` and `docker`; verify required files (`bdy‑g18‑pro.csc`, DTB, boot‑region asset). Abort if < 8 GiB free space. - **Proxy handling**: Optional env var `G18PRO_PROXY`; stripped inside Docker; per‑tool `.curlrc`, `.wgetrc`, git `insteadOf` rewrites. - **Shallow clones**: `git clone --depth 1` for Armbian source and kernel (≈ 313 MiB). Reduces download from > 2 GiB. - **Loop‑device shim**: Bind‑mount `/dev` read‑only to `/tmp/dev` inside container; required for partition stage on Docker Desktop (Windows). - **Image creation**: `xz`‑compression, SHA‑256 recorded in a JSON manifest and verified after each build. ## Hardware Architecture | Item | Specification | |------|----------------| | **SoC** | Rockchip RK3568 – 4× Cortex‑A55 @ 2 GHz, Mali‑G710, VPU, RGA, HDMI | | **Memory** | 8 GB DDR4 HS200 (2.5 V) | | **Storage** | 256 GB eMMC (boot + rootfs) + 32 MB Winbond W25Q256JW SPI‑NOR (blank) | | **Switch** | Realtek RTL8367S 5‑port DSA (GMAC1 active, GMAC0 disabled) | | **UART2 console** | `serial@fe660000` → `ttyS2` at 1 500 000 baud, 3.3 V (pins: RX = GPIO0_D0, TX = GPIO0_D1). | ## Key Preferences (Scenario‑Level) - Language: Chinese. - Host: Windows (PowerShell) – scripts also work on Linux Bash. - Design: KISS & YAGNI, shallow clones, pinned blobs, LF line endings, Docker cache volume retained. - Secrets: Vaultwarden only (repo stores entry names, not values). - AI / Git integration: Disabled by default. - Network: TCP congestion **Cubic**, TSO disabled. - Git: Shallow clones, `core.autocrlf=false`, `.gitattributes` enforces LF. - Docker: Cache volume `armbian‑g18pro‑cache`, proxy stripped, optional `G18PRO_PROXY`. **Source IDs**: `c650c1e4-18ee-44ad-af42-b7632fbdcf5c`, `dd496c6d-1619-457d-86a9-da57f5b866d7`, `S‑1`, `aa3057ab-54c5-4ffc-ba85-c2f2396ee60c`, `4`, `bf88c265-4749-4c50-85bc-4bae25298cd5`, `ff34c6eb-6bba-41e5-9e43-ff80941fa823`, `adb3722a-51e7-4ec5-88cc-a95dc399a7a1`, `105b328f-4bda-4641-90a7-7282ef156316`