I test a number of kernels including vanillla, mandrake, lolo-sources, linux-beta and, of course, gentoo-sources so I find myself compiling the kernel lots of times. Even if you use distcc to emerge packages like I do, kernel compilations aren't distributed because the kernel make doesn't use /etc/make.conf. This is how I use distcc to radically speed up my compile times:
Overview
- Set up distcc
- Emerge distcc on the computers
- Start distccd on the slave systems
- Configure the kernel
- Edit Makefile
- make the kernel
Set up distcc on all computers that you want to use, including the host computer. To accomplish this, a simple emerge command suffices:
Code: Select all
emerge -u distccCode: Select all
/etc/init.d/distccd startChange to /usr/src/linux and configure the kernel using make menuconfig or make xconfig (does anyone still use make config ????
Edit the Makefile
Fire up your favourite editor and load /usr/src/linux/Makefile. Find this section:
Code: Select all
#
# Include the make variables (CC, etc...)
#
Code: Select all
CC = $(CROSS_COMPILE)distcc
Code: Select all
DISTCC_HOSTS=slave1 slave2 slave3 ... slaveN
If you want the local machine to participate in the compile, remember to start distccd on it as well and add localhost to the list of DISTCC_HOSTS. I don't recommend this, though, as the local machine will already be doing the preprocessing and co-ordinating.
Add DISTCC_HOSTS to the line which says
Code: Select all
export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \Make the Kernel
When making the kernel, do a
Code: Select all
make -jQ bzImage I found my kernel being built *much* faster with distcc.
Aniruddha Shankar
Bangalore, India.
Vipassana Works.






