[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/1] Support ppc64le binfmt registration
From: |
Serge E. Hallyn |
Subject: |
[Qemu-devel] [PATCH 1/1] Support ppc64le binfmt registration |
Date: |
Wed, 27 Aug 2014 19:55:56 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
This is a part of a patch proposed by jaejunh at
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1358268
which enables running ppc64le binaries through qemu-user.
Not sure if it's the right way to do it, but it does allow
me to chroot into a ppc64el rootfs on amd64 host.
Signed-off-by: Serge Hallyn <address@hidden>
---
configure | 7 +++++++
default-configs/ppcle-linux-user.mak | 2 ++
linux-user/ppc/syscall.h | 4 ++++
3 files changed, 13 insertions(+)
create mode 100644 default-configs/ppcle-linux-user.mak
diff --git a/configure b/configure
index 2063cf6..0c52a3e 100755
--- a/configure
+++ b/configure
@@ -5070,6 +5070,13 @@ case "$target_name" in
TARGET_ABI_DIR=ppc
gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml
power-spe.xml"
;;
+ ppcle)
+ TARGET_ARCH=ppc64
+ TARGET_BASE_ARCH=ppc
+ TARGET_ABI_DIR=ppc
+ echo "TARGET_ABI32=y" >> $config_target_mak
+ gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml
power-spe.xml"
+ ;;
ppc64abi32)
TARGET_ARCH=ppc64
TARGET_BASE_ARCH=ppc
diff --git a/default-configs/ppcle-linux-user.mak
b/default-configs/ppcle-linux-user.mak
new file mode 100644
index 0000000..aa09263
--- /dev/null
+++ b/default-configs/ppcle-linux-user.mak
@@ -0,0 +1,2 @@
+# Default configuration for ppcle-linux-user
+CONFIG_LIBDECNUMBER=y
diff --git a/linux-user/ppc/syscall.h b/linux-user/ppc/syscall.h
index 0daf5cd..a033323 100644
--- a/linux-user/ppc/syscall.h
+++ b/linux-user/ppc/syscall.h
@@ -64,7 +64,11 @@ struct target_revectored_struct {
#define UNAME_MACHINE "ppc64le"
#endif
#else
+#ifdef TARGET_WORDS_BIGENDIAN
#define UNAME_MACHINE "ppc"
+#else
+#define UNAME_MACHINE "ppcle"
+#endif
#endif
#define UNAME_MINIMUM_RELEASE "2.6.32"
--
2.1.0
- [Qemu-devel] [PATCH 1/1] Support ppc64le binfmt registration,
Serge E. Hallyn <=
- Re: [Qemu-devel] [PATCH 1/1] Support ppc64le binfmt registration, Peter Maydell, 2014/08/27
- Re: [Qemu-devel] [PATCH 1/1] Support ppc64le binfmt registration, Serge E. Hallyn, 2014/08/27
- Re: [Qemu-devel] [PATCH 1/1] Support ppc64le binfmt registration, Peter Maydell, 2014/08/27
- Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/1] Support ppc64le binfmt registration, Alexander Graf, 2014/08/27
- Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/1] Support ppc64le binfmt registration, Peter Maydell, 2014/08/27
- Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/1] Support ppc64le binfmt registration, Alexander Graf, 2014/08/27
- Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/1] Support ppc64le binfmt registration, Serge E. Hallyn, 2014/08/27
- Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/1] Support ppc64le binfmt registration, Serge E. Hallyn, 2014/08/27
- Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/1] Support ppc64le binfmt registration, Peter Maydell, 2014/08/28