Cross-Silicon Graphical Recovery & Multi-License Plugin Isolation
Two subsystems require extra architectural care to keep UniOHOS/core and per-silicon BSP repositories clean and license-pure: the graphical recovery environment (UniOHOS/recovery) and optional copyleft/mixed-license plugins (UniOHOS/plugin).
1. Two-Layer Graphical Recovery (UniOHOS/recovery)
UniOHOS/recovery cleanly separates silicon-independent recovery logic from SoC hardware drivers:
- Core Layer (
UniOHOS/recovery/core/,Apache-2.0):- Compiles on any Linux x86_64 host or ARM64 target with zero SoC headers.
- UI & Rendering: Borderless LVGL v9.2 touch interface (
third_party/lvgl/verbatimMITsubset), OLED pure-black default and soft light themes, live English/Chinese switching, 16x analytical SDF icons, full-screen edge-back gestures, and a multi-threaded120fpsintro renderer (rec_intro_anim) with deterministic 1-thread vs N-thread bit-exact output. - Protocols & Storage: Multi-protocol boot control (standard
BCB/BCABplus extensible one-shotDJBC, zero physical GPT sector writes), OpenHarmonyHDC Sideload, streaming Sparse/ZIP64 userspaceFastbootd,liblplogical partition tools, partition backup/restore, file manager, touch terminal, lazy on-demand Wi-Fi, and a 6-digit PBKDF2-HMAC-SHA256 PIN gate. - Font & Tooling License Hygiene: Ships precomputed Euclidean SDF wordmark data generated reproducibly from SIL OFL 1.1
Noto Sans Medium(zero proprietary fonts). Upstreamf2fs-tools 1.17.0(GPL-2.0-only) is never committed to Git and is fetched externally at image-build time viascripts/fetch_f2fs_tools.sh.
- Silicon Adaptation Layer (
UniOHOS-Devices/<vendor>-<soc>-bsp/common/recovery-platform/,Apache-2.0):- Implements DRM/KMS atomic modeset, touchscreen and linear haptics bindings, USB ConfigFS FunctionFS (
ACM+HDC+Fastbootd), early.koDAG loading, and Stage-1 smart boot routing.
- Implements DRM/KMS atomic modeset, touchscreen and linear haptics bindings, USB ConfigFS FunctionFS (
See UniOHOS Graphical Recovery for build and host-test commands.
2. Optional Multi-License Plugins (UniOHOS/plugin)
Some optional hardware features build on upstream open-source projects carrying strong copyleft licenses (such as GPL-2.0-or-later). Placing them inside UniOHOS/core or *-bsp would muddy the pure Apache-2.0 license posture of core repositories.
UniOHOS/plugin solves this with explicit structural and runtime boundaries:
| Boundary Layer | Legal / Technical Mechanism | Implication |
|---|---|---|
| Repository & Storage Level | Mere Aggregation (GPLv2 Section 2): Top-level scaffolding (Makefile, scripts/, registry/plugins.json) is Apache-2.0; each plugin under plugins/<id>/ is self-contained with its own LICENSE, NOTICE, and plugin.json, and is never statically linked into UniOHOS/core or *-bsp. | Keeping cb1-hdr in UniOHOS/plugin does not alter the Apache-2.0 license of UniOHOS/core or *-bsp in source form. |
Runtime — In-Process (dlopen) | Dynamically loading a GPL-2.0-or-later shared library (e.g., libuniohos_cb1_hdr.so) into an Apache-2.0 host process. | Combined runtime work operates under GPL-3.0-or-later compatibility (via the "or later" clause, since Apache-2.0 is compatible with GPL-3.0). |
| Runtime — Out-of-Process (CLI / IPC) | Executing the plugin as a standalone process communicating over CLI or IPC, or omitting the optional plugin entirely. | Keeps the host process strictly Apache-2.0 at runtime. |
See Optional Plugins (UniOHOS/plugin) for cb1-hdr sink modes (SINK=generic vs SINK=xring-o1) and plugin contribution steps.