Package: qemu
Version: 0.8.0-2
Severity: normal
Tags: patch
With this patch, running a dynamically linked program in QEMU would be
as simple as (assuming dpkg-cross is installed):
wget <target's libc6 and other library dependencies>
dpkg-cross -i -a <arch> <target's libraries>
qemu-<arch> <program>
Additionally, make qemu use the same libraries installed by dpkg-cross
by default would help people doing cross-compilation development (e.g.
testing compiled programs/libraries). Note that the interpreter path
can still be changed using the -L parameter as usual.
Changes from patch posted in #327622: modify qemu-ppc interpreter
prefix to match Debian's PPC architecture string (powerpc-linux-gnu);
use "linux-gnu" instead of DEB_HOST_GNU_SYSTEM to cover the case where
host is not Linux (e.g. kFreeBSD).
Note: this patch assumes that #356284 is applied.
Changelog:
* Change default interpreter prefix to match dpkg-cross crossdir.
* Suggests dpkg-cross to be used with user mode emulators.
--
Anderson Lizardo
Embedded Linux Lab - 10LE
Nokia Institute of Technology - INdT
Manaus - Brazil
diff -u qemu-0.8.0/debian/control qemu-0.8.0/debian/control
--- qemu-0.8.0/debian/control
+++ qemu-0.8.0/debian/control
@@ -15,7 +15,7 @@
Depends: ${shlibs:Depends}, vgabios (>= 0.5a-1), bochsbios (>= 2.2.1-1),
proll, openhackware
Recommends: debootstrap, sharutils
-Suggests: sudo
+Suggests: sudo, dpkg-cross
Description: fast processor emulator
QEMU is a FAST! processor emulator: currently the package supports
arm, powerpc, sparc and x86 emulation. By using dynamic translation
diff -u qemu-0.8.0/debian/rules qemu-0.8.0/debian/rules
--- qemu-0.8.0/debian/rules
+++ qemu-0.8.0/debian/rules
@@ -30,7 +30,14 @@
CFLAGS="$(CFLAGS)" ./configure \
--prefix=/usr \
+ --interp-prefix=/usr/%M-linux-gnu \
--cc=$(CC)
+
+ # Change PPC prefix to match Debian's arch name
+ cp ppc-user/config.h ppc-user/config.h.orig
+ sed 's,\(CONFIG_QEMU_PREFIX\).*,\1 "/usr/powerpc-linux-gnu",' \
+ ppc-user/config.h.orig > ppc-user/config.h
+ rm ppc-user/config.h.orig
build: patch config-host.mak
dh_testdir