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 http://archive.raspbian.org/raspbian
    
  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 http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
    deb http://archive.raspberrypi.org/debian/ jessie main
    EOF
    # chroot $CHROOT \
        apt-key adv --keyserver keyserver.ubuntu.com --recv 82B129927FA3303E
    # chroot $CHROOT apt-get update