1

I downloaded the source code of linux kernel 5.7.3. I already compiled it and installed it by the following commands:

make
make modules_install
make install

the kernel is added to grub2 and it is successfully working, however, I want to make my own cpu scheduler. My question is: how can I only compile and install the changes under ./kernel/sched/ folder without recompiling everything?

I know there is make kernel/sched/ which only compile files under this folder, however, I am going to edit the code frequently and try it out. What is the best way to do this? If I edited a file under kernel/sched/ should I run

make
make modules_install
make install

again? or there is a better and faster way to test my changes?

Note: the kernel is already installed and it is showing in grub2 menu and my system works when I select it, but I am going to change the code again and again and I need a faster way to test my changes.

2

make is intelligent enough to allow to recompile only the new source files without recompiling everything. If the kernel still insists on recompiling pretty much everything (which is possible if your changes include the header files which are included by other source files), please use ccache (google for it).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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