package/qemu: add basic target selection
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 7 Oct 2014 22:38:13 +0000 (00:38 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 12 Oct 2014 16:54:34 +0000 (18:54 +0200)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/qemu/Config.in
package/qemu/qemu.mk

index 6cd6cc85da5dca8adcbfe11e01bd6151a5956224..96ec301fd782192a53dbfcaba1ab5f39f2f2078f 100644 (file)
@@ -26,3 +26,21 @@ config BR2_PACKAGE_QEMU
          server and embedded PowerPC, and S390 guests.
 
          http://qemu.org/
+
+if BR2_PACKAGE_QEMU
+
+comment "Emulators selection"
+
+config BR2_PACKAGE_QEMU_SYSTEM
+       bool "Enable all systems emulation"
+       help
+         Say 'y' to build all system emulators/virtualisers that QEMU supports.
+
+config BR2_PACKAGE_QEMU_LINUX_USER
+       bool "Enable all Linux user-land emulation"
+       help
+         Say 'y' to build all Linux user-land emulators that QEMU supports.
+
+# Note: bsd-user can not be build on Linux
+
+endif # BR2_PACKAGE_QEMU
index d6ccc081edee3871a01fb77935aa64aa381a1d69..9f761455c33ce6f36219e10f6a83eaf9b613a896 100644 (file)
@@ -99,6 +99,18 @@ QEMU_VARS = \
     PYTHON=$(HOST_DIR)/usr/bin/python \
     PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
 
+ifeq ($(BR2_PACKAGE_QEMU_SYSTEM),y)
+QEMU_OPTS += --enable-system
+else
+QEMU_OPTS += --disable-system
+endif
+
+ifeq ($(BR2_PACKAGE_QEMU_LINUX_USER),y)
+QEMU_OPTS += --enable-linux-user
+else
+QEMU_OPTS += --disable-linux-user
+endif
+
 define QEMU_CONFIGURE_CMDS
        ( cd $(@D);                                 \
            LIBS='$(QEMU_LIBS)'                     \
@@ -113,8 +125,6 @@ define QEMU_CONFIGURE_CMDS
                --enable-kvm                        \
                --enable-attr                       \
                --enable-vhost-net                  \
-               --enable-system                     \
-               --enable-linux-user                 \
                --disable-bsd-user                  \
                --disable-xen                       \
                --disable-slirp                     \