This is the first post on this blog. Rather than open with a polite hello and a promise to write more often, I am going to inaugurate the thing with a full-blast unhinged hell of a post: five weeks of dragging CentOS Stream 10 onto a Radxa Orion O6N, kernel and firmware and installer and a TPM I soldered on by hand. Settle in, or skim the headings. Both are legitimate.
The whole port was also a stress test, and not of the board: of the coding agents. I wanted to know how far they have actually come, so I pointed them at the least forgiving thing I could think of: customising software for an ARM single-board computer. Vendor kernels frozen at some fork point, out-of-tree drivers, firmware you cannot see into, and a forum thread where the answer is a cloud-storage link that died two years ago. Chinese boards carry the worst of that reputation, and Radxa's usually get filed under it.
That reputation did not survive contact with this one. CIX and Radxa have open-sourced very nearly all of it: the kernel tree, the EDK2 platform, the vendor patch series, the build tooling, and schematics detailed enough to find an unpopulated TPM footprint on sheet 31 of 46 and read its part number off the page. There are gaps (the NPU compiler is closed, and the boot chain below UEFI, the flash tools and a dozen binary UEFI modules carry no stated licence), but nearly every hard problem below was solved by finding the answer in a source file rather than bisecting blind. Point the most capable frontier model available at that much open source and the arithmetic changes: most of the code, the commit messages and this write-up came out of agents. My part was direction, judgement calls, and anything needing a soldering iron. I would not have attempted it by hand.
So: the sustained insanity that is the Orion O6N, counted in days from the one it arrived on.
Day 1: The board
The Orion O6N is a CIX Sky1 board with twelve cores in three tiers of four: four Cortex-A720 at up to 2.5-2.6 GHz, four more A720 at 2.2-2.3 GHz, and four A520 at 1.8 GHz. The A720s are clocked in pairs, hence the ranges. Around them sit LPDDR5, an Immortalis-G720 GPU, an Arm China Zhouyi NPU and a Linlon video engine. CIX's upstream work is device-tree only (their linux-mainline wiki lists the VPU as "won't do"), which helps nobody booting a distro through UEFI and ACPI.
It ran Fedora 44 on my desk at first. I did try CentOS early: it came up, would not talk to the network, and did not get five more minutes of my patience. I set it aside and used Fedora's kernel-ark tree as a proving ground, with CS10 as the destination. A stock CS10 kernel carries none of the Sky1 vendor series, so it sees generic ACPI devices and little else.
The real cost, though, was everything that broke specifically on an enterprise kernel. CS10 backports aggressively
into 6.12, so vendor code that tests LINUX_VERSION_CODE takes the wrong branch. An audit of the NPU and VPU drivers
found 78 version guards, five of them wrong on CS10: four compile errors and one silent bug, the nastiest thing in
this post. The NPU keeps a private copy of struct iommu_dma_cookie with its layout picked by kernel version, so on
CS10 it read eight bytes past the real field on every IOMMU path, quietly. The VPU could not be built out of tree at
all, because CS10 leaves CONFIG_VIDEOBUF2_DMA_SG unset and the symbol has no Kconfig prompt, so it is carried
in-tree, where its own Kconfig can select it. And CS10's DRM is backported from Linux 7.0, so the display and GPU
patches came from the vendor's patches-7.0 set while everything else came from patches-6.18. None of this shows
up on Fedora. There was also no RPM packaging for any of it since the vendor ships only Debian-compatible packages.
One other project shares the ACPI path: Sky1-Linux, a Debian-based
distribution. Their patch 0093 fixes the same PCIe probe bug I hit, in mainline's driver rather than the vendor's.
Two commits in this port come straight from their tree: the fan-control driver and the SPI controller's ACPI ID.
The rest mostly patches mainline's drivers where this port carries the vendor's, so it does not apply here.
Day 4: The kernel
The tree is sky1 on gitlab.com/Leuca/centos-stream-10:
CS10's kernel-6.12.0-275.el10 plus 190 commits, published as kernel-6.12.0-275.sky1.1.el10 and built in the
COPR. Most of those commits are vendor drivers with
light edits. Before anything went public, the 102 that were ours went to the frontier model for review;
it found no live bug, just hygiene, and the branch was rebased from 266 to 273 with a range-diff showing 188 of 190
commits identical. Now a scheduled CI job rebases it onto each new CentOS release on its own.
The PCIe bug that ate the root disk. sky1_pcie_probe() replaced every error with -EINVAL, turning "try again
later" into "give up forever". The reset GPIO comes from gpio-cadence, which loads later out of the initramfs, so a
controller probed too early asked to defer, got reported as -22, and was dropped:
sky1-pcie-cix sky1-pcie.2.auto: Failed to get reset gpio
sky1-pcie-cix sky1-pcie.2.auto: probe with driver sky1-pcie-cix failed with error -22
That controller carries the NVMe root disk, so the boot waited forever for a filesystem that would never arrive.
Fixing it exposed the next layer: the retry remapped a live I/O window and panicked at kernel BUG at
mm/vmalloc.c:116. Parsing firmware properties before allocating anything fixed both: the same reordering Sky1-Linux
landed on independently.
SCMI gated everything else, and it needs three things at once: the vendor's
0001-mailbox-add-acpi-support-to-cix-mailbox-driver.patch (the first patch of every patches-* set in
cixtech/cix-linux-main, easy to miss if you start at 0002), a 6.12
backport of upstream's mailbox fwnode change, and CONFIG_CIX_MBOX=y. The =y is not taste: built in, the mailbox
claims its register window from arch_initcall, before the SCMI shared-memory device (SHM0, whose region sits inside
that window) is probed; as a module it loads seconds later, finds the region taken and gets -EBUSY. Fedora ships =m,
which cannot work.
The boot arguments are where the kernel thread and the image thread collide. The board needed
clk_ignore_unused because its SCMI firmware predates CLOCK_GET_PERMISSIONS and cannot say a clock is in use, so
the sweep turns off things the board is running on. It needed nohibernate because clearing CONFIG_HIBERNATION
would compile out the sleep callbacks of every driver that references CONFIG_PM_SLEEP. Both arguments survive on a
running system. Neither survives an installation: an anaconda live install is an rsync followed by a fresh
bootloader config, which keeps only its preserved_arguments. And arm64 cannot bake them in: CMDLINE_EXTEND is
gone, so the Kconfig choice falls through to CMDLINE_FORCE, which discards root= and panics.
I spent real time on installer-side workarounds: an anaconda drop-in, a postinst.d grubby hook, a kickstart
%post that turned out broken. This was infuriating. Every one of them was there to smuggle an argument that only
existed because the firmware could not describe its own clocks. The fix was to stop needing them: an SCMI quirk that
flags just those 273 clocks, only on firmware that cannot report permissions, and a HIBERNATION_DISABLED_DEFAULT
that turns the existing nohibernate flag on by default.
I did not arrive at the first one myself. My initial patch added a global CLK_IGNORE_UNUSED_DEFAULT, which would
have switched the sweep off for every clock in the kernel, audio and the rest of Sky1's own clock drivers included,
as a build-wide change no upstream tree would take. A review caught it. The quirks framework had been sitting in the
tree the whole time.
The test that mattered took forty-five seconds. I removed clk_ignore_unused from the boot entry, rebooted, and the
board came back, which it had never done before without that argument:
[ 3.527] arm-scmi arm-scmi.5.auto: SCMI Protocol v2.0 'cix:cix' Firmware version 0x20b0000
[ 3.536] arm-scmi arm-scmi.5.auto: Enabling SCMI Quirk [quirk_clock_ignore_unused]
[ 4.358] clk: Disabling unused clocks
The unused-clock sweep ran: the 273 SCMI clocks were kept out of it and everything else got swept normally.
There was also pd_ignore_unused, carried in every boot line since the beginning. It was never needed: the firmware
exposes no SCMI power-domain protocol, so every genpd comes from the perf-domain driver with no power_off at all. It
had been copied from CIX's documented bring-up line and never questioned, including by me. It and clk_ignore_unused
came off the board together, and nothing has missed them since.
The NIC bug was firmware wearing a kernel costume. About six boots in ten died with Asynchronous SError Interrupt
inside r8169. Radxa's O6N LinuxAcpiConfig.h swaps the two 2.5 GbE NICs' PERST# GPIOs (their O6 copy of the same file
is correct), and since the PCIe driver pulses PERST# early in probe, whichever port came up second reset the other
port's NIC. If r8169 was mid-access, the next register read aborted. Driving the GPIO from a small module reproduced
it on demand. The fix lives in the firmware, and in the eleven boots that followed there was not a single cross-port
reset.
Day 20: TPM2
The TPM plan predates the board. A LetsTrust module, an Infineon TPM on a small board for the 40-pin header, was bought for the Orion before the Orion had even arrived, and soldering anything on was not part of the plan.
It would not talk over the hardware SPI controller. Linux could reach it only through a spi-gpio bit-bang, which
meant no measured boot, since PCRs 0-7 and the event log belong to firmware, and IMA missed it by a few hundred
milliseconds. It was a key store and nothing more. What followed was three weeks of the agents asking for one more
test: another power cycle, another probe on the header pins with a pocket oscilloscope that could barely see the
signal, on a module whose connector never sat quite right on those pins in the first place. And every round ended
with a new theory about some hardware barrier between the controller and the module.
The best of those theories was this: spi-cadence.c caps its divisor at 256 against a fixed 200 MHz clock, so the
slowest bus it can produce is 781.25 kHz, and anything slower is silently clamped. The module answered on the
bit-banged bus up to 638 kHz and not at 781. The floor is real. It was never the problem. But it was convincing
enough, and unsatisfying enough, that I stopped trusting the header. First I bought a new module, because the old
one's connector was so flaky, and it changed nothing. Then I went looking for a TPM that did not need the header at all.
There is one on this board, sort of. The v1.11 schematic, sheet 31, has a site labelled SPI TPM 2.0 (OPTION):
U37, an Infineon SLB9672, 5x5 mm, on the SoC's SPI at 1.8 V. Every component on that sheet is marked NC. So I bought
an SLB9672 to put there. I am no stranger to a soldering iron from other projects, but I had never done an SMD
soldering session in my life.
Soldering. I followed a step-by-step guide an agent wrote, which started with U37. Under the
microscope, the site turned out not to be bare: the factory had printed paste on every pad and reflowed it without a
chip. The idea was to pre-heat the board and seat the chip on that solder with hot air. At 350 °C it would not stick:
the board's solder simply did not melt. I raised the temperature a little on each attempt, up to 380 °C, with the
same result. Out of frustration I added some low-temperature Sn-Bi paste and melted that instead, and it took: the
paste wetted the pads and U37 finally went down, square on its pads and looking more than decent.
U37 after reflow.In hindsight the paste belonged there from the start. Factory solder is often hard to reflow with a hot-air gun, and refreshing it first is the better practice. A stencil would have helped most of all: it puts paste only where it belongs, so you can place every part and reflow the lot in one go. That idea only came to me once the job was done.
Then the passives. The guide came with a shopping list, and I ordered from it without opening the drawings once. The first 0402 capacitor overhung its pads at both ends: every passive site on that sheet is 0201. Work stopped and 0201s went on order.
I am way too impatient to wait for the order. That evening I remembered I had 0201s of my own in a drawer, but by then
it was late and I was tired, so they went on first thing the next morning. The order will not go to waste either: the
flux in it is good for any soldering job, and its 0201s will have a second board to go on once it arrives. The passives
to the right of U37 went on with the same paste trick, mostly: the ones that landed too far off their pads I fixed
with an iron, probably with more solder than they needed. Hand-soldering 0201s with an iron is miserable. And with no 0
Ω resistors in the drawer, those links became bridges of stranded wire and solder. U37 came out fine; the 0201s are
ugly enough that, although I took pictures, you will not be seeing any of them. It works (the TPM answers) and it could
be tidied up, but every rework pass on that site risks the chip, so it stays as it is. C1218, a bulk capacitor site,
is still empty, and the TPM does not mind.
Firmware saw the chip the same day, because CIX's own DTpmDeviceLib knows how to drive it. That library is missing
from Radxa's tree; it had to be brought over from CIX's community tree and adapted. What the firmware still lacked was
an ACPI node for the OS. The firmware now publishes one for each TPM as PRP0001, so tpm_tis_spi binds where
MSFT0101 would attract only the memory-mapped tpm_tis, and a setup-menu option decides which one is visible. Only
one may be: Linux IMA extends the first TPM to register, so if both were visible and the firmware measured into the
header module, the firmware's PCRs would sit on one chip and IMA's on the other. Fair warning if you read the schematic
against the ACPI tables: schematic SPI1 is ACPI \_SB.SPI0, and schematic SPI2 is \_SB.SPI1.
And then the real bug. Sky1's Cadence SPI FIFO is 32 bits wide and shifts MSB first, while stock spi-cadence
writes one byte per FIFO word, so every byte goes out on the wire as 00 00 00 xx and a TPM never sees a valid header.
Packing four bytes per word fixed it, and with that in, the header module answers on the hardware controller at every
rate from 0.78 MHz to 25 MHz. That 0.78 MHz is the same 781.25 kHz it had supposedly refused. The bit-banged path had
always worked because it bypasses the FIFO, which is exactly what hid the bug. Both TPMs are the same chip, an SLB9672,
on different buses and driven by the same tpm_tis_spi.
So the module I had planned on from the start would have worked all along. It needed a few dozen lines in the SPI
driver, and it took my first SMD soldering, with the wrong passives, to get around a hardware barrier that did not exist
and find that out. I would still do it again. The long way round is why I now know what U37's reset line is really
wired to, why the firmware was holding the other TPM in reset, and what the board does when a measurement fails. The
board now takes a TPM two ways, which nobody set out to build: two TPMs the firmware can choose between, measured boot
into either, and a reset line user space cannot touch.
That reset line, by the way: Radxa's GPIO table drives line 44 low by default, and line 44 is header pin 18, which on
the LetsTrust module is the TPM's RST#. Firmware had been holding the module in reset through its whole boot and
reading zeros, and Linux only reached it because bringing up the GPIO block released the line by accident. The firmware
now releases it when the header TPM is selected, and has Linux hold it high as a GPIO hog, so user space cannot reset
the chip and replay PCRs behind the log's back. Kernel code could still toggle it, and so could anything writing through
/dev/mem, which this kernel blocks only when booted with Secure Boot enabled (LOCK_DOWN_IN_EFI_SECURE_BOOT); without
it, /dev/mem can still reach the GPIO registers. Anyone using the TPM for measured boot is likely to turn Secure Boot
on anyway.
What the TPM measures now. The IMA race was a deferred probe: the SPI controller waits on the SCMI clocks, so the
TPM appeared after init_ima had given up, and probing tpm_tis_spi synchronously plus a backport of upstream's
IMA_INIT_LATE_SYNC fixed it; the firmware's event log and IMA's both replay exactly against the chip. Nothing was
measured into PCR0 but a nine-byte ACPI DATA event. A new DXE driver now logs the firmware version and volumes first,
and getting a digest that matches the image file meant catching PrePi, which runs in place from flash, writing the
detected top of RAM into a variable inside the very volume the DXE driver later measures. PrePi now restores the
build-time value before handing over, and both volume digests match the image file.
It is still self-measurement, not a root of trust: TF-A, OP-TEE and the security-engine and power-management firmware
run unmeasured. Underneath, the chain from the BootROM up to bootloader3 (the UEFI image) is signature-checked, but
until the OEM key fuse is burned, which the factory does not do, there is nothing to anchor it to: an image does not
need the placeholder key published in the repo, and one signed with a freshly generated key, using the vendor's tool on
an x86_64 host, is accepted just as well. And edk2-cix's Makefile had two bugs, a wrong architecture directory and a
variable that was never exported, which made an aarch64 build silently reuse CIX's trusted key certificate. The build
now fails only when the OEM key differs from the shipped certificate and the host cannot run CIX's x86-only tool to
regenerate it.
Day 27: Packages and images
The COPR carries the kernel, a sky1-release package whose subpackages hold the repo, the boot configuration and the
vendor Mali userspace, and an opt-in cix-firmware with the VPU and GPU blobs. The specs say the rest.
The GPU has two drivers to choose from. Upstream panthor works, but the vendor's mali_kbase is faster: it scores
9477 in glmark2 against panthor's 3252. On a test that only runs shader arithmetic the gap shrinks to 1.24x, and it is
all driver and compiler: panthor's reported 900 MHz against the vendor's 1000 turned out to be a readback of a different
clock, not a lower ceiling. panthor is the default; installing sky1-mali switches to the vendor stack by shadowing
the blacklist in /etc/modprobe.d, and removing it switches back. If the switch fails, you land on a working GPU rather
than none.
The images are a fork of the CentOS Stream Alternative Images kiwi descriptions
on a c10s-sky1 branch. The ISO has to fit GitHub's 2 GiB release limit and was already at 1.833 GiB with an lzma-9
payload that no compression flag would shrink further. Dropping the GNOME-Desktop group, which drags in Firefox,
Flatpak and the multimedia stack, while keeping the gnome-desktop collection anaconda's GUI actually needs, took it to
1.342 GiB. The ISO is now signed in CI and carries no platform-specific kernel arguments at all.
A fresh install then blanked the screen during early boot. phy_cix_usbdp sits in the
initramfs and resets the USB/DP PHYs, which blanks the firmware framebuffer, and no real display driver loads until
the root filesystem is mounted, so any prompt the initramfs shows, you cannot see. The fix is two drivers added to the
initramfs through a dracut drop-in in sky1-config.
Page size got a proper look the same day: 16K and 64K both break the VPU and the vendor Mali stack, and 64K costs about 4 GB of RAM for a 3.4% compile speedup. 4K it is.
Day 36: Where it stands
The kernel is public, and so is the firmware package, as source only. The flash image carries CIX binaries with no stated licence (the bootloaders, config blobs, flash tools and a dozen binary UEFI modules), so the repository holds only what is needed to build the image yourself: the RPM spec file, 32 patches on top of CIX's EDK2 sources, and a build guide. The patches include CIX's own backports, two of which (Secure Boot image verification) matter for this image, and the upstream fix for CVE-2024-38797 with its follow-up cleanup.
The NPU runs vision graphs well, 60 to 500 inferences a second, but not LLMs: decode on the CPU already runs close to the memory-bandwidth limit, and whether prefill would gain is a question for a compiler only CIX can see into.
Porting tips
Start with the firmware, not the kernel. The "Enable ACPI SCMI" option in the UEFI Compliance menu is off by default,
and off means the SCMI clock and performance devices report _STA 0, which looks exactly like a kernel-side SCMI
failure and is not one. The setting is invisible in efivars; check /sys/bus/acpi/devices/CIXHA008:00/status
instead, where 11 means on.
A few other things that cost me time:
- The fan is driven by the power-management firmware (
FAN_OUT0), not by the PWM pin the schematic hints at. - The UEFI setup menu was painfully slow over a large serial terminal (480x113 here): every arrow key sent about 18 KB of output, most of it spaces. Teaching the firmware's terminal driver to send each run of spaces as a single erase sequence cut that to about 1.9 KB.
The moment that made it for me was the 32-bit FIFO theory holding up: four bytes packed per word and the TPM I had soldered finally answered in Linux. The firmware had seen it before, but only then did I believe the chip, and my first SMD soldering, actually worked. Add a NIC bug wearing a kernel costume, a hardware barrier that did not exist and more reboots than I could count, and this is the most fun I have had with a computer in a long time. If you have a Sky1 board too, or just a question, the comments are open below.
* This post was written and reviewed with the help of AI agents.