From: Linus Walleij Date: Mon, 23 Jan 2023 22:07:21 +0000 (+0100) Subject: test: bootdev: Do not require USB to compile test X-Git-Tag: v2025.01-rc5-pxa1908~1118^2~43 X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=0c1413f6d748d7bb685ad3b554edce6a9ca5c09d;p=u-boot.git test: bootdev: Do not require USB to compile test This test will block compilation of the entire test suite on platforms without USB support. Make the extern "usb_started" conditional on USB host or gadget and define a dummy flag if neither is enabled. Cc: Simon Glass Signed-off-by: Linus Walleij Reviewed-by: Simon Glass --- diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c index ef5215bbce..de8dd66b82 100644 --- a/test/boot/bootdev.c +++ b/test/boot/bootdev.c @@ -18,7 +18,11 @@ #include "bootstd_common.h" /* Allow reseting the USB-started flag */ +#if defined(CONFIG_USB_HOST) || defined(CONFIG_USB_GADGET) extern char usb_started; +#else +char usb_started; +#endif /* Check 'bootdev list' command */ static int bootdev_test_cmd_list(struct unit_test_state *uts)