On Sat, 19 Oct 2002, Steve Fosdick wrote:
On Sat, 19 Oct 2002 17:22:09 +0100 (BST) Simon Jude S.Jude@uea.ac.uk wrote:
Hi, I need to compile a driver so that I can get the network to run on my laptop. Being a newbie when it comes to compiling (except for kernels), could somebody please explain what kernel headers are?
Headers, in C, are files which contain declarations that enable modules of code to to compiled sperately and then linked together later. The kernel hedaers contains declarations of functions, contstants and data structures that allow various modules of the kernel to compiled sperately but work together in the end.
The instructions say unpack the tarball and run make (you need kernel headers for this, with /usr/src/linux pointing to them).
The kernel headers are normally part of the kernel source code as they are need during the process of compiling the kernel. The directory /usr/src/linux is, by convention, the directory in which the source code can be found for the currently running kernel. Often /usr/src/linux is a symbolic link to a real directory under /usr/src which contains the kernel source code.
So, if you have compiled the kernel before on this machine you just need to make sure that /usr/src/linux points to the directory in which you build the kernel from source code - if it doesn't then make a link to it. The target of this link doesn't even need to be under /usr/src.
Thanks for the help. The problem was the kernel source hadn't been installed (DOH!) and the makefile needed the link to the source editing. All is working now!
Simon