kernel compilation error
I compiled a simple kernel module in fedora core 6,shows some error.But the same code worked in RHEL.Any one know the reason pls pls help me.The error message is
make -C /lib/modules/2.6.25-14.fc9.i686/build M=/media/disk/mypgms modules
make: *** /lib/modules/2.6.25-14.fc9.i686/build: No such file or directory. Stop.
make: *** [all] Error 2
and the make file is
obj-m += hello.o
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
I'm not sure about exact error messages, Have check this useful guide about LKM,
The Kernel Newbie Corner: Your First Loadable Kernel Module
The kernel build configuration is quite different between FC and various RHEL distributions. Do check on the requirements in either case in order to resolve your problem. In any case, the error is saying that the directory /lib/modules/2.6.25-14.fc9.i686/build doesn't exist. You could create it and see if that fixes your build error, or if something else comes up.
Thaks for the replays.......
I think the problem was the missing of kernel headers and i install kdeve-packages(kernel-devel-2.6.25-14.fc9.i686.rpm ), bcoz i am using fc9.
Now the programs are working fine.and thaks.
But now i got a warning --Clock skew detected. Your build may be incomplete.
do u know the reason?? But the insmod and other utilities are working fine with the compiled modus.
Clock skew would only be an issue if you are doing partial builds where make uses the file time stamps to determine if certain sources need to be compiled or not. If you are doing a complete/clean build, then this will not be an issue since all of the sources will be compiled.