Creo que no era tanta tonteria como dije....
EL servidor de AMD donde descargamos los drivers ahora ya lo han puesto todo por funciones por lo que extraer la versión que cursa es dificil me las he apañado y creo que deberia funcionar y sacar dicha info. (Por algún extraño motivo aveces no coge bien la versión de la web.... :S aún tengo que mirarlo)
Tambien han cambiado la forma de descargar sus drivers y ahora si no lo haces desde su pagina (o no detecta que hiciste clic en el enlace desde su pagina) no sirve por lo que wget sin meterle el referer que le he metido al script no descarga.... ya veré como me las ingenio para meterlo en variable DOWNLOAD .... por que por mas que pruebo no funciona mientras que metiendo en terminal lo que meto en "DOWNLOAD" si.... un misterio....(dejo comentada la linea de download con la ultima forma que provee)
total voy a dejar el script en teoria deberia funcionar a falta de meter lo necesario para que el sistema genere el modulo si la version del kernel es diferente aquello que comento USUARIONUEVO.
Dejo el script para posibles arreglos. AUN ESTA EN FASE TEST o como lo queramos llamar... tecnicamente deberia funcionar
No deberia romper si AMD decide sacar nueva versión, salvo que los parches ya no sean necesarios por lo que tambien estaré pendiente de eso.
CONTIENE ERRORES NO USAR (CORRIGIENDO)
#!/bin/sh
# Script by www.seguridadwireless.net
SCRIPT_VERSION=20151112
############################################################
## Funciones comunes. Su nombre empieza por f_ ##
############################################################
f_variables(){
. /opt/wifislax-updaters/Funciones/funciones_updater
}
############################################################
## Funciones propias del script. Su nombre empieza por F_ ##
############################################################
# Definicion de variables
F_variables() {
PRGNAM=ati
echo -ne "\033]2;${PRGNAM}_updater\007"
WEB="http://support.amd.com/en-us/download/desktop?os=Linux+x86"
VERSION=$(curl -s http://support.amd.com/en-us/download/desktop?os=Linux+x86|awk '/u2122/,/Proprietary/ { print $35 }'|head -n1)
EXTENSION=zip
SOURCES=$(curl -s http://support.amd.com/en-us/download/desktop?os=Linux+x86|grep "\.zip"|awk '/u002f/,/.zip/ { print $41 }'|cut -d "f" -f6|cut -d "z" -f1|sed 's/.$//')
# DOWNLOAD='--header="Referer: www2.ati.com" http://www2.ati.com/drivers/linux/amd-catalyst-15.9-linux-installer-15.201.1151-x86.x86_64.zip'
}
# Descomprimimos el fichero descargado y compilamos
F_compilar(){
echo
echo "$VERDE"Configurando ..."$CIERRE"
sleep 1
# Soy incapaz de meter el referer dentro de la variable DOWNLOAD
wget -NLcq --show-progress --header="Referer: www2.ati.com" http://www2.ati.com/drivers/linux/amd-catalyst-15.9-linux-installer-15.201.1151-x86.x86_64.zip
unzip $SOURCES.$EXTENSION
git clone https://aur.archlinux.org/catalyst-total.git
./$SOURCES.run --extract archive_files
# Aquí terminan las descargas necesarias
echo
echo "$VERDE"Compilando ..."$CIERRE"
sleep 1
## Falta por comprobar meter lo necesario src para generar modulo si kernel cambia
SRCNAM=$(pwd)
CARCH=$(uname -m)
##catalyst-utils section
## Install userspace tools and libraries
# Create directories
install -m755 -d ${PKG}/etc/ati
install -m755 -d ${PKG}/etc/rc.d
install -m755 -d ${PKG}/etc/profile.d
install -m755 -d ${PKG}/etc/acpi/events
install -m755 -d ${PKG}/etc/security/console.apps
install -m755 -d ${PKG}/etc/OpenCL/vendors
install -m755 -d ${PKG}/usr/lib/xorg/modules/dri
install -m755 -d ${PKG}/usr/lib/xorg/modules/drivers
install -m755 -d ${PKG}/usr/lib/xorg/modules/extensions
install -m755 -d ${PKG}/usr/lib/xorg/modules/extensions/fglrx
install -m755 -d ${PKG}/usr/lib/xorg/modules/linux
install -m755 -d ${PKG}/usr/lib/dri
install -m755 -d ${PKG}/usr/lib/fglrx
install -m755 -d ${PKG}/usr/lib/systemd/system
# install -m755 -d ${PKG}/usr/lib/hsa #removed in 14.1
install -m755 -d ${PKG}/usr/bin
install -m755 -d ${PKG}/usr/include/GL
install -m755 -d ${PKG}/usr/share/applications
install -m755 -d ${PKG}/usr/share/ati/amdcccle
install -m755 -d ${PKG}/usr/share/licenses/${PRGNAM}
install -m755 -d ${PKG}/usr/share/man/man8
install -m755 -d ${PKG}/usr/share/pixmaps
# X.org driver
cd $SRCNAM/archive_files/xpic/usr/X11R6/lib/modules
install -m755 *.so ${PKG}/usr/lib/xorg/modules
install -m755 drivers/*.so ${PKG}/usr/lib/xorg/modules/drivers
install -m755 linux/*.so ${PKG}/usr/lib/xorg/modules/linux
install -m755 extensions/fglrx/fglrx-libglx.so ${PKG}/usr/lib/xorg/modules/extensions/fglrx/fglrx-libglx.so
ln -snf /usr/lib/xorg/modules/extensions/fglrx/fglrx-libglx.so ${PKG}/usr/lib/xorg/modules/extensions/libglx.so
install -m755 X11R6/bin/* ${PKG}/usr/bin
install -m755 sbin/* ${PKG}/usr/bin
install -m755 X11R6/lib/fglrx/fglrx-libGL.so.1.2 ${PKG}/usr/lib/fglrx
install -m755 X11R6/lib/libAMDXvBA.so.1.0 ${PKG}/usr/lib
ln -snf libAMDXvBA.so.1.0 ${PKG}/usr/lib/libAMDXvBA.so.1
ln -snf libAMDXvBA.so.1.0 ${PKG}/usr/lib/libAMDXvBA.so
install -m755 X11R6/lib/libatiadlxx.so ${PKG}/usr/lib
install -m755 X11R6/lib/libfglrx_dm.so.1.0 ${PKG}/usr/lib
install -m755 X11R6/lib/libXvBAW.so.1.0 ${PKG}/usr/lib
ln -snf libXvBAW.so.1.0 ${PKG}/usr/lib/libXvBAW.so.1
ln -snf libXvBAW.so.1.0 ${PKG}/usr/lib/libXvBAW.so
ln -snf /usr/lib/libXvBAW.so.1.0 ${PKG}/usr/lib/dri/fglrx_drv_video.so #omega 14.12
install -m644 X11R6/lib/*.a ${PKG}/usr/lib
install -m644 X11R6/lib/*.cap ${PKG}/usr/lib
install -m755 X11R6/lib/modules/dri/*.so ${PKG}/usr/lib/xorg/modules/dri
install -m755 lib/*.so* ${PKG}/usr/lib
# install -m755 lib/hsa/* ${PKG}/usr/lib/hsa #removed in 14.1
## QT libs (only 2 files) - un-comment 2 lines below if you don't want to install qt package
# install -m755 -d ${PKG}/usr/share/ati/lib
# install -m755 share/ati/lib/*.so* ${PKG}/usr/share/ati/lib
ln -snf /usr/lib/xorg/modules/dri/fglrx_dri.so ${PKG}/usr/lib/dri/fglrx_dri.so
ln -snf libfglrx_dm.so.1.0 ${PKG}/usr/lib/libfglrx_dm.so.1
ln -snf libfglrx_dm.so.1.0 ${PKG}/usr/lib/libfglrx_dm.so
ln -snf libatiuki.so.1.0 ${PKG}/usr/lib/libatiuki.so.1
ln -snf libatiuki.so.1.0 ${PKG}/usr/lib/libatiuki.so
ln -snf libOpenCL.so.1 ${PKG}/usr/lib/libOpenCL.so
ln -snf /usr/lib/fglrx/fglrx-libGL.so.1.2 ${PKG}/usr/lib/fglrx/libGL.so.1.2.0
ln -snf /usr/lib/fglrx/fglrx-libGL.so.1.2 ${PKG}/usr/lib/fglrx/libGL.so.1
ln -snf /usr/lib/fglrx/fglrx-libGL.so.1.2 ${PKG}/usr/lib/fglrx/libGL.so
ln -snf /usr/lib/fglrx/fglrx-libGL.so.1.2 ${PKG}/usr/lib/libGL.so.1.2.0
ln -snf /usr/lib/fglrx/fglrx-libGL.so.1.2 ${PKG}/usr/lib/libGL.so.1
ln -snf /usr/lib/fglrx/fglrx-libGL.so.1.2 ${PKG}/usr/lib/libGL.so
# We have to provide symlinks to mesa, as catalyst doesn't ship them
ln -s /usr/lib/mesa/libEGL.so.1.0.0 ${PKG}/usr/lib/libEGL.so.1.0.0
ln -s libEGL.so.1.0.0 ${PKG}/usr/lib/libEGL.so.1
ln -s libEGL.so.1.0.0 ${PKG}/usr/lib/libEGL.so
ln -s /usr/lib/mesa/libGLESv1_CM.so.1.1.0 ${PKG}/usr/lib/libGLESv1_CM.so.1.1.0
ln -s libGLESv1_CM.so.1.1.0 ${PKG}/usr/lib/libGLESv1_CM.so.1
ln -s libGLESv1_CM.so.1.1.0 ${PKG}/usr/lib/libGLESv1_CM.so
ln -s /usr/lib/mesa/libGLESv2.so.2.0.0 ${PKG}/usr/lib/libGLESv2.so.2.0.0
ln -s libGLESv2.so.2.0.0 ${PKG}/usr/lib/libGLESv2.so.2
ln -s libGLESv2.so.2.0.0 ${PKG}/usr/lib/libGLESv2.so
cd $SRCNAM/archive_files/common
patch -Np2 -i /arch-fglrx-authatieventsd_new.patch
install -m644 etc/ati/* ${PKG}/etc/ati
chmod 755 ${PKG}/etc/ati/authatieventsd.sh
install -m644 etc/security/console.apps/amdcccle-su ${PKG}/etc/security/console.apps
install -m755 usr/X11R6/bin/* ${PKG}/usr/bin
install -m644 usr/include/GL/*.h ${PKG}/usr/include/GL
install -m755 usr/sbin/*.sh ${PKG}/usr/bin
install -m644 usr/share/ati/amdcccle/* ${PKG}/usr/share/ati/amdcccle
install -m644 usr/share/icons/*.xpm ${PKG}/usr/share/pixmaps
install -m644 usr/share/man/man8/*.8 ${PKG}/usr/share/man/man8
install -m644 usr/share/applications/*.desktop ${PKG}/usr/share/applications
# ACPI example files
# install -m755 usr/share/doc/fglrx/examples/etc/acpi/*.sh ${PKG}/etc/acpi
# sed -i -e "s/usr\/X11R6/usr/g" ${PKG}/etc/acpi/ati-powermode.sh
# install -m644 usr/share/doc/fglrx/examples/etc/acpi/events/* ${PKG}/etc/acpi/events
# lets check our own files - V
install -m755 /ati-powermode.sh ${PKG}/etc/acpi
install -m644 /a-ac-aticonfig ${PKG}/etc/acpi/events
install -m644 /a-lid-aticonfig ${PKG}/etc/acpi/events
# Add ATI Events Daemon launcher
install -m755 /atieventsd.sh ${PKG}/etc/rc.d/atieventsd
install -m644 /atieventsd.service ${PKG}/usr/lib/systemd/system
# thanks to cerebral, we dont need that damned symlink
install -m755 /catalyst.sh ${PKG}/etc/profile.d
# License
install -m644 /archive_files/LICENSE.TXT ${PKG}/usr/share/licenses/${PRGNAM}
install -m644 /archive_files/common/usr/share/doc/amdcccle/ccc_copyrights.txt \
${PKG}/usr/share/licenses/${PRGNAM}/amdcccle_copyrights.txt
# since 11.11 : opencl files
cd $SRCNAM/archive_files/arch/x86
install -m644 etc/OpenCL/vendors/amdocl${_arc}.icd ${PKG}/etc/OpenCL/vendors
install -m755 usr/bin/clinfo ${PKG}/usr/bin
install -m755 -d ${PKG}/etc/modules-load.d
install -m644 /catalyst.conf ${PKG}/etc/modules-load.d
#workaround for the high io bug , thanks to lano1106 for finding this ugly bug! https://bbs.archlinux.org/viewtopic.php?pid=1279977#p1279977
install -m755 /temp_links_catalyst ${PKG}/usr/bin
install -m644 /temp-links-catalyst.service ${PKG}/usr/lib/systemd/system
# powerXpress
install -m755 /switchlibGL ${PKG}/usr/lib/fglrx
install -m755 /switchlibglx ${PKG}/usr/lib/fglrx
# switching script: switch xorg.conf + aticonfig --px-Xgpu + switchlibGL + add/remove fglrx into MODULES
install -m755 /pxp_switch_catalyst ${PKG}/usr/bin
##catalyst-hook section
cd $SRCNAM/archive_files
patch -Np1 -i ../makefile_compat.patch
patch -Np1 -i ../lano1106_fglrx_intel_iommu.patch
patch -Np1 -i ../lano1106_kcl_agp_13_4.patch
# patch -Np1 -i ../lano1106_fglrx-13.8_proc.patch
# patch -Np1 -i ../cold-fglrx-3.14-current_euid.patch
# patch -Np1 -i ../fglrx_3.17rc6-no_hotplug.patch
# test "${CARCH}" = "i686" && patch -Np1 -i ../fglrx_gpl_symbol.patch
# since 3.19 not only i686 needs gpl symbol - V
patch -Np1 -i ../fglrx_gpl_symbol.patch
patch -Np1 -i ../ubuntu_buildfix_kernel_4.0.patch
patch -Np1 -i ../ubuntu_buildfix_kernel_4.1.patch
# patch -Np1 -i ../ubuntu_buildfix_kernel_4.2.patch #three 4.2 patches left for testing purposes, use simultaneously - V
# patch -Np1 -i ../4.2-fglrx-has_fpu.patch
# patch -Np1 -i ../4.2-kolasa-fpu_save_init.patch
# Prepare modules source files
_archdir=x86_64
test "${CARCH}" = "i686" && _archdir=x86
install -m755 -d ${PKG}/usr/share/ati/build_mod
install -m644 common/lib/modules/fglrx/build_mod/*.c \
${PKG}/usr/share/ati/build_mod
install -m644 common/lib/modules/fglrx/build_mod/*.h \
${PKG}/usr/share/ati/build_mod
install -m644 common/lib/modules/fglrx/build_mod/2.6.x/Makefile \
${PKG}/usr/share/ati/build_mod
install -m644 arch/${_archdir}/lib/modules/fglrx/build_mod/libfglrx_ip.a \
${PKG}/usr/share/ati/build_mod
install -m755 -d ${PKG}/usr/bin
install -m755 /catalyst_build_module ${PKG}/usr/bin
# modified ati's make.sh script
install -m755 /ati_make.sh ${PKG}/usr/share/ati/build_mod
# hook fglrx
install -m755 -d ${PKG}/usr/lib/initcpio/install
install -m644 /hook-fglrx ${PKG}/usr/lib/initcpio/install/fglrx
# systemd service to perform fglrx module build at shutdown
install -m755 -d ${PKG}/usr/lib/systemd/system
install -m644 /catalyst-hook.service ${PKG}/usr/lib/systemd/system
##lib32-catalyst-utils section
if [ "${CARCH}" = "x86_64" ] && [[ `cat /etc/pacman.conf | grep -c "#\[multilib]"` = 0 ]]; then
cd $SRCNAM
install -D -m755 lib32-catalyst.sh ${PKG}/etc/profile.d/lib32-catalyst.sh
cd /archive_files/arch/x86/usr
install -dm755 ${PKG}/usr/lib32
install -dm755 ${PKG}/usr/lib32/fglrx
install -dm755 ${PKG}/usr/lib32/xorg/modules/dri
# install -dm755 ${PKG}/usr/lib32/hsa #removed in 14.1
install -m755 lib/*.so* ${PKG}/usr/lib32
# install -m755 lib/hsa/* ${PKG}/usr/lib32/hsa #removed in 14.1
install -m755 X11R6/lib/fglrx/fglrx-libGL.so.1.2 ${PKG}/usr/lib32/fglrx
install -m755 X11R6/lib/libAMDXvBA.so.1.0 ${PKG}/usr/lib32
install -m755 X11R6/lib/libatiadlxx.so ${PKG}/usr/lib32
install -m755 X11R6/lib/libfglrx_dm.so.1.0 ${PKG}/usr/lib32
install -m755 X11R6/lib/libXvBAW.so.1.0 ${PKG}/usr/lib32
install -m755 X11R6/lib/modules/dri/*.so ${PKG}/usr/lib32/xorg/modules/dri
ln -snf /usr/lib32/xorg/modules/dri ${PKG}/usr/lib32/dri
cd $PKG/usr/lib32
ln -sf /usr/lib32/libfglrx_dm.so.1.0 ${PKG}/usr/lib32/libfglrx_dm.so.1
ln -sf /usr/lib32/libfglrx_dm.so.1.0 ${PKG}/usr/lib32/libfglrx_dm.so
ln -sf /usr/lib32/libAMDXvBA.so.1.0 ${PKG}/usr/lib32/libAMDXvBA.so.1
ln -sf /usr/lib32/libAMDXvBA.so.1.0 ${PKG}/usr/lib32/libAMDXvBA.so
ln -sf /usr/lib32/libXvBAW.so.1.0 ${PKG}/usr/lib32/libXvBAW.so.1
ln -sf /usr/lib32/libXvBAW.so.1.0 ${PKG}/usr/lib32/libXvBAW.so
ln -sf /usr/lib32/libatiuki.so.1.0 ${PKG}/usr/lib32/libatiuki.so.1
ln -sf /usr/lib32/libatiuki.so.1.0 ${PKG}/usr/lib32/libatiuki.so
ln -sf /usr/lib32/libOpenCL.so.1 ${PKG}/usr/lib32/libOpenCL.so
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 ${PKG}/usr/lib32/fglrx/libGL.so.1.2.0
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 ${PKG}/usr/lib32/fglrx/libGL.so.1
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 ${PKG}/usr/lib32/fglrx/libGL.so
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 ${PKG}/usr/lib32/libGL.so.1.2.0
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 ${PKG}/usr/lib32/libGL.so.1
ln -sf /usr/lib32/fglrx/fglrx-libGL.so.1.2 ${PKG}/usr/lib32/libGL.so
# We have to provide symlinks to lib32-mesa, as catalyst doesn't ship them
ln -s /usr/lib32/mesa/libEGL.so.1.0.0 ${PKG}/usr/lib32/libEGL.so.1.0.0
ln -s libEGL.so.1.0.0 ${PKG}/usr/lib32/libEGL.so.1
ln -s libEGL.so.1.0.0 ${PKG}/usr/lib32/libEGL.so
ln -s /usr/lib32/mesa/libGLESv1_CM.so.1.1.0 ${PKG}/usr/lib32/libGLESv1_CM.so.1.1.0
ln -s libGLESv1_CM.so.1.1.0 ${PKG}/usr/lib32/libGLESv1_CM.so.1
ln -s libGLESv1_CM.so.1.1.0 ${PKG}/usr/lib32/libGLESv1_CM.so
ln -s /usr/lib32/mesa/libGLESv2.so.2.0.0 ${PKG}/usr/lib32/libGLESv2.so.2.0.0
ln -s libGLESv2.so.2.0.0 ${PKG}/usr/lib32/libGLESv2.so.2
ln -s libGLESv2.so.2.0.0 ${PKG}/usr/lib32/libGLESv2.so
# OpenCL
install -m755 -d ${PKG}/etc/OpenCL/vendors
install -m644 /archive_files/arch/x86/etc/OpenCL/vendors/amdocl32.icd ${PKG}/etc/OpenCL/vendors
fi
}
###################################
## BLOQUE PRINCIPAL DE EJECUCION ##
###################################
# Si se cierra el script inesperadamente, ejecutar la funcion de limpieza
trap f_exitmode SIGHUP SIGINT
#Inicializamos las variables globales
f_variables
#Comprobamos conexion a Internet
f_comprobarConexion
#Inicializamos las variables del script
F_variables
#Creamos directorio de trabajo
f_directorioTemporal
#Mostramos el mensaje de presentacion
f_presentacion
#Comprobamos updates del script
f_comprobarUpdates
#Asignamos o detectamos arquitectura
f_arquitectura
#Comprobamos version instalada del paquete
f_versionInstalada
#Si no existe el fichero se descargara
#f_download
#Preparamos entorno
#f_preparar
#Descomprimir fichero descargado y compilamos
F_compilar
#Hacemos strip sobre el paquete
f_strip
#Creamos xzm , instalamos y salimos
f_tareasFinales
Estoy modificando el script habia varios errores