diff options
author | Bastian Wissler | 2009-02-18 18:08:48 +0100 |
---|---|---|
committer | Bastian Wissler | 2009-02-18 18:08:48 +0100 |
commit | 7368d7b1866e20301beb1e1cf0a83688fe2aadb4 (patch) | |
tree | 38b9ced82a373b8d3186352171455a64817bd83b /os-plugins/plugins/xserver/files/suse-gfx-install.sh | |
parent | * added modifications from 5.0 tree (diff) | |
download | core-7368d7b1866e20301beb1e1cf0a83688fe2aadb4.tar.gz core-7368d7b1866e20301beb1e1cf0a83688fe2aadb4.tar.xz core-7368d7b1866e20301beb1e1cf0a83688fe2aadb4.zip |
xserver: * corrected kernel module building with nvidia-installer
* suse-10.2 works with ati/nvidia-installer
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2600 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/xserver/files/suse-gfx-install.sh')
-rwxr-xr-x | os-plugins/plugins/xserver/files/suse-gfx-install.sh | 118 |
1 files changed, 62 insertions, 56 deletions
diff --git a/os-plugins/plugins/xserver/files/suse-gfx-install.sh b/os-plugins/plugins/xserver/files/suse-gfx-install.sh index 33c3a456..9a55f0b0 100755 --- a/os-plugins/plugins/xserver/files/suse-gfx-install.sh +++ b/os-plugins/plugins/xserver/files/suse-gfx-install.sh @@ -3,25 +3,50 @@ # # Currently 11.0 is supported! # +# Working on 10.2 with pgk-installer +# # not right any more - removed from script # is there any busybox in this environment #BUSYBOX="/mnt/opt/openslx//busybox/busybox" -cd /opt/openslx/plugin-repo/xserver +BASE=/opt/openslx/plugin-repo/xserver +cd ${BASE} -if [ -s /boot/vmlinuz ]; then +if [ -L /boot/vmlinuz ]; then KSUFFIX=$(ls -l /boot/vmlinuz | grep -P -o -e "-[a-z]*$" ) + KVERS=$(ls -l /boot/vmlinuz | awk -F "->" '{print $2}'| grep -P -o "2.6.*") else KSUFFIX=$(ls /boot/vmlinuz-* | head -n1 | grep -P -o -e "-[a-z]*$" ) + KVERS=$(ls /boot/vmlinuz-* | head -n1 | awk -F "->" '{print $2}' | grep -P -o "2.6.*" ) + fi if [ -z "${KSUFFIX}" ]; then echo "Could not determine proper local kernel suffix!" echo "This is needed to install kernel modules for graphics drivers!" exit 1 +#else +# echo -e "Kernel-Suffix: ${KSUFFIX}" +# echo -e "Kernel-version:${KVERS}" fi + +buildfglrx() { + # build ATI kernel module + cd ${BASE}/ati/usr/src/kernel-modules/fglrx + rm -rf fglrx.ko >/dev/null 2>&1 + make KVER=${1} >/dev/null 2>&1 + if [ "$?" -eq "0" ]; then + cp fglrx.ko ../../../../modules + else + echo -e "Kernel module for kernel ${1} could not be built!" + fi + cd - >/dev/null 2>&1 + +} + + ########################################################################## # NVidia section ########################################################################## @@ -62,14 +87,9 @@ if [ "$1" = "nvidia" ]; then mv ./usr .. find lib/ -name "*.ko" -exec mv {} ../modules \; -# echo "DEBUG xserver SUSE-GFX-INSTALL.SH NVIDIA" -# /bin/bash -# echo "END DEBUG" fi cd .. - # TODO: after development - rm -rf temp/ fi @@ -83,12 +103,41 @@ if [ "$1" = "ati" ]; then fi mkdir -p ati/modules ati/temp - cd ati/temp - if [ "11.0" = "`cat /etc/SuSE-release | tail -n1 | cut -d' ' -f3`" ]; then - ## SUSE 11.0 Section ### + if [ "10.2" = "`cat /etc/SuSE-release | tail -n1 | awk '{print $3}'`" ]; then + ### SUSE 10.2 section ### + echo "* Extracting ATI package (expected in xserver::pkgpath) ... this could take some time..." + + PKG=`find packages/ -name ati-driver*\.run | tail -n1` + PKG_VERSION=`head ${PKG} | grep -P -o "[0-9]\.[0-9]{3}"` + + chmod +x ${PKG} + + ${PKG} --extract ati/temp >/dev/null 2>&1 + + cd ati/temp/ + RPM=`./ati-installer.sh ${PKG_VERSION} --buildpkg SuSE/SUSE102-IA32 2>&1 | grep Package | awk '{print $2}' | tail -n1` + + cd .. + rpm2cpio ${RPM} 2>/dev/null | cpio -i --make-directories >/dev/null 2>&1 + - echo " * Downloading ati rpm packages... this could take some time..." + mv ./usr/X11R6/lib/* ./usr/lib/ + + # cleanup + rm -rf ${RPM} + cd .. + rm -rf ${PKG} + + buildfglrx ${KVERS} + + fi + + if [ "11.0" = "`cat /etc/SuSE-release | tail -n1 | awk '{print $3}'`" ]; then + ### SUSE 11.0 Section ### + + echo "* Downloading ati rpm packages... this could take some time..." + cd ati/temp # add repository for nvidia drivers zypper --no-gpg-checks addrepo http://www2.ati.com/suse/11.0/ ATI > /dev/null 2>&1 @@ -113,57 +162,14 @@ if [ "$1" = "ati" ]; then done mv ./usr/X11R6/lib/* ./usr/lib/ - # fix for fglrx_dri.so - TODO: Why is this in here? -# mkdir -p ./usr/X11R6/lib/modules/dri -# ln -s ../../../../lib/dri/fglrx_dri.so \ -# ./usr/X11R6/lib/modules/dri/fglrx_dri.so mv ./usr .. mv ./etc .. find lib/ -name "*.ko" -exec mv {} ../modules \; -# echo "DEBUG xserver SUSE-GFX-INSTALL.SH ATI" -# /bin/bash -# echo "END DEBUG" - else - ############################################################ - ## SUSE 10.2 Section ## - ############################################################ - - #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 ati 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 - - rpm2cpio $(find . -name "x11*")| cpio -idv > /dev/null 2>&1 - - 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! - rpm2cpio $(find . -name "ati-fglrx*bigsmp*") | cpio -idv > /dev/null - #rpm2cpio nvidia-gfxG01-kmp-default-173.14.12_2.6.18.8_0.10-0.1.i586.rpm | 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/ + rm -rf temp/ fi + |