Skip to content

Xiaomi Mi MIX 4 (odin, Snapdragon 888+ / SM8350) (3364789753) ​

3364789753/UniXNU-odin

Xiaomi Mi MIX 4 (Snapdragon 888+). Inputs and shared-support gaps live in FACTS.md; no hardware value below is measured until the device rows there close.

源记录: porting.toml, 78ef1d70cea4d58a342c680fd9674683e0165870.

本页按设备记录自动生成。

部分状态
配置host-verified
固件与启动host-verified
CPU 与中断planned
内存与 DMAplanned
存储与根卷host-verified
显示planned
输入host-verified
GPUhost-verified
网络planned
音频planned
电源host-verified
镜像组装host-verified
诊断planned

配置 ​

host-verified

组件: ArmDTPlatform, ArmCpu, SoftwareAES, XnuPrelink, DarwinBoot.

硬件与依赖 ​

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

配置 ​

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

操作步骤 ​

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

开发经验 ​

  • board.toml, feeds.toml and odin_defconfig resolve; the ADT generator accepts the board and publishes /chosen/boot-manifest-hash; the release preflight enumerates 60 patches before the example gate. The inputs that remain are the ones only the unit can supply, and scripts/collect-device-inputs.sh gathers them read-only after refusing any product other than odin.
  • Measured on unit 11b5d7c3 on 2026-11-05: the production shell cannot read the GPT, so the one-shot recovery boot path was used. userdata is sda33, first_lba 2967552 and last_lba 61844474 in 4096-byte LBAs (sysfs 512-byte start 23740416 and size 471015384; fastboot partition-size 0x38263FB000 and GPT entry 61 agree). The same run fixed the SKU as 8 GB and captured the applied device tree, including the k8 panel node.
  • The root volume UUID comes from the IPSW, not the device: the single System volume of 044-76040-038.dmg is 04769D26-2CA0-4825-B443-E2E5F88300F2, and make-adt.py writes it into /chosen/root-matching as an IOMedia UUID match.
  • [firmware] is the board key that turned from a placeholder into a contract, and the first real EDK II build is what finished it: six preflight entries in the documented order, the four submodules of the Mu-Silicium checkout (Binaries deliberately absent, because odin's vendor modules are generated from xbl_a rather than taken from Device-Binaries), twelve PACKAGES_PATH entries and, as of 2026-11-06, patches = [] - measured in the checkout, Resources/MuPatches holds Auth-Service, Boot-Manager, Timer and Usb-Bus only, so the inherited Gic-Spurious.patch would have stopped the build at git apply --check. [board] example is false now: every input the flag was holding is measured on unit 11b5d7c3 (memory map, userdata geometry, root volume UUID, DSDT), and the platform seed was never a board fact - it is a --unique-chip-id argument per run.
  • The first real kernel build on this board stopped inside the patch series, and the cause is not ours: the ipados-17.7.11-21H461 OS series opens with patches/xnu/zzz-boot-progress.patch, whose bsd_init.c:773 hunk instruments the block that patches/xnu/sheng-platform-power.patch creates, and no series in that profile applies the latter. Measured on the pinned xnu-10063.141.1 tree: all 56 arm64 entries apply cleanly and the failure is that one hunk alone. The fix is in the SM8350 feed (its series now carries the 15-line guarded block before the OS series, which is where it has to land because board patches run last), and the macro is defined by nothing in these profiles, so the code stays dead on this generation. feeds.toml and unixnu.lock moved to that feed commit 15fab28de068fae8aa41c54e8519740a6bf6dc43.
  • The cores the feed describes were wrong, and this unit's own tree says so: it labels all eight qcom,kryo and splits them by capacity-dmips-mhz and qcom,freq-domain into 0x400/domain 0 on affinity 0x0-0x300, 0x79a/domain 1 on 0x400-0x600 and 0x800/domain 2 on 0x700 - 4x Cortex-A55, 3x Cortex-A78, 1x Cortex-X1. The feed had seven A78s plus an X1 and no capacity at all, so dts/sm8350.dtsi now carries the three cluster identities with the capacities and domains quoted, and feeds.toml and unixnu.lock moved to 7fffe977373f39ed0d06e9fd4fbf56688704c7e1 (tag v0.3.1).
  • [payload] moved from 192 MiB to 80 MiB and gained panic_screen = true, both decided by the unit rather than by convention: a 192 MiB payload volume plus the firmware on top of it (202461184 bytes) dies mid-Booting on this unit while 85020672 bytes of the same content is accepted, and max-download-size reads 805306368 - so the rule that binds is the partition the image would be flashed into, not the download buffer, and the debug UART the board's own tree names - qcom,qup_uart@98c000 - is on internal pins rather than USB, so a stop without the panel showing something is a stop with no evidence at all. The platform seed lives in UniXNU/unixnu.local.toml, which .gitignore keeps out of every repository.

完成条件 ​

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

当前范围 ​

  • binaries and the ACPI table are no longer configuration gaps - Binaries/odin generates from facts/xbl_a.img and the retail SKU reads 2106118C - and board.example is false, so the gates that remain are the per-run ones: --unique-chip-id for the ADT seed, and CONFIG_XNU_NATIVE_UFS / CONFIG_XNU_NATIVE_ADRENO, which need SM8350 components that do not exist yet.

下一步 ​

  • Take the first fastboot boot of the packed boot.img on unit 11b5d7c3; the image is host-verified but boot.json still records hardware_tested = false until the board says otherwise.

证据 ​

固件与启动 ​

host-verified

硬件与依赖 ​

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

配置 ​

  • board.toml [firmware] now lists eight preflight entries in the order the porting guide gives it - install this board's overlay into the checkout, then download, extract, import, check - beside the config, dsc and fd keys, so the firmware step checks the vendor inputs before EDK II runs.
  • The same table declares the Mu-Silicium checkout the build needs: submodules (Common/Mu, Common/Mu_OEM_Sample, Silicium-ACPI, the pinned openssl tree - not Binaries, because odin is not in Project-Silicium/Device-Binaries and its modules come from the importer), the one patch the edk2 checkout takes (Gic-Spurious, measured against mu_basecore 8f10084c), and the twelve PACKAGES_PATH entries a Lahaina package resolves against. The Mu-Silicium checkout's own edits cannot ride in patches - firmware.py applies those with git -C edk2 - so the SEC handoff travels as Resources/Patches/Sec-EntryArg.patch and a preflight entry.
  • board.toml [firmware.image] stays a documented hole rather than a guess: no official MIX 4 fastboot URL has been confirmed from the CDN, so the download and extract scripts read the key, skip with the reason when it is unset and the local dump satisfies proprietary-files.txt, and refuse when neither holds.
  • The vendor modules are generated, not stored: scripts/import-odin-uefi.py writes Binaries/odin into the firmware checkout named by UNIXNU_UEFI, and every FILE_FREEFORM and INF path in uefi-odin points into that tree.

操作步骤 ​

  • Dump the partition that carries the UEFI volume read-only (facts/xbl_a.img), hash it, and keep it out of Git.
  • Slice the EDK II volume out of the image and unpack it with the pinned UEFIExtract A76, then generate one .inf per module with the GUID the stock volume gives it.
  • Point the package's DXE.inc, APRIORI.inc and RAW.inc at the generated tree and re-resolve the board on the host.

开发经验 ​

  • The whole UEFI lives in xbl, not abl: abl_a is 2 MiB whose single volume carries one LZMA-compressed LinuxLoader and no DXE driver at all, while xbl_a holds a 2564096-byte FFS2 volume at 0x93000 with the SEC core, the DXE core, two nested volumes (gzip GUID-defined sections, GUID e91f301d-79be-5343-91c2-d23bc959ae0c) and 91 DXE drivers.
  • 94 AArch64 modules and 51 freeform files now generate from this unit's own volume, and every Binaries/odin path the odin package names resolves - 99 references across DXE.inc and APRIORI.inc, none missing. UFSDxe, DisplayDxe, EnvDxe, I2CDxe, SPIDxe, GpiDxe, PILDxe, TzDxeLA and QcomChargerDxeLA are all present.
  • The raw config files carry the same GUIDs as the venus package's RAW.inc byte for byte (uefipil.cfg 21E9BDD9, QcomChargerCfg.cfg 45FE4B7C, BATTERY.PROVISION F780C779, SecParti.cfg A1E235DE), so the SM8350 firmware volume layout is shared across these boards and odin's FDF needed no invented GUIDs.
  • uefiplat.cfg, BDS_Menu.cfg and logo1.bmp exist in the volume but stay out of the FDF: the platform description here comes from Library/ConfigurationMapLib, which is what venus does too.
  • proprietary-files.txt now names the inputs by digest instead of listing categories: xbl_a (14ef0bd6...) as the source of every vendor module, boot_a for the header version and rollback, st_fts_k8.ftb (dedfe0fd...) and stm_fts_production_limits.csv from the mounted vendor image, and the remaining OS-side blobs - aop, GPU zap, adsp, Wi-Fi firmware - still marked REQUIRED_FROM_IMAGE because the official archive is not pinned yet.
  • The Mi MIX 4 has no sheng-style global archive: its builds are China-only (the CNXM suffix), the newest stable measured for this line is OS1.0.8.0.UKMCNXM on Android 14, and Xiaomi publishes one MD5 per fastboot package on bigota/hugeota.d.miui.com with no SHA-256 and no browsable listing. The mirror-digested packages found by search could not be tied to that revision, so the scripts take the MD5 as the mandatory check and the SHA-256 as optional - and when only the MD5 is pinned they print the measured SHA-256 to record before the extraction deletes the archive.
  • The whole preflight chain exits 0 on this machine without an archive: download and extract report the unset pin plus the matching local dump, import re-slices the volume from facts/xbl_a.img, and check-odin-firmware.py re-hashes Binaries/odin against manifest.json, resolves DXE.inc and APRIORI.inc, compares Resources/Configs/odin.toml with the board's own MemoryMapLib rows and refuses the raw configs that belong elsewhere. Pin an archive and the same four commands do the documented thing instead.
  • The board's DSDT could not be acquired, so it was written and then made checkable: iasl compiles DSDT.asl with 0 errors and 0 warnings into 1189 bytes, and scripts/check-odin-dsdt.py recompiles it, refuses a committed DSDT.aml that differs, round-trips through the decompiler, and rejects any of its 18 memory windows or 5 interrupts that facts/odin-fdt.dts does not state. That last rule is what caught two wrong SPI-to-ACPI conversions in the first draft (0x164 written as 0x194 and 0xd0 as 0x100; the rule is SPI plus the 32 offset, which UFS confirms independently as 0x109 to 0x129, the value the published MTP table carries).
  • The shim this board boots with is not the upstream one, and the difference is load-bearing: Project-Silicium/Mu-Silicium's BootShim/BootShim.S (sha256 0f412999b77f8daa...) jumps to the firmware volume without cleaning the D-cache, and states the ARM64 header's Image Size as FD_SIZE alone. The copy this port carries from UniXNU/uefi-sheng@66421cb7 (e3c053fe31bda287...) walks the FD range with dc cvac, issues ic iallu with dsb sy and isb before br x5, and reports FD_SIZE + (_Payload - _Head). mkbootimg.py by contrast is byte-identical to upstream (55037fd1a6d6cd86...), so the packer odin.toml's keys describe is the packer the checkout ships. Practical consequence for the build: the --uefi checkout has to be overlaid with this board's BootShim, not used as cloned. And odin.toml's values match the sibling venus.toml (0x9FD00000/0x200000, header_version 1) even though they were taken from odin's own MemoryMapLib rows first, which is a cross-check rather than a copy.
  • Two claims the published SM8350 tables make do not hold on this unit: the first GENI wrapper is not at 0x0a600000 (that is the DWC3 controller the same bootargs names), it is qcom,qupv3_0_geni_se@9c0000 with its engines at 0x980000..0x99c000; and the GPU clock controller is its own node clock_gpucc: qcom,gpucc@3d90000 rather than part of qcom,kgsl-3d0, so it is declared nowhere in the table because this board has no ACPI driver for a clock controller and package/OdinGpuPower.c votes on it directly. The pin controller keeps the convention both published SM8350 tables use: node pinctrl@f000000, pin registers at REG_BASE 0x100000 inside it, so GIO0 is declared at 0x0F100000 for 0x300000.
  • The firmware volume now exists, and it contains this board's own ACPI table: ./unixnu firmware against a completed Mu-Silicium checkout builds 165 modules into Build/odinPkg/DEBUG_CLANGPDB/FV/SILICIUM_UEFI.fd, 2097152 bytes - the exact [uefi_fd] size bootimg asserts - and the 1189-byte DSDT.aml occurs verbatim inside FVMAIN.Fv at offset 6918624, which is the proof that RuleOverride = ACPITABLE odin/AcpiTables.inf consumed odin's table rather than a sibling's. It is absent from the FD itself because the FD carries FVMAIN_COMPACT, an LZMA-compressed volume. bootimg then packs gzip(BootShim + FD) + DTB into a 1134592-byte header-v1 image whose own verify() decompresses and compares every section.
  • Two defects that only a real build could surface, both now fixed where they belong. First, the preflight scripts derived the board root from __file__, which is the device repository only when the script runs in place; the build driver copies scripts/ into the build tree and runs them there, so the first run died on proprietary-files.txt not found under out/odin/.../tree. Every script now takes its root from $UNIXNU_DEVICE, with __file__ as the fallback for a human run. Second, Silicon/Silicium/SiliciumPkg/SiliciumPkg.dsc.inc:13 puts -D ENABLE_SECUREBOOT=$(ENABLE_SECUREBOOT) into every CLANGPDB compile, and an undefined value makes the expansion the bare word ENABLE_SECUREBOOT= - which GNU make reads as an assignment prefix and hoists off the recipe line, leaving -D -D in the module's cc_resp.txt and clang's 'no such file or directory' on the first module. [firmware.defines] ENABLE_SECUREBOOT = 0 fixes it and is also upstream's own default in build_active_devices.sh, matching the shared include's !if (ENABLE_SECUREBOOT) == 0 branch that an unmodified vendor XBL needs.
  • The boot image's device tree gained a producer, which is what docs/porting/packaging.md assigns to a firmware preflight script and what board.toml had only ever described in a comment: scripts/build-odin-dtb.py resolves the SoC feed by matching feeds.toml's pin against git rev-parse HEAD in UniXNU/out/feeds/UniXNU-sm8350-common-* or the sibling clone, compiles device:dts/odin.dts with the [device_tree] include_dirs, refuses any dtc warning, checks the FDT magic and writes the [bootimg] dtb path relative to the build tree - 6955 bytes. Note that a bare ./unixnu bootimg does not read [bootimg] dtb (only release resolves it), so the flag has to be passed there.
  • The first temp boots on the unit measured the packing limit rather than the boot itself: 202461184 bytes (a 192 MiB payload volume plus the 1108 KiB of shim and firmware on top of it) is refused mid-Booting with fastboot's usb_read failed, while 85020672 bytes of the same content sends in 1.9 s and answers Booting OKAY. The claim that this is the staging buffer being boot_a's size was withdrawn the same day: fastboot getvar max-download-size reads 805306368, so what binds is the partition the image would be flashed into. [payload] size_mib therefore drops to 80, which the payload step itself proves fits (kernel.macho is 51937280 bytes, and payload.build() refuses a volume smaller than its files). panic_screen = true joins it because this board has no host-reachable console: the debug UART qcom,qup_uart@98c000 that the tree names is on internal pins, not USB, so a kernel stop has to be visible on the panel, which is what patch-xnu-entry-probe.py --panic-screen --no-reset does to the payload's copy of the kernel.
  • Three of our images left fastboot and came back inside about twenty seconds, and that is recorded as a stop, not as a cause. The one host-side artifact that would separate 'UEFI ran and found no OS' from 'the jump never reached SEC' is uefivarstore (sde60): DarwinBoot's boot entry for the ODIN volume only exists if Mu's BDS reached it. Reading that partition needs root, and the root route this file was built from - one-shot TWRP - now fails authentication on this ROM (FAILED remote: 'Failed to load/authenticate boot image: Load Error', twice, with the same image that produced the GPT, the applied DT and xbl_a). boot.json and payload.json keep hardware_tested = false, and no reason for the stop is claimed anywhere until one of those two observations is available. The owner-authorized partition write narrowed it anyway: flashing the same 85020672-byte image to boot_a and rebooting lands the same way with nothing on the panel at all - no BDS menu, no boot logo and no panic screen, which the payload's copy of the kernel is built to leave there (--panic-screen --no-reset). So the stop is before the first framebuffer write, in the shim or SEC/PEI, and it is not the benign case of a UEFI that came up and found no operating system.

完成条件 ​

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

当前范围 ​

  • The FD and the boot image are host-verified only: nothing has run on the unit, so boot.json's hardware_tested = false is still the honest state, and the vendor modules odin.dsc links come from this unit's own xbl_a dump rather than an archive anyone else can fetch. uefi-odin carries the files that checkout's layout puts outside the package - BootShim/BootShim.S, Resources/Configs/odin.toml, Resources/Scripts/mkbootimg.py, Resources/Patches and Resources/MuPatches, Platforms/Xiaomi/odinPkg and ACPI/Platforms/Xiaomi/odin - the first and the packer byte-identical to UniXNU/uefi-sheng at 66421cb7bb5694843aec8de1ca3d1de4c20cca38. That placement is automated now: scripts/sync-odin-uefi.py is preflight entry one, takes the manifest from the overlay's own Git index filtered to the prefixes that belong in a firmware tree (22 of the 25 tracked files; README.md, ACPI/README.md and .gitignore are deliberately not installed onto a third-party checkout), maps ACPI/Platforms to Silicium-ACPI/Platforms, installs by byte comparison, re-reads every destination after copying and refuses a target that is not a Mu-Silicium checkout. Before it, the mapping was three documented manual copies and a machine that had not done them failed with missing-file messages that did not name the cause.
  • An FD sha256 identifies a build instance, it does not describe firmware content: measured 2026-11-06, a build whose inputs were byte-for-byte the previous build's (the sync reported 22 of 22 already current) produced an FD differing in 1,058,661 of 2,097,152 bytes, because all 160 module .efi files relink. So the checks that close this area are the volume's own census (FV/Ffs directory names, FVMAIN.inf's EFI_FILE_NAME lines, FILE_GUID and signature-string hit counts, the entry-arg HOB GUID's FD offset against Sec.map) and not a digest comparison.
  • board.toml [firmware.image] has no official archive URL, so an unattended run on a machine without this unit's read-only xbl_a dump cannot fetch the inputs; scripts/collect-device-inputs.sh is the only route today.
  • The preflight needs python3 3.11 or newer for tomllib - the same requirement UniXNU's own loader has - while this host resolves python3 to the 3.9 Apple build, so a build run needs a python3 that points at 3.13 first in PATH. EDK II additionally needs Mu's pip-requirements.txt installed: this Homebrew interpreter fails inside python3 -m venv at ensurepip, so the route is pip3.13 install --user --break-system-packages.
  • odin/DSDT.aml is authored, not dumped, and authored is not the same as observed: the table is consistent with this unit's applied device tree and with the conventions both published SM8350 tables use, and it now demonstrably ships inside FVMAIN, but no firmware has booted on the board to confirm a driver reads those windows the way the tree intends.

下一步 ​

  • First action on the next sighting of unit 11b5d7c3: scripts/read-boot-trace.py pull - stock recovery is rooted and mounts logfs read-only, so this reads the v10 run that already happened at 08:25 without booting anything, and sha256sum /dev/block/by-name/boot_a against e0c67f73... to confirm the owner's partition is still itself. Then: which ABL message ended the run, whether UNIXNU.TXT reached ReadyToBoot, and what fdt handoff reports for the device tree and the initrd range. If it dies mid-Booting rather than mid-firmware, the payload image is 516096 bytes above the largest size this unit has answered Booting OKAY to, so the first move is [payload] size_mib = 78 and the second is the FD-only image.
  • Confirm an official MIX 4 fastboot archive for this firmware revision from Xiaomi's CDN, record its url, md5 and bytes in board.toml [firmware.image], and let the preflight verify the MD5 and print the SHA-256 to pin before the extraction deletes the archive.
  • Build the payload and userdata root, which is the step that needs the platform seed and the absolute [userdata] LBAs, and only after boot_a and the partition table are backed up.

证据 ​

CPU 与中断 ​

planned

硬件与依赖 ​

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

配置 ​

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

操作步骤 ​

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

开发经验 ​

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

完成条件 ​

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

当前范围 ​

  • No network driver exists for this board yet: ath12k is the SM8550 component and this is a WCNSS/ath10k-class part, so the component choice itself is open.
  • The firmware files under the vendor image (the wlan/ directory and the bt_firmware blob) are named by the device tree but not yet identified per file, and none of them is committed.

下一步 ​

  • Inventory the required cpu and interrupts inputs before implementation.

证据 ​

内存与 DMA ​

planned

硬件与依赖 ​

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

配置 ​

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

操作步骤 ​

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

开发经验 ​

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

完成条件 ​

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

当前范围 ​

  • Hardware inputs and implementation are pending for this example board.

下一步 ​

  • Inventory the required memory and dma inputs before implementation.

证据 ​

存储与根卷 ​

host-verified

组件: ShengUfs, RamBlock, VerifiedRoot, VirtioMmioBlock.

硬件与依赖 ​

  • Controller, PHY, clocks, reset and power, SMMU, DMA, handoff, storage layout and OS interface, each with a source and an owner (docs/porting/ufs.md hardware inventory).

配置 ​

  • board.toml [userdata] now carries the measured geometry: first_lba 2967552, last_lba 61844474, lba_bytes 4096, with the OS and Cryptex1,SystemOS windows.
  • dts/odin.dts inherits the exported ufshc and ufsphy nodes from sm8350.dtsi; both windows align inside a non-zero 16 MiB arm-io base, so unlike the touch engine the storage driver can live in the kernel.
  • configs/odin_defconfig leaves CONFIG_XNU_NATIVE_UFS unset - not because the component is missing, it is selected and built, but because the flags open a link chain this port has not closed (limits); native-ufs-root=1 is added with it and never before. The plan is now consistent, so the archive build no longer refuses; what the flags do at link time is recorded in the experiment below, and the kernel does not force-load the driver until a known block has been read back on the unit.
  • Selection is now the documented shape rather than a board-only recipe: ShengUfs is in the complete [components] include array, feeds.toml pins its source to package/ufs (so the tree's drivers/ShengUfs is a link into this repository and unixnu status reports origin local (feeds)), and [kernel] archives now names the storage family after the arch profile's own entries. Writing that list out was forced rather than chosen: archive_plan() takes the merged board table, profiles/arch/arm64/profile.toml supplies an explicit eight-entry archives array, and arrays replace inherited arrays - so with three more selected kernel-stage components and no position for them, the kernel step stopped with "[kernel] archives needs component entries for: RamBlock, ShengUfs, VirtioMmioBlock". The claim recorded here earlier - that an absent archives key means implicit, therefore everything selected gets built, which is why libArmCpu.a, libArmDTPlatform.a and libSoftwareAES.a exist - is withdrawn: those three were built because the inherited arch entries name them. The cost of the restatement is drift: if the arm64 profile gains a recipe, odin's copy silently omits it.
  • The catalog's revision pin (99d8bcd3) no longer describes the bytes for this board: a locally pinned module reports its revision as the device repository's own commit, so the fork's provenance lives in package/ufs/README.md and in git history. RamBlock is selected as well, because it is the caller that sizes and opens the Data store, and the contract between the two archives was checked rather than assumed: nm -u on build/ram-block/libRamBlock.a (301472 bytes, built by the catalog recipe with the same object audit) asks for six native_ufs_store_* names and nm --defined-only on odin's libShengUfs.a defines exactly those six - which matters because the imports are weak, so a missing export would not fail the link, it would fail the address test at NativeRamBlock.cpp:89 and leave the store silently never opened. XNU_NATIVE_RAM_BLOCK=1 additionally requires XNU_NATIVE_AES=1 (build-xnu-4k-baseline.sh:214-219) and odin already resolves CONFIG_XNU_NATIVE_AES=y, so that gate is met today. What this tree does not have is the CONFIG_XNU_NATIVE_UFS_ARCHIVE a sibling device record passes for its own fork: line 639 hardcodes UFS_ARCHIVE to build/sheng-ufs/libShengUfs.a and grep finds no such variable here, so pointing the pipeline at that path is the contract, not a workaround. Archive digests are no more build identifiers than the FD's were: rebuilding the same source through the same recipe moved build/odin-ufs/libOdinUfs.a from 130b09aa to 007aa5f0, because ar records timestamps - so a digest says which instance ran, not which bytes are in the kernel.

操作步骤 ​

  • Inventory from the vendor tree, then transcribe the reviewed ShengUfs contract (adopt sequence, UTRD and UPIU packing, completion policy, SMMU takeover, write windows) into package/OdinUfs*.{h,c}.
  • Assert every byte of the descriptors and every write order against a scripted controller and a scripted SMMU on the host: sh package/run-tests.sh.
  • On the device, run the read-only milestones in order: registers, DMA, one command, capacity and known blocks, root mount, persistence.

开发经验 ​

  • UFS host window 0x1d84000/0x3000 with inline crypto at 0x1d88000/0x8000 and its HWKM at 0x1d90000/0x9000, GIC_SPI 265, two lanes per direction, QMP phy 0x1d87000/0xe10, apps SMMU stream id 0xE0.
  • The unit's LUN 0 uses 4096-byte logical blocks while the GPT is addressed in 512-byte LBAs: /sys/class/block/sda33 reports start 23740416 and size 471015384 in 512-byte sectors, fastboot's partition-size is 0x38263FB000, and both divide by eight exactly. The eUFS part is a Samsung KLUEG8UHDC-B0E1 (rev 0200).
  • Resolved: the board's eUFS is clocked by the GCC_UFS_PHY_* family (CFG 0x77010 AXI, 0x77018 AHB, 0x7705c UNIPRO, 0x77064 ICE, 0x770cc aggregate; RCGs 0x77024 with mnd_width 8, 0x7706c and 0x77084 with mnd_width 0; BCR 0x77000, GDSC 0x77004). The 0x75xxx card family belongs to an external slot. og_ufs_phy_enable() programs it and refuses to write M/N/D into an mnd_width=0 RCG.
  • The host window, the GDSC address and the apps SMMU physical base are identical on SM8550 and SM8350, so the UFS controller IP carries over; the divergence is the PHY window (0x1d80000/0x2000 vs 0x1d87000/0xe10), the stream id (0x60 vs 0xE0), the SMMU compatible (arm,mmu-500 vs qcom,qsmmu-v500) and every GCC branch offset. 0x77018 means AXI on SM8550 and AHB on SM8350: an offset imported by analogy would clock the wrong branch.
  • Two refusals in the upstream SMMU planner are dead ends on this generation, and the sibling SM7475 port proved it on hardware: the candidate-bank scan stops after the top eight, and an exclusive firmware mapping of our own stream onto another bank is refused as a conflict. OdinUfsSmmu.c keeps both refusal strings, scans every bank, and adds a takeover mode that resets the firmware's bank to a clean bypass context after proving no other stream points at it.
  • Completion policy is deliberately unforgiving: a timeout or a fatal interrupt bit quarantines the host and the buffer stays allocated, because the controller may still own that memory with the doorbell back at zero. No cancel, no reset, no retry.
  • The gate to a component, not to the porting layer: scripts/build-arm-driver.py compiles a driver archive against XNU source-build compile records (build/xnu/ios-obj/DEVELOPMENT_ARM64_BCM2837/iokit/DEVELOPMENT/IOPlatformExpert.cpo.json). The claim recorded here on the strength of one FileNotFoundError - that odin has no such records, that its kernel step is only a patched prelinked cache, and so that a storage driver cannot be built on this machine - was wrong and is withdrawn the same day: those records do exist, 528 MB of ios-obj with 123 cpo.json files under the assembled device tree, three driver archives were already built for odin from them (libArmCpu.a, libArmDTPlatform.a, libSoftwareAES.a, each logged -Werror build and arm64-apple-ios17.0 object audit passed), and an unmodified SM8550 storage driver builds in the same tree (libShengUfs.a 514112 bytes). The repro that produced the error ran UniXNU/scripts/build-arm-driver.py, whose ROOT is the shared repository and which therefore looks in UniXNU/build, a directory that does not exist; the kernel step runs the copy inside the device tree, where ROOT resolves to the tree that holds the records. What actually blocks odin is a port, not a build system: the component's SoC constants (host/PHY bases, GCC branch ids, apps-SMMU stream, userdata geometry) are SM8550 values and must become odin's, which are already pinned and host-tested in package/OdinUfs*.{c,h}. CONFIG_XNU_NATIVE_UFS and the [kernel] archives key stay unset until that substitution exists and has been read back on the unit, because a driver that has only ever compiled sits below the docs' block-reads/root/persistence milestones.
  • The boot-argument surface of the fork is eleven names, read from its own source: native-ufs-probe, native-ufs-root, native-ufs-diagnostics, native-ufs-stats-delay and seven sheng-prefixed policy arguments (sheng-log, sheng-log-reserve, sheng-data-persist, sheng-dpu, sheng-dpu-scanout, sheng-wifi, sheng-wifi-attr). native-ufs-stream and native-ufs-smmu-takeover, which other device records pass for their UFS bring-up, are not parsed here at all - this implementation takes the stream id as the compiled constant 0xE0 - so copying those records verbatim would have bought arguments that do nothing.
  • The Data store has no board address: native_ufs_store_open (NativeUfs.cpp:1283-1310) computes first = userdata_last + 1 - reserve - blocks from the GPT it parsed, where reserve is sheng-log-reserve MiB times 256 four-KiB blocks, default 1024, anything over 16384 falling back to the default, and it refuses with the words size or overlaps the root image. The log is fixed at the last 32 MiB of the partition (kLogReserveBlocks 8192) with a 256 MiB export region below it (kExportBlocks 65536), opened as one 73728-block write window, and the reserve must hold both or the log refuses with reserve too small for the log. The reserve is a lifetime value: the source says changing it moves the store and the old one reads as blank.
  • For this unit that rule resolves to concrete LBAs, asserted on the host: a 4 GiB store lands at 60533755, the 1024 MiB reserve occupies 61582331..61844474, the log region is 61836283 for 8192 blocks, the log write window starts at 61770747 for 73728 blocks, and 188416 blocks (736 MiB) of reserve go unused between the store and that window.
  • The Data size is not a board field either: native_ufs_store_open has no caller in the driver. It is one of the five exports drivers/RamBlock/NativeRamBlock.cpp:89-96 weak-imports and calls, and RamBlock sizes the store from its own RAM disk, so owner Data needs RamBlock selected and linked (XNU_NATIVE_RAM_BLOCK=1, build-xnu-4k-baseline.sh:207,719) plus the --data-ramdisk seed payload.check_data_input demands with CONFIG_XNU_OWNER_DATA_MOUNT.

完成条件 ​

  • Host: descriptor bytes, register write order, completion and quarantine policy and the SMMU plan are pinned by tests against the reviewed contract.
  • Device: registers readable and clock/link state matching the chosen path; buffers reachable and one command completing; capacity and known blocks correct; the configured root mounts and launchd starts; writes survive the documented reboot inside the allocated Data region.

当前范围 ​

  • No device run of the transport: nothing here has yet touched the UFS controller; the geometry and the part identity came from a read-only recovery boot, not from this code.
  • What was recorded as 'ShengUfs cannot be selected here' is closed: the SM8550 fork in package/ufs is now selected under the catalog identity, with its source pinned by feeds.toml, and the catalog recipe builds it into the archive the link names. What remains is not a build question: CONFIG_XNU_NATIVE_UFS, native-ufs-root=1 and the payload Data seed stay unset, because a driver that panics on a stalled request list does not go into the image the owner's phone boots. And what "stays unset" was measured rather than deferred: with the plan fixed, turning those flags on in a reverted experiment made the kernel link refuse six strong vr_*/verified_root_* names (whose provider libVerifiedRootProbe.a needs the selected root's verified-root policy bundle, a payload product this tree does not build yet) plus the weak _boot_progress_poll, for which no provider exists in this workspace at all. Enabling the driver is that chain, not two flags.

下一步 ​

  • On the next sighting of unit 11b5d7c3, before anything else: scripts/read-boot-trace.py pull, which still owes the v10 firmware's UNIXNU.TXT.
  • Enablement is a link chain now, and its two open ends are named: get the verified-root policy bundle for the selected root (build/verified-root-systemos/verification.json, host-derivable from the local IPSW) so scripts/build-verified-root-probe.py can produce libVerifiedRootProbe.a and the six strong vr_* imports resolve, and decide boot-progress explicitly instead of stubbing it - either this port carries package/BootProgress.c plus scripts/build-boot-progress.py as the sheng and ishtar records do, or XNU_BOOT_PROGRESS stays off and the chain stops asking for _boot_progress_poll. The flags and arguments themselves are already read out of the code and are the easy half: CONFIG_XNU_NATIVE_UFS=y plus native-ufs-root=1, CONFIG_XNU_NATIVE_RAM_BLOCK=y with sheng-data-persist=1 or =2 and the --data-ramdisk seed payload.check_data_input demands, and sheng-log-reserve fixed once before the first write, because the store address depends on it and a changed reserve makes the old store read as blank.
  • Then, once that chain resolves and a kernel actually links the driver, the read-only milestones from docs/porting/ufs.md in order: registers readable, buffers reachable, one command completing, capacity and known blocks, root mount, persistence - each recorded at its own level, observed with scripts/read-boot-trace.py capture because the panel shows nothing before the display stack exists. Milestones cannot be reached by flashing an image that does not contain the driver, so this step is after the two open ends, not parallel to them.

证据 ​

显示 ​

planned

硬件与依赖 ​

  • Controller and panel identity, the DSI windows and splash region, the brightness transport and its encoding, the tear-check wiring and the enable GPIOs, each with a source.

配置 ​

  • dts/odin.dts keeps the panel block as documentation until the scanout path exists; the geometry already verified there is 1080x2400 DSC 1.1 command mode at 60 Hz with porches 40/20/10 and 2000/2704/2.
  • package/OdinDisplayBoard.h holds the panel and brightness facts with per-value citations; package/OdinDisplayBacklight.h/.c holds the transport rules, and neither bakes in an 8-bit assumption.
  • uefi-odin's Include/RAW.inc now names this board's own panel description, extracted from its XBL volume as Panel_K8_42_02_0a_amoled_dsc_cmd.xml with the stock GUID 6FF4EF1B-166B-4D80-B27D-4A31E6D3B298; USE_CUSTOM_DISPLAY_DRIVER stays 0, matching venus.dsc, so the shared SimpleFbDxe path is what a first build uses.

操作步骤 ​

  • Read the panel description first-hand and quote it line by line.
  • Read the brightness path in the vendor display driver (techpack/display/msm/dsi/dsi_panel.c) and the DRM helper it calls, and implement the encoding and the holds as a transport-agnostic layer.
  • Assert packets, bounds and hold behaviour on the host with a recorded bus.
  • Then establish firmware scanout, then the kernel backend, then brightness against the real panel.

开发经验 ​

  • Panel is 1080x2400 DSC 1.1 command mode (slice 1080x12, one slice per packet, bpc 10, bpp 8) at 60 Hz, backlight over DCS with no dedicated IC, TE on gpio82 (mdp_vsync mux 1), reset on gpio24, vddio and vddd enables on gpio42 and gpio83, ESD error interrupt on gpio75, and an avdd L13C supply.
  • Corrected against the vendor driver: brightness is written as the raw level, 16 bits, bounded only at 0xffff (dsi_panel.c:562-588) - it is NOT scaled into 8 bits, and an earlier revision of OdinDisplayBoard.h claimed it was, which would have made levels above 255 unreachable.
  • This panel declares qcom,mdss-dsi-bl-inverted-dbv (panel dtsi:39), and the driver exchanges the two bytes of the level when that flag is set (dsi_panel.c:583-584). With the DRM helper's low-parameter-first payload (drm_mipi_dsi.c:1057-1061) the two rules cancel, so the level appears big-endian on the link - a port that implements either rule alone produces a plausible-looking but wrong packet.
  • Two holds happen before any transport is touched: an unchanged level is recorded and dropped (dsi_panel.c:659-661), and this panel sets qcom,bl-update-flag = delay_until_first_frame (dtsi:40, parsed at dsi_panel.c:2567), so the first change waits for a queued frame. In command mode both are about real packets on a real link, not cosmetics.
  • odin's panel sets no qcom,bl-dsc-cmd-state, so the driver's default leaves the brightness write in high-speed mode; a panel that declared dsi_lp_mode would be sent in escape mode instead, and the layer models that as state rather than a constant.
  • Board range confirmed with real line numbers: bl_ctrl_dcs, min 2, max 4095, brightness-init-level 100 (xiaomi-sm8350-common.dtsi:282-286). The mi,HBM and clone bands (1..2047, threshold 2047, clone 8191, dtsi:684-701) are recorded but unmodelled because their consumers are in the Xiaomi extras, not in dsi_panel.c.
  • Also confirmed on the way through: qcom,mdss-dsi-te-dcs-command = 1 with te-check-enable and te-using-te-pin, tx-eot-append, lp11-init and panel-mode-switch (panel dtsi:30-38), which is the tear-effect configuration the display stage needs.
  • Closed on the device: the 90 Hz and 120 Hz porch sets are 1000/1336 and 500/652 with the horizontal blanking unchanged, read from the applied device tree's timing@1 and timing@2, and the 60 Hz description in this unit's XBL volume reproduces timing@0 exactly (2000/2704/2 at 1100000000 bit-clock, 4 lanes). Still open: the demura/dc-vi follow-up writes the driver performs after a successful brightness update (dsi_panel.c:588-592).
  • A transcription this port corrected from its own record: the Lineage panel dtsi asks for two slices per packet at lines 249, 459 and 669 and that value had been marked [V] in package/OdinDisplayBoard.h, but this unit's applied device tree says one in all three timings and so does the panel description inside its own firmware volume. One slice per packet is a different wire format from two, so the device wins; the header now says one and names the two sources that agree.
  • xbl_a carries two k8 descriptions and only one of them is the driver's: the freeform file in the volume (slice 1080x12, profile 8, porches 2000/2704) matches the device tree, while a single-line copy in the ELF data section carries slice height 40, profile 4 and porches 20/8 that no odin timing uses. The FDF points at the volume copy with its stock GUID.

完成条件 ​

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

当前范围 ​

  • Only the brightness encoding layer is implemented and host-verified; firmware scanout and the XNU display backend are not, so this area stays planned.
  • The DSI controller windows are [R] from the extraction pass and no packet has yet been seen on a link, though DisplayDxe itself is now extracted from this unit's volume rather than assumed.
  • The AOD 0x51 hold (aod_bl_51ctl) is not modelled because this unit's setting for it is unknown.
  • avdd stays unresolved: the reported gpio 12 at a fixed 5500000 uV contradicts this unit's own supply list, which carries avdd as a 3000000 uV PMIC entry, so nothing drives that rail from the header value yet.

下一步 ​

  • Build the firmware against the generated Binaries/odin, confirm the menu on the panel, then wire odb_set/odb_first_frame to the real DSI transport and measure brightness.

证据 ​

输入 ​

host-verified

硬件与依赖 ​

  • Controller identity, bus pins and clocks, the command set and event framing, the bring-up order, the firmware image path and the contact report contract, each with a source.

配置 ​

  • board.toml selects no input component: the protocol runs in the firmware because the arm-io 16 MiB base rule cannot export SE11, so QcomGeniSpi is a firmware-side dependency of uefi-odin rather than a kernel component here.
  • package/OdinTouchBoard.h holds the bus, pin, clock and axis facts with [V]/[R] marks; package/OdinDisplayBoard.h holds the panel geometry the axis space is divided against; the orientation is passed to the report layer as an argument because the vendor sets no rotation property on this board.
  • configs/odin_defconfig stays as the minimal set: the HID consumer arrives with the firmware producer, not before.

操作步骤 ​

  • Extract the command set, framing and timings from the vendor driver with per-line citations (FtsProtocol).
  • Establish the bring-up order from the same tree and encode it as one pipeline function per vendor step (OdinTouchPipeline).
  • Assert the whole path on the host with a scripted bus that replays FIFO records by length: raw bytes in, contacts out (sh package/run-tests.sh).
  • On the device, confirm the first working frame, then measure orientation, then verify the report against the panel.

开发经验 ​

  • SE11 sits on wrapper qupv3_1 (stream id 0x43) with the bus on gpio48/49/50 and the chip select split out to gpio51 by the odin pinctrl override; touch reset and irq are gpio22 and gpio23 at 8 mA active drive. The per-pin roles of the three bus lines are not stated by the vendor, so they must be read from the first working frame.
  • Consequence of the 16 MiB arm-io base rule: the touch protocol has to run in firmware, which makes QcomGeniSpi reusable and leaves FtsProtocol as the only new code.
  • Bring-up order, read from the vendor tree rather than inferred: interrupts down, reset line low 10 ms, poll the FIFO for the whole-byte ready event 0x03, then read the 208-byte system information block. The chip id is read only on the failed-reset path, where it decides between no panel and panel-without-firmware. Sensing is switched with {0xA0,0x00,0x01} and off with {0xA0,0x00,0x00}.
  • A defect this port found and fixed in its own earlier code: the ready event had been matched as (byte >> 4) == 0x03, which accepts 0x30 (a leave-point event) and rejects the only byte that means ready, so a successful reset looked like a timeout. The high nibble is the dispatch index (fts.c:4849), the id is the whole byte (ftsCore.c:237).
  • Two defects of the same class came out of wiring the pipeline: a bus failure inside the ready poll was reported as a timeout, hiding a broken serial engine behind a slow-looking reset; and sensing could be started on a controller that never announced itself.
  • Axis space is ten times the panel (10800 x 24000) with super resolution enabled, so the report layer divides by ten and clamps; ten contacts is the ceiling and surface ids are monotonic and never reused, which the pipeline test asserts through a full frame and an eleventh contact.
  • The board's own firmware image was recovered read-only from the mounted vendor partition: st_fts_k8.ftb, 124072 bytes, SHA-256 dedfe0fd65d0801d2d7a557f6d87d01fa1fe6d341494a565f28fa623d5144c79, with stm_fts_production_limits.csv (25982 bytes). The recovery kernel names it during probe, so the file is the one this controller is flashed from.
  • Parsed with this port's own reader, the real header agrees with every constant transcribed from the vendor tree: signature 0xAA55AA55, format version 1, target bytes 0x36 0x40 - exactly FTS_DCHIP_ID_0 and FTS_DCHIP_ID_1 - and section sizes 120404 + 3600 + 0 + 0 = 124004, which is the file minus its 64-byte header and 4-byte trailing CRC.
  • A second defect of the ready-event class, found by running the reader over the real image: the four page counts at FLASH_ORG_INFO_INDEX 280 are single bytes (ftsFlash.c:512-516 indexes them with index++), and this port read them as 32-bit fields. On this board the bytes are 44, 1, 2, 1 while the word at 280 is 0x0102012C, so the CX base would have landed hundreds of thousands of pages past the real one - an erase-and-burn into the wrong flash area. The fallback rule was also wrong: the vendor selects the fixed bases when ANY of the four counts is zero, not when their sum is.
  • Observed on the running board rather than transcribed: the vendor FTS driver 5.2.4.1 probes over SPI and registers an input device at /devices/platform/soc/a8c000.spi/spi_master/spi2/spi2.0, which is the SE11 window this port drives from firmware; the probe also reports tp vendor 56, tp color 50 and the fingerprint-on-display regions 4180 x 16810.

完成条件 ​

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

当前范围 ​

  • No device run of this port's own code: the frames, the order and the report are asserted against a scripted controller, and the recovery log shows the vendor driver working, not ours.
  • The burn path has now got its image - st_fts_k8.ftb is in facts/, never committed - but no erase or DMA write has been attempted, so the flash arithmetic stays host-only.
  • Orientation is unmeasured, so it is an argument rather than a constant; the sensor matrix behind the fts,* filter arrays is undecoded, which only affects the axis limits.

下一步 ​

  • Read the first working frame on the device to settle the three bus lines' per-pin roles and the orientation, then produce the HID producer in uefi-odin on top of otp_poll.

证据 ​

GPU ​

host-verified

硬件与依赖 ​

  • The graphics IP identity and its windows, the power domain and clock owner, the CP packet encoding this generation emits, and the GMU boot sequence, each with a source.

配置 ​

  • dts/sm8350.dtsi exports gfx 0x3d00000/0x40000 plus 0x3d61000 and 0x3de0000, gmu 0x3d6a000 and kgsl-smmu 0x3da0000; the firmware's own ACPI table for the same silicon declares one MON0 device covering 0x3d00000, 0x3d60000, 0x3d90000 and 0x3de0000, so the merged coverage and the ADT tuples agree.
  • The GPU clock controller is at 0x3d90000 (OGP_GPUCC_BASE) with CX/GX domains at 0x3d9106c and 0x3d9100c: they are inside the graphics window, not the GCC's, so they cannot be programmed through a GCC mapping. Nothing maps it yet - GPUCC is one of the power board's own five windows (OGP_W_GPUCC) and no driver has been written to supply the mapping, which is why the DSDT does not declare it under another device's id.
  • AdrenoFirmware is the only reusable catalog component here (it is SoC-neutral); Adreno740 and Sm8550Platform are SM8550-scoped and are not applicable to a 660.

操作步骤 ​

  • Inventory first-hand from the vendor tree (already done: chipid, windows, GMU, PDC, ZAP, power domains).
  • Build the packet layer against the encoding the vendor driver actually emits, asserted on the host, before touching a submission path.
  • Then the GMU boot sequence, then a render, then presentation.

开发经验 ​

  • Adreno 660 (A650 family), chipid 0x06060000, with GMU 0x3d6a000, PDC 0x0b290000 and the ZAP blob a660_zap loaded at pil_gpu 0x8e71a000.
  • Correction that saves a whole module: this generation does not emit PM4 type-3 packets. The vendor driver builds every CP command with cp_type7_packet (adreno_pm4types.h:188-203, used at adreno_a6xx.c:1008 CP_ME_INIT, 1120 CP_SET_PSEUDO_REGISTER, 1133 CP_CONTEXT_SWITCH_YIELD, 1255 CP_SET_MARKER), so the existing type-4/type-7 coverage is the right base and a type-3 path would be dead code.
  • Type-7 header encoding is count in bits[14:0] with an odd-parity bit at 15, opcode in bits[22:16] with an odd-parity bit at 23; type-4 adds an 18-bit register index with its own parity. The builder therefore has to compute parity, not copy a literal, and the tests must pin it.
  • Two structural requirements visible in the same code and easy to miss: every 64-bit GPU address is written through cp_gpuaddr as a two-word low/high split, and the CP can be in protected mode - the driver brackets address-writing packets with cp_protected_mode(0) and cp_protected_mode(1). A builder that ignores either produces a packet stream the CP rejects.
  • CP_ME_INIT is emitted as a single packet whose payload size is A6XX_CP_INIT_DWORDS - 1 with an ordinal mask and conditionally present fields, so the field count is derived from the mask rather than fixed.
  • Inventory of the catalog driver, measured rather than assumed: Adreno740 takes every window from the device tree (NativeAdrenoService.cpp parses the provider's reg, requires at least two, and builds the GMU adapter's bases from node->windowAddress(index)/windowBytes(index)), so addresses are not this port's blocker.
  • What does block it: both probe filters are substring tests over the compatible block - advertisesAdreno() wants the bytes qcom,adreno, advertisesGmu() wants qcom,adreno-gmu - and this unit's a6xx nodes say qcom,kgsl-3d0 and qcom,gpu-gmu, so the driver would bind neither. The sheng coupling is narrow and decisive: 6 of 61 files mention Sheng, 3 include ShengGmu.h, and that header lives only in Sm8550Platform (UniXNU-sm8550-common), which is the driver's first catalog dependency and is not applicable to a 660.
  • The substring rule is also the hazard: qcom,adreno occurs inside qcom,adreno-smmu, which this port publishes on iommu@3da0000 with exactly the two windows the driver's count check accepts, and RBBM_STATUS at 0x840 lies well inside that 128 KiB block - so a byte-substring matcher on this board binds the GPU SMMU and reads its global registers as if they were the graphics core. An odin driver must match compatible elements, not bytes.
  • The two generations' GMU nodes genuinely differ, so the a7xx window list cannot be reused: the a7xx node publishes three windows (gmu 0x3d6a000/0x35000, rscc 0x3d50000/0x10000, gmu_pdc 0xb280000/0x10000) and the driver binds only at three or more, while this unit's publishes two (kgsl_gmu_reg 0x3d6a000/0x34000, kgsl_gmu_pdc_cfg 0xb290000/0x10000) because RSCC belongs to the GPU node at a6xx (window index 2, 0x3de0000/0x10000).

完成条件 ​

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

当前范围 ​

  • No implementation yet: the packet builder and the GMU boot path are the next pieces of work, and the GX power domain has never been brought up on this port.
  • The ZAP firmware blob and the GMU/OOBP images are vendor binaries and are not in these repositories, so the GMU path cannot be exercised before they are obtained from the unit.
  • The catalog Adreno740 driver is not a route to GPU on this board and is not selected: it matches a7xx compatible names this unit does not use, its GMU cold start needs Sm8550Platform's ShengGmu layer, and its five-window adapter expects three GMU windows where this board publishes two. Editing a catalog component's needles, class and bundle names is refused by its own AGENTS.md, so the work is an odin-scoped a6xx component.
  • Nothing binds graphics today even if a driver existed: gpu@3d00000, gmu@3d6a000 and iommu@3da0000 are all status = "disabled" in dts/sm8350.dtsi, [kernel] archives names no GPU archive, and CONFIG_XNU_NATIVE_ADRENO is not set for odin.

下一步 ​

  • Write the a6xx GPU component for this board: element-wise compatible matching against qcom,kgsl-3d0 and qcom,gpu-gmu, windows taken from reg in the order the tree publishes them, and the bundle identity the catalog rules require of a new component rather than an edited one.
  • Then run the power board's staged sequence read-only on the first hardware boot - ogp_run photographs GCC AHB, CX, GX, RBBM_STATUS and the gfx SMMU stream without writing anything - because every gate downstream assumes a rail and a clock this port has never proved up.
  • Then the GMU bring-up from a6xx_gmu.c on top of the type-7 builder already tested here: ZAP through PAS 13 into pil_gpu_region, logos and OOBP, CM3 start, HFI handshake - which needs the vendor firmware images, so it cannot start on the host.
  • Then the ringbuffer start, then a known render, then presentation.

证据 ​

网络 ​

planned

硬件与依赖 ​

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

配置 ​

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

操作步骤 ​

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

开发经验 ​

  • The SKU question is settled from this unit's own applied device tree, not from a sibling board: the node is wlan: qcom,cnss-qca6490@b0000000 with compatible "qcom,cnss-qca6490" and bluetooth: bt_qca6490, so the combo chip is QCA6490 and wil6210 does not apply to this board.
  • The same node gives the wiring the driver needs: reg smmu_iova_ipa 0xb0000000/0x10000 plus tcs_cmd 0xb2e5510/0x690, wlan-en-gpio 64, bt-en-gpio 65, sw-ctrl-gpio 153, qcom,wlan-rc-num 0 so the device sits behind PCIe RC0 (pcie0 at 0x1c00000), a dynamic ramdump region of 0x420000 and a vdd-wlan-aon supply.
  • The recovery kernel log proves the reserved region is real on this board - cnss_wlan_region initialized as a shared-dma-pool - but the recovery build carries no cnss driver, so no PCIe binding and no firmware load were observed; that is still a running-OS measurement.

完成条件 ​

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

当前范围 ​

  • Hardware inputs and implementation are pending for this example board.

下一步 ​

  • Pick the driver family for QCA6490 on this SoC, then list the firmware files the vendor image actually carries for it.

证据 ​

按下一步操作收集证据。

音频 ​

planned

硬件与依赖 ​

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

配置 ​

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

操作步骤 ​

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

开发经验 ​

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

完成条件 ​

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

当前范围 ​

  • Hardware inputs and implementation are pending for this example board.

下一步 ​

  • Inventory the required audio inputs before implementation.

证据 ​

按下一步操作收集证据。

电源 ​

host-verified

硬件与依赖 ​

  • Every rail each subsystem is fed from, with its voltage, load, enable GPIO, boot-on state and any parent supply, each quoted from the board device tree.

配置 ​

  • The rails stay described in the device tree as the vendor writes them; package/OdinPowerBoard.h is where the port keeps the ordering and the gates, because XNU has no regulator framework to read the DT phandles.
  • dts/sm8350.dtsi's ufs node now carries the vcc/vccq/vccq-parent note next to the controller it feeds, so the dependency is visible where the controller is described.
  • No regulator node is added to the board DTS: these are consumer properties of the Linux drivers, and exporting them into the ADT would describe a device the port does not have.

操作步骤 ​

  • Read the supply properties out of the board and overlay dtsi files with line numbers.
  • Transcribe them as a table, leaving a value at zero where the tree declares none instead of filling it in.
  • Encode the parent-before-child rule and the three subsystem gates, and assert every row against the file it came from.

开发经验 ​

  • Storage: vcc = pm8350_l7 at 2504000..2950000 uV, 800000 uA; vccq = pm8350_l9, 900000 uA with no level declared on this board; and vccq's qcom,vccq-parent-supply = pm8350_s12 at 210000 uA (xiaomi-sm8350-common.dtsi:124-138). The parent is the part a port cannot see from the controller node, and enabling l9 without it powers an rail from a source that is not on.
  • Display: dsi_panel_pwr_supply_k8 is an ordered list - vddio then vddd then avdd - with 1800000/1800000/3000000 uV, enable loads 60700/60700/10000 uA, disable loads 80/80/0 and a two-millisecond pre-off and post-on sleep on every entry (display/lahaina-sde-display-common.dtsi); the rails themselves are display_prim_vddi on tlmm 42, display_prim_vddd on tlmm 83, both regulator-boot-on, and L13C (odin-sm8350.dtsi:37-49, 412-414).
  • Input: touch vdd = L2C with no level or load stated on this board, avdd = touch_avddsource_vreg, a fixed regulator on tlmm 132 at 3008000 uV, regulator-boot-on and regulator-always-on (odin-sm8350.dtsi:92-93, 81-85, 55-58).
  • Because two of the fixed rails are boot-on, a warm handoff from vendor firmware has them already enabled; the state model starts from that instead of demanding GPIO writes that have happened, and the gates still refuse anything whose LDO is down.
  • Two rails are deliberately recorded with zeros: vccq's level and L2C's level and load are not declared by this board, so the module carries them as undeclared and no consumer treats zero as a default.

完成条件 ​

  • Host: the rail table, the parent ordering and the three gates are asserted against the device tree rows they came from.
  • Device: declared power controls and battery readings match observations; each claimed sleep/resume transition restores its dependent peripherals.

当前范围 ​

  • No PMIC access path yet: this layer describes which rails, in which order and with what loads, but the writes go through a driver that does not exist for SM8350 here.
  • Battery, charger and gauge are not inventoried at all, and suspend/resume sequencing is untested, so the second half of this area stays open.
  • The loads are the values the board declares, not measurements; a rail shared with a subsystem this port has not examined may carry more than these rows say.

下一步 ​

  • Wire opb_enable and the three gates into the firmware's PMIC sequencing before the first storage or display attempt, then inventory the battery and charger nodes.

证据 ​

镜像组装 ​

host-verified

硬件与依赖 ​

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

配置 ​

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

操作步骤 ​

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

开发经验 ​

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

完成条件 ​

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

当前范围 ​

  • Verified up to the build boundary only: no kernel, payload, firmware or boot image has been produced, because the device inputs above are still unmeasured and the firmware binaries are not extracted.
  • The probe copy is where the check ran; the committed board still refuses release, deliberately.

下一步 ​

  • Inventory the required image assembly inputs before implementation.

证据 ​

诊断 ​

planned

硬件与依赖 ​

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

配置 ​

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

操作步骤 ​

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

开发经验 ​

  • The board's checks are commands, not narratives: sh package/run-tests.sh builds and runs the host programs (board-facts, touch-bus, fts-protocol, clocks, reservations, touch-report, ufs-transport, ufs-smmu and the rest) and every line ends all checks passed, and scripts/check-odin-firmware.py is the preflight gate that re-hashes every Binaries/odin module against manifest.json, resolves each INF named by DXE.inc and APRIORI.inc, compares Resources/Configs/odin.toml against the rows MemoryMapLib.c actually carries, and refuses the raw configs that belong to ConfigurationMapLib instead of the firmware volume.
  • check-odin-firmware.py separates the two ways a firmware build can fail: exit 1 means a board file is wrong here, and exit 2 means a vendor input is missing on this machine. A green run therefore never implies the vendor bytes were verified, and the archive scripts say the same thing in words - download and extract print why they skipped rather than exiting silently on a path they did not take.
  • A checker earns its place by finding something: scripts/check-odin-dsdt.py is a preflight entry and its rule that every ACPI window and interrupt must appear in this unit's own device tree caught two wrong SPI-to-ACPI conversions in the table's first draft (0x194 for 0x164 and 0x100 for 0xd0, where the rule is plus 32). It also refuses to be a gate on machines that cannot run it, since a review input that is absent is not a defect: without acpica or without facts/ it prints skipped and exits 0, and only --require, the form the preflight uses, turns an absent input into a failure. Which copy it reads is now a checked property rather than an assumption: with --uefi naming a real Mu-Silicium checkout the table lives at Silicium-ACPI/Platforms/Xiaomi/odin (that is what odin.dsc:95's odin/AcpiTables.inf resolves against), so the checker prefers the installed overlay over the authored uefi-odin/ACPI copy and a stale install fails the run.
  • A check script must not depend on where it was invoked from. Every board script here used to take the device repository from Path(__file__).parents[1], which is right for a human running it in place and wrong for the build driver, which copies scripts/ into the build tree and runs them there - the first real firmware build proved it with FileNotFoundError on tree/proprietary-files.txt. All of them now read $UNIXNU_DEVICE, which firmware.py already exports, and fall back to __file__ only so that the documented standalone commands keep working.
  • A kernel build that stops at a patch tells you where it stopped, not why, because the driver reverts the tree on failure and the next command sees a pristine checkout. The reproducible localizer is to replay the selected series one patch at a time in the scratch tree (git checkout -- . and git clean -fdq first, then git apply -p1 per entry, then git apply --check for the one that failed): it turned 'the iOS 17 series does not apply' into 'one hunk needs the XNU_SHENG_PMGR block, which no series in that profile creates' in a single pass. The firmware build has the same shape: the compiler error was 'no such file or directory: ENABLE_SECUREBOOT=', and the answer was in the failing module's cc_resp.txt, which showed '-D -D' where the modules that compile show '-D ENABLE_SECUREBOOT=0'.

完成条件 ​

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

当前范围 ​

  • Every check here runs on the host against this board's own artifacts. Nothing observes the device: the firmware and the boot image now exist as bytes, but no firmware has booted, so the runtime diagnostics - the framebuffer handover, the ADT the loader reads, the modem PIL regions still live at ExitBootServices - have no observations yet, and boot.json records hardware_tested = false.

下一步 ​

  • Run the built FD on unit 11b5d7c3 through fastboot boot, which writes nothing, and record the stage it reaches: SEC, the BDS menu, the framebuffer, and whether the loader publishes odin's DSDT; the host gate stays as it is until then.

证据 ​

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