]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
spl: fix incorrect dependency for SPL_NET
authorQuentin Schulz <quentin.schulz@cherry.de>
Thu, 8 Jan 2026 12:28:36 +0000 (13:28 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 16 Jan 2026 15:53:57 +0000 (09:53 -0600)
When SPL_NET is included, scripts/Makefile.xpl includes net/. However,
in this directory, the Makefile only compiles things if CONFIG_NET or
CONFIG_NET_LWIP is defined (it doesn't use $(PHASE_)). Therefore, at
least one networking stack needs to be enabled for SPL_NET=y to do
anything meaningful.

In certain cases (e.g. am62px_evm_r5_ethboot_defconfig + NO_NET=y via
menuconfig), it is possible to fail the build with undefined references
(since include/net-common.h does check with CONFIG_IS_ENABLED(NET) which
would be true for SPL_NET, but the implementation wouldn't be compiled).

Fix this oversight by making sure a network stack (and the legacy one)
is available when selecting SPL_NET.

Fixes: 8cb330355bd5 ("net: introduce alternative implementation as net/lwip/")
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
common/spl/Kconfig

index 4f4119f5806c3512f7595559a60f15d4a744cf35..c7db88345b49bd730cd67462789baf4f9dfb47b5 100644 (file)
@@ -1153,7 +1153,7 @@ config SPL_DM_SPI_FLASH
 
 config SPL_NET
        bool "Support networking"
-       depends on !NET_LWIP
+       depends on NET
        select SPL_USE_TINY_PRINTF_POINTER_SUPPORT if SPL_USE_TINY_PRINTF
        help
          Enable support for network devices (such as Ethernet) in SPL.