Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel compile time
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1014

PostPosted: Mon Oct 02, 2017 2:54 am    Post subject: Kernel compile time Reply with quote

I'm recently finding that the upgrades and changes to my custom linux kernel are taking a lot more time to compile than I am wanting...how might I reduce compile time, what are the methods of either reducing size, or just compile time for the kernel. My system is very basic, and my kernel is steadily becoming larger over time. I wonder if i have some options that could be removed, but I haven't any ideas for trying to spot and remove the unnecessary kernel options.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7089
Location: Saint Amant, Acadiana

PostPosted: Mon Oct 02, 2017 3:14 am    Post subject: Reply with quote

Start with make allnoconfig, add only what you need. Will take a couple of hours, probably. Keep some stuff ready to avoid brain overheating. My last kernel compile time was 1 minute 32 seconds, with -j9.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1014

PostPosted: Mon Oct 02, 2017 5:12 am    Post subject: Reply with quote

Thanks for the suggestion. I want to do what you are suggesting, so just to make sure, the make allnoconfig I just ran and it took about 2 minutes of compiling the kernel. So what's the next step, is it to compare the configs and alter them within just that file? Then make the target(s) for kernel, modules, everything. The reason I'm asking is because i've seen some information (possibly bad info) about the possible downsides of using the menuconfig option. What is being recommended in terms of the changes to the kernel now that everything is set to no?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7089
Location: Saint Amant, Acadiana

PostPosted: Mon Oct 02, 2017 5:14 am    Post subject: Reply with quote

Now you run make nconfig and get ready to learn about kernel options you are going to enable.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1014

PostPosted: Mon Oct 02, 2017 5:35 am    Post subject: Reply with quote

K I am not trying to break any records with the compile time, just need to do something about it, since it is getting ridiculous. I do have some questions looking at those kernel options, would like to know just about some of the more standard or basic options and whether it might save time later down the road, just to get some help now for it...

a) Will it be worthwhile usually in the past that is all I've done but to include loadable module support, but since I will be reducing the size of the kernel it seems like a relevant issue to be worried about

b) What specific types of things take up the compile time and I will do my best to avoid them...like device drivers, and stuff like that, or is it usually just a conglomerate of different items that take long to complete the process of compiling the kernel?
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Mon Oct 02, 2017 5:40 am    Post subject: Reply with quote

Code:
man make

Quote:
-j [jobs], --jobs[=jobs]
Specifies the number of jobs (commands) to run simultaneously. If there is more than one -j option, the last one is effective. If the -j
option is given without an argument, make will not limit the number of jobs that can run simultaneously.


e.g. for 8 threads
make --jobs 8 && make --jobs 8 modules_install

Quote:
The reason I'm asking is because i've seen some information (possibly bad info) about the possible downsides of using the menuconfig option.


just use make oldconfig when you are upgrading. When you do not have any particular needs to change anything.
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1014

PostPosted: Mon Oct 02, 2017 6:30 am    Post subject: Reply with quote

That is a good idea. I will keep it in mind :P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum