[Qemu-devel] [RFC PATCH v4 44/44] Makefile: only support defconfig

Yang Zhong posted 44 patches 5 years, 5 months ago
Maintainers: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Palmer Dabbelt <palmer@sifive.com>, Marek Vasut <marex@denx.de>, Peter Crosthwaite <crosthwaite.peter@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <rth@twiddle.net>, Jason Wang <jasowang@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Guan Xuetao <gxt@mprc.pku.edu.cn>, Christian Borntraeger <borntraeger@de.ibm.com>, Corey Minyard <minyard@acm.org>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Michael Clark <mjc@sifive.com>, Paolo Bonzini <pbonzini@redhat.com>, Aurelien Jarno <aurelien@aurel32.net>, Greg Kurz <groug@kaod.org>, Cornelia Huck <cohuck@redhat.com>, Michael Walle <michael@walle.cc>, Igor Mammedov <imammedo@redhat.com>, Max Reitz <mreitz@redhat.com>, Sagar Karandikar <sagark@eecs.berkeley.edu>, Peter Maydell <peter.maydell@linaro.org>, Aleksandar Rikalo <arikalo@wavecomp.com>, Alistair Francis <Alistair.Francis@wdc.com>, Stafford Horne <shorne@gmail.com>, Cleber Rosa <crosa@redhat.com>, Chris Wulff <crwulff@gmail.com>, Alberto Garcia <berto@igalia.com>, Fam Zheng <fam@euphon.net>, Aleksandar Markovic <amarkovic@wavecomp.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Kevin Wolf <kwolf@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, Anthony Green <green@moxielogic.com>, Halil Pasic <pasic@linux.ibm.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Stefan Markovic <smarkovic@wavecomp.com>, Stefan Berger <stefanb@linux.ibm.com>, Eduardo Habkost <ehabkost@redhat.com>, Alistair Francis <alistair@alistair23.me>, Artyom Tarasenko <atar4qemu@gmail.com>, John Snow <jsnow@redhat.com>, Max Filippov <jcmvbkbc@gmail.com>, Alex Williamson <alex.williamson@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
There is a newer version of this series
[Qemu-devel] [RFC PATCH v4 44/44] Makefile: only support defconfig
Posted by Yang Zhong 5 years, 5 months ago
add CONFIG_VHOST_USER and CONFIG_LINUX in Kconfig.host, the
current Makefile only support defconfig because of randconfig
does not work.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 Kconfig.host     |  6 ++++++
 Makefile         | 16 ++++++++--------
 hw/block/Kconfig |  2 ++
 hw/scsi/Kconfig  |  2 ++
 hw/tpm/Kconfig   |  2 ++
 5 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/Kconfig.host b/Kconfig.host
index d7f503d0ca..3772627a3a 100644
--- a/Kconfig.host
+++ b/Kconfig.host
@@ -16,3 +16,9 @@ config TPM
 
 config XEN
     bool
+
+config VHOST_USER
+    bool
+
+config LINUX
+    bool
diff --git a/Makefile b/Makefile
index 97c6453415..b8f1e71977 100644
--- a/Makefile
+++ b/Makefile
@@ -312,6 +312,9 @@ endif
 SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) BUILD_DIR=$(BUILD_DIR)
 SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS))
 SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_DIRS))
+SUBDIR_TARGET_MAK=$(patsubst %, %/config-target.mak, $(TARGET_DIRS))
+
+-include $(SUBDIR_TARGET_MAK)
 
 ifeq ($(SUBDIR_DEVICES_MAK),)
 config-all-devices.mak:
@@ -332,16 +335,13 @@ MINIKCONF_ARGS = \
     CONFIG_SPICE=$(CONFIG_SPICE) \
     CONFIG_TPM=$(CONFIG_TPM) \
     CONFIG_XEN=$(CONFIG_XEN) \
-    CONFIG_OPENGL=$(CONFIG_OPENGL)
-
-MINIKCONF = $(SHELL) $(SRC_PATH)/scripts/minikconf.sh
+    CONFIG_OPENGL=$(CONFIG_OPENGL) \
+    CONFIG_VHOST_USER=$(CONFIG_VHOST_USER) \
+    CONFIG_LINUX=$(CONFIG_LINUX)
 
-.PHONY: allyesconfig allnoconfig defconfig randconfig
-allyesconfig allnoconfig defconfig randconfig:
-	rm */config-devices.mak config-all-devices.mak
-	$(MAKE) MINIKCONF="$(MINIKCONF) --$<" config-all-devices.mak
+MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py --defconfig
 
-%/config-devices.mak: default-configs/%-softmmu.mak Kconfig.host hw/Kconfig
+%/config-devices.mak: default-configs/%.mak Kconfig.host $(SRC_PATH)/hw/Kconfig
 	$(call quiet-command, \
             $(MINIKCONF) $@ $*-config-devices.mak.d $^ $(MINIKCONF_ARGS) > $@.tmp, "  GEN   $@.tmp")
 	$(call quiet-command, if test -f $@; then \
diff --git a/hw/block/Kconfig b/hw/block/Kconfig
index 771967ad9f..b2f1de9eca 100644
--- a/hw/block/Kconfig
+++ b/hw/block/Kconfig
@@ -33,3 +33,5 @@ config VIRTIO_BLK
 
 config VHOST_USER_BLK
     bool
+    default y
+    depends on VHOST_USER && LINUX
diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig
index 22281213ba..e5d5bcaa5c 100644
--- a/hw/scsi/Kconfig
+++ b/hw/scsi/Kconfig
@@ -48,3 +48,5 @@ config VIRTIO_SCSI
 
 config VHOST_USER_SCSI
     bool
+    default y
+    depends on VHOST_USER && LINUX
diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig
index 28acdb745e..6d383b7209 100644
--- a/hw/tpm/Kconfig
+++ b/hw/tpm/Kconfig
@@ -13,6 +13,8 @@ config TPM_CRB
 
 config TPM_PASSTHROUGH
     bool
+    depends on TPM
 
 config TPM_EMULATOR
     bool
+    depends on TPM
-- 
2.17.1