English | 中文
Build scripts, patches, kernel configuration, DTS files and tools for running
mainline Linux 6.18 on the HUAWEI Kirin 9000C SBC (codename charlotte,
board QHW-100).
The board boots through UEFI. The stock vendor 5.10 kernel
(5.10.97-38-9000c) stays the default; the 6.18 image is a separate
one-shot test entry.
The verified build configuration, command line and packaging steps are in docs/verified_config_zh.md (Chinese).
patches/: the 6.18 kernel patch series (git am-able,v6.18.66baseline)defconfig/: the 6.18 kernel configuration used by the build and by CIdrivers/: local mirrors of the driver sources added/modified by the seriesdts/: local mirrors of the board DTS/DTSI used by the seriesdocs/: bring-up notes and build guidefirmware/: firmware notes (common GCN GPU sets forCONFIG_EXTRA_FIRMWARE)tools/: on-device helpers (MMIO diagnostic tool)scripts/ci/: non-interactive firmware fetch and kernel build scripts.github/workflows/: CI that builds the same kernel from a cleanv6.18.66
| Feature | Vendor 5.10.97 | Mainline 6.18 (this repo) |
|---|---|---|
| 8c12t SMP boot (8 cores / 12 threads) | 5.10 | 6.18 |
UART console (uart_v500) |
5.10 | 6.18 |
| UFS (HS-G4, 2 lanes) | 5.10 | 6.18 |
| PCIe0 (onboard ASM1064) | 5.10 | 6.18 |
| SATA (AHCI) | 5.10 | 6.18 |
| PCIe1 (external x1 slot) | 5.10 | 6.18 |
| USB 2.0 / 3.0 (dwc3 + xhci) | 5.10 | 6.18 |
USB Ethernet (RTL8153 / r8152) |
5.10 | 6.18 |
| amdgpu (Oland dGPU on PCIe1) | — | 6.18 |
| HDMI audio (dGPU HDA) | — | 6.18 |
| SoC display (vendor DPU/HDMI) | 5.10 | — |
SoC GPU (Mali / hvgr) |
5.10 | — |
| Video decode (VDEC) | 5.10 | — |
| Video encode (VENC) | 5.10 | — |
CPU frequency (hw_vote) |
5.10 | 6.18 |
| cpuidle (WFI / cluster idle) | 5.10 | — |
| Suspend / resume (deep) | 5.10 | — |
| Thermal zones | 5.10 | — |
| I2C | 5.10 | — |
| SPI | 5.10 | — |
| GPIO / pinctrl | 5.10 | — |
| RTC | 5.10 | — |
| PMU (perf) | 5.10 | — |
| IOMMU (SMMU) | 5.10 | — |
| KVM (arm64 VHE) | 5.10 | 6.18 |
| Namespaces (user / IPC / mount / PID) | 5.10 | 6.18 |
| binder / binderfs | 5.10 | 6.18 |
| Common filesystems | 5.10 | 6.18 |
5.10 = vendor kernel 5.10.97-38-9000c; 6.18 = upstream v6.18.66 plus this
repository's patch series (upstream v6.18.66 alone has no board support);
— = no driver or not implemented. The vendor kernel exposes /dev/binder
but not binderfs; 6.18 uses binderfs. The vendor kernel has no
radeon/amdgpu, so the external card only enumerates on PCIe1 there.
The default 6.18 configuration (defconfig/charlotte_6.18_defconfig) follows
the Debian 6.18.12+deb13-arm64 configuration with the board changes below.
It selects the HiSilicon SoC platform and retains general-purpose peripheral
and filesystem support. It drops DEBUG_INFO / BTF, Rust drivers and module
compression to keep the build small and fast.
CONFIG_DRM_RADEON is not set, so radeon.ko is not built; SI/CIK ASICs are
handled by amdgpu (CONFIG_DRM_AMDGPU_SI / _CIK). CONFIG_DRM_AMD_DC
is off because the Oland board uses the legacy DCE path.
CPUFreq goes through the vendor hw_vote block because the SoC has no
mainline clock provider; charlotte-hv exposes three policies (little,
middle, big). See 中文 for the register map, OPP
tables and verification.
All patches are local work for this board, derived from:
- the live vendor device tree (
dtc -I fs -O dts /proc/device-tree), and - the HUAWEI phone kernel source drop (
HBN-AL00,HBN-AL10,HBN-AL80), in particularplatform_source/basicplatform/drivers/{pci,clk,gpio}anddrivers/video/fbdev/dkmd; mariobalanica/arm-pcie-gpu-patches: the arm64 external-GPU patch set. The three root causes on PCIe1 (device mappings for MMIO, an alignment fix, and write-combined GTT memory) map to its 0001/0002/0003; see PCIe1 notes.
hi3660/hi3670 code is deliberately not used as a reference: the
Kirin 9000C UFS/PCIe/clock blocks are different.
0001: add the QHW-100 (charlotte) board DTS and SoC skeleton0002: add theuart_v500serial console driver (interactive console)0003: add the read-only DSS power probe used during display recon0004: add HUF S per-core queue support to the mainline UFS core0005: add theufshcd-charlottevariant driver0006: negotiate HS-G4 through the private UniPro window0007: add the DesignWare PCIe host glue (pcie-charlotte)0008: give PCIe1 a 64-bit BAR window and inbounddma-ranges0009: release PCIe1 through the platdrv FF-A secure partition0010: amdgpu bus mastering + SI VRAM aperture refresh0011: report the 56 MiB charlotte aperture and force GTT write-combined0012: keep charlotte user-space VRAM mappings in GTT0013: add the SI PASID TLB flush callback0014: use I/O accessors for SI reset magic and UVD messages0015: restore DCE vblank/pageflip IRQs after a modeset0016: only unpin the old FB when legacy set_base pinned it0017: add thecharlotte-hvCPUFreq driver and hw_vote/OPP tables0018: split the PCIe1 windows to match the running board0019: fold the final amdgpu VRAM/GART/CSB/ring fixes0020: fix the PCIe1 inbound iATU windows and BAR0 relocation0021: addhisilicon,dwc3-usbtodwc3-of-simple
CONFIG_EXTRA_FIRMWARE embeds 253 amdgpu/<codename>_*.bin files (about
17 MiB) covering the common GCN sets: SI (tahiti, pitcairn, verde,
hainan), CIK (bonaire, hawaii, kaveri, kabini, mullins), VI
(tonga, fiji, topaz, carrizo, stoney), Polaris and Vega, plus
Oland. scripts/ci/fetch_firmware.sh collects exactly the configured list
from /lib/firmware or from pinned linux-firmware mirrors, so a clean
checkout can build the same image. See firmware/README.md.
- The 56 MiB aperture, BAR0 relocation and GTT policy are tuned for the Oland card on this board. Other GCN cards still need their own PCIe window, BAR and power adaptation; see amdgpu notes.
CONFIG_DRM_AMD_DCis off for the legacy Oland path. Polaris/Vega cards generally need DC (andAMD_DC_FP) re-enabled for display.- DRM fbdev emulation is disabled in the test entry
(
drm_kms_helper.fbdev_emulation=0): the 4K fbcon BO cannot be pinned inside the 56 MiB window. The compositor still runs at 4K; the boot display console is absent and the serial console is used instead. - GDM works after removing the board-specific SoC display compatibility library injected into the greeter's PAM environment; that library conflicts with the AMD dGPU EGL/GBM. The user session is unaffected.
- Weston with vsync runs at half the monitor refresh on this legacy
non-atomic path;
vblank_mode=0removes the limit. - GPU DPM works:
low= 300/300 MHz,high= 825/1000 MHz,autoramps under load.amdgpu_pm_inforeports 10 kHz units.
tools/charlotte-diag.c: freestanding aarch64 MMIO dump tool (dump,blocks,ranges,find,fill,fbbars,fbinfo)
- Build guide (Ubuntu/Debian on the board): English | 中文
- UFS bring-up notes: 中文
- PCIe1 / FF-A / BAR window notes: 中文
- amdgpu and Oland display notes: 中文
- scanout BO pin analysis: 中文
- CPU frequency scaling (hw_vote / OPP / governors): 中文
- USB Ethernet / network notes: 中文
scripts/ci/fetch_firmware.sh populates the configured firmware list and
scripts/ci/build_kernel.sh applies patches/*.patch to a clean v6.18.66,
installs defconfig/charlotte_6.18_defconfig, builds
Image, hisilicon/charlotte-9000c.dtb and modules, then collects the artifacts.
With BUILD_DEB=1 and KERNEL_LOCALVERSION=-charlotte-gxde it also builds the
image/headers packages and runs packaging/package-with-desktop-guide.sh to add
the PDF guide, desktop autostart, UART console settings and board workarounds.
The GitHub Actions workflow build-hisi-9000c-6.18 runs the same two scripts
natively on the GitHub-hosted arm64 runner ubuntu-24.04-arm, and uploads the
Image, DTB, System.map, kernel config, a modules tarball and the delivery
.deb. See 中文 for the checks and local
reproduction.
- Do not read unpowered display/PCIe MMIO blocks; on a cold 6.18 boot they can trigger a NoC SError and reset the board.
- HUAWEI phone kernel source drop (
HBN-AL00,HBN-AL10,HBN-AL80): vendor UFS, kport PCIe, extreme CRG and dkmd display implementations - Live vendor device tree of the board (QHW-100)
mariobalanica/arm-pcie-gpu-patches: arm64 PCIe GPU bring-up referencelinux-firmwarefor the embeddedamdgpu/<codename>_*.binsets