qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serge@hallyn.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/1] Support ppc64le binfmt registration
Date: Wed, 27 Aug 2014 19:55:56 +0200	[thread overview]
Message-ID: <20140827175556.GA24631@mail.hallyn.com> (raw)

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

             reply	other threads:[~2014-08-27 17:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27 17:55 Serge E. Hallyn [this message]
2014-08-27 18:20 ` [Qemu-devel] [PATCH 1/1] Support ppc64le binfmt registration 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140827175556.GA24631@mail.hallyn.com \
    --to=serge@hallyn.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).