[PATCH 2/2] ARM: imx: Fix build error without CONFIG_USB_GADGET_DRIVER_ARC_PBL

Alexander Shiyan eagle.alexander923 at gmail.com
Thu Aug 24 08:39:33 PDT 2023


aarch64-buildroot-linux-gnu-ld: arch/arm/mach-imx/atf.pbl.o: in function `imx8mm_load_bl33':
/home/ARM64/bb-imx8/arch/arm/mach-imx/atf.c:102: undefined reference to `imx8mm_barebox_load_usb'
make[1]: *** [/home/ARM64/bb-imx8/images/Makefile:70: images/start_nxp_imx8mm_evk.pbl] Error 1
make: *** [Makefile:732: images] Error 2

Signed-off-by: Alexander Shiyan <eagle.alexander923 at gmail.com>
---
 arch/arm/mach-imx/atf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/atf.c b/arch/arm/mach-imx/atf.c
index 38bab9c051..824569f614 100644
--- a/arch/arm/mach-imx/atf.c
+++ b/arch/arm/mach-imx/atf.c
@@ -87,6 +87,7 @@ void imx8mm_load_bl33(void *bl33)
 	case BOOTSOURCE_MMC:
 		imx8m_esdhc_load_image(instance, false);
 		break;
+#if IS_ENABLED(CONFIG_USB_GADGET_DRIVER_ARC_PBL)
 	case BOOTSOURCE_SERIAL:
 		/*
 		 * Traditionally imx-usb-loader sends the PBL twice. The first
@@ -112,11 +113,12 @@ void imx8mm_load_bl33(void *bl33)
 		}
 
 		break;
+#endif
 	case BOOTSOURCE_SPI:
 		imx8mm_qspi_load_image(instance, false);
 		break;
 	default:
-		printf("Unhandled bootsource BOOTSOURCE_%d\n", src);
+		printf("Unsupported bootsource BOOTSOURCE_%d\n", src);
 		hang();
 	}
 
-- 
2.38.2




More information about the barebox mailing list