116 Commits
Author SHA1 Message Date
bluseliu50 474cfeeb4e Integrate iPadOS 27 startup fixes and runtime input preparation 2026-11-02 02:35:30 +08:00
rpone a4419c8af7 fix(tree): script copies refresh by content
Size and mtime miss a change that keeps the size and looks older than the
stale tree copy; the copy now compares the bytes.
2026-11-02 00:05:45 +08:00
rpone 66e43f1c16 fix(firmware): preflight entries carry arguments
The entry text was passed whole as the script path; shlex splits it, as the
kernel archive entries already are.
2026-11-01 22:00:26 +08:00
rpone 658f82fe0f fix(firmware): preflight scripts get the device checkout in UNIXNU_DEVICE
The firmware preflight scripts read board.toml for the pinned fastboot
archive; the tree they run in carries no board.toml.
2026-11-01 21:56:02 +08:00
rpone f0e7d5279e fix(prelink): the fileset reference builds inside the flow
--tree replaces the hardcoded profile tree; the version strings come from the
environment the kernel step sets. The private copy stubs the native hooks the
bring-up patch calls from the kernel core (an undefined weak symbol's
authenticated pointer fails the link), trims the forced exports its objects
cannot provide and links again, and the comparison kernel lands at
build/xnu/fileset-reference/mach.release.bcm2837.unstripped.noctf, which a
clean tree had no step to produce.
2026-11-01 12:06:44 +08:00
rpone 3cb6a302db fix(prelink): the fileset reference builds inside the flow
--tree replaces the hardcoded profile tree; the version strings come from the
environment the kernel step sets; the unavailable forced exports are trimmed
from the private source copy and the link runs again; the built comparison
kernel lands at build/xnu/fileset-reference/mach.release.bcm2837.unstripped.noctf,
which a clean tree has no step to produce.
2026-11-01 12:06:44 +08:00
rpone d3fe8522c8 fix(source-drivers): a pending kernel link defers the export check
The report read the linked kernel's exports, but a clean tree links the kernel
only after the archive builders have run (the bootstrap pass stops at the link
by design), so the step failed on a fresh checkout. The report now names the
pending pass; the final kernel link remains the unresolved check.
2026-11-01 11:11:13 +08:00
rpone 8f63c39ef5 fix(input): the touch firmware also loads from the repository
The default was the extracting machine's cache alone; a clean checkout (the
packaging action) has no .cache/firmware/novatek. firmware/novatek of the
device repository, pinned in proprietary-files.txt, serves the same file.
2026-11-01 10:48:44 +08:00
rpone 8c32baf0f0 fix(release): archive scripts get the device checkout in UNIXNU_DEVICE
A board script located its repository by a fixed sibling directory name and
failed when the checkout carries another name (the packaging action checks
out the device repository as device/).
2026-11-01 10:27:06 +08:00
rpone 0db7e01a82 fix(adreno): hash the ABI header from the renamed module
build-adreno740-accelerator hashed drivers/NativeMetal/OriginalAcceleratorABI.h,
the repository's old name, and failed on a clean tree beside the driver's fix
of the include itself.
2026-11-01 10:16:07 +08:00
rpone 34576e7397 fix(adreno): send the run's token to GitHub for the firmware blobs
The firmware pins are fetched from api.github.com, whose anonymous quota a
hosted runner shares and exhausts (HTTP 403); GITHUB_TOKEN or GH_TOKEN goes to
GitHub hosts only, as prepare-xnu-source.py already does.
2026-11-01 09:55:15 +08:00
rpone 627c932a15 fix(storage): find shipped policy headers in the assembled tree
The ShengUfs component recipe runs this builder without arguments, so the
--policy-dir flag of the archive entry never reached it and a clean checkout
still looked for build/verified-root-<build>. Without an explicit directory the
builder now falls back to the single scripts/policies/*<build> directory of the
assembled tree, where the device repository's scripts are copied.
2026-11-01 08:55:14 +08:00
rpone 20d8a70299 fix(storage): accept a policy directory that ships only the signed headers
A build whose tables go to userdata reads only the first 544 bytes of each
manifest. The policy directory may now carry manifest.header.bin alone: the
image digest, the verification record and the shared anchor are still checked
against it, and the full block tables stay a local input of the userdata image.
2026-11-01 08:41:05 +08:00
rpone da2e4aaccd fix(config): re-read the configuration when a step asks for it
A release writes the configuration at its preflight step, after the context
exists, so the copy taken when the context was made is empty on a fresh output
directory and build_archives built nothing: the kernel then linked archives
nobody had built and failed with _native_source_storage_start undefined.
need_config re-reads the file.
2026-11-01 08:29:04 +08:00
rpone 2ced2d7340 fix(release): pass the board's firmware device tree to the pack step and the firmware path to preflight scripts
- cmd_release: [bootimg] dtb, relative to the build tree, is the device tree of the boot image.
- firmware.build: preflight scripts get UNIXNU_UEFI, the firmware checkout of the run.
2026-11-01 06:48:21 +08:00
rpone 90ca56a289 feat(release): one-command device packaging with per-OS overrides
unixnu release runs deps, preflight, patches, build, pack and verify and writes
package.manifest.json (sizes and SHA-256 of boot.img, payload.img and
kernel.macho, module revisions, patch order, command line length). verify
refuses a missing or changed output, a command line of 1000 bytes or more and a
boot image above [package] boot_partition_bytes.

board.toml [package.defconfig] maps an OS profile to its defconfig, and
[os_overrides."<profile>"] merges the values that differ for one profile over
the board; its remove list drops keys the profile does not have. --os picks the
profile, so one branch serves 17, 26 and 27.

templates/package.sh is the device repositories' fixed script. It reads only
[package] unixnu and runs unixnu release.
2026-11-01 06:06:26 +08:00
rpone bd5e13e127 Merge remote-tracking branch 'origin/main' into feat/ipados27-gpu-parity
# Conflicts:
#	docs/devices/sheng.md
#	docs/zh/devices/sheng.md
2026-11-01 05:37:45 +08:00
rpone e291c50b6e chore(drivers): bump Adreno740 and AdrenoMetal to their main
The Turnip patch keeps the new files the pass record adds
(tu_cmd_buffer.h, tu_pipeline.cc, tu_pipeline.h), and a linear image is
no longer mutable for the code that loads and stores it through tile
memory, so its swap is not applied twice on the way to memory.
2026-11-01 05:35:00 +08:00
rpone 02f8cdd377 fix(scripts): use mach.development.bcm2837.unstripped (no .noctf suffix)
The kernel object produced by the ipados27 build tree is
mach.development.bcm2837.unstripped; the .noctf variant is not emitted.
Fix the reference in build-sheng-source-drivers.py and all other scripts
that contained the wrong suffix.

Also update submodule pointers for Adreno740 (preemption A1) and
AdrenoMetal (priority forwarding + pass reporter), and regenerate
turnip-gmem-mutable-swap.patch to include the NativeAdrenoAbiPriority
method-17 call in tu_knl_darwin.cc.
2026-11-01 00:20:19 +08:00
rpone 36247a1b4c feat(gpu): frame path trace across runtime, driver and kernel
Bumps Adreno740 and AdrenoMetal and records bridge patch 0022.
2026-10-31 19:43:34 +08:00
rpone 49524f0fa6 perf(gpu): spare image blocks, async room, BoFree outside the lock
Bumps Adreno740 and AdrenoMetal and records bridge patch 0021.
2026-10-31 18:06:45 +08:00
rpone 4b57b67251 feat(gpu): GMEM swap patch, unixnu --os, module pointers for the diagnostics batch
turnip-gmem-mutable-swap.patch moves GMEM loads and stores with the identity swap on the memory side and adds the render pass and submission rings; unixnu --os 17|26|27 selects the OS profile and its output directory.
2026-10-30 23:54:41 +08:00
rpone 88604d01c1 feat(sheng): diag export source in the storage build; module pointers for the BGRA, contiguous BO and direct scanout work 2026-10-30 19:34:51 +08:00
bluseliu50 9bfc45a7d7 build: add the fileset reference, trust, addon and pipeline-pack tools 2026-10-30 05:10:44 +08:00
bluseliu50 f19e94bac6 refactor: build the bridge's 20 patches and point at on-device pipelines
The bridge's fallback patch is gone and the later ones renumbered; the
Turnip build id comment names the persistent Data cache it keeps
valid. Pointers follow AdrenoMetal and Adreno740.
2026-10-29 19:35:44 +08:00
bluseliu50 0b3ad36992 refactor: compile pipelines on the device only
make-pipeline-cache.py and the bridge's fallback patch are gone, the
bridge builds 20 patches, and the pointers follow AdrenoMetal and
Adreno740.
2026-10-29 19:35:25 +08:00
bluseliu50 e038ba38fc fix(turnip): owner-laid linear images at 64-byte pitch, rendered in SYSMEM
fdl6_layout aligned an explicit linear layout's pitch to 16 pixels for
the 16x4 GMEM store, so an IOSurface whose rows are 24384 bytes (3048
RGBA16Float texels) could not be imported in place. An explicit layout
now takes the hardware's 64-byte alignment, and a linear host or
explicit-layout attachment whose size is not whole tile blocks renders
in SYSMEM, which reads and writes its texels alone. Bridge patch 0021.
2026-10-29 17:04:39 +08:00
bluseliu50 159eb82611 fix(turnip): memoryless textures take no memory
The darwin backend now offers lazily allocated memory, as the msm
backend does with a settable GPU address: a sparse VMA reserves the
range and a BO is made there only when a pass needs the bytes. A pass
with such an attachment that has no memory yet renders in GMEM, where
the attachment lives in tile memory alone; the autotuner chose SYSMEM
for passes of few draws and so made the memory for good.

Core Animation's render server holds its intermediate targets as
memoryless textures: untagged-feaf29203 had twelve 3048x2032 RGBA16F
ones, 758 MiB, each memory of its own. On the host the same Liquid
Glass scene no longer allocates the 48 MiB attachment.
2026-10-29 16:34:29 +08:00
bluseliu50 b624df5b5a fix(turnip): free cached BOs not reused within a second
The darwin BO cache gave BOs back only on memory pressure or a failed
allocation. With BOs from system memory nothing fails, so it held what
the render server freed. It now frees an entry not reused within a
second of entering it, as freedreno's fd_bo_cache_cleanup does. Bridge
patch 0019 and the MEM telemetry row.
2026-10-29 15:26:53 +08:00
bluseliu50 16d7ff9632 feat(gpu): metal2vulkan development tip, BOs from system memory
The translator pin moves to upstream development 624bab39 (the
inexact-math work) and records its branch; check-metal2vulkan-pin.py
checks the pin against the branch the record names. Bridge patch 0018
rounds heap texture sizes to their alignment. Adreno740 takes user BOs
from system memory, with no fixed pool.
2026-10-29 14:30:09 +08:00
bluseliu50 fa2ff312f5 fix(gpu): ahead-compiled pipelines read on demand, metal2vulkan patch 0017
make-pipeline-cache.py builds its producer with the plugin's include paths
and the tablet's TU_DEBUG.
2026-10-29 13:16:00 +08:00
bluseliu50 c93e965466 feat(gpu): metal2vulkan 0dfdbcd, a fixed Turnip cache identity and pipelines compiled ahead
- pin metal2vulkan at upstream 0dfdbcd5 with the rebased 16-patch series;
  scripts/check-metal2vulkan-pin.py proves with git alone that the
  checkout is upstream plus exactly those patches
- Turnip's pipeline cache UUID comes from its compiler source
  (-Dtu-build-id), the same for the host and the tablet build
- scripts/make-pipeline-cache.py runs the render server's priming over
  every library of the OS image on the host through the tablet's
  compiler and packs the cache
2026-10-29 11:44:31 +08:00
bluseliu50 c6f672600d chore: bump AdrenoMetal for Core Image kernels by name 2026-10-29 01:57:09 +08:00
bluseliu50 2c40ae9a7b perf(turnip): no CPU wait on syncs already on the ring
Every client submits to the kernel's one in-order ring, and each job's
prologue flushes and invalidates the GPU caches and waits for idle, so
a wait on a sync already resolved to a ring fence is met by the ring,
as msm_gem_submit() skips its own ring's fences. Only an unresolved
sync is waited for, until it is submitted. The submitting thread no
longer stalls on the previous GPU work.

Also bumps AdrenoMetal and registers bridge patches 0024-0037.
2026-10-28 23:53:52 +08:00
bluseliu50 fb5cdd6e06 chore: bump AdrenoMetal for Apple-semantics waits, imports and heaps
Registers runtime patches 0022 (mipmaps outside the measured spread) and
0023 (heap texture size a multiple of its alignment). The frontend host
check counts the releasing surface import.
2026-10-28 22:49:41 +08:00
bluseliu50 caffd5dfb5 feat(turnip): release cached BOs on OS memory pressure
The retire queue and the BO cache grow with demand instead of holding
256 and 1024 entries. The cache gives everything back when libdispatch
reports memory pressure (DISPATCH_SOURCE_TYPE_MEMORYPRESSURE, warning
or critical) and when an allocation or GPU range cannot be had; the 2 s
idle eviction, the 100 ms kernel poll and the seven-eighths VA rule are
gone. Fence waits for idle and for ring space have no fixed bound: the
kernel's hangcheck ends a hang. TU_DARWIN_BO_CACHE=0 turns the cache off
for the host checks of the release paths.
2026-10-28 20:56:15 +08:00
bluseliu50 56352f7391 chore: bump Adreno740 for GPU hang recovery
derive-a740-hwinit.py also emits RBBM_SW_RESET_CMD.
2026-10-28 20:40:55 +08:00
bluseliu50 8798b45a77 chore: bump Adreno740 and ArmSmmu4K for on-demand page tables 2026-10-28 20:26:16 +08:00
bluseliu50 aefb6563e3 chore: bump Adreno740, AdrenoMetal and ArmCpu; drop mimalloc
The bridge uses the system allocator now.
2026-10-28 20:13:29 +08:00
rpone ab11a8cb68 feat(scripts): iPadOS 27 kernel, driver, GPU addon and seed build steps
Source-driver and source-storage builds, the arm64e PAC rewrite for the Rust bridge, the IOAccelerator base ABI of 24A446, the bridge with mimalloc and link-time optimisation, the plugin with the prime list, addon options for a prime list, a pipeline pack and cache export, wallpaper overlay and seed changes, and payload, kernel and userdata steps for the new profile.
2026-10-28 09:20:55 +08:00
UniXNU Docs 120067ccc4 docs: remove sheng-specific log capture page 2026-10-28 04:57:46 +08:00
bluseliu50 2ab05c11ae build: port the arch and OS patch series to xnu-12377 and share the kernel target 2026-10-26 15:10:41 +08:00
bluseliu50 2d5a60af86 build: compile kernel archives for the selected architecture and iOS version 2026-10-26 14:43:27 +08:00
bluseliu50 f66b8b8fe6 fix(feeds): leave submodules with local changes checked out 2026-10-26 14:43:27 +08:00
bluseliu50 2cdf5d9ae9 feat(userdata): take windows from the OS profile and decrypt AEA images 2026-10-26 14:43:27 +08:00
bluseliu50 4453bb371a build: pass the XNU architecture and iOS version to kernel builds 2026-10-26 12:54:22 +08:00
bluseliu50 86c4f67378 feat(profiles): select the architecture profile from the OS profile 2026-10-26 12:54:22 +08:00
rponeawa e721468d55 Automate discovery and rendering of device records 2026-10-26 07:29:25 +08:00
bluseliu50 018c8f3439 fix(kernel): restore omitted XNU headers after a fresh clone
A changed patch series re-clones the XNU work tree, which lacks the public
headers newer xnu omits (TrustCache among them), and archives built before
the kernel failed to compile against it.
2026-10-26 01:40:29 +08:00
bluseliu50 71ccc68c1e feat(adt): pass each CPU's cluster type from the DTS
A CPU node with unixnu,cluster-type "E" or "P" gets the ADT cluster-type
integer XNU reads to build E and P processor sets.
2026-10-26 01:40:29 +08:00