]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: Fix compiling SPL when fastboot is enabled
authorSean Anderson <seanga2@gmail.com>
Sat, 14 Oct 2023 20:47:51 +0000 (16:47 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 18 Oct 2023 00:50:52 +0000 (20:50 -0400)
When fastboot is enabled in U-Boot proper and SPL_NET is enabled, we will
try to (unsuccessfully) reference it in SPL. Fix these linker errors by
conditioning on SPL_UDP/TCP_FUNCTION_FASTBOOT.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
net/Makefile
net/net.c

index 3e2d061338d2acea3c463e90a500ab0bb7bab467..64ab7ec740acf3d144ec9bba4a6c25e97ffb39a1 100644 (file)
@@ -27,8 +27,8 @@ obj-$(CONFIG_CMD_PCAP) += pcap.o
 obj-$(CONFIG_CMD_RARP) += rarp.o
 obj-$(CONFIG_CMD_SNTP) += sntp.o
 obj-$(CONFIG_CMD_TFTPBOOT) += tftp.o
-obj-$(CONFIG_UDP_FUNCTION_FASTBOOT)  += fastboot_udp.o
-obj-$(CONFIG_TCP_FUNCTION_FASTBOOT)  += fastboot_tcp.o
+obj-$(CONFIG_$(SPL_TPL_)UDP_FUNCTION_FASTBOOT)  += fastboot_udp.o
+obj-$(CONFIG_$(SPL_TPL_)TCP_FUNCTION_FASTBOOT)  += fastboot_tcp.o
 obj-$(CONFIG_CMD_WOL)  += wol.o
 obj-$(CONFIG_PROT_UDP) += udp.o
 obj-$(CONFIG_PROT_TCP) += tcp.o
index e6f61f0f8f6ab7e65ba800f1a7630e013429cd3e..8357f084101975c4930ff78b5a4d2e8e90234481 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -511,12 +511,12 @@ restart:
                        tftp_start_server();
                        break;
 #endif
-#if defined(CONFIG_UDP_FUNCTION_FASTBOOT)
+#if CONFIG_IS_ENABLED(UDP_FUNCTION_FASTBOOT)
                case FASTBOOT_UDP:
                        fastboot_udp_start_server();
                        break;
 #endif
-#if defined(CONFIG_TCP_FUNCTION_FASTBOOT)
+#if CONFIG_IS_ENABLED(TCP_FUNCTION_FASTBOOT)
                case FASTBOOT_TCP:
                        fastboot_tcp_start_server();
                        break;