[Lunar-commits] <moonbase> fglrx: Update to 8-5. Reworked the whole module.

Moritz Heiber moe at lunar-linux.org
Fri Jun 6 19:37:49 CEST 2008


commit 993c92ef5dedd5fc3ad8c1d61c9110c97659e46a
Author: Moritz Heiber <moe at lunar-linux.org>
Date:   Thu Jun 5 00:51:29 2008 +0200

    fglrx: Update to 8-5. Reworked the whole module.
    
    I rewrote the install routine to fit the ati installer as
    closely as possible. Also used their make.sh since otherwise
    it kinda fails.
    
    I'm also going to write a howto about installing it at the wiki ..
    tomorrow ...
---
 x11/fglrx/BUILD          |  161 +++++++++++++++++++++++++++-------------------
 x11/fglrx/CONFLICTS      |    4 +
 x11/fglrx/DETAILS        |   10 ++--
 x11/fglrx/DETAILS.x86_64 |    8 +-
 4 files changed, 109 insertions(+), 74 deletions(-)

diff --git a/x11/fglrx/BUILD b/x11/fglrx/BUILD
index ade4045..6c718e1 100644
--- a/x11/fglrx/BUILD
+++ b/x11/fglrx/BUILD
@@ -1,68 +1,99 @@
 (
-# For future use. AMD seems to be always too late
-#if [ `uname -r | cut -d. -f2` -ge 6 ] && [ `uname -r | cut -d. -f3` -ge 23 ]; then
-#   message "${PROBLEM_COLOR}Current fglrx driver does not work with kernels greater than ${VERSION_COLOR}2.6.22"
-#   message "${MESSAGE_COLOR}Your kernel is at version ${VERSION_COLOR}`uname -r`${DEFAULT_COLOR}"
-#   exit 1
-#else
-        prepare_install &&
-        sh $SOURCE --extract fglrx-install &&
-        cd fglrx-install &&
-
-        cp -af common/etc / &&
-if [ ! -f /etc/ati/amdpcsdb ]; then
-        install -m666 /etc/ati/amdpcsdb.default /etc/ati/amdpcsdb
-fi &&
-        cp -af common/usr/sbin /usr &&
-        cp -af common/usr/share/ati /usr/share &&
-        cp -af common/usr/share/doc /usr/share &&
-        cp -af common/usr/share/icons /usr/share &&
-        cp -af common/usr/share/man /usr/share &&
-        cp -af common/usr/include /usr &&
-        cp -af common/usr/X11R6/include /usr/X11R6 &&
-        install -m644 packages/Debian/dists/sid/amdcccle.desktop /usr/share/applications &&
-
-        rm -f /usr/lib/libGL.so.1 /usr/lib/libGL.so &&
-        ln -fs /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.1 &&
-        ln -fs /usr/lib/libGL.so.1 /usr/lib/libGL.so &&
-
-        BIT="" BITA="" BT=""
-
-if [ -d /usr/lib64 ]; then
-        BIT="_64" BITA="_64a" BT="64"
-fi &&
-
-        cp -af arch/x86$BIT/lib common &&
-        cp -af arch/x86$BIT/usr/sbin /usr &&
-        install -m755 arch/x86$BIT/usr/X11R6/bin/* /usr/X11R6/bin &&
-        cp -af arch/x86$BIT/usr/X11R6/lib$BT/lib* /usr/X11R6/lib$BT &&
-        cp -af arch/x86$BIT/usr/X11R6/lib$BT/modules /usr/X11R6/lib$BT/xorg &&
-        cp -af x710$BITA/usr/X11R6/lib$BT/modules /usr/X11R6/lib$BT/xorg &&
-        mkdir -p /usr/X11R6/lib$BT/dri &&
-        ln -sf /usr/X11R6/lib$BT/xorg/modules/dri/fglrx_dri.so /usr/X11R6/lib$BT/dri/fglrx_dri.so &&
-
-
-        export KPATH="/usr/src/linux" &&
-
-        KVER=$(if [ -f $KPATH/include/linux/utsrelease.h ]; then
-                grep UTS_RELEASE $KPATH/include/linux/utsrelease.h | cut -d'"' -f2
-        else
-                grep UTS_RELEASE $KPATH/include/linux/version.h | cut -d'"' -f2
-        fi) &&
-
-        if echo $KVER | grep -q '^2.6' ; then
-                MOD_EXT=ko
-        else
-                MOD_EXT=o
-        fi &&
-
-        cd common/lib/modules/fglrx/build_mod/2.6.x &&
-        make KVER="$KVER" &&
-        mkdir -p /lib/modules/${KVER}/drivers/char/drm &&
-        install -m644 fglrx.${MOD_EXT} /lib/modules/${KVER}/drivers/char/drm/fglrx.${MOD_EXT} &&
-
-        #Update module dependencies
-        depmod
-#fi
+  FGLRX_DIRECTORY="$SOURCE_DIRECTORY/fglrx-install"
+
+  unset BIT BITA BT
+
+  if [ -d /usr/lib64 ]; then
+    BIT="_64" BITA="_64a" BT="64"
+  fi &&
+
+  sh $SOURCE --extract fglrx-install &&
+  cd fglrx-install &&
+
+  # We build the kernel BEFORE actually calling prepare install
+  # so it doesn't remove a working driver incase the kernel module
+  # fails to compile  
+
+  export KPATH="/usr/src/linux" &&
+
+  if [ -f $KPATH/include/linux/utsrelease.h ]; then
+    KVER=`grep UTS_RELEASE $KPATH/include/linux/utsrelease.h | cut -d'"' -f2`
+  else
+    KVER=`grep UTS_RELEASE $KPATH/include/linux/version.h | cut -d'"' -f2`
+  fi &&
+
+  export KPATH KVER &&
+
+  cd common/lib/modules/fglrx/build_mod/ &&
+
+  # This symlink is needed for the kernel module to compile correctly
+  ln -s $FGLRX_DIRECTORY/arch/x86${BIT}/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC4 \
+        $FGLRX_DIRECTORY/common/lib/modules/fglrx/build_mod &&
+
+  sh make.sh &&
+
+  cd $FGLRX_DIRECTORY &&
+
+  prepare_install &&
+
+  mkdir -p /etc/ati &&
+
+  # Install /etc files
+  for file in common/etc/ati/*; do
+    install -m0644 $file /etc/ati/
+  done &&
+
+  if [ ! -f /etc/ati/amdpcsdb ]; then
+    install -m666 /etc/ati/amdpcsdb.default /etc/ati/amdpcsdb
+  fi &&
+  
+  # Easy way out
+  cp -af common/usr/sbin /usr &&
+  cp -af common/usr/share/ati /usr/share &&
+  cp -af common/usr/share/doc /usr/share &&
+  cp -af common/usr/share/icons /usr/share &&
+  cp -af common/usr/share/man /usr/share &&
+  cp -af common/usr/include /usr &&
+
+  # X11R6 is deprecated
+  
+  cp -af common/usr/X11R6/include /usr/X11 &&
+  install -m644 packages/Debian/dists/sid/amdcccle.desktop /usr/share/applications &&
+
+  cp -af arch/x86$BIT/usr/sbin /usr &&
+
+  install -m755 arch/x86$BIT/usr/X11R6/bin/* /usr/X11/bin/ &&
+
+  mkdir -p /usr/X11/lib/dri &&
+
+  cp -af arch/x86$BIT/usr/X11R6/lib$BT/lib* /usr/X11/lib$BT/xorg/ &&
+  cp -af arch/x86$BIT/usr/X11R6/lib$BT/modules/dri/fglrx_dri.so \
+         /usr/X11/lib/dri &&
+
+  # Setup symlinks
+  ln -sf /usr/X11/lib/xorg/libGL.so.1.2 \
+         /usr/X11/lib/libGL.so.1 &&
+
+  ln -sf /usr/X11/lib/xorg/libGL.so.1.2 \
+         /usr/X11/lib/libGL.so &&
+
+  unset file
+
+  for file in libfglrx_dm libfglrx_gamma libfglrx_pp libfglrx_tvout ; do
+    ln -s /usr/X11/lib/xorg/${file}.so.1.0 \
+          /usr/X11/lib/xorg/${file}.so.1
+  done &&
+
+  cp -af x710$BITA/usr/X11R6/lib$BT/modules /usr/X11/lib$BT/xorg/ &&
+
+  mkdir -p /usr/X11/lib$BT/modules/dri &&
+  ln -sf /usr/X11/lib/dri/fglrx_dri.so /usr/X11/lib$BT/modules/dri/ &&
+
+  mkdir -p /lib/modules/${KVER}/drivers/char/drm &&
+  install -m644 common/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko \
+          /lib/modules/${KVER}/drivers/char/drm/fglrx.ko &&
+
+  #Update module dependencies
+  depmod
 
 ) > $C_FIFO 2>&1
diff --git a/x11/fglrx/CONFLICTS b/x11/fglrx/CONFLICTS
new file mode 100644
index 0000000..30e43c9
--- /dev/null
+++ b/x11/fglrx/CONFLICTS
@@ -0,0 +1,4 @@
+conflicts mesa-lib
+conflicts drm-git
+conflicts NVIDIA
+conflicts NVIDIA-beta
diff --git a/x11/fglrx/DETAILS b/x11/fglrx/DETAILS
index aff27d1..b003e8c 100644
--- a/x11/fglrx/DETAILS
+++ b/x11/fglrx/DETAILS
@@ -1,15 +1,15 @@
           MODULE=fglrx
-         VERSION=8-3
+         VERSION=8-5
           SOURCE=ati-driver-installer-$VERSION-x86.x86_64.run
-      SOURCE_URL=https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/
-      SOURCE_VFY=sha1:8fbba3deb2bda52162ea7d0aa292dce7595ed73e
+      SOURCE_URL=https://www2.ati.com/drivers/linux/
+      SOURCE_VFY=sha1:37210979c6e5fd24e7eda283233e2c0acdf3d3c7
          LICENSE="proprietary"
         WEB_SITE=http://ati.amd.com/
          ENTERED=20040220
-         UPDATED=20080213
+         UPDATED=20080604
            SHORT="Proprietary X.org driver for the AMD ATI Radeon GPUs"
 cat << EOF
-Proprietary X.Org driver for the AMD ATI Radeon GPUs:
+Proprietary X.Org driver for AMD ATI Radeon GPUs:
 9500 and later (also mobility)
 Xxxx and later (also mobility)
 Radeon HD
diff --git a/x11/fglrx/DETAILS.x86_64 b/x11/fglrx/DETAILS.x86_64
index 1327269..b6d4c36 100644
--- a/x11/fglrx/DETAILS.x86_64
+++ b/x11/fglrx/DETAILS.x86_64
@@ -1,12 +1,12 @@
           MODULE=fglrx
-         VERSION=8-02
+         VERSION=8-5
           SOURCE=ati-driver-installer-$VERSION-x86.x86_64.run
-      SOURCE_URL=https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/
-      SOURCE_VFY=sha1:ce69768214a3d834db39b3f9fa9d91809bc95563
+      SOURCE_URL=https://www2.ati.com/drivers/linux/
+      SOURCE_VFY=sha1:37210979c6e5fd24e7eda283233e2c0acdf3d3c7
          LICENSE="proprietary"
         WEB_SITE=http://ati.amd.com/
          ENTERED=20040220
-         UPDATED=20080213
+         UPDATED=20080604
            SHORT="Proprietary X.org driver for the AMD ATI Radeon GPUs"
 cat << EOF
 Proprietary X.Org driver for the AMD ATI Radeon GPUs:


More information about the Lunar-commits mailing list