mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 12:57:14 +08:00
initial commit of catalyst-legacy
This commit is contained in:
parent
f3b068c439
commit
40ea16429c
21
catalyst-legacy/3.2.8.patch
Normal file
21
catalyst-legacy/3.2.8.patch
Normal file
@ -0,0 +1,21 @@
|
||||
Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
|
||||
---
|
||||
--- 12.1/common/lib/modules/fglrx/build_mod/firegl_public.c
|
||||
+++ 12.1/common/lib/modules/fglrx/build_mod/firegl_public.c
|
||||
@@ -5797,10 +5797,16 @@ void ATI_API_CALL KCL_fpu_begin(void)
|
||||
#ifdef CONFIG_X86_64
|
||||
kernel_fpu_begin();
|
||||
#else
|
||||
+#ifndef TS_USEDFPU
|
||||
+ preempt_disable();
|
||||
+ if (__thread_has_fpu(current))
|
||||
+ __save_init_fpu(current);
|
||||
+#else
|
||||
struct thread_info *cur_task = current_thread_info();
|
||||
preempt_disable();
|
||||
if (cur_task->status & TS_USEDFPU)
|
||||
__save_init_fpu(cur_task->task);
|
||||
+#endif
|
||||
else
|
||||
clts();
|
||||
#endif
|
40
catalyst-legacy/3.4.patch
Normal file
40
catalyst-legacy/3.4.patch
Normal file
@ -0,0 +1,40 @@
|
||||
--- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-05-26 18:33:25.044695179 +0200
|
||||
+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-05-26 18:28:39.692699095 +0200
|
||||
@@ -188,6 +188,12 @@
|
||||
#include <linux/swap.h>
|
||||
#include "asm/i387.h"
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
|
||||
+#ifdef CONFIG_X86_32
|
||||
+#include "asm/fpu-internal.h"
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
#include "firegl_public.h"
|
||||
#include "kcl_osconfig.h"
|
||||
#include "kcl_io.h"
|
||||
@@ -4154,7 +4160,11 @@ static int kasInitExecutionLevels(unsign
|
||||
{
|
||||
unsigned int p;
|
||||
KCL_DEBUG5(FN_FIREGL_KAS, "%d\n", level_init);
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
|
||||
+ for_each_possible_cpu(p)
|
||||
+#else
|
||||
for_each_cpu_mask(p, cpu_possible_map)
|
||||
+#endif
|
||||
{
|
||||
KCL_DEBUG1(FN_FIREGL_KAS,"Setting initial execution level for CPU # %d\n", p);
|
||||
preempt_disable();
|
||||
--- a/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:11:03.402987821 +0200
|
||||
+++ b/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:13:00.273986422 +0200
|
||||
@@ -217,6 +217,10 @@
|
||||
* \param size [in] Number of bytes to allocate
|
||||
* \return Pointer to allocated memory
|
||||
*/
|
||||
+#ifndef CONFIG_X86_X32
|
||||
+DEFINE_PER_CPU(unsigned long, old_rsp);
|
||||
+#endif
|
||||
+
|
||||
void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
|
||||
{
|
||||
void __user *ret = COMPAT_ALLOC_USER_SPACE(size);
|
105
catalyst-legacy/PKGBUILD
Normal file
105
catalyst-legacy/PKGBUILD
Normal file
@ -0,0 +1,105 @@
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
_kernver="3.4.3-1-CHAKRA"
|
||||
|
||||
pkgname=catalyst-legacy
|
||||
pkgver=12.6
|
||||
pkgrel=1
|
||||
pkgdesc="AMD/ATI Catalyst drivers for linux. fglrx kernel module only"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://www.ati.amd.com"
|
||||
screenshot="http://linuxtation3.files.wordpress.com/2007/03/pantallazo.jpg"
|
||||
license=('custom')
|
||||
depends=('linux>=3.4' 'linux<3.5' 'catalyst-utils-legacy')
|
||||
makedepends=('gcc-libs' 'gcc>4.0.0' 'make' 'linux-headers')
|
||||
conflicts=('catalyst-test' 'nvidia' 'xf86-video-ati' 'xf86-video-radeonhd' 'ati-dri' 'catalyst')
|
||||
install=catalyst.install
|
||||
|
||||
source=(http://www2.ati.com/drivers/legacy/amd-driver-installer-12.6-legacy-x86.x86_64.zip
|
||||
ati_make.sh
|
||||
makefile_compat.patch
|
||||
3.2.8.patch
|
||||
catalyst/3.4.patch)
|
||||
|
||||
md5sums=('36d5a91d60673b26705e9ac2df952daf'
|
||||
'660396540b0ceaff71d6155c986734de'
|
||||
'3e1b82bd69774ea808da69c983d6a43b'
|
||||
'32c8142c73dcfed5db426f494feda9e3'
|
||||
'7b229c6e48ee3f1af0d97059b9fa5cfe')
|
||||
|
||||
build() {
|
||||
|
||||
msg "Setting compilation variables ..."
|
||||
# include ati_make.sh and use _ati_check function from it
|
||||
. ati_make.sh
|
||||
_ati_check
|
||||
|
||||
|
||||
msg "Unpacking archive ..."
|
||||
/bin/sh ./amd-driver-installer-12.6-legacy-x86.x86_64.run --extract archive_files
|
||||
|
||||
|
||||
if [ "${CARCH}" = "x86_64" ]; then
|
||||
BUILDARCH=x86_64
|
||||
_archdir=x86_64
|
||||
fi
|
||||
if [ "${CARCH}" = "i686" ]; then
|
||||
BUILDARCH=i386
|
||||
_archdir=x86
|
||||
fi
|
||||
|
||||
cd "${srcdir}/archive_files/"
|
||||
|
||||
|
||||
msg "Applying patch(es) ..."
|
||||
# makefile patch to choose arch_compat_alloc_user_space or older compat_alloc_user_space
|
||||
# works only in combination with ati_make.sh script
|
||||
patch -p1 -i ../makefile_compat.patch
|
||||
|
||||
#patch -p1 -i ../3.2.8.patch
|
||||
#patch -p1 -i ../3.4.patch
|
||||
|
||||
cd "${srcdir}/archive_files/common/lib/modules/fglrx/build_mod"
|
||||
cp "${srcdir}/archive_files/arch/${_archdir}/lib/modules/fglrx/build_mod/libfglrx_ip.a" .
|
||||
cp 2.6.x/Makefile .
|
||||
|
||||
|
||||
msg "Compiling fglrx module ..."
|
||||
# Compile module using _ati_check variables
|
||||
make -C /lib/modules/${_kernver}/build SUBDIRS="`pwd`" ARCH=${BUILDARCH} \
|
||||
MODFLAGS="-DMODULE -DATI -DFGL -DPAGE_ATTR_FIX=$PAGE_ATTR_FIX -DCOMPAT_ALLOC_USER_SPACE=$COMPAT_ALLOC_USER_SPACE $def_smp $def_modversions" \
|
||||
PAGE_ATTR_FIX=$PAGE_ATTR_FIX COMPAT_ALLOC_USER_SPACE=$COMPAT_ALLOC_USER_SPACE modules
|
||||
}
|
||||
|
||||
package() {
|
||||
|
||||
# here we are checking kernel's extramodules dir
|
||||
for r in /lib/modules/*; do
|
||||
s=${r:13}
|
||||
if [[ ${s:0:3} = "ext" ]]; then
|
||||
if [[ `cat ${r}/version | grep -c ${_kernver}` != 0 ]]; then
|
||||
_destidir=${s}
|
||||
sed -i -e "s/EXTRAMODULES=.*/EXTRAMODULES=${s}/" $startdir/catalyst.install
|
||||
fi
|
||||
elif [[ ${s} = ${_kernver} ]] && [[ ! -e ${r}/extramodules ]]; then
|
||||
_destidir=${_kernver}/video
|
||||
sed -i -e "s/EXTRAMODULES=.*/EXTRAMODULES=null/" $startdir/catalyst.install
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
cd "${srcdir}/archive_files/common/lib/modules/fglrx/build_mod"
|
||||
install -m755 -d "${pkgdir}/lib/modules/${_destidir}/"
|
||||
install -m644 fglrx.ko "${pkgdir}/lib/modules/${_destidir}/"
|
||||
find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
|
||||
sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" $startdir/catalyst.install
|
||||
|
||||
# License
|
||||
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
install -m644 "${srcdir}/archive_files/LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/"
|
||||
|
||||
sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" $startdir/*.install
|
||||
}
|
145
catalyst-legacy/ati_make.sh
Normal file
145
catalyst-legacy/ati_make.sh
Normal file
@ -0,0 +1,145 @@
|
||||
#!/bin/bash
|
||||
### Vi0L0: it is ati's code from their make.sh file, modified a bit to fit our arch linux system, used inside PKGBUILD
|
||||
|
||||
# Copyright 1999-2005 ATI Technologies Inc., Markham, Ontario, CANADA.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Your use and or redistribution of this software in source and \ or
|
||||
# binary form, with or without modification, is subject to: (i) your
|
||||
# ongoing acceptance of and compliance with the terms and conditions of
|
||||
# the ATI Technologies Inc. software End User License Agreement; and (ii)
|
||||
# your inclusion of this notice in any version of this software that you
|
||||
# use or redistribute. A copy of the ATI Technologies Inc. software End
|
||||
# User License Agreement is included with this software and is also
|
||||
# available by contacting ATI Technologies Inc. at http://www.ati.com
|
||||
|
||||
|
||||
function _ati_check()
|
||||
{
|
||||
# ==============================================================
|
||||
# resolve if we are running a SMP enabled kernel
|
||||
|
||||
SMP=0
|
||||
|
||||
# 1
|
||||
# grep in OsVersion string for SMP specific keywords
|
||||
OsVersion=`uname -v`
|
||||
|
||||
if [ `echo $OsVersion | grep [sS][mM][pP] -c` -ne 0 ]; then
|
||||
SMP=1
|
||||
echo "OsVersion says: SMP=$SMP"
|
||||
fi
|
||||
|
||||
# 2
|
||||
# grep in /proc/ksyms for SMP specific kernel symbols
|
||||
# use triggerlevel of 10 occurences
|
||||
# (UP kernels might have 0-1, SMP kernels might have 32-45 or much more)
|
||||
|
||||
src_file=/proc/kallsyms
|
||||
|
||||
if [ -e $src_file ]; then
|
||||
if [ `fgrep smp $src_file -c` -gt 10 ]; then
|
||||
SMP=1
|
||||
echo "file $src_file says: SMP=$SMP"
|
||||
fi
|
||||
fi
|
||||
|
||||
# 3
|
||||
# linux/autoconf.h may contain this: #define CONFIG_SMP 1
|
||||
|
||||
# Before 2.6.33 autoconf.h is under linux/.
|
||||
# For 2.6.33 and later autoconf.h is under generated/.
|
||||
if [ -f /lib/modules/${_kernver}/build/include/generated/autoconf.h ]; then
|
||||
autoconf_h=/lib/modules/${_kernver}/build/include/generated/autoconf.h
|
||||
else
|
||||
autoconf_h=/lib/modules/${_kernver}/build/include/linux/autoconf.h
|
||||
fi
|
||||
src_file=$autoconf_h
|
||||
|
||||
if [ ! -e $src_file ]; then
|
||||
echo "Warning:"
|
||||
echo "kernel includes at /lib/modules/${_kernver}/build/include not found or incomplete"
|
||||
echo "file: $src_file"
|
||||
echo ""
|
||||
else
|
||||
if [ `cat $src_file | grep "#undef" | grep "CONFIG_SMP" -c` = 0 ]; then
|
||||
SMP=`cat $src_file | grep CONFIG_SMP | cut -d' ' -f3`
|
||||
echo "file $src_file says: SMP=$SMP"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$SMP" = 0 ]; then
|
||||
echo "assuming default: SMP=$SMP"
|
||||
fi
|
||||
|
||||
# act on final result
|
||||
if [ ! "$SMP" = 0 ]; then
|
||||
smp="-SMP"
|
||||
def_smp=-D__SMP__
|
||||
fi
|
||||
# ==============================================================
|
||||
# resolve whether we need to set PAGE_ATTR_FIX
|
||||
PAGE_ATTR_FIX=0
|
||||
|
||||
src_file=/proc/kallsyms
|
||||
|
||||
if [ -e $src_file ]; then
|
||||
if [ `fgrep " change_page_attr\$" $src_file -c` -gt 0 ]; then
|
||||
PAGE_ATTR_FIX=1
|
||||
echo "file $src_file says: PAGE_ATTR_FIX=$PAGE_ATTR_FIX"
|
||||
fi
|
||||
fi
|
||||
# ==============================================================
|
||||
# resolve if we are running a MODVERSIONS enabled kernel
|
||||
|
||||
MODVERSIONS=0
|
||||
|
||||
# autoconf.h may contain this: #define CONFIG_MODVERSIONS 1
|
||||
src_file=$autoconf_h
|
||||
if [ ! -e $src_file ];
|
||||
then
|
||||
echo "Warning:"
|
||||
echo "kernel includes at /lib/modules/${_kernver}/build/include not found or incomplete"
|
||||
echo "file: $src_file"
|
||||
echo ""
|
||||
else
|
||||
if [ `cat $src_file | grep "#undef" | grep "CONFIG_MODVERSIONS" -c` = 0 ]
|
||||
then
|
||||
MODVERSIONS=`cat $src_file | grep CONFIG_MODVERSIONS | cut -d' ' -f3`
|
||||
echo "file $src_file says: MODVERSIONS=$MODVERSIONS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$MODVERSIONS" = 0 ]
|
||||
then
|
||||
echo "assuming default: MODVERSIONS=$MODVERSIONS"
|
||||
fi
|
||||
|
||||
# act on final result
|
||||
if [ ! "$MODVERSIONS" = 0 ]
|
||||
then
|
||||
def_modversions="-DMODVERSIONS"
|
||||
fi
|
||||
|
||||
# ==============================================================
|
||||
# resolve if we are building for a kernel with a fix for CVE-2010-3081
|
||||
# On kernels with the fix, use arch_compat_alloc_user_space instead
|
||||
# of compat_alloc_user_space since the latter is GPL-only
|
||||
|
||||
COMPAT_ALLOC_USER_SPACE=compat_alloc_user_space
|
||||
|
||||
src_file=/lib/modules/${_kernver}/build/arch/x86/include/asm/compat.h
|
||||
if [ ! -e $src_file ];
|
||||
then
|
||||
echo "Warning:"
|
||||
echo "kernel includes at /lib/modules/${_kernver}/build/include not found or incomplete"
|
||||
echo "file: $src_file"
|
||||
echo ""
|
||||
else
|
||||
if [ `cat $src_file | grep -c arch_compat_alloc_user_space` -gt 0 ]
|
||||
then
|
||||
COMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space
|
||||
fi
|
||||
echo "file $src_file says: COMPAT_ALLOC_USER_SPACE=$COMPAT_ALLOC_USER_SPACE"
|
||||
fi
|
||||
}
|
31
catalyst-legacy/catalyst.install
Normal file
31
catalyst-legacy/catalyst.install
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
KERNEL_VERSION=3.4.3-1-CHAKRA
|
||||
|
||||
|
||||
remove_hook(){
|
||||
##removing hook's entries
|
||||
# remove hook fglrx
|
||||
sed '/^HOOKS/s/ *fglrx//' -i etc/mkinitcpio.conf
|
||||
# remove heads
|
||||
sed '/^SyncFirst/s/ *linux-headers//' -i etc/pacman.conf
|
||||
}
|
||||
|
||||
post_install() {
|
||||
EXTRAMODULES=extramodules-3.4-CHAKRA
|
||||
depmod $(cat /lib/modules/$EXTRAMODULES/version)
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
remove_hook
|
||||
EXTRAMODULES=extramodules-3.4-CHAKRA
|
||||
depmod $(cat /lib/modules/$EXTRAMODULES/version)
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
EXTRAMODULES=extramodules-3.4-CHAKRA
|
||||
depmod $(cat /lib/modules/$EXTRAMODULES/version)
|
||||
echo "----------------------------------------------------------------"
|
||||
echo "Don't forget to remove fglrx from MODULES array of /etc/rc.conf"
|
||||
echo "----------------------------------------------------------------"
|
||||
}
|
||||
|
10
catalyst-legacy/makefile_compat.patch
Normal file
10
catalyst-legacy/makefile_compat.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- 10.10/common/lib/modules/fglrx/build_mod/2.6.x/Makefile 2010-09-22 09:15:33.000000000 +0200
|
||||
+++ 10.10/common/lib/modules/fglrx/build_mod/2.6.x/Makefile 2010-10-01 17:57:21.057820899 +0200
|
||||
@@ -66,6 +66,7 @@
|
||||
-DFGL_GART_RESERVED_SLOT \
|
||||
-DFGL_LINUX253P1_VMA_API \
|
||||
-DPAGE_ATTR_FIX=$(PAGE_ATTR_FIX) \
|
||||
+ -DCOMPAT_ALLOC_USER_SPACE=$(COMPAT_ALLOC_USER_SPACE) \
|
||||
|
||||
ifeq ($(KERNELRELEASE),)
|
||||
# on first call from remote location we get into this path
|
16
catalyst-legacy/no_bkl.patch
Normal file
16
catalyst-legacy/no_bkl.patch
Normal file
@ -0,0 +1,16 @@
|
||||
--- cat11.2/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-02-02 19:39:49.000000000 +0100
|
||||
+++ cat11.2/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-02-17 14:45:38.197914622 +0100
|
||||
@@ -1894,13 +1894,11 @@
|
||||
/** \brief Grab global kernel lock */
|
||||
void ATI_API_CALL KCL_GlobalKernelLock(void)
|
||||
{
|
||||
- lock_kernel();
|
||||
}
|
||||
|
||||
/** \brief Release global kernel lock */
|
||||
void ATI_API_CALL KCL_GlobalKernelUnlock(void)
|
||||
{
|
||||
- unlock_kernel();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
159
catalyst-utils-legacy/PKGBUILD
Normal file
159
catalyst-utils-legacy/PKGBUILD
Normal file
@ -0,0 +1,159 @@
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer abveritas@chakra-project.org
|
||||
|
||||
pkgname=catalyst-utils-legacy
|
||||
pkgver=12.6
|
||||
pkgrel=1
|
||||
pkgdesc="AMD/ATI Catalyst drivers utilities and libraries."
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://www.ati.amd.com"
|
||||
license=('custom')
|
||||
depends=('xorg-server>=1.7.0' 'xorg-server<1.11.0' 'netkit-bsd-finger' 'libxrandr' 'libsm' 'fontconfig' 'libxcursor' 'libxi' 'gcc-libs' 'libxinerama')
|
||||
optdepends=('qt: to run ATi Catalyst Control Center (amdcccle)'
|
||||
'libxxf86vm: to run ATi Catalyst Control Center (amdcccle)')
|
||||
conflicts=('catalyst-test' 'nvidia-utils' 'libgl' 'catalystpxp-utils' 'catalyst-utils')
|
||||
provides=('libgl' "libatical=${pkgver}" 'catalyst-utils')
|
||||
install=${pkgname}.install
|
||||
|
||||
source=(
|
||||
#http://www2.ati.com/drivers/linux/amd-driver-installer-${pkgver/./-}-x86.x86_64.run
|
||||
http://www2.ati.com/drivers/legacy/amd-driver-installer-12.6-legacy-x86.x86_64.zip
|
||||
catalyst.sh
|
||||
amdcccle.desktop
|
||||
atieventsd.sh)
|
||||
|
||||
md5sums=('36d5a91d60673b26705e9ac2df952daf'
|
||||
'bdafe749e046bfddee2d1c5e90eabd83'
|
||||
'4efa8414a8fe9eeb50da38b5522ef81d'
|
||||
'f729bf913613f49b0b9759c246058a87')
|
||||
build() {
|
||||
## Unpack archive
|
||||
/bin/sh ./amd-driver-installer-12.6-legacy-x86.x86_64.run --extract archive_files
|
||||
}
|
||||
|
||||
package() {
|
||||
## Install userspace tools and libraries
|
||||
# Create directories
|
||||
install -m755 -d "${pkgdir}/etc/ati"
|
||||
install -m755 -d "${pkgdir}/etc/rc.d"
|
||||
install -m755 -d "${pkgdir}/etc/profile.d"
|
||||
install -m755 -d "${pkgdir}/etc/acpi/events"
|
||||
install -m755 -d "${pkgdir}/etc/security/console.apps"
|
||||
|
||||
install -m755 -d "${pkgdir}/usr/lib/xorg/modules/dri"
|
||||
install -m755 -d "${pkgdir}/usr/lib/xorg/modules/drivers"
|
||||
install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
|
||||
install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions/fglrx" # since 11.4
|
||||
install -m755 -d "${pkgdir}/usr/lib/xorg/modules/linux"
|
||||
install -m755 -d "${pkgdir}/usr/lib/dri"
|
||||
install -m755 -d "${pkgdir}/usr/lib/fglrx" # since 11.4
|
||||
|
||||
install -m755 -d "${pkgdir}/usr/bin"
|
||||
install -m755 -d "${pkgdir}/usr/sbin"
|
||||
|
||||
install -m755 -d "${pkgdir}/usr/include/X11/extensions"
|
||||
install -m755 -d "${pkgdir}/usr/include/GL"
|
||||
|
||||
install -m755 -d "${pkgdir}/usr/share/applications"
|
||||
install -m755 -d "${pkgdir}/usr/share/ati/amdcccle"
|
||||
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
install -m755 -d "${pkgdir}/usr/share/man/man8"
|
||||
install -m755 -d "${pkgdir}/usr/share/pixmaps"
|
||||
|
||||
# X.org driver
|
||||
if [ "${CARCH}" = "i686" ]; then
|
||||
cd "${srcdir}/archive_files/xpic/usr/X11R6/lib/modules" || return 1
|
||||
elif [ "${CARCH}" = "x86_64" ]; then
|
||||
cd "${srcdir}/archive_files/xpic_64a/usr/X11R6/lib64/modules" || return 1
|
||||
fi
|
||||
|
||||
# *.a added in 11.2, and removed in 11.3...
|
||||
#install -m644 *.a "${pkgdir}/usr/lib/xorg/modules/" || return 1
|
||||
install -m755 *.so "${pkgdir}/usr/lib/xorg/modules/" || return 1
|
||||
install -m755 drivers/*.so "${pkgdir}/usr/lib/xorg/modules/drivers/" || return 1
|
||||
install -m755 linux/*.so "${pkgdir}/usr/lib/xorg/modules/linux/" || return 1
|
||||
#install -m755 extensions/libglx.so "${pkgdir}/usr/lib/xorg/modules/extensions/" || return 1 #before 11.4
|
||||
install -m755 extensions/fglrx/fglrx-libglx.so "${pkgdir}/usr/lib/xorg/modules/extensions/fglrx/fglrx-libglx.so" || return 1 # since 11.5
|
||||
ln -snf /usr/lib/xorg/modules/extensions/fglrx/fglrx-libglx.so "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so" # since 11.4
|
||||
#install -m755 extensions/libdri.so "${pkgdir}/usr/lib/xorg/modules/extensions/libdri.ati" || return 1
|
||||
|
||||
# Controlcenter / libraries
|
||||
if [ "${CARCH}" = "i686" ]; then
|
||||
cd "${srcdir}/archive_files/arch/x86/usr" || return 1
|
||||
_lib=lib
|
||||
elif [ "${CARCH}" = "x86_64" ]; then
|
||||
cd "${srcdir}/archive_files/arch/x86_64/usr" || return 1
|
||||
_lib=lib64
|
||||
fi
|
||||
|
||||
install -m755 X11R6/bin/* "${pkgdir}/usr/bin/" || return 1
|
||||
install -m755 sbin/* "${pkgdir}/usr/sbin/" || return 1
|
||||
#install -m755 X11R6/${_lib}/*.so* "${pkgdir}/usr/lib/" || return #before 11.4
|
||||
install -m755 X11R6/${_lib}/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib/fglrx" || return 1 # since 11.5
|
||||
ln -snf /usr/lib/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib/fglrx/libGL.so.1.2" # since 11.4
|
||||
ln -snf /usr/lib/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib/fglrx-libGL.so.1.2" # since 11.4
|
||||
ln -snf /usr/lib/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib/libGL.so.1.2" # since 11.4
|
||||
ln -snf /usr/lib/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib/libGL.so.1" # since 11.4
|
||||
ln -snf /usr/lib/fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib/libGL.so" # since 11.4
|
||||
install -m755 X11R6/${_lib}/libAMDXvBA.so.1.0 "${pkgdir}/usr/lib/" || return 1 # since 11.4
|
||||
ln -snf libAMDXvBA.so.1.0 "${pkgdir}/usr/lib/libAMDXvBA.so.1" # since 11.4
|
||||
ln -snf libAMDXvBA.so.1.0 "${pkgdir}/usr/lib/libAMDXvBA.so" # since 11.4
|
||||
install -m755 X11R6/${_lib}/libatiadlxx.so "${pkgdir}/usr/lib/" || return 1 # since 11.4
|
||||
install -m755 X11R6/${_lib}/libfglrx_dm.so.1.0 "${pkgdir}/usr/lib/" || return 1 # since 11.4
|
||||
install -m755 X11R6/${_lib}/libXvBAW.so.1.0 "${pkgdir}/usr/lib/" || return 1 # since 11.4
|
||||
ln -snf libXvBAW.so.1.0 "${pkgdir}/usr/lib/libXvBAW.so.1" # since 11.4
|
||||
ln -snf libXvBAW.so.1.0 "${pkgdir}/usr/lib/libXvBAW.so" # since 11.4
|
||||
install -m644 X11R6/${_lib}/*.a "${pkgdir}/usr/lib/" || return 1 # really needed?
|
||||
install -m644 X11R6/${_lib}/*.cap "${pkgdir}/usr/lib/" || return 1
|
||||
install -m755 X11R6/${_lib}/modules/dri/*.so "${pkgdir}/usr/lib/xorg/modules/dri/" || return 1
|
||||
install -m755 ${_lib}/*.so* "${pkgdir}/usr/lib/" || return 1
|
||||
|
||||
## QT libs (only 2 files) - un-comment 2 lines below if you don't want to install qt package
|
||||
# install -m755 -d "${pkgdir}/usr/share/ati/${_lib}"
|
||||
# install -m755 share/ati/${_lib}/*.so* "${pkgdir}/usr/share/ati/${_lib}/" || return 1
|
||||
|
||||
ln -snf /usr/lib/xorg/modules/dri/fglrx_dri.so ${pkgdir}/usr/lib/dri/fglrx_dri.so
|
||||
ln -snf libfglrx_dm.so.1.0 "${pkgdir}/usr/lib/libfglrx_dm.so.1"
|
||||
ln -snf libfglrx_dm.so.1.0 "${pkgdir}/usr/lib/libfglrx_dm.so"
|
||||
#ln -sf libfglrx_pp.so.1.0 "${pkgdir}/usr/lib/libfglrx_pp.so.1"
|
||||
#ln -sf libfglrx_tvout.so.1.0 "${pkgdir}/usr/lib/libfglrx_tvout.so.1"
|
||||
#ln -sf libfglrx_gamma.so.1.0 "${pkgdir}/usr/lib/libfglrx_gamma.so.1"
|
||||
#ln -sf libGL.so.1.2 "${pkgdir}/usr/lib/libGL.so.1" #before 11.4
|
||||
#ln -sf libGL.so.1.2 "${pkgdir}/usr/lib/libGL.so" #before 11.4
|
||||
ln -snf libatiuki.so.1.0 "${pkgdir}/usr/lib/libatiuki.so.1"
|
||||
ln -snf libatiuki.so.1.0 "${pkgdir}/usr/lib/libatiuki.so"
|
||||
|
||||
|
||||
cd "${srcdir}"/archive_files/common
|
||||
install -m644 etc/ati/* "${pkgdir}/etc/ati/" || return 1
|
||||
chmod 755 "${pkgdir}/etc/ati/authatieventsd.sh" || return 1
|
||||
|
||||
#security provided with 10.9, is it working fine?
|
||||
install -m644 etc/security/console.apps/amdcccle-su "${pkgdir}/etc/security/console.apps/" || return 1
|
||||
|
||||
# *.h removed in 11.3...
|
||||
#install -m644 usr/X11R6/include/X11/extensions/*.h "${pkgdir}/usr/include/X11/extensions/" || return 1
|
||||
install -m644 usr/X11R6/bin/amdupdaterandrconfig "${pkgdir}/usr/bin/" || return 1
|
||||
install -m644 usr/include/GL/*.h "${pkgdir}/usr/include/GL/" || return 1
|
||||
install -m755 usr/sbin/*.sh "${pkgdir}/usr/sbin/" || return 1
|
||||
install -m644 usr/share/ati/amdcccle/* "${pkgdir}/usr/share/ati/amdcccle/" || return 1
|
||||
install -m644 usr/share/icons/*.xpm "${pkgdir}/usr/share/pixmaps/" || return 1
|
||||
install -m644 usr/share/man/man8/*.8 "${pkgdir}/usr/share/man/man8/" || return 1
|
||||
install -m644 "${srcdir}/amdcccle.desktop" "${pkgdir}/usr/share/applications/" || return 1
|
||||
|
||||
# ACPI example files
|
||||
install -m755 usr/share/doc/fglrx/examples/etc/acpi/*.sh "${pkgdir}/etc/acpi/" || return 1
|
||||
sed -i -e 's/usr\/X11R6/usr/g' "${pkgdir}/etc/acpi/ati-powermode.sh" || return 1
|
||||
install -m644 usr/share/doc/fglrx/examples/etc/acpi/events/* "${pkgdir}/etc/acpi/events/" || return 1
|
||||
|
||||
# Add ATI Events Daemon launcher
|
||||
install -m755 "${srcdir}/atieventsd.sh" "${pkgdir}/etc/rc.d/atieventsd" || return 1
|
||||
|
||||
# thanks to cerebral, we dont need that damned symlink
|
||||
install -m755 "${srcdir}/catalyst.sh" "${pkgdir}/etc/profile.d/" || return 1
|
||||
|
||||
# License
|
||||
install -m644 "${srcdir}/archive_files/LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1
|
||||
}
|
11
catalyst-utils-legacy/amdcccle.desktop
Normal file
11
catalyst-utils-legacy/amdcccle.desktop
Normal file
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Name=ATI Catalyst Control Center
|
||||
Comment=ATI graphics adapter settings
|
||||
Name[de]=ATI Catalyst Control Center
|
||||
Comment[de]=ATI grafics adapter settings
|
||||
Icon=ccc_large
|
||||
MiniIcon=ccc_small
|
||||
Exec=amdcccle
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Categories=Settings;DesktopSettings;
|
41
catalyst-utils-legacy/atieventsd.sh
Normal file
41
catalyst-utils-legacy/atieventsd.sh
Normal file
@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
|
||||
ATID_PID=`pidof -o %PPID /usr/sbin/atieventsd`
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
rc=0
|
||||
stat_busy "Starting ATI Events Daemon"
|
||||
[ -z "$ATID_PID" ] && /usr/sbin/atieventsd
|
||||
rc=$(($rc+$?))
|
||||
if [ $rc -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
add_daemon atieventsd
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
rc=0
|
||||
stat_busy "Stopping ATI Events Daemon"
|
||||
kill $ATID_PID &>/dev/null
|
||||
rc=$(($rc+$?))
|
||||
if [ $rc -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
rm_daemon atieventsd
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
esac
|
||||
exit 0
|
46
catalyst-utils-legacy/catalyst-utils-legacy.install
Normal file
46
catalyst-utils-legacy/catalyst-utils-legacy.install
Normal file
@ -0,0 +1,46 @@
|
||||
|
||||
whisperer(){
|
||||
echo "----------------------------------------------------------------"
|
||||
echo "PLEASE NOTE:"
|
||||
echo "For these drivers to work, you must install kernel modules."
|
||||
echo "Depending on your kernel, these module packages are named"
|
||||
echo "catalyst-\$kernel and stock kernel module is catalyst"
|
||||
echo ""
|
||||
echo "OR simply use packages that provides auto re-compilation:"
|
||||
echo "catalyst-hook or catalyst-daemon"
|
||||
echo ""
|
||||
echo "OR use catalyst-generator package to generate catalyst-{kernver}"
|
||||
echo "packages"
|
||||
echo "----------------------------------------------------------------"
|
||||
echo "You can use the tool 'aticonfig' to generate an xorg.conf file."
|
||||
echo "--------------------- ^^^^^^^^^ --------------------------------"
|
||||
echo "Add nomodeset to your kernel line in /boot/grub/grub.cfg , ie.:"
|
||||
echo "kernel /boot/vmlinuz-linux root=/dev/sda1 ro nomodeset"
|
||||
echo "----------------------------------------------------------------"
|
||||
echo "For more info and troubleshooting visit:"
|
||||
echo "http://chakra-linux.org/wiki/index.php/Switching_Between_Free_and_Non-free_Video-Drivers"
|
||||
echo "----------------------------------------------------------------"
|
||||
}
|
||||
|
||||
check_libdri_so(){
|
||||
if [ ! -e usr/lib/xorg/modules/extensions/libdri.so ]; then
|
||||
ln -sf usr/lib/xorg/modules/extensions/libdri.xorg usr/lib/xorg/modules/extensions/libdri.so
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
post_install(){
|
||||
check_libdri_so
|
||||
whisperer
|
||||
}
|
||||
|
||||
post_upgrade(){
|
||||
check_libdri_so
|
||||
whisperer
|
||||
}
|
||||
|
||||
post_remove(){
|
||||
# If the symlink is dead, remove it
|
||||
check_libdri_so
|
||||
echo "NOTE: Don't forget to recover your original xorg.conf file."
|
||||
}
|
11
catalyst-utils-legacy/catalyst.sh
Normal file
11
catalyst-utils-legacy/catalyst.sh
Normal file
@ -0,0 +1,11 @@
|
||||
if [ $LIBGL_DRIVERS_PATH ]
|
||||
then
|
||||
if ! set | grep LIBGL_DRIVERS_PATH | grep /usr/lib/xorg/modules/dri/ > /dev/null
|
||||
then
|
||||
LIBGL_DRIVERS_PATH=$LIBGL_DRIVERS_PATH:/usr/lib/xorg/modules/dri/
|
||||
export LIBGL_DRIVERS_PATH
|
||||
fi
|
||||
else
|
||||
LIBGL_DRIVERS_PATH=/usr/lib/xorg/modules/dri/
|
||||
export LIBGL_DRIVERS_PATH
|
||||
fi
|
Loading…
Reference in New Issue
Block a user