summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBastian Wissler2009-01-19 17:36:36 +0100
committerBastian Wissler2009-01-19 17:36:36 +0100
commitdacbd4c3c8e18a23fe9bd52fb9cebfe3e7b873b3 (patch)
treeb705482c6dfab46545d9c29ee70b8ff3c5f60549
parent* moved file from vmware into virtualization plugion vmchooser (diff)
downloadcore-dacbd4c3c8e18a23fe9bd52fb9cebfe3e7b873b3.tar.gz
core-dacbd4c3c8e18a23fe9bd52fb9cebfe3e7b873b3.tar.xz
core-dacbd4c3c8e18a23fe9bd52fb9cebfe3e7b873b3.zip
xserver plugin:
* added new nvidia package name for ubuntu-8.10 git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2499 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm1
-rwxr-xr-xos-plugins/plugins/xserver/files/ati-install.sh11
-rwxr-xr-xos-plugins/plugins/xserver/files/nvidia-install.sh11
-rwxr-xr-xos-plugins/plugins/xserver/files/ubuntu-8.10-gfx-install.sh114
4 files changed, 133 insertions, 4 deletions
diff --git a/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm b/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm
index 8bf6b8e3..483add9e 100644
--- a/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm
+++ b/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm
@@ -227,6 +227,7 @@ sub installationPhase
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/suse-gfx-8.10-install.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");
diff --git a/os-plugins/plugins/xserver/files/ati-install.sh b/os-plugins/plugins/xserver/files/ati-install.sh
index 67959883..5e38ef05 100755
--- a/os-plugins/plugins/xserver/files/ati-install.sh
+++ b/os-plugins/plugins/xserver/files/ati-install.sh
@@ -3,10 +3,17 @@
cd /opt/openslx/plugin-repo/xserver
# Ubuntu gfx-install.sh skript
-if [ "1" -eq "$(lsb_release -i | grep 'Ubuntu' | wc -l)" ]; then
+DISTRO=$(lsb_release -i)
+RELEASE=$(lsb_release -r)
+
+if [ "1" -eq "$(echo ${DISTRO} | grep 'Ubuntu' | wc -l)" ]; then
# we have Ubuntu - run ubuntu-gfx-install
echo "* Using Ubuntu packages to install modules and libs"
- ./ubuntu-gfx-install.sh ati
+ if [ "8.10" -eq "$(echo ${DISTRO} | awk '{print $2}' )" ]; then
+ ./ubuntu-8.10-gfx-install.sh ati
+ else
+ ./ubuntu-gfx-install.sh ati
+ fi
exit
fi
# End ubuntu gfx-install.sh
diff --git a/os-plugins/plugins/xserver/files/nvidia-install.sh b/os-plugins/plugins/xserver/files/nvidia-install.sh
index e7b30ab6..2b603760 100755
--- a/os-plugins/plugins/xserver/files/nvidia-install.sh
+++ b/os-plugins/plugins/xserver/files/nvidia-install.sh
@@ -10,14 +10,21 @@ MODULES_FOLDER="/opt/openslx/plugin-repo/xserver/modules"
#TODO: check if we still have .../xserver/nvidia folder
+DISTRO=$(lsb_release -i)
+RELEASE=$(lsb_release -r)
+
cd ${PLUGIN_PATH}
# Ubuntu gfx-install.sh skript
-if [ "1" -eq "$(lsb_release -i | grep 'Ubuntu' | wc -l)" ]; then
+if [ "1" -eq "$(echo ${DISTRO} | grep 'Ubuntu' | wc -l)" ]; then
# we have Ubuntu - run ubuntu-gfx-install
echo "* Using Ubuntu packages to install modules and libs"
- ./ubuntu-gfx-install.sh nvidia
+ if [ "8.10" -eq "$(echo ${RELEASE}| awk '{print $2}')" ]; then
+ ./ubuntu-8.10-gfx-install.sh nvidia
+ else
+ ./ubuntu-gfx-install.sh nvidia
+ fi
exit
fi
# End ubuntu gfx-install.sh
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
new file mode 100755
index 00000000..fdd945bc
--- /dev/null
+++ b/os-plugins/plugins/xserver/files/ubuntu-8.10-gfx-install.sh
@@ -0,0 +1,114 @@
+#!/bin/sh
+
+# gets needed packages for ubuntu nvidia/ati drivers
+# $1 = nvidia | ati
+PLUGIN_FOLDER="/opt/openslx/plugin-repo/xserver"
+TMP_FOLDER="/tmp/slx-plugin/xserver"
+TARGET="$1"
+
+if [ ! -d "${PLUGIN_FOLDER}" ]; then
+ mkdir -p "${PLUGIN_FOLDER}/modules"
+fi
+
+# change into temp
+cd ${TMP_FOLDER} > /dev/null
+
+if [ -e "/boot/vmlinuz" ]; then
+ KVER=$(ls -ahl '/boot/vmlinuz' | sed -e 's,^.*vmlinuz-,,g')
+else
+ KVER=$(find /lib/modules/2.6* -maxdepth 0|sed 's,/lib/modules/,,g'|sort|tail -n1)
+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
+if [ $? -eq 1 ]; then
+ echo " * Didn't get restricted modules. Exit now!"
+ #TODO: remove sh when development is finished
+ sh
+ exit
+fi
+MODULE_DEB=$(ls linux-restricted-modules-*.deb | tail -n1)
+dpkg-deb -x ${MODULE_DEB} ${TMP_FOLDER}/modules
+
+case ${TARGET} in
+ ati)
+ 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
+ if [ $? -eq 1 ]; then
+ echo " * Didn't get package xorg-driver-fglrx! Exit now!"
+ #TODO: remove sh when development is finished
+ sh
+ exit
+ fi
+ FGLRX_DEB=$(ls xorg-driver-fglrx_*.deb | tail -n1)
+ # extract $DEB
+ dpkg-deb -x ${FGLRX_DEB} ${PLUGIN_FOLDER}/ati
+
+ # assemble module
+ cd modules/lib/linux-restricted-modules/${KVER}/
+ ld_static -d -r -o ${PLUGIN_FOLDER}/ati/modules/fglrx.ko fglrx/*
+
+ #TODO: Bastian: do we really need this part in stage1?
+ # Volker: I think we could just copy it (is a unique file)
+ 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}/ati/usr/lib/dri/fglrx_dri.so \
+ /usr/lib/dri/fglrx_dri.so
+
+ # cleanup
+ cd ${PLUGIN_FOLDER}/ati
+
+ #@Volker: We need /etc-files - there is a database
+ # file for the fglrx-driver in stage3 !!!
+ #rm -rf ./etc
+ #TODO: check for more cleanups when the main part works!
+
+ ;;
+
+
+ nvidia)
+ mkdir -p ${PLUGIN_FOLDER}/nvidia
+ mkdir -p ${PLUGIN_FOLDER}/nvidia/modules
+
+ echo " * downloading fglrx xorg package... this may take a while"
+ aptitude download nvidia-glx > /dev/null 2&>1
+ if [ $? -eq 1 ]; then
+ echo " * Didn't get package nvidia-glx!"
+ exit
+ fi
+ NVIDIA_DEB=$(ls -1 nvidia-glx*.deb | tail -n1)
+ # extract $DEB
+ dpkg-deb -x ${NVIDIA_DEB} ${PLUGIN_FOLDER}/nvidia
+
+ # 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
+ #TODO: check for more cleanups when the main part works!
+ ;;
+esac
+