LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How to recompile kernel (https://www.linuxquestions.org/questions/linux-kernel-70/how-to-recompile-kernel-824276/)

zeus 08-05-2010 12:28 AM

How to recompile kernel
 
I am trying some changes to the kernel code. To test them out I have to recompile the whole kernel with the $make command. Since I have not touched the major part of the kernel including the device drivers is there any way to only compile what I have changed and avoid rebuild all the modules every time.

Drakeo 08-05-2010 12:34 AM

simple http://alien.slackbook.org/dokuwiki/doku.php?id=linux:kernelbuilding&s[]=kernel&s[]=compile

zeus 08-05-2010 12:45 AM

To be more clear I dont want to recompile all the kernel modules every time. I could not find the information that I was looking for on the above website.

$make should just compile what has changed and not recompile all the kernel modules - which takes a lot of time.

Suresh Maniyath 08-05-2010 05:04 AM

compiler cache
 
I am not sure whether you are looking for a compiler cache, you can think about using "ccache" available here "http://ccache.samba.org/"

Regards,
Suresh Maniyath

zeus 08-05-2010 11:14 PM

problem fixed. make handles it automatically. just dont do make clean or make distclean. I dont know whether there are any side effects of not running make clean :)

Drakeo 08-06-2010 08:47 AM

if you have a kernel that has been configured and built with modules. This happens with the make command . later you can run make xconfig or make menuconfig select the new modules you want built. then do make modules. always back up your /lib/modules/uname -r
make clean does that cleans your built modules then you will have to recompile them again if needed.


All times are GMT -5. The time now is 06:24 AM.