[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/51] build: switch to Kconfig
From: |
Stefano Garzarella |
Subject: |
Re: [Qemu-devel] [PATCH 06/51] build: switch to Kconfig |
Date: |
Thu, 21 Feb 2019 16:44:17 +0100 |
User-agent: |
NeoMutt/20180716 |
On Thu, Feb 07, 2019 at 06:56:49PM +0100, Paolo Bonzini wrote:
> The make_device_config.sh script is replaced by minikconf, which
> is modified to support the same command line as its predecessor.
>
> The roots of the parsing are default-configs/*.mak, Kconfig.host and
> hw/Kconfig. One difference with make_device_config.sh is that all symbols
> have to be defined in a Kconfig file, including those coming from the
> configure script. This is the reason for the Kconfig.host file introduced
> in the previous patch. Whenever a file in default-configs/*.mak used
> $(...) to refer to a config-host.mak symbol, this is replaced by a
> Kconfig dependency; this part must be done already in this patch
> for bisectability.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> Signed-off-by: Yang Zhong <address@hidden>
> Acked-by: Thomas Huth <address@hidden>
> Message-Id: <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> Kconfig.host | 6 +++++-
> Makefile | 24 +++++++++++++++++++-----
> Makefile.target | 7 ++++++-
> configure | 6 ++++++
> default-configs/arm-softmmu.mak | 2 --
> default-configs/i386-softmmu.mak | 5 +----
> default-configs/lm32-softmmu.mak | 1 -
> default-configs/pci.mak | 1 -
> default-configs/ppc-softmmu.mak | 1 -
> default-configs/ppc64-softmmu.mak | 5 -----
> default-configs/s390x-softmmu.mak | 4 +---
> default-configs/virtio.mak | 3 ---
> hw/9pfs/Kconfig | 2 ++
> hw/block/Kconfig | 2 ++
> hw/display/Kconfig | 3 +++
> hw/i386/Kconfig | 7 +++++++
> hw/input/Kconfig | 5 +++++
> hw/intc/Kconfig | 12 ++++++++++++
> hw/misc/Kconfig | 2 ++
> hw/ppc/Kconfig | 4 ++++
> hw/scsi/Kconfig | 7 +++++++
> hw/tpm/Kconfig | 1 +
> hw/vfio/Kconfig | 9 +++++++++
> rules.mak | 2 +-
> scripts/make_device_config.sh | 30 ------------------------------
> 25 files changed, 93 insertions(+), 58 deletions(-)
> delete mode 100644 scripts/make_device_config.sh
>
> diff --git a/Kconfig.host b/Kconfig.host
> index ff5457d..e3d486c 100644
> --- a/Kconfig.host
> +++ b/Kconfig.host
> @@ -1,5 +1,6 @@
> # These are "proxy" symbols used to pass config-host.mak values
> -# down to Kconfig.
> +# down to Kconfig. See also MINIKCONF_ARGS in the Makefile:
> +# these two need to be kept in sync.
>
> config KVM
> bool
> @@ -10,6 +11,9 @@ config LINUX
> config OPENGL
> bool
>
> +config X11
> + bool
> +
> config SPICE
> bool
>
> diff --git a/Makefile b/Makefile
> index 3658310..959ab9e 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -313,8 +313,8 @@ DOCS=
> 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_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(filter %-softmmu,
> $(TARGET_DIRS)))
> +SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %.d, $(SUBDIR_DEVICES_MAK))
>
> ifeq ($(SUBDIR_DEVICES_MAK),)
> config-all-devices.mak:
> @@ -329,9 +329,23 @@ endif
>
> -include $(SUBDIR_DEVICES_MAK_DEP)
>
> -%/config-devices.mak: default-configs/%.mak
> $(SRC_PATH)/scripts/make_device_config.sh
> - $(call quiet-command, \
> - $(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $<
> $*-config-devices.mak.d $@ > address@hidden,"GEN","address@hidden")
> +# This has to be kept in sync with Kconfig.host.
> +MINIKCONF_ARGS = \
> + $@ $*-config.devices.mak.d $< $(MINIKCONF_INPUTS) \
> + CONFIG_KVM=$(CONFIG_KVM) \
> + CONFIG_SPICE=$(CONFIG_SPICE) \
> + CONFIG_TPM=$(CONFIG_TPM) \
> + CONFIG_XEN=$(CONFIG_XEN) \
> + CONFIG_OPENGL=$(CONFIG_OPENGL) \
> + CONFIG_X11=$(CONFIG_X11) \
> + CONFIG_VHOST_USER=$(CONFIG_VHOST_USER) \
> + CONFIG_LINUX=$(CONFIG_LINUX)
> +
Hi Paolo,
I'm playing with Kconfig but with a simple configuration
(./configure --target-list=x86_64-softmmu --disable-docs) the build fails:
/usr/bin/ld: ../hw/xen/xen-legacy-backend.o: in function
`xen_be_register_common':
/home/stefano/repos/qemu-kconfig/hw/xen/xen-legacy-backend.c:757: undefined
reference to `xen_9pfs_ops'
collect2: error: ld returned 1 exit status
Analyzing the Makefile.objs files maybe we should pass the CONFIG_VIRTFS from
config-host.mak down to Kconfig.
I tried this simple patch and it seems to fix the issue:
diff --git a/Makefile b/Makefile
index df0732a050..bad583b01c 100644
--- a/Makefile
+++ b/Makefile
@@ -336,6 +336,7 @@ MINIKCONF_ARGS = \
CONFIG_XEN=$(CONFIG_XEN) \
CONFIG_OPENGL=$(CONFIG_OPENGL) \
CONFIG_VHOST_USER=$(CONFIG_VHOST_USER) \
+ CONFIG_VIRTFS=$(CONFIG_VIRTFS) \
CONFIG_LINUX=$(CONFIG_LINUX)
I'm not sure if we need to add "config VIRTFS" entry in the
Kconfig.host, because it is already defined in hw/9pfs/Kconfig.
Thanks,
Stefano
- [Qemu-devel] [PATCH v6 00/51] Support Kconfig in QEMU, Paolo Bonzini, 2019/02/07
- [Qemu-devel] [PATCH 12/51] build: convert sound.mak to Kconfig, Paolo Bonzini, 2019/02/07
- [Qemu-devel] [PATCH 09/51] ide: express dependencies with Kconfig, Paolo Bonzini, 2019/02/07
- [Qemu-devel] [PATCH 04/51] hw/display: make edid configurable, Paolo Bonzini, 2019/02/07
- [Qemu-devel] [PATCH 10/51] hw/pci/Makefile.objs: make pcie configurable, Paolo Bonzini, 2019/02/07
- [Qemu-devel] [PATCH 08/51] kconfig: introduce CONFIG_TEST_DEVICES, Paolo Bonzini, 2019/02/07
- [Qemu-devel] [PATCH 07/51] minikconfig: implement allnoconfig and defconfig modes, Paolo Bonzini, 2019/02/07
- [Qemu-devel] [PATCH 06/51] build: switch to Kconfig, Paolo Bonzini, 2019/02/07
- Re: [Qemu-devel] [PATCH 06/51] build: switch to Kconfig,
Stefano Garzarella <=
- [Qemu-devel] [PATCH 14/51] block: fix recursion in hw/block/dataplane, Paolo Bonzini, 2019/02/07
- [Qemu-devel] [PATCH 02/51] minikconfig: add AST, Paolo Bonzini, 2019/02/07
- [Qemu-devel] [PATCH 15/51] scsi: express dependencies with Kconfig, Paolo Bonzini, 2019/02/07
- [Qemu-devel] [PATCH 13/51] build: convert usb.mak to Kconfig, Paolo Bonzini, 2019/02/07
- [Qemu-devel] [PATCH 16/51] isa: express dependencies with kconfig, Paolo Bonzini, 2019/02/07
- [Qemu-devel] [PATCH 01/51] minikconfig: add parser skeleton, Paolo Bonzini, 2019/02/07
- [Qemu-devel] [PATCH 17/51] i386: express dependencies with Kconfig, Paolo Bonzini, 2019/02/07