[Qemu-devel] [RFC PATCH v2 24/37] build: convert sound.mak to Kconfig

Yang Zhong posted 37 patches 6 years, 9 months ago
There is a newer version of this series
[Qemu-devel] [RFC PATCH v2 24/37] build: convert sound.mak to Kconfig
Posted by Yang Zhong 6 years, 9 months ago
From: Paolo Bonzini <pbonzini@redhat.com>

There is really nothing special in these devices; they are just
ISA devices.  Instead of including them for each target,
set CONFIG_ISA to true, and make the devices default to present
whenever ISA is available.  More conversion of ISA devices will
follow.

Done with the following script:

  while read i; do
     i=${i%=y}; i=${i#CONFIG_}
     sed -i -e'/^config '$i'$/!b' -en \
            -e'a\' -e'    default y\' -e'    depends on ISA' \
          `grep -lw $i hw/*/Kconfig`
  done < default-configs/sound.mak

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
 default-configs/i386-softmmu.mak        | 2 +-
 default-configs/mips-softmmu-common.mak | 2 +-
 default-configs/ppc-softmmu.mak         | 2 +-
 default-configs/sound.mak               | 4 ----
 hw/audio/Kconfig                        | 8 ++++++++
 5 files changed, 11 insertions(+), 7 deletions(-)
 delete mode 100644 default-configs/sound.mak

diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 554dbd8c6b..cf49e3fae7 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -1,7 +1,7 @@
 # Default configuration for i386-softmmu
 
 CONFIG_PCI=y
-include sound.mak
+CONFIG_ISA=y
 include usb.mak
 include hyperv.mak
 CONFIG_VGA_ISA=y
diff --git a/default-configs/mips-softmmu-common.mak b/default-configs/mips-softmmu-common.mak
index 5ef6d49e66..03c7a08d1a 100644
--- a/default-configs/mips-softmmu-common.mak
+++ b/default-configs/mips-softmmu-common.mak
@@ -1,7 +1,7 @@
 # Common mips*-softmmu CONFIG defines
 
-include sound.mak
 include usb.mak
+CONFIG_ISA=y
 CONFIG_PCI=y
 CONFIG_ESP=y
 CONFIG_SCSI=y
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 301cc83279..c7003e4284 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -1,8 +1,8 @@
 # Default configuration for ppc-softmmu
 
-include sound.mak
 include usb.mak
 CONFIG_PCI=y
+ONFIG_ISA=y
 
 # For embedded PPCs:
 CONFIG_PPC4XX=y
diff --git a/default-configs/sound.mak b/default-configs/sound.mak
deleted file mode 100644
index 4f22c34b5d..0000000000
--- a/default-configs/sound.mak
+++ /dev/null
@@ -1,4 +0,0 @@
-CONFIG_SB16=y
-CONFIG_ADLIB=y
-CONFIG_GUS=y
-CONFIG_CS4231A=y
diff --git a/hw/audio/Kconfig b/hw/audio/Kconfig
index af34bbcf0c..bfb30276ec 100644
--- a/hw/audio/Kconfig
+++ b/hw/audio/Kconfig
@@ -1,5 +1,7 @@
 config SB16
     bool
+    default y
+    depends on ISA_BUS
 
 config ES1370
     bool
@@ -13,12 +15,18 @@ config AC97
 
 config ADLIB
     bool
+    default y
+    depends on ISA_BUS
 
 config GUS
     bool
+    default y
+    depends on ISA_BUS
 
 config CS4231A
     bool
+    default y
+    depends on ISA_BUS
 
 config HDA
     bool
-- 
2.17.1


Re: [Qemu-devel] [RFC PATCH v2 24/37] build: convert sound.mak to Kconfig
Posted by Thomas Huth 6 years, 9 months ago
On 2019-01-15 15:10, Yang Zhong wrote:
> From: Paolo Bonzini <pbonzini@redhat.com>
> 
> There is really nothing special in these devices; they are just
> ISA devices.  Instead of including them for each target,
> set CONFIG_ISA to true, and make the devices default to present
> whenever ISA is available.  More conversion of ISA devices will
> follow.
[...]
> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
> index 301cc83279..c7003e4284 100644
> --- a/default-configs/ppc-softmmu.mak
> +++ b/default-configs/ppc-softmmu.mak
> @@ -1,8 +1,8 @@
>  # Default configuration for ppc-softmmu
>  
> -include sound.mak
>  include usb.mak
>  CONFIG_PCI=y
> +ONFIG_ISA=y

Typo: CONFIG_ISA please

 Cheers,
  Thomas

Re: [Qemu-devel] [RFC PATCH v2 24/37] build: convert sound.mak to Kconfig
Posted by Thomas Huth 6 years, 9 months ago
On 2019-01-16 14:48, Thomas Huth wrote:
> On 2019-01-15 15:10, Yang Zhong wrote:
>> From: Paolo Bonzini <pbonzini@redhat.com>
>>
>> There is really nothing special in these devices; they are just
>> ISA devices.  Instead of including them for each target,
>> set CONFIG_ISA to true, and make the devices default to present
>> whenever ISA is available.  More conversion of ISA devices will
>> follow.
> [...]
>> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
>> index 301cc83279..c7003e4284 100644
>> --- a/default-configs/ppc-softmmu.mak
>> +++ b/default-configs/ppc-softmmu.mak
>> @@ -1,8 +1,8 @@
>>  # Default configuration for ppc-softmmu
>>  
>> -include sound.mak
>>  include usb.mak
>>  CONFIG_PCI=y
>> +ONFIG_ISA=y
> 
> Typo: CONFIG_ISA please

Or should it even be CONFIG_ISA_BUS ? At least that's the name of the
switch that you use in the other patches ...

 Thomas

Re: [Qemu-devel] [RFC PATCH v2 24/37] build: convert sound.mak to Kconfig
Posted by Yang Zhong 6 years, 9 months ago
On Wed, Jan 16, 2019 at 02:51:37PM +0100, Thomas Huth wrote:
> On 2019-01-16 14:48, Thomas Huth wrote:
> > On 2019-01-15 15:10, Yang Zhong wrote:
> >> From: Paolo Bonzini <pbonzini@redhat.com>
> >>
> >> There is really nothing special in these devices; they are just
> >> ISA devices.  Instead of including them for each target,
> >> set CONFIG_ISA to true, and make the devices default to present
> >> whenever ISA is available.  More conversion of ISA devices will
> >> follow.
> > [...]
> >> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
> >> index 301cc83279..c7003e4284 100644
> >> --- a/default-configs/ppc-softmmu.mak
> >> +++ b/default-configs/ppc-softmmu.mak
> >> @@ -1,8 +1,8 @@
> >>  # Default configuration for ppc-softmmu
> >>  
> >> -include sound.mak
> >>  include usb.mak
> >>  CONFIG_PCI=y
> >> +ONFIG_ISA=y
> > 
> > Typo: CONFIG_ISA please
> 
> Or should it even be CONFIG_ISA_BUS ? At least that's the name of the
> switch that you use in the other patches ...
> 
  Hello Thomas,

  Yes, We should change this to CONFIG_ISA_BUS here and the patch's 
  description will be changed correspondingly.

  Regards,

  Yang
>  Thomas