Building driver modules to work with Install kernels?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
Quote:
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).
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.
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
You'll end with a Slackware package in directory /tmp named ft3xx-1.00.0.19_2.4.31-i486-1.tgz , that contains the ft3xx.o.gz kernel module for the default Slackware 10.2 kernel (2.4.31).
Install that package using
Code:
installpkg /tmp/ft3xx-1.00.0.19_2.4.31-i486-1.tgz
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.