Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-05-2005, 09:04 PM
|
#1
|
|
Member
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 756
|
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?
|
|
|
|
10-06-2005, 02:34 AM
|
#2
|
|
Senior Member
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132
Rep:
|
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.
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).
|
|
|
|
10-06-2005, 11:58 AM
|
#3
|
|
Member
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 756
Original Poster
|
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.
|
|
|
|
10-06-2005, 03:10 PM
|
#4
|
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 4,734
Rep: 
|
Hi,
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
Code:
make oldconfig; make dep
Next, download all the stuff here: http://www.slackware.com/~alien/slac...s/ft3xx/build/ and then run
Code:
KVER=2.4.31 ./ft3xx.SlackBuild
in the download directory.
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.
Eric
|
|
|
|
10-06-2005, 09:05 PM
|
#5
|
|
Member
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 756
Original Poster
|
Eric,
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?
Regards,
Erik
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:23 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|