diff mbox series

[46/51] sparc-softmmu.mak: express dependencies with Kconfig

Message ID 1549562254-41157-47-git-send-email-pbonzini@redhat.com
State New
Headers show
Series Support Kconfig in QEMU | expand

Commit Message

Paolo Bonzini Feb. 7, 2019, 5:57 p.m. UTC
%-softmmu.mak only keep boards and optional device
definitions in Kconfig mode.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/sparc-softmmu.mak | 22 ++++++----------------
 hw/misc/Kconfig                   |  1 +
 hw/net/Kconfig                    |  1 +
 hw/sparc/Kconfig                  | 13 +++++++++++++
 4 files changed, 21 insertions(+), 16 deletions(-)

Comments

Mark Cave-Ayland Feb. 8, 2019, 5:33 p.m. UTC | #1
On 07/02/2019 17:57, Paolo Bonzini wrote:

> %-softmmu.mak only keep boards and optional device
> definitions in Kconfig mode.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/sparc-softmmu.mak | 22 ++++++----------------
>  hw/misc/Kconfig                   |  1 +
>  hw/net/Kconfig                    |  1 +
>  hw/sparc/Kconfig                  | 13 +++++++++++++
>  4 files changed, 21 insertions(+), 16 deletions(-)
> 
> diff --git a/default-configs/sparc-softmmu.mak b/default-configs/sparc-softmmu.mak
> index b31a9f2..ee85218 100644
> --- a/default-configs/sparc-softmmu.mak
> +++ b/default-configs/sparc-softmmu.mak
> @@ -1,21 +1,11 @@
>  # Default configuration for sparc-softmmu
>  
> -CONFIG_ISA_BUS=y
> -CONFIG_ECC=y
> -CONFIG_ESP=y
> -CONFIG_ESCC=y
> -CONFIG_M48T59=y
> -CONFIG_FDC=y
> -CONFIG_EMPTY_SLOT=y
> -CONFIG_PCNET_COMMON=y
> -CONFIG_LANCE=y
> -CONFIG_TCX=y
> -CONFIG_CG3=y
> -CONFIG_SLAVIO=y
> -CONFIG_CS4231=y
> -CONFIG_GRLIB=y
> -CONFIG_STP2000=y
> -CONFIG_ECCMEMCTL=y
> +# Uncomment the following lines to disable these optional devices:
> +#
> +#CONFIG_TCX=n
> +#CONFIG_CG3=n

What do you mean by optional here? The video card that is selected is built-in to the
machine so is this comment eluding to a headless sun4m machine started with
-nodefaults or similar?

> +# Boards:
> +#
>  CONFIG_SUN4M=y
>  CONFIG_LEON3=y
> diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
> index 728c561..11d4b30 100644
> --- a/hw/misc/Kconfig
> +++ b/hw/misc/Kconfig
> @@ -71,6 +71,7 @@ config IVSHMEM_DEVICE
>  
>  config ECCMEMCTL
>      bool
> +    select ECC
>  
>  config IMX
>      bool
> diff --git a/hw/net/Kconfig b/hw/net/Kconfig
> index 1aa1071..c132180 100644
> --- a/hw/net/Kconfig
> +++ b/hw/net/Kconfig
> @@ -77,6 +77,7 @@ config STELLARIS_ENET
>  
>  config LANCE
>      bool
> +    select PCNET_COMMON
>  
>  config SUNHME
>      bool
> diff --git a/hw/sparc/Kconfig b/hw/sparc/Kconfig
> index c9c2142..2a83a80 100644
> --- a/hw/sparc/Kconfig
> +++ b/hw/sparc/Kconfig
> @@ -1,8 +1,21 @@
>  config SUN4M
>      bool
> +    imply TCX
> +    imply CG3
> +    select CS4231
> +    select ECCMEMCTL
> +    select EMPTY_SLOT
> +    select ESCC
> +    select ESP
> +    select FDC
> +    select SLAVIO
> +    select LANCE
> +    select M48T59
> +    select STP2000
>  
>  config LEON3
>      bool
> +    select GRLIB
>  
>  config GRLIB
>      bool


ATB,

Mark.
Paolo Bonzini Feb. 8, 2019, 5:40 p.m. UTC | #2
On 08/02/19 18:33, Mark Cave-Ayland wrote:
>> +# Uncomment the following lines to disable these optional devices:
>> +#
>> +#CONFIG_TCX=n
>> +#CONFIG_CG3=n
> What do you mean by optional here? The video card that is selected is built-in to the
> machine so is this comment eluding to a headless sun4m machine started with
> -nodefaults or similar?
> 

Yes, it means that you can build a QEMU without those, for example if
you want to have only cg3 or you are okay with requiring -nodefaults.

Basically if there is a way to run QEMU without those devices, they are
marked as optional (and use "imply" rather than "select").

Later on we might have a way to autogenerate these .mak files, and add a
help message to the Kconfig files that will be copied in the .mak files.
 For now, if it breaks you keep both pieces, but at least we guarantee
that disabling optional devices will still result in a QEMU that starts
the machine with -nodefaults.

Paolo
diff mbox series

Patch

diff --git a/default-configs/sparc-softmmu.mak b/default-configs/sparc-softmmu.mak
index b31a9f2..ee85218 100644
--- a/default-configs/sparc-softmmu.mak
+++ b/default-configs/sparc-softmmu.mak
@@ -1,21 +1,11 @@ 
 # Default configuration for sparc-softmmu
 
-CONFIG_ISA_BUS=y
-CONFIG_ECC=y
-CONFIG_ESP=y
-CONFIG_ESCC=y
-CONFIG_M48T59=y
-CONFIG_FDC=y
-CONFIG_EMPTY_SLOT=y
-CONFIG_PCNET_COMMON=y
-CONFIG_LANCE=y
-CONFIG_TCX=y
-CONFIG_CG3=y
-CONFIG_SLAVIO=y
-CONFIG_CS4231=y
-CONFIG_GRLIB=y
-CONFIG_STP2000=y
-CONFIG_ECCMEMCTL=y
+# Uncomment the following lines to disable these optional devices:
+#
+#CONFIG_TCX=n
+#CONFIG_CG3=n
 
+# Boards:
+#
 CONFIG_SUN4M=y
 CONFIG_LEON3=y
diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
index 728c561..11d4b30 100644
--- a/hw/misc/Kconfig
+++ b/hw/misc/Kconfig
@@ -71,6 +71,7 @@  config IVSHMEM_DEVICE
 
 config ECCMEMCTL
     bool
+    select ECC
 
 config IMX
     bool
diff --git a/hw/net/Kconfig b/hw/net/Kconfig
index 1aa1071..c132180 100644
--- a/hw/net/Kconfig
+++ b/hw/net/Kconfig
@@ -77,6 +77,7 @@  config STELLARIS_ENET
 
 config LANCE
     bool
+    select PCNET_COMMON
 
 config SUNHME
     bool
diff --git a/hw/sparc/Kconfig b/hw/sparc/Kconfig
index c9c2142..2a83a80 100644
--- a/hw/sparc/Kconfig
+++ b/hw/sparc/Kconfig
@@ -1,8 +1,21 @@ 
 config SUN4M
     bool
+    imply TCX
+    imply CG3
+    select CS4231
+    select ECCMEMCTL
+    select EMPTY_SLOT
+    select ESCC
+    select ESP
+    select FDC
+    select SLAVIO
+    select LANCE
+    select M48T59
+    select STP2000
 
 config LEON3
     bool
+    select GRLIB
 
 config GRLIB
     bool