summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBastian Wissler2008-08-29 10:14:16 +0200
committerBastian Wissler2008-08-29 10:14:16 +0200
commitdaf430d739449f4fe8ddce1c57959c1841ac2e8b (patch)
tree2b8c5e8daedbd0b9bae5d2b91b1534b23a16ef50
parentChecking in busybox with getty (lost for some reason), fixing (diff)
downloadcore-daf430d739449f4fe8ddce1c57959c1841ac2e8b.tar.gz
core-daf430d739449f4fe8ddce1c57959c1841ac2e8b.tar.xz
core-daf430d739449f4fe8ddce1c57959c1841ac2e8b.zip
* Added graphics driver installation from Ubuntu-Packages
* Added stage3 setup of ati drivers -> files in xserver-plugin git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2124 95ad53e4-c205-0410-b2fa-d234c58c8868
-rwxr-xr-xos-plugins/plugins/xserver/files/ati-install.sh15
-rwxr-xr-xos-plugins/plugins/xserver/files/nvidia-install.sh21
-rwxr-xr-xos-plugins/plugins/xserver/files/ubuntu-gfx-install.sh68
3 files changed, 104 insertions, 0 deletions
diff --git a/os-plugins/plugins/xserver/files/ati-install.sh b/os-plugins/plugins/xserver/files/ati-install.sh
index 8ead3b63..d9bed514 100755
--- a/os-plugins/plugins/xserver/files/ati-install.sh
+++ b/os-plugins/plugins/xserver/files/ati-install.sh
@@ -2,6 +2,21 @@
cd /opt/openslx/plugin-repo/xserver
+
+
+# Ubuntu gfx-install.sh skript
+if [ "1" -eq "$(lsb_release -i | 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
+ exit
+fi
+# End ubuntu gfx-install.sh
+
+
+
+
+
# check if its already installed
if [ -d ati ]; then
echo " * ati driver seems to be installed"
diff --git a/os-plugins/plugins/xserver/files/nvidia-install.sh b/os-plugins/plugins/xserver/files/nvidia-install.sh
index b07cd457..9252ef9a 100755
--- a/os-plugins/plugins/xserver/files/nvidia-install.sh
+++ b/os-plugins/plugins/xserver/files/nvidia-install.sh
@@ -10,6 +10,27 @@ MODULES_FOLDER="/opt/openslx/plugin-repo/xserver/modules"
#TODO: check if we still have .../xserver/nvidia folder
+
+
+
+cd ${PLUGIN_PATH}
+
+# Ubuntu gfx-install.sh skript
+if [ "1" -eq "$(lsb_release -i | 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
+ exit
+fi
+# End ubuntu gfx-install.sh
+
+
+
+
+
+
+
+
mkdir -p ${TMP_FOLDER} ${MODULES_FOLDER}
cd ${PKG_FOLDER}
FILE=$(ls NVIDIA-Linux-*|sort|tail -n 1)
diff --git a/os-plugins/plugins/xserver/files/ubuntu-gfx-install.sh b/os-plugins/plugins/xserver/files/ubuntu-gfx-install.sh
new file mode 100755
index 00000000..fd65a4a6
--- /dev/null
+++ b/os-plugins/plugins/xserver/files/ubuntu-gfx-install.sh
@@ -0,0 +1,68 @@
+#!/bin/bash
+
+# gets needed packages for ubuntu nvidia/ati drivers
+# $1 = nvidia | ati
+PLUGIN_FOLDER="/opt/openslx/plugin-repo/xserver"
+TMP_FOLDER="/tmp/"
+TARGET="$1"
+
+if [ ! -d "${PLUGIN_FOLDER}" ]; then
+ mkdir -p "${PLUGIN_FOLDER}/modules"
+fi
+
+# change into temp
+pushd ${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
+
+bash
+
+
+aptitude download linux-restricted-modules-${KVER} > /dev/null 2&>1
+MODULE_DEB=$(ls linux-restricted-modules-*.deb | tail -n1)
+dpkg-deb -x ${MODULE_DEB} ${TMP_FOLDER}/modules
+
+case ${TARGET} in
+ ati)
+ aptitude download xorg-driver-fglrx > /dev/null 2&>1
+ FGLRX_DEB=$(ls xorg-driver-fglrx_*.deb | tail -n1)
+ # extract $DEB into folder "atiroot"
+ dpkg-deb -x ${FGLRX_DEB} ${PLUGIN_FOLDER}/ati/atiroot/
+
+ # assemble module
+ pushd modules/lib/linux-restricted-modules/${KVER}/ > /dev/null 2&>1
+ ld_static -d -r -o ${PLUGIN_FOLDER}/modules/fglrx.ko fglrx/*
+ popd > /dev/null 2&>1
+
+ rm -rf ${FGLRX_DEB}
+ ;;
+ nvidia)
+ aptitude download nvidia-glx-new > /dev/null 2&>1
+ #oder
+ #aptitude download nvidia-glx
+ # extract $DEB into folder "nvroot"
+ NVIDIA_DEB=$(ls nvidia-glx*.deb | tail -n1)
+ dpkg-deb -x ${NVIDIA_DEB} ${PLUGIN_FOLDER}/nvidia/nvroot/
+
+ # assemble modules
+ pushd modules/lib/linux-restricted-modules/${KVER}/ > /dev/null 2&>1
+ for module in nvidia nvidia_legacy nvidia_new; do
+ ld_static -d -r -o ${PLUGIN_FOLDER}/modules/${module}.ko ${module}/*
+ done
+ popd > /dev/null 2&>1
+
+ rm -rf ${NVIDIA_DEB}
+ ;;
+ *)
+ echo "Running installation script ubuntu-gfx-install.sh without purpose! Exiting!"
+ ;;
+esac
+
+popd > /dev/null #${TMP_FOLDER}
+
+rm -rf ${TMP_FOLDER}/modules
+