Rafael Espindola
2007-Oct-23 20:59 UTC
[LLVMdev] howto: using a chroot of another architecture with qemu
I have just build an arm chroot and I imagine others might be interested on how to do it. First you need to install qemu. Follow the instructions on http://wiki.debian.org/QemuUserEmulation. I had some problems compiling for x86_64, so I just edited qemu's configure to compile for i686. Now run debootstrap: debootstrap --foreign --arch arm sid your_chroot_dir http://ftp.debian.org/debian you should now be able to run statically linked program like your_chroot_dir/lib/ld-linux.so.2 copy qemu to the chroot: mkdir your_chroot_dir/usr/lib/qemu-binfmt cp /usr/bin/qemu-arm-static your_chroot_dir/usr/lib/qemu-binfmt/arm enter the new chroot chroot your_chroot_dir finish the install /debootstrap/debootstrap --second-stage Cheers, -- Rafael Avila de Espindola Google Ireland Ltd. Gordon House Barrow Street Dublin 4 Ireland Registered in Dublin, Ireland Registration Number: 368047