Howto recompile Linux kernel faster (reduce compilation time)
Posted by HostsVault | Posted in How-To's | Posted on 29-06-2009-05-2008
4
Normally when you build a custom kernel you use some config files available online which have everything enabled to assure everything works, but this elongates compilation time which also could make your kernel bigger than needed, finally Steven Rostedt has come up with a awesome solution for this problem .
He developed a perl script “”streamline_config” that you can download here it will make a custom config file that will still boot your box, but bring down the compile time of the kernel can be really long.
The script will perform “lsmod” to find all the modules loaded on the current running system. It will read all the Makefiles to map which CONFIG enables a module. It will read the Kconfig files to find the dependencies and selects that may be needed to support a CONFIG. Finally, it reads the .config file and removes any module “=m” that is not needed to enable the currently loaded modules. The output goes to standard out.
Here is Steven’s thread about the script
Steps to run the script :
1- Boot up the kernel that you want to streamline the config on.
2- Change directory to the directory holding the source of the kernel that you just booted.
Then run this commands :
./streamline_config.pl arch/x86/Kconfig > new_config mv .config config_old mv new_config .config make oldconfig
if you wanna modify anything you can run make menuconfig instead of make oldconfig


@Jorgo what error did you face?
Thanks a lot for this.
Actual not working on 2.6.35. was working with 2.6.34
“Normally when you build a custom kernel you use some config files available online” – that sounds unlikely…
Thanks. Looks very promising. I am going to use it today. Will update result soon..