CreateConfig in kernel.spec builds each architecture’s final .config as:
ARCH-omv-defconfig— arch / platform / CPU / SoC specificsgeneric-omv-defconfig— cross-arch shared settings not in a fragment*.fragment— shared subsystem policy (later fragments override earlier only by filename glob order; prefer one owner per key)*.overrides/temporary-workarounds.overrides— variant and temporary fixesclangify/serverize/FIXED_CONFIGSolddefconfig
Later files win. Invalid options for an arch are dropped by olddefconfig.
| Setting kind | Where it lives |
|---|---|
| Shared intentional enable/disable for all arches that support it | *.fragment or generic-omv-defconfig |
| Arch / platform / CPU only | *-omv-defconfig |
| Temporary workaround | temporary-workarounds.overrides |
| znver1-only | znver1.overrides |
These lines are intentional policy, not noise. They record an explicit disable vs “option never mentioned / did not exist in an older tree”. Do not strip them from fragments (or anywhere else they appear).
Do not store CONFIG_CC_VERSION_TEXT, CONFIG_CLANG_VERSION, CONFIG_BUILD_SALT, CONFIG_CC_IS_*, etc. in packaged configs; the build recomputes them.
# Duplication stats
./manage-kernel-configs.py stats
# Strip fragment-owned / generic-dup / toolchain noise from arch bases
./manage-kernel-configs.py strip-duplicates
# Extract same-valued fat-arch (x86/i386/arm/arm64) keys into fragments/generic
./manage-kernel-configs.py extract-common
./manage-kernel-configs.py extract-common --dry-run
# Merge like the package build and save final .config files
./manage-kernel-configs.py verify --outdir config-verify/out
# Compare two final configs (fat = strict, slim = subset)
./manage-kernel-configs.py compare --mode strict before.config after.config
./manage-kernel-configs.py compare --mode subset before.config after.config./auto-clean-base-configs.sh is a thin wrapper around the same tool.
Fragments apply to every arch. Growing enablement on powerpc/riscv/loongarch toward the same module set (e.g. media devices as modules) is intentional. Options that do not exist on an arch disappear at olddefconfig. Uncommon modules can later be split into subpackages.
Fat arches (x86, i386, arm, arm64): final merged .config must match pre-cleanup
baselines (compare --mode strict), aside from toolchain noise.
Slim arches (powerpc, riscv, loongarch): expect growth toward the shared
fragment set (many n→m / n→y). Built-in drivers that fat arches carry as modules
may become modules (y→m); that is intentional for a unified module-oriented config
(initramfs loads boot drivers).
Known arch Kconfig interactions after unification:
- powerpc + hibernation: enabling
HIBERNATION(shared policy) disablesARCH_HAS_STRICT_KERNEL_RWXon powerpc (select … if !HIBERNATION). That dropsSTRICT_KERNEL_RWX/DEBUG_WXon that arch only — an upstream limitation, not a merge bug. SYSFB_SIMPLEFB: shared policy prefers simplefb/simpledrm;DRM_EFIDRMis mutually exclusive withSYSFB_SIMPLEFBand will not appear where simplefb is on.
znver1.overrides— AMD znver1 CPU-focused buildarm64.overrides— USB boot path built-in (USB/xhci/ehci/SCSI/BLK_DEV_SD/USB_STORAGE/USB_UAS=y). Needed because many aarch64 boards boot from USB mass-storage andUSB_STORAGEcannot be=ywhileSCSIis modular. Other arches keep these as modules via fragments.temporary-workarounds.overrides— short-lived force-offs
security.fragment default stack is minimal:
CONFIG_LSM="landlock,bpf"
AppArmor, SELinux, Yama, and related stacking LSMs stay built-in (bool options) so users can opt in at boot, but they are not in the default list (no ptrace hardening / full MAC unless chosen):
lsm=landlock,yama,bpf
lsm=landlock,lockdown,yama,loadpin,safesetid,apparmor,integrity,bpf
lsm=landlock,lockdown,yama,loadpin,safesetid,selinux,integrity,bpf