summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Uhrig2008-08-30 12:56:23 +0200
committerVolker Uhrig2008-08-30 12:56:23 +0200
commit287e86025dd5cf607d8a7e1e0c551d7ecaa7fc3f (patch)
tree577ee4fb64c375ed630b905326f6c06666ae2e79
parentSome more cleanup in stage3. (diff)
downloadcore-287e86025dd5cf607d8a7e1e0c551d7ecaa7fc3f.tar.gz
core-287e86025dd5cf607d8a7e1e0c551d7ecaa7fc3f.tar.xz
core-287e86025dd5cf607d8a7e1e0c551d7ecaa7fc3f.zip
* added suse ati file preparation
* works only against 10.2, usual kernel problem * cleaned up old stuff. We shouldn't need it anymore git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2151 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm14
-rwxr-xr-xos-plugins/plugins/xserver/files/ati-install.sh69
-rwxr-xr-xos-plugins/plugins/xserver/files/suse-gfx-install.sh92
3 files changed, 81 insertions, 94 deletions
diff --git a/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm b/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm
index 94ac131e..93314e85 100644
--- a/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm
+++ b/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm
@@ -219,24 +219,20 @@ sub installationPhase
my $pluginFilesPath =
"$openslxBasePath/lib/plugins/$self->{'name'}/files";
my $installationPath = "$pluginRepoPath/";
+ # TODO: handle it better. We know the distribution in stage1
+ if ($attrs->{'xserver::nvidia'} == 1 || $attrs->{'xserver::ati'} == 1 ) {
+ copyFile("$pluginFilesPath/ubuntu-gfx-install.sh", "$installationPath");
+ copyFile("$pluginFilesPath/suse-gfx-install.sh", "$installationPath");
+ }
if ($attrs->{'xserver::ati'} == 1) {
copyFile("$pluginFilesPath/ati-install.sh", "$installationPath");
system("/bin/sh /opt/openslx/plugin-repo/$self->{'name'}/ati-install.sh");
}
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");
}
- if ($attrs->{'xserver::nvidia'} == 1
- || $attrs->{'xserver::ati'} == 1 ) {
- copyFile("$pluginFilesPath/ubuntu-gfx-install.sh",
- "$installationPath");
- }
-
# Some plugins have to copy files from their plugin folder into the
# vendor-OS. Here's an example for how to do that:
#
diff --git a/os-plugins/plugins/xserver/files/ati-install.sh b/os-plugins/plugins/xserver/files/ati-install.sh
index d9bed514..67959883 100755
--- a/os-plugins/plugins/xserver/files/ati-install.sh
+++ b/os-plugins/plugins/xserver/files/ati-install.sh
@@ -2,8 +2,6 @@
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
@@ -13,64 +11,11 @@ if [ "1" -eq "$(lsb_release -i | grep 'Ubuntu' | wc -l)" ]; then
fi
# End ubuntu gfx-install.sh
-
-
-
-
-# check if its already installed
-if [ -d ati ]; then
- echo " * ati driver seems to be installed"
- echo " If you want to reinstall ati drivers press \"y\" or else we will exit"
- read
- if [ "${REPLY}" != "y" ]; then
- echo " * ati is already installed. Nothing to do."
- exit
- fi
- echo " * ati drivers will be reinstalled"
- echo " * deleting old files"
- rm -rf ati/
+# 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 ati
+ exit
fi
-
-#TODO: check if we have ati files available (and not just nvidia's)
-FILE_ATI=$(ls packages/ati-driver-installer*.run|sort|tail -n 1)
-VERSION=$(head ${FILE_ATI} | grep "label=" | sed -e 's,.*Driver-\(.*\)",\1,g')
-
-mkdir ati
-mkdir ati/modules
-mkdir ati/atiroot
-cd ati
-
-#TODO: here we should do filecheck
-#../${FILE_ATI} --check
-
-# extract ati file
-../${FILE_ATI} --extract ./temp/ > /dev/null
-
-
-
-echo " * build kernel modules"
-cd temp/common/lib/modules/fglrx/build_mod
-#TODO GCC4 haengt von GCC ab, hier version 4
-GCC_VERSION=4
-ln -s /opt/openslx/plugin-repo/xserver/ati/temp/arch/x86/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC${GCC_VERSION} .
-cp 2.6.x/Makefile .
-uname_r=$(find /lib/modules/2.6* -maxdepth 0|sed 's,/lib/modules/,,g'|sort|tail -n1)
-sed -i "s,^KVER.*$,KVER = ${uname_r}," Makefile
-# TODO: less verbose
-make -C /lib/modules/${uname_r}/build M=$(pwd) GCC_VER_MAJ=${GCC_VERSION}
-
-cd /opt/openslx/plugin-repo/xserver/ati
-
-echo " * move kernel modules"
-mv temp/common/lib/modules/fglrx/build_mod/fglrx.ko modules/
-mv temp/common/* atiroot
-cp -r temp/arch/x86/* atiroot/
-rm -rf atiroot/lib
-rm -rf atiroot/opt
-rm -rf atiroot/usr/src
-
-# Todo: keep it for development purpose
-#rm -rf temp/
-
-sh
-
+# End ubuntu 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
index c082735f..d3abd135 100755
--- a/os-plugins/plugins/xserver/files/suse-gfx-install.sh
+++ b/os-plugins/plugins/xserver/files/suse-gfx-install.sh
@@ -1,56 +1,102 @@
#!/bin/sh
#
-#Currently only suse 10.2 is supported!
+# 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
+#
+# NVidia section
+#
if [ "$1" = "nvidia" ]; then
+ #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
+
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 \
+ #TODO: licence information... even suse requires an accept
+ # TODO: let it automatical find the newest file... see ati section
+ # only problem should be the kernel package
+ if [ "10.2" -eq "$(lsb_release -r|sed 's/^.*\t//')" ]; then
+ wget -q -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
-
+ ${BUSYBOX} rpm2cpio x11-video-nvidiaG01-173.14.12-0.1.i586.rpm | ${BUSYBOX} cpio -idv > /dev/null
+
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-bigsmp-173.14.12_2.6.18.8_0.10-0.1.i586.rpm | ${BUSYBOX} cpio -idv > /dev/null
#${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 ..
- fi
+ # TODO: after development
+ #rm -rf temp/
+fi
+
+
+
+#
+# ATI section
+#
+if [ "$1" = "ati" ]; then
+ mkdir -p ati/modules ati/temp
+ cd ati/temp
+
+ #TODO: licence information... even suse requires an accept
+ BASEURL="http://www2.ati.com/suse/$(lsb_release -r|sed 's/^.*\t//')"
+ # if it dont work in the future, check .../repodata/repomd.xml
+ wget -q ${BASEURL}/repodata/primary.xml.gz
+ gunzip primary.xml.gz
+
+ echo " * Downloading rpm packages... this could take some time..."
+ # notice the i586! we can also get x86_64!
+ for i in $(grep "<location href=.i586" primary.xml \
+ |sed 's/.*<location href="//'|sed 's/".*//g')
+ do
+ wget -c -q ${BASEURL}/${i}
+ done
+
+ # TODO: move output to /dev/null when main development is over
+ ${BUSYBOX} rpm2cpio $(find . -name "x11*")| ${BUSYBOX} cpio -idv > /dev/null
+
+ rm -rf ./usr/include
+ rm -rf ./usr/lib/pm-utils
+ rm -rf ./usr/lib/powersave
+ # Todo: recheck after development progress, perhaps an nvidia x11 tool needs /usr/share/pixmaps
+ # same with var id's
+ #rm -rf ./usr/share
+
+ mv ./usr ..
+
+ # TODO: matching kernel problem... our openslx system picks -bigsmp - unintentionally!
+ ${BUSYBOX} rpm2cpio $(find . -name "ati-fglrx*bigsmp*") | ${BUSYBOX} cpio -idv > /dev/null
+ #${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 \;
cd ..
-
+
# TODO: after development
#rm -rf temp/
- sh
-fi
+fi