diff options
author | Bastian Wissler | 2009-01-22 15:55:52 +0100 |
---|---|---|
committer | Bastian Wissler | 2009-01-22 15:55:52 +0100 |
commit | 49014d364950e5930a7218e324fba24bc5525593 (patch) | |
tree | 9f650779d14e2c6e937e9ce07b1efacc047bb0a9 /os-plugins/plugins | |
parent | If vmplayer is still to noisy we should try the following two options (diff) | |
download | core-49014d364950e5930a7218e324fba24bc5525593.tar.gz core-49014d364950e5930a7218e324fba24bc5525593.tar.xz core-49014d364950e5930a7218e324fba24bc5525593.zip |
xserver plugin fixes:
* various fixes for suse-11.0
* various fixes for ubuntu-8.10 (thanks to Sebastian Schmelzer)
* rewritten linkage Module (now in Perl)
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2515 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins')
-rw-r--r-- | os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm | 141 | ||||
-rw-r--r-- | os-plugins/plugins/xserver/XX_xserver.sh | 98 | ||||
-rwxr-xr-x | os-plugins/plugins/xserver/files/suse-gfx-install.sh | 61 | ||||
-rwxr-xr-x | os-plugins/plugins/xserver/files/ubuntu-8.10-gfx-install.sh | 10 |
4 files changed, 219 insertions, 91 deletions
diff --git a/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm b/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm index ee009128..32708740 100644 --- a/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm +++ b/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm @@ -20,6 +20,8 @@ use base qw(OpenSLX::OSPlugin::Base); use OpenSLX::Basics; use OpenSLX::Utils; +use File::Basename; + ################################################################################ # if you have any questions regarding the concept of OS-plugins and their # implementation, please drop a mail to: ot@openslx.com, or join the IRC-channel @@ -223,24 +225,36 @@ sub installationPhase my $pluginFilesPath = "$openslxBasePath/lib/plugins/$self->{'name'}/files"; my $installationPath = "$pluginRepoPath/"; + my $binDrivers = 0; + # TODO: handle it better. We know the distribution in stage1 if ($attrs->{'xserver::nvidia'} == 1 || $attrs->{'xserver::ati'} == 1 ) { copyFile("$pluginFilesPath/ubuntu-gfx-install.sh", "$installationPath"); copyFile("$pluginFilesPath/suse-gfx-install.sh", "$installationPath"); copyFile("$pluginFilesPath/ubuntu-8.10-gfx-install.sh", "$installationPath"); - copyFile("$pluginFilesPath/linkage.sh", "$installationPath"); + #copyFile("$pluginFilesPath/linkage.sh", "$installationPath"); # be on the safe side (BASH) - Ubuntu sets some crazy stupid 'dash' shell otherwise - system("/bin/bash /opt/openslx/plugin-repo/$self->{'name'}/linkage.sh clean"); + #system("/bin/bash /opt/openslx/plugin-repo/$self->{'name'}/linkage.sh clean"); + + # removeLinks is to remove Links to the files + # otherwise some wrong files are created + $self->removeLinks(); + $binDrivers = 1; } if ($attrs->{'xserver::ati'} == 1) { copyFile("$pluginFilesPath/ati-install.sh", "$installationPath"); system("/bin/bash /opt/openslx/plugin-repo/$self->{'name'}/ati-install.sh"); - system("/bin/bash /opt/openslx/plugin-repo/$self->{'name'}/linkage.sh ati"); + #system("/bin/bash /opt/openslx/plugin-repo/$self->{'name'}/linkage.sh ati"); } if ($attrs->{'xserver::nvidia'} == 1) { copyFile("$pluginFilesPath/nvidia-install.sh", "$installationPath"); system("/bin/bash /opt/openslx/plugin-repo/$self->{'name'}/nvidia-install.sh"); - system("/bin/bash /opt/openslx/plugin-repo/$self->{'name'}/linkage.sh nvidia"); + #system("/bin/bash /opt/openslx/plugin-repo/$self->{'name'}/linkage.sh nvidia"); + } + + if ($binDrivers == 1) { + $self->linkLibs($info); + `chmod -R 755 $installationPath` } # Some plugins have to copy files from their plugin folder into the @@ -279,6 +293,125 @@ sub removalPhase # As this method is being executed while chrooted into the vendor-OS, # this path is relative to that root (i.e. directly usable). + + $self->removeLinks(); + + return; +} + + +sub linkLibs +{ + my $self = shift; + my $info = shift; + + my $pluginRepoPath = $info->{'plugin-repo-path'}; + my $divertFolder = "/var/X11R6/lib/"; + my $attrs = $info->{'plugin-attrs'}; + + my @libList; + unless( $attrs->{'xserver::nvidia'} == 1 || + $attrs->{'xserver::ati'} == 1 ) + { + return; + } + + my $command; + if( $attrs->{'xserver::nvidia'} == 1 ) { + $command = "find $pluginRepoPath\/nvidia ". + "-wholename \"*/xorg/modules\" -prune ". + "-a '!' -type d -o -name '*so*'"; + @libList = `$command`; + } + if( $attrs->{'xserver::ati'} == 1 ) { + $command = "find $pluginRepoPath/ati -wholename ". + "\"*/xorg/modules\" -prune ". + "-a '!' -type d -o -name '*so*'"; + push @libList, `$command` ; + } + + my $libname= ''; + my $divname= ''; + my $oldlib = ''; + my $dirname = ''; + for my $lib (@libList) { + chomp($lib); + if($lib =~ /.*(\/usr\/.*?lib\/.*?)$/) { + # oldlib is the MESA lib + $oldlib = $1; + $dirname = dirname($oldlib); + if( -e $oldlib ) { + $oldlib =~ /\/usr\/.*?lib\/(.*)/; + # libname is the Name of MESA lib + $libname = $1; + + # we have to move the original (MESA) file + # and symlink to a diversion folder + $divname = $libname; + + $divname =~ s/\.so/_MESA.so/; + + # move only if both are real files !! + if( -f $oldlib && ! -l $oldlib && ! -l $lib ) + { + rename($oldlib, $dirname."/".$divname); + symlink($divertFolder.$libname, $oldlib); + #print "DEBUG: symlink 1 $divertFolder.$libname, $oldlib\n"; + } + elsif( -l $oldlib && -l $lib ) + { + my $tmp1 = readlink $oldlib; + my $tmp2 = readlink $lib; + if( $tmp1 ne $tmp2 ) + { + # here the links are pointing to different files - + # as in libGLcore.so.1 in nvidia drivers + unlink($oldlib); + symlink($divertFolder.$libname, $oldlib); + } + } + } + else { + # this file does not exist + # check for not existing folders + unless( -d $dirname ) { + `mkdir -p $dirname`; + } + # just link + symlink( $lib, $oldlib ); + #print "DEBUG: symlink 2 $lib, $oldlib\n"; + } + } + } + +} + + +sub removeLinks +{ + my $instFolders = "/usr/lib /usr/X11R6/lib"; + my $divertFolder = "/var/X11R6/lib"; + my $pluginFolder = "/opt/openslx/plugin-repo/xserver"; + + # get all previously installed links + my @linkedFiles = + `find $instFolders -lname "$divertFolder*" -o -lname "$pluginFolder*" `; + + + # also remove _MESA backup files + my @backupFiles = + `find $instFolders -name "*_MESA.so*"`; + my $origfile = ''; + for my $file (@backupFiles) { + $origfile = $file; + $file =~ s/_MESA//; + rename($origfile,$file); + } + unlink "/usr/lib/libGL.so", "/usr/lib/libGL.so.1"; + symlink "/usr/lib/libGL.so.1.2", "/usr/lib/libGL.so.1"; + symlink "/usr/lib/libGL.so.1.2", "/usr/lib/libGL.so"; + + my $number = unlink @linkedFiles; return; } diff --git a/os-plugins/plugins/xserver/XX_xserver.sh b/os-plugins/plugins/xserver/XX_xserver.sh index 10960d5a..5b2f3815 100644 --- a/os-plugins/plugins/xserver/XX_xserver.sh +++ b/os-plugins/plugins/xserver/XX_xserver.sh @@ -36,7 +36,8 @@ testmkd ${glliblinks} if [ -e /initramfs/plugin-conf/xserver.conf -a \ ! -f /rootfs/etc/X11/xorg.conf ]; then . /initramfs/plugin-conf/xserver.conf - + # keyboard setup + localization "${country}" # do not start any configuration if the admin provided a preconfigured # xorg.conf in /rootfs/etc/X11/xorg.conf if [ $xserver_active -ne 0 -a ! -f /rootfs/${xfc#/mnt} ]; then @@ -45,12 +46,12 @@ if [ -e /initramfs/plugin-conf/xserver.conf -a \ sed "s/.*v4 Server Module: //") # proprietary ATI/NVidia modules listed a different way with hwinfo [ -z "$xmodule" ] || error "${hcfg_hwsetup}" nonfatal - + ###################################################################### # begin proprietary drivers section (xorg.conf part) ###################################################################### + set -x - waitfor /etc/hwinfo.data 10000 if [ $(grep -i -m 1 'Module: fglrx' \ /etc/hwinfo.data | wc -l) -ge "1" -a $xserver_prefnongpl -eq 1 ] then @@ -102,9 +103,9 @@ ${PLUGIN_ROOTFS}/usr/X11R6/lib/modules/\," ###################################################################### - echo -e "# ${xfc#/mnt*}\n# autogenerated X hardware configuration by the \ -xserver plugin in OpenSLX stage3\n# DO NOT EDIT THIS FILE BUT THE PLUGIN \ -INSTEAD" > $xfc + echo -e "# $xfc\n# autogenerated X hardware configuration by the xserver \ +plugin in OpenSLX stage3\n# DO NOT EDIT THIS FILE BUT THE PLUGIN INSTEAD" \ + > $xfc echo ' Section "Files" ModulePath "/usr/lib/xorg/modules/" @@ -128,12 +129,13 @@ Section "Module" Load "dri" EndSection Section "InputDevice" - Identifier "Generic Keyboard" + Identifier "Generic Keyboard" Driver "kbd" Option "CoreKeyboard" Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "us" + Option "XkbVariant" "nodeadkeys" EndSection Section "InputDevice" Identifier "Generic Mouse" @@ -144,6 +146,27 @@ Section "InputDevice" # Option "Emulate3Buttons" "true" Option "CorePointer" EndSection +Section "InputDevice" + Driver "wacom" + Identifier "Stylus" + Option "Device" "/dev/input/wacom" + Option "Type" "stylus" + Option "ForceDevice" "ISDV4" # Tablet PC ONLY +EndSection +Section "InputDevice" + Driver "wacom" + Identifier "Eraser" + Option "Device" "/dev/input/wacom" + Option "Type" "eraser" + Option "ForceDevice" "ISDV4" # Tablet PC ONLY +EndSection +Section "InputDevice" + Driver "wacom" + Identifier "Cursor" + Option "Device" "/dev/input/wacom" + Option "Type" "cursor" + Option "ForceDevice" "ISDV4" # Tablet PC ONLY +EndSection Section "Device" Identifier "Generic Video Card" Driver "vesa" @@ -171,23 +194,20 @@ Section "ServerLayout" Screen "Default Screen" InputDevice "Generic Keyboard" InputDevice "Generic Mouse" + InputDevice "Stylus" "SendCoreEvents" + InputDevice "Cursor" "SendCoreEvents" + InputDevice "Eraser" "SendCoreEvents" EndSection Section "DRI" Mode 0666 -EndSection' >> $xfc - # keyboard setup (fill XKEYBOARD) - localization "${country}" +EndSection +' >> $xfc # if no module was detected, stick to vesa module if [ -n "$xmodule" ] ; then sed "s/vesa/$xmodule/;s/\"us\"/\"${XKEYBOARD}\"/" -i $xfc else sed "s/\"us\"/\"${XKEYBOARD}\"/" -i $xfc fi - # set nodeadkeys for special layouts - if [ ${XKEYBOARD} = "de" ]; then - sed -e '/\"XkbLayout\"/a\\ \ Option "XkbVariant" "nodeadkeys"' \ - -i $xfc - fi # these directories might be distro specific for file in /var/lib/xkb/compiled ; do testmkd /mnt/${file} @@ -247,45 +267,9 @@ a\ \ InputDevice\ \ "Synaptics TP"\ \ \ \ \ \ "SendCoreEvents" ln -sf /usr/lib/libGL_MESA.so.1.2 /mnt/var/X11R6/lib/libGL.so.1.2 fi fi - - # check if tablet hardware available, read device information from file - if [ -e /etc/tablet.conf ]; then - . /etc/tablet.conf - echo -e 'Section "InputDevice" - Driver "wacom" - Identifier "Stylus" - Option "Device" "/dev/input/wacom" - Option "Type" "stylus" - Option "ForceDevice" "ISDV4" # Tablet PC ONLY -EndSection -Section "InputDevice" - Driver "wacom" - Identifier "Pad" - Option "Device" "/dev/input/wacom" - Option "Type" "pad" - Option "ForceDevice" "ISDV4" # Tablet PC ONLY -EndSection -Section "InputDevice" - Driver "wacom" - Identifier "Eraser" - Option "Device" "/dev/input/wacom" - Option "Type" "eraser" - Option "ForceDevice" "ISDV4" # Tablet PC ONLY -EndSection -Section "InputDevice" - Driver "wacom" - Identifier "Cursor" - Option "Device" "/dev/input/wacom" - Option "Type" "cursor" - Option "ForceDevice" "ISDV4" # Tablet PC ONLY -EndSection' >> ${xfc} - sed -e "s,/dev/input/wacom,/dev/${wacomdev}," \ - -e '/e \"Generic Mouse\"/a\\ \ InputDevice "Stylus" "SendCoreEvents"' \ - -e '/e \"Generic Mouse\"/a\\ \ InputDevice "Pad" "SendCoreEvents"' \ - -e '/e \"Generic Mouse\"/a\\ \ InputDevice "Cursor" "SendCoreEvents"' \ - -e '/e \"Generic Mouse\"/a\\ \ InputDevice "Eraser" "SendCoreEvents"' \ - -i ${xfc} - fi + + + [ $DEBUGLEVEL -gt 0 ] && echo "done with 'xserver' os-plugin ..."; # some configurations produce no proper screen resolution without # Horizsync and Vertrefresh set (more enhancements might be needed for @@ -319,11 +303,5 @@ EndSection' >> ${xfc} # run distro specific generated stage3 script [ -e /mnt/opt/openslx/plugin-repo/xserver/xserver.sh ] && \ . /mnt/opt/openslx/plugin-repo/xserver/xserver.sh - - [ $DEBUGLEVEL -gt 0 ] && echo "done with 'xserver' os-plugin ..." - fi -elif [ ! -e /initramfs/plugin-conf/xserver.conf ]; then - [ $DEBUGLEVEL -gt 2 ] && \ - echo "No configuration file found for xserver plugin." fi diff --git a/os-plugins/plugins/xserver/files/suse-gfx-install.sh b/os-plugins/plugins/xserver/files/suse-gfx-install.sh index e50aa277..dea8c017 100755 --- a/os-plugins/plugins/xserver/files/suse-gfx-install.sh +++ b/os-plugins/plugins/xserver/files/suse-gfx-install.sh @@ -4,7 +4,9 @@ # Currently suse 10.2 and 11.0 is supported! # -BUSYBOX="/mnt/opt/openslx/share/busybox/busybox" +# not right any more - removed from script +# is there any busybox in this environment +#BUSYBOX="/mnt/opt/openslx//busybox/busybox" cd /opt/openslx/plugin-repo/xserver @@ -51,7 +53,7 @@ if [ "$1" = "nvidia" ]; then ftp://download.nvidia.com/opensuse/10.2/i586/nvidia-gfxG01-kmp-default-173.14.12_2.6.18.8_0.10-0.1.i586.rpm \ ftp://download.nvidia.com/opensuse/10.2/i586/x11-video-nvidiaG01-173.14.12-0.1.i586.rpm - ${BUSYBOX} rpm2cpio x11-video-nvidiaG01-173.14.12-0.1.i586.rpm | ${BUSYBOX} cpio -idv > /dev/null + rpm2cpio x11-video-nvidiaG01-173.14.12-0.1.i586.rpm | cpio -idv > /dev/null rm -rf ./usr/include # Todo: recheck after development progress, perhaps an nvidia x11 tool needs /usr/share/pixmaps @@ -61,18 +63,26 @@ if [ "$1" = "nvidia" ]; then mv ./usr .. # TODO: matching kernel problem... our openslx system picks -bigsmp - unintentionally! - ${BUSYBOX} rpm2cpio nvidia-gfxG01-kmp-bigsmp-173.14.12_2.6.18.8_0.10-0.1.i586.rpm | ${BUSYBOX} cpio -idv > /dev/null - #${BUSYBOX} rpm2cpio nvidia-gfxG01-kmp-default-173.14.12_2.6.18.8_0.10-0.1.i586.rpm | ${BUSYBOX} cpio -idv + rpm2cpio nvidia-gfxG01-kmp-bigsmp-173.14.12_2.6.18.8_0.10-0.1.i586.rpm | cpio -idv > /dev/null + #rpm2cpio nvidia-gfxG01-kmp-default-173.14.12_2.6.18.8_0.10-0.1.i586.rpm | cpio -idv #TODO: take care about the kernel issue. Find won't work with two equal kernelmodules in lib/... find lib/ -name "*.ko" -exec mv {} ../modules \; fi + ############################################################ + ## SUSE 10.2 Section ## + ############################################################ if [ "11.0" = "`cat /etc/SuSE-release | tail -n1 | cut -d' ' -f3`" ]; then echo " * Downloading nvidia rpm packages... this could take some time..." # add repository for nvidia drivers zypper --no-gpg-checks addrepo http://download.nvidia.com/opensuse/11.0/ NVIDIA > /dev/null 2>&1 # get URLs by virtually installing nvidia-OpenGL driver - zypper --no-gpg-checks -n -vv install -D x11-video-nvidiaG01 2>&1 > logfile + zypper --no-gpg-checks -n -vv install -D x11-video-nvidiaG01 > logfile 2>&1 + + # zypper refresh is requested if something is not found + if [ "1" -le "$(cat logfile | grep -o "zypper refresh"| wc -l)" ]; then + zypper refresh >/dev/null 2>&1 + fi # take unique urls from logfile URLS=$(cat logfile | grep -P -o "http://.*?rpm " | sort -u | xargs) @@ -82,11 +92,12 @@ if [ "$1" = "nvidia" ]; then wget ${RPM} > /dev/null 2>&1 fi # We use rpm2cpio from suse to extract - rpm2cpio ${RNAME} | ${BUSYBOX} cpio -id > /dev/null 2>&1 + rpm2cpio ${RNAME} | cpio -id > /dev/null 2>&1 done mv ./usr/X11R6/lib/* ./usr/lib/ mv ./usr .. find lib/ -name "*.ko" -exec mv {} ../modules \; + # echo "DEBUG xserver SUSE-GFX-INSTALL.SH NVIDIA" # /bin/bash # echo "END DEBUG" @@ -118,7 +129,13 @@ if [ "$1" = "ati" ]; then # add repository for nvidia drivers zypper --no-gpg-checks addrepo http://www2.ati.com/suse/11.0/ ATI > /dev/null 2>&1 # get URLs by virtually installing fglrx-OpenGL driver - zypper --no-gpg-checks -n -vv install -D ati-fglrxG01-kmp${KSUFFIX} x11-video-fglrxG01 > logfile + zypper --no-gpg-checks -n -vv install -D ati-fglrxG01-kmp${KSUFFIX} \ + x11-video-fglrxG01 > logfile 2>&1 + + # zypper refresh is requested if something is not found + if [ "1" -le "$(cat logfile | grep -o "zypper refresh" | wc -l)" ]; then + zypper refresh >/dev/null 2>&1 + fi # take unique urls from logfile URLS=$(cat logfile | grep -P -o "http://.*?rpm " | grep fglrx | sort -u | xargs) @@ -128,22 +145,25 @@ if [ "$1" = "ati" ]; then wget ${RPM} > /dev/null 2>&1 fi # We use rpm2cpio from suse to extract -> propably new rpm version - rpm2cpio ${RNAME} | ${BUSYBOX} cpio -id > /dev/null + rpm2cpio ${RNAME} | cpio -id > /dev/null 2>&1 done + mv ./usr/X11R6/lib/* ./usr/lib/ - # fix for fglrx_dri.so - mkdir -p ./usr/X11R6/lib/modules/dri - ln -s ../../../../lib/dri/fglrx_dri.so \ - ./usr/X11R6/lib/modules/dri/fglrx_dri.so + # fix for fglrx_dri.so - TODO: Why is this in here? +# mkdir -p ./usr/X11R6/lib/modules/dri +# ln -s ../../../../lib/dri/fglrx_dri.so \ +# ./usr/X11R6/lib/modules/dri/fglrx_dri.so mv ./usr .. mv ./etc .. + find lib/ -name "*.ko" -exec mv {} ../modules \; # echo "DEBUG xserver SUSE-GFX-INSTALL.SH ATI" # /bin/bash # echo "END DEBUG" else - - ## SUSE 10.2 Section ## + ############################################################ + ## SUSE 10.2 Section ## + ############################################################ #TODO: licence information... even suse requires an accept BASEURL="http://www2.ati.com/suse/$(lsb_release -r|sed 's/^.*\t//')" @@ -159,8 +179,7 @@ if [ "$1" = "ati" ]; then wget -c -q ${BASEURL}/${i} done - # TODO: move output to /dev/null when main development is over - ${BUSYBOX} rpm2cpio $(find . -name "x11*")| ${BUSYBOX} cpio -idv > /dev/null + rpm2cpio $(find . -name "x11*")| cpio -idv > /dev/null 2>&1 rm -rf ./usr/include rm -rf ./usr/lib/pm-utils @@ -172,13 +191,9 @@ if [ "$1" = "ati" ]; then mv ./usr .. # TODO: matching kernel problem... our openslx system picks -bigsmp - unintentionally! - if [ "10.2" = "$(lsb_release -r|sed 's/^.*\t//')" ]; then - ${BUSYBOX} rpm2cpio $(find . -name "ati-fglrx*bigsmp*") | ${BUSYBOX} cpio -idv > /dev/null - fi - if [ "11.0" = "$(lsb_release -r|sed 's/^.*\t//')" ]; then - ${BUSYBOX} rpm2cpio $(find . -name "ati-fglrx*default*") | ${BUSYBOX} cpio -idv > /dev/null - fi - #${BUSYBOX} rpm2cpio nvidia-gfxG01-kmp-default-173.14.12_2.6.18.8_0.10-0.1.i586.rpm | ${BUSYBOX} cpio -idv + rpm2cpio $(find . -name "ati-fglrx*bigsmp*") | cpio -idv > /dev/null + + #rpm2cpio nvidia-gfxG01-kmp-default-173.14.12_2.6.18.8_0.10-0.1.i586.rpm | cpio -idv #TODO: take care about the kernel issue. Find won't work with two equal kernelmodules in lib/... find lib/ -name "*.ko" -exec mv {} ../modules \; fi diff --git a/os-plugins/plugins/xserver/files/ubuntu-8.10-gfx-install.sh b/os-plugins/plugins/xserver/files/ubuntu-8.10-gfx-install.sh index 68212ecf..b80348eb 100755 --- a/os-plugins/plugins/xserver/files/ubuntu-8.10-gfx-install.sh +++ b/os-plugins/plugins/xserver/files/ubuntu-8.10-gfx-install.sh @@ -79,7 +79,7 @@ case ${TARGET} in --kernelsourcedir /usr/src/linux-headers-${KVER}/ \ --no-prepare-kernel \ --no-clean-kernel \ - build \ + rebuild \ > /tmp/dkms.log 2>&1 if [ $? -eq 0 ]; then echo "ok" @@ -92,7 +92,8 @@ case ${TARGET} in exit 1 fi - FGLRX_MODULE_PATH=$(find ${FGLRX_DKMS_DIR}/${KVER}/ -name fglrx.ko) + FGLRX_MODULE_PATH=$(find ${FGLRX_DKMS_DIR}/${KVER}/ -name fglrx.ko \ + | tail -n1 ) cp ${FGLRX_MODULE_PATH} ${PLUGIN_FOLDER}/ati/modules/fglrx.ko @@ -174,7 +175,7 @@ case ${TARGET} in --kernelsourcedir /usr/src/linux-headers-${KVER}/ \ --no-prepare-kernel \ --no-clean-kernel \ - build \ + rebuild \ > /tmp/dkms.log 2>&1 if [ $? -eq 0 ]; then echo "ok" @@ -187,7 +188,8 @@ case ${TARGET} in exit 1 fi - NVIDIA_MODULE_PATH=$(find ${NVIDIA_DKMS_DIR}/${KVER}/ -name nvidia.ko) + NVIDIA_MODULE_PATH=$(find ${NVIDIA_DKMS_DIR}/${KVER}/ -name \ + nvidia.ko | tail -n 1) cp ${NVIDIA_MODULE_PATH} ${PLUGIN_FOLDER}/nvidia/modules/nvidia.ko |