#!/bin/bash # # Xanmod-ROG configuration script; this script is called during package creation and tunes kernel configuration # where we want to differ from upstream Xanmod # Any user customization should be done in $PKGDIR/myconfig or $HOME/.config/linux-xanmod-rog/myconfig; if either # of these scripts exists they'll be called during package build after this script finishes # # WARNING: DO NOT EDIT THIS FILE, it will be over-written by future updates -- use 'myconfig' instead # # XXX: Switch to a more power-friendly cpufreq default, this is a laptop-focused kernel package scripts/config --disable CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE \ --enable CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL # asusctl/supergfxctl VFIO compatibility scripts/config --module CONFIG_VFIO \ --module CONFIG_VFIO_VIRQFD \ --disable CONFIG_VFIO_NOIOMMU \ --module CONFIG_VFIO_PCI # package throws a warning re: lack of binutils support if this is left on scripts/config --disable CONFIG_X86_X32 # sync default hostname with Arch scripts/config --set-str CONFIG_DEFAULT_HOSTNAME archlinux # enable debug and BTF generation scripts/config --enable CONFIG_DEBUG_INFO \ --enable CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT \ --enable CONFIG_DEBUG_INFO_BTF \ --enable CONFIG_DEBUG_INFO_BTF_MODULES # sync up some BPF defaults with mainline # FIXME: BPF preloading is still causing boot-time errors for people, disable for now #scripts/config --enable CONFIG_BPF_PRELOAD \ # --module CONFIG_BPF_PRELOAD_UMD \ # --enable CONFIG_BPF_LSM scripts/config --enable CONFIG_BPF_LSM # sync some settings with Arch: scripts/config --enable CONFIG_TASKS_RUDE_RCU \ --disable CONFIG_X86_MCELOG_LEGACY \ --enable CONFIG_X86_CPA_STATISTICS \ --module CONFIG_X86_PMEM_LEGACY \ --enable CONFIG_KPROBES_ON_FTRACE \ --enable CONFIG_UPROBES \ --enable CONFIG_LOCK_EVENT_COUNTS \ --enable CONFIG_MODULE_FORCE_LOAD \ --enable CONFIG_MODULE_FORCE_UNLOAD \ --enable CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS \ --enable CONFIG_BLK_DEV_THROTTLING_LOW \ --enable CONFIG_BLK_CGROUP_IOCOST \ --enable CONFIG_CMA \ --enable CONFIG_CMA_DEBUGFS \ --enable CONFIG_CMA_SYSFS \ --set-val CONFIG_CMA_AREAS 7 \ --enable CONFIG_READ_ONLY_THP_FOR_FS \ --enable CONFIG_XFRM_SUB_POLICY \ --enable CONFIG_XFRM_MIGRATE \ --enable CONFIG_NET_KEY_MIGRATE \ --enable CONFIG_IPV6_OPTIMISTIC_DAD \ --enable CONFIG_IPV6_RPL_LWTUNNEL \ --enable CONFIG_NF_CONNTRACK_PROCFS \ --module CONFIG_NETFILTER_XT_TARGET_NOTRACK \ --disable CONFIG_DECNET \ --module CONFIG_IPDDP \ --enable CONFIG_IPDDP_ENCAP \ --disable CONFIG_X25 \ --disable CONFIG_LAPB scripts/config --enable CONFIG_TRACEPOINTS \ --disable CONFIG_IOSF_MBI_DEBUG \ --enable CONFIG_KVM_MMU_AUDIT \ --disable CONFIG_BLK_CMDLINE_PARSER \ --module CONFIG_PCIEAER_INJECT \ --enable CONFIG_PCIE_ECRC \ --enable CONFIG_PCI_P2PDMA # XXX: switch off drivers we're probably not going to use scripts/config --disable CONFIG_INFINIBAND \ --disable CONFIG_DRM_NOUVEAU \ --disable CONFIG_PCMCIA_WL3501 \ --disable CONFIG_PCMCIA_RAYCS \ --disable CONFIG_IWL3945 \ --disable CONFIG_IWL4965 \ --disable CONFIG_IPW2200 \ --disable CONFIG_IPW2100 # select slightly more sane block device driver options; NVMe really should be built in scripts/config --disable CONFIG_RAPIDIO \ --module CONFIG_CDROM \ --disable CONFIG_PARIDE \ --enable CONFIG_NVME_CORE \ --enable CONFIG_BLK_DEV_NVME \ --module CONFIG_FDDI \ --module CONFIG_PPP \ --module CONFIG_SLHC # larger kernel log buffer (256KB) scripts/config --set-val CONFIG_LOG_BUF_SHIFT 18 # MSR as a module scripts/config --module CONFIG_X86_MSR # enable EFI var access scripts/config --module CONFIG_EFI_VARS # disable user event hooks scripts/config --disable CONFIG_UEVENT_HELPER scripts/config --disable CONFIG_FW_LOADER_USER_HELPER # Xanmod: enable scheduler autogrouping scripts/config --enable CONFIG_SCHED_AUTOGROUP_DEFAULT_ENABLED # feature: enable multigen LRU by default scripts/config --enable CONFIG_LRU_GEN \ --enable CONFIG_LRU_GEN_ENABLED # bake in s0ix debugging parameters so we get useful problem reports re: suspend scripts/config --enable CONFIG_CMDLINE_BOOL \ --set-str CONFIG_CMDLINE "makepkgplaceholderyolo" \ --disable CMDLINE_OVERRIDE # HACK: forcibly fixup CONFIG_CMDLINE here as using scripts/config mangles escaped quotes sed -i 's#makepkgplaceholderyolo#pm_debug_messages amd_pmc.enable_stb=1 amd_pmc.dyndbg=\\"+p\\" acpi.dyndbg=\\"file drivers/acpi/x86/s2idle.c +p\\"#' .config # Note the double escaped quotes above, sed strips one; the final result in .config needs to contain single slash # escaped quotes (eg: `CONFIG_CMDLINE="foo.dyndbg=\"+p\""`) to avoid dyndbg parse errors at boot. This is impossible # with the current kernel config script.