I've seen lots of questions about this. I'm not sure if this has changed recently as I wrote this tutorial back on 12.2 I believe. But here you go.
Compiling linux kernel on slackware for making ATI fglrx drivers actually work.
(You need kernel sources to compile a kernel, as long as you did the Full install of slackware you should have them)
Lines that start with # are just so that you can recognize which lines are actual terminal commands, the #'s don't need to be typed)
(I made this tutorial so that it can be used on pretty much any version of slackware with any linux kernel version)
-----------------------------------------------------------------------------------------------------------------------------------
Ok, first things first, it's always good practice to make your old kernel bootable as a backup, just in case something goes wrong
so that you can get back into your system without having to boot a disc.
Alright, your going to need to be root to do pretty much all of this so you might as well get a root terminal ready.
First off, cd into /boot like so:
#cd /boot
(were gonna start getting ur old kernel backup up and ready to boot just in case)
#mv System.map System.old
#mv vmlinuz vmlinuzold
(this next step isnt necessary but I always do it because it's helpful in the later steps.)
#rm config
Now that we've backed up the old kernel, we need to set lilo to boot it. So open up your /etc/lilo.conf in your preferred text
editor, as root (everything in this tutorial needs to be done as root)
Ok scroll down until you find a section like this
image = /boot/vmlinuz (this is what we are looking for)
root = /dev/sda1 (your root partition may be different than mine)
label = Slackware (your label may be different than mine also, this doesn't matter)
read-only
Now change it to boot your backed up kernel, vmlinuzold, like this:
image = /boot/vmlinuzold
root = /dev/sda1
label = Backup (This isn't necessary but it's for simplicity so you know which one is your back up)
read-only
Now save and close your lilo.conf
Now rewrite your lilo config to your mbr by running lilo as root (yes the command is just "lilo")
#lilo
If you did it right, then it will finish and not error out and freak out on you.
(you may see warnings, but ignore those as long as you don't have errors)
Ok, now your system is set up to boot your old kernel in case you fuck something up.
(Don't just skip this part because you think you won't fuck anything up, I even do this myself, it's good practice and
compiling can always freak out for stupid ass reasons, especially for something as finicky as the kernel)
Now we can start getting your new kernel ready to compile.
#cd /usr/src/linux
(We don't want the default kernel config because then we would need to make an initrd which would be another whole tutorial)
(we are just going to mod the huge-smp kernel to work with fglrx module)
#mv .config config.old
Now we grab the huge-smp config and move it to /usr/src/linux so we can use it.
#cp /boot/config-huge-smp-*-smp ./.config
Now we need to make the modifications to the config so open .config in your preferred editor (note that it starts with . so it is a hidden file)
(It would be easier to open it by running #kwrite .config as root than to open kwrite and try to find it)
(I use nano for all of this but that's just me, also nano allows you to do this entire tutorial at runlevel 3 command line without needing an X server at all)
Now search through the .config for this line (kwrite has a ctrl+f, nano you can use F6 to search for PCI_MSI)
Change this line
# CONFIG_PCI_MSI is not set
To read like this
CONFIG_PCI_MSI=y
Save the .config and close it. (Yes that's all that we need to modify in the config, it's really lame, whoever made this kernel for slackware 12.0 and newer is a fucktard because it's needed for all ATI cards that use fglrx and doesn't hurt anything being enabled)
Now run:
#make menuconfig
And just goto Exit.
Now run:
#make depend
(If it says it's unnecessary, that's fine, I just do this by habbit, not sure if it's actually needed)
Now run:
#make clean
(This may take a lil bit but shouldn't take more than a minute or two depending on your system)
Now run:
#make bzImage
(This part takes a while, so sit back and let it run, If you have a multicore processor you can make this much faster by specifying more threads, like this, the number being how many cores you have, #make -j4 bzImage)
Once that is finished, run:
#make
(This takes a while also, and once again you can use -j# for multicore cpus)
Once that is all done, we install the kernel by running:
#make install
Now we just configure our lilo to be able to boot our new kernel.
So, go ahead and open your /etc/lilo.conf once again in your preferred text editor.
Now just copy the section that now looks like this (from the earlier steps)
image = /boot/vmlinuzold
root = /dev/sda1
label = Backup
read-only
And make another section like this so that you have two sections that look similar to this:
image = /boot/vmlinuzold
root = /dev/sda1
label = Backup
read-only
image = /boot/vmlinuz
root = /dev/sda1
label = NewKernel
read-only
Save and close your lilo config and rewrite to your mbr by running lilo again:
#lilo
(once again, warnings are fine as long as you don't have errors)
Now go ahead and reboot and try to boot your New Kernel. If it boots fine then you did everything right and you can go ahead and remove the backup kernel section from /etc/lilo.conf so that you just have a section like this:
image = /boot/vmlinuz
root = /dev/sda1
label = Linux (you can set the label to read however you want it to show at your boot screen)
read-only
And once again rewrite your lilo to your mbr:
#lilo
That's it, you've just compiled your new kernel to be able to run fglrx ATI drivers on slackware. You can find my tutorial on installing the ATI drivers here:
http://www.angelfire.com/games6/smit...slackdrivertut
The driver tutorial isn't as thorough as this one because I wrote it for a friend that already has a basic knowledge of the drivers and Slackware itself.