LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 10-05-2005, 09:04 PM   #1
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 810

Rep: Reputation: 254Reputation: 254Reputation: 254
Building driver modules to work with Install kernels?

I have an unusual situation, where I have to use a special driver module "ft3xx" to access my hard disks. I managed to compile it under Slackware 10.1 by lots of experimenting.

Now I am using Slackware 10.2 and I have to use the "-f" option with "insmod" to load the driver. I'd like to recompile the driver for Slackware 10.2, using a configuration that will make it compatible with at least one of the kernels on the installation CD (preferably the default one).

The instructions that came with the driver are not very helpful, and simply say that I must recompile the Linux kernel, and then recompile the driver module.

Are there configuration files that can be used to replicate the kernels on the installation CDs? Where are the files located? Can I use those files to recompile my "ft3xx" driver module, without having to recompile the whole kernel first? Are there symbol table files, or other things needed in order to compile the driver module without recompiling the kernel?
Old 10-06-2005, 02:34 AM   #2
Senior Member
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
To make sure I understand:

You need to compile a module for your hard disk

You did this for Slackware 10.1

You upgraded to Slackware 10.2, and I assume also upgraded your kernel at the same time?

Now, the driver that you previously compiled (for your old kernel) won't load (using your new kernel) unless you use insmod -f?

I would guess that all that is required is to recompile the driver while you have the new kernel running. Most third-party modules will use `uname -r` to figure out which kernel you are running and compile for that kernel.

Are there configuration files that can be used to replicate the kernels on the installation CDs?
You don't even need the disk, it is most likely installed on your system as /boot/config (a symlink to the config for the kernel). Don't know how that will help, though (unless you are looking to compile the driver on a separate box and just want to be able to re-create the stock kernel on that box).
Old 10-06-2005, 11:58 AM   #3
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 810

Original Poster
Rep: Reputation: 254Reputation: 254Reputation: 254
Sorry I wasn't clearer in my first post.

I am running a kernel that I did compile myself.
I did recompile the driver to run with the 10.2 kernel.

The problem is if I boot the Slackware 10.2 Installation CD, it cannot see my hard disks.
I have to load the "ft3xx" driver in order to do that.

Since I compiled my own kernel, the "ft3xx" driver module I have will ONLY work with the kernel on my hard disk, and NOT the Slackware 10.2 Installation CD.

What I would like to do is build a version of "ft3xx.o" that can be loaded by the kernel on the Slackware 10.2 Installation CD. That will allow me to access the hard disks, or reinstall Linux in an emergency.

When I started out I had no "ft3xx" driver at all, and had to temporarily install another hard disk to compile Linux and build the driver.

I have an older copy of the "ft3xx" driver that I saved under Slackware 10.1. The Slackware 10.2 Installation CD kernel will load that driver if I use the "-f" switch. However, I'm kind of nervous about using that driver to do anything with my hard disks.

My first thought was to recompile Linux again, setting the options to the same as the kernel on the Installation CD, and then recompile the driver. The problem is I don't know the configuration of the kernel on the Installation CD. Instead of experimenting again, I thought I'd ask if there is a better way to build modules compatible with an existing kernel.

Last edited by Erik_FL; 10-06-2005 at 11:59 AM.
Old 10-06-2005, 03:10 PM   #4
Alien Bob
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 6,175

Rep: Reputation: Disabled

I wrote a SlackBuild script that should give you a Slackware package for your raid controller card.
Make sure you have installed the Slackware kernel sources for 2.4.31. Change directory to the kernel source directory and run
make oldconfig; make dep
Next, download all the stuff here: and then run
KVER=2.4.31 ./ft3xx.SlackBuild
in the download directory.

You'll end with a Slackware package in directory /tmp named ft3xx- , that contains the ft3xx.o.gz kernel module for the default Slackware 10.2 kernel (2.4.31).
Install that package using
installpkg /tmp/ft3xx-
so that the driver is installed - as a module!
This recipe only helps if your root filesystem is not located on your RAID device... because you can only load the ft3xx module after Slackware booted. In case you do need the module on boot, you could create an initrd file for the kernel, using the mkinitrd script, that contains the ft3xx module, and add something appropriate to /etc/lilo.conf.

Old 10-06-2005, 09:05 PM   #5
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 810

Original Poster
Rep: Reputation: 254Reputation: 254Reputation: 254

Thanks, I'll give that a try.
My Linux system and boot loader is on the RAID disk.
I already made the initrd image and got the system booting.

I'm assuming I just need to grab the "ft3xx.o.gz" out of the package, so I can load it when I boot the Slackware 10.2 installation CD. I'll probably put it on a floppy so I can do that.
That was the missing piece, a driver I can load while the Installation CD is booted in case I have a problem.

The script you gave me appears to do a better job of selecting the CPU architecture. Was that the problem making the driver incompatible with the installation CD?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing driver modules without recompiling stock kernels cheelee Linux - General 3 06-18-2005 07:24 AM
Strangeness (or pilot error) building network driver modules cacheout Fedora 0 07-27-2004 06:39 PM
Modules won't work or install after Kernel Updates xptech Linux - Newbie 8 04-22-2004 01:09 PM
Modules and 2.6test kernels rch Linux - General 3 11-11-2003 09:39 PM
How to test between 2 kernels in /etc/modules.conf pnb Linux - General 2 11-10-2003 04:29 PM

All times are GMT -5. The time now is 02:31 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration