-
Notifications
You must be signed in to change notification settings - Fork 12
/
kerndev-config
executable file
·96 lines (69 loc) · 2.58 KB
/
kerndev-config
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
#!/bin/bash
set -e; set -o pipefail; source kerndev-shared.sh
push_linux
if [[ -n "$REBUILD" ]] || [[ ! -f .config ]]; then
mak mrproper
mak defconfig
fi
# It isn't always useful to have extra version info :)
kdisable localversion_auto
# Required for systemd.
kenable fhandle
# We like devtmpfs.
kenable devtmpfs
# Disable unneeded wifi interface which spawns spurious debug output.
kdisable cfg80211
# tun/tap.
kenable tun
# virtio stuff.
kenable virtio_pci virtio_mmio virtio_blk virtio_net virtio_console \
virtio_pci_legacy virtio_input virtio_mmio_cmdline_devices
kdisable hw_random_virtio virtio_balloon drm_virtio_gpu crypto_dev_virtio
# Debugging settings.
kenable debug_info debug_info_dwarf5 gdb_scripts frame_pointer
kdisable debug_info_reduced debug_rodata debug_info_compressed debug_info_split
# Enable VM debug settings.
kenable debug_vm debug_vm_pgtable
# Remove irritating debug messages we don't care about.
kdisable debug_stack_usage audit
# Gain access to /proc/config.gz.
kenable ikconfig ikconfig_proc
# Avoid legacy hotplug.
# Taken with thanks from http://unix.stackexchange.com/a/116888.
scripts/config --set-str uevent_helper_path ""
# Pull down PSI information.
kenable psi
kdisable psi_default_disabled
# Disable STACKPROTECTOR_STRONG to avoid gcc 10 issues as described at
# http://rglinuxtech.com/?p=2694 (seems applicable to kernels around ~5.5).
kdisable stackprotector_strong
# Enable memcg so we can have mm->owner :)
kenable memcg
kenable checkpoint_restore mem_soft_dirty mapping_dirty_helpers
# Optionally enable flags for docker support.
[[ -n "$ENABLE_DOCKER_SUPPORT" ]] && \
kenable netfilter_advanced dm_thin_provisioning bridge bridge_netfilter \
devpts_multiple_instances cgroup_device memcg macvlan veth \
nf_nat_ipv4 nf_nat netfilter_xt_match_{conntrack,addrtype} \
blk_cgroup blk_dev_throttling cgroup_perf cgroup_hugetlb \
net_cls_cgroup cfs_bandwidth rt_group_sched netprio_cgroup \
cgroup_net_prio btrfs_fs
# Optionally, we are interested in code coverage.
[[ -n "$ENABLE_GCOV" ]] && \
kenable debug_fs gcov_kernel gcov_format_autodetect gcov_profile_all
# Userfaultfd is interesting
kenable userfaultfd
# We want THP.
kenable transparent_hugepage
# Memory failure useful.
kenable memory_failure
# Generate test_vmalloc module for testing.
scripts/config --module test_vmalloc
# Use 16kb pages on arm if set in host system.
zgrep ARM64_16K_PAGES /proc/config.gz &>/dev/null && kenable arm64_16k_pages || true
make olddefconfig
# We don't need modules.
make mod2noconfig || true
# ftrace stuff.
kenable ftrace_syscalls dynamic_ftrace
pop