nvidia-all: Add an option to override kernel target.

This commit is contained in:
Tk-Glitch
2020-04-01 22:09:35 +02:00
parent 462ce7c143
commit 2b5f946d75
2 changed files with 8 additions and 1 deletions

View File

@@ -291,7 +291,11 @@ DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf
# Loop kernels (4.15.0-1-ARCH, 4.14.5-1-ck, ...)
local -a _kernels
mapfile -t _kernels < <(find /usr/lib/modules/*/build/version -exec cat {} +)
if [ -n "$_kerneloverride" ]; then
_kernels="$_kerneloverride"
else
mapfile -t _kernels < <(find /usr/lib/modules/*/build/version -exec cat {} +)
fi
for _kernel in "${_kernels[@]}"; do
# Use separate source directories
cp -r kernel kernel-$_kernel

View File

@@ -11,6 +11,9 @@ _EXT_CONFIG_PATH=~/.config/frogminer/nvidia-all.cfg
# Example: CUSTOM_GCC_PATH="/home/frog/PKGBUILDS/mostlyportable-gcc/gcc-mostlyportable-9.2.0"
CUSTOM_GCC_PATH=""
# Allows enforcing kernel patches application for a target kernel, independently of currently installed ones (example: "5.5")"
_kerneloverride=""
# Put the built packages in a versioned dir in the same folder as the nvidia-all PKGBUILD on exit - Will fail to install if running makepkg with -i option
_local_package_storing="false"