Some questions compiling linux kernel with make-kpkg

Discussion in 'General Linux' started by Akronix, Apr 30, 2014.

  1. Akronix

    Akronix New Member

    Messages:
    10
    Likes Received:
    4
    Trophy Points:
    3
    Hello, 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 question.


    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 (I'm not able to post links yet...)
    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:
    Code:
    #!/bin/sh
    make-kpkg clean
    KBUILD_VERBOSE=1 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 This Page