diff options
author | Volker Uhrig | 2008-08-25 20:19:33 +0200 |
---|---|---|
committer | Volker Uhrig | 2008-08-25 20:19:33 +0200 |
commit | dfa7a40a9d49fd46936b85c57cc6508cd885fc09 (patch) | |
tree | fe0fadb0e7e6c1db75bd40705c66d638a0632e0e | |
parent | Forgot to add the "getty" applet. The "new" stuff is obsolete ... (diff) | |
download | core-dfa7a40a9d49fd46936b85c57cc6508cd885fc09.tar.gz core-dfa7a40a9d49fd46936b85c57cc6508cd885fc09.tar.xz core-dfa7a40a9d49fd46936b85c57cc6508cd885fc09.zip |
* moved ati-install-dev.sh to ati-install.sh
* added kernel compile [ati-install.sh]
* activated ati-install [xserver.pm]
* Status:
* Kernel compiles
* copy all more or less needed librarys
* TODO: integration into system, copy of librarys etc
* TODO: more file cleanup needed
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2096 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r-- | os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm | 2 | ||||
-rwxr-xr-x | os-plugins/plugins/xserver/files/ati-install-dev.sh | 96 | ||||
-rwxr-xr-x | os-plugins/plugins/xserver/files/ati-install.sh | 126 |
3 files changed, 46 insertions, 178 deletions
diff --git a/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm b/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm index 84c7303a..f0837293 100644 --- a/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm +++ b/os-plugins/plugins/xserver/OpenSLX/OSPlugin/xserver.pm @@ -220,7 +220,7 @@ sub installationPhase my $installationPath = "$pluginRepoPath/"; if ($attrs->{'xserver::ati'} == 1) { copyFile("$pluginFilesPath/ati-install.sh", "$installationPath"); - #system("/bin/sh /opt/openslx/plugin-repo/$self->{'name'}/ati-install.sh"); + system("/bin/sh /opt/openslx/plugin-repo/$self->{'name'}/ati-install.sh"); } if ($attrs->{'xserver::nvidia'} == 1) { copyFile("$pluginFilesPath/nvidia-install.sh", "$installationPath"); diff --git a/os-plugins/plugins/xserver/files/ati-install-dev.sh b/os-plugins/plugins/xserver/files/ati-install-dev.sh deleted file mode 100755 index 9fe904a1..00000000 --- a/os-plugins/plugins/xserver/files/ati-install-dev.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh - -sh - -cd /opt/openslx/plugin-repo/xserver - -# 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/ -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 -cd ati - -#TODO: here we should do filecheck -#../${FILE_ATI} --check - -# extract ati file -../${FILE_ATI} --extract ./temp/ > /dev/null - -# we try to build the modules on our own. Perhaps we don't need all the -# packages and distribution stuff -cd temp/common/lib/modules/fglrx/build_mod -# faking environment -uname_r=$(find /lib/modules/2.6* -maxdepth 0|sed 's,/lib/modules/,,g'|sort|tail -n1) -sed -i "s,^uname_r.*$,uname_r=${uname_r}," make.sh -sed -i "s,kernel_release=.*,kernel_release=${uname_r}," make.sh -#uname -m: just x86_64 and ia64 will get checked. till we support 64bit -# we'll use i686 -sed -i "s,^uname_m.*$,uname_m=i686," make.sh -sh make.sh - - -# handle operating system -# firs we try it with a random suse one... perhaps it fit all our needs -# TODO: do we really need to know the specific distribution? -# TODO: get it from stage1 -#case "$SYSNAME" in -# "suse-10.2") -# PKGNAME="SuSE/SUSE102-IA32" -# ;; -# "ubuntu") -# PKGNAME="Ubuntu/7.10" -# ;; -# *) -# echo " * failed to identify Distribution. Exit." -# exit -# ;; -#esac - -# install -#cd ./temp/ -# -#./ati-installer.sh ${VERSION} --buildpkg ${PKGNAME} 2>&1 > ../out.txt -#cd .. -# -#if [ "$(grep 'successfully generated' out.txt | wc -l)" -eq 1 ]; then -# echo "System package extracted from driver archive..." -# -# if [ ! -d $INSTFOLDER ]; then -# mkdir -p $INSTFOLDER -# fi -# PKG=$(grep "successfully generated" out.txt | cut -d' ' -f2) -# -# # look for the last three letters in $PKG -# case ${PKG: -3} in -# rpm) -# rpm2cpio ${PKG} | cpio -i --make-directories 2>&1 > /dev/null -# ;; -# deb) -# # Do something -# ;; -# tgz|.gz) -# tar -zxf ${PKG} 2>&1 > /dev/null -# ;; -# *) -# # Do something as default -# echo "System Package format not recognized!" -# exit 1 -# ;; -# esac -#fi -#rm -rf out.txt diff --git a/os-plugins/plugins/xserver/files/ati-install.sh b/os-plugins/plugins/xserver/files/ati-install.sh index c01be35c..5fd975bc 100755 --- a/os-plugins/plugins/xserver/files/ati-install.sh +++ b/os-plugins/plugins/xserver/files/ati-install.sh @@ -1,97 +1,61 @@ #!/bin/sh -########################################################## -# This file is responsible to extract system packages -# out of corresponding driver archives -# -# Arguments (optional): -# 1: temporary folder, where we put all the extracted files in. -# - default: put all extracted files in ./ati-files -# and all driver files in ./ati-root -# -########################################################## - -#set -x - -DEBUG=false - -TMP_FOLDER="$1" -FOLDER=`pwd` -if [ "$TMP_FOLDER" -eq "" ]; then - TMP_FOLDER=${FOLDER} -fi - -FILE_ATI=$FOLDER/ati-driver-installer*.run - - -########################################################## -# function ati_extract: Extract files from ATI-Package -#-------------------------------------------------------- -# -# This function extracts the package for the right system -# from the driver archive of ATI. -# -########################################################## -function ati_extract { - INSTFOLDER=$1 - - - if [ -f ${FILE_ATI} ]; then - chmod +x ${FILE_ATI} - ${FILE_ATI} --extract ${TMP_FOLDER}/ati-files 2>&1 > /dev/null - else - echo "Could not extract ATI driver files!\n Please make sure that archive is not located in /tmp" +cd /opt/openslx/plugin-repo/xserver + +# 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 - - # here we will just create a package to extract it later - # and have all things in one place - VERSION=`head ${FILE_ATI} | grep "label=" | sed -e 's,.*Driver-\(.*\)",\1,g'` - - # TODO: distinguish between 32-bit and 64-bit - PKGNAME="SuSE/SUSE102-IA32" - - pushd ${TMP_FOLDER}/ati-files - ./ati-installer.sh $VERSION --buildpkg ${PKGNAME} 2>&1 > out.txt - - if [ `grep "successfully generated" out.txt | wc -l` -eq 1 ]; then - echo "* Package extracted from ATI driver archive..." - else - return - fi - - if [ ! -d $INSTFOLDER ]; then - mkdir -p $INSTFOLDER - fi - PKG=`grep "successfully generated" out.txt | cut -d' ' -f2 ` + echo " * ati drivers will be reinstalled" + echo " * deleting old files" + rm -rf ati/ +fi - # extract files into ati-root - pushd $INSTFOLDER - - rpm2cpio ${PKG} | cpio -i --make-directories 2>&1 > /dev/null - if [ ! $? -eq 0 ]; then - echo "* Something went wrong extracting package!" - fi - - popd +#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 -############################################## -# Here main script starts -############################################## +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/2.6.18.8-0.9-bigsmp/build M=$(pwd) GCC_VER_MAJ=${GCC_VERSION} -ati_extract $FOLDER/ati-root +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 -if [ $DEBUG == "true" ] -then - /bin/bash - rm -rf ${TMP_FOLDER}/ati-files +# Todo: keep it for development purpose +#rm -rf temp/ -fi +sh |