diff options
author | Bastian Wissler | 2008-08-29 10:14:16 +0200 |
---|---|---|
committer | Bastian Wissler | 2008-08-29 10:14:16 +0200 |
commit | daf430d739449f4fe8ddce1c57959c1841ac2e8b (patch) | |
tree | 2b8c5e8daedbd0b9bae5d2b91b1534b23a16ef50 /os-plugins/plugins/xserver/files/ubuntu-gfx-install.sh | |
parent | Checking in busybox with getty (lost for some reason), fixing (diff) | |
download | core-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
Diffstat (limited to 'os-plugins/plugins/xserver/files/ubuntu-gfx-install.sh')
-rwxr-xr-x | os-plugins/plugins/xserver/files/ubuntu-gfx-install.sh | 68 |
1 files changed, 68 insertions, 0 deletions
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 + |