Operating System - Linux
1754988 Members
3334 Online
108828 Solutions
New Discussion юеВ

How to recompile the driver library?

 
SOLVED
Go to solution
Joyce Yuen
Occasional Contributor

How to recompile the driver library?

Hello,

Do anyone know how to recompile a driver program e.g.

/usr/src/linux-2.4.18-3/drivers/scsi/st.c

Thanks.

Joyce
2 REPLIES 2
James Wilson_5
Frequent Advisor

Re: How to recompile the driver library?

The easiest way is just to recompile the kernel.
If you want to compile it as a module make sure it is set in the configuration to be made as a module by running make xconfig or make menuconfig.
Then just:
make dep modules modules_install.
Kodjo Agbenu
Honored Contributor
Solution

Re: How to recompile the driver library?

Hello,

If you have never compiled Linux kernel, it could get a bit complicated and risky.

To limit the risks, you can use the set of configuration options that were used by RedHat during the install of your machine. The corresponding file should be /boot/config-2.4.18-3.

Copy that config file into /usr/src/linux-2.4.18-3/.config

Go to /usr/src/linux-2.4.18-3, then go on with the steps described by James :

make menuconfig => exit AND save options.

make clean
make dep
make modules

To limit risks, do not type "make modules_install". Instead, just copy the "st" module from /usr/src/linux/2.4.18-3/drivers/scsi/st.o into /lib/modules/2.4.18-3/kernel/drivers/scsi/

Good luck.

Kodjo
Learn and explain...