Xiaomi Pad 6S Pro (sheng): macOS 26.5 port with its own kernel and drivers; the full system reaches the desktop with CPU rendering (mataht)
ARCHIVED (2026-11-12): This experimental repository is archived and no longer updated because upstream (UniXNU / UniXNU-sheng, https://github.com/UniXNU/UniXNU-sheng\) already has a faster-progressing macOS implementation for the Xiaomi Pad 6S Pro (sheng) covering macOS 27.3, GPU framebuffer copy and experimental direct scanout, CPU/GPU dynamic frequency scaling, working Wi-Fi networking, keyboard cover and touchpad support, audio and kernel work-interval patches. In this repository's macOS 26.5 (25F71) port on the CN 16 GB / 1 TB unit (RAM-only fastboot boots), the Metal plug-in stack (WindowServer -> Metal plug-in -> metal2vulkan -> Turnip -> Adreno 740 kernel driver) on a single GPU command ring (sheng-gpu-preempt=0) at 401 MHz with IO-coherent GPU buffers boots into a full GPU-composited macOS desktop (wallpaper, menu bar, widgets, Dock) where Finder (including full-screen), Notes, System Settings, App Store and About This Mac open and touch works. Persistent disk writes (native-ufs-root-writes=1) to the OS window on UFS and clean restarts and shutdowns from the Apple menu (sheng-psci-reset=1) are verified across four tablet boots (boots 46, 48, 49, 50), with TWRP chunk scans and offline APFS Fletcher-64 checks (up to xid 14318, 1008 objects verified, Data and Update volumes cleanly unmounted) confirming zero checksum failures and extracting 1266 log and crash-report files from the Data volume.
源记录: porting.toml, 5ca6b8b4c8f4caf57ff947fb353edad665c07dfe.
本页按设备记录自动生成。
| 部分 | 状态 |
|---|---|
| 配置 | host-verified |
| 固件与启动 | device-verified |
| CPU 与中断 | device-verified |
| 内存与 DMA | device-verified |
| 存储与根卷 | device-verified |
| 显示 | device-verified |
| 输入 | device-verified |
| GPU | device-verified |
| 网络 | implemented |
| 音频 | planned |
| 电源 | device-verified |
| 镜像组装 | host-verified |
| 诊断 | device-verified |
| usb | implemented |
| userspace | device-verified |
配置
host-verified
硬件与依赖
- Pinned upstream sources in sources.lock.json (UniXNU, UniXNU-sheng, uefi-sheng, Apple's open-source XNU 12377.121.6 and companion libraries) and the paired macOS 26.5 (25F71) kernel debug kit, used by CI for headers and signature checks.
配置
- Kernel configuration DEVELOPMENT ARM64 with the SHENG board; XNU patches in platform/sheng/macos26/patches and platform/sheng/macos26/pac, applied in numeric order; driver switches are boot arguments (sheng-gpu-power, sheng-wifi, sheng-kbd, sheng-usb and so on), all default off.
操作步骤
- Build in CI (the builds run in a private repository; the workflow file hw-sheng-cn-1tb.yml in this repository shows the steps, and Actions are disabled here): scripts/build_macos26_xnu.py --link-kernel with the --build-* switches of the drivers to include.
- Assemble the kernel collection locally; assembly uses Apple kernel extensions and its output is not published.
开发经验
- CI compiles and links with the Apple toolchain on an xcode-27 runner; -Werror failures in earlier runs were fixed on the same branch (see docs/ci.md).
- CI artifacts are kept for seven days; the build.json of each run records the SHA-256 of every output.
- A kernel can also be built on a Mac with Xcode 27.2 (SDK 27.2) by the same steps; the SDK check of the build script also accepts 27.2. Against a CI build of the same source the build records have the same keys and differ only in toolchain versions, output identities and absolute paths or parallelism, but object files and the kernel are not byte-identical. A Mac-built kernel counts as a new kernel and passes its own gates.
完成条件
- Every selected driver compiles and links, the ABI audits pass (vtable slot counts, pointer-authentication metadata, no weak imports) and the artifact digests match the GitHub API.
当前范围
- CI does not run the kernel. It proves compile, link and static audits only. This repository is not a UniXNU device repository and does not build with the unixnu tool.
下一步
- Archived; see upstream UniXNU / UniXNU-sheng for active development.
证据
host: Run 42576253178 succeeded: kernel and the eight merged driver branches compile and link, ABI audits pass. Command:GitHub Actions: CN 1 TB sheng hardware candidate build. Revision:36e11087791ca3b68505ee19c1f8602d7713039d.
固件与启动
device-verified
硬件与依赖
- uefi-sheng and UniXNU-sheng at the commits pinned in sources.lock.json, plus this repository's patch series; the vendor firmware archive named by the pinned UniXNU-sheng, which is downloaded on the build machine and not stored here.
配置
- Boot image: Android boot container with the UEFI firmware and a FAT payload volume holding the UniXNU configuration, the kernel, the device tree and the trust cache; the loader is DarwinBoot. Boot arguments (cpus=8, driver stages) come from the packager.
操作步骤
- Build the firmware with scripts/build_firmware.py, package the kernel and device tree with scripts/package_macos26_ufs.py, then run `fastboot boot` once with the device owner's approval. Nothing is flashed; a restart returns to Android.
开发经验
- The bootloader of the CN OS3.0.306 unit accepts the self-built container and the firmware shows the UniXNU menu (first seen 2026-11-06).
- The bootloader leaves the display lit and a framebuffer in memory, which the kernel display driver reuses.
完成条件
- The firmware reaches the UniXNU menu, DarwinBoot loads the kernel with the 16 GB memory map, and the framebuffer and reservations are preserved.
当前范围
- Only the CN OS3.0.306 unit has been tested. Other vendor firmware versions are untested.
下一步
- Archived; see upstream UniXNU / UniXNU-sheng for active development.
证据
device: UEFI and DarwinBoot loaded the kernel built from this revision; the system reached the desktop about two minutes after the command (2026-11-09). Nothing was flashed. Command:fastboot boot sheng-macos26-kernel.img. Revision:36e11087791ca3b68505ee19c1f8602d7713039d.
CPU 与中断
device-verified
硬件与依赖
- Eight cores (three Cortex-A510, four A715, one X3) brought up with PSCI; inter-processor interrupts through SPIs; CPU frequency registers read from the performance domains.
配置
- Boot arguments cpus=8, sheng-smp=1, armcpu-spi-ipi=1; sheng-cpufreq=1 enables the read-only frequency reader.
操作步骤
- Boot with the packager's 8-CPU configuration; with sheng-cpufreq=1 the reader prints a CPUFREQ row every 5 seconds for 120 seconds.
开发经验
- All eight cores came online on the tablet on 2026-11-07 (cpu_start 0 to 7), on an earlier build of this repository.
- The bootloader leaves the clusters near the top of their ranges: 1670 MHz (A510), 2707 MHz (A715), 2956 MHz (X3), L3 vote 12 (1574 MHz), including during slow Metal plug-in boots, so CPU throttling is ruled out.
- This CPU reports cache geometry in the 64-bit CCIDX format of CCSIDR; XNU's whole-cache set/way shortcut parses the old format and is effectively a no-op here, so display and GPU code clean caches by address.
完成条件
- Every enabled core reaches its entry checkpoint; timers and inter-processor interrupts work on each core.
当前范围
- No thermal sensor (TSENS) or dynamic CPU frequency scaling (DCVS) has run on hardware in this repository; kernel work-interval creation fails when AppKit starts live scrolling (causing scroll-bar drags to abort).
下一步
- Archived; upstream UniXNU / UniXNU-sheng already includes CPU/GPU DCVS and kernel work-interval patches.
证据
device: Rows identical from 2 s to 100 s: three clusters at 1670, 2707 and 2956 MHz (2026-11-08). Command:fastboot boot sheng-macos26-kernel.img (sheng-cpufreq=1). Revision:96ac3a9e43a4cc80ed1c3ab7bff78a315269bb39.
内存与 DMA
device-verified
硬件与依赖
- Two DRAM windows (0x80000000 to 0xFFFFFFFF and 0x880000000 to 0xBFFFFFFFF) on the 16 GB unit; macOS uses 16 KiB pages.
配置
- Memory map patch for the CN 16 GB unit in the UniXNU-sheng series (0009); 16 KiB page size in the kernel and the Adreno code; sheng-memperf=1 enables the read-only L3/RPMh and memory bandwidth report.
操作步骤
- Boot the packaged kernel; the packager checks the memory map against the unit's layout.
开发经验
- The full system runs with the 16 KiB-page kernel and this memory map.
- The NativeMemPerf benchmark on the tablet (boot 39) measured (MiB/s): cached write ~11236, read ~10637; Device write ~79, read ~141; write-combined write ~11275, read ~256.
完成条件
- All handoff regions are accounted for and each DMA engine uses its allocated range with the documented cache policy.
当前范围
- In boot 43 most sampled frames spent 330 to 368 ms reading and comparing 24.8 MB of surface pixels (~75 MB/s, vs 52 to 55 ms and >=475 MB/s in two fast frames), inferred to be caused by non-cacheable surface page mappings on slow frames.
下一步
- Archived; see upstream UniXNU / UniXNU-sheng for active development.
证据
device: The full system ran on the tablet with this kernel and memory map; the NativeMemPerf stage-1 report read the command database (2026-11-09). Command:fastboot boot sheng-macos26-kernel.img. Revision:36e11087791ca3b68505ee19c1f8602d7713039d.
存储与根卷
device-verified
硬件与依赖
- UFS controller with several LUNs; a dedicated partition for macOS on LUN0; a small log partition; a system image supplied by the user (this repository neither contains nor documents how it is made).
配置
- NativeUfs publishes only registered partition windows after checking the SHNGROOT header (size and SHA-256). Writes are off by default and can go either to a volatile RAM overlay (native-ufs-root-overlay-mib, with optional wired-page pool outside the zone map via native-ufs-root-overlay-pool=1) or to persistent disk within the OS window of macossystem (native-ufs-root-writes=1).
操作步骤
- Create the partition and write the image only with the device owner's approval for each step; the packager refuses a package without matching install evidence. Boot with `fastboot boot`; after persistent boots, run a read-only TWRP 8 MiB chunk scan and offline APFS Fletcher-64 verification.
开发经验
- The 1140 s RAM overlay write report (boot 47, 4096 MiB pool) showed a ~2 GiB burst in the first 6 minutes and ~250 MiB over the next 800 s, written by system cache daemons (coresymbolicationd 1885 MiB, iconservicesd 392 MiB, mediaanalysisd 385 MiB, iconservicesagent 198 MiB, corespotlightd 130 MiB).
- Persistent disk writes (native-ufs-root-writes=1) are guarded in both RootLayout and RootCommands (20 of 21 injected defects caught offline, 1 no-op when closed) and verified across four tablet boots (boots 46, 48, 49, 50, up to 593 modified 8 MiB chunks / ~2.59 GB), with 0 changes outside the OS window, 0 APFS Fletcher-64 checksum failures across checkpoints xid 12808 -> 13104 -> 13409 -> 13986 -> 14318 (up to 1008 objects verified), clean Data and Update volume unmounts on Apple menu Restart (boot 49) and Shut Down (boot 50), and 1266 log and crash-report files extracted from the Data volume.
完成条件
- The root volume mounts, the data volume mounts, and both RAM-overlay and persistent OS-window writes work cleanly across reboots.
当前范围
- No TRIM in persistent mode; UFS read/write/flush timeouts are tight (1 s, 2 s, 10 s). The UFS driver cannot be exercised in QEMU, so full-system QEMU evidence comes from a VirtIO build of the same kernel with only the storage driver replaced.
下一步
- Archived; see upstream UniXNU / UniXNU-sheng for active development.
证据
device: Persistent writes verified across four tablet boots (boots 46, 48, 49, 50); TWRP chunk scans and offline APFS Fletcher-64 checks confirmed 0 changes outside the OS window, 0 checksum failures through xid 14318, and clean Data/Update volume unmounts on Apple menu Restart and Shut Down (2026-11-10 to 2026-11-11). Command:fastboot boot sheng-macos26-kernel.img (native-ufs-root-writes=1 sheng-psci-reset=1). Revision:e5cd05044e6c9f2cb442da0d2c4444a270579994.
显示
device-verified
硬件与依赖
- Framebuffer left by the bootloader, 3048 x 2032 BGRA; panel size 262 x 175 mm.
配置
- NativeGOPDisplay presents the framebuffer as an IOMobileFramebuffer (native-gop-display=1, requesting kIOMapWriteCombineCache). Without the Metal plug-in (sheng-full-ui=1), WindowServer is switched to CPU compositing; with the Metal plug-in (sheng-full-ui=2), WindowServer composites on the Adreno 740. A software cursor is forced; sleep is disabled; optional changed-row copy (native-gop-forward-mode=1), per-address cache maintenance (native-gop-cache=1) and strip-free desktop mode.
操作步骤
- Boot with native-gop-display=1 and either sheng-full-ui=1 (software) or sheng-full-ui=2 (Metal plug-in).
开发经验
- Both CPU-rendered and GPU-composited desktops display wallpaper, menu bar, widgets, Dock and application windows; strip-free clean desktop verified in boots 49 and 50.
- In boot 43 (single GPU ring), GPU fence waits averaged ~1.5 ms, whereas the display driver's CPU copy took 0.36 to 0.40 s per frame (~2.5 to 3 fps): most sampled frames spent 330 to 368 ms reading and comparing 24.8 MB of surface pixels (~75 MB/s), while two fast frames completed read/compare and wrote 223 rows in 52 to 55 ms (>=475 MB/s read), inferred to reflect non-cacheable vs cacheable surface page mappings. NativeGOPDisplay requests kIOMapWriteCombineCache, which XNU honors only when is_dram_addr(pa) holds.
完成条件
- The first frame is presented, the GPU-composited desktop and apps are drawn and the pointer follows the finger.
当前范围
- No backlight control; per-frame CPU surface read/compare and blit takes 0.36 to 0.40 seconds (~2.5 to 3 fps).
下一步
- Archived; upstream UniXNU-sheng uses GPU framebuffer copy (fb-gpu=1) and experimental direct DPU scanout.
证据
device: Desktop with wallpaper, widgets and system windows displayed about two minutes after the boot command (2026-11-09). Command:fastboot boot sheng-macos26-kernel.img. Revision:36e11087791ca3b68505ee19c1f8602d7713039d.device: Recovery's language chooser showed one selection row after the changed-rows copy fix (2026-11-08). Command:fastboot boot sheng-macos26-kernel.img. Revision:e2da63e11cc4bc039b7ea090b68a589dc16efecd.
输入
device-verified
硬件与依赖
- Novatek NT36532E touch on a GENI SPI engine (QUP1 SE4, GPIO 44 to 47, interrupt GPIO 25), 20319 x 30479 raw range; power and volume keys on the PMIC (SPMI); the keyboard cover on GENI I2C with its own MCU.
配置
- Touch follows UniXNU-sheng's host-computed route: the host downloads the touch firmware into the controller at each boot, reads the capacitance frames and computes a single absolute pointer (sheng-touch=1..4). The firmware is a vendor file read from the user's own device and injected into the device tree locally; it is not in this repository. Keys: native-button-keys=1 reports arrows, Tab and Return. Keyboard cover: sheng-kbd=1..5, default off.
操作步骤
- Boot with sheng-touch=4 for a working pointer; bring-up stages 1 to 3 are read-only or clock and pin only and were run in order with approval for each boot.
开发经验
- The pointer follows the finger from the Apple-logo phase on; touch opens and interacts with Finder, Notes, System Settings, App Store and Apple menu items (Restart in boot 49, Shut Down in boot 50); selecting About This Mac with the power key (Return) opens the window in boot 50, while slight finger movement between press and release causes menu items to treat some touch taps as drags.
- On the full system a stage-1 read of the keyboard cover shows regulators L6B, L12B and L13B off. Stage 2 (clocks and engine identity, no rail, no bus traffic) passed on the tablet. Stage 3 (boot 28, first voltage vote via RPMh for L12B 1.8 V and L13B 3000 mV) did not receive a completion signal for L12B within 50 ms and stopped by design (L13B not voted, no I2C traffic); 13 seconds later a kernel lock-wait timeout panic occurred (same signature as boots 03 and 45 without a keyboard driver, causal link not established). Inferred cause of the missing completion: the command channel (TCS 2) completion interrupt was not enabled before voting; a fix was written and verified in host tests and QEMU offline but not booted before archiving.
完成条件
- Touch produces correct pointer coordinates and clicks; keys drive Recovery and menus; the cover types.
当前范围
- Single finger only, no tap-slop threshold yet. The keyboard cover's stage 3 voltage vote did not complete on hardware in this repository, and stages 4 and 5 were not run on hardware. No interrupt line is used; the drivers poll.
下一步
- Archived; upstream UniXNU-sheng already has working keyboard cover keys and touchpad pointer on macOS 27.3.
证据
device: Pointer followed the finger and taps selected rows in the language chooser (2026-11-08). Command:fastboot boot sheng-macos26-kernel.img (sheng-touch=4). Revision:f01a90598d66bb68d2fdb941065853c49c96d128.device: Volume keys moved the selection, power and Return advanced the language chooser (2026-11-08). Command:fastboot boot sheng-macos26-kernel.img (native-button-keys=1). Revision:e2da63e11cc4bc039b7ea090b68a589dc16efecd.device: Keyboard cover stage 2: clock vote, I2C engine identity registers read, regulators off, no bus traffic, no panic (2026-11-10, video reading). Command:fastboot boot sheng-macos26-kernel.img (sheng-kbd=2). Revision:e5cd05044e6c9f2cb442da0d2c4444a270579994.
GPU
device-verified
硬件与依赖
- Adreno 740 (a7xx) with its GMU, SMMU and firmware (firmware is read from a device tree node and is never stored here); UniXNU's Adreno740 component; Mesa's Turnip driver with a Darwin backend; a Rust Metal-to-Vulkan bridge; a Metal plug-in loaded by WindowServer.
配置
- Kernel: an IOAccelerator front end over UniXNU's Adreno kernel stack, 16 KiB pages, default off, sheng-gpu-power=1..9 (1 is read-only), with cacheable client buffers + pre-submit cache maintenance (sheng-gpu-wc=0), IO-coherent GPU-owned buffers (sheng-gpu-owned-coherent=1), fixed operating point 401 MHz (sheng-gpu-perf=4) and single command ring (sheng-gpu-preempt=0). User space: plug-in bundle (Metal front end, bridge, Turnip) delivered via device tree node.
操作步骤
- Build with the --build-gpu switch (kernel) and the gpu-userland workflow (plug-in); boot with sheng-gpu-power=1 for the read-only stage. Higher stages power the GPU and need the device owner's approval.
开发经验
- QEMU stage A and fake A740 stage B verified WindowServer plug-in loading and first-frame Turnip submission.
- Tablet, stages 1 to 9 without the Metal plug-in (including control boot 39): power domains, clocks, GMU SMMU context and firmware, GX power and heartbeat, TrustZone zap authentication (three secure calls returning 0) and the first GPU command and interrupt through the GPU's own SMMU context all succeeded; boot 39 reached the CPU-rendered desktop quickly.
- Tablet, GPU hang avoided (sheng-gpu-wc=0), IO-coherent GPU-owned buffers (sheng-gpu-owned-coherent=1, boot 40, cutting 300 s driver cache maintenance from ~20.4 s to ~0.58 s and raising completed submissions from 758 to 1088) and 401 MHz clock vote (sheng-gpu-perf=4, boot 41, raising completed submissions to 1534 and cutting the longest client fence wait from ~2.2 s to ~91.5 ms).
- Tablet, full GPU-composited macOS desktop and apps on a single command ring (boots 42, 43, 44, 46 to 50): after setting MiniBuddyLaunch=false, boot 42 reached the full GPU-composited desktop (~9 fps) before hanging the second ring on a CP_BLIT when opening the App Store; switching to a single command ring (sheng-gpu-preempt=0, boot 43) completed 2677 of 2677 submissions in 300 s with 0 hangs and ~1.5 ms average client fence wait, opening App Store, Notes, Finder (including full-screen), System Settings and About This Mac, and running 19 minutes without a GPU hang in boot 47.
- The plug-in contains metal2vulkan (GPL-2.0-or-later or LGPL-3.0-or-later); its build artifacts are not redistributed.
完成条件
- WindowServer and system apps render through the Adreno 740 with Metal on a single command ring.
当前范围
- No GPU thermal control or DCVS has run on hardware in this repository (fixed at 401 MHz); two-ring preemption hangs on a CP_BLIT when opening the App Store; Photos aborts in PXCreateContext when creating a Metal texture bitmap context; intermittent slow boots with the plug-in (boots 21 and 33 slow, subsequent boots fast, cause undetermined).
下一步
- Archived; see upstream UniXNU / UniXNU-sheng for active development.
证据
host: Turnip created a device on the fake A740 and a first frame was submitted; WindowServer exited intermittently afterwards. Command:QEMU aarch64 full-system boot of the CI kernel with sheng-gpu-fake=1. Revision:41091a32532775aed1457f9bc3f65a4864707204.device: Stage 1, a read-only snapshot, ran on the tablet without writes or rendering (2026-11-09). Command:fastboot boot sheng-macos26-kernel.img (sheng-gpu-power=1). Revision:36e11087791ca3b68505ee19c1f8602d7713039d.device: Desktop reached without a panic; first GPU interrupt, accelerator published, 1023 of 1023 test dwords correct, read from a video of the screen (2026-11-09 night). The kernel has no complete full-system QEMU run. Command:fastboot boot sheng-macos26-kernel.img (sheng-gpu-power=9, second integrated kernel). Revision:e5cd05044e6c9f2cb442da0d2c4444a270579994.device: Full GPU-composited macOS desktop on a single command ring (boots 43, 44, 46 to 50): 2677 of 2677 submissions completed in 300 s with 0 hangs, average client fence wait ~1.5 ms; Finder (including full-screen), Notes, System Settings, App Store and About This Mac opened (2026-11-10 to 2026-11-11, videos, photos and diagnostic QRs). Command:fastboot boot sheng-macos26-kernel.img (sheng-gpu-power=9 sheng-gpu-metal=1 sheng-full-ui=2 sheng-gpu-owned-coherent=1 sheng-gpu-perf=4 sheng-gpu-preempt=0). Revision:e5cd05044e6c9f2cb442da0d2c4444a270579994.
网络
implemented
硬件与依赖
- Wi-Fi and Bluetooth chip (WCN7850 family) on PCIe0 with its power rails, the sleep-clock pin and the MHI interface; vendor firmware is never stored here.
配置
- NativeWifi, default off: sheng-wifi=1 read-only snapshot, 2 power and PCIe link with endpoint identification, 3 BAR0 and MHI registers. The class is an Ethernet-style controller from IONetworkingFamily. RPMh TCS 0 is used.
操作步骤
- Boot with sheng-wifi=N for stage N; stages 2 and above power the chip and need approval for each boot.
开发经验
- Stage 1 on the tablet: the PCIe0 power domain is collapsed with no clock votes; WLAN_EN, BT_EN and PERST# read low; two of the chip's rails read off and three on at the pinned voltages; the sleep-clock pin is idle and owned by another execution environment.
- Stage 2 on the tablet: power, PCIe0 link and endpoint identification; the endpoint ID reads 17cb:1107 (WCN7850), the sleep clock goes from idle to driving and one chip rail from off to on.
- Stage 3 on the tablet: BAR0 (2 MiB) mapped, bus mastering on, the MHI register block and the BHI registers read without a panic; MHIVER reads 0xdeadbeef, meaning not established (digits read from a video).
- Stage 4 on the tablet (boot 23): firmware loaded into the 8 MiB DMA window (length and digest verified by the kernel), Wi-Fi SMMU stream routed and MHI/BHI layout read without hanging; this SMMU does not support address translation self-test (ATOS), so the DMA window translation is unverified.
- Stage 5 on the tablet (boot 26): chip power-up and boot loader doorbell executed without hanging or panicking; the result rows print only after the chip reports ready, after the GUI had already taken over the screen, so the stage 5 outcome is unknown.
完成条件
- The endpoint enumerates, firmware loads, a network interface is published and packets flow.
当前范围
- The SMMU does not support ATOS, so the stage 4 DMA translation is unverified; the stage 5 outcome was hidden behind GUI takeover; there is no wireless protocol stack in this repository. Firmware is read from the tablet's own Android partitions and never stored here. Bluetooth has only had its pin and clock read.
下一步
- Archived; upstream UniXNU-sheng already has working Wi-Fi association, DHCP and traffic on macOS 27.3.
证据
device: Stage-1 rows read without a panic: PCIe0 collapsed, no clock votes, enable pins low (2026-11-09). Command:fastboot boot sheng-macos26-kernel.img (sheng-wifi=1). Revision:36e11087791ca3b68505ee19c1f8602d7713039d.device: PCIe0 link up and endpoint ID 17cb:1107 read, no panic (2026-11-10, video reading). Command:fastboot boot sheng-macos26-kernel.img (sheng-wifi=2 sheng-rtc=2). Revision:e5cd05044e6c9f2cb442da0d2c4444a270579994.device: BAR0, bus mastering, MHI and BHI registers read, no panic; MHIVER read as 0xdeadbeef (2026-11-10, video reading, a few digits ambiguous). Command:fastboot boot sheng-macos26-kernel.img (sheng-wifi=3 sheng-rtc=2). Revision:e5cd05044e6c9f2cb442da0d2c4444a270579994.
音频
planned
硬件与依赖
- ADSP-owned audio path; no work has started in this repository.
配置
- None.
操作步骤
- None.
开发经验
- None.
完成条件
- Playback and capture through an audio driver that macOS recognises.
当前范围
- Not started in this repository.
下一步
- Archived; see upstream UniXNU-sheng for audio support.
证据
按下一步操作收集证据。
电源
device-verified
硬件与依赖
- PMIC state (RTC, backlight drivers KTZ8866 x 2), ADSP-owned battery and charger services, RPMh, the performance and memory-latency state, and PSCI system reset/off.
配置
- Default-off drivers: NativeRtc (sheng-rtc), NativeBacklight (sheng-backlight, always clamped to 64..2047), NativeMemPerf (sheng-memperf), NativeAdsp and NativeBattery (sheng-adsp, sheng-battery), and a PSCI reset/poweroff hook (sheng-psci-reset). Charger writes are off and the critical battery level is never asserted.
操作步骤
- Boot with sheng-<driver>=1 for the read-only snapshot; with sheng-rtc=2 and sheng-psci-reset=1 for RTC calendar publication and Apple menu Restart / Shut Down.
开发经验
- The first stage of each ran on the tablet without writes. XNU waits up to 30 seconds for an IORTC service at boot. With sheng-rtc=2 the platform expert publishes IORTC early and NativeRtc moves the calendar forward; on the tablet this saved about 30 seconds (WindowServer's screen about 49 seconds after the boot command against 75 to 81 seconds before). The calendar starts at the packaging time, not the true time. The ADSP firmware owns the Type-C controller.
- With sheng-psci-reset=1, clicking Restart in the Apple menu (boot 49) and Shut Down in the Apple menu (boot 50) cleanly unmounted the APFS Data and Update volumes (xid 13986 and 14318, 0 checksum failures) and rebooted to Android or powered off the tablet.
- System sleep panics in QEMU because the platform does not register its cores for sleep, so sleep is disabled.
完成条件
- Clean system restart and shutdown from macOS; RTC calendar published at boot; battery state, brightness control and sleep.
当前范围
- No thermal sensor driver ran on hardware in this repository; no battery reporting, no brightness control, no true time (the calendar starts at the packaging time), no sleep.
下一步
- Archived; see upstream UniXNU / UniXNU-sheng for active development.
证据
device: The first stages ran without a panic and the command database read returned status 0 (2026-11-09). Command:fastboot boot sheng-macos26-kernel.img (read-only stage 1 of RTC, backlight, ADSP, memory performance). Revision:36e11087791ca3b68505ee19c1f8602d7713039d.device: WindowServer's screen appeared about 49 seconds after the boot command against about 75 to 81 seconds before; the calendar started at the packaging time (2026-11-09 night, hand reading of a video). Command:fastboot boot sheng-macos26-kernel.img (sheng-rtc=2 with a floor time). Revision:e5cd05044e6c9f2cb442da0d2c4444a270579994.device: Apple menu Restart (boot 49) and Shut Down (boot 50) cleanly unmounted the Data and Update volumes and rebooted to Android or powered off the tablet (2026-11-10 to 2026-11-11). Command:fastboot boot sheng-macos26-kernel.img (sheng-psci-reset=1). Revision:e5cd05044e6c9f2cb442da0d2c4444a270579994.
镜像组装
host-verified
硬件与依赖
- CI outputs, the paired Apple kernel extensions (local only), a device tree generated from board facts, driver switches, and the evidence from QEMU runs and device steps.
配置
- The packager refuses a package unless its evidence matches: same kernel identity, QEMU observations, root install evidence and, for full-system packages, a sibling VirtIO build of the same kernel. A tiered policy decides whether earlier long-run evidence can be reused, by comparing build records.
操作步骤
- Assemble the kernel twice and compare byte for byte; run the quick QEMU gates (root found, storage default off, memory layout, eight cores); package; verify the package with an independent script that compares container, kernel, device tree and boot arguments.
开发经验
- Assembly outputs and packages contain Apple code and vendor firmware and stay local; the repository holds the tools and tests.
- Reusing evidence is decided by comparing build records, not by hand.
- Every new kernel booted on 2026-11-10 evening and 2026-11-11 early morning had a complete 1200-second QEMU full-system run beforehand without a panic and with the image unchanged, as did the changed-rows display copy mode. Earlier boots 14 to 17 were made under per-package user waivers before their 1200-second runs were completed afterwards.
- The QEMU observer tool was fixed so that if the VM stops in user space at the time limit, it briefly steps the VM into kernel space before the final kernel data read.
完成条件
- Every package passes the independent review before any boot is requested.
当前范围
- The local assembly and review outputs are not published, so a third party cannot rerun the review without their own inputs.
下一步
- Archived; see upstream UniXNU / UniXNU-sheng for active development.
证据
host: The tests that cover the changed paths pass in the check job of run 42576253178. Command:GitHub Actions: CN 1 TB sheng hardware candidate build. Revision:36e11087791ca3b68505ee19c1f8602d7713039d.
诊断
device-verified
硬件与依赖
- The framebuffer as a text console, a retained log in memory and in a small partition, a QR code of the panic state, and read-only TWRP 8 MiB chunk scans of the OS window.
配置
- Boot progress lines and driver status rows are printed on the screen (sheng-boot-progress); on a panic the screen shows a QR code with registers, stack and a caller resolved against the kernel's UUID (including GPU state and RAM overlay write reports); optional native-gop-diag and native-touch-diag strips; post-boot TWRP chunk scan and offline APFS Fletcher-64 verifier / Data-volume crash-report extractor.
操作步骤
- Photograph or film the screen, scan the QR code and decode it with scripts/decode_xnu_panic.py; after persistent boots, scan changed 8 MiB chunks in TWRP, verify APFS Fletcher-64 checksums offline and extract logs and .ips crash reports from the Data volume.
开发经验
- The first full-system boot panicked about 5 minutes 50 seconds after the command; the QR code identified watchdogd's exit as the cause.
- Post-boot TWRP chunk scans and offline APFS checks after boots 46, 48, 49 and 50 verified 0 checksum failures across up to 1008 APFS objects and extracted 1266 files from the Data volume, pinpointing the AppKit PerfRegulatorStart work-interval abort on scroll-bar drags and the Photos PXCreateContext assertion failure.
完成条件
- Every stage of the boot leaves a checkpoint on the screen, every panic leaves a decodable QR record, and persistent Data-volume crash reports can be extracted and verified offline.
当前范围
- No offline parser for macOS unified log (.tracev3) files in this repository.
下一步
- Archived; see upstream UniXNU / UniXNU-sheng for active development.
证据
device: Boot-progress lines were read from the screen and the panic QR code was scanned and decoded (2026-11-09). Command:fastboot boot sheng-macos26-kernel.img. Revision:239b233aecf8840c763c24f1589eb5b1578ffa47.
usb
implemented
硬件与依赖
- DWC3 controller, eUSB2 repeater and PHY tables, RPMh rails; the Type-C role and VBUS are owned by the ADSP firmware.
配置
- NativeUsb, default off: sheng-usb=1 read-only snapshot, 2 rails, GDSC, clocks and resets, 3 repeater, PHY and host role, xHCI reset and port polling, 4 a subclass of macOS's xHCI driver (separate build). The PHY table is a local file.
操作步骤
- Stage 1 needs nothing else; stages 3 and 4 need an external 5 V source because the CPU side has no VBUS path.
开发经验
- Stage 1 ran on the tablet without writes.
- The class description used for stage 4 is a generated declaration with opaque names.
完成条件
- A USB device enumerates and works through macOS's own USB stack.
当前范围
- Stages 2 and above have never run on the tablet. Stage 4 needs its own candidate and gates.
下一步
- Archived; see upstream UniXNU / UniXNU-sheng for active development.
证据
device: The read-only stage-1 snapshot ran on the tablet (2026-11-09). Command:fastboot boot sheng-macos26-kernel.img (sheng-usb=1). Revision:36e11087791ca3b68505ee19c1f8602d7713039d.
userspace
device-verified
硬件与依赖
- The installed macOS 26.5 system supplied by the user, its original trust caches, and a few services the platform lacks (a watchdog and a key store).
配置
- Development policy: dyld skips libignition; the original trust caches are loaded unchanged with no entries of our own (Metal plug-in boots add the plug-in's two CDHashes and set lp-sip0 to 2); platform UUID from the device tree; panic_on_crash_disabled=1; minimal IOWatchdog (reports disabled) and AppleKeyStore (no keybag, no passcode, unlocked) enabled by sheng-watchdog=1 and sheng-aks=1; autoLoginUserScreenLocked=false and MiniBuddyLaunch=false.
操作步骤
- Boot the full-system package; auto-login, no screen lock and skipping the post-login Setup Assistant (MiniBuddyLaunch=false) are used on the tablet.
开发经验
- With the login services, MiniBuddyLaunch=false and the single-ring Metal plug-in stack, the tablet boots directly into the GPU-composited macOS desktop and opens Finder (including full-screen), Notes, System Settings, App Store and About This Mac.
- Crash reports extracted from the tablet's Data volume after persistent boots identified two userland/kernel gaps: dragging or clicking a scroll bar aborts in AppKit PerfRegulatorStart with 'Failed to create performance regulator work interval (error %i).' because kernel work-interval calls are unimplemented in this repository; Photos aborts with an uncaught NSAssertionHandler exception in PhotosUIFoundation PXCreateContext under PXGMetalTextureConverter createTextureFromCGImage / _createTransparentTexture. Offline inspection also showed Safari is missing because the AppOS cryptex was not installed in the 26.5 system image (17 dangling symlinks into /System/Cryptexes/App), and mobileactivationd and apsd crash every ~10 seconds as in QEMU.
- In QEMU, opendirectoryd's first node open often times out after 5 seconds and is retried; runs that hit its intermittent /Search or /Local/Default panic are rerun and not used as evidence.
完成条件
- The GPU-composited desktop appears, persists across clean Apple menu restarts and shutdowns, and runs bundled applications.
当前范围
- Development kernel without a root seal check, AMFI developer mode, no SEP; scroll-bar drag aborts in PerfRegulatorStart without kernel work-interval patches; Photos aborts in PXCreateContext; AppOS cryptex not installed in the 26.5 image.
下一步
- Archived; upstream UniXNU / UniXNU-sheng includes the kernel work-interval patches and mounts the AppOS cryptex on macOS 27.3.
证据
device: The full system reached the desktop about two minutes after the boot command (2026-11-09). Command:fastboot boot sheng-macos26-kernel.img. Revision:36e11087791ca3b68505ee19c1f8602d7713039d.