forked from Frogging-Family/linux-tkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustomization.cfg
More file actions
528 lines (418 loc) · 26.8 KB
/
customization.cfg
File metadata and controls
528 lines (418 loc) · 26.8 KB
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
# linux-TkG config file
# Linux distribution you are using, options are "Arch", "Ubuntu", "Debian", "Fedora", "Suse", "Gentoo", "Generic".
# It is automatically set to "Arch" when using PKGBUILD.
# If left empty, the script will prompt
_distro=""
# Kernel Version
# Accepts
# - "x.y-latest" to pick latest kernel from the x.y series (e.g. "6.13-latest")
# - git tags, e.g. "v6.0-rc4" or "v5.10.51"
# - Note: Patches may fail as they may only apply to newer trees.
# If left empty, the script will prompt
_version=""
# Set to "true" to build a pure vanilla kernel without any modifications.
_vanilla="false"
#### MISC OPTIONS ####
# External config file to use - If the given file exists in path, it will override default config (customization.cfg) - Default is ~/.config/frogminer/linux-tkg.cfg
_EXT_CONFIG_PATH=~/.config/frogminer/linux-tkg.cfg
# [Arch specific] Set to anything else than "true" to limit cleanup operations and keep source and files generated during compilation.
# Default is "true".
_NUKR="true"
# Link to the git mirror to use to get the kernel sources
# e.g. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
# possible aliases: "kernel.org", "googlesource.com", "gregkh" and "torvalds"
# leave empty for kernel.org
_git_mirror=""
# Root folder where to checkout the kernel sources (linux-src-git subdir) and build
# Note: - Leave empty to use PKGBUILD's dir
# - Start with a '/' for an absolute path in which `linux-tkg/linux-src-git/` will be created
# - This setting can be used to set the work/build folder to a tmpfs folder
# - Requires >= 64GB ram when building a full kernel, should work with less ram with modprobed-db
_kernel_work_folder=""
# Permanent root folder where to keep the git clone (linux-kernel.git subdir) and fetch new blobs
# Note: - Leave empty to use PKGBUILD's dir
# - Start with a '/' for an absolute path in which `linux-tkg/linux-kernel.git/` will be created
# - If your internet is faster than your storage, it may be wise to put this folder
# in a tmpfs location (although it will reclone after each restart / tmpfs folder cleanup)
_kernel_source_folder=""
# Custom compiler root dirs - Leave empty to use system compilers
# Example: CUSTOM_GCC_PATH="/home/frog/PKGBUILDS/mostlyportable-gcc/gcc-mostlyportable-9.2.0"
CUSTOM_GCC_PATH=""
# Custom LLVM compiler root dirs - Leave empty to use system llvm compiler
# Example: CUSTOM_LLVM_PATH="/home/frog/PKGBUILDS/mostlyportable-llvm/llvm-mostlyportable-11.0.0"
CUSTOM_LLVM_PATH=""
# Set to true to bypass makepkg.conf and use all available threads for compilation. False will respect your makepkg.conf options.
_force_all_threads="true"
# Set to true to prevent ccache from being used and set CONFIG_GCC_PLUGINS=y (which needs to be disabled for ccache to work properly)
_noccache="false"
# Build only a subset of the default kernel modules list to speedup compile time and lower needed space to build kernel
# Important: - The kernel may fail to boot or behave weirdly with this option active. If it is the case, disable it and rebuild
# - If it is the case and know which modules were missing, please open a bug report so we can add them to the "diet" db
# Notes:
# - This option cannot be used with _modprobeddb="true"
_kernel_on_diet="false"
# Set to true to use modprobed db to clean config from unneeded modules. Speeds up compilation considerably.
# Requires root - https://wiki.archlinux.org/index.php/Modprobed-db
# Using this option can trigger user prompts if the config doesn't go smoothly.
# Notes:
# - Make sure to have a well populated db
# - Otherwise use the '_kernel_on_diet' option instead
_modprobeddb="false"
# modprobed-db database file location
_modprobeddb_db_path=~/.config/modprobed.db
# Set to "1" to call make menuconfig, "2" to call make nconfig, "3" to call make xconfig, before building the kernel. Set to false to disable and skip the prompt.
_menunconfig=""
# Set to true to generate a kernel config fragment from your changes in menuconfig/nconfig. Set to false to disable and skip the prompt.
_diffconfig=""
# Set to the file name where the generated config fragment should be written to. Only used if _diffconfig is active.
_diffconfig_name=""
#### KERNEL OPTIONS ####
# Name of the default config file to use for the kernel
# Default (empty) : "config.x86_64" from the linux-tkg-config/5.y folder.
# "running-kernel" : Picks the .config file from the currently running kernel.
# It is recommended to be running an official kernel before running this script, to pick off a correct .config file
# "config_hardened.x86_64" : config file for a hardened kernel, available for kernel version "5.15", "5.13", "5.11", "5.10", "5.7", "5.4".
# To get a complete hardened setup, you have to use "cfs" as _cpusched.
# User provided value : custom user provided file, the given path should be relative to the PKGBUILD file. This enables for example to use a user stripped down .config file.
# If the .config file isn't up to date with the chosen kernel version, any extra CONFIG_XXXX is set to its default value.
# Note: the script copies the resulting .config file as "kernelconfig.new" next to the PKGBUILD as a convenience for an eventual re-use. It gets overwritten at each run.
# One can use "kernelconfig.new" here to always use the latest edited .config file. modprobed-db needs to be used only once for its changes to be picked up.
_configfile=""
# Determine whether to call "olddefconfig" (default) or "oldconfig" for manual config updating interaction.
_config_updating="olddefconfig"
# Aggressively disable kernel debugging features
# Note:
# - if you encounter issues, test with this setting disabled first, then open a bug report on what necessary feature was disabled
# - search '_debugdisable' in linux-tkg-config/prepare for the list of disabled CONFIG entries
_debugdisable="false"
# Strip the kernel and its modules from debug symbols
_STRIP="true"
# ! WARNING: [EXPERIMENTAL] Re-sign all kernel modules after stripping.
# Note:
# - INSTALL_MOD_STRIP=1 removes embedded signatures, causing "module verification failed" taints at boot.
# - When enabled, sign-file is invoked on every .ko after strip, so signatures are intact in the final package.
# - Requires CONFIG_MODULE_SIG=y in your kernel config (default). Has no effect when _STRIP is not "true".
_RESIGN_AFTER_STRIP="false"
# LEAVE AN EMPTY VALUE TO BE PROMPTED ABOUT FOLLOWING OPTIONS AT BUILD TIME
# CPU scheduler - Options are "pds", "bmq", "bore", "cfs" (linux 6.5-) or "eevdf" (kernel's default, 6.6+)
# "upds" (TkG's Undead PDS) and "muqss" are also available on legacy kernel revisions
# If unsure, select "eevdf" (default)
_cpusched=""
# Compiler to use - Options are "gcc" or "llvm".
# For advanced users.
_compiler=""
# [Generic and Gentoo specific] Replace `libunwind` with `llvm-libunwind`.
# ! This is currently experimental.
# ! It can only work with the `llvm-libunwind` `USE` flag in `llvm-core/clang-common` for Gentoo.
# Set to "true" to enable.
_libunwind_replace=""
# Use the LLVM Integrated Assembler for a complete LLVM toolchain built kernel. Default is "1" when using LLVM.
# Set to "0" to disable if desired, otherwise stick to the default behavior.
_llvm_ias="1"
# Clang LTO mode, only available with the "llvm" compiler - options are "no", "full" or "thin".
# ! This is currently experimental and might result in an unbootable kernel - Not recommended !
# "no: do not enable LTO"
# "full: uses 1 thread for Linking, slow and uses more memory, theoretically with the highest performance gains."
# "thin: uses multiple threads, faster and uses less memory, may have a lower runtime performance than Full."
_lto_mode=""
# Clang AutoFDO - Automatic Feedback-Directed Optimization via CPU hardware branch sampling
# Uses real workload perf data to guide Clang's optimizer for improved kernel performance.
# ! Requires: _compiler="llvm", kernel >= 6.11, CPU with LBR (Intel Haswell+) or (AMD Zen4+) !
#
# BUILD a profilable kernel
# - _autofdo="true"
# - _autofdo_profile_path="~/.config/frogminer/kernel.afdo"
# - build & install kernel, then boot into it
#
# PROFILE COLLECTION
# - sudo echo 0 > /proc/sys/kernel/kptr_restrict
# - sudo echo 0 > /proc/sys/kernel/perf_event_paranoid
#
# OR (via systemd):
# - sudo sysctl -w kernel.kptr_restrict=0
# - sudo sysctl -w kernel.perf_event_paranoid=0
#
# Intel (LBR):
# perf record -e BR_INST_RETIRED.NEAR_TAKEN:k -a -N -b -c 500009 -o kernel.data -- <workload>
# AMD Zen4:
# perf record --pfm-events RETIRED_TAKEN_BRANCH_INSTRUCTIONS:k -a -N -b -c 500009 -o kernel.data -- <workload>
#
# CONVERT perf data (.afdo profile)
# - mkdir -p ~/.config/frogminer
# - llvm-profgen --kernel --binary=/usr/lib/modules/<kver>/build/vmlinux \
# --perfdata=kernel.data -o ~/.config/frogminer/tkg.afdo
# - Merge multiple profiles (optional):
# llvm-profdata merge -o ~/.config/frogminer/tkg.afdo profile1.afdo profile2.afdo ...
#
# SET _autofdo_profile_path to the .afdo file path, then rebuild the kernel.
#
# Set to "true" to enable AutoFDO (Pass 1 and Pass 2). Leave empty to disable.
# Note: if _autofdo_profile_path is set and the file exists, _autofdo is enabled automatically.
_autofdo=""
# Path to the .afdo profile file for AutoFDO Pass 2 (the optimized rebuild).
# Leave empty for Pass 1 (profile collection build - kernel is built with CONFIG_AUTOFDO_CLANG=y but no profile).
# If set but the file does not exist, _autofdo stays active and the build falls back to Pass 1 mode automatically.
# Default path: ~/.config/frogminer/tkg.afdo
_autofdo_profile_path="~/.config/frogminer/tkg.afdo"
# Apply PREEMPT_RT patchset to the kernel.
# ! Only CFS CPU scheduler is compatible with this patchset !
# Set to "1" to enable.
_preempt_rt=""
# Forcibly apply the PREEMPT_RT patchset to the kernel, even when upstream does not officially support the kernel subversion.
# ! This will still not apply when the patch itself or linux-tkg (see _version) do not support the kernel major version - Not recommended !
# Set to "1" to enable.
_preempt_rt_force=""
# CPU sched_yield_type - Choose what sort of yield sched_yield will perform
# For PDS and MuQSS: 0: No yield. (Recommended option for gaming on PDS and MuQSS)
# 1: Yield only to better priority/deadline tasks. (Default - can be unstable with PDS on some platforms)
# 2: Expire timeslice and recalculate deadline. (Usually the slowest option for PDS and MuQSS, not recommended)
# For BMQ: 0: No yield.
# 1: Deboost and requeue task. (Default)
# 2: Set rq skip task.
_sched_yield_type=""
# [MuQSS, PrjC, PDS, BMQ only, for kernel <= 6.6]
# Round Robin interval is the longest duration two tasks with the same nice level will be delayed for.
# When CPU time is requested by a task, it receives a time slice equal to the rr_interval in addition to a virtual deadline.
# When using yield_type 2, a low value can help offset the disadvantages of rescheduling a process that has yielded.
# MuQSS default: 6ms"
# PDS default: 4ms"
# BMQ default: 2ms"
# Set to "1" for 2ms, "2" for 4ms, "3" for 6ms, "4" for 8ms, or "default" to keep the chosen scheduler defaults.
_rr_interval=""
# Set to "true" to disable FTRACE, lowering overhead but limiting debugging and analyzing of kernel functions - Kernel default is "false"
# Notes:
# - May break many things, as it disables many child config options (FUNCTION_TRACER, GRAPH_TRACER, FBROBE, STACK TRACER...)
# - Prevents sched-ext LAVD from properly working, see https://github.com/sched-ext/scx/blob/main/kernel.config#L19
_ftracedisable="false"
# Set to "true" to disable NUMA, lowering overhead, but breaking CUDA/NvEnc on Nvidia equipped systems - Kernel default is "false"
_numadisable="false"
# Set to "true" to enable misc additions - May contain temporary fixes pending upstream or changes that can break on non-Arch - Kernel default is "true"
_misc_adds="true"
# Set to "0" for periodic ticks, "1" to use CattaRappa mode (enabling full tickless) and "2" for tickless idle only.
# Full tickless can give higher performances in case you use isolation of CPUs for tasks
# and it works only when using the nohz_full kernel parameter, otherwise behaves like idle.
# Just tickless idle perform better for most platforms.
_tickless=""
# Set to "true" to use ACS override patch - https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Bypassing_the_IOMMU_groups_.28ACS_override_patch.29 - Kernel default is "false"
_acs_override=""
# Various patches and tweaks from Zen/Liquorix, Xanmod and the community - Default is "true"
_glitched_base="true"
# A selection of patches from Zen/Liquorix kernel and additional tweaks for a better gaming experience (ZENIFY) - Default is "true"
# ! depends on _glitched_base="true" !
_zenify="true"
# compiler optimization level - 1. Optimize for performance (-O2); 2. Optimize harder (-O3); 3. Optimize for size (-Os) - Kernel default is "1"
_compileroptlevel="1"
# CPU compiler optimizations - Prompt using a list of common CPUs if empty
# Note: any string accepted by the compiler for '-march=' flag will work
# To list all the supported µarchs supported by your chosen compiler
# - Clang: clang -mcpu=help
# - GCC: gcc --target-help | grep -A 2 -m1 'Known valid' | sed -n '2p'
_processor_opt=""
# MuQSS and PDS only - SMT (Hyperthreading) aware nice priority and policy support (SMT_NICE) - Kernel default is "true" - You can disable this on non-SMT/HT CPUs for lower overhead
_smt_nice=""
# BORE only - The default lower bound limit of the base slice. Setting this value too high can cause the system to boot with an unnecessarily large base slice, resulting in high scheduling latency and poor system responsiveness.
# Default is 2000000
_bore_min_base_slice_ns="2000000"
# Trust the CPU manufacturer to initialize Linux's CRNG (RANDOM_TRUST_CPU) - Kernel default is "false"
_random_trust_cpu="true"
# Timer frequency - "100" "250" "300" "500" "750" "1000" - More options available in kernel config prompt when left empty depending on selected cpusched with the default option pointed with a ">" (100 for muqss and 1000 for other cpu schedulers)
_timer_freq=""
# Default CPU governor - "performance", "ondemand", "schedutil" or leave empty for default (schedutil)
_default_cpu_gov="ondemand"
# Use an aggressive ondemand governor instead of default ondemand to improve performance on low loads/high core count CPUs while keeping some power efficiency from frequency scaling.
# It still requires you to either set ondemand as default governor or to select it in some way at runtime.
_aggressive_ondemand="true"
# [Advanced] Default TCP IPv4 algorithm to use. Options are: "yeah", "bbr", "cubic", "reno", "vegas" and "westwood". Leave empty if unsure.
# This config option will not be prompted
# Can be changed at runtime with the command line `# echo "$name" > /proc/sys/net/ipv4/tcp_congestion_control` where $name is one of the options above.
# Default (empty) and fallback : cubic
_tcp_cong_alg=""
# You can pass a default set of kernel command line options here - example: "intel_pstate=passive nowatchdog amdgpu.ppfeaturemask=0xfffd7fff mitigations=off"
_custom_commandline="intel_pstate=passive split_lock_detect=off"
# Selection of Clearlinux patches
_clear_patches="true"
# Add OpenRGB compatibility for certain i2c controllers - https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/OpenRGB.patch
_openrgb="true"
#### ! WARNING [EXPERIMENTAL] Extra patches !!! (Arch Linux only — PKGBUILD) ####
# Apply optional aggressive patch (0014-aggressive-glitched-base.patch) for improved stuttering on some workloads by keeping more file caches in memory! - Kernel default is "false"
# ! REQUIRES _glitched_base="true" ! — This patch is built on top of the glitched-base/eevdf/cfs.
_aggressive_glitched_base=""
# Set to "true" to enable optimize misc additions (0014-aggressive-misc-additions.patch) - May contain temporary fixes pending upstream or distro-specific compatibility fixes - Kernel default is "false" - many thanks to @cachyos team for their hard work on this one!
_aggressive_misc_adds=""
# Apply optional CPU/scheduler misc optimizations (0014-aggressive-more-opts.patch) for improved performance and responsiveness, especially on high core count CPUs, by reducing some internal kernel timers and locks overhead.
# timer_slack_ns reduction, sched_move_task lock avoidance, schedutil dependency removal, split lock mitigation disable. - Kernel default is "false"
_aggressive_more_opts=""
#Apply optional Clang Polly support patchset (0014-clang-polly.patch) when available. - Kernel default is "false" - many thanks to @cachyos team for their hard work on this one!
_clang_polly=""
#### NVIDIA OPEN MODULE (Arch Linux only — PKGBUILD) ####
# Has no effect when using install.sh on Fedora, Ubuntu, Debian, etc.
# - Requires _numadisable="false" (NUMA enabled) for CUDA/NvEnc to function.
# - Only supported on kernels: 6.18, 7.0
# Options:
# "false" - Disable (default)
# "595.58.03" - Build with the current NVIDIA driver version
# "595.44.05" - Build with the Vulkan developer beta NVIDIA driver version
# "580.142" - Build with the older LTS NVIDIA driver version
# Aliases: "latest", "vulkan", "legacy"
_nvidia_pkg=""
### WARNING: [EXPERIMENTAL] Sign NVIDIA open kernel modules after building.
# NOTE:
# - When enabled, nvidia*.ko is signed using the kernel's module signing key.
# - Requires CONFIG_MODULE_SIG=y in your kernel config (default).
# - Useful together with module stripping to prevent unsigned-module taint messages.
# - Has no effect when _nvidia_pkg is "false" or empty.
# Set to "true" to enable, "false" or empty to disable (default: "false").
_nvidia_sign=""
### THIRD-PARTY KERNEL MODULES (Arch Linux only — PKGBUILD) ####
# Build additional out-of-tree modules into the main kernel package.
# Supported modules right now:
# - "nct6687" Nuvoton NCT6687-R hwmon driver
# - "it87" ITE/IT87xx hwmon driver
# - "v4l2loopback" Virtual video device driver
# Example:
# _module_pkg="nct6687 v4l2loopback"
_module_pkg=""
# Package layout for _module_pkg on Arch PKGBUILD builds.
# - "internal": install selected modules into the main kernel package
# - "external": create one extra package per selected module (linux*-<module>)
# - empty: defaults to "internal" when _module_pkg is set
# Ignored when _module_pkg is empty.
_module_extpkg="internal"
# Auto-load the selected modules at boot through /usr/lib/modules-load.d.
# This accepts a subset of the modules enabled in _module_pkg.
# Ignored when _module_pkg is empty.
# Example:
# _module_autoload="nct6687"
# v4l2loopback keeps its current autoload-by-default behavior for compatibility.
_module_autoload=""
# Optional modprobe options written to /usr/lib/modprobe.d for built modules.
# Examples:
# _module_options_nct6687="fan_config=msi_alt1 msi_fan_brute_force=1"
# _module_options_it87="ignore_resource_conflict=1"
#
# https://github.com/Fred78290/nct6687d
_module_options_nct6687=""
# https://github.com/frankcrawford/it87
_module_options_it87=""
# https://github.com/v4l2loopback/v4l2loopback
_module_options_v4l2loopback=""
# Sign selected third-party modules after building.
# Accepts:
# - "false" or empty: disable signing (default)
# - "true": sign all modules enabled in _module_pkg
# - a subset of the modules enabled in _module_pkg
# Ignored when _module_pkg is empty.
# Requires CONFIG_MODULE_SIG=y in your kernel config.
# Example:
# _module_sign="true"
# _module_sign="nct6687 it87"
_module_sign=""
# Optional git ref or alternative repository URL for supported third-party modules.
# Ignored when the matching module is not enabled in _module_pkg.
# Accepts:
# - Empty: use the default upstream repository at its default branch (default)
# - A branch name, tag, or commit hash: pin that ref within the default upstream repository
# - A full URL (https:// or git@...): clone from that URL instead (useful to switch to an active fork)
# When a URL is given, the default branch of the alternative repository is used.
# Examples:
# _module_git_nct6687="abc1234" # pin a specific commit
# _module_git_nct6687="https://github.com/otherfork/nct6687d.git" # use a different fork
_module_git_nct6687=""
_module_git_it87=""
_module_git_v4l2loopback=""
### WARNING: [EXPERIMENTAL] Install the kernel module signing key and certificate into the headers package.
# NOTE:
# - Allows signing out-of-tree modules manually after the build, e.g. for use with Secure Boot.
# - Has no effect if CONFIG_MODULE_SIG is not enabled in your kernel config.
# - See https://wiki.archlinux.org/title/Signed_kernel_modules
# SECURITY WARNING:
# - The private signing key is installed with permissions 400 (root-readable only).
# - Anyone with root or physical access to the machine can extract the key and sign arbitrary modules.
# - If security matters, it is strongly recommended to use full-disk encryption (e.g. LUKS)
# to protect the key against physical access.
_install_signing_keys=""
### WARNING: [EXPERIMENTAL] Build a separate kernel documentation package.
# NOTE:
# - Installs the kernel Documentation/ tree under /usr/lib/modules/<version>/build/Documentation.
# Set to "true" to enable, "false" or empty to disable (default: "false").
_docs_pkg="false"
#### SPESHUL OPTION ####
# Do not query nor fetch kernel sources from git remotes on the internet.
# Only use the kernel versions that have already been fetched in the $_kernel_source_folder
_offline=""
# [Arch only] If you want to bypass the stock naming scheme and enforce something else (example : "linux") - Useful for some bootloaders requiring manual entry editing on each release.
# !!! It will also change pkgname - If you don't explicitely need this, don't use it !!!
# Use _kernel_localversion instead on non-Arch based distros
_custom_pkgbase=""
# [non-Arch only] Kernel localversion. Putting it to "Mario" will make for example the kernel version be 5.7.0-tkg-Mario (given by uname -r)
# If left empty, it will use "-tkg-${_cpusched}${_compiler}" where "${_cpusched}" will be replaced by the user chosen scheduler, ${_compiler} will be replaced by "-llvm" if clang is used (nothing for GCC).
# Use _custom_pkgbase instead on Arch based distros
_kernel_localversion=""
# Set to your maximum number of CPUs (physical + logical cores) - Lower means less overhead - You can set it to "$(nproc)" to use the current host's CPU(s) core count, or leave empty to use default
# If you set this to a lower value than you have cores, some cores will be disabled
# Default Arch kernel value is 320
_NR_CPUS_value=""
# [non-Arch only] Install kernel after the building is done ?
# Options are: "yes", "no", "prompt"
_install_after_building="prompt"
# [non-Arch only] Use 'script' command for logging
_logging_use_script="yes"
# [Advanced] Extra flags to pass to the compiler, for C files
# Important:
# - If you encounter issues, _ONLY_ report a bug if you have tried a kernel with this variable left blank
# - Do _NOT_ activate SIMD instructions (i.e do not add e.g. "-mavx") or it will break your system
KCFLAGS=""
# [Advanced] Extra flags to pass to the compiler, for C++ files
# Important:
# - If you encounter issues, _ONLY_ report a bug if you have tried a kernel with this variable left blank
# - Do _NOT_ activate SIMD instructions (i.e do not add e.g. "-mavx") or it will break your system
KCPPFLAGS=""
# [Advanced] Extra flags to pass to the Rust compiler (rustc)
# Important:
# - If you encounter issues, _ONLY_ report a bug if you have tried a kernel with this variable left blank
KRUSTFLAGS=""
#### LEGACY OPTIONS ####
# Upstreamed version of Fsync from Linux 5.16 for previous kernel versions - https://github.com/andrealmeid/futex_waitv_patches
# ! Only affect 5.13, 5.14 and 5.15 kernel branches. Safely ignored for 5.16 or newer !
_fsync_backport="true"
# Fsync legacy, known as FUTEX_WAIT_MULTIPLE (opcode 31) - previous version of fsync required for Valve Proton 4.11, 5.0 and 5.13 - https://steamcommunity.com/games/221410/announcements/detail/2957094910196249305
_fsync_legacy="true"
# Set to "true" to enable support for futex2, a DEPRECATED interface that can be used by proton-tkg and proton 5.13 experimental through Fsync - Can be enabled alongside fsync legacy to use it as a fallback
# https://gitlab.collabora.com/tonyk/linux/-/tree/futex2-dev
# ! Only affect 5.10-5.14 kernel branches. Safely ignored for 5.15 or newer !
# ! required _fsync_backport="false" !
_fsync_futex2="false"
# Set to "true" to add back missing symbol for AES-NI/AVX support on ZFS - This is a legacy option that can be ignored on 5.10+ kernels - https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions.patch
_zfsfix="true"
# MuQSS only - CPU scheduler runqueue sharing - No sharing (RQ_NONE), SMT (hyperthread) siblings (RQ_SMT), Multicore siblings (RQ_MC), Symmetric Multi-Processing (RQ_SMP), NUMA (RQ_ALL)
# Valid values are "none", "smt", "mc", "mc-llc"(for zen), "smp", "all" - Kernel default is "smt"
_runqueue_sharing=""
# MuQSS only - Make IRQ threading compulsory (FORCE_IRQ_THREADING) - Default is "false"
_irq_threading="false"
# Set to "true" to add multi-generational LRU framework support for improved memory pressure handling
# Note:
# - For kernel >= 5.18, Upstream for kernel >= 6.1
# - Conflicts with bcachefs for linux <= 6.0
# - More information https://lore.kernel.org/lkml/20220706220022.968789-1-yuzhao@google.com/
# - Older kernel versions might have a patch available in the community-patches repo
_mglru="true"
# Set to "true" to enable builtin support for ntsync, an experimental replacement for esync - requires patched wine - https://repo.or.cz/linux/zf.git/shortlog/refs/heads/ntsync5
# ! Can't be used on multiple kernels installed side-by-side, which will require https://aur.archlinux.org/packages/ntsync-dkms instead of this option !
# ! No effect on 6.14+ !
_ntsync="false"
#### USER PATCHES ####
# community patches - add patches (separated by a space) of your choice by name from the community-patches dir
# example: _community_patches="clear_nack_in_tend_isr.myrevert ffb_regression_fix.mypatch 0008-drm-amd-powerplay-force-the-trim-of-the-mclk-dpm-levels-if-OD-is-enabled.mypatch"
_community_patches=""
# You can use your own patches by putting them in a subfolder called linux<VERSION><PATCHLEVEL>-tkg-userpatches (see README.md for more info) next to the PKGBUILD and giving them the .mypatch extension.
# You can also revert patches by putting them in that same folder and giving them the .myrevert extension.
# Also, userpatches variable below must be set to true for the above to work.
_user_patches="true"
# Apply all user patches without confirmation - !!! NOT RECOMMENDED !!!
_user_patches_no_confirm="false"
#### CONFIG FRAGMENTS ####
# You can use your own kernel config fragments by putting them in the same folder as the PKGBUILD and giving them the .myfrag extension.
# Also, the config fragments variable below must be set to true for the above to work.
_config_fragments="true"
# Apply all config fragments without confirmation - !!! NOT RECOMMENDED !!!
_config_fragments_no_confirm="false"