Raspberry Pi chroot

So, let’s imagine you’re a happy owner of Raspberry Pi, you either just unpacked it, or may be used it for some time.
And for some reason you’ve decided to install not just your favourite binary distribution, but mighty source-based Gentoo linux.
First of all checkout Gentoo wiki pages dedicated to Raspberry Pi: [1], [2].
Also checkout Beyond Linux From Scratch on the Raspberry Pi as it also covers the topics we discuss here.

While Gentoo is already a lot about utilizing much of your processor power and I/O bandwidth for the compiling packages, Gentoo on a Raspberry Pi faces a real bottleneck when it comes on compiling on the same machine.

There are several ways to speed the things up.

  1. Hardware-related: speed up the RPi itself, i.e. build RPi build farm, buy smth else overclock it.
  2. Software related:
    • Distributed compilation: e.g. cross-compilation with distcc.
    • Building binary packages inside VM: qemu-system-arm, for QEMU+RPi initial configuration see [1], [2] (in Russian).
    • Building binary packages inside special environment: chroot + static qemu-system-arm.

Continue reading