Skip to content

tools: board inputs for a second Pixel SoC in boards.py, mkadt.py, mkpayload.py (split plan #3, A3) - #5

Draft
flo071 wants to merge 4 commits into
PixOS-Project:mainfrom
flo071:split/a3-shared-tools
Draft

flo071 wants to merge 4 commits into
PixOS-Project:mainfrom
flo071:split/a3-shared-tools

Conversation

@flo071

@flo071 flo071 commented Dec 4, 2026

Copy link
Copy Markdown

Depends on #4 (A2). Review only the last two commits until #4 is merged; I will rebase this onto main then.

What and why

Step A3 of the cheetah (Pixel 7 Pro, gs201) split agreed in #3: the shared host tools learn the inputs a second Pixel SoC
needs, each one a board/soc table key or a per-SoC table row, never a board name. No SoC or board on main sets any of the
new keys, so every bluejay output is unchanged (proof below).

Stacked on #4 (A2): soc_flag generalises A2's shim_hooks check. Until #4 lands, the diff against main includes A2's two
commits; this PR's own changes are the last two commits (6 files).

What changed

tools/boards.py

  • soc_flag(board, key): A2's shim_hooks rules (soc.json only, JSON boolean, absent = false) for any SoC opt-in;
    shim_hooks() now calls it. Used below for adt_hooks.
  • Optional board.json pstore_base / pstore_size / pstore_console_size (all three or none, page-aligned base, console
    zone inside the window) -> PSTORE_BASE / PSTORE_SIZE / PSTORE_CONSOLE_SIZE in board_config.h, for the fixed
    ramoops zone soc_hook_pstore_fallback (A2) uses before the FDT is parsed.
  • device_name(board) = board.json name.
  • wlan_seq.h names its SoC's table in its first line (the gs101 text is unchanged).

tools/mkadt.py

  • Root model-number = the board codename and /product product-description = board.json name (sweet keeps main's
    bluejay / Pixel 6a, as before).
  • /sweet-ufs reg size = soc.json ufs_map_size when set (gs201's UFS HCI window is larger than ufs_size), else ufs_size.
  • /sweet-wlan compatible from SWEET_WLAN_COMPAT, one row per SoC (gs101's row = the string main hard-codes); a SoC without a
    row gets no /sweet-wlan and no launchd /wlan node. On main that gives the same result as board != 'sweet'.
  • board.json artwork_display_gamut (sRGB | P3; env PIXOS_ADT_GAMUT overrides one build) replaces the D22AP
    /product artwork-display-gamut. [guess, cheetah runs 2026-11-28] MobileGestalt derives HasExtendedColorDisplay from it,
    and the 10-bit surfaces that follows from P3 stay empty on a port whose GPU path does not render them.
  • board.json adt_d22ap_backlight: true copies the D22AP /backlight node (without its function-* properties) after
    build(), like /sweet-wdt; backboardd looks it up for the brightness slider.
  • soc.json adt_hooks: true loads tools/mkadt_<soc>.py: add_nodes(root, board, qemu) after build() and, if present,
    product_required(...) before it (new flag --allow-no-product). The gs201 module comes with the board.

tools/mkpayload.py

  • --board takes every board of tools/boards.py (was sweet, bluejay).
  • The ADT RAM range may span physically adjacent dram_banks (banks_cover); asked only after the single-bank check failed.

Not in this PR (listed per file in the split inventory, available on request): mkpayload.py --gpufw (the Mali CSF
firmware as /chosen/memory-map GPUFW) goes with the GPU PR, because tools/lint-consumed rightly fails a packed tag that no
kernel code reads yet (its consumer is the GPU patch); the gs201 pins in boards.py (ACPM,
S2MPG13, DVFS201, GPU) go with their board PRs together with their soc.json blocks and citations; tools/gen_wlan_seq.py's
--soc hook goes with the gs201 Wi-Fi generator (the file is at its size cap, and the hook is useless without that
generator); the USB_BASE macro is a follow-up of its own (gs101's soc.json already has usb_base, so emitting it changes
bluejay's board_config.h); tools/mklogo.py goes with the BOOT_LOGO build option that calls it.

Hardware evidence

Not tested on hardware: no bluejay output changes, and no board uses the new inputs yet.

Bluejay (Pixel 6a) impact

Shared tools changed; every bluejay output is unchanged (observed, build host, 2026-12-04).

Host tools (a3-host-compare.sh): the origin/main copy of tools/, soc/, device/ (b5baf08) and this branch each
produce, for bluejay and sweet: the ADT (mkadt.py plain, --qemu, --highmem, --no-ufs, --no-wlan-node,
--no-bt-node, --cpu-order 0,6,7,4,5,1,2,3) with its stdout/stderr, board_config.h, bluejay's wlan_seq.h, and the payload
(mkpayload.py plain, --ramdisk, from the --highmem ADT) from one kernel. mkadt's /chosen random-seed comes from
os.urandom, so both sides run through a wrapper that returns zero bytes. Result: 58 of 58 files identical; the PR's
mkpayload also packs main's bluejay ADT to the same bytes.

29f41c343c89ebf5a77290403b8b3ba8f8c8782b6083b3899c654d138e75f36b  bluejay.adt
bf9069ce0b9d0dea1a32b83ec730ce242e81b89f7c049eea42f23a65284ead0e  bluejay--qemu.adt
38f1778d3276c18f0b5ee708d33a17c0c0f22cea14093762ef7ed3abbbff80e1  bluejay payload (debug=0x8)
a06a31f716ef336785362b12c330030d9fc7b2c4159af960a62df2fd6da17d04  bluejay payload --ramdisk
7eee76bc0cf6f211fe437b967b090236d4305071aa1f8e8eb0650e2515155921  bluejay board_config.h
bd972535c73f8246091737959ad76c3f659b8942e42dcfc01c7283e50390ee5c  bluejay wlan_seq.h
9a21deab35666ef14b4f2f3b3ed53438a3946616558c7316b6c381311b32efed  sweet.adt
366aad40182ce4110abffe8010ca84d9c004963d24679cf57635461a3e4be12c  sweet board_config.h

(same value from main and from the PR; any kernel with the 0176/0320 boot-line tag serves, this one has sha256 741d2e5086d7b297...)

Shim build (a3-shim-compare.sh, A2's method): tools/pix build bluejay of clean origin/main (b5baf08), then of the same
HEAD with this branch's diff against main applied uncommitted (A2 + A3), so both embed build id b5baf08. All 48 objects,
shim.elf, Image, Image.lz4, board_config.h and wlan_seq.h are identical; ramdisk.bin and the two boot images
differ as between any two builds of main (the placeholder ramdisk's cpio carries an inode and mtime, see #4), and re-packed
with one fixed ramdisk they are identical. This PR changes no C file, so the __LINE__ = 0 pair of #4 is not repeated.

e1273407b2756983a2767381be55c2d74674d3d10fc4c833ff4bf57683a10b7e  shim.o
29bfaf1003c2af09b165cddfb7b977f76fc18a78891a0ac940f6fc4d05d9f521  loader.o
c5ad911ae78b1aad07926f6569c6b8f51c7ae1253e83108bee8bec1e3c6ca27d  shim.elf
5cd9605facb434fb2ea9f6a77f01084a866df81ae1305e0fd3812930d6f925a6  Image
83b4d25f0e89dbe839088c6df3720f95dd7da472ca62e5bb686de49de61fee82  Image.lz4
862712b010f2783eec640e4c46aaa271c04ff5b2c0f930780ce182d986e218eb  fixedrd-shim-boot.img
6bf22663954307dcd49afac585c6c7e601bcd1ed6d2fd07ba9628644f6255888  fixedrd-shim-boot-lz4.img

(the same values as in #4.)

Tests and gate

  • New, each on a private copy of the device/soc JSON (nothing of the checkout is written), no skips:

    • tools/test_boards_board_inputs.py (6): no trunk header has PSTORE_*; the window adds exactly three lines before
      BOARD_MPIDR_0; partial, oversized-console, unaligned and zero windows are refused; device_name; soc_flag for
      shim_hooks and adt_hooks (false on trunk, true only for the opted-in SoC, non-boolean and board.json
      refused); wlan_seq.h source line.
    • tools/test_mkadt_board_inputs.py (7): identity from a made-up board testphone (bluejay and sweet unchanged),
      display_gamut (board key, env override, refusals), ufs_map_size, the /sweet-wlan table (a SoC without a row gets
      neither node), the /backlight copy from a stand-in D22AP tree (no function-*, fresh phandle, nothing on trunk/qemu),
      and adt_hooks end to end through the CLI (module not loaded without the key; product_required refuses without
      --allow-no-product; add_nodes adds its node).
    • tools/test_mkpayload_board_inputs.py (4): banks_cover (adjacent banks, gaps, overruns), --board choices = the
      boards, and end to end: bluejay's high range listed as two adjacent 2 GiB banks gives the same payload as the merged bank,
      with a hole between them the build is refused.
  • Existing mkadt/mkpayload tests (test_mkadt_*, test_mkpayload_*, test_mkwlancred.py, test_boards_shim_hooks.py) pass.

  • tools/lint-c --style --base origin/main: RESULT: PASS style new=0 baseline=1468 (no C change).

  • tools/lint-size --base origin/main: PASS (the one warning is A2's shim/shim.c, port code).

  • .github/scripts/pr_rules.py --profile kernel origin/main HEAD: RESULT: PASS 12 files, 0 rule(s) failed
    (split/a2-board-hooks HEAD: 6 files, PASS).

  • tools/check-all.sh: on the final head (observed, build host, 2026-12-04; LINT_STYLE_BASE=origin/main GATE_JOBS=2 GATE_STEP_TIMEOUT=2400 --keep-going, the same knobs and reasons as in shim: board hooks (soc_hooks.h), opt-in per SoC (split plan #3, A2) #4):
    GATE FAIL 879523b unit failed: test_devd_mutants.py, test_safety_xrun.py, test_adversary_matrix.py +22 more.
    Every other step passes (all 12 build variants, host-tests, boot-safety, wlan-mutants, validate, rules, public-guard,
    public-split, shellcheck, lint-c, xnu-build, stack-apply, mutant-needles, boot-markers, lint-silent, consumed, inputs), and
    the three new test files pass in their shards. The lane-B steps after unit (wlan-tbl, phone-state, hang-recover,
    probe-run, phone-converge, rootless) are skipped by --keep-going once unit fails in that lane, as in shim: board hooks (soc_hooks.h), opt-in per SoC (split plan #3, A2) #4. No GATE PASS on this host. The unit failures are exactly shim: board hooks (soc_hooks.h), opt-in per SoC (split plan #3, A2) #4's set: 14
    failing files + 11 skips not pinned in tools/unit-skip-allow.txt (4 files) + the COUNT MISMATCH (2399 collected vs 2394
    run: the 5 tests of test_safety_xrun.py). Each file run standalone on origin/main (b5baf08) and on this head gives the
    same result on both:

    Unit file main PR cause on this host
    test_agent_guard.py FAIL (2) FAIL (2) needs the super repo's tools/triage-settle-guard
    test_devd_hardening.py, test_devd_mutants.py rc 2 rc 2 unshare -r -n not permitted (netns)
    test_gate_unit_shards_order.py FAIL (1) FAIL (1) duration ordering on a loaded host
    test_heavy_job_r3.py, test_job_wake.py, test_phone_lock_wake.py FAIL FAIL no tools/wake / wake hook here
    test_normal_runs_silent.py FAIL (1) FAIL (1) test_usbroot_host environment
    test_ota_extract.py FAIL (10) FAIL (10) git rev-parse outside a repo in its temp dirs
    test_safety_xrun.py ERROR (1) ERROR (1) unshare -r -n -m not permitted
    test_xnu_src_mirror.py FAIL (1) FAIL (1) mirror environment
    test_mkdevoverlay.py FAIL (1) FAIL (1) test_guard_refuses_a_root_image_file: this host's standard root image (newest line of flashed-userdata.txt) is a cheetah root without /usr/local/bin/wifid-probe (as in shim: board hooks (soc_hooks.h), opt-in per SoC (split plan #3, A2) #4)
    test_adversary_matrix.py, test_check_all_stub.py OK OK fail only inside the loaded gate, on timing (as in shim: board hooks (soc_hooks.h), opt-in per SoC (split plan #3, A2) #4)
    test_mg_key.py, test_phone_lock.py, test_golden_gpu_analyze.py, test_qrl2.py OK + skips OK + skips skips not allowed by the gate: capstone, opencv/numpy, golden dir, unshare missing

    None of these files or the code they test is touched by this PR. A first gate run on an earlier version of this branch
    failed consumed (GPUFW packed by --gpufw with no consumer yet); that is why --gpufw moved to the GPU PR.

Size: 6 files, +520 / -23 lines (387 of the added lines are the three tests).

Safety checklist

  • No write outside userdata; no new UFS write path in the shim
  • tools/check-all.sh prints GATE PASS (not on this host: only the unit step fails, every failure listed above and the same on main)
  • One concern, under ~1500 added code lines and 40 files (step A3 of the split plan in Pixel 7 Pro (cheetah, gs201) port: split plan for #2 and pixelios-userland#1 #3)
  • Existing xnu/patches/ untouched; changes come as new numbered patches (no patch touched)
  • No prebuilt binaries; everything builds from source
  • Safety audits and phone tools untouched, or the change was agreed in the linked issue (none touched)
  • Board-specific code gated on the board; other boards' build output unchanged (every new input is a table key or row no trunk board sets; bluejay proof above)
  • No serials, dumps, keys, firmware or Apple artifacts in the diff (the tests build a stand-in kernel and a stand-in D22AP node)
  • Constants cite their source; claims are tagged observed / read / guess (no hardware constant is added)
  • AI assistance: what was generated, what a human checked: the code, the tests, the builds and checks above and this description were done by Claude (Claude Code) on the user's behalf.
a3-host-compare.sh, fixed-seed-run.py, a3-shim-compare.sh
#!/bin/bash
# A3 host-tool proof: the outputs of tools/mkadt.py, tools/mkpayload.py and tools/boards.py for the trunk boards (bluejay, sweet), produced by the
# origin/main copy of the tools and by the PR's, compared byte for byte. mkadt's /chosen random-seed comes from os.urandom, so both runs go through
# fixed-seed-run.py (os.urandom -> zero bytes). The payloads are packed from one kernel (KERNEL: any xnu kernel with the 0176/0320 boot-line tag)
# and each tree's own ADT; the PR's mkpayload also packs main's ADT (payload-mainadt).
#   MAIN=<tree with origin/main's tools/ soc/ device/ and a research/ link> PR=<PR checkout> OUT=<dir> KERNEL=<kernel> a3-host-compare.sh
set -u
: "${MAIN:?}" "${PR:?}" "${OUT:?}" "${KERNEL:?}"
P=$(cd "$(dirname "$0")" && pwd)
mkdir -p "$OUT"
RD=$P/fixed-seed-run.py	# any small file serves as the --ramdisk image
for t in main:$MAIN pr:$PR; do
	n=${t%%:*}; d=${t#*:}
	for b in bluejay sweet; do
		for v in "" --qemu --highmem --no-ufs --no-wlan-node --no-bt-node "--cpu-order 0,6,7,4,5,1,2,3"; do
			tag=$b$(echo "$v" | tr -d ' ,')
			python3 -I "$P/fixed-seed-run.py" "$d/tools/mkadt.py" "$OUT/$n-$tag.adt" --board $b $v > "$OUT/$n-$tag.adt.stdout" 2> "$OUT/$n-$tag.adt.stderr"
			echo "$n mkadt $tag rc=$?"
			sed -i "s#$OUT/$n-#OUT/#" "$OUT/$n-$tag.adt.stderr"
		done
		python3 -I "$d/tools/boards.py" $b "$OUT/$n-$b-board_config.h"; echo "$n boards $b rc=$?"
		python3 -I "$d/tools/mkpayload.py" "$KERNEL" "$OUT/$n-$b.adt" "$OUT/$n-$b-payload.bin" --board $b --cmdline debug=0x8 > "$OUT/$n-$b-payload.stdout" 2>&1
		echo "$n mkpayload $b rc=$?"
		python3 -I "$d/tools/mkpayload.py" "$KERNEL" "$OUT/$n-$b.adt" "$OUT/$n-$b-payload-rd.bin" --board $b --cmdline debug=0x8 --ramdisk "$RD" > "$OUT/$n-$b-payload-rd.stdout" 2>&1
		echo "$n mkpayload $b ramdisk rc=$?"
		python3 -I "$d/tools/mkpayload.py" "$KERNEL" "$OUT/$n-$b--highmem.adt" "$OUT/$n-$b-payload-highmem.bin" --board $b --cmdline debug=0x8 > "$OUT/$n-$b-payload-highmem.stdout" 2>&1
		echo "$n mkpayload $b highmem rc=$?"
	done
	python3 -I "$d/tools/boards.py" bluejay "$OUT/$n-bluejay-wlan_seq.h" --wlan-seq; echo "$n wlan_seq rc=$?"
done
python3 -I "$PR/tools/mkpayload.py" "$KERNEL" "$OUT/main-bluejay.adt" "$OUT/pr-bluejay-payload-mainadt.bin" --board bluejay --cmdline debug=0x8 > /dev/null
echo "pr payload from main adt rc=$?"
cp "$OUT/main-bluejay-payload.bin" "$OUT/main-bluejay-payload-mainadt.bin"
cd "$OUT" || exit 2
same=0; differ=0
for f in main-*; do
	g=pr-${f#main-}
	if cmp -s "$f" "$g"; then same=$((same + 1)); else differ=$((differ + 1)); echo "DIFFERS ${f#main-}"; fi
done
sha256sum main-* pr-* > "$P/host-hashes.txt"
echo "RESULT: same=$same differs=$differ"
#!/usr/bin/env python3
"""Run a tool script (tools/mkadt.py) with os.urandom replaced by zero bytes, so the ADT's /chosen random-seed is fixed and two trees can be
compared byte for byte. Usage: fixed-seed-run.py SCRIPT ARGS..."""
import os
import runpy
import sys

os.urandom = lambda n: b"\0" * n
script = os.path.abspath(sys.argv[1])
sys.argv = [script] + sys.argv[2:]
sys.path.insert(0, os.path.dirname(script))
runpy.run_path(script, run_name="__main__")
#!/bin/bash
# A3 shim proof: bluejay build (tools/pix build bluejay) of origin/main (b5baf08, clean) and of the PR (HEAD still b5baf08, the PR diff applied
# uncommitted, so both embed build id b5baf08), one after the other in one checkout. The diff is cumulative (A2 + A3); A3 itself changes no C file, so only the generated
# board_config.h / wlan_seq.h could move bytes; every object, shim.elf, Image, Image.lz4 and the boot images are hashed anyway.
# The placeholder ramdisk (build.sh: cpio of an empty dir | gzip) carries the dir's inode and mtime, so ramdisk.bin and shim-boot*.img differ
# between ANY two builds; the boot images are also re-packed with one fixed ramdisk (main's) and build.sh's exact mkbootimg arguments (fixedrd-*).
#   TREE=<checkout> PATCH=<git diff origin/main PR-head> OUT=<dir> a3-shim-compare.sh
set -u
: "${TREE:?}" "${PATCH:?}" "${OUT:?}"
mkdir -p "$OUT"
cd "$TREE" || exit 2
hashes() {	# $1 name
	local o=$TREE/shim/out mk=$TREE/tools/third_party/mkbootimg.py
	[ -e "$mk" ] || mk=$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")/tools/third_party/mkbootimg.py
	[ "$1" = main ] && cp "$o/ramdisk.bin" "$OUT/fixed-ramdisk.bin"
	python3 "$mk" --header_version 4 --kernel "$o/Image" --ramdisk "$OUT/fixed-ramdisk.bin" --pagesize 4096 --os_version 12.0.0 \
		--os_patch_level 2022-07 --cmdline "console=null" -o "$o/fixedrd-shim-boot.img"
	python3 "$mk" --header_version 4 --kernel "$o/Image.lz4" --ramdisk "$OUT/fixed-ramdisk.bin" --pagesize 4096 --os_version 12.0.0 \
		--os_patch_level 2022-07 --cmdline "console=null" -o "$o/fixedrd-shim-boot-lz4.img"
	# only the objects build.sh compiles for the image (host-test objects such as acpm_*.o exist only when host tests ran uncached)
	(cd "$o" && sha256sum $(ls *.o | grep -v '^acpm_\(dvfs_ro\|dvfs_rw\|gpuclk\|mifclk\|mifclk_level\|ro\|sweetprobe\)\.o$') \
		shim.elf Image Image.lz4 shim-boot.img shim-boot-lz4.img fixedrd-shim-boot.img fixedrd-shim-boot-lz4.img ramdisk.bin board_config.h \
		$([ -f wlan_seq.h ] && echo wlan_seq.h)) > "$OUT/hash-$1.txt"
}
build() {	# $1 name
	timeout 3600 tools/heavy-job run --class build --label "a3-$1" --wait 3600 -- tools/pix build bluejay > "$OUT/build-$1.log" 2>&1
	echo "$1 build rc=$? head=$(git rev-parse --short HEAD) dirty=$(git status --porcelain --untracked-files=no | wc -l) $(grep -a 'RESULT: .*label=' "$OUT/build-$1.log" | tail -1)"
	hashes "$1"
}
git checkout -q --detach b5baf08 || exit 2
build main
git apply "$PATCH" || exit 2
build pr
git checkout -q -- . && git clean -qf tools/ && git status --short
cd "$OUT" || exit 2
if diff hash-main.txt hash-pr.txt > diff.txt; then echo "IDENTICAL ($(wc -l < hash-main.txt) files)"; else echo "DIFFERS:"; cat diff.txt; fi

🤖 Generated with Claude Code

flo071 and others added 4 commits December 3, 2026 20:23
A SoC opts into the shim board hooks (shim/soc_hooks.h, next commit) with
"shim_hooks": true in its soc.json. boards.py then emits
`#define SOC_SHIM_HOOKS 1` into board_config.h, after the SOC_* family
macros, and `--get shim_hooks` prints 1 (else 0) for shim/build.sh. The key
is refused in a board.json and when it is not a JSON boolean. No SoC sets it,
so every generated header is unchanged (bluejay's board_config.h compared
byte for byte).

Test: tools/test_boards_shim_hooks.py (trunk headers carry no macro; a
copied tree without the key renders identical headers; opting gs101 in adds
exactly one line; false == absent; non-bool and board.json values refused,
also through the CLI).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shim/soc_hooks.h declares the points where the shared flow hands over to SoC
code, with the rules for them (read-only unless audited, bounded waits, no
hook on the stop path): soc_hook_entry (top of the probe, may ask for the USB
live log early), soc_hook_video / soc_hook_console (around con_set_video),
soc_hook_pstore_fallback (pstore_init found no zone), soc_hook_probes (after
checkpoint 1), soc_hook_pre_xnu (first step of --boot-xnu), and in the loader
soc_hook_payload, soc_hook_bootflags, soc_hook_before_jump. The loader ones
are SOC_HOOK_* macros that expand to the replaced code without hooks and sit
on existing lines, so loader.c keeps its line numbers (SHIM_ASSERT __LINE__).

Every call site is under `#if SOC_SHIM_HOOKS`, a capability flag from
tools/boards.py (soc.json "shim_hooks"), never a SoC name. The probe flow
(bluejay_probe, try_write32, the exception skip) now builds for
SHIM_PROBE = SOC_GS101 || SOC_SHIM_HOOKS, identical to SOC_GS101 on gs101; its
gs101-only steps keep SOC_GS101 guards (DECON re-arm, PMU CPU prep; REBOOT_BL
is an #error elsewhere) and reset()/shim_halt() take a PSCI-only branch on a
hook SoC instead of sweet's Qualcomm words.

build.sh compiles and links soc/<vendor>/<soc>/shim/soc_hooks.c only when
`boards.py --get shim_hooks` is 1 (also in the ABS64 list), and its host-test
block compiles shim.c/loader.c for a non-gs101 hook SoC into $O/hookcheck and
checks every always-built hook is referenced, because no SoC on trunk sets the
key. Inert on trunk: bluejay objects, shim.elf and Image are byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New board inputs for a second Pixel SoC, inert for every trunk board:

- board.json pstore_base / pstore_size / pstore_console_size (all three or
  none; page-aligned base, console zone inside the window) emit PSTORE_BASE,
  PSTORE_SIZE, PSTORE_CONSOLE_SIZE into board_config.h, for the fixed ramoops
  zone soc_hook_pstore_fallback (shim/soc_hooks.h) uses before the FDT is
  parsed. No trunk board sets them, so no header changes.
- device_name(board): board.json "name", for the ADT's About > Model Name.
- soc_flag(board, key): the shim_hooks rules (soc.json only, JSON boolean,
  absent = false) for any SoC opt-in flag; shim_hooks() now calls it. Used by
  mkadt.py (adt_hooks).
- wlan_seq.h names the SoC's own table in its first line; the gs101 text is
  unchanged.

tools/test_boards_board_inputs.py covers each on a private copy of the JSON.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mkadt.py, every change a board/soc table input; bluejay and sweet trees are
byte-identical:
- root model-number = the board codename, /product product-description =
  board.json "name" (sweet keeps main's 'bluejay' / 'Pixel 6a').
- /sweet-ufs reg size = soc.json ufs_map_size when set (else ufs_size).
- /sweet-wlan compatible from SWEET_WLAN_COMPAT, one row per SoC (gs101's
  string unchanged); a SoC without a row gets neither /sweet-wlan nor the
  launchd /wlan node (wlan_node_default; same result as board != 'sweet' on
  trunk).
- board.json artwork_display_gamut (sRGB|P3, env PIXOS_ADT_GAMUT overrides)
  replaces the D22AP /product artwork-display-gamut.
- board.json adt_d22ap_backlight: true copies the D22AP /backlight node
  (without function-* properties) after build().
- soc.json adt_hooks: true loads tools/mkadt_<soc>.py: add_nodes() after
  build(), optional product_required() before it (--allow-no-product).

mkpayload.py:
- --board takes every board of tools/boards.py.
- the ADT RAM range may span physically adjacent dram_banks (banks_cover),
  asked only after the single-bank check failed.

No trunk SoC or board sets any of the new keys. Tests:
tools/test_mkadt_board_inputs.py, tools/test_mkpayload_board_inputs.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant