qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/1] Support ppc64le binfmt registration
@ 2014-08-27 17:55 Serge E. Hallyn
  2014-08-27 18:20 ` Peter Maydell
  0 siblings, 1 reply; 10+ messages in thread
From: Serge E. Hallyn @ 2014-08-27 17:55 UTC (permalink / raw)
  To: qemu-devel

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 <serge.hallyn@ubuntu.com>
---
 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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-08-28  7:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-27 17:55 [Qemu-devel] [PATCH 1/1] Support ppc64le binfmt registration Serge E. Hallyn
2014-08-27 18:20 ` Peter Maydell
2014-08-27 18:45   ` Serge E. Hallyn
2014-08-27 19:01     ` Peter Maydell
2014-08-27 21:30       ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2014-08-27 21:35         ` Peter Maydell
2014-08-27 22:40           ` Alexander Graf
2014-08-27 23:05             ` Serge E. Hallyn
2014-08-27 23:09               ` Serge E. Hallyn
2014-08-28  7:42                 ` Peter Maydell

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).