qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 08/20] hw/arm/allwinner: add SD/MMC host controller


From: Niek Linnenbank
Subject: Re: [PATCH v4 08/20] hw/arm/allwinner: add SD/MMC host controller
Date: Fri, 7 Feb 2020 22:09:16 +0100

Hi Philippe,

FYI, and in case someone also wants to do a similar configuration test on some other machine.
I managed to re-produce the same error by temporarily modifying default-configs/arm-softmmu.mak, such that it only enables the orangepi machine.
That way, if any configuration item is missing from the machine, the error will be visible.

Regards,
Niek


On Sun, Feb 2, 2020 at 10:43 PM Niek Linnenbank <address@hidden> wrote:
Hi Philippe,

On Sun, Jan 19, 2020 at 8:02 PM Philippe Mathieu-Daudé <address@hidden> wrote:
On 1/19/20 1:50 AM, Niek Linnenbank wrote:
> The Allwinner System on Chip families sun4i and above contain
> an integrated storage controller for Secure Digital (SD) and
> Multi Media Card (MMC) interfaces. This commit adds support
> for the Allwinner SD/MMC storage controller with the following
> emulated features:
>
>   * DMA transfers
>   * Direct FIFO I/O
>   * Short/Long format command responses
>   * Auto-Stop command (CMD12)
>   * Insert & remove card detection
>
> The following boards are extended with the SD host controller:
>
>   * Cubieboard (hw/arm/cubieboard.c)
>   * Orange Pi PC (hw/arm/orangepi.c)
>
> Signed-off-by: Niek Linnenbank <address@hidden>
> Tested-by: Philippe Mathieu-Daudé <address@hidden>
> ---
>   include/hw/arm/allwinner-a10.h   |   2 +
>   include/hw/arm/allwinner-h3.h    |   3 +
>   include/hw/sd/allwinner-sdhost.h | 135 +++++
>   hw/arm/allwinner-a10.c           |  11 +
>   hw/arm/allwinner-h3.c            |  15 +-
>   hw/arm/cubieboard.c              |  15 +
>   hw/arm/orangepi.c                |  16 +
>   hw/sd/allwinner-sdhost.c         | 848 +++++++++++++++++++++++++++++++
>   hw/sd/Makefile.objs              |   1 +
>   hw/sd/trace-events               |   7 +
>   10 files changed, 1052 insertions(+), 1 deletion(-)
>   create mode 100644 include/hw/sd/allwinner-sdhost.h
>   create mode 100644 hw/sd/allwinner-sdhost.c

Failure at build if configured with --without-default-devices:

   CC      arm-softmmu/hw/sd/allwinner-sdhost.o
   CC      arm-softmmu/hw/arm/orangepi.o
   CC      arm-softmmu/hw/arm/allwinner-h3.o
   LINK    arm-softmmu/qemu-system-arm
/usr/bin/ld: hw/sd/allwinner-sdhost.o: in function
`allwinner_sdhost_send_command':
hw/sd/allwinner-sdhost.c:239: undefined reference to `sdbus_do_command'
/usr/bin/ld: hw/sd/allwinner-sdhost.o: in function `allwinner_sdhost_read':
hw/sd/allwinner-sdhost.c:517: undefined reference to `sdbus_data_ready'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:518: undefined reference to
`sdbus_read_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:519: undefined reference to
`sdbus_read_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:520: undefined reference to
`sdbus_read_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:521: undefined reference to
`sdbus_read_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.o: in function
`allwinner_sdhost_process_desc':
hw/sd/allwinner-sdhost.c:340: undefined reference to `sdbus_read_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:334: undefined reference to
`sdbus_write_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.o: in function `allwinner_sdhost_write':
hw/sd/allwinner-sdhost.c:651: undefined reference to `sdbus_write_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:652: undefined reference to
`sdbus_write_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:653: undefined reference to
`sdbus_write_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.c:654: undefined reference to
`sdbus_write_data'
/usr/bin/ld: hw/sd/allwinner-sdhost.o: in function `allwinner_sdhost_dma':
hw/sd/allwinner-sdhost.c:372: undefined reference to `sdbus_data_ready'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:206: qemu-system-arm] Error 1


Thanks for reporting this Philippe. As you pointed out, I also made the same mistake in patch #4 for USB support [1].
Here I also tried to re-produce the error here with:

$ ./configure --target-list=arm-softmmu --without-default-devices; make -j5

But again no error. I also see that CONFIG_SD=y is set in arm-softmmu/config-devices.mak.
Maybe on my laptop  --without-default-devices has no effect or is overriden somehow, I'll try to debug it further.

[1] https://lists.gnu.org/archive/html/qemu-devel/2020-02/msg00125.html
 
Fixed by:

-- >8 --
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index bb75c1de17..086241354c 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -302,6 +302,9 @@ config ALLWINNER_H3
      select ARM_TIMER
      select ARM_GIC
      select UNIMP
      select USB_OHCI
      select USB_EHCI_SYSBUS
+    select SD

Thanks, I'll add this fix.

Regards,
Niek
 
  config RASPI
      bool
---



--
Niek Linnenbank



--
Niek Linnenbank


reply via email to

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