# This file is intentionally left empty in the stock kernel. Its a nicety
# added for those wanting to do custom rebuilds with altered config opts.
#
# fairydust branch overrides:
#
# QRTR_MHI fails to build against this source (found empirically while
# building fairydust manually via asahi-fairydust-build.sh before this
# rpmbuild-based packaging existed). It's the MHI transport for Qualcomm
# IPC Router, irrelevant to Apple Silicon hardware, so just drop it.
# It's force-selected back on by ATH11K/ATH12K (Qualcomm PCIe Wi-Fi, also
# not present on any Apple Silicon Mac) via "select QRTR_MHI" in their
# Kconfig, so those have to go too or olddefconfig silently re-enables it.
# CONFIG_QRTR_MHI is not set
# CONFIG_ATH11K is not set
# CONFIG_ATH12K is not set
#
# CONFIG_RUST, CONFIG_TYPEC_DP_ALTMODE, CONFIG_TYPEC_NVIDIA_ALTMODE,
# CONFIG_TYPEC_TBT_ALTMODE and CONFIG_PHY_APPLE_ATC are already enabled in
# kernel-aarch64-16k-fedora.config as shipped - the fairydust branch's
# external-display work is a source-level difference from the stock asahi
# branch, not a config-level one. CONFIG_DRM_ASAHI/CONFIG_DRM_APPLE/
# CONFIG_DRM_APPLE_AUDIO/CONFIG_PHY_APPLE_DPTX are NOT already enabled
# (an earlier version of this comment wrongly assumed they were - see the
# "@asahi/kernel" block below) and are forced further down.
#
# VIDEO_APPLE_AVD (the Apple Silicon hardware video decode driver) landed on
# fairydust alongside an in-progress firmware-loading rework that isn't
# stable yet - a build made from it broke on this hardware. Nothing needs
# it for DP-altmode/audio/PMP, so drop it until fairydust's AVD work settles.
# CONFIG_VIDEO_APPLE_AVD is not set
#
# APPLE_PMP (tristate) now defaults to y on ARCH_APPLE and selects the bool
# RUST_APPLE_RTKIT, which in turn selects the tristate APPLE_RTKIT - and
# `select` forces a tristate up to the selector's level regardless of what's
# already set, so APPLE_RTKIT gets forced to y even though the fragment
# config ships it as m. APPLE_RTKIT `depends on APPLE_MAILBOX` (a plain
# depends, not a select, so nothing bumps *that* automatically) which is
# still m in the fragment - vmlinux then fails to link with "undefined
# reference to apple_mbox_*" from drivers/soc/apple/rtkit.o. Force it to y
# to match what the PMP default already demands.
CONFIG_APPLE_MAILBOX=y
#
# The comment above (and the earlier "already enabled in kernel-aarch64-16k-
# fedora.config as shipped" claim in this package's 7.1.9-1 changelog entry)
# was wrong, and it cost a keyboard: fetch-fedora-donor-sources.sh pulls the
# config fragment from *stock* Fedora's official koji, which has never
# carried Apple-laptop peripheral support (dockchannel keyboard/trackpad,
# the Rust GPU driver, AOP sensors/audio, SEP, the SIO DMA/DCP audio path,
# ISP camera, macsmc input, Broadcom BT extensions, ...). That support lives
# only in the Fedora Asahi SIG's own Copr build (`@asahi/kernel`,
# copr.fedorainfracloud.org/coprs/g/asahi/kernel/) - confirmed by pulling
# their actual built config and diffing it against ours. Because these are
# all bare tristates/bools with no Kconfig default and nothing else selects
# them, `make olddefconfig` silently resolves every one of them to "not set"
# against the stock donor - no error, no warning that reaches the packager,
# just a kernel that boots with the internal keyboard (and GPU accel, and
# speakers, ...) quietly dead. This has now silently broken real hardware
# three times (PMP, APPLE_MAILBOX, and this). See the config-verification
# step added to kernel.spec's %prep, right after process_configs.sh runs,
# which now fails the build instead of shipping this silently again if any
# of the below regress.
#
# Rebuilding this list: pull the latest succeeded @asahi/kernel build's
# aarch64 config (e.g. via its /lib/modules/*/config, or
# copr-cli download-build --dest DIR -r fedora-44-aarch64 BUILD_ID) and diff
# it against a fresh `koji download-build --arch=src kernel-KVER-*.fc44`
# donor run through `make listnewconfig` - anything the stock donor leaves
# unresolved that @asahi enables belongs here.
CONFIG_APPLE_DOCKCHANNEL=m
CONFIG_HID_DOCKCHANNEL=m
CONFIG_APPLE_SIO=m
CONFIG_APPLE_PMGR_MISC=y
CONFIG_APPLE_RTKIT_HELPER=m
CONFIG_RUST_APPLE_MAILBOX=y
CONFIG_APPLE_AOP=m
CONFIG_APPLE_SEP=m
CONFIG_IIO_AOP_SENSOR_LAS=m
CONFIG_IIO_AOP_SENSOR_ALS=m
CONFIG_PHY_APPLE_DPTX=m
CONFIG_MUX_APPLE_DPXBAR=m
CONFIG_SPI_HID_APPLE_CORE=m
CONFIG_SPI_HID_APPLE_OF=m
CONFIG_SND_SOC_APPLE_AOP_AUDIO=m
CONFIG_SND_SOC_APPLE_MACAUDIO=m
CONFIG_TYPEC_SN201202X=m
CONFIG_VIDEO_APPLE_ISP=m
CONFIG_INPUT_MACSMC_INPUT=m
CONFIG_BT_BRCMEXT=y
#
# DRM_APPLE/DRM_ASAHI (the Rust GPU driver) additionally require their DRM
# core dependencies to be builtin, not modular - a plain `depends on
# DRM_SCHED` etc. with no "=y" is still a hard equality once those deps are
# rust-wrapped, so if DRM_SCHED/DRM_GPUVM/DRM_EXEC resolve to =m (which they
# do against the stock donor on newer kernels) DRM_APPLE/DRM_ASAHI can't be
# satisfied and Kconfig silently drops them instead of erroring. Force the
# whole chain builtin so the two actually stay on.
CONFIG_DRM_EXEC=y
CONFIG_DRM_GPUVM=y
CONFIG_DRM_SCHED=y
CONFIG_RUST_DRM_GEM_SHMEM_HELPER=y
CONFIG_RUST_DRM_SCHED=y
CONFIG_RUST_DRM_GPUVM=y
CONFIG_DRM_APPLE=m
CONFIG_DRM_APPLE_AUDIO=y
CONFIG_DRM_ASAHI=m
