Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am compiling kernel 3.4 and 3.8 for different target devices. I would like to install compat wireless driver which requires kernel header. Could anyone tell me how I can compile/build the kernel header from the kernel source? I would appreciate if someone could suggest me a clear document to read or explain clearly how I can accomplish it.

Secondly, the target devices run Debian. would it work if I install the kernel header by apt-get install linux-headers-$(uname -r) for the device that would have 3.4 kernel? Or there might be conflict or problem?

share|improve this question

1 Answer 1

It has been a while since I did cross compilation, but I found this description of doing cross compilation quite clear, YMMV.

Depending on your specific target there might be more specific documentation available online.

I would set up two complete new trees (one for 3.4 and one for 3.8) for compiling the kernel and not use the apt-get command as it will not install these headers in the new trees. Any changes you would make in files installed with apt-get would run the risk of breaking some other package relying on them (you obviously don't use any of those now, but you might in the future).

share|improve this answer
    
thank you for the reply. I am able to cross-compile and load the kernel. I was asking how to build the kernel headers (similar files that I get through apt-get install linux-headers-$(uname -r) ) . I could not see that info on the link you posted. –  sven May 17 '13 at 9:41
    
@sven I am not sure if I understand your problem. If you download the kernel sources, the headers are included. Or are you talking about special headers that would be included in your (host) Debian install that are not in the sources? –  Anthon May 17 '13 at 9:55
    
I need to create files under /lib/modules/3.4.0/build, as I read they are called kernel header or source files. what apt-get install linux-headers-$(uname -r) installs the source files under build directory. I wonder how I need to create the files under /lib/modules/3.4.0/build –  sven May 17 '13 at 10:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.