Skip to content

Architecture Overview ​

UniOHOS uses a modular, cross-platform architecture to run OpenHarmony userland on ARM64 and x86_64 devices while preserving strict license boundaries, avoiding proprietary binary hosting, and supporting both open-source drivers (Approach A) and local read-only firmware reuse (Approach B).

1. Layered System & Dual-Organization Boundary ​

OpenHarmony / UniOHOS UserlandMusl libc | ArkUI | RenderService | samgr | hilogd | HDF / HDI Contracts UniOHOS/core (Apache-2.0) early-bringupsidecar-runtimehybris-bridgeanco-enginedevice-parts (control-center, bootanimation) | Cross-silicon shared runtimeUniOHOS/recovery (Apache-2.0)LVGL v9.2 | HDC Sideload | FastbootdUniOHOS/plugin (Multi-license)Mere aggregation (cb1-hdr GPL-2.0+) UniOHOS-Devices/<vendor>-<soc>-bsp (Apache-2.0) common/ (12): display-vdi, gpu-hdr-opencl, vpu-bridge, npu-bridge, camera-daemon, ril-bridge audio-bt-dac, power-typec, peripherals, security-fingerprint, perf-standby, recovery-platform profiles/<vendor>/<codename>/: Per-board configs & HARDWARE.md matrix on shared main branchLinux Kernel UAPI Boundary (Linux-syscall-note: ioctl / DRM-KMS / DMA-BUF / sysfs / procfs) UniOHOS-Devices/<vendor>-<soc>-kernel (GPL-2.0-only) Pure-text DTS/ACPI Overlays | Linux 6.x GKI Patch Stack (OHOS IPC + F2FS HMFS ioctl) | Out-of-tree .ko Sources

Why Two Organizations and Four Layers? ​

  1. Cross-Silicon Core (UniOHOS/core, recovery, builder, gki-sdk, devices):
    • Houses silicon-independent C/C++/ArkTS runtime code, graphical recovery core, build schema, and GKI verification tools.
    • Device repositories never copy files from UniOHOS/*; they declare minimum compatibility versions (compatibility.core_min_version, builder_min_version) in device.yaml.
  2. Per-Silicon Hardware Adaptation (UniOHOS-Devices/<vendor>-<soc>-bsp, Apache-2.0):
    • Shared silicon adapters live once under common/ (display-vdi, gpu-hdr-opencl, vpu-bridge, npu-bridge, camera-daemon, ril-bridge, audio-bt-dac, power-typec, peripherals, security-fingerprint, perf-standby, recovery-platform).
    • Board-level differences (panel geometry, speaker amps, modem presence, sensor lists) live under profiles/<vendor>/<codename>/ on main without per-device Git forks.
  3. Linux Kernel UAPI Boundary (Linux-syscall-note):
    • All userland components (Apache-2.0 / MIT) interact with the Linux kernel (GPL-2.0-only) strictly through standard kernel UAPI interfaces (ioctl, DRM/KMS, DMA-BUF, sysfs, procfs, netlink).
  4. Pure-Source Kernel & DeviceTree (UniOHOS-Devices/<vendor>-<soc>-kernel, GPL-2.0-only):
    • Stores only OpenHarmony / HarmonyOS kernel patches, incremental pure-text .dts/.dtsi/.asl overlays, defconfig fragments, and open-source out-of-tree .ko C sources.
  5. Optional Multi-License Plugins (UniOHOS/plugin):
    • Independent feature plugins with copyleft or mixed upstream licenses (such as cb1-hdr under GPL-2.0-or-later) live under plugins/<id>/ via repository-level mere aggregation (GPLv2 Section 2), without statically linking into UniOHOS/core or *-bsp.

2. Architecture Deep Dives ​

Explore each subsystem in detail:

TopicKey Components CoveredPage
Boot Chain & StorageStage-1 PID1 (early-bringup), misc+0x1000, usb-udc-guard, super/dm-linear, switch_root, 64KB PTE_CONT EROFS, F2FS HMFS ioctlBoot Chain & Storage
Graphics & SidecarARM64 TPIDR_EL0 static bti c GPU bridge, Mesa PanVK/Turnip fallback, composer_vdi/buffer_vdi, isolated Bionic Sidecar IPC, AnCoGraphics Bridge & Sidecar
Security & Standby PowerSELinux Day-0 / staged Enforcing=1, neverallow == 0, hardware Fail-Closed, epoll/netlink daemons, cgroup.freeze, deep sleepSecurity, SELinux & Standby
Recovery & PluginsUniOHOS/recovery LVGL v9.2 core vs recovery-platform, external f2fs-tools, UniOHOS/plugin mere aggregation vs runtime license rulesRecovery & Plugin Isolation

3. Reference Validation Scope ​

Current real-hardware verification across the full stack has been conducted primarily on Xiaomi 15S Pro (dijun / Xiaomi XRING O1, Stage 3), with Huawei Qingyun L420x (qingyun-l420x / HiSilicon Kirin 9000C, Stage 1) bootstrapped as the first PC/laptop target. Cross-device generalization PRs and additional SoC test reports are tracked in UniOHOS/core and UniOHOS/devices.

Independent Open-Source Community (CC-BY-4.0). Not affiliated with Huawei, HiSilicon, OpenAtom Foundation, Xiaomi, Qualcomm, MediaTek, or Arm.