Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Duskett <aduskett@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v5 2/5] qemu: add qemu_user_opts
Date: Sun, 18 Mar 2018 15:01:28 -0400	[thread overview]
Message-ID: <20180318190131.21404-3-aduskett@gmail.com> (raw)
In-Reply-To: <20180318190131.21404-1-aduskett@gmail.com>

Add a new variable in qemu.mk: QEMU_USER_OPTS. When qemu-$(ARCH) is
called, some architectures require a -cpu flag to be passed, or else a
segfault may occure when building introspection files.
For PowerPC, many of these cpu's need a specific CPU flag to be passed
via the command line.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
Changes v1 -> v4:
  - Add patch to series.

Changes v4 -> v5:
 - Change HOST_QEMU_CPU_TUNE to QEMU_USER_OPTS. (Yann)
 - Add $(QEMU_USER_OPTS) to end of QEMU_USER (Yann)

 package/qemu/qemu.mk | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 345ef52668..6a0fcabbce 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -70,6 +70,37 @@ endif
 ifeq ($(HOST_QEMU_ARCH),sh4aeb)
 HOST_QEMU_ARCH = sh4eb
 endif
+
+# Add cpu specific callouts for qemu.
+# In some cases (e.g. ppc) simply being arch specific (apparently) isn't good
+# enough and a PACKAGE_ARCH specific -cpu option is needed 
+# For others (e.g. arm) a -cpu option is not necessary, since the
+# qemu-arm default CPU supports all required architecture levels.
+ifeq ($(BR2_x86_64),y)
+QEMU_USER_OPTS = -cpu Nehalem,check=false
+endif
+
+# PowerPC architecture. Currently, the 620, 630, and 970 are not supported.
+ifeq ($(BR2_powerpc_e5500),y)
+QEMU_USER_OPTS = -cpu e5500
+endif
+
+ifeq ($(BR2_powerpc_e6500),y)
+QEMU_USER_OPTS = -cpu e6500
+endif
+
+ifeq ($(BR2_powerpc_power7),y)
+QEMU_USER_OPTS = -cpu 7400
+endif
+
+ifeq ($(BR2_powerpc64)$(BR2_powerpc_e5500),yy)
+QEMU_USER_OPTS = -cpu e500mc
+endif
+
+ifeq ($(BR2_powerpc64)$(BR2_powerpc_e6500),yy)
+QEMU_USER_OPTS = -cpu e500mc
+endif
+
 HOST_QEMU_SYS_ARCH ?= $(HOST_QEMU_ARCH)
 
 ifeq ($(BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE),y)
@@ -147,7 +178,7 @@ endef
 $(eval $(host-generic-package))
 
 # variable used by other packages
-QEMU_USER = $(HOST_DIR)/bin/qemu-$(HOST_QEMU_ARCH)
+QEMU_USER = $(HOST_DIR)/bin/qemu-$(HOST_QEMU_ARCH) $(QEMU_USER_OPTS)
 
 #-------------------------------------------------------------
 # Target-qemu
-- 
2.14.3

  parent reply	other threads:[~2018-03-18 19:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-18 19:01 [Buildroot] [PATCH v5 0/5] gobject-introspection: new series Adam Duskett
2018-03-18 19:01 ` [Buildroot] [PATCH v5 1/5] qemu-host: remove support for some powerpc processors Adam Duskett
2018-03-18 19:16   ` Yann E. MORIN
2018-03-26 19:54   ` Thomas Petazzoni
2018-03-18 19:01 ` Adam Duskett [this message]
2018-03-18 19:18   ` [Buildroot] [PATCH v5 2/5] qemu: add qemu_user_opts Yann E. MORIN
2018-03-18 19:21     ` Adam Duskett
2018-03-18 19:01 ` [Buildroot] [PATCH v5 3/5] gstreamer1 packages: explicitly disable introspection Adam Duskett
2018-03-18 19:21   ` Yann E. MORIN
2018-03-18 19:01 ` [Buildroot] [PATCH v5 1/1] gobject-introspection: new package Adam Duskett
2018-03-20 17:39   ` Matthew Weber
2018-03-23 18:08     ` Arnout Vandecappelle
2018-03-18 19:01 ` [Buildroot] [PATCH v5 5/5] gstreamer1 packages: add support for introspection Adam Duskett
2018-03-20 16:12 ` [Buildroot] [PATCH v5 0/5] gobject-introspection: new series Matthew Weber
2018-03-21 13:44   ` Adam Duskett

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=20180318190131.21404-3-aduskett@gmail.com \
    --to=aduskett@gmail.com \
    --cc=buildroot@busybox.net \
    /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