![](https://seccdn.libravatar.org/avatar/eea1bd1789386ec01b7a96f636694133.jpg?s=120&d=mm&r=g)
Hi folks, whoever wants to switch to the latest ati driver and stumbled across the fact that it does not build on openSUSE 11.0 may like the script I attached to this file. Copy the contents between the "CUTCUTCUT ...." lines into a file, say ati-install and make it executable. Given the ati-driver-installer file as parameter, it autobuilds the required rpm package. Watchout, I do not know whether the newlines inserted into makepatch () are passed through my email program. If you get into trouble, I am willing to provide the script as such via email. Use it or discard it! And as always, on your own risk. You do not need to be root to execute it! Take care Dieter Jurzitza CUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUT #!/bin/sh RELEASEFILE=/etc/SuSE-release PATCHNAME=ati-2.6.25-build-fix.diff SYSTEM=`uname -m` function makepatch () { echo "--- firegl_public.c.orig 2008-11-11 17:18:15.000000000 +0100" > ${PATCHNAME} echo "+++ firegl_public.c 2008-11-16 19:21:21.000000000 +0100"
${PATCHNAME} echo "@@ -243,7 +243,7 @@" >> ${PATCHNAME} echo " const char BUILD_KERNEL_HAS_MODVERSIONS_CLEARED;" >> ${PATCHNAME} echo " #endif" >> ${PATCHNAME} echo " " >> ${PATCHNAME} echo "-#ifdef __SMP__" >> ${PATCHNAME} echo "+#if CONFIG_SMP" >> ${PATCHNAME} echo " const unsigned long __ke_SMP_State = 1;" >> ${PATCHNAME} echo " const char BUILD_KERNEL_HAS_SMP_SET;" >> ${PATCHNAME} echo " #else" >> ${PATCHNAME} echo "@@ -2481,7 +2481,7 @@" >> ${PATCHNAME} echo " " >> ${PATCHNAME}
echo " /*****************************************************************************/"
${PATCHNAME} echo " " >> ${PATCHNAME} echo "-#ifdef __SMP__" >> ${PATCHNAME} echo "+#if CONFIG_SMP" >> ${PATCHNAME} echo " static atomic_t cpus_waiting;" >> ${PATCHNAME} echo " " >> ${PATCHNAME} echo " static void deferred_flush(void* contextp)" >> ${PATCHNAME} echo "@@ -2497,7 +2497,7 @@" >> ${PATCHNAME} echo " while (atomic_read(&cpus_waiting) > 0)" >> ${PATCHNAME} echo " barrier();" >> ${PATCHNAME} echo " }" >> ${PATCHNAME} echo "-#endif /* __SMP__ */" >> ${PATCHNAME} echo "+#endif /* CONFIG_SMP */" >> ${PATCHNAME} echo " " >> ${PATCHNAME} echo " /** \brief Run a function on all other CPUs." >> ${PATCHNAME} echo " * \param func The function to run." >> ${PATCHNAME} echo "@@ -2513,7 +2513,7 @@" >> ${PATCHNAME} echo " " >> ${PATCHNAME} echo " int ATI_API_CALL __ke_flush_cache(void)" >> ${PATCHNAME} echo " {" >> ${PATCHNAME} echo "-#ifdef __SMP__" >> ${PATCHNAME} echo "+#if CONFIG_SMP" >> ${PATCHNAME} echo " /* write back invalidate all other CPUs (exported by kernel) */" >> ${PATCHNAME} echo " if (KCL_SmpCallFunction(deferred_flush, NULL, 1, 0) != 0)" >> ${PATCHNAME} echo " panic(\"timed out waiting for the other CPUs!\n\");" ${PATCHNAME} echo "@@ -2529,7 +2529,7 @@" >> ${PATCHNAME} echo " " >> ${PATCHNAME} echo " while (atomic_read(&cpus_waiting) > 0)" >> ${PATCHNAME} echo " barrier();" >> ${PATCHNAME} echo "-#else /* !__SMP__ */" >> ${PATCHNAME} echo "+#else /* !CONFIG_SMP */" >> ${PATCHNAME} echo " #if defined(__i386__) || defined(__x86_64__)" >> ${PATCHNAME} echo " asm volatile (\"wbinvd\":::\"memory\");" >> ${PATCHNAME} echo " #elif defined(__alpha__) || defined(__sparc__)" >> ${PATCHNAME} echo "@@ -2537,7 +2537,7 @@" >> ${PATCHNAME} echo " #else" >> ${PATCHNAME} echo " #error \"Please define flush_cache for your architecture.\"" >> ${PATCHNAME} echo " #endif" >> ${PATCHNAME} echo "-#endif /* !__SMP__ */" >> ${PATCHNAME} echo "+#endif /* !CONFIG_SMP */" >> ${PATCHNAME} echo " " >> ${PATCHNAME} echo " //for kernel 2.6.25, tlb_flush has been included when calling set_pages_*." >> ${PATCHNAME} echo " #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)" >> ${PATCHNAME} }
echo "Creating ATI-RPM for openSUSE" echo "" makepatch if [ ! -f ${RELEASEFILE} ]; then echo "File /etc/SuSE-release is missing, sure you're on opensuse?" echo "I cannot proceed this way!" exit 1 fi if [ "" == "${1}" ]; then echo "" echo "Patchfile to modify catalyst 8.11 installer on openSUSE 11.0" echo "and prepare an installable rpm-package for your system!" echo "call ati-install ati-driver-installer-8-11-x86.x86_64.run" echo "" exit 2 fi VERSION=`cat /etc/SuSE-release | grep VERSION | sed 's/.*=\ //g; s/\.//g'` export VERSION=`echo ${VERSION} | sed 's/\.//g'` if [ "x86_64" == "${SYSTEM}" ]; then PACKAGE="SuSE/SUSE${VERSION}-AMD64" else PACKAGE="SuSE/SUSE${VERSION}-IA32" fi echo -n "Building for ${PACKAGE} ..." DIRECTORY=`/bin/sh $1 --extract 2>&1 | sed '/fglrx-install/!d; s/.*fglrx-install /fglrx-install/g'` cp ${PATCHNAME} ./${DIRECTORY}/packages/SuSE cd ${DIRECTORY} /bin/sh ./ati-installer.sh 8.552 --buildpkg "${PACKAGE}" > ../logfile 2>&1 cd .. if [ "" != "${DIRECTORY}" ]; then /bin/rm -rf ${DIRECTORY} /bin/rm -f ${PATCHNAME} fi echo "... done!" CUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUTCUT -- ----------------------------------------------------------- | \ /\_/\ | | ~x~ |/-----\ / \ /- \_/ ^^__ _ / _ ____ / <°°__ \- \_/ | |/ | | || || _| _| _| _| if you really want to see the pictures above - use some font with constant spacing like courier! :-) ----------------------------------------------------------- -- Um die Liste abzubestellen, schicken Sie eine Mail an: opensuse-de+unsubscribe@opensuse.org Um eine Liste aller verfuegbaren Kommandos zu bekommen, schicken Sie eine Mail an: opensuse-de+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/7cf94e20656d4d219ee2a3a5380fe929.jpg?s=120&d=mm&r=g)
Dieter Jurzitza wrote:
[...] VERSION=`cat /etc/SuSE-release | grep VERSION | sed 's/.*=\ //g; s/\.//g'`
Nur mal so als Anmerkung, wo ich z.B. obige Zeile in Deinem Skript sehe: Du bekommst hier vermutlich mehrere Useless-Use-Of Awards. Die zwei Pipes sowie cat und grep werden hier nicht gebraucht. Das eigentliche Scipting liesse sich sicher verbessern. Wundere mich, dass David darauf nicht angesprungen ist ;-) Take care, Th. -- Um die Liste abzubestellen, schicken Sie eine Mail an: opensuse-de+unsubscribe@opensuse.org Um eine Liste aller verfuegbaren Kommandos zu bekommen, schicken Sie eine Mail an: opensuse-de+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/363424a7062b0e7a90527600f3760d46.jpg?s=120&d=mm&r=g)
Hallo, Am Mit, 03 Dez 2008, Thomas Hertweck schrieb:
Dieter Jurzitza wrote:
[...] VERSION=`cat /etc/SuSE-release | grep VERSION | sed 's/.*=\ //g; s/\.//g'`
Nur mal so als Anmerkung, wo ich z.B. obige Zeile in Deinem Skript sehe: Du bekommst hier vermutlich mehrere Useless-Use-Of Awards. Die zwei Pipes sowie cat und grep werden hier nicht gebraucht. Das eigentliche Scipting liesse sich sicher verbessern. Wundere mich, dass David darauf nicht angesprungen ist ;-)
Das ganze Script ist sowas von gruselig, das war mir zu anstrengend. Obiges geht z.B. als: export VERSION="$(sed -n '/VERSION/{ s/[^0-9]*\([0-9.]\+\).*/\1/; s/\.//; p; }' /etc/SuSE-release)" oder eval "export $(sed -n '/VERSION/{s/ //g;s/\.//;p;}' < /etc/SuSE-release)" HTH, -dnh -- "Reality is that which, when you stop believing in it, doesn't go away". -- Philip K. Dick -- Um die Liste abzubestellen, schicken Sie eine Mail an: opensuse-de+unsubscribe@opensuse.org Um eine Liste aller verfuegbaren Kommandos zu bekommen, schicken Sie eine Mail an: opensuse-de+help@opensuse.org
participants (3)
-
David Haller
-
Dieter Jurzitza
-
Thomas Hertweck