I created a chroot environment with qemu to get a x86 linux kernel to run on a Raspberry Pi 3. Do you know how to pass the USB port through when running sudo chroot /home/pi/chroot-stretch-i386/ /bin/su -l root? Is there a config file for that?

Thanks for your help.

See: https://www.novaspirit.com/2019/04/15/run-x86-arm/

  • The sudo chroot... command you've given doesn't have anything to do with Qemu. It would be the qemu command that would allow you to define a pass-through. Sep 19, 2019 at 22:42
  • 1
    The instructions OP is following don't actually explicitly run qemu at any point. Instead, they rely on binfmt-support and qemu-user-static to automatically run foreign-architecture (x86) binaries through qemu. So it would seem to be necessary to investigate configuration files in /usr/share/binfmts to find the wrapper script that will run qemu for x86 binaries, and then find a suitable place to modify the actual qemu invocation to enable USB passthrough. I don't have such a set-up at the moment so I cannot check the details, can someone else continue from here?
    – telcoM
    Sep 19, 2019 at 23:15

1 Answer 1


I did this (the other way around, running the Raspberry system on x86, but it might help):

# mount /dev/sdxy /mnt/pi # the pi's sdcard

You should now copy qemu-arm-static to /mnt/pi/usr/bin, but you've alredy set that up.

# cd /mnt/pi
# mount -t proc proc proc/
# mount -t sysfs sys sys/
# mount -o bind /dev dev/
# export QEMU_DEVICE=qemu-xhci
# chroot /mnt/pi

That's it, now I can run lsusb and do things like

cat /dev/input/mouse0

inside the chroot and see the input.

Does this help? What are you trying to access over USB?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .