Skip to content

Redmi K60 (mondrian/SM8475): UniXNU UEFI bring-up (ZxbMsl160918) ​

ZxbMsl160918/UniXNU-mondrian

Redmi K60 (mondrian/SM8475). Format 2 device: the kernel builds and prelinks, the payload and the boot image still need the board ADT and the hardware bring-up.

Source record: porting.toml, c39ff292eee2726c0135f3ba3a98462c9c21d8de.

This page is generated from the device record.

AreaStatus
Configurationimplemented
Firmware and bootdevice-verified
CPU and interruptsimplemented
Memory and DMAimplemented
Storage and rootplanned
Displayplanned
Inputplanned
GPUplanned
Networkplanned
Audioplanned
Powerplanned
Image assemblyhost-verified
Diagnosticsdevice-verified

Configuration ​

implemented

Components: ArmDTPlatform, ArmCpu, XnuPrelink.

Hardware and dependencies ​

  • Identify the configuration hardware, resources and existing component interfaces for this board.

Configuration ​

  • Record the board.toml fields, DTS properties and defconfig values used for configuration.

Procedure ​

  • Follow the configuration stage in the porting guide and record the actual commands.

Development findings ​

  • Migrated from format 1 on 2026-10-28: board.toml is schema_version = 2 with soc_source sm8475 and os_profile ipados-16.6.1-20G81, the SM8475 resources live in UniXNU-sm8475-common, and the board wiring in dts/mondrian.dts.
  • Fork audit 2026-10-31: mzyxsl daed6b5d44e3c62978cc0fce4e876ded2a57afc9 imported with provenance. board.toml uses an exact trust-cache list; unixnu.lock matches the explicit SM8475 feed pin. The current payload reader also accepted an exactly equal scalar hash, so the list is schema hardening rather than a proven former build blocker.

Completion criteria ​

  • All source pins resolve; every selected component has a record; status shows the intended overrides and patch order.

Current limits ​

  • Hardware inputs and implementation are pending for this board.

Next action ​

  • Inventory the required configuration inputs before implementation.

Evidence ​

Firmware and boot ​

device-verified

Hardware and dependencies ​

  • Identify the firmware and boot hardware, resources and existing component interfaces for this board.

Configuration ​

  • Record the board.toml fields, DTS properties and defconfig values used for firmware and boot.

Procedure ​

  • Follow the firmware and boot stage in the porting guide and record the actual commands.

Development findings ​

  • Collect the first firmware and boot observation, its cause when established, and the resulting implementation decision.

Completion criteria ​

  • Firmware image builds, enters UniXNU, publishes the framebuffer and preserves the documented memory reservations.

Current limits ​

  • Hardware inputs and implementation are pending for this board.

Next action ​

  • Inventory the required firmware and boot inputs before implementation.

Evidence ​

CPU and interrupts ​

implemented

Hardware and dependencies ​

  • Identify the cpu and interrupts hardware, resources and existing component interfaces for this board.

Configuration ​

  • Record the board.toml fields, DTS properties and defconfig values used for cpu and interrupts.

Procedure ​

  • Follow the cpu and interrupts stage in the porting guide and record the actual commands.

Development findings ​

  • The SM8475 hardware MPIDRs are flat: 0x000..0x700, Aff1 = core index. That is what the vendor device tree and the Android tree carry, and this firmware rejects every CPU_ON target outside that table. The 4/3/1 A510/A710/X2 grouping seen in Android's sysfs is L2/L3 cache topology, not MPIDR affinity, and the kernel's cluster-type property (all 'P') is what collapses the eight cores into one topology cluster.
  • A starting core is matched to its cpu data by MPIDR & 0xFFFF against the ADT's per-CPU reg, and the same value is the PSCI target, so the ADT must carry the real MPIDRs. The board dts must not override the SoC dtsi's cpu nodes: the ADT generator needs their compatible string and their unixnu,cluster-type.

Completion criteria ​

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

Current limits ​

  • The eight cores register and the boot CPU takes its first IPI, but no secondary has yet been seen past its own entry checkpoint on hardware.

Next action ​

  • Confirm that each secondary CPU runs its own entry checkpoint and serves a timer on the unit.

Evidence ​

Memory and DMA ​

implemented

Hardware and dependencies ​

  • Identify the memory and dma hardware, resources and existing component interfaces for this board.

Configuration ​

  • Record the board.toml fields, DTS properties and defconfig values used for memory and dma.

Procedure ​

  • Follow the memory and dma stage in the porting guide and record the actual commands.

Development findings ​

  • Live serial-6033dbec /memory/reg and rooted /proc/iomem give six RAM banks with a 28 GiB hole at 4..32 GiB. The installed 12 GiB cannot be one XNU window: the longest contiguous unreserved run is 8.65 GiB (0x840000000..0xa69b78000).
  • The 4 GiB window booted XNU at mem=actual=managed=4096 MiB. An 8 GiB window (arena equal to the whole 8 GiB) was refused: DXE occupies part of the arena, so DarwinBoot returned to the UniXNU menu.
  • A 8.625 GiB arena [0x840000000,0xa68000000) with a 7 GiB window is accepted: loader printed window 0x1c0000000 bytes at pa 0x8400200000 and HANDOFF EXIT RETURN 0. DarwinWindowSizeValid caps a window at 8 GiB, so 12 GiB is not reachable at all.
  • Screen trace of the 4 GiB boot: suggestd exits with status 163 signal 0 and ns=0 code=0x0, i.e. a normal exit status, not jetsam or a sandbox denial; disk5s APFS transactions keep completing (xid 2512, 140/140 finished), so the Data volume is not stuck.

Completion criteria ​

  • All handoff regions are accounted for and each enabled DMA engine accesses its allocated range with the documented cache policy.

Current limits ​

  • The 4 GiB window is the proven configuration; 7 GiB was accepted by the loader but XNU did not start, and 12 GiB is physically impossible as one window. The display/CA prerequisites from the reference project are present in our kernel; the open wall is userland contract/container handling, evidenced by ns=2 SIGABRT/SIGTRAP.

Next action ​

  • Read the STR heap lines from the crash-string image to name the failing framework contract (container path, MobileGestalt, activation), then fix that one contract; display/CoreAnimation prerequisites are already audited as present.

Evidence ​

Storage and root ​

planned

Components: PongUfs.

Hardware and dependencies ​

  • Identify the storage and root hardware, resources and existing component interfaces for this board.

Configuration ​

  • Record the board.toml fields, DTS properties and defconfig values used for storage and root.

Procedure ​

  • Follow the storage and root stage in the porting guide and record the actual commands.

Development findings ​

  • Collect the first storage and root observation, its cause when established, and the resulting implementation decision.
  • 2026-10-31 user console reports APFS Data ENOSPC: free_blocks around 1208 below threshold_blocks 1310, affecting launchd/usermanagerd/logd_helper. Latest saved installation is a 256 MiB APFS container in a 258 MiB Data GPT window at unixnu offset 7420 MiB, leaving about 24.502 GiB outside windows. Historical images are checksum/CRC verified but do not establish current live occupancy; capture in root recovery is pending. Read-only inspector validates saved 256/512 MiB images and can back up current Data with second-read hash comparison and optional local directory-allocation summary. No device storage writes or resize performed.

Completion criteria ​

  • Host: register, clock, link and SMMU facts match the board inventory.
  • Reads: SCSI capacity, GPT and known blocks are correct; OS/SystemOS windows stay within userdata.
  • Root: the configured volume mounts and launchd starts. Persistence: writes survive reboot within the allocated Data region.

Current limits ​

  • Hardware inputs and implementation are pending for this board.

Next action ​

  • Inventory the required storage and root inputs before implementation.

Evidence ​

Collect evidence using the next action.

Display ​

planned

Hardware and dependencies ​

  • Identify the display hardware, resources and existing component interfaces for this board.

Configuration ​

  • Record the board.toml fields, DTS properties and defconfig values used for display.

Procedure ​

  • Follow the display stage in the porting guide and record the actual commands.

Development findings ​

  • Collect the first display observation, its cause when established, and the resulting implementation decision.
  • Board-level chosen display-scale=3 adapted from XTOM0706 9d1a14f83d1050a042313f30dc9d5b7e80d31f7a. Parsing generated ADTs before/after gives identical properties except random-seed with the current 20G81 profile. Its additional sweet display node is not copied because MiniIOMobileFramebuffer already publishes a disp0 display-subsystem child at runtime.

Completion criteria ​

  • A known frame appears with correct geometry and colors, then userland presentation and backlight controls work.

Current limits ​

  • Hardware inputs and implementation are pending for this board.

Next action ​

  • Inventory the required display inputs before implementation.

Evidence ​

Collect evidence using the next action.

Input ​

planned

Hardware and dependencies ​

  • Identify the input hardware, resources and existing component interfaces for this board.

Configuration ​

  • Record the board.toml fields, DTS properties and defconfig values used for input.

Procedure ​

  • Follow the input stage in the porting guide and record the actual commands.

Development findings ​

  • Collect the first input observation, its cause when established, and the resulting implementation decision.

Completion criteria ​

  • Touches map to the display, simultaneous contacts keep stable IDs, release events arrive, and buttons produce expected HID reports.

Current limits ​

  • Hardware inputs and implementation are pending for this board.

Next action ​

  • Inventory the required input inputs before implementation.

Evidence ​

Collect evidence using the next action.

GPU ​

planned

Hardware and dependencies ​

  • Identify the gpu hardware, resources and existing component interfaces for this board.

Configuration ​

  • Record the board.toml fields, DTS properties and defconfig values used for gpu.

Procedure ​

  • Follow the gpu stage in the porting guide and record the actual commands.

Development findings ​

  • Collect the first gpu observation, its cause when established, and the resulting implementation decision.

Completion criteria ​

  • GPU submissions complete, mapping/fence handling is correct, a known image renders, and the selected Metal client presents it.

Current limits ​

  • Hardware inputs and implementation are pending for this board.

Next action ​

  • Inventory the required gpu inputs before implementation.

Evidence ​

Collect evidence using the next action.

Network ​

planned

Hardware and dependencies ​

  • Identify the network hardware, resources and existing component interfaces for this board.

Configuration ​

  • Record the board.toml fields, DTS properties and defconfig values used for network.

Procedure ​

  • Follow the network stage in the porting guide and record the actual commands.

Development findings ​

  • Collect the first network observation, its cause when established, and the resulting implementation decision.

Completion criteria ​

  • Scanning, association, address configuration and sustained receive/transmit traffic pass with the selected firmware.

Current limits ​

  • Hardware inputs and implementation are pending for this board.

Next action ​

  • Inventory the required network inputs before implementation.

Evidence ​

Collect evidence using the next action.

Audio ​

planned

Hardware and dependencies ​

  • Identify the audio hardware, resources and existing component interfaces for this board.

Configuration ​

  • Record the board.toml fields, DTS properties and defconfig values used for audio.

Procedure ​

  • Follow the audio stage in the porting guide and record the actual commands.

Development findings ​

  • Collect the first audio observation, its cause when established, and the resulting implementation decision.

Completion criteria ​

  • Each declared route carries the selected audio format through playback or capture and handles start/stop correctly.

Current limits ​

  • Hardware inputs and implementation are pending for this board.

Next action ​

  • Inventory the required audio inputs before implementation.

Evidence ​

Collect evidence using the next action.

Power ​

planned

Hardware and dependencies ​

  • Identify the power hardware, resources and existing component interfaces for this board.

Configuration ​

  • Record the board.toml fields, DTS properties and defconfig values used for power.

Procedure ​

  • Follow the power stage in the porting guide and record the actual commands.

Development findings ​

  • Collect the first power observation, its cause when established, and the resulting implementation decision.

Completion criteria ​

  • Declared power controls and battery readings match observations; each claimed sleep/resume transition restores its dependent peripherals.

Current limits ​

  • Hardware inputs and implementation are pending for this board.

Next action ​

  • Inventory the required power inputs before implementation.

Evidence ​

Collect evidence using the next action.

Image assembly ​

host-verified

Hardware and dependencies ​

  • Identify the image assembly hardware, resources and existing component interfaces for this board.

Configuration ​

  • Record the board.toml fields, DTS properties and defconfig values used for image assembly.

Procedure ​

  • Follow the image assembly stage in the porting guide and record the actual commands.

Development findings ​

  • The three local trees use different userland models: ours keeps an OS+SystemOS read-only APFS union from the unixnu partition; ios-sweet-k60 rewrites a writable HFSX image at build time; UniXNU-pong prepares at run time inside its own static init that becomes PID 1 and then execs launchd. Selected approach: diagnose first and do not replace PID 1, because the launchd chain is already verified and the pong adapter targets Darwin 24 ABI. Our kernel already carries exec_inject and bindfs, so the pong model remains available if the blocker turns out to need run-time preparation. See docs/USERLAND-ROUTES-2026-11-02.md.
  • The kernel links and prelinks on macOS CI. Format 1 run 40631225483 produced 54349824 bytes; format 2 run 40650877574 produced 54419456 bytes at the same slide -0xb9c000 and the same lowest component extent 0xfffffff004426600.
  • The 69632-byte difference is a real fix, not noise: the format-1 glob applied zzzzzz-pong-init-scratch-allocation.patch through fuzz and the panic string it adds is absent from that kernel, while the strict format-2 series applies it at its intended place and the string is present. The checked scratch allocation had never reached a qualified kernel before.
  • mzyxsl daed6b5 fixes the local prelink helper to merge the OS-profile prelink table and board overrides. A real prelink of the 0238 native kernel succeeded with 32 roots and automatic slide -0xb9c000, 53788672 bytes, SHA-256 bb33682837f1807ef28d385cf09acf94f2749f49b3f7337d22348dcbf6c4b9df. Use --profile/--kit for non-sibling checkouts.

Completion criteria ​

  • Kernel and prelink succeed, payload contains all declared inputs, and the boot image matches the bootloader format and size limit.

Current limits ​

  • Hardware inputs and implementation are pending for this board.

Next action ​

  • Inventory the required image assembly inputs before implementation.

Evidence ​

Diagnostics ​

device-verified

Hardware and dependencies ​

  • Identify the diagnostics hardware, resources and existing component interfaces for this board.

Configuration ​

  • Record the board.toml fields, DTS properties and defconfig values used for diagnostics.

Procedure ​

  • Follow the diagnostics stage in the porting guide and record the actual commands.

Development findings ​

  • Collect the first diagnostics observation, its cause when established, and the resulting implementation decision.
  • Imported the source-only offline path/evidence checker from mzyxsl 76552b88441757defce4080a241c2f0ea7464538, preserving current milestone statuses instead of copying its outdated runtime records. scripts/audit-forks.py enumerates public forks and all branches, pins comparison SHAs, and reports candidates without executing or merging fork code. KX SIGKILL records alone do not prove a sender or pressure; 0238 adds committed reason scalars and bounded fallback logging. See docs/FORK-REVIEW.md and docs/BOOT-STALL-2026-10-31.md.

Completion criteria ​

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

Current limits ​

  • Hardware inputs and implementation are pending for this board.

Next action ​

  • Inventory the required diagnostics inputs before implementation.

Evidence ​

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