Repository navigation
arm64: configs: one kernel configuration for every Mac (aurora_defconfig) - #2803
RyanTheTide wants to merge 3 commits into
Conversation
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]> Signed-off-by: Ryan Murray <[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. Signed-off-by: Ryan Murray <[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. Signed-off-by: Ryan Murray <[email protected]>
|
Review at 14414bc (non-author, draft). No blocker; ready once the hardware boots are in, with one runtime difference from the tested kernels that deserves its own row.
Small points, not blocking:
Assisted-by: LLM (Claude:Opus 5.5) |
|
Closing as superseded: one kernel configuration for every Mac landed on main as |
Replaces #2292 (same changes, commit trailers fixed, on the current integration/aurora).
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.
merges
arch/arm64/configs/asahi.config(Apple hardware, unchanged in scope) over the newarch/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:
RANDOMIZE_BASE,FORTIFY_SOURCE,HARDENED_USERCOPY,INIT_STACK_ALL_ZERO(it hadINIT_STACK_NONE),LEGACY_TIOCSTIwas on,BPF_UNPRIV_DEFAULT_OFF,SLAB_FREELIST_HARDENED,LIST_HARDENED,IO_STRICT_DEVMEMandDEFAULT_MMAP_MIN_ADDR=65536were all missing. It also lackedUSERFAULTFD.PCIE_APPLE_MSIand the T6050 DP PHY, because its snapshot comes from an older pin.TYPEC_TPS6598X_DEBUG_COMMANDSwas off everywhere. The tipd debugfscommandfile 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/i2cfallback.What is in it
asahi.config:CONFIG_TYPEC_TPS6598X_DEBUG_COMMANDS=y.aurora-base.config+aurora_defconfigtarget. 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_LAZYstays,PREEMPT_DYNAMICis still on, andVFAT_FS=y. TheCONFIG_LSMorder stays Fedora's. SELinux is built in; on distributions without a policy it does nothing.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 withaurora_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 experimentalMT7932_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 (diffconfigempty). 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).make aurora_defconfigand nothing else: see the comment below.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 itskernel/configsnapshot in that same bump. The fleet build recipe changes the same way:make aurora_defconfigreplaces 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.