On Thu, Jul 25, 2024 at 02:57:23PM +0200, Jerome Forissier wrote:

> Prepare the introduction of the lwIP (lightweight IP) TCP/IP stack by
> adding a new net/lwip/ directory and the NET_LWIP symbol. Network
> support is either NO_NET, NET (legacy stack) or NET_LWIP. Subsequent
> commits will introduce the lwIP code, re-work the NETDEVICE integration
> and port some of the NET commands and features to lwIP.
> 
> SPL_NET cannot be enabled when NET_LWIP=y. SPL_NET pulls some symbols
> that are part of NET (such as arp_init(), arp_timeout_check(),
> arp_receive(), net_arp_wait_packet_ip()). lwIP support in SPL may be
> added later.
> 
> Similarly, DFU_TFTP and FASTBOOT are not compatible with NET_LWIP
> because of dependencies on net_loop(), tftp_timeout_ms,
> tftp_timeout_count_max and other NET things. Let's add a dependency on
> !NET_LWIP for now.
> 
> As for SANDBOX, NET_LWIP cannot be used either because of strong
> assumptions on the network stack. Make NET_LWIP depend on !SANDBOX so
> that the NET_LWIP alternative is not visible in make menuconfig when
> sandbox_defconfig is used.
> 
> Signed-off-by: Jerome Forissier <jerome.foriss...@linaro.org>
[snip]

Here in net/Kconfig you do..
> +if NET || NET_LWIP
> +
> +config BOOTDEV_ETH
> +     bool "Enable bootdev for ethernet"
> +     depends on BOOTSTD
> +     default y
> +     help
> +       Provide a bootdev for ethernet so that is it possible to boot
> +       an operating system over the network, using the PXE (Preboot
> +       Execution Environment) protocol.
> +
>  config SYS_RX_ETH_BUFFER
>       int "Number of receive packet buffers"
>       default 4

But we must have SYS_RX_ETH_BUFFER defined even in the NO_NET case as
otherwise previously <net.h> and now <net-common.h> cannot be used, and
untying that is another big mess. We include <net.h> in common areas for
function prototypes where their usage is guarded. But we use PKTBUFSRX
in some structs that aren't guarded. Trying to build for example for
am62x_beagleplay_r5 with this series blows up in a lot of places.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to