Skip to content

Command line ​

./unixnu <command> [options]

Options follow the command. The driver reads a device repository from -D, UNIXNU_DEVICE or out/state.json.

Commands ​

defconfig ​

unixnu defconfig [NAME]

Lists configs/*_defconfig in the device repository. With a name, copies the file to out/<board>/.config and parses it.

fetch ​

unixnu fetch [NAME...] [--update]

Fetches git sources. With names, fetches only those sources. --update ignores unixnu.lock and moves to the newest ref. Writes the commits to unixnu.lock in the device repository.

tree ​

unixnu tree

Resolves modules, fetches the references the steps need, and assembles out/<board>/tree.

ipsw ​

unixnu ipsw info
unixnu ipsw fetch [COMPONENT...]

info prints the product, build, device class and every manifest component with its size and path. fetch extracts the named components, or the [ipsw] fetch list when no component is named.

build ​

unixnu build [kernel] [package] [firmware] [payload] [prelink] [userdata]

Runs the named steps in this order: kernel, prelink, package, payload, firmware. With no step, runs kernel, package, firmware and payload. userdata runs alone; all covers the other four.

build prelink repeats the prelink without rebuilding XNU.

build userdata --dry-run checks the IPSW and the partition size.

bootimg ​

unixnu bootimg [--fd FILE] [--dtb FILE] [--ramdisk FILE|none] [-o FILE]

Packs the boot image. The firmware volume defaults to the output under --uefi. The ramdisk defaults to the payload output when it exists.

status ​

unixnu status

Prints the device, output root, configuration path and the origin of every module. Marks local modules and reports that they are not pinned.

clean ​

unixnu clean

Removes tree, logs, kernel, package, boot and edk2-conf under the board output. Keeps fetched sources.

Options ​

OptionMeaning
-D DIR, --device DIRDevice repository
--out DIROutput root
-j N, --jobs NParallel jobs
--local DIRLocal tree with this repository's layout
--local-drivers DIRLocal drivers directory
--local-kits DIRLocal kits directory
--local-patches DIRLocal patches directory
--local-scripts DIRLocal scripts directory
--local-package DIRLocal package directory
--local-module [KIND:]NAME=PATHOne local module. Repeatable
--uefi DIRMu-Silicium checkout
--edk2 DIRMu_Basecore checkout
--kernelcache FILEOriginal decompressed kernelcache
--skip-preflightSkips the board preflight scripts
--kernel FILEPrelinked kernel for the payload
--kernel-arg NAME[=VALUE]Extra kernel argument. Repeatable
--trust-cache FILETrust cache bundle
--skip-setupMarks Setup as done in a copy of the Data seed
--data-ramdisk FILEData ramdisk seed
--unique-chip-id HEXPlatform seed for the ADT
--ipsw PATH_OR_URLTarget IPSW
--dry-runUserdata dry run
--target DEBUG|RELEASEEDK II target
--fd FILEFirmware volume for bootimg
--dtb FILECompiled device tree for bootimg
--ramdisk FILE|noneRamdisk for bootimg
-o FILE, --output FILEBoot image output

Environment ​

VariableEquivalent
UNIXNU_DEVICE-D
UNIXNU_OUT--out
UNIXNU_UEFI--uefi
UNIXNU_EDK2--edk2
UNIXNU_KERNELCACHE--kernelcache
UNIXNU_DTB--dtb
UNIXNU_IPSW--ipsw
UNIXNU_UNIQUE_CHIP_ID--unique-chip-id
JOBS-j

Exit behavior ​

ConditionResult
Missing device repositoryError with the -D hint
Missing configuration for a kernel buildError with the defconfig hint
Missing Mu-Silicium checkout for firmwareError before fetching
IPSW identity mismatchError naming the expected and actual image
sha256 pin mismatchError naming the member
Firmware volume size mismatchError naming the size
Payload larger than size_mibError with the size to raise
Invalid kernel argumentError naming the argument
Missing platform seedError with the --unique-chip-id hint
Example device repositoryError before build or bootimg

Next steps ​

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