aboutsummarylogtreecommitdiffstats
path: root/xanmod-rog-config
blob: afe684786ded714a0b336df79e69b77e23292e85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/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: As this kernel package is primarily targeted at ASUS laptops we default to schedutil so the machine properly
# XXX: clocks down. Consider using 'ondemand' to trade efficiency for performance when needed

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_IOMMU_TYPE1 \
                --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

# sync up BPF defaults with mainline
scripts/config  --enable CONFIG_BPF_PRELOAD \
                --module CONFIG_BPF_PRELOAD_UMD \
                --enable CONFIG_BPF_LSM #\
                #--disable CONFIG_BPF_UNPRIV_DEFAULT_OFF

# 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: I'm going to make an opinionated decision here and save everyone some compilation time
# XXX: on drivers almost no-one is going to use; if you need any of theese turn them on in myconfig
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.