Welcome to the new Linux Foundation Forum!

How to compile the kernel, and debug it

Sp4rt4hSp4rt4h Posts: 1
edited April 15 in Kernel Development


I am getting back into kernel development, and it appears that the linux kernel's build system has changed. I am trying to debug it on Debian, and I am wondering what the steps are to compile the debug version, install it, and then debug it. Is there a guide anywhere?


  • opendrainopendrain Posts: 3
    edited April 15

    I use a custom script. from /usr/src/linux

    Core part is,

    make oldconfig (or menuconfig) 
    make clean

    Then you can prepend with, if needed, ARCH and CROSS_COMPILE variables.

    To debug, debug symbols should be enabled in menuconfig.

    Then of course you may also check the official guide of your distribution.

Sign In or Register to comment.