From: "Alex Bennée" <alex.bennee@linaro.org>
To: wj193102 <wj193102@163.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu3.0.0: Linux on non x86 CPUs run x86 executable
Date: Mon, 29 Oct 2018 12:26:46 +0000 [thread overview]
Message-ID: <87bm7d9bw9.fsf@linaro.org> (raw)
In-Reply-To: <1dc0f7d0.1ce87.166bf995fb1.Coremail.wj193102@163.com>
wj193102 <wj193102@163.com> writes:
> Hi, everyone.
> When I have installed the QEMU3.0.0 in the Linux on non X86 CPUS, I want to use user space emulator to run X86 executable. So I get the document from the QEMU web page (QEMU document) .
> I find the section 5.3 and read the content. But I have some questions in the following:
> (1)I can't understand the content: "On non x86 CPUs, you need first to download at least an x86 glibc (qemu-runtime-i386-XXX-.tar.gz on the QEMU web page). Ensure that LD_LIBRARY_PATH is not set:
> unset LD_LIBRARY_PATH". How I get the X86 glibc? And How to use it?
> Compiling and installing it in the Linux on non X86 CPUS or
> not?
The usual way is to create a chroot and install some x86 distro in
there so that it can provide the requisite bits and pieces. The details
vary depending on what chroot you want to setup.
I personally tend to use Debian as it has excellent architecture
support. If you have a working docker setup you can even host your x86
userspace in a docker container which simplifies some aspects.
> (2) I also haven't understood the content:"Then you can launch the
> precompiled ls x86 executable: qemu-i386 tests/i386/ls". The file of
> "ls x86 executable" is in the any Linux from the path "/bin/ls" on
> the X86 CPUS. Is that right?
Yes. The very simplest case is a statically compiled binaries as you
then don't need to worry about jumping hoops to get the dynamic linker
working.
> Please help me to resolve these questions. Thanks very much.
If you just want to prove you have a working x86 emulation you can just
build the tcg test cases:
cd i386-linux-user
make guest-tests
./qemu-i386 ./tests/linux-test
--
Alex Bennée
prev parent reply other threads:[~2018-10-29 12:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-29 11:33 [Qemu-devel] qemu3.0.0: Linux on non x86 CPUs run x86 executable wj193102
2018-10-29 12:26 ` Alex Bennée [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bm7d9bw9.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=wj193102@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.