qemu ELF Loader Kernel integration
Hi,
Is it possible to integrate qemu(-ppc) into the Linux kernel, so that when a program tries to start a Linux-ELF-ppc executable, that qemu is being used to start it normally?
It would be useful for embedded systems development for cross-compilation:
The resulting binaries could be tried natively on the development system. If I would do it manually, I could start
qemu-ppc binary
But in some enviroments, the binary is started automatically by a third-party product, therefore being able to launch the binary directly would be helpful.
Regards,
Signature · 1 line
Philipp Gühring
Quoted 5 lines · PhilippGühring
Hi,
Is it possible to integrate qemu(-ppc) into the Linux kernel, so that when a program tries to start a Linux-ELF-ppc executable, that qemu is being used to start it normally?
Yes, see binfmt_misc (kernel support for misc binaries).
Quoted 6 lines
It would be useful for embedded systems development for cross-compilation:
The resulting binaries could be tried natively on the development system. If I would do it manually, I could start
qemu-ppc binary
But in some enviroments, the binary is started automatically by a third-party product, therefore being able to launch the binary directly would be helpful.
If you have a binfmt_misc compiled to your kernel and you have registered qemu as a ppc interpreter then qemu will be started automatically when executing the ppc binaries. You will need to register qemu as your interprer in proc interface (/proc/sys/fs/binfmt_misc/register).
--
Valtteri Rahkonen
Quoted 19 lines · Valtteri Rahkonen
Quoted 5 lines · PhilippGühring
Hi,
Is it possible to integrate qemu(-ppc) into the Linux kernel, so that when a program tries to start a Linux-ELF-ppc executable, that qemu is being used to start it normally?
Yes, see
binfmt_misc(kernel support for misc binaries).Quoted 6 lines
It would be useful for embedded systems development for cross-compilation:
The resulting binaries could be tried natively on the development system. If I would do it manually, I could start
qemu-ppc binary
But in some enviroments, the binary is started automatically by a third-party product, therefore being able to launch the binary directly would be helpful.
Quoted 1 line
If you have a
binfmt_misccompiled to your kernel and you have registered qemu as a ppc interpreter then qemu will be started automatically when executing the ppc binaries. You will need to register qemu as your interprer in proc interface (/proc/sys/fs/binfmt_misc/register).
Would this work for for exemple the flash player plugin or is it only for executables ? I am interested in doing that the other way around, for i386 code on linux ppc.
Quoted 10 lines
Quoted 5 lines
If you have a
binfmt_misccompiled to your kernel and you have registered qemu as a ppc interpreter then qemu will be started automatically when executing the ppc binaries. You will need to register qemu as your interprer in proc interface (/proc/sys/fs/binfmt_misc/register).Would this work for for exemple the flash player plugin or is it only for executables ?
I am interested in doing that the other way around, for i386 code on linux ppc.
Shared libraries (like Netscape plugins) are a different matter: they need to interface intimately with the native code - you can't run part of an app. in QEmu.
Last time this came up, somebody suggested that you might be OK with x86 Mozilla, with the x86 flash plugin, all under QEmu. I've not tried this, YMMV ;-)
HTH,
Mark
Quoted 7 lines · Mark Williamson
Shared libraries (like Netscape plugins) are a different matter: they need to interface intimately with the native code - you can't run part of an app. in QEmu.
Last time this came up, somebody suggested that you might be OK with x86 Mozilla, with the x86 flash plugin, all under QEmu. I've not tried this, YMMV ;-)
You probably don't actually need to use an i386 Mozilla. Mozilla can use external _programs_ displaying within its window; I use mozplugger with the i386 acroread on PPC, for example. You could just run the flash player _itself_ in a separate process, with a wrapper of your own to make it think it's running in an i386 Mozilla.
Or just use swfdec.
Signature · 1 line
dwmw2
Hi,
Philipp Gühring schreef:
Quoted 9 lines
Hi,
Is it possible to integrate qemu(-ppc) into the Linux kernel, so that when a program tries to start a Linux-ELF-ppc executable, that qemu is being used to start it normally?
It would be useful for embedded systems development for cross-compilation:
The resulting binaries could be tried natively on the development system. If I would do it manually, I could start qemu-ppc binary But in some enviroments, the binary is started automatically by a third-party product, therefore being able to launch the binary directly would be helpful.
Yes, have a look at linux-2.6.11/Documentation/binfmt_misc.txt.
With friendly regards,
Takis
Signature · 2 lines
K.U.Leuven, Mechanical Eng., Mechatronics & Robotics Research Group http://people.mech.kuleuven.ac.be/~pissaris/
Quoted 3 lines · Philipp Gühring
Is it possible to integrate qemu(-ppc) into the Linux kernel, so that when a program tries to start a Linux-ELF-ppc executable, that qemu is being used to start it normally?
Something like that is already available, see qemu-binfmt-conf.sh
--L