forked from NVIDIA/zypper-packaging-nvidia-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkmp-post-old.sh
39 lines (35 loc) · 1.21 KB
/
kmp-post-old.sh
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
%ifarch %ix86
arch=i386
%endif
%ifarch x86_64
arch=x86_64
%endif
flavor=%1
kver=$(make -sC /usr/src/linux-obj/$arch/$flavor kernelrelease)
make -C /usr/src/linux-obj/$arch/$flavor \
modules \
M=/usr/src/kernel-modules/nvidia-%{-v*}-$flavor \
SYSSRC=/lib/modules/$kver/source \
SYSOUT=/usr/src/linux-obj/$arch/$flavor
pushd /usr/src/kernel-modules/nvidia-%{-v*}-$flavor
make -f Makefile \
nv-linux.o \
SYSSRC=/lib/modules/$kver/source \
SYSOUT=/usr/src/linux-obj/$arch/$flavor
popd
install -m 755 -d /lib/modules/%2/updates
install -m 644 /usr/src/kernel-modules/nvidia-%{-v*}-$flavor/nvidia.ko \
/lib/modules/%2/updates
depmod %2
%{_sbindir}/update-alternatives --install /usr/lib/nvidia/alternate-install-present alternate-install-present /usr/lib/nvidia/alternate-install-present-$flavor 11
echo
echo "Modprobe blacklist files have been created at /etc/modprobe.d to \
prevent Nouveau from loading. This can be reverted by deleting \
/etc/modprobe.d/nvidia-*.conf."
echo
echo "*** Reboot your computer and verify that the NVIDIA graphics driver \
can be loaded. ***"
echo
# Let all initrds get generated by regenerate-initrd-posttrans
mkdir -p /run/regenerate-initrd
touch /run/regenerate-initrd/all