[PC-BSD Commits] r5698 - pcbsd/trunk/XGUISource/resources/templates/scripts

svn at pcbsd.org svn at pcbsd.org
Mon Dec 28 09:22:42 PST 2009


Author: kris
Date: 2009-12-28 09:22:42 -0800 (Mon, 28 Dec 2009)
New Revision: 5698

Modified:
   pcbsd/trunk/XGUISource/resources/templates/scripts/nvidia.sh
Log:

Fixed loading of 32bit compat drivers when using nvidia on amd64



Modified: pcbsd/trunk/XGUISource/resources/templates/scripts/nvidia.sh
===================================================================
--- pcbsd/trunk/XGUISource/resources/templates/scripts/nvidia.sh	2009-12-28 16:53:28 UTC (rev 5697)
+++ pcbsd/trunk/XGUISource/resources/templates/scripts/nvidia.sh	2009-12-28 17:22:42 UTC (rev 5698)
@@ -4,6 +4,9 @@
 # The selected driver version is set at $1
 DRIVERVER="${1}"
 
+# Get the system arch
+ARCH="`uname -m`"
+
 # Set some options for amd64 to include 32bit driver as well
 if [ "$ARCH" = "amd64" ]
 then
@@ -23,9 +26,6 @@
   PKGDIR="/usr/PCBSD/packages/i386"
 fi
 
-# Get the system arch
-ARCH="`uname -m`"
-
 #Check if the driver is already loaded
 kldstat | grep nvidia >/dev/null 2>/dev/null
 if [ "${?}" = "0" ]
@@ -46,7 +46,7 @@
   PKG_DBDIR="${DBDIR64BIT}" ; export PKG_DBDIR
   PKGLIST="/tmp/.nvidia-inslist"
   pkg_delete -p ${PREFIX64BIT} -f nvidia-driver* >/dev/null 2>/dev/null
-  pkg_add -M -t /usr/.nvidia32-tmp.XXXXX ${PKGDIR32}/${PKGNAME}*.tbz >${PKGLIST}
+  pkg_add -M -t /usr/.nvidia32-tmp.XXXXX ${PKGDIR32}/${PKGNAME}.tbz >${PKGLIST}
   rm ${PKGLIST}.good
 
   # Cleanup the package list now to only extract our local32 stuff
@@ -81,10 +81,11 @@
   done <${PKGLIST}
 
   # Add the fixed nvidia driver
+  echo "Adding NVIDIA 32bit compat files..."
   cat ${PKGLIST}.good | pkg_add -S -f >/dev/null 2>/dev/null
 
   PKG_DBDIR="" ; export PKG_DBDIR
-  /etc/rc.d/ldconfig restart
+  /etc/rc.d/ldconfig restart >/dev/null 2>/dev/null
 
   # Cleanup
   rm -rf /usr/.nvidia32-tmp.*
@@ -104,7 +105,7 @@
 rm /boot/modules/nvidia.ko
 
 # Add the nvidia driver to the system
-pkg_add -f ${PKGDIR}/${PKGNAME}*.tbz
+pkg_add -f ${PKGDIR}/${PKGNAME}.tbz
 pkg_add -f ${PKGDIR}/nvidia-settings*.tbz
 
 #Check if the driver is already loaded
@@ -120,16 +121,3 @@
 then
   echo "nvidia_load=\"YES\"" >> /boot/loader.conf
 fi
-
-# Make sure we disable built-in AGP
-cat /boot/device.hints | grep -v "hint.agp.0.disabled" >/tmp/.device.hints
-mv /tmp/.device.hints /boot/device.hints
-echo "hint.agp.0.disabled=\"1\"" >> /boot/device.hints
-
-ls /dev/nvidiactl* >/dev/null
-if [  "$?" != "0" ]
-then
- echo "Rebooting to load nvidia kernel module..."
- ( shutdown -r now )&
- sleep 500
-fi



More information about the Commits mailing list