I was able to build for Manjaro 20.2 with the 5.10.2 kernel with the following changes to the PKGBUILD file. First adapt the kernel variables:
# default is 'linux' substitute custom name here
-_kernelname=linux
-_kernver="$(</usr/src/$_kernelname/version)"
-_extradir="/usr/lib/modules/$_kernver/extramodules"
+_kernelname=`uname -r`
+_kernver="$(</usr/lib/modules/$_kernelname/extramodules/version)"
+_extradir="/usr/lib/modules/$_kernelname/extramodules"
And after that, change the paths in the build() function:
build() {
cd "${_pkg}/kernel"
- make SYSSRC="/usr/src/$_kernelname" module
+ make SYSSRC="/usr/lib/modules/$_kernelname/build" module
cd uvm
- make SYSSRC="/usr/src/$_kernelname" module
+ make SYSSRC="/usr/lib/modules/$_kernelname/build" module
}
After these changes, build it with: makepkg -s
Pinned Comments
JerryXiao commented on 2022-10-13 03:51 (UTC) (edited on 2022-10-14 02:44 (UTC) by JerryXiao)
For testing users, contributors: check out https://github.com/archlinux-jerry/nvidia-340xx
Warning: force push may happen to match the aur tree