Here’s a quick, simple tip to speed up the time it takes to compile a kernel or other program with a well designed Makefile (i.e. BusyBox): use the
-j make option. This will allow the compiler to execute in parallel in what’s known as recipes. Here’s a quick example for compiling a kernel zImage bootable image:
make -j4 zImage
This will spawn off 4 parallel compiling processes. There is not a limit for the number of job slots that you can use, but I’ve been told that as a general rule of thumb not to exceed more than twice the number of CPU cores you have. I don’t have any references (or extensive experience) to back that up, so take it for what it’s worth.
For more information, see the following resource: