diff mbox series

[07/14] hw/ppc/Kconfig: Let the Sam460ex board use the PowerPC 405 devices

Message ID 20191231183216.6781-8-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    ppc-softmmu/qemu-system-ppc
  /usr/bin/ld: hw/ppc/sam460ex.o: in function `sam460ex_init':
  hw/ppc/sam460ex.c:313: undefined reference to `ppc4xx_plb_init'
  /usr/bin/ld: hw/ppc/sam460ex.c:353: undefined reference to `ppc405_ebc_init'
  collect2: error: ld returned 1 exit status
  make[1]: *** [Makefile:206: qemu-system-ppc] Error 1

Fix by selecting the PPC405 config.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/ppc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

BALATON Zoltan Jan. 1, 2020, 11:29 a.m. UTC | #1
On Tue, 31 Dec 2019, Philippe Mathieu-Daudé wrote:
> When configured with --without-default-devices, the build fails:
>
>    LINK    ppc-softmmu/qemu-system-ppc
>  /usr/bin/ld: hw/ppc/sam460ex.o: in function `sam460ex_init':
>  hw/ppc/sam460ex.c:313: undefined reference to `ppc4xx_plb_init'
>  /usr/bin/ld: hw/ppc/sam460ex.c:353: undefined reference to `ppc405_ebc_init'
>  collect2: error: ld returned 1 exit status
>  make[1]: *** [Makefile:206: qemu-system-ppc] Error 1
>
> Fix by selecting the PPC405 config.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>

(The 405 and 440 devices are currently entangled by both using similar 
parts and maybe not all of them are in 4xx yet. Because of this I'm not 
sure if it's worth having separate configure options for these or just 
have a common PPC4XX option for now until these are cleaned up to separate 
them.)

Regards,
BALATON Zoltan

> ---
> hw/ppc/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index 0cd8d4053e..004b7d5ad5 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -50,6 +50,7 @@ config PPC4XX
>
> config SAM460EX
>     bool
> +    select PPC405
>     select PFLASH_CFI01
>     select IDE_SII3112
>     select M41T80
>
Philippe Mathieu-Daudé Jan. 1, 2020, 3:37 p.m. UTC | #2
On 1/1/20 12:29 PM, BALATON Zoltan wrote:
> On Tue, 31 Dec 2019, Philippe Mathieu-Daudé wrote:
>> When configured with --without-default-devices, the build fails:
>>
>>    LINK    ppc-softmmu/qemu-system-ppc
>>  /usr/bin/ld: hw/ppc/sam460ex.o: in function `sam460ex_init':
>>  hw/ppc/sam460ex.c:313: undefined reference to `ppc4xx_plb_init'
>>  /usr/bin/ld: hw/ppc/sam460ex.c:353: undefined reference to 
>> `ppc405_ebc_init'
>>  collect2: error: ld returned 1 exit status
>>  make[1]: *** [Makefile:206: qemu-system-ppc] Error 1
>>
>> Fix by selecting the PPC405 config.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
> 
> (The 405 and 440 devices are currently entangled by both using similar 
> parts and maybe not all of them are in 4xx yet. Because of this I'm not 
> sure if it's worth having separate configure options for these or just 
> have a common PPC4XX option for now until these are cleaned up to 
> separate them.)

You are correct. Using a config.mak limited to CONFIG_SAM460EX=y also 
pulls the 440-based machines in.

Building this series with 'make ppc-softmmu/all':

$ ppc-softmmu/qemu-system-ppc -M help
Supported machines are:
bamboo               bamboo
none                 empty machine
ref405ep             ref405ep
sam460ex             aCube Sam460ex
taihu                taihu

Thanks for the review!

> 
> Regards,
> BALATON Zoltan
> 
>> ---
>> hw/ppc/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
>> index 0cd8d4053e..004b7d5ad5 100644
>> --- a/hw/ppc/Kconfig
>> +++ b/hw/ppc/Kconfig
>> @@ -50,6 +50,7 @@ config PPC4XX
>>
>> config SAM460EX
>>     bool
>> +    select PPC405
>>     select PFLASH_CFI01
>>     select IDE_SII3112
>>     select M41T80
>>
David Gibson Jan. 2, 2020, 2:03 a.m. UTC | #3
On Tue, Dec 31, 2019 at 07:32:09PM +0100, Philippe Mathieu-Daudé wrote:
> When configured with --without-default-devices, the build fails:
> 
>     LINK    ppc-softmmu/qemu-system-ppc
>   /usr/bin/ld: hw/ppc/sam460ex.o: in function `sam460ex_init':
>   hw/ppc/sam460ex.c:313: undefined reference to `ppc4xx_plb_init'
>   /usr/bin/ld: hw/ppc/sam460ex.c:353: undefined reference to `ppc405_ebc_init'
>   collect2: error: ld returned 1 exit status
>   make[1]: *** [Makefile:206: qemu-system-ppc] Error 1
> 
> Fix by selecting the PPC405 config.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Acked-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  hw/ppc/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index 0cd8d4053e..004b7d5ad5 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -50,6 +50,7 @@ config PPC4XX
>  
>  config SAM460EX
>      bool
> +    select PPC405
>      select PFLASH_CFI01
>      select IDE_SII3112
>      select M41T80
diff mbox series

Patch

diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index 0cd8d4053e..004b7d5ad5 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -50,6 +50,7 @@  config PPC4XX
 
 config SAM460EX
     bool
+    select PPC405
     select PFLASH_CFI01
     select IDE_SII3112
     select M41T80