Patchwork [04/29] package/qemu: add fine-grained target selection

login
register
mail settings
Submitter Yann E. MORIN
Date Feb. 3, 2013, 2:06 p.m.
Message ID <d3a7bb75662df8a583454ff422c7245a68145023.1359899108.git.yann.morin.1998@free.fr>
Download mbox | patch
Permalink /patch/217763/
State Accepted
Commit 6fd9a3e864789942fbbd9eee3c31e114fa06f41b
Headers show

Comments

Yann E. MORIN - Feb. 3, 2013, 2:06 p.m.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/qemu/Config.in |   21 +++++++++++++++++++++
 package/qemu/qemu.mk   |    4 ++++
 2 files changed, 25 insertions(+), 0 deletions(-)

Patch

diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 5180ef0..f1c2205 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -29,6 +29,25 @@  if BR2_PACKAGE_QEMU
 
 comment "Emulators selection"
 
+config BR2_PACKAGE_QEMU_CUSTOM_TARGETS
+	string "Enable specific targets"
+	help
+	  Enter here the list of QEMU targets you want to build. For example:
+
+	    System emulation      | User-land emulation
+	    ----------------------+-----------------------
+	    i386-softmmu          | i386-linux-user
+	    arm-softmmu           | ppc-linux-user
+	    x86_64-softmmu        | sparc-bsd-user
+	    ...                   | ...
+
+config QEMU_FOO
+	bool # To break the indentation
+
+if BR2_PACKAGE_QEMU_CUSTOM_TARGETS = ""
+
+comment "... or you can select emulator families to enable, below:"
+
 config BR2_PACKAGE_QEMU_SYSTEM
 	bool "Enable all systems emulation"
 	help
@@ -41,4 +60,6 @@  config BR2_PACKAGE_QEMU_LINUX_USER
 
 # Note: bsd-user can not be build on Linux
 
+endif # BR2_PACKAGE_QEMU_CUSTOM_TARGETS == ""
+
 endif # BR2_PACKAGE_QEMU
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 19de212..1baca01 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -109,6 +109,10 @@  else
 QEMU_OPTS += --disable-linux-user
 endif
 
+ifneq ($(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS)),)
+QEMU_OPTS += --target-list="$(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS))"
+endif
+
 define QEMU_CONFIGURE_CMDS
 	( cd $(@D);                                 \
 	    LIBS='$(QEMU_LIBS)'                     \