PDA

View Full Version : make kernel modules in core 5



Bob Bao
6th November 2007, 06:51 PM
I tried to move our device driver from core 3 to core 5. I downloaded iso CD and installed the package without any error.

But, when i tried to install our device driver,there is an error message:

Make: /lib/modules/2.6.15-1.2054_FC5/build No such file or directory.

Acording the package notes, An exploded source tree is not required to build a kernel module, such as your own device driver. Do I need to download kernel source rpm?

I am not good on these kernel issues. Someone here may help me.

Thanks.

Seve
6th November 2007, 07:34 PM
Hello:
I believe you are going to have to find the matching kernel-devel rpm and install that. It may be included on the iso ?
Or you can use yum to install
yum install kernel-devel

That is if you can find some active mirrors, since FC5 has not been supported for 6 months or so.
F8 will be out this week, so you may want to consider installing that or at least F7.

Seve

Bob Bao
6th November 2007, 08:12 PM
Hello:
I believe you are going to have to find the matching kernel-devel rpm and install that. It may be included on the iso ?
Or you can use yum to install
yum install kernel-devel

That is if you can find some active mirrors, since FC5 has not been supported for 6 months or so.
F8 will be out this week, so you may want to consider installing that or at least F7.

Seve

I did "yum install kernel-devel". It is completed successful.

Now I can see the directory /usr/src/kernels/2.6.20-1.2320.fc5. But my kernel version is 2.6.15-1.2054. so the lib/modules/2.6.15-1.2054_fc5/build symbol link to wrong directory.

Do I need to update kernel version or I just change link?

Seve
6th November 2007, 08:14 PM
Hello:
You need to update your kernel, as at this point in time the kernel version and the kernel-devel version do not match and they need to.
2.6.20-1.2320.fc5
vs.
2.6.15-1.2054_fc5

Seve

FriedChips
6th November 2007, 08:16 PM
update your kernel version and make SURE that your kernel-devel matches your kernel. Then you should be able to build your kernel module as normal.

Bob Bao
6th November 2007, 08:26 PM
How do I update my kernel version. Could you please gave me detail command ? I am not good no that. Thanks.

Seve
6th November 2007, 08:44 PM
Hello:
Try
su -

yum update kernel

And for more information on how to use Yum http://www.fedorafaq.org/fc5/#installsoftware

Seve

Bob Bao
6th November 2007, 09:11 PM
Thank you very much. You solved my problem. Now the device driver module is built.

FriedChips
6th November 2007, 09:13 PM
Be aware that when you build modules from source like you just did, if you update your kernel again you will have to build a new one, so it is worth holding on to the source that you just built from.