Commit Graph
34 Commits
Author SHA1 Message Date
bluseliu50 e90b050e65 feat(gpu): carry the shader prime list in the addon and the plugin
make-gpu-addon.py --prime-list FILE adds the OS image's .metallib paths
as addons/NativeAdrenoMetal.primelist. The plugin build also links
build/prime-list.txt into the executable's __DATA,__primelist section,
since the render server's sandbox may refuse to read the file.
2026-10-22 16:20:29 +08:00
bluseliu50 453f1a893a fix(scripts): apply the bridge patch that skips draws without a pipeline
NativeMetal carries 0006-skip-draws-without-a-pipeline.patch since
495d3df, but build-native-metal-bridge.py never applied it.
2026-10-22 12:35:41 +08:00
rpone aef9becad0 feat(patches): copy the staged system apps into the data volume
The deletable system apps (Weather, Notes, Calendar and the rest) ship in
the OS volume's /private/var/staged_system_apps; a restore copies them
into Data, where the first-boot data migration installs them. The owner
Data mount hides that directory, so the apps and their widgets were
missing. With boot argument sheng-staged-apps=1 the kernel copies it once,
before launchd starts, through the vnode the Data mount covers, owned by
mobile (installcoordinationd moves the bundles as mobile). The walk is
iterative and every file is synced; /private/var/db/.sheng-staged-apps
marks a complete copy.

The payload passes --persistent-data to the ADT tool for boards that set
[payload.adt] persistent_data.
2026-10-22 08:16:09 +08:00
rpone 910a19dfaa feat(payload): replace the default wallpaper's heic images with png
PosterBoard renders the iPad7,1 variant of wallpaper 7570, a layered
animation whose two HEIC images ImageIO cannot decode without a hardware
HEVC decoder, so the wallpaper stayed black.

scripts/make-wallpaper-overlay.py converts both images to 2732 pixel PNG
and points a copy of main.caml at them. make-gpu-addon.py --wallpaper
packs that directory into the addon. The kernel now creates missing
directories below /private/var/ngpu while it writes the addon, and
mounts /private/var/ngpu/wallpaper as a read-only union over the
animation's directory.
2026-10-22 08:15:47 +08:00
rpone 0e17699d18 fix(payload): pass the text fixups after the ipad identity flag
The text fixup loop landed inside the ipad_identity condition, between
the if and its body, which leaves payload.py unparsable. Move it after
the --ipad-identity append.
2026-10-22 08:13:47 +08:00
rpone 7d0835dc18 feat(payload): pass signed-text fixups in the device tree
A board lists its fixups of signed file text in board.toml [payload]
text_fixups. The payload passes them to the ADT tool, which stores them
NUL-separated in /chosen/text-fixups, so they take no space on the
1000-byte command line. The kernel reads that table before the
text-fixup0..7 boot arguments and now holds up to 32 fixups.
2026-10-22 08:13:11 +08:00
rpone 18ffa378bd feat(payload): write a gpu addon into the data volume at boot
`unixnu build payload --gpu-addon FILE` carries a file made by
scripts/make-gpu-addon.py next to the kernel. The loader hands it over as
/chosen/memory-map/GpuAddon, and before launchd starts the kernel writes
every file whose content or mode differs into /private/var/ngpu of the
mounted Data volume, then mounts the addon views. The Adreno Metal plugin
then no longer has to be part of the Data seed, so the seed's persistent
store survives a plugin rebuild. Every file is zlib compressed to keep
the payload FAT at 192 MiB. Updates DarwinBoot and NativeRamBlock for the
addon handoff.
2026-10-22 08:12:47 +08:00
rpone aafe46ec6f fix(ci): run board archives only when the config enables them 2026-10-22 02:20:23 +08:00
rpone 74b5597fa7 fix(ci): make the macOS runner build from a clean tree 2026-10-22 02:02:55 +08:00
LiangKam 61e9f1312a fix(qemu): validate PPM headers and raster length (#18)
Parse the P6 header explicitly, keep every raster byte, and reject
non-positive dimensions, maxval other than 255, and mismatched raster
lengths. Add scripts/test-qemu-ppm.py.
2026-10-22 01:11:15 +08:00
xVanTuring 7f79d5b69d fix(unixnu): compile the bootstrap pass without the board's archives 2026-10-21 20:16:53 +08:00
xVanTuring 02a6937b24 fix(scripts): name the command that stops the XNU build 2026-10-21 20:16:53 +08:00
LiangKam 82dbc8ec29 fix(config): parse zero-prefixed decimal values as base 10
The defconfig grammar accepts signed decimal digit sequences, but
int(raw, 0) rejects nonzero decimal values with leading zeroes, such
as 08, 010 and -08. Select base 16 only for the existing 0x form and
base 10 otherwise, preserving signed hexadecimal values.

Add 16 numeric regression cases to the build driver's existing
self-test.
2026-10-21 20:16:47 +08:00
bluseliu50 fd1508792a feat(scripts): grow the Data seed to the size of the device's storage
seed-data-grow.py resizes the APFS container of a packed seed with
diskutil, without mounting a volume, and packs it again. The size is
given in GiB or taken from the userdata partition of a tablet in
fastboot, minus the root image, a guard, the log reserve and one GiB.
2026-10-21 03:33:03 +08:00
bluseliu50 b336cd5f20 feat(tree): share the device's proprietary files with the build tree
The tree's .cache/firmware links to .cache/firmware of the device repository, where scripts/extract-files.py puts them, so every tree sees the same files and none is copied into a repository.
2026-10-21 00:40:30 +08:00
bluseliu50 2172d86157 feat(unixnu): build the board's archives before the kernel link
board.toml [kernel] archives lists the archive builders in order. The kernel step runs a bootstrap pass for the compile records when they are missing (it may stop at the link), runs the builders, then links, and reports archives that no builder makes. Prelink replaces an earlier candidate instead of refusing. libpthread and corecrypto-2023 join feeds.toml and the kernel references.
2026-10-21 00:33:32 +08:00
bluseliu50 851f7aa856 feat(unixnu): replace board kernel arguments by name, accept an owner trust cache
An extra --kernel-arg NAME=VALUE now replaces the board's argument of the same name instead of being appended, so a test can change a default within the 1000 byte command line. --owner-trust-cache takes an owner-signed bundle that carries the original caches plus extra modules, such as the GPU plugin, and skips the board allow-list. The length error names the real limit.
2026-10-21 00:33:32 +08:00
bluseliu50 327f765de7 feat(scripts): bind AES and the accelerator from recorded audit results
Both audits need hardware and emulator evidence of the original kernelcache that is not in any repository. Their recorded results (AES method addresses, accelerator base class layout) ship with the scripts and are used when the evidence is absent. They belong to the kernelcache pinned in board.toml.
2026-10-21 00:33:18 +08:00
bluseliu50 2bbbbbcb28 fix(scripts): take XNU symbol names from the objects of the kernel link
The pthread and corecrypto archives read the names of a linked kernel, which a fresh tree does not have yet. They now read the objects in link.filelist and the aliases of all-alias.exp, so they no longer depend on an earlier successful link and cannot collide with their own previous output. The corecrypto source check resolves the symlinked reference first.
2026-10-21 00:33:18 +08:00
bluseliu50 9055e44ace feat(scripts): build and stage the published Metal device
build-native-metal-bridge.py applies translator patches 0004 and 0005.
The host checks cover the frontend journal, families and Turnip changes.
add-gpu-plugin-data.py gains --publish, which hands the native device to
the render server and turns off its deep and compressed framebuffers,
and --clients, which lists the other processes that get one.
2026-10-20 23:18:57 +08:00
bluseliu50 acb4fe7fa2 chore(gpu): update the GPU module pointers
ArmSmmu4K, NativeAdreno and NativeMetal gain the cheaper SMMU table
operations, the user BO pool, per-process Metal devices, the target GPU
families and the pipeline journal. check-smmu4k-live.py follows the new
test counts and runs the mixed-size alias checks.
2026-10-20 23:17:50 +08:00
bluseliu50 2d81c3ef61 build: split drivers and kits into module submodules
Add the driver and kit repositories as public UniXNU submodules. Update
submodules during unixnu fetch and before tree assembly.
2026-10-20 18:20:30 +08:00
rpone 6c56ecec19 feat(gpu): import the native Adreno and Metal stack
Bring the current NativeAdreno, NativeMetal, AdrenoFirmware, AdrenoPM4,
AirNir and ArmSmmu4K sources, the Mesa pipeline-cache and builtin-shader
patches, and the Turnip host cache tools.
2026-10-20 18:08:40 +08:00
UniXNU Docs 5c92d4048f docs: add the VitePress documentation site
Add English and Simplified Chinese documentation under docs/, covering the boot chain, build, boot, debugging, porting, drivers, XNU 4 KiB pages, macOS and device notes. Add the Pages workflow and CNAME. Rename the boot manager from CrabApple to UniXNU across the package, symbols, paths, configuration file and logs. Update README with the documentation badge and CONTRIBUTING link.
2026-10-19 22:10:43 +08:00
bluseliu50 980420f0a9 feat(userdata): build the userdata partition image
build userdata writes the OS and SystemOS disk images of the IPSW behind
the SHNGROOT manifest, checked against the partition size of the board.
It prints the fastboot flash command and flashes nothing. The image
matches a previously built one byte for byte.
2026-10-19 21:19:07 +08:00
bluseliu50 2bb5ea7d6a feat(ipsw): read the target IPSW from a local file or a URL
--ipsw takes a local path or an https URL. A remote IPSW is read member
by member with HTTP range requests and never downloaded as a whole.
Members are cached with their sha256, checked against the board pins and
against the product, version, build and chip of the board. The kernel
step takes the kernelcache from the IPSW when none is given. The new
ipsw command lists and extracts components.
2026-10-19 21:19:07 +08:00
bluseliu50 160ea4429a feat(payload): build the boot image ramdisk payload
The payload step writes a FAT volume with the CrabApple config, the
prelinked kernel (optionally with the panic screen patched into a copy),
the generated device tree and the optional trust cache and Data seed.
The volume is written with mtools and is reproducible. bootimg uses it
as the ramdisk when present.

--skip-setup marks Setup as done in a copy of the Data seed so the Hello
pages are skipped. A non-macOS host now only prints a note, and the
kernel step checks for xcodebuild.
2026-10-19 20:39:48 +08:00
bluseliu50 ffd1630b8d feat(kernel): take the Darwin source versions from feeds.toml
The xnu tag, commit, Darwin and source versions, the libplatform,
libdispatch and AvailabilityVersions tags and the tags of the sources
that still carry the DriverKit and TrustCache headers are set once in
feeds.toml. The driver passes them to build-xnu-4k-baseline.sh and
prepare-xnu-source.py, which keep the qualified versions as defaults.
2026-10-19 20:11:04 +08:00
bluseliu50 e7fbf5e869 fix(kernel): run a bootstrap pass before the boot progress build
The boot progress layer is generated from the compile record of
startup.o, which only an earlier build leaves behind. A first build from
scratch now runs once without it.
2026-10-19 20:11:04 +08:00
bluseliu50 850776abc1 feat(scripts): build the firmware from a fresh checkout
Make the firmware step work on clean clones of the remote repositories:
initialize the Mu-Silicium submodules the board lists, fetch the two
extra edk2 submodules (brotli decompressor, libspdm), generate the
CLANG_BIN directory the CLANGPDB tool chain needs from the Homebrew LLVM
and lld, pin SOURCE_DATE_EPOCH to the commit time, and add
--skip-preflight for the board preflight scripts.
2026-10-19 20:11:04 +08:00
bluseliu50 fc6c83ae05 feat(examples): mark the example device and refuse to build it
board.toml gains example = true. status shows [EXAMPLE], and build and
bootimg stop with a message, so a copied sample is never built by
accident.
2026-10-19 19:46:57 +08:00
bluseliu50 647db5f144 feat(scripts): add the unixnu build driver
A Python 3 driver with defconfig, fetch, tree, build, bootimg, status
and clean. Device repositories supply board.toml and configs/*_defconfig;
external sources come from feeds.toml and are fetched with shallow,
blobless, sparse git checkouts pinned in unixnu.lock. Modules can come
from local directories through --local, --local-<kind> and
--local-module. The boot image step packs BootShim, the firmware volume
and the device tree for a Mu-Silicium checkout given with --uefi.
2026-10-19 19:46:45 +08:00
bluseliu50 4e61886d7d chore(scripts): remove free disk space checks
The checks guarded a local development disk floor and do not belong in
the shared scripts. The scratch image capacity check in
prepare-air-nir-diagnostic.py is kept because it validates a mounted
image, not the host disk.
2026-10-19 19:24:32 +08:00
bluseliu50 dec4c7b5b6 Initial import 2026-10-19 18:49:31 +08:00