diff mbox series

[03/14] hw/i386/Kconfig: Let the MicroVM machine select the SERIAL_ISA config

Message ID 20191231183216.6781-4-philmd@redhat.com (mailing list archive)
State New, archived
Headers show
Series hw: Fix various --without-default-devices issues | expand

Commit Message

Philippe Mathieu-Daudé Dec. 31, 2019, 6:32 p.m. UTC
When configured with --without-default-devices, the build fails:

     LINK    x86_64-softmmu/qemu-system-x86_64
  /usr/bin/ld: hw/i386/microvm.o: in function `microvm_devices_init':
  hw/i386/microvm.c:157: undefined reference to `serial_hds_isa_init'
  collect2: error: ld returned 1 exit status
  make[1]: *** [Makefile:206: qemu-system-x86_64] Error 1
  make: *** [Makefile:483: x86_64-softmmu/all] Error 2

While the MicroVM machine only uses the ISA serial port when the
MICROVM_MACHINE_ISA_SERIAL property is set, it has to be linked
with it. Replace the 'imply' Kconfig rule by a 'select'.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Cc: Sergio Lopez <slp@redhat.com>
---
 hw/i386/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Bonzini Jan. 7, 2020, 10 a.m. UTC | #1
On 31/12/19 19:32, Philippe Mathieu-Daudé wrote:
> When configured with --without-default-devices, the build fails:
> 
>      LINK    x86_64-softmmu/qemu-system-x86_64
>   /usr/bin/ld: hw/i386/microvm.o: in function `microvm_devices_init':
>   hw/i386/microvm.c:157: undefined reference to `serial_hds_isa_init'
>   collect2: error: ld returned 1 exit status
>   make[1]: *** [Makefile:206: qemu-system-x86_64] Error 1
>   make: *** [Makefile:483: x86_64-softmmu/all] Error 2
> 
> While the MicroVM machine only uses the ISA serial port when the
> MICROVM_MACHINE_ISA_SERIAL property is set, it has to be linked
> with it. Replace the 'imply' Kconfig rule by a 'select'.

I added a comment "# for serial_hds_isa_init()" here.

Paolo

> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> Cc: Sergio Lopez <slp@redhat.com>
> ---
>  hw/i386/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index e428322a2c..cbcfb1ce81 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -96,7 +96,7 @@ config Q35
>  
>  config MICROVM
>      bool
> -    imply SERIAL_ISA
> +    select SERIAL_ISA
>      select ISA_BUS
>      select APIC
>      select IOAPIC
>
Philippe Mathieu-Daudé Jan. 7, 2020, 10:06 a.m. UTC | #2
On 1/7/20 11:00 AM, Paolo Bonzini wrote:
> On 31/12/19 19:32, Philippe Mathieu-Daudé wrote:
>> When configured with --without-default-devices, the build fails:
>>
>>       LINK    x86_64-softmmu/qemu-system-x86_64
>>    /usr/bin/ld: hw/i386/microvm.o: in function `microvm_devices_init':
>>    hw/i386/microvm.c:157: undefined reference to `serial_hds_isa_init'
>>    collect2: error: ld returned 1 exit status
>>    make[1]: *** [Makefile:206: qemu-system-x86_64] Error 1
>>    make: *** [Makefile:483: x86_64-softmmu/all] Error 2
>>
>> While the MicroVM machine only uses the ISA serial port when the
>> MICROVM_MACHINE_ISA_SERIAL property is set, it has to be linked
>> with it. Replace the 'imply' Kconfig rule by a 'select'.
> 
> I added a comment "# for serial_hds_isa_init()" here.

Sounds good, assuming the microvm might become more modular later.

>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> Cc: Sergio Lopez <slp@redhat.com>
>> ---
>>   hw/i386/Kconfig | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
>> index e428322a2c..cbcfb1ce81 100644
>> --- a/hw/i386/Kconfig
>> +++ b/hw/i386/Kconfig
>> @@ -96,7 +96,7 @@ config Q35
>>   
>>   config MICROVM
>>       bool
>> -    imply SERIAL_ISA
>> +    select SERIAL_ISA
>>       select ISA_BUS
>>       select APIC
>>       select IOAPIC
>>
>
diff mbox series

Patch

diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index e428322a2c..cbcfb1ce81 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -96,7 +96,7 @@  config Q35
 
 config MICROVM
     bool
-    imply SERIAL_ISA
+    select SERIAL_ISA
     select ISA_BUS
     select APIC
     select IOAPIC