summaryrefslogtreecommitdiffstats
path: root/os-plugins
diff options
context:
space:
mode:
authorSebastian Schmelzer2009-01-20 15:01:52 +0100
committerSebastian Schmelzer2009-01-20 15:01:52 +0100
commit9da7ae36f32f4eb011af9f0c497ad93f74d0b696 (patch)
treeb73c430288756d5a5a1ccc2740519b84aad332c7 /os-plugins
parent * completes r2503 (diff)
downloadcore-9da7ae36f32f4eb011af9f0c497ad93f74d0b696.tar.gz
core-9da7ae36f32f4eb011af9f0c497ad93f74d0b696.tar.xz
core-9da7ae36f32f4eb011af9f0c497ad93f74d0b696.zip
* fix ubuntu 8.10 nvidia support
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2505 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins')
-rwxr-xr-xos-plugins/plugins/xserver/files/ubuntu-8.10-gfx-install.sh62
1 files changed, 37 insertions, 25 deletions
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 2e4b673e..f31f82d9 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
@@ -23,7 +23,7 @@ fi
echo " * downloading restricted modules... this may take a while"
# TODO: remove commented out "> /dev/null ..." later... multiple times
# in this script! check all comments!
-aptitude download linux-restricted-modules-${KVER} #> /dev/null 2&>1
+aptitude download linux-restricted-modules-${KVER} > /dev/null 2>&1
if [ $? -eq 1 ]; then
echo " * Didn't get restricted modules. Exit now!"
#TODO: remove sh when development is finished
@@ -38,8 +38,8 @@ case ${TARGET} in
mkdir -p ${PLUGIN_FOLDER}/ati
mkdir -p ${PLUGIN_FOLDER}/ati/modules
- echo " * downloading fglrx xorg package... this may take a while"
- aptitude download xorg-driver-fglrx #> /dev/null 2&>1
+ echo " * downloading fglrx xorg package...this may take a while"
+ aptitude download xorg-driver-fglrx > /dev/null 2>&1
if [ $? -eq 1 ]; then
echo " * Didn't get package xorg-driver-fglrx! Exit now!"
#TODO: remove sh when development is finished
@@ -52,8 +52,8 @@ case ${TARGET} in
# assemble module
cd modules/lib/linux-restricted-modules/${KVER}/
- bash
- ld_static -d -r -o ${PLUGIN_FOLDER}/ati/modules/fglrx.ko fglrx/*
+ #bash
+#ld_static -d -r -o ${PLUGIN_FOLDER}/ati/modules/fglrx.ko fglrx/*
if [ -f /usr/lib/dri/fglrx_dri.so ]; then
mv /usr/lib/dri/fglrx_dri.so /usr/lib/dri/fglrx_dri.so.slx
@@ -71,23 +71,30 @@ case ${TARGET} in
nvidia)
- mkdir -p ${PLUGIN_FOLDER}/nvidia
+ mkdir -p ${PLUGIN_FOLDER}/nvidia/modules
NVIDIA_DRIVER_VERSION=180
- echo " * downloading nvidia xorg package... this may take a while"
+ echo -n " * downloading nvidia xorg package... "
aptitude download nvidia-glx-${NVIDIA_DRIVER_VERSION} > /dev/null 2>&1
if [ $? -eq 1 ]; then
+ echo "fail"
echo " * Didn't get package nvidia-glx-${NVIDIA_DRIVER_VERSION}!"
exit
+ else
+ echo "ok"
fi
- echo " * downloading nvidia kernel package... this may take a while"
- aptitude download nvidia-${NVIDIA_DRIVER_VERSION}-kernel-source > /dev/null 2>&1
+ echo -n " * downloading nvidia kernel package..."
+ aptitude download nvidia-${NVIDIA_DRIVER_VERSION}-kernel-source >/dev/null 2>&1
if [ $? -eq 1 ]; then
+ echo "fail"
echo " * Didn't get package nvidia-${NVIDIA_DRIVER_VERSION}-kernel-source!"
exit
+ else
+ echo "ok"
fi
+
NVIDIA_DEB=$(ls -1 nvidia-glx*.deb | tail -n1)
NVIDIA_KERNEL_DEB=$(ls -1 nvidia-${NVIDIA_DRIVER_VERSION}-kernel-source*.deb | tail -n1)
# extract $DEB
@@ -95,36 +102,41 @@ case ${TARGET} in
# extract the sources deb to root
dpkg-deb -x ${NVIDIA_KERNEL_DEB} /
- NVIDIA_DKMS_DIR=$(find /var/lib/dkms/nvidia/${NVIDIA_DRIVER_VERSION}* -maxdepth 0 -type d)
- NVIDIA_SOURCE_DIR=$(find /usr/src/nvidia-${NVIDIA_DRIVER_VERSION}* -maxdepth 0 -type d)
+ NVIDIA_DKMS_DIR=$(find /var/lib/dkms/nvidia/${NVIDIA_DRIVER_VERSION}* \
+ -maxdepth 0 -type d)
+ NVIDIA_SOURCE_DIR=$(find /usr/src/nvidia-${NVIDIA_DRIVER_VERSION}* \
+ -maxdepth 0 -type d)
ln -sf ${NVIDIA_SOURCE_DIR} ${NVIDIA_DKMS_DIR}/source
- #build kernel module
- dkms -m nvidia -v 180.11 \
+ NVIDIA_FULL_VERSION=$(echo ${NVIDIA_DKMS_DIR} | \
+ sed -e 's/\/var\/lib\/dkms\/nvidia\///')
+
+ ###### build kernel module ######
+ echo -n " * Building nvidia Kernel Module for Kernel ${KVER} .. "
+ dkms -m nvidia -v ${NVIDIA_FULL_VERSION} \
-k ${KVER} \
--kernelsourcedir /usr/src/linux-headers-${KVER}/ \
--no-prepare-kernel \
- build
- bash
+ build
+#> /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ echo "ok"
+ else
+ echo "fail"
+ exit
+ fi
+
+ NVIDIA_MODULE_PATH=$(find ${NVIDIA_DKMS_DIR}/${KVER}/ -name nvidia.ko)
#module is now under /var/lib/dkms/nvidia/${NVIDIA_DRIVER_VERSION}.<subversion>/${KVER}/iX86/module/nvidia.ko
# TODO: rest & cleanup :)
+ ln -sf ${NVIDIA_MODULE_PATH} ${PLUGIN_FOLDER}/nvidia/modules/nvidia.ko
# assemble module - we just need the new one here
# TODO: modules for older graphics hardware can be found here
#cd modules/lib/linux-restricted-modules/${KVER}/
#ld_static -d -r -o ${PLUGIN_FOLDER}/nvidia/modules/nvidia.ko nvidia_new/*
- #TODO: if we use this part, we need to copy the check from ati, too!
- #if [ -f /usr/lib/dri/fglrx_dri.so ]; then
- # mv /usr/lib/dri/fglrx_dri.so /usr/lib/dri/fglrx_dri.so.slx
- #else
- # # remove link
- # rm -rf /usr/lib/dri/fglrx_dri.so
- #fi
- #ln -s ${PLUGIN_FOLDER}/nvidia/nvroot/usr/lib/dri/nvidia_dri.so \
- # /usr/lib/dri/fglrx_dri.so
-
# cleanup
cd ${PLUGIN_FOLDER}/nvidia
rm -rf ./etc