Skip to content

Xiaomi Pad 8 Pro: first XNU boot from RAM (OnePlus 13T base) (donyanchen) ​

donyanchen/UniXNU-piano

Xiaomi Pad 8 Pro (piano, SM8750) boots iPadOS 17.7.11 from RAM through a Mu-Silicium based UEFI, using the SM8750 support and the board-owned storage, PMGR and firmware integration. Not booted on the device yet.

Source record: porting.toml, a596eb2e9034bdd951b9551fffda932edb3a2266.

This page is generated from the device record.

AreaStatus
Configurationimplemented
Firmware and bootimplemented
CPU and interruptsimplemented
Memory and DMAplanned
Storage and rootimplemented
Displayplanned
Inputplanned
GPUnot-applicable
Networknot-applicable
Audionot-applicable
Powerimplemented
Image assemblyplanned
Diagnosticsplanned

Configuration ​

implemented

Hardware and dependencies ​

  • SM8750 SoC support from the OnePlus 13T port (UniXNU-sm8750-common), an iPadOS 17.7.11 (21H461) IPSW, and a UniXNU checkout pinned by the packaging workflow.

Configuration ​

  • board.soc_source = sm8750; board.os_profile = ipados-17.7.11-21H461; board.kit = piano; schema_version = 2.
  • configs/piano_defconfig selects the native UFS, AES, virtio block and ram block archives plus CONFIG_XNU_SHENG_PMGR; configs/piano_bootstrap_defconfig is the same selection with CONFIG_XNU_SHENG_PMGR off.
  • [kernel].archives is read from board.toml, not from the defconfig, so a selection change has to touch both files.

Procedure ​

  • Run ./unixnu defconfig piano_defconfig -D ../device from the UniXNU checkout.
  • Run ./unixnu fetch, ./unixnu ipsw fetch -D ../device and ./unixnu tree -D ../device.
  • Trigger .github/workflows/package-bare-metal.yml with os=17 and jobs=4.

Development findings ​

  • With the root-auth panic short-circuited the root mounts and the next stop is lock_rw.c:1400, 'Taking non-sleepable RW lock with preemption enabled', on one CPU as well as eight and with or without the rd argument - so it is not SMP and not rd, it is simply the first DEBUG_LOCKS assertion the boot reaches once mounting succeeds. The workflow now builds target = RELEASE, which compiles that assertion out; if the boot then hangs somewhere instead of panicking, the same lock is still the suspect and needs its caller resolved from the kernel symbol table.
  • A kernel patch that rewrites bsd_init.c has to run between two build passes: the XNU sources under .cache/xnu-work are unpacked by 'unixnu build kernel' itself, not by the tree step, so a patch step placed before the first build finds no bsd_init.c at all (find returns nothing, the grep loop stays silent, and the run still succeeds with the old code). The kernel step now builds once with the result ignored, applies prepare-xnu-root-auth.py, deletes the stale bsd_init.o and builds again.
  • The sealed-root gate is short-circuited in the kernel instead of being dodged with rd=md0: scripts/prepare-xnu-root-auth.py rewrites the root-auth panic in bsd_init.c to a no-op. rd=md0-ufs did get past that panic, but the rd argument also changes the root-device lookup and the next stop was lock_rw.c:1400 on one CPU as well as eight, so it was not an SMP problem.
  • Eight CPUs are not usable yet: with cpus=8 and sheng-smp=1 the sealed-root gate passes but XNU panics in lock_rw.c:1400 ('Taking non-sleepable RW lock with preemption enabled'), which is a DEBUG-kernel assertion that single-CPU boots never reach. cpus stays 1 until the SMP path is fixed; rd=md0-ufs is what got past bsd_init.c:1101.
  • bsd_init.c:1101 refuses a root that is not sealed unless bsd_rooted_ramdisk() says otherwise, and that only looks at the rd boot argument (prefix md0). UniXNU's fuxi port hit the same wall and uses rd=md0-ramblock; this board now passes rd=md0-ufs, which still leaves IOFindBSDRoot on the UUID match because the md path needs exactly three characters. root-unverified=1 is a macOS-only switch and had no effect here.
  • The root mounts but XNU refuses it: bsd_init.c:1101 panics with 'rootvp not authenticated after mounting'. The ipados image carries no SSV signature, so the kernel needs root-unverified=1 to skip the authenticated-root check; board.toml now passes it.
  • UFS reads on the device now: after DME_HIBERNATE_EXIT (the firmware parks the link there), START STOP UNIT on the UFS Device well-known LU 0xD0 for level 4, the device wakes from bCurrentPowerMode 0x33 (UFS-PowerDown) to 0x11 (Active) and every command completes - L0 reports last=03d3f1ff with 4096-byte blocks, INQUIRY returns 'SKhynix HN8T171E', and the GPT header reads back 'EFI PART'. board.toml now boots with native-ufs-root=1 (was native-ufs-probe=4) against the ipados window at LBA 55778816.
  • The firmware can read the UFS partition (its UFSDxe installs two DiskIo handles and the payload is read from ipados at 12 GiB), but the kernel reaches the controller with the UniPro link at Gear 0 and zero lanes, so the doorbell is never fetched: 'pmc ok=0 gear tx/rx=0/0 lanes=0/0'. HCS stays 0x10f, so the controller is up and the PHY is what went away on hand-over. scripts/prepare-shengufs-phy-power.py reports GCC_UFS_PHY_GDSCR and GCC_UFS_MEM_PHY_GDSCR (0x77004, 0x9e000) and brings them up with SM8750's votable layout (SW_OVERRIDE bit2, PWR_ON bit16).
  • The firmware trains the UFS link itself: the memory log prints 'Successfully Enabled UFS Cache Coherency' and UFSDxe.efi then installs two DiskIo handles, so the board already has working storage before the payload starts. scripts/prepare-shengufs-host-reset.py was the wrong fix for the earlier doorbell symptom: its DME_RESET tears that trained link down and DME_LINKSTARTUP cannot retrain it, which is the panic 'pmc ok=0 gear tx/rx=0/0 lanes=0/0'. The workflow no longer runs it, so the kernel adopts the firmware's link as ShengUfs was written to.
  • The kernel step runs as two passes. configs/piano_bootstrap_defconfig builds a kernel without the sheng PMGR binder and stages it as build/xnu-prelink/native-owner-ufs-rootauth3-candidate.macho, because build-sheng-platform-power.py refuses to start without a reference candidate ('No reference candidate available').
  • The PMGR binder is listed in [kernel].archives, which the bootstrap pass also reads, so the candidate step removes that line from board.toml with python (macOS sed -i treats the next argument as the suffix), builds, and restores the file.
  • build-sheng-platform-power.py compiles $TREE/kits/sheng/ShengPlatformPower.cpp, while the board ships the source at package/ShengPlatformPower.cpp; the defconfig step now copies it into both out/.../piano/tree/kits/sheng and out/.../piano_bootstrap/tree/kits/sheng.
  • audit-amfi-pmgr-contract.py reads tree/.cache/firmware/kernelcache.macho/kernelcache.release.ipad7.decompressed, so the candidate step copies out/ipsw/21H461/kernelcache.decompressed there.
  • The UEFI checkout is read-only, and its piano.dsc lacks the UniXNULib mapping (error 4000), so patches/uefi/piano-dsc-unixnulib.patch is applied in the prep step with the two-level uefi/uefi/pianoPkg/piano.dsc path.
  • patches/xnu/series on the SoC side already carries sheng-platform-power.patch; adding it to the device series applies it twice and fails at bsd_init.c:688.
  • The device release is driven by scripts/package.sh, which only resolves [package] unixnu from board.toml and hands everything else to the pinned UniXNU checkout.
  • The payload cannot travel in the boot image: a vendor ABL refuses a ramdisk that large, so the bootimg step is invoked with --ramdisk none and boot.img is the UEFI firmware plus the device tree only (3162112 bytes). The payload is handed over USB instead, and the boot manager waits for it; that wait used gBS->Stall, which is a busy wait on the metronome and dispatches no event notify, so the 5 ms FbPoll timer that reads the fastboot endpoint never ran and nothing could ever be staged. PianoFastbootWaitPayload now pumps FbPoll by hand with the periodic timer cancelled.
  • The board exposes only volume up (SCAN_LEFT), volume down (SCAN_RIGHT) and power (Enter), while the UniXNU menu navigated on SCAN_UP/SCAN_DOWN and treated SCAN_RIGHT as boot the selected entry. A volume press could therefore not move the highlight and the first press booted the selected entry. patches/unixnu-menu-volume-keys.patch accepts SCAN_LEFT as up and SCAN_RIGHT as down and stops treating SCAN_RIGHT as boot; power still sends Enter.
  • ShengUfs hardcodes its GCC offsets in GccUfs.h and declares SM8550 clocks as a board dependency, so no ufshc nodes in piano.dts can make it work. The rest of the driver is portable: it never programs the PHY, the SMMU helper scans the stream-match table, and the root layout is parsed from the payload. scripts/prepare-shengufs-gcc.py moves the eight offsets that differ to their SM8750 values, in both the fetched feed and the assembled tree.
  • CONFIG_XNU_NATIVE_LEGACY_DISPLAY stays off. Enabling it makes bsd_init.c and the mobile graphics client call native_legacy_display_probe, which only kits/sheng/LegacyDisplayProbe.cpp defines; this board ships no such file and the kernel link fails with that symbol undefined.
  • The SMMU keeps the previous OS's stream entry for the UFS host. The ShengUfs probe (native-ufs-probe=7) reads scr0=00250405 idr0=4c017e7f idr1=50000053 and SID 0x60 matched to SMR[1]=80000060 / S2CR[1]=00000001, so the block is present, the geometry (64 pages, 83 banks, 0x93000 bytes) fits the window, and the refusal is that the stream is already pointed at a translating context bank left over from Android. scripts/prepare-shengufs-smmu-takeover.py lets the planner keep that exclusive entry and makes the writer invalidate SMR before it rewrites S2CR (the arm_smmu_write_sme order), and the refusal panic now prints idr0/idr1/idr2/scr0.
  • The SMMU window was too small for this part: the runtime IDR1 read is 0x60000053, so NUMPAGENDXB 6 puts the context-bank array at 0x80000 and CB82 ends at 0xD3000, past the kit's 0xD0000 budget; the same value also decides the planner's geometry guard, which is why the xnu entry panicked before any SMR was read. scripts/prepare-shengufs-smmu-takeover.py now widens both mapPhys calls (bypass and context-bank survey), the survey guard and the planner guard to 0x200000, and keeps the exclusive-stream take-over.
  • out/feeds carries two SmmuTakeover.h files: the ShengUfs driver's own copy and the SM8750 platform kit's refactored one, which passes the window in as mapBytes. A grep self-check over every file with that name fails on the second, so the takeover script now verifies the files it rewrote (no old string left) and the workflow step greps only the ShengUfs feed.
  • With the window widened the xnu entry no longer panics on geometry: the board resets a few seconds after the handoff, which is a different failure from the parked panic screen seen before. A temporary probe (scripts/prepare-shengufs-smmu-probe.py) panics right after smmuBypassStream returns, to separate a context-bank write that resets the SoC from a later hang that the watchdog ends.
  • The SM8750 SMMU support is not in ShengUfs's own tree: it lives in the SoC kit behind NATIVE_UFS_SM8750 (kUfsSmmuMapBytes 0x100000, matching sm8750.dtsi's reg = <0 0x15000000 0 0x100000>; Piano's device tree was trimmed to 0x1000). scripts/prepare-shengufs-smmu-upstream.py installs that planner into the ShengUfs feed with the define forced, accepts any exclusive stream entry because piano's Android leaves SID 0x60 on bank 1 with S2CR 0x1 (PKX110 leaves 0), and keeps SMR-before-S2CR ordering. This supersedes the local takeover/window patches.
  • The kernel boots to IOKitBSDInit and panics with 'Failed to mount root device': the UFS path works, but no iPadOS disk is attached. The root image cannot go at the start of userdata (that is Android's /data), so the driver gains a window mode (native-ufs-window-lba/-blocks) that reads the manifest at an arbitrary contiguous block run, and .github/workflows/userdata-image.yml builds the raw image in CI (IPSW decode needs git and Apple's CDN, neither of which the build host can reach) in ~1.9 GiB parts.

Completion criteria ​

  • All source pins resolve, every selected component is covered by an area, and the two-pass kernel build links with the sheng PMGR archive force-loaded.

Current limits ​

  • The UniXNU revision is pinned in the workflow; the effective component set is only visible through ./unixnu status.
  • The boot image no longer carries the payload, so a boot needs the host to stage payload.img inside the boot manager's wait window.

Next action ​

  • Compare ./unixnu status --json output whenever a defconfig, fragment or source pin changes.
  • Boot the payload over USB and record whether the menu reports a published volume and where XNU stops.
  • The DarwinBoot EL1 patch is applied inside UniXNU's driver submodule, so the prep step initialises exactly that submodule first (git -C UniXNU submodule update --init --depth 1 drivers/DarwinBoot): UniXNU itself is checked out with fetch-depth 1 and no submodules, and without the init the patch has no tree to apply to and the follow-up grep fails the job.

Evidence ​

Firmware and boot ​

implemented

Hardware and dependencies ​

  • Mu-Silicium based UEFI for SM8750, spliced through tools/setup-deps.sh, plus the board UEFI repository pinned by the workflow.

Configuration ​

  • [firmware] config = piano, dsc = Platforms/Xiaomi/pianoPkg/piano.dsc, fd = Build/pianoPkg/{target}_CLANGPDB/FV/SILICIUM_UEFI.fd.
  • [firmware].packages lists the UEFI root, {tree}/package, {tree}/kits, {tree}/drivers/DarwinBoot and the EDK II/Mu trees.
  • [firmware.defines] UNIXNU = 1 and DEVICE_MODEL = piano.

Procedure ​

  • Run uefi/tools/setup-deps.sh in the UEFI checkout.
  • Apply patches/uefi/piano-dsc-unixnulib.patch at the repository root.
  • Run ./unixnu build firmware -D ../device --uefi ../uefi/deps/Mu-Silicium.

Development findings ​

  • The firmware volume failed with error 4000 ('Instance of library class [UniXNULib] is not found for module ... UniXNU.inf') because pianoPkg/piano.dsc had no LibraryClasses mapping for UniXNULib; the patch adds it.
  • ENABLE_SECUREBOOT defined empty made '#if ENABLE_SECUREBOOT == 1' an invalid token; the DSC now defines it as 0.
  • The firmware packages list needs drivers/DarwinBoot rather than the older PaganiDarwinBoot path.
  • The payload cannot travel in the boot image: a vendor ABL refuses the 160 MiB ramdisk (oem debuglog shows UNIXNURAMDISK publishing the stale 38.9 MB Android initrd the device tree still names), and vendor_boot is only 96 MiB, so neither field fits a 125 MB kernel. The fastboot path carries it instead: FB_MAX_DOWNLOAD rises to 256 MiB, 'oem ramdisk' publishes the staged bytes as a read-only BlockIo volume for the FAT driver, and DeviceBootManagerAfterConsole waits up to 180 s for that volume before UniXNU scans the volumes once (twenty seconds raced the host's re-enumeration: the firmware drops off the bus shortly after the menu is drawn, so every attempt lost the enumeration and nothing was ever staged). The patch also keeps the fastboot bring-up trace: the UsbDevice protocol and StartEx results are printed and held, and both are retried (10 x 200 ms and 5 x 300 ms). PmicDxe stays disabled: its SPMI channel 690 access faults because ABL no longer grants that channel to the apps execution environment, and the fault is what the vendor comment records. UFS still enumerates, so the protocols the storage path needs are provided by the unconditionally loaded charger and platform drivers; a StartEx failure would point at the rails rather than at a missing protocol.
  • The stock boot manager never started UniXNU.efi: DeviceBootManagerAfterConsole ran PianoDtbInstall, PianoFastbootStart, StartEspLoader and StartFvApp(AndroidBoot), so the menu built into the firmware volume was unreachable. The first patch added a StartFvApp call with UniXNU's FILE_GUID; the board then booted UEFI all the way to the console and dropped into the UEFI Shell instead of the menu, because StartFvApp built its device path from DevicePathFromHandle(LoadedImage->DeviceHandle), which inside BDS does not carry a usable firmware volume path, so EfiBootManagerBoot failed silently. StartFvApp now reads the PE32 section with GetSectionFromAnyFv and calls LoadImage/StartImage itself, and prints each outcome on the console so the next boot states whether the image is in a volume, failed to load, or returned.
  • The payload volume publishes on the device: build 43001198573 (28ab843) answers 'fastboot oem ramdisk' with OKAY in 11 ms after 'stage' moves 160 MiB in 3.918 s, and the UniXNU menu then offers the xnu entry (reports/uefi-boot-43001198573.md). The earlier 'cannot publish the payload' was the duplicated A9C6827C device path, not the transfer buffer: with 3E7B9C41 and no 160 MiB copy the install succeeds. The memory log is not retrievable in that session - oem debuglog plus get_staged return 0 bytes, because the firmware stops servicing the fastboot endpoint once UniXNU takes the console.
  • The fastboot poll timer is re-armed after the payload window. PianoFastbootWaitPayload cancels the 5 ms FbPoll timer so it can pump the endpoint by hand, and only restored it on the no-payload path: once the payload arrived the firmware still answered 'oem ramdisk' but ignored 'oem debuglog', which is why the 43001198573 run produced a 0-byte memory log right after a successful publish. Both paths re-arm now, so UniXNU's DEBUG lines stay reachable after the menu appears - the only channel this board has, since it has no serial port and the XNU display path is not up yet.
  • The fastboot poll timer is re-armed after the payload window, so the memory log stays reachable once UniXNU owns the console: the 43021581743 run returned 174,337 bytes of debuglog after 'oem ramdisk' answered OKAY, where the earlier build returned 0.
  • The 160 MiB FAT32 payload (2 KiB clusters) could not be read back on the device: UniXNU loaded unixnu.toml from it, but the XNU entry returned EFI_VOLUME_CORRUPTED right after opening Payloads/kernel.macho, and DarwinBoot surfaced that as 'Volume Corrupt'. Rebuilding the same three files into a 4 KiB-cluster FAT16 volume (40,915 clusters) moved the failure to the next guard, so the read succeeded; the payload step now writes FAT16 by dropping mformat's -F and asking for -c 8.
  • DarwinBoot then refused the handoff with EFI_UNSUPPORTED. Its Boot() guard rejects staged kexts, a passed-in device tree, or a current exception level other than EL1; the device log shows 0 staged kexts and the entry carries no dtb (UniXNUPrepareDeviceTree returns early when Entry->Dtb is NULL), so the exception level is what fired: Mu-Silicium's SEC configures HCR_EL2 and stays at EL2, while XNU must start at EL1. DarwinBoot now accepts EL2 and switches to EL1 (HCR_EL2.RW=1, SPSR_EL2=EL1h|DAIF, ELR_EL2=entry, eret) immediately before entering the kernel, instead of the previous 'br x1' at EL2.
  • The DarwinBoot patch needs its submodule first: UniXNU is checked out without submodules, so drivers/DarwinBoot is empty at prep time and the patch step must run 'git -C UniXNU submodule update --init --depth 1 drivers/DarwinBoot' beforehand.
  • The package workflow takes a 'runner' workflow_dispatch input (macos-26 default, macos-15 as a fallback) because macos-26 is a limited-preview image and a dispatch can sit queued for an hour; the job's runs-on reads that input so a stuck queue is bypassed by re-dispatching with macos-15.
  • DarwinBoot now DEBUG-prints the boot request inputs (kext count, device tree pointer and size, raw CurrentEL) before its guard, because the device still returns Unsupported with the EL2 acceptance applied and every other disjunct is false in the configuration.
  • The UniXNU screen surface is PixelRedGreenBlueReserved8BitPerColor on this board; keeping only the BGR case made DarwinBootVideoFromGop return EFI_UNSUPPORTED, which the menu reports as the xnu entry failing. Both orders are accepted and the buffer is passed through unchanged.
  • The panel reports EFI_PIXEL_BIT_MASK, not one of the fixed 8-bit orders: DarwinBoot now logs the GOP format and its channel masks and accepts any 32-bit order, because rejecting the mode surfaces as the whole xnu entry returning Unsupported.
  • The panel reports EFI_PIXEL_BIT_MASK rather than one of the fixed 8-bit orders: DarwinBoot now logs the GOP format with its channel masks and accepts any 32-bit order, because refusing the mode surfaces as the whole xnu entry returning Unsupported.
  • A failing Boot() returns to UniXNU and the menu prints that status, which reads as 'entry 0 returned Unsupported'; Boot() only Print()s its cause, so the reason never reaches the memory log. DarwinBoot links DebugLib, so every guard and the Fail label need DEBUG lines.
  • native-ufs-probe=7 is the read-only SMMU probe: it panics with scr0/idr0/idr1/gfsr, the SMR table summary and the SID 0x60 match, so the geometry the ShengUfs planner rejects can be read off the device without writing any SMMU register.

Completion criteria ​

  • The firmware step emits SILICIUM_UEFI.fd for pianoPkg with the UniXNU application linked in.

Current limits ​

  • The firmware boots and publishes the payload, but no XNU boot has been captured: the memory log is empty in every session that reaches the menu, so a failure after the menu would show only on the screen.

Next action ​

  • Capture the XNU verbose output from the menu (screen or pstore): publish, menu and input are confirmed, the kernel handoff is not.

Evidence ​

CPU and interrupts ​

implemented

Components: ArmCpu, ArmDTPlatform.

Hardware and dependencies ​

  • SM8750 CPU nodes in the device tree, the ARM generic timer, and the GICv3 ranges of the SoC.

Configuration ​

  • CONFIG_XNU_ARMCPU, CONFIG_XNU_ARM_DT_PLATFORM and CONFIG_XNU_NATIVE_ARCH_TIMER in piano_defconfig.
  • board.toml [components].include selects ArmCpu and ArmDTPlatform; [kernel].archives builds both as components.

Procedure ​

  • Run ./unixnu build kernel -D ../device and inspect logs/component-ArmCpu.log.
  • Boot with cpus=1 in the kernel arguments (board.toml [payload].kernel_args).

Development findings ​

  • The first RAM boot is limited to one CPU through the cpus=1 kernel argument, so smp bring-up is not exercised yet.
  • The BCM2837 panic buffer address in the shared code is not mapped on this device, so CONFIG_XNU_DT_PANIC_REGION is enabled to take the panic region from the device tree.

Completion criteria ​

  • Every enabled CPU reaches its entry checkpoint and timer/IPI handling works.

Current limits ​

  • Only one CPU is expected to be online on the first boot.

Next action ​

  • Raise cpus once one CPU boots to user space.

Evidence ​

Memory and DMA ​

planned

Hardware and dependencies ​

  • DRAM layout, the reserved regions of the SM8750 firmware, and the owned memory size handed over by UEFI.

Configuration ​

  • [payload] dram_size = 0x180000000; [payload.adt] owned_memory_size = 0x100000000.
  • [adt.defaults.u32] sleep-disabled = 1.

Procedure ​

  • Read the UEFI memory map from the firmware serial output and compare it with dts/piano.dts reservations.

Development findings ​

  • The owned memory size is 4 GiB while the payload DRAM size is 6 GiB; no device boot has validated the split yet.

Completion criteria ​

  • The kernel boots with the retained reservations intact and DMA of the storage and display controllers stays inside the owned range.

Current limits ​

  • A device memory map has not been captured yet.

Next action ​

  • Capture the UEFI memory map on the first boot and reconcile it with the device tree.

Evidence ​

Collect evidence using the next action.

Storage and root ​

implemented

Components: ShengUfs, VirtioMmioBlock, RamBlock, VerifiedRoot.

Hardware and dependencies ​

  • iPadOS 17.7.11 (21H461) IPSW, the signed verified-root policies from 044-76040-038.dmg and 044-76034-038.dmg, and the original kernelcache as the ABI reference.

Configuration ​

  • CONFIG_XNU_NATIVE_UFS, CONFIG_XNU_NATIVE_VIRTIO_BLOCK, CONFIG_XNU_NATIVE_RAM_BLOCK and CONFIG_XNU_VERIFIED_ROOT_PROBE.
  • CONFIG_XNU_NATIVE_UFS_ARCHIVE, CONFIG_XNU_NATIVE_VIRTIO_BLOCK_ARCHIVE, CONFIG_XNU_NATIVE_RAM_BLOCK_ARCHIVE and CONFIG_XNU_VERIFIED_ROOT_ARCHIVE point at the archives the kernel step builds.
  • [payload].kernel_args carries native-ufs-root=1; [payload.adt].root_match_volume_uuid names the APFS volume 04769D26-2CA0-4825-B443-E2E5F88300F2 of 044-76040-038.dmg.

Procedure ​

  • Run ./unixnu ipsw fetch -D ../device to place the IPSW under out/ipsw/21H461.
  • Run python3 scripts/prepare-ufs-policies.py --tree <tree> --inputs <ipsw> --openssl-prefix $(brew --prefix openssl@3).
  • Run ./unixnu build kernel -D ../device, which builds ShengUfs, VirtioMmioBlock and RamBlock and their bindings against kernelcache.decompressed.

Development findings ​

  • The three storage components share one set of binding objects: 468d1fd put the raw bindings only in libShengUfs.a and let VirtioMmioBlock and RamBlock reuse them, which removed twelve duplicate symbols at link time.
  • 67ad370 dropped a native_ufs_store_write stub already provided by NativeUfs.o, and 2b1e6ec kept only the weak native_ufs_store_write_cached stub.
  • The policies step has to read the DMG files from out/ipsw/21H461, not from the device output directory (e04d7c2).
  • The verified-root probe needs -Wno-missing-include-dirs because the probe compiles outside the SDK include set (70c6fc7).
  • The binding scripts take the kernelcache as the ABI reference and the PMGR audit reads it from tree/.cache/firmware/kernelcache.macho/, so the candidate step copies it there.

Completion criteria ​

  • The kernel links with the storage archives, the prelink succeeds, and the payload declares the native UFS root.

Current limits ​

  • No UFS controller has been probed on the device; the APFS root has never been mounted.

Next action ​

  • Boot with native-ufs-root=1 and capture the first UFS probe output.

Evidence ​

Display ​

planned

Components: GopFramebuffer.

Hardware and dependencies ​

  • UEFI GOP framebuffer handed over by the firmware, panel timing of the Pad 8 Pro and the ktz8866 backlight.

Configuration ​

  • [components].include selects GopFramebuffer.
  • [payload].kernel_args carries offline-legacy-gop=1.
  • [adt.chosen.u32] display-scale = 2 and display-rotation = 0.

Procedure ​

  • Read the framebuffer base and size from the UEFI output, then boot with offline-legacy-gop=1.

Development findings ​

  • The splash region of the device is 0xfc800000 with a size of 0x2b00000, the same base the Pagani 13T port uses for FB_BASE.
  • The native Adreno path is disabled (CONFIG_XNU_NATIVE_ADRENO is not set) and the legacy display path is disabled too, so the first boot is expected to use the GOP framebuffer.

Completion criteria ​

  • The verbose XNU boot log is visible on the panel from a RAM boot.

Current limits ​

  • No framebuffer handover has been observed on the device.

Next action ​

  • Confirm the GOP base and stride against the firmware output on the first boot.

Evidence ​

Input ​

planned

Hardware and dependencies ​

  • Novatek touch controller, the pogo keyboard cover and the volume/power keys of the Pad 8 Pro.

Configuration ​

  • [adt.buttons.string] compatible = buttons; [adt.buttons.strings] button-names = [hold, voldown, volup]; [adt.buttons.u32] home-button-type = 2.

Procedure ​

  • Boot with the buttons node present and read the HID devices from the boot log.

Development findings ​

  • The device tree only describes the physical buttons; no touch or keyboard driver is selected yet.

Completion criteria ​

  • Buttons and touch report events under XNU.

Current limits ​

  • The touch controller is not part of the first RAM boot scope.

Next action ​

  • Inventory the Novatek touch node and its interrupts for a later pass.

Evidence ​

Collect evidence using the next action.

GPU ​

not-applicable

Hardware and dependencies ​

  • Adreno 830 GMU and SMMU, which are out of scope for the first RAM boot.

Configuration ​

  • CONFIG_XNU_NATIVE_ADRENO is not set in piano_defconfig.

Procedure ​

  • Not applicable until the first boot reaches user space.

Development findings ​

  • The first RAM boot only needs a framebuffer console, so no GPU component is selected.

Completion criteria ​

  • Not applicable while the GPU component set is empty.

Current limits ​

  • SM8750 GPU support would need the Adreno 830 GMU, SMMU and firmware integration that the shared SM8750 support does not carry yet.

Next action ​

  • Revisit after the first boot reaches a user session.

Evidence ​

Collect evidence using the next action.

Network ​

not-applicable

Hardware and dependencies ​

  • The Pad 8 Pro Wi-Fi module, which is not identified in the device tree yet.

Configuration ​

  • No network component is selected in board.toml.

Procedure ​

  • Not applicable for the first RAM boot.

Development findings ​

  • The community SM8750 support has no working Wi-Fi component for this platform, so the first boot is offline.

Completion criteria ​

  • Not applicable while the network component set is empty.

Current limits ​

  • The Wi-Fi module and its firmware are unidentified.

Next action ​

  • Identify the Wi-Fi module from the hardware once boot is stable.

Evidence ​

Collect evidence using the next action.

Audio ​

not-applicable

Hardware and dependencies ​

  • Pad 8 Pro speaker amplifiers, which are out of scope for the first RAM boot.

Configuration ​

  • No audio component is selected in board.toml.

Procedure ​

  • Not applicable for the first RAM boot.

Development findings ​

  • Audio is not needed to observe the verbose boot log.

Completion criteria ​

  • Not applicable while the audio component set is empty.

Current limits ​

  • The amplifier and codec parts of the Pad 8 Pro are not integrated.

Next action ​

  • Revisit with the measured codec I2C addresses after boot.

Evidence ​

Collect evidence using the next action.

Power ​

implemented

Components: AppleKeyStoreState.

Hardware and dependencies ​

  • The original ApplePMGR implementation of the reference kernelcache, and the 340-entry provider table of IOPMGR.

Configuration ​

  • CONFIG_XNU_SHENG_PMGR in piano_defconfig; the bootstrap defconfig leaves it off.
  • [payload].kernel_args carries sheng-pmgr=2.

Procedure ​

  • Build the bootstrap kernel without the PMGR binder and stage it as the reference candidate.
  • Run ./unixnu build kernel -D ../device, which runs build-sheng-platform-power.py against that candidate.
  • Read logs/archive-15-build-sheng-platform-power.log.

Development findings ​

  • build-sheng-platform-power.py audits the AMFI read/OR/write sequence and the AppleT8011PMGR provider slots of the reference candidate before it emits the archive, and refuses to build when either check fails.
  • The instrument inherits only the two original AON slots (320, 321) from ApplePMGR and refuses every unimplemented slot through unavailable(), so a missing power backend stops instead of writing.
  • The bootstrap pass cannot run the same binder because the binder is the thing that needs the candidate it produces; the candidate step therefore strips it from [kernel].archives for that pass only.
  • The archive is registered late (llvm-objcopy removes __DATA,__mod_init_func) and the script asserts the late registration cannot change the instructions of the object.

Completion criteria ​

  • The kernel links with libShengPlatformPower.a force-loaded and keeps the original AMFI and PMGR dispatch unchanged.

Current limits ​

  • The instrument is a refusal-first integration, not a functional power backend, and is not runtime qualified (runtime_qualified = false in its build report).

Next action ​

  • Read the sheng-pmgr=2 output on the first boot and record which slots refuse.

Evidence ​

Image assembly ​

planned

Components: DarwinBoot, XnuPrelink, SoftwareAES.

Hardware and dependencies ​

  • The linked XNU kernel, the prelink tool at kits/XnuPrelink, the iPadOS 17.7.11 kernelcache as the prelink hash reference, and the DarwinBoot booter.

Configuration ​

  • [kernel.prelink] tool = kits/XnuPrelink/emit_prelink.py, kernel = build/xnu/ios-obj/DEVELOPMENT_ARM64_BCM2837/mach.development.bcm2837.unstripped.noctf, slide = -0x1000000.
  • [kernel.prelink].kernelcache_sha256 pins the 21H461 kernelcache; [kernel.prelink].roots lists the eleven IOKit and kext roots the prelink closure keeps.
  • [bootimg] embed_payload = true, partition = unixnu, lba 44928768..61705983 at 4096 bytes per LBA, with OS and SystemOS windows.

Procedure ​

  • Run ./unixnu build kernel -D ../device, then ./unixnu build package -D ../device.
  • Run ./unixnu build firmware --uefi ../uefi/deps/Mu-Silicium, ./unixnu build payload -D ../device and ./unixnu bootimg -D ../device.

Development findings ​

  • The kernel links and prelinks successfully on the macOS runner: kernel.macho sha256 4c9dcef0... was produced in run 42755922774.
  • The DarwinBoot firmware package registers the board store hooks and the VerifiedRoot policy archive (5e6b930).
  • The payload requires the linked kernel to carry the sheng PMGR integration; dropping CONFIG_XNU_SHENG_PMGR or the archive makes it fail with 'native UFS root kernel lacks the linked sheng PMGR integration'.
  • The boot image targets a unixnu partition, but the device currently has only userdata, super and metadata. The Partition Manager layout and the DSU-style approach of the Pagani port are both still open.

Completion criteria ​

  • Kernel and prelink succeed, the payload contains every declared input, and boot.img matches the bootloader format and size limit.

Current limits ​

  • payload and bootimg have not completed yet, and no boot img has been flashed or RAM-booted.

Next action ​

  • Complete the payload and bootimg steps, then decide between a unixnu partition and a DSU-style RAM boot before touching the device.

Evidence ​

Diagnostics ​

planned

Components: VerifiedRoot, AppleKeyStoreState.

Hardware and dependencies ​

  • UEFI serial output, the XNU verbose boot log, and the boot_progress_poll weak stub added in d185787.

Configuration ​

  • CONFIG_XNU_EARLY_BOOT_PROGRESS is enabled; CONFIG_XNU_BOOT_PROGRESS is not set.
  • [payload].kernel_args carries -v, debug=0x14e, startup_debug=0 and pagani-platform-status=1.

Procedure ​

  • Capture the UEFI serial console during fastboot boot.
  • Read the panic and progress lines from the captured output.

Development findings ​

  • The early boot progress path needs boot_progress_poll, which a weak stub provides until a board implementation exists (d185787).
  • Several patch series add panic output for early boot (zzzz-early-boot-progress, zzzzz-root-panic-progress, zzzz-boot-progress-panic-output), so a failure before serial init still reaches the screen.
  • piano has no serial console, so the first UEFI boots gave no evidence about the payload: UniXNURamDiskDxe publishes nothing and the menu only said 'no boot entry found'. scripts/prepare-unixnu-diagnostics.py rewrites that line during packaging so it reads 'payload volume missing' or 'config unreadable', which separates a missing initrd handoff from an unreadable FAT volume without any cabling.

Completion criteria ​

  • Each claimed milestone has a reproducible command, a matching image revision and an accessible result.

Current limits ​

  • No serial capture of a device boot exists yet.

Next action ​

  • Set up a serial or pstore capture before the first RAM boot.

Evidence ​

Released under the BSD-2-Clause-Patent License.