# Genkernel and distcc - how ?

## cpu

How to modify genkernel to use distcc for make - anyone knows ?

Thanks in advance

----------

## Admiral LSD

err... why?

Unless you have a really, really, really slow system (and I'm talking 386 and 486 class machines here) then compiling the kernel, even with a POS like genkernel, isn't likely to take longer than an hour or so. The benefits you'd get from using a distcc cluster, assuming it's even possible, would be fairly insignificant.

----------

## Rainmaker

it's not possible.

Distcc is disabled for kernel compilations, because it causes an unstable / faulty kernel (c.q. bzImage). You could probably hack into Makefiles and get it to work, if you really, really want to.

If you have an old 386-16 lying around, use crosscompiling, although I'm not sure if that IS possible with a kernel compile

*edit, copy the kernel from a livecd if your really deperate...

----------

## cpu

I have Athlon2600+ and K6-2 - Athlon works for K6-2 and I want to see the speedup in kernel compiling - make -j4 CC=distcc this what I have to put but I don't know where in genkernel...

----------

## Rainmaker

if it's capable of using distcc, it will... But I don't think it is

----------

## Moloch

Uh, using distcc really causes instability?

Here's how I ended up using distcc for kernel compiles.

edit /usr/src/linux/Makefile

Change:

```
CC              = $(CROSS_COMPILE)cc
```

To:

```
CC              = $(CROSS_COMPILE)distcc
```

Scroll down somewhere, add this: 

```
DISTCC_HOSTS    = computer1 computer2 computer3
```

I usually add this line after AFLAGS_KERNEL   =

Then scroll down to the line that starts with export add DISTCC_HOSTS to the end of it. Mine looks like:

```
export  VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \

        CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \

        CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \

        HOSTCXX HOSTCXXFLAGS LDFLAGS_BLOB LDFLAGS_MODULE CHECK NAME DISTCC_HOSTS
```

The commands i type to compile the kernel:

```
make clean

make -j5 all

make modules_install
```

At the time of typing this post my kernel version is 'linux-2.6.6-love4'. I have never used genkernel or anything so I have no idea if/how these changes will affect it.

----------

## cpu

Thanks a lot   :Wink: 

----------

