[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] QEMU-i386-static question

From: Peter Maydell
Subject: Re: [Qemu-discuss] QEMU-i386-static question
Date: Fri, 13 Sep 2019 13:40:54 +0100

On Fri, 13 Sep 2019 at 13:23, Dr. Pedro E. Colla <address@hidden> wrote:
> As it's a cross architecture setup chroot operates on a different platform
> (ARM host vs. X86 guest) so using binfmt qemu-i386-static is invoked by the
> chroot command, therefore when executed qemu has been already executed.
> Under that configuration /dev/ttyUSB0 doesn't exists. I might install the
> USB Prolific serial port drivers once in X86 but I don't believe that would
> make the chrooted environment (under qemu) to share the port with the host,
> does it?

QEMU is not relevant to your problems as far as I understand
them, and nor is any cross-architecture aspect to the chroot.

If your host already has working access to /dev/ttyUSB0 then you
don't need to install serial port drivers anywhere as you already
have them. (If your host doesn't have serial port access that
works then fix that first before worrying about the chroot.)

You just need to make sure that you have a /dev/ttyUSB0
special file in the chroot so that programs running in the
chroot can use it. You can create the device node by hand,
or you can just bind-mount the whole of your host's
/dev/ into the chroot's /dev/. For USB the latter is probably
better, given the way USB devices can be plugged and
unplugged. If the file exists inside the chroot then programs
can open it and will be talking to the host kernel's serial port

If you're using a tool like 'schroot' to manage your chroot
setups, it will have config to let you expose the host's
/dev/ to the chroot. If you're doing them entirely manually,
then some command like "mount -o bind /dev /mnt/chroot/dev"
will bind-mount /dev into the chroot.

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]