Problems building driver

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
So, I'm trying to compile ATI drivers (fglrx) for kernel 2.6.13-15.8-default and Xorg server 6.8.2-100. Right now I am actually trying to compile the 32-bit drivers although I have a 64-bit system. But my friend has a 32-bit system (same kernel/xorg as well) and he gets the exact same error, so I just tried it on mine so I could copy and paste the exact error here.

linux:/home/andy/fglrx/lib/modules/fglrx/build_mod # sh make.sh
ATI module generator V 2.0
==========================
initializing...
cleaning...
patching 'highmem.h'...
assuming new VMA API since we do have kernel 2.6.x...
doing Makefile based build for kernel 2.6.x and higher
make -C /lib/modules/2.6.13-15.8-default/build SUBDIRS=/home/andy/fglrx/lib/modules/fglrx/build_mod/2.6.x modules
make: *** /lib/modules/2.6.13-15.8-default/build: No such file or directory. Stop.

(I had no trouble getting nvidia drivers to compile.)

Apparently I'm missing some 'build' directory. There's actually a file in that directory called build already that seems to be a program but not a directory. Any ideas? I have the 32-bit source installed here right now. I figured I should be to compile it anyway, but that's besides the point because I get the same exact thing doing it on his 32-bit system.

Prior to doing make.sh in the ATI module source directory build_mod, I ran these commands (on both my and my friend's systems):

# cd /usr/src/linux
# make mrproper
# make cloneconfig
# make modules_prepare

Is there any reason at all I would have to do 'init 3' before compiling this? The guide says to do that but I assume it's just to shut down the X server. Right now I'm just trying to compile a .ko driver on either my or my friend's system so I can setup his ATI card.
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
I think so.

linux:/home/andy # rpm -qa | grep kernel-source
kernel-source-2.6.13-15.8
linux:/home/andy # uname -r
2.6.13-15.8-default
linux:/home/andy #

Unless I need some -default suffix?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
/lib/modules/2.6.13-15.8-default/build should be a symlink to your kernel source tree, it looks like it's not on your system.
 

SleepWalkerX

Platinum Member
Jun 29, 2004
2,649
0
0
Well build in /lib/modules/2.6.13-15.8/ is a symlink to default in /usr/src/linux-2.6.13-15.8-obj/i386/ in my Suse so try checking around there. Maybe reinstall the kernel-source package or try to rebuild the symlink?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
First you should probably figure out how the SuSe kernel packages work, if you go around changing those things you might break something else.
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
linux:/lib/modules/2.6.13-15.8-default # file build
build: broken symbolic link to `/usr/src/linux-2.6.13-15.8-obj/x86_64/default'

Guess that's a problem....

Right now this is the i386 source so I'll just link it to /i386/default and see what happens.
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
Thanks, that got me a lot further, I think. I just need to do that on his system and compile it from there.

Any way I can compile the i386 driver on my x86_64 machine or am I SOL?

I did make backups of every file I changed so I can just revert to x86_64 source.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
You need to make sure that your compiler environment is 32-bit, which might require a lot of work if SuSe hasn't set that up for you already.
 

SleepWalkerX

Platinum Member
Jun 29, 2004
2,649
0
0
Why are you installing 32 bit drivers? Why not install 64 bit drivers?

<a target=_blank class=ftalternatingbarlinklarge href="https://support.ati.com/ics/support/default.asp?deptID=894&task=knowledge&folderID=300">https://support.ati.com/ics/support/......ID=894&task=knowledge&folderID=300</a>

Click on Linux display drivers and there should be x86_64 drivers.

Edit: Oh btw, here's a good guide that helped me install ati drivers for suse when I had a radeon card.

http://linux.wordpress.com/2005/10/11/suse-100-ati-drivers-installation/
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
My original idea was to compile them for my friend's 32-bit system but I guess I'll have to do it the next time he boots in Linux because it's too hard to compile 32-bit things on a 64-bit system. buildpkg had also failed to work on his machine but I can't remember the error.