mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 23:57:13 +08:00
update catalyst and nvidia(-utils)
This commit is contained in:
parent
9f701d8f34
commit
8919d52990
@ -7,152 +7,164 @@
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
# Find the kernel name inside the chroot
|
||||
_kernver=`pacman -Qf kernel26 | cut -c10-15 | sed 's/kernel26 //g'`-CHAKRA
|
||||
|
||||
pkgname=catalyst
|
||||
pkgver=10.6
|
||||
pkgrel=3.2
|
||||
pkgdesc="AMD/ATI drivers for Radeon brand cards"
|
||||
pkgver=10.7
|
||||
pkgrel=1
|
||||
pkgdesc="AMD/ATI drivers for Radeon brand cards. Auto re-compile the fglrx module when kernel update."
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://www.ati.amd.com"
|
||||
license=('custom')
|
||||
depends=('xorg-server<1.9.0' 'kernel26>=2.6.29' 'kernel26<2.6.35' 'kernel26-headers' 'netkit-bsd-finger' 'libstdc++5' 'libxrandr' 'libsm' 'fontconfig' 'libxcursor' 'libxi' 'gcc-libs')
|
||||
depends=('xorg-server<1.9.0' 'kernel26>=2.6.29' 'kernel26<2.6.36' 'kernel26-headers' 'netkit-bsd-finger' 'libstdc++5' 'libxrandr' 'libsm' 'fontconfig' 'libxcursor' 'libxi' 'gcc-libs' 'gcc>4.0.0' 'make')
|
||||
optdepends=('lib32-catalyst-utils: 32-bit OpenGL applications support for x86_64 systems')
|
||||
replaces=('catalyst-nostock' 'libgl')
|
||||
conflicts=('catalyst-test' 'catalyst-utils' 'nvidia' 'libgl' 'xf86-video-ati' 'xf86-video-radeonhd' 'ati-dri')
|
||||
provides=('catalyst-utils' 'libgl' "libatical=${pkgver}")
|
||||
install=${pkgname}.install
|
||||
|
||||
conflicts=('catalyst' 'catalyst-utils' 'nvidia' 'libgl' 'catalyst-leaked' 'xf86-video-ati' 'xf86-video-radeonhd' 'ati-dri')
|
||||
provides=('catalyst' 'libgl' 'libatical')
|
||||
install=catalyst.install
|
||||
source=(http://www2.ati.com/drivers/linux/ati-driver-installer-${pkgver/./-}-x86.x86_64.run
|
||||
catalyst.sh amdcccle.desktop atieventsd.sh fglrx-2.6.34-rc4.patch)
|
||||
md5sums=('089967a9aa86ad596884d82bb0b3a382'
|
||||
#patch_file="fglrx-2.6.34.patch"
|
||||
#patch_md5="5d464f7068fb45a9d2013cbd6a0b2021"
|
||||
#patch_ver="2.6.34 2.6.35"
|
||||
|
||||
source=(
|
||||
http://www2.ati.com/drivers/linux/ati-driver-installer-${pkgver/./-}-x86.x86_64.run
|
||||
catalyst.sh
|
||||
amdcccle.desktop
|
||||
atieventsd.sh
|
||||
hook-fglrx
|
||||
catalyst_build_module)
|
||||
# ${patch_file})
|
||||
|
||||
md5sums=('0855d05f303a442aa493c8542e2993ef'
|
||||
'bdafe749e046bfddee2d1c5e90eabd83'
|
||||
'4efa8414a8fe9eeb50da38b5522ef81d'
|
||||
'f729bf913613f49b0b9759c246058a87'
|
||||
'5d464f7068fb45a9d2013cbd6a0b2021')
|
||||
'7d0eb7726c7d05dc24a49488c1bd7d88'
|
||||
'd2dac45c32dcc4cfd5ab10ddd59ffe40')
|
||||
# ${patch_md5})
|
||||
|
||||
build() {
|
||||
|
||||
/bin/sh ./ati-driver-installer-${pkgver/./-}-x86.x86_64.run --extract archive_files
|
||||
|
||||
##Build kernel modules
|
||||
|
||||
if [ "${CARCH}" = "x86_64" ]; then
|
||||
BUILDARCH=x86_64
|
||||
_archdir=x86_64
|
||||
fi
|
||||
if [ "${CARCH}" = "i686" ]; then
|
||||
BUILDARCH=i386
|
||||
_archdir=x86
|
||||
fi
|
||||
|
||||
#patching for kernel 2.6.33 or 2.6.34 support
|
||||
if [ `uname -r |grep -c "2.6.33"` != 0 ] || [ `uname -r |grep -c "2.6.34"` != 0 ]; then
|
||||
cd "${srcdir}/archive_files/"
|
||||
patch -Np1 -i ../fglrx-2.6.34-rc4.patch || return 1
|
||||
fi
|
||||
|
||||
|
||||
cd "${srcdir}/archive_files/common/lib/modules/fglrx/build_mod"
|
||||
cp "${srcdir}/archive_files/arch/${_archdir}/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC4" . || return 1
|
||||
cp 2.6.x/Makefile . || return 1
|
||||
|
||||
make -C /lib/modules/${_kernver}/build SUBDIRS="`pwd`" ARCH=${BUILDARCH} modules || return 1
|
||||
|
||||
install -m755 -d "${pkgdir}/lib/modules/${_kernver}/video/"
|
||||
install -m644 fglrx.ko "${pkgdir}/lib/modules/${_kernver}/video/" || return 1
|
||||
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
|
||||
sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" $startdir/*.install
|
||||
|
||||
##Install catalyst utilities
|
||||
|
||||
# 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}/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/linux"
|
||||
|
||||
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 driver installation
|
||||
if [ "${CARCH}" = "i686" ]; then
|
||||
cd "${srcdir}/archive_files/x750/usr/X11R6/lib/modules" || return 1
|
||||
elif [ "${CARCH}" = "x86_64" ]; then
|
||||
cd "${srcdir}/archive_files/x750_64a/usr/X11R6/lib64/modules" || return 1
|
||||
fi
|
||||
|
||||
#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
|
||||
#install -m755 extensions/libdri.so "${pkgdir}/usr/lib/xorg/modules/extensions/libdri.ati" || return 1
|
||||
|
||||
# Controlcenter / library installation
|
||||
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 1
|
||||
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
|
||||
|
||||
ln -sf /usr/lib/xorg/modules/dri ${pkgdir}/usr/lib/dri
|
||||
ln -sf libfglrx_dm.so.1.0 "${pkgdir}/usr/lib/libfglrx_dm.so.1"
|
||||
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"
|
||||
ln -sf libGL.so.1.2 "${pkgdir}/usr/lib/libGL.so"
|
||||
|
||||
cd "${srcdir}"/archive_files/common
|
||||
install -m644 etc/ati/* "${pkgdir}/etc/ati/" || return 1
|
||||
chmod 755 "${pkgdir}/etc/ati/authatieventsd.sh" || return 1
|
||||
|
||||
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 # ? what are these files for?
|
||||
# install -m644 usr/share/gnome/apps/amdcccle.desktop "${pkgdir}/usr/share/applications/" || 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/ATI_LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1
|
||||
## Unpack archive
|
||||
msg "Unpacking archive ..."
|
||||
/bin/sh ./ati-driver-installer-${pkgver/./-}-x86.x86_64.run --extract archive_files
|
||||
}
|
||||
|
||||
package() {
|
||||
## Install userspace tools and libraries
|
||||
msg "Installing 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}/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/linux"
|
||||
|
||||
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/x750/usr/X11R6/lib/modules" || return 1
|
||||
elif [ "${CARCH}" = "x86_64" ]; then
|
||||
cd "${srcdir}/archive_files/x750_64a/usr/X11R6/lib64/modules" || return 1
|
||||
fi
|
||||
|
||||
#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
|
||||
#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 1
|
||||
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
|
||||
|
||||
ln -sf /usr/lib/xorg/modules/dri ${pkgdir}/usr/lib/dri
|
||||
ln -sf libfglrx_dm.so.1.0 "${pkgdir}/usr/lib/libfglrx_dm.so.1"
|
||||
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"
|
||||
ln -sf libGL.so.1.2 "${pkgdir}/usr/lib/libGL.so"
|
||||
|
||||
cd "${srcdir}"/archive_files/common
|
||||
install -m644 etc/ati/* "${pkgdir}/etc/ati/" || return 1
|
||||
chmod 755 "${pkgdir}/etc/ati/authatieventsd.sh" || return 1
|
||||
|
||||
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 # ? what are these files for?
|
||||
# install -m644 usr/share/gnome/apps/amdcccle.desktop "${pkgdir}/usr/share/applications/" || 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/ATI_LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1
|
||||
|
||||
# Prepare modules source files
|
||||
_archdir=x86_64
|
||||
test "${CARCH}" = "i686" && _archdir=x86
|
||||
cd "${srcdir}/archive_files/"
|
||||
install -m755 -d "${pkgdir}/usr/share/ati/build_mod" || return 1
|
||||
install -m644 common/lib/modules/fglrx/build_mod/*.c \
|
||||
"${pkgdir}/usr/share/ati/build_mod/" || return 1
|
||||
install -m644 common/lib/modules/fglrx/build_mod/*.h \
|
||||
"${pkgdir}/usr/share/ati/build_mod/" || return 1
|
||||
install -m644 common/lib/modules/fglrx/build_mod/make.sh \
|
||||
"${pkgdir}/usr/share/ati/build_mod/" || return 1
|
||||
install -m644 common/lib/modules/fglrx/build_mod/2.6.x/Makefile \
|
||||
"${pkgdir}/usr/share/ati/build_mod/" || return 1
|
||||
install -m644 arch/${_archdir}/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC4 \
|
||||
"${pkgdir}/usr/share/ati/build_mod/" || return 1
|
||||
install -m755 "${srcdir}/catalyst_build_module" "${pkgdir}/usr/bin" || return 1
|
||||
|
||||
# optional patch
|
||||
for ver in ${patch_ver}; do
|
||||
install -m644 "${srcdir}/${patch_file}" \
|
||||
"${pkgdir}/usr/share/ati/build_mod/${ver}.patch" || return 1
|
||||
done
|
||||
|
||||
# hook fglrx
|
||||
install -m755 -d "${pkgdir}/lib/initcpio/install" || return 1
|
||||
install -m644 "${srcdir}/hook-fglrx" "${pkgdir}/lib/initcpio/install/fglrx" || return 1
|
||||
}
|
@ -1,52 +1,62 @@
|
||||
KERNEL_VERSION=2.6.33-CHAKRA
|
||||
|
||||
pre_install() {
|
||||
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
|
||||
whisperer(){
|
||||
echo "----------------------------------------------------------------"
|
||||
echo "You can use the tool 'aticonfig' to generate an xorg.conf file."
|
||||
echo "Remember to add fglrx to the MODULES list in /etc/rc.conf."
|
||||
echo "--------------- ^^^^^ ------ ^^^^^^^ ---------------------------"
|
||||
echo "Add nomodeset to your kernel line in /boot/grub/menu.lst , ie.:"
|
||||
echo "kernel /boot/vmlinuz26 root=/dev/sda1 ro nomodeset"
|
||||
echo "---------------------------------------- ^^^^^^^^^ -------------"
|
||||
echo "If experiencing problems with building module or using more than"
|
||||
echo "one kernel use catalyst_build_module command as root, more info:"
|
||||
echo "# catalyst_build_module --help"
|
||||
echo "- ^^^^^^^^^^^^^^^^^^^^^ ----------------------------------------"
|
||||
echo "If experiencing problems with white/gray/black_artifacts you can"
|
||||
echo "[as root] kill Xserver and use this command:"
|
||||
echo "# aticonfig --set-pcs-str=DDX,ForceXAA,TRUE"
|
||||
echo "----------------------------------------------------------------"
|
||||
echo "For more info and more troubleshooting visit:"
|
||||
echo "http://wiki.archlinux.org/index.php/ATI_Catalyst"
|
||||
echo "----------------------------------------------------------------"
|
||||
}
|
||||
|
||||
captain_hook(){
|
||||
# add hook fglrx to mkiniticpio
|
||||
hooks=$(grep ^HOOKS /etc/mkinitcpio.conf | grep fglrx)
|
||||
if [ "$hooks" = "" ]; then
|
||||
# add hook fglrx
|
||||
sed 's/^HOOKS="\([^"]*\)"/HOOKS="\1 fglrx"/' -i /etc/mkinitcpio.conf
|
||||
fi
|
||||
}
|
||||
|
||||
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() {
|
||||
depmod $KERNEL_VERSION
|
||||
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
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "You can use the tool 'aticonfig' to generate an xorg.conf file."
|
||||
echo "Remember to add fglrx to the MODULES list in /etc/rc.conf."
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "Add nomodeset to your kernel line in /boot/grub/menu.lst , ie.:"
|
||||
echo "kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/1aa731c0-f626-4d01-a551-8eed3c2a35f3 ro nomodeset"
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "To get it work with xorg-server >= 1.8 (when it will arrive in [extra] repo)"
|
||||
echo "you need patched xorg-server, you may get it from [catalyst-xorg18] repo, more here:"
|
||||
echo "http://bbs.archlinux.org/viewtopic.php?pid=750810#p750810"
|
||||
echo "--------------------------------------------------------------"
|
||||
whisperer
|
||||
captain_hook
|
||||
check_libdri_so
|
||||
/usr/bin/catalyst_build_module &>/dev/null
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
depmod $KERNEL_VERSION
|
||||
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
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "You can use the tool 'aticonfig' to generate an xorg.conf file."
|
||||
echo "Remember to add fglrx to the MODULES list in /etc/rc.conf."
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "Add nomodeset to your kernel line in /boot/grub/menu.lst , ie.:"
|
||||
echo "kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/1aa731c0-f626-4d01-a551-8eed3c2a35f3 ro nomodeset"
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "To get it work with xorg-server >= 1.8 (when it will arrive in [extra] repo)"
|
||||
echo "you need patched xorg-server, you may get it from [catalyst-xorg18] repo, more here:"
|
||||
echo "http://bbs.archlinux.org/viewtopic.php?pid=750810#p750810"
|
||||
echo "--------------------------------------------------------------"
|
||||
whisperer
|
||||
captain_hook
|
||||
check_libdri_so
|
||||
/usr/bin/catalyst_build_module &>/dev/null
|
||||
}
|
||||
|
||||
pre_remove(){
|
||||
/usr/bin/catalyst_build_module remove_all
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
depmod $KERNEL_VERSION
|
||||
# If the symlink is dead, remove it
|
||||
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
|
||||
echo "NOTE: Don't forget to recover your original xorg.conf file."
|
||||
# remove hook fglrx
|
||||
sed '/^HOOKS/s/ *fglrx//' -i /etc/mkinitcpio.conf
|
||||
# If the symlink is dead, remove it
|
||||
check_libdri_so
|
||||
echo "NOTE: Don't forget to recover your original xorg.conf file."
|
||||
}
|
||||
|
91
catalyst/catalyst_build_module
Executable file
91
catalyst/catalyst_build_module
Executable file
@ -0,0 +1,91 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Find the kernel name inside the chroot
|
||||
kernver=`pacman -Qf kernel26 | cut -c10-15 | sed 's/kernel26 //g'`-CHAKRA
|
||||
arch=${ARCH:-$(uname -m)}
|
||||
arch=${arch/i686/i386}
|
||||
|
||||
#patch_files(){
|
||||
# file_patch="${kernver/-*}.patch"
|
||||
# if [[ -f "${file_patch}" ]]; then
|
||||
# patch -Np6 -i ${file_patch} || return 1
|
||||
# fi
|
||||
#}
|
||||
|
||||
install_module()
|
||||
{
|
||||
workdir=$(mktemp -du /tmp/catalyst.XXXXXX)
|
||||
set -x
|
||||
cp "/usr/share/ati/build_mod" "${workdir}" -R
|
||||
cd "$workdir"
|
||||
# patch_files
|
||||
make -C /lib/modules/${kernver}/build \
|
||||
SUBDIRS="`pwd`" ARCH=${arch} modules &>/dev/null || return 1
|
||||
|
||||
install -m755 -d "/lib/modules/${kernver}/video/"
|
||||
install -m644 fglrx.ko "/lib/modules/${kernver}/video/" || return 1
|
||||
|
||||
depmod ${kernver}
|
||||
rm -rf "${workdir}"
|
||||
set +x
|
||||
}
|
||||
|
||||
remove_module(){
|
||||
for p in /lib/modules/*; do
|
||||
if [ ! -d $p/kernel ]; then #check if /lib/modules/p/kernel directory does NOT exist
|
||||
if [ -e $p/video/fglrx.ko ]; then
|
||||
echo "+ removing fglrx module from $p"
|
||||
rm "$p/video/fglrx.ko" &>/dev/null
|
||||
rmdir -p "$p/video/" --ignore-fail-on-non-empty &>/dev/null
|
||||
fi
|
||||
if [ -d $p ]; then #check if /lib/modules/p exist
|
||||
if [ -z "$(ls $p)" ]; then #check if /lib/modules/p is empty
|
||||
echo "+ removing empty directory: $p"
|
||||
rm -rf $p
|
||||
else echo "- $p looks like unused, maybe remove it manualy?"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
remove_all_modules(){
|
||||
for p in /lib/modules/*; do
|
||||
if [ -e $p/video/fglrx.ko ]; then
|
||||
echo "+ removing fglrx module from $p"
|
||||
rm "$p/video/fglrx.ko" &>/dev/null
|
||||
rmdir -p "$p/video/" --ignore-fail-on-non-empty &>/dev/null
|
||||
depmod $(basename $p)
|
||||
fi
|
||||
if [ -d $p ]; then #check if /lib/modules/p exist
|
||||
if [ -z "$(ls $p)" ]; then #check if /lib/modules/p is empty
|
||||
echo "+ removing empty directory: $p"
|
||||
rm -rf $p
|
||||
elif [ ! -d $p/kernel ]; then
|
||||
echo "- $p looks like unused, maybe remove it manualy?"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
help|--help)
|
||||
echo "usage: $0 {version|remove|remove_all}"
|
||||
echo "- with no specified kernel version it will use the current kernel version to build module;"
|
||||
echo "- remove is removing unused fglrx modules and all empty /lib/modules/* directories;"
|
||||
echo "- remove_all is removing all fglrx modules and all empty /lib/modules/* directories."
|
||||
;;
|
||||
remove)
|
||||
remove_module
|
||||
;;
|
||||
remove_all)
|
||||
remove_all_modules
|
||||
;;
|
||||
*)
|
||||
echo "Building fglrx module ..."
|
||||
test "$1" != "" && kernver="$1"
|
||||
install_module && echo "Ok." || echo "Failed!!"
|
||||
;;
|
||||
esac
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- ati10.4/common/lib/modules/fglrx/build_mod/kcl_wait.c 2010-04-13 20:02:46.494496561 +0200
|
||||
+++ ati10.4/common/lib/modules/fglrx/build_mod/kcl_wait.c 2010-04-13 19:52:00.054563389 +0200
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <linux/wait.h>
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/sched.h>
|
||||
+#include <linux/slab.h>
|
||||
|
||||
#include "kcl_config.h"
|
||||
#include "kcl_wait.h"
|
20
catalyst/hook-fglrx
Normal file
20
catalyst/hook-fglrx
Normal file
@ -0,0 +1,20 @@
|
||||
# vim: set ft=sh:
|
||||
|
||||
install ()
|
||||
{
|
||||
/usr/bin/catalyst_build_module remove
|
||||
/usr/bin/catalyst_build_module "$KERNELVERSION" &>/dev/null
|
||||
echo "----------------------------------------------"
|
||||
echo "is this main kernel26/kernel26-headers update?"
|
||||
echo "if so - after update as root run: "
|
||||
echo "# catalyst_build_module new_kernel_version"
|
||||
echo "ie. # catalyst_build_module 2.6.34-ARCH"
|
||||
echo "----------------------------------------------"
|
||||
}
|
||||
|
||||
help ()
|
||||
{
|
||||
cat<<HELPEOF
|
||||
This hook rebuilds fglrx module. It does nothing to the initrd image.
|
||||
HELPEOF
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgname=nvidia-utils
|
||||
pkgver=256.35
|
||||
pkgver=256.38.02
|
||||
pkgrel=1
|
||||
pkgdesc="NVIDIA beta drivers utilities and libraries."
|
||||
arch=('i686' 'x86_64')
|
||||
@ -24,9 +24,9 @@ install=nvidia.install
|
||||
source=("ftp://download.nvidia.com/XFree86/Linux-${ARCH}/${pkgver}/${_srcname}.run"
|
||||
"20-nvidia.conf")
|
||||
|
||||
md5sums=('f6af8917a500de28396a438f3f548c88'
|
||||
md5sums=('73ab00aa48dea41a3a51c6a045b443cb'
|
||||
'1b758609e48d4c02099a5dd1000e655f')
|
||||
[ "$CARCH" = "x86_64" ] && md5sums=('7b5924f14a4d2326b4d916efdb7852ff'
|
||||
[ "$CARCH" = "x86_64" ] && md5sums=('84574bd14f273af046c373b2967677b4'
|
||||
'1b758609e48d4c02099a5dd1000e655f')
|
||||
|
||||
build() {
|
||||
|
@ -8,8 +8,8 @@
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgname=nvidia
|
||||
pkgver=256.35
|
||||
pkgrel=2.2
|
||||
pkgver=256.38.02
|
||||
pkgrel=1
|
||||
pkgdesc="NVIDIA beta drivers for kernel26."
|
||||
arch=('i686' 'x86_64')
|
||||
|
||||
@ -28,8 +28,8 @@ license=('custom')
|
||||
install=nvidia.install
|
||||
source=("ftp://download.nvidia.com/XFree86/Linux-$ARCH/${pkgver}/${_srcname}.run")
|
||||
|
||||
md5sums=('f6af8917a500de28396a438f3f548c88')
|
||||
[ "$CARCH" = "x86_64" ] && md5sums=('7b5924f14a4d2326b4d916efdb7852ff')
|
||||
md5sums=('73ab00aa48dea41a3a51c6a045b443cb')
|
||||
[ "$CARCH" = "x86_64" ] && md5sums=('84574bd14f273af046c373b2967677b4')
|
||||
|
||||
|
||||
build()
|
||||
|
Loading…
Reference in New Issue
Block a user