Skip to content

arm64: configs: one kernel configuration for every Mac (aurora_defconfig) - #2292

Closed
RyanTheTide wants to merge 5 commits into
integration/aurorafrom
sweep-kcmd/config
Closed

RyanTheTide wants to merge 5 commits into
integration/aurorafrom
sweep-kcmd/config

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Adds one kernel configuration for every supported Mac, owned by the kernel tree, so the fleet build and the Fedora, Arch Linux ARM and NixOS packages stop carrying their own bases.

make ARCH=arm64 LLVM=1 aurora_defconfig

merges arch/arm64/configs/asahi.config (Apple hardware, unchanged in scope) over the new arch/arm64/configs/aurora-base.config (generic distribution base, savedefconfig form, no symbol overlapping asahi.config) and runs olddefconfig.

Why

Resolved over this same source (0abc2f3) with the same toolchain, the four existing recipes differ:

fleet build Fedora pkg Arch pkg NixOS pkg
generic base Fedora Asahi kernel config trimmed distro config (in fedora-aurora) same trimmed config (in alarm-aurora) alarm's resolved snapshot from an older pin
asahi.config merged merged merged not merged (validated only)
  • fleet vs the packages: about 6,900 options differ, so the kernel tested on hardware was not the kernel users install.
  • The package base was missing a lot of hardening the fleet had: RANDOMIZE_BASE, FORTIFY_SOURCE, HARDENED_USERCOPY, INIT_STACK_ALL_ZERO (it had INIT_STACK_NONE), LEGACY_TIOCSTI was on, BPF_UNPRIV_DEFAULT_OFF, SLAB_FREELIST_HARDENED, LIST_HARDENED, IO_STRICT_DEVMEM and DEFAULT_MMAP_MIN_ADDR=65536 were all missing. It also lacked USERFAULTFD.
  • Over this source, NixOS is missing the T6050 Wi-Fi/Bluetooth, M5/G18 GPU, DWI backlight, PCIE_APPLE_MSI and the T6050 DP PHY, because its snapshot comes from an older pin.
  • TYPEC_TPS6598X_DEBUG_COMMANDS was off everywhere. The tipd debugfs command file was first built whenever DEBUG_FS was set. It later moved behind this default-n option, and nothing enabled it. tuxvdmtool/macvdmtool need it to send Apple VDMs (DFU, reboot) from Linux. SPMI-attached controllers have no /dev/i2c fallback.

What is in it

  1. asahi.config: CONFIG_TYPEC_TPS6598X_DEBUG_COMMANDS=y.
  2. aurora-base.config + aurora_defconfig target. The base is the fleet's Fedora Asahi base (the configuration booted on the lab Macs since the first fleet cut), plus all 176 options any package had that it lacked: AppArmor, SCHED_CLUSTER, IKCONFIG_PROC, USB gadget functions, CFG80211_WEXT, RELR, FONT_TER16x32, extra filesystems and drivers, and so on. On hardening options the stricter value is used everywhere, including the packages' IOMMU_DEFAULT_DMA_STRICT. PREEMPT_LAZY stays, PREEMPT_DYNAMIC is still on, and VFAT_FS=y. The CONFIG_LSM order stays Fedora's. SELinux is built in; on distributions without a policy it does nothing.
  3. Drops j813.config/j813-usb4.config, a second, board-specific config recipe. All J813 drivers they enabled are in asahi.config. The J813 doc now builds with aurora_defconfig.

asahi.config still enables every Apple SoC/board driver in the tree (M1 through M5 and A18, including the T8122, T6030, T8132, T6050, T8142 and T8152 options). The only Apple options left off are KUnit tests, APPLE_SEP_KEY_RESEARCH, DRM_APPLE_DEBUG, DRM_ASAHI_DEBUG_ALLOCATOR, the experimental MT7932_AWDL (off by design), and x86-only Apple drivers.

Tests

  • aurora-base.config + asahi.config → olddefconfig on 0abc2f3: 5557 + 183 requests, 0 mismatches, 0 Kconfig warnings (unmet, override, invalid). The result is identical to the configuration it was derived from (diffconfig empty). The resolved config also passes the NixOS requirement and policy checks and the fleet distro gate (SELinux, nftables, binfmt_misc, userfaultfd, ntsync, uinput, hidraw, zram, wireguard, user4k, Rust, drm_asahi, SEP, MT7932, brcmfmac, PMP, PMC, AVE, dm-crypt, dm-integrity, BT, exFAT, HID).
  • Full build (Image, modules, dtbs) with make aurora_defconfig and nothing else: see the comment below.
  • Hardware boots are still to come: Neo (T8140), J616s (T6040), M1 Pro (T6000), M2 (T8112).

Full per-option diff of the four recipes and the unified config: traces/kernel/20261119-sweep-kcmd/config/CONFIG-DIFF.md (lab storage).

Order

Merge this first. Then fedora-aurora, alarm-aurora and nixos-aurora switch to aurora_defconfig (draft PRs linked below), which only work with a kernel pin that includes this PR. They land with the first pin bump past it, and NixOS refreshes its kernel/config snapshot in that same bump. The fleet build recipe changes the same way: make aurora_defconfig replaces the Fedora base plus merge_config.

The branch now merges integration/aurora (36faebf) so it carries 26294e8; consumers that take their configuration snapshot from this PR get a source with that fix. The merge changes no configuration value.

Assisted-by: LLM (Claude:Opus 5.5)

RyanTheTide and others added 3 commits November 19, 2026 23:04
The tipd driver's usb/tipd/<port>/command debugfs file sends LOCK, DBMa,
VDMs, DVEn and DISC to the CD321x/SN201202x USB-PD controller. tuxvdmtool
and macvdmtool use it to send Apple VDMs (reboot, DFU, serial, Debug USB)
to a Mac connected to that port, which is the only way to reach an
SPMI-attached controller from Linux (there is no /dev/i2c-N for it).

The interface was first built whenever DEBUG_FS was set; it later moved
behind CONFIG_TYPEC_TPS6598X_DEBUG_COMMANDS (default n), and no config
selected it, so no shipped kernel had it. Every supported Mac has these
controllers, so enable it in the shared fragment. The file is root-only
and inert until written.

Suggested-by: Satya Benson <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each Aurora kernel build started from its own generic base and merged
asahi.config over it: the fleet build used the Fedora Asahi kernel
configuration, the Fedora, Arch Linux ARM and NixOS packages used a
trimmed distribution configuration kept in each packaging repository,
and NixOS did not merge asahi.config at all but reused a resolved
snapshot from an older kernel. Resolved over the same source the
fleet and package configurations differ in about 6,900 options, so the
kernel tested on hardware was not the kernel users install, and NixOS
lacked several recent drivers (T6050 Wi-Fi and Bluetooth, the M5 GPU,
the DWI backlight).

Add the generic half of the configuration to the tree as
aurora-base.config and an aurora_defconfig target that merges
asahi.config over it, so every build gets the same options from the
kernel source:

  make ARCH=arm64 LLVM=1 aurora_defconfig

aurora-base.config is in savedefconfig form and sets no symbol that
asahi.config sets. It is the Fedora Asahi base the fleet builds have
been using, with every option a distribution package had enabled that
it lacked (AppArmor, SCHED_CLUSTER, IKCONFIG_PROC, USB gadget
functions, CFG80211_WEXT, additional filesystems and drivers, ...).
Where the two disagreed on a hardening option the stricter value is
kept, so all distributions now get KASLR, FORTIFY_SOURCE, hardened
usercopy, zero-initialised stack variables, no TIOCSTI injection,
unprivileged BPF off and strict IOMMU invalidation.

The result resolves with no Kconfig warnings, every request of both
fragments survives olddefconfig, and asahi.config still enables every
Apple SoC and board driver in the tree.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
j813.config (an allnoconfig RAM-boot recipe) and j813-usb4.config were a
second, board-specific way to configure a kernel for one Mac. Every
J813 driver they enable (DCP, dockchannel, DART, RTKit, PMGR power
states, SPMI, dwc3, ATC PHY, USB4, PCIe, cpufreq, MacSMC) is already in
asahi.config, so the shared aurora_defconfig builds the same hardware
support for the J813 as for every other Mac. What remains in them is
bring-up policy (47-bit VA, userspace cpufreq governor, host-only dwc3,
simple framebuffer) that the shared configuration intentionally does
not use.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Distribution PRs consuming this (land with the first pin bump that includes this PR): aurora-silicon/fedora-aurora#426, aurora-silicon/alarm-aurora#350, aurora-silicon/nixos-aurora#332.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Build test: real make ARCH=arm64 LLVM=1 aurora_defconfig on the buildbox (clang 22.1.6, rustc 1.97.1) gives aurora-base.config 5557/5557 and asahi.config 183/183 requests surviving, 0 Kconfig warnings, and is byte-identical to the resolved unified config. A full Image + modules + dtbs build of this branch, merged with #2286 and #2272 (branch sweep-kcmd/sweepk2-kit cc59ea1), completed: 6019 modules, 137 DTBs, 0 errors. The only warnings are the existing Rust dead-code lints. Hardware boots on Neo, J616s, M1 Pro and M2 are still to come.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Hardware rows, 2026-11-20: one-shot boots of 7.3.0-aurora-sweepk2. The source is sweep-kcmd/sweepk2-kit cc59ea1, which is integration/aurora 0abc2f3 plus #2292 (make aurora_defconfig), #2286 and #2272. Each boot ran with no machine-specific kernel arguments. The test entries dropped user4k=on, plymouth.ignore-serial-consoles and the apple_sep trace/guard arguments; only root/rootflags/quiet plus the lab watchdog arguments remained.

Mac SoC boot /proc/config.gz == built config tipd command nodes 4K userspace (no user4k=on) WFI register save wfxt hwcap SHA-256 loop (schedutil) failed units / AVC / kernel errors / oops / DART faults
MacBook Neo J700 T8140 32 s yes 2 yes yes hidden 216 runs, 0 wrong 0 / 0 / 0 / 0 / 0
MacBook Pro J616s T6040 62 s yes 4 yes yes hidden 504 runs, 0 wrong 0 / 0 / 0 / 0 / 0
MacBook Pro J316s T6000 45 s yes 4 yes n/a (M1) absent 360 runs, 0 wrong 0 / 0 / 0 / 0 / 0
MacBook Air J413 T8112 27 s yes 3 yes n/a (M2) absent 288 runs, 0 wrong 0 / 0 / 0 / 0 / 0

All four Macs:

  • Boot state: SELinux enforcing, KASLR active (non-zero _text), iommu: DMA domain TLB invalidation policy: strict mode, PREEMPT_LAZY, renderD128 + apple-drm bound.
  • Idle: cpuidle states are entered on every CPU.
  • T8140: booted without arm64.nowfxt or idle=nop; the MIDR-based WFI save and WFxT hiding cover it.

Each Mac went back to its normal kernel afterwards.

Not covered by these rows: suspend/resume, GPU/NVMe throughput against the current kernel, and audio.

RyanTheTide and others added 2 commits November 20, 2026 14:25
Brings in 26294e8 (GPU stop fix for the Neo deep-sleep regression) so
the configuration snapshot consumers pin a source that carries it.
Conflicts: arch/arm64/configs/j813.config (modify/delete: kept deleted; integration's DWC3 dual-role for the J813 is what aurora_defconfig already builds, USB_GADGET + DWC3 give CONFIG_USB_DWC3_DUAL_ROLE=y).

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merged integration/aurora (f5f023b); modify/delete conflict on arch/arm64/configs/j813.config resolved by keeping it deleted (aurora_defconfig already gives CONFIG_USB_DWC3_DUAL_ROLE=y with USB_GADGET). aurora_defconfig generates with every asahi.config value (incl. the new DRM_APPLE_CEC) in the final .config, and drivers/usb/dwc3/ + drivers/usb/typec/tipd/ build under it (arm64, LLVM).

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Now merges cleanly with the J813 config conflict resolved, and the build and four boot rows are in. Commits 5be14ce, 1015b2b and 078e73c have a Co-Authored-By trailer and no Signed-off-by, so re-commit them on a fresh branch with a human Signed-off-by only; then it needs a review and ready-marking.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Replaced by #2803: the same changes with the commit trailers fixed, on the current integration/aurora.

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