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'm doing my first steps compiling the linux kernel and adding a new system call. I've managed to do it, but I still have some questions.

For this task, I has set up a Virtual Machine guesting debian 7 64 bits. I am following a tutorial found in Internet of how to do this (http://arvindsraj.wordpress.com/2012/10/05/adding-hello-world-system-call-to-linux/) And as documentation, overall, a manual of how to create a custom linux kernel in Debian GNU/Linux and the manual page for make-kpkg.

So far, I am using the next script to compile:

#!/bin/sh
make-kpkg clean
INSTALL_MOD_STRIP=1 CONCURRENCY_LEVEL=2 time make-kpkg --initrd --append-to-version=-$1 kernel_image

And, well, I have the following questions:

  1. Right now, I'm defining kernel_image only as target. Should I include also kernel_headers? when should I compile and install the kernel_headers? what are they for?
  2. If I use as target: binary_arch, is exactly the same than using kernel_image and kernel_headers?
  3. I put INSTALL_MOD_STRIP=1 because I read that it compiles it faster and the output is much smaller. I know it reduces the number of modules being compiled. how much is this reduction? Should I use this flag for a final compilation for a final use of the kernel in my computer??

Thank you in advance!

share|improve this question
    
I'd recommend looking at the Debian Kernel Handbook instead. It seems kernel-package is no longer supported; its maintainer is not active. The methods described in that book is what the Debian kernel team current recommends. –  Faheem Mitha May 1 at 12:03
    
@FaheemMitha Thank you, but I'm following this method and It works for me. I just want to respond the questions above. –  Akronix May 1 at 12:09
    
You're better off using a supported method. I use to use kernel-package too, but be aware that that it will probably be less and less used by others. This package has not been updated by the maintainer since Tue, 20 Jul 2010 (12.036). It has been NMUed 3 times since then to deal with various issues by the kernel maintainers, but I suspect its usage will continue to fall. If you want an answer you are probably better off asking somewhere like the debian-user mailing list. The debian kernel mailing list might also be an option. See also wiki.debian.org/DebianKernel –  Faheem Mitha May 2 at 15:38
    
As for 1, the kernel headers are used for compiling third party kernel modules. So install the kernel headers if you want to do that. –  Faheem Mitha May 2 at 15:41
    
Ok, @FaheemMitha Thank you very much for your information, and I think, for now, that answer is enough for me. –  Akronix May 2 at 16:01

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.