What is the fastest way to build and boot a kernel

Aruna Hewapathirane aruna.hewapathirane at gmail.com
Wed Apr 19 07:24:48 EDT 2017


>> On Tue, Apr 18, 2017 at 11:59 AM, Code Soldier1 <codesoldier1 at gmail.com>
wrote:
>> Hi,

>> Can someone suggest what is the fastest way to build a minimal kernel
>> and boot.

Two ways to build a minimal kernel. Try make localmodconfig or make
tinyconfig and see what fits your needs best. If this is still not what you
need then you have to tweak things using make menuconfig ( can be a real
pain in the butt... :)

>> For example if I am working on TCP and would like to make a
>> small change and reboot, what is the fastest way, I rather not build
>> the whole kernel.

Stay away from make menuconfig after the initial compile. The first time
you use make menuconfig it will create .config for you. As long as you do
not mess with the .config you can simply run make and should be able to
build just the file(s) you changed.

Keep in mind somethings are statically linked in to the kernel, meaning
'built-in' and if you touch those may trigger a full compile.

To get a faster compile/build use make parallel build with -j option. Where
-j is the number of processors available to you.
For eg: make -j4

Also compile for the target architecture only: make ARCH=<your
architecture> -jN

UML ( User mode linux ) I have found is faster for reasons yet to be
comprehended by me :)

Hope this helps and monikers are good, whats wrong with slap that code with
a flying trout eh ?

Aruna












> Thanks
>
> --
> CS1
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20170419/670331ec/attachment.html 


More information about the Kernelnewbies mailing list