[PATCH] dfu: fix Kconfig dependencies
Marek Vasut
marex at denx.de
Tue Sep 10 12:48:03 CEST 2024
On 9/10/24 12:27 PM, Jerome Forissier wrote:
> Fix link errors caused by missing Kconfig dependencies:
>
> 1. DFU_OVER_USB compiles common/dfu.c which calls g_dnl_clear_detach()
> which is implemented in drivers/usb/gadget/g_dnl.c which needs
> USB_GADGET_DOWNLOAD. Test case:
>
> $ printf "CONFIG_USB_GADGET_DOWNLOAD=n\nCONFIG_USB_FUNCTION_FASTBOOT=n" \
> >>configs/am62px_evm_a53_defconfig
> $ make am62px_evm_a53_defconfig
> $ make CROSS_COMPILE=aarch64-linux-gnu-
> [...]
> common/dfu.c:34:(.text.run_usb_dnl_gadget+0x68): undefined reference to `g_dnl_clear_detach
> [...]
>
> 2. With the above fixed, the same build causes:
>
> common/spl/spl_dfu.c:29:(.text.spl_dfu_cmd+0xb0): undefined reference to `run_usb_dnl_gadget'
>
> This is because SPL_DFU compiles common/spl/spl_dfu.c which calls
> run_usb_dnl_gadget() which is implemented in common/dfu.c which needs
> DFU_OVER_USB.
>
> Therefore add these dependencies to Kconfig.
Reviewed-by: Marek Vasut <marex at denx.de>
Thanks !
More information about the U-Boot
mailing list