summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Uhrig2008-08-29 19:12:42 +0200
committerVolker Uhrig2008-08-29 19:12:42 +0200
commit146c06116f8ed7450737c2f772b26d9569087d7b (patch)
treec9a06d5a00a6d9ee7dc48d1458cb6667d79f0eeb
parentadded time-sync via rdate to initrd, hwclock will be sinced as well (diff)
downloadcore-146c06116f8ed7450737c2f772b26d9569087d7b.tar.gz
core-146c06116f8ed7450737c2f772b26d9569087d7b.tar.xz
core-146c06116f8ed7450737c2f772b26d9569087d7b.zip
* Added suse-gfx-install.sh
* delivers nvida files for suse-10.2 * just suse-10.2, because the suse package handling is a little bit... errm, accidentally unhappily implemented in zypper. Let's check against 10.2 first, if it works we'll support more. * cleaned up old stuff. We won't compile kernels anymore, to tricky with newer versions (won't compile against 2.6.26 etc) git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2137 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm3
-rwxr-xr-xos-plugins/plugins/xserver/files/linkage.sh2
-rwxr-xr-xos-plugins/plugins/xserver/files/nvidia-install.sh77
-rwxr-xr-xos-plugins/plugins/xserver/files/suse-gfx-install.sh56
-rwxr-xr-xos-plugins/plugins/xserver/files/ubuntu-gfx-install.sh2
5 files changed, 68 insertions, 72 deletions
diff --git a/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm b/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm
index 67035c57..94ac131e 100644
--- a/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm
+++ b/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm
@@ -225,6 +225,9 @@ sub installationPhase
}
if ($attrs->{'xserver::nvidia'} == 1) {
copyFile("$pluginFilesPath/nvidia-install.sh", "$installationPath");
+ #TODO: handle distribution. Bastian, have you testet your
+ # script? ;-)
+ copyFile("$pluginFilesPath/suse-gfx-install.sh", "$installationPath");
system("/bin/sh /opt/openslx/plugin-repo/$self->{'name'}/nvidia-install.sh");
}
diff --git a/os-plugins/plugins/xserver/files/linkage.sh b/os-plugins/plugins/xserver/files/linkage.sh
index 040b4c8a..edf89305 100755
--- a/os-plugins/plugins/xserver/files/linkage.sh
+++ b/os-plugins/plugins/xserver/files/linkage.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
#
diff --git a/os-plugins/plugins/xserver/files/nvidia-install.sh b/os-plugins/plugins/xserver/files/nvidia-install.sh
index 9252ef9a..e7b30ab6 100755
--- a/os-plugins/plugins/xserver/files/nvidia-install.sh
+++ b/os-plugins/plugins/xserver/files/nvidia-install.sh
@@ -11,8 +11,6 @@ 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
@@ -25,72 +23,11 @@ fi
# End ubuntu gfx-install.sh
-
-
-
-
-
-
-mkdir -p ${TMP_FOLDER} ${MODULES_FOLDER}
-cd ${PKG_FOLDER}
-FILE=$(ls NVIDIA-Linux-*|sort|tail -n 1)
-
-echo " * extracting package"
-cd ${TMP_FOLDER}
-${PKG_FOLDER}/${FILE} -x > /dev/null
-#todo: check if it extracted like it should...
-
-FILEPATH=$(echo ${FILE}|sed 's/.run//')
-NVPATH="${TMP_FOLDER}/${FILEPATH}"
-mv "${NVPATH}/usr" "${PLUGIN_PATH}/nvidia"
-
-echo " * prepare kernel module"
-UNAME_R=$(find /lib/modules/2.6* -maxdepth 0|sed 's,/lib/modules/,,g'|sort|tail -n1)
-cd ${PLUGIN_PATH}/nvidia/usr/src/nv/
-# dont load module
-sed -e '/.* modprobe .*/d' \
- -i ${PLUGIN_PATH}/nvidia/usr/src/nv/Makefile.kbuild \
- -i ${PLUGIN_PATH}/nvidia/usr/src/nv/Makefile.nvidia \
- -i ${PLUGIN_PATH}/nvidia/usr/src/nv/makefile
-# fake kernel
-# Bastian: the SYSSRC way didnt work in chroot!
-sed -e "s/..shell uname -r./${UNAME_R}/" \
- -i ${PLUGIN_PATH}/nvidia/usr/src/nv/Makefile.kbuild \
- -i ${PLUGIN_PATH}/nvidia/usr/src/nv/Makefile.nvidia \
- -i ${PLUGIN_PATH}/nvidia/usr/src/nv/makefile
-
-echo " * compile kernel module"
-make module > /dev/null 2&>1
-
-# somehow $? isn't trustworthy...
-if [ -e nvidia.ko ]; then
- echo " * Successfully built module nvidia.ko!"
- mv nvidia.ko ${MODULES_FOLDER}
-else
- echo -e "\n\n * Something went wrong while building nvidia.ko module!\n\n\n"
- #TODO: handle this error => mark plugin as not installed
+# SUSE gfx-install.sh skript
+if [ "1" -eq "$(lsb_release -i | grep 'SUSE' | wc -l)" ]; then
+ # we have SUSE - run ubuntu-gfx-install
+ echo "* Using SuSE packages to install modules and libs"
+ ./suse-gfx-install.sh nvidia
+ exit
fi
-
-#TODO: remove comment
-#echo " * cleanup"
-#rm -rf ${TMP_FOLDER} ${PLUGIN_PATH}/nvidia/usr/src
-
-# TODO: perhaps we don't need this part! - it's very slow
-#/./${TEMP_FOLDER}/nvidia-files/nvidia-installer -s --x-prefix=${TEMP_FOLDER} \
-# --no-runlevel-check --no-abi-note --no-x-check\
-# --no-rpms --no-recursion \
-# --x-module-path=${TEMP_FOLDER}/usr/lib/xorg/modules\
-# --x-library-path=${TEMP_FOLDER}/usr/lib\
-# --opengl-prefix=${TEMP_FOLDER}/usr\
-# --opengl-libdir=lib\
-# --utility-prefix=${TEMP_FOLDER}/usr\
-# --utility-libdir=lib\
-# --documentation-prefix=${TEMP_FOLDER}/usr\
-# --no-kernel-module \
-## --kernel-install-path=${TEMP_FOLDER}/lib/modules/${KVERS}/video \
-# 2>&1 > /dev/null
-
-#mv ${TEMP_FOLDER}/src/usr/src ${TEMP_FOLDER}/usr/
-#rm -rf ${TEMP_FOLDER}/usr/share ${TEMP_FOLDER}/src/
-
-
+# End suse gfx-install.sh
diff --git a/os-plugins/plugins/xserver/files/suse-gfx-install.sh b/os-plugins/plugins/xserver/files/suse-gfx-install.sh
new file mode 100755
index 00000000..c082735f
--- /dev/null
+++ b/os-plugins/plugins/xserver/files/suse-gfx-install.sh
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+#
+#Currently only suse 10.2 is supported!
+#
+
+#To handle it under suse is kinda retarded. SuSE 10.2's zypper don't know
+#a flag similiar to "--download-only" (should be supported in a later
+#SuSE Version!)
+#SuSE 10.2 and 10.3 has two Kernelpackages:
+# nvidia-gfxG01-kmp-bigsmp and -default
+#And its different nameing scheme to suse 11
+
+
+BUSYBOX="/mnt/opt/openslx/share/busybox/busybox"
+
+cd /opt/openslx/plugin-repo/xserver
+
+if [ "$1" = "nvidia" ]; then
+ mkdir -p nvidia/modules nvidia/temp
+ cd nvidia/temp
+
+ if [ "1" -eq "$(lsb_release -r|grep '10.2'|wc -l)" ]; then
+ # TODO: add -q flag
+ wget -c \
+ ftp://download.nvidia.com/opensuse/10.2/i586/nvidia-gfxG01-kmp-bigsmp-173.14.12_2.6.18.8_0.10-0.1.i586.rpm \
+ ftp://download.nvidia.com/opensuse/10.2/i586/nvidia-gfxG01-kmp-default-173.14.12_2.6.18.8_0.10-0.1.i586.rpm \
+ ftp://download.nvidia.com/opensuse/10.2/i586/x11-video-nvidiaG01-173.14.12-0.1.i586.rpm
+
+ # TODO: move output to /dev/null when main development is over
+ ${BUSYBOX} rpm2cpio x11-video-nvidiaG01-173.14.12-0.1.i586.rpm | ${BUSYBOX} cpio -idv
+
+ rm -rf ./usr/include
+ # Todo: recheck after development progress, perhaps an nvidia x11 tool needs /usr/share/pixmaps
+ # same with var id's
+ #rm -rf ./var
+ #rm -rf ./usr/share
+
+ mv ./usr ..
+
+ # TODO: matching kernel problem... our openslx system picks -bigsmp - unintentionally!
+ ${BUSYBOX} rpm2cpio nvidia-gfxG01-kmp-bigsmp-173.14.12_2.6.18.8_0.10-0.1.i586.rpm | ${BUSYBOX} cpio -idv
+ #${BUSYBOX} rpm2cpio nvidia-gfxG01-kmp-default-173.14.12_2.6.18.8_0.10-0.1.i586.rpm | ${BUSYBOX} cpio -idv
+ #TODO: take care about the kernel issue. Find won't work with two equal kernelmodules in lib/...
+ find lib/ -name "*.ko" -exec mv {} ../modules \;
+
+
+
+ fi
+
+ cd ..
+
+ # TODO: after development
+ #rm -rf temp/
+ sh
+fi
diff --git a/os-plugins/plugins/xserver/files/ubuntu-gfx-install.sh b/os-plugins/plugins/xserver/files/ubuntu-gfx-install.sh
index dbcd0ad1..3bedff92 100755
--- a/os-plugins/plugins/xserver/files/ubuntu-gfx-install.sh
+++ b/os-plugins/plugins/xserver/files/ubuntu-gfx-install.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# gets needed packages for ubuntu nvidia/ati drivers
# $1 = nvidia | ati