Skip to content

Device configuration ​

A device repository has four configuration files: board.toml, configs/<name>_defconfig, feeds.toml and local.toml.

board.toml ​

[board] ​

KeyTypeMeaning
namestringOutput directory name
socstringSoC identifier
descriptionstringHuman readable description
kitstringDevice package folder under kits/
examplebooleanMarks a sample. Build and bootimg refuse it

[ipsw] ​

KeyTypeMeaning
urlstringDefault remote IPSW
productstringProduct type, for example iPad7,1
versionstringProduct version
buildstringProduct build
device_classstringDevice class from the manifest
chip_idintegerApChipID
board_idintegerApBoardID
fetcharrayComponents extracted by ipsw fetch

[ipsw.sha256] ​

KeyTypeMeaning
member filestringExpected SHA-256 of the extracted member

[userdata] ​

KeyTypeMeaning
first_lbaintegerFirst LBA of the userdata GPT entry
last_lbaintegerLast LBA of the userdata GPT entry
lba_bytesintegerLogical block size
windowsarray{ name, component } entries

[kernel] ​

KeyTypeMeaning
defconfigstringFile name under configs/
KeyTypeMeaning
toolstringPrelink tool path in the build tree
kernelstringNative kernel path in the build tree
slidestringAddress slide
rootsarrayBundle identifiers kept from the kernelcache
early_security_initstringidentifier=address
kernelcachestringOptional path to a local kernelcache
kernelcache_sha256stringExpected kernelcache hash
extra_argsarrayExtra prelink arguments

[firmware] ​

KeyTypeMeaning
configstringMu-Silicium Resources/Configs/<name>.toml
dscstringDSC path in the checkout
fdstringFirmware volume path, {target} replaced
packagesarrayPACKAGES_PATH entries
preflightarrayPreflight scripts in the build tree
patchesarrayPatches applied to edk2 for the build
submodulesarrayMu-Silicium submodules to initialize

[firmware.defines] ​

KeyTypeMeaning
anystring-D NAME=VALUE for the EDK II build

[bootimg.image] ​

KeyTypeMeaning
baseintegerImage base address
kernel_offsetintegerKernel offset
tags_offsetintegerTags offset
pagesizeintegerImage page size
header_versionintegerAndroid boot image header version

[[bootimg.dtb_node]] ​

KeyTypeMeaning
pathstringDevice tree node path
propsarray{ name, type, value }

Types are s for string, x for hex cells, i for decimal cells, u for unsigned cells and empty.

[payload] ​

KeyTypeMeaning
volumestringFAT label, at most 11 characters
size_mibintegerVolume size
loaderstringfirmware or a driver path mode
titlestringMenu title
dram_sizestringDRAM size for the ADT
panic_screenbooleanPatch the panic screen into the payload kernel
trust_cache_sha256arrayAccepted trust cache hashes
kernel_argsarrayDefault kernel arguments
timeoutintegerMenu timeout
skip_setup_toolstringScript used by --skip-setup

[payload.adt] ​

KeyTypeMeaning
toolstringADT generator path
chip_idstringChip ID for the ADT
owned_memory_sizestringContiguous window request
root_match_volume_uuidstringRoot volume UUID
cpu_regsstringCPU MPIDR values, comma separated
psci_methodstringsmc or hvc
packed_data_ramdiskbooleanUse the packed Data format
ipad_identitybooleanWrite the Apple device identity properties
unique_chip_idstringrequired when the seed is mandatory

defconfig ​

CONFIG_NAME=y
CONFIG_NAME=n
CONFIG_NAME="text"
CONFIG_NAME=123
# CONFIG_NAME is not set

Each CONFIG_XNU_<NAME> becomes XNU_<NAME>. {tree} in a string becomes the build tree path.

feeds.toml ​

toml
[[source]]
name = "Name"
kind = "driver"          # driver, kit, patch, package, refer
git = "https://github.com/ORG/REPO"
ref = "main"
path = "drivers/Name"
commit = "..."
local = "/path/to/local"
submodules = []
KeyMeaning
nameModule name
kindModule kind
gitSource repository
refBranch, tag or commit to fetch
pathOptional subdirectory, fetched sparse
commitOptional pin
localLocal directory instead of git
submodulesUpstream submodules to initialize

local.toml ​

An ignored file in the device repository:

toml
[local]
drivers = "/path/to/drivers"
kits = "/path/to/kits"
patches = "/path/to/patches"
scripts = "/path/to/scripts"
package = "/path/to/package"

unixnu.lock ​

toml
[source."Name"]
commit = "0123456789abcdef"

Written by unixnu fetch. A build uses the locked commit. The lock records git sources only.

Module resolution ​

  1. --local-module [KIND:]NAME=PATH
  2. --local-<kind> DIR
  3. --local DIR
  4. a local key in feeds.toml or local.toml
  5. the device repository
  6. the base repository
  7. a git source in feeds.toml

The first match wins.

Next steps ​

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