On Sun, Dec 09, 2007 at 06:52:41PM +0530, Amogh Hooshdar wrote: > I was trying the code at http://www.faqs.org/docs/kernel/x1206.html Note that the code over there was written with linux-2.4 in mind. As lots of things changed in 2.6, it is very well possible that the examples don't compile against a 2.6 kernel. Note especially that section 2.2 ( http://www.faqs.org/docs/kernel/x204.html ) is completely outdated. See "Compiling external modules" in http://lwn.net/Articles/driver-porting/ for an update. > It seems the file "linux/modversions.h" is not present in my > linux-headers source. I am on Debian and I have installed the > linux-headers-2.6-486 package. As a result they are available in > "/usr/src/linux-headers-2.6.18-4-486/". But this directory doesn't > have the required header file. > > $ ls /usr/src/linux-headers-2.6.18-4-486/include/linux/mo* > /usr/src/linux-headers-2.6.18-4-486/include/linux/mod_devicetable.h > /usr/src/linux-headers-2.6.18-4-486/include/linux/module.h > /usr/src/linux-headers-2.6.18-4-486/include/linux/moduleloader.h > /usr/src/linux-headers-2.6.18-4-486/include/linux/moduleparam.h > /usr/src/linux-headers-2.6.18-4-486/include/linux/mount.h > > Could someone please explain what I should do to be able to compile > the code example? Is installing the linux-headers not good enough? Do > I need to do something more to set up a successful Linux kernel > development environment? You just shouldn't include linux/modversions.h. If it is necessary, kbuild will take care. Erik -- They're all fools. Don't worry. Darwin may be slow, but he'll eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
Attachment:
signature.asc
Description: Digital signature