Build a Raspbian (arm) chroot on Debian (x86_64)

You can use debootstrap to generate the chroot, but you need to proceed in 2 steps.

  1. Init the chroot:

    # apt-get install qemu-user-static debootstrap
    # CHROOT=/path/to/chroot
    # debootstrap --no-check-gpg --foreign --arch=armhf \
         jessie $CHROOT
  2. Copy the qemu-static binary in the chroot filesystem:

    # cp /usr/bin/qemu-arm-static $CHROOT/usr/bin
  3. Finish the debootstrap installation:

    # chroot $CHROOT /debootstrap/debootstrap --second-stage
  4. Configure the correct repositories:

    # cat > $CHROOT/etc/apt/sources.list << EOF
    deb jessie main contrib non-free rpi
    deb jessie main
    # chroot $CHROOT \
        apt-key adv --keyserver --recv 82B129927FA3303E
    # chroot $CHROOT apt-get update