Commit Graph
20 Commits
Author SHA1 Message Date
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