Hi,
As some of you know AMD Catalyst 13.12 is not working on any Debian system with >= KERNEL_VERSION(3,12,0)
So i decided to give it a go and try to fix the MAIN driver (Please dont tell me to run to the BETA DRIVER please, im almost certain there will be issues there as well i just wanna try to fix the main driver) .

I posted a similar thread in the hashcat forum but i was well warned that they just cared about hashcat issues and this is not one of them.

First i got the driver from the official AMD site
http://support.amd.com/en-us/downloa...p?os=Linux+x86

First thing is first - when i unpack the driver in some directory (i unpack it because the source would not compile)

And the kcl_acpi.c needs a small patch [note the patch is not mine]
Code:
--- kcl_acpi.c
+++ kcl_acpi.c
@@ -995,7 +995,11 @@
#endif
     {
         return KCL_ACPI_ERROR;
-    }    
+    }
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,1)
+    ((acpi_tbl_table_handler)handler)(hdr);
+#else
     ((acpi_table_handler)handler)(hdr);
+#endif
     return KCL_ACPI_OK;
}
When that is done i recognized a bunch of warnings that i wanted to get rid off , they were "depricated" warnings so i fixed them

Code:
# if im in the unpacked driver installation directory 
echo 5 > ./packages/Debian/dists/etch/compat  
echo 5 > ./packages/Debian/dists/experimental/compat
echo 5 > ./packages/Debian/dists/lenny/compat
echo 5 > ./packages/Debian/dists/sid/compat
So that got rid of the warnings , not i looked at the error messages and figured out a couple of things:

Kali (at least my installation) has both X11 and X11R6 on the system but no symlinks between them , so i had to create some to make the installation go smoother:

Code:
ln -s /usr/bin/X11  /usr/X11R6/bin
ln -s /usr/lib/X11  /usr/X11R6/lib64/X11
After that i kept getting errors, i dig into the shell script code to see whats the problem (1500lines of code) fixed some retarded errors that werent important
And the road leead me to ati-packager.sh in Debian folder. Now it was related to the ati-installer so i first had to cut it off ati-installer by changing the code of the rootdirectory it used (i kinda disconnected it from ati-installer.sh so i can debug the ati-packager.sh itself i will change the code back once ati-packager is fixed)

So the one thing keeps getting noticed it used some x710_64a folder (im on x86_64) and that obviously did not exist in the installation directory.

Now that keep me thinking i had xpic_64a dir so probably it was the right thing to do to change the ati-packager.sh to use it instead. But i wanted to know where the x710_64a was from - answer FROM PREVIOUS driver versions

So basicaly the ati-packager.sh was copied from previous driver version(maybe changed a bit but definetly not written from the start) and ofc its not working well in this one.

So i changed it to use the xpic_64a folder.

Then more errors occured
Code:
error: couldn't find library libatiuki.so.1 needed by debian/fglrx-driver/usr/lib/xorg/modules/linux/libfglrxdrm.so
I knew there was a libatiuki.so.1.0 on the system so i just symlinked that to libatiuki.so.1

Code:
# change dir untill  in ./intallationdir/arch/x86_64/usr/lib64/
ln -s libatiuki.so.1.0 libatiuki.so.1
#change dir untill in ./intallationdir/arch/x86/usr/lib/
ln -s libatiuki.so.1.0 libatiuki.so.1
That helped allot but still wasn't enough. The next error was
Code:
dh_install: fglrx-driver missing files (usr/X11R6/lib64/modules/*.a), aborting
So obviously it needed some *.a file to be in the lib64/modules i figured out it was probably the new .a file that wasn't in the the old driver version
(the old one is in build_mod named libfglrx_ip.a)

Code:
#when in installation directory 
ln -s ./arch/x86/usr/X11R6/lib/libfglrx_dm.a ./xpic/usr/X11R6/lib/modules/libfglrx_dm.a
ln -s ./arch/x86_64/usr/X11R6/lib64/libfglrx_dm.a ./xpic_64a/usr/X11R6/lib64/modules/libfglrx_dm.a
That helped that error but i now got to the next one and i was hoping the community might help me to finish this untill the end

the new error is

Code:
# zadnja greska # amd64 needs some library redirection
dh_install -pfglrx-driver "usr/X11R6/lib64/*.so*"           "usr/lib"
dh_install -pfglrx-driver "usr/X11R6/lib64/modules/dri"     "usr/lib"
dh_install -pfglrx-driver "usr/X11R6/lib64/modules/linux"   "usr/lib/xorg/modules"
dh_install -pfglrx-driver "usr/X11R6/lib64/modules/drivers" "usr/lib/xorg/modules"
dh_install -pfglrx-driver "usr/X11R6/lib64/modules/extensions" "usr/lib/xorg/modules"
dh_install -pfglrx-driver "usr/X11R6/lib64/modules/*.so"    "usr/lib/xorg/modules"
dh_install -pfglrx-driver "usr/X11R6/lib64/modules/*.a"     "usr/lib/xorg/modules"
dh_install -pfglrx-driver "usr/X11R6/lib/*.so*"           "emul/ia32-linux/usr/lib"
dh_install -pfglrx-driver "usr/X11R6/lib/modules/dri"     "emul/ia32-linux/usr/lib"
dh_install -pfglrx-driver "etc/fglrx*"                "etc"
dh_install: fglrx-driver missing files (etc/fglrx*), aborting

So again probably some file (or folder) whose name start with fglrx should be in etc/ (i have no clue still is the installer in the / directory probably is but i will see that i look at the rules file to see whats going on)

What file is that ? Once we figure that out we can symlink it and continue with debuging