* [Qemu-devel] qemu3.0.0: Linux on non x86 CPUs run x86 executable
@ 2018-10-29 11:33 wj193102
2018-10-29 12:26 ` Alex Bennée
0 siblings, 1 reply; 2+ messages in thread
From: wj193102 @ 2018-10-29 11:33 UTC (permalink / raw)
To: qemu-devel
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?
(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?
Please help me to resolve these questions. Thanks very much.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] qemu3.0.0: Linux on non x86 CPUs run x86 executable
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
0 siblings, 0 replies; 2+ messages in thread
From: Alex Bennée @ 2018-10-29 12:26 UTC (permalink / raw)
To: wj193102; +Cc: qemu-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-29 12:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).