qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v2 20/37] build: switch to Kconfig


From: Thomas Huth
Subject: Re: [Qemu-devel] [RFC PATCH v2 20/37] build: switch to Kconfig
Date: Wed, 16 Jan 2019 17:28:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 2019-01-15 15:10, Yang Zhong wrote:
> From: Paolo Bonzini <address@hidden>
> 
> 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.
> 
> Signed-off-by: Paolo Bonzini <address@hidden>
> Signed-off-by: Yang Zhong <address@hidden>
> ---
>  Kconfig.host                     |  3 ++-
>  Makefile                         | 14 +++++++++++--
>  Makefile.target                  |  7 ++++++-
>  default-configs/i386-softmmu.mak |  3 ---
>  hw/display/Kconfig               |  2 ++
>  hw/i386/Kconfig                  |  6 ++++++
>  hw/intc/Kconfig                  |  8 ++++++++
>  hw/misc/Kconfig                  |  2 ++
>  hw/tpm/Kconfig                   |  1 +
>  rules.mak                        |  2 +-
>  scripts/make_device_config.sh    | 30 ---------------------------
>  scripts/minikconf.py             | 35 +++++++++++++++++++++++++++++---
>  12 files changed, 72 insertions(+), 41 deletions(-)
>  delete mode 100644 scripts/make_device_config.sh
> 
> diff --git a/Kconfig.host b/Kconfig.host
> index 2136a4c3ec..d7f503d0ca 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
> diff --git a/Makefile b/Makefile
> index a9ac16d94e..01e7c60a0d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -326,9 +326,19 @@ endif
>  
>  -include $(SUBDIR_DEVICES_MAK_DEP)
>  
> -%/config-devices.mak: default-configs/%.mak 
> $(SRC_PATH)/scripts/make_device_config.sh
> +# This has to be kept in sync with Kconfig.host.
> +MINIKCONF_ARGS = \
> +    CONFIG_KVM=$(CONFIG_KVM) \
> +    CONFIG_SPICE=$(CONFIG_SPICE) \
> +    CONFIG_TPM=$(CONFIG_TPM) \
> +    CONFIG_XEN=$(CONFIG_XEN) \
> +    CONFIG_OPENGL=$(CONFIG_OPENGL)
> +
> +MINIKCONF = $(SHELL) $(SRC_PATH)/scripts/minikconf.sh
> +
> +%/config-devices.mak: default-configs/%-softmmu.mak Kconfig.host hw/Kconfig
>       $(call quiet-command, \
> -            $(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $< 
> $*-config-devices.mak.d $@ > address@hidden,"GEN","address@hidden")
> +            $(MINIKCONF) $@ $*-config-devices.mak.d $^ $(MINIKCONF_ARGS) > 
> address@hidden, "  GEN   address@hidden")

Looks like CONFIG_KVM now shows up in all config-devices.mak files ...
that won't work when the target CPU does not match the host CPU, I think
we need some additional logic here...?

 Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]