Skip to contentSkip to conversation

Introduce the lwIP network stack

PATCH Superseded Jerome Forissier 6 participants 64 messages Aug 23, 2024 – Sep 24, 2024

Subsystems (16)

v9 of 13 Superseded Latest is v13 →

lore
Share & tools
lore
#0 lore raw

v9 cover Introduce the lwIP network stack

This is a rework of a patch series by Maxim Uvarov: "net/lwip: add lwip library for the network stack" [1]. The goal is to introduce the lwIP TCP/IP stack [2] [3] as an alternative to the current implementation in net/, selectable with Kconfig, and ultimately keep only lwIP if possible. Some reasons for doing so are:
- Make the support of HTTPS in the wget command easier. Javier T. and Raymond M. (CC'd) have some additional lwIP and Mbed TLS patches to do so. With that it becomes possible to fetch and launch a distro installer such as Debian etc. using a secure, authenticated connection directly from the U-Boot shell. Several use cases:
* Authentication: prevent MITM attack (third party replacing the
binary with a different one)
* Confidentiality: prevent third parties from grabbing a copy of the
image as it is being downloaded
* Allow connection to servers that do not support plain HTTP anymore
(this is becoming more and more common on the Internet these days)
- Possibly benefit from additional features implemented in lwIP
- Less code to maintain in U-Boot

Prior to applying this series, the lwIP stack needs to be added as a Git subtree with the following command:

 $  git subtree add --squash --prefix lib/lwip/lwip https://git.savannah.gnu.org/git/lwip.git STABLE-2_2_0_RELEASE

Notes

1. A number of features are currently incompatible with NET_LWIP: SANDBOX, DFU_TFTP, FASTBOOT, SPL_NET, CMD_PXE. All make assumptions on how the network stack is implemented and/or pull sybols that are not trivially exported from lwIP. Some interface rework may be needed.

2. Due to the above and in order to provide some level of testing, a new QEMU configuration is introduced (qemu_arm64_lwip_defconfig) which is the same as qemu_arm64_defconfig but with NET_LWIP and CMD_*_LWIP enabled. Tests are added to test/py/tests/test_net.py for that configuration. In addition to that, this series has some [TESTING] patches which make NET_LWIP the default and opt-out the platforms that fail CI (~130 of them, among which ~100 is because of PXE).

[1] https://lore.kernel.org/all/[email protected]/
[2] https://www.nongnu.org/lwip/
[3] https://en.wikipedia.org/wiki/LwIP

Changes in v9:

- Rebased onto master, reordered commits to put some fixes that are not strictly related to lwIP first.
- New commit "test/py: test_efi_loader: add missing dependency on cmd_tftpboot" (Tom R.)
- test_efi_loader.py: add missing dependency on cmd_wget (Tom R.)
- wget: fix divide by zero when transfer takes less than 1ms (Tom R.)
- New commit "configs: use syntax CONFIG_FOO=n in tools-only_defconfig" (Tom R.)
- Make TCP_WND configurable (via CONFIG_LWIP_TCP_WND) because a large value is needed for good performance especially with latency but transfers stall in QEMU (-net user) when the value is larger than a few KB (Anton A., offlist)
- Added [TESTING] commits to run CI with NET_LWIP enabled by default except for SANDBOX and platforms that enable PXE, and fixed a number of issues:
* coreboot_defconfig: 'implicit declaration' warnings on ip_checksum_ok() and compute_ip_checksum()
* Fix EFI net tests (bootefi selftest) by adding missing push_packed() call to net_process_received_packet()
* qemu_arm64: fix test_efi_loader.py failures (skip HTTP test by default since it needs a HTTP server; fix a bug in the dhcp command which would not set the "serverip" variable)
* QEMU CI tests for r2dplus_i82557c, r2dplus_rtl8139:
Fixed receive errors due to calling free_pkt() with a length of zero. r2dplus_tulip: fixed "dm_pci_phys_to_bus:
invalid physical address" caused by too late eth_init_rings().
With that the CI status is all GREEN:
https://dev.azure.com/u-boot/u-boot/_build/results?buildId=9225&view=results

Changes in v8:

- Fix bootefi with tftp and wget. It would previously fail with an error message: "No UEFI binary known at 200000". Tested on Raspberry 3B+. Also fix the legacy wget. (Tom R.)
- wget: add "Bytes transferred =" message and accept legacy syntax for better compatibility which also makes it easier to add a test to the test suite
- wget: When no server name or address is supplied, use ${httpserverip} then ${serverip}.
- wget: start the timer used for measuring throughput when the first data block is received. In other words: do not include DNS resolution and TCP connection time in measurement. It gives better numbers ;) but more importantly is how the legacy code works.
- wget: handle non-200 result codes from the server as errors.
- tftp: when no server name or ip is supplied, use ${tftpserverip} then fall back to ${serverip}.
- New commit: "test/py: add HTTP (wget) test"
- New commit: "net: wget: removed unused function wget_success()"
- Change back all !CONFIG_IS_ENABLED(NO_NET) tests to (CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)) since the NO_NET case is wrong when CONFIG_SPL_BUILD or CONFIG_TPL_BUILD is defined (Tom R.)

Changes in v7:

- Rebased onto master
- Updated binary size comparisons in this cover letter. Note that the increase for imx8mp_evk_defconfig was wrong due to a configuration error.

Changes in v6:

- Rebased on next
- "flash: prefix error codes with FL_"
Update drivers/mtd/altera_qspi.c too (Tom R.)
- "net: introduce alternative implementation as net-lwip/" Introduce a "Networking" top-level menu in the main Kconfig. Avoids having a lot of network-related symbols on the first screen of menuconfig. The "Networking stack" choice as well as the applicable symbols (depending on the selected choice) are now all inside this "Networking" menu. (Michal S.)
For PROT_DHCP_LWIP and PROT_DNS_LWIP, use "select" PROT_UDP_LWIP rather than "depends on".
Move NET_RANDOM_ETHADDR to the common ('if NET || NET_LWIP') block. Move SYS_RX_ETH_BUFFER out of 'if NET || NET_LWIP' since it is used unguarded in some code (e.g., am62x_beagleplay_r5) (Tom R.).
- "net: split include/net.h into net{,-common,-legacy,-lwip}.h" Move net_random_ethaddr() to net-common.h.
- "net: eth-uclass: add function eth_start_udev()"
Fix typo and apply Tom R.'s R-b.
- "net-lwip: add DHCP support and dhcp commmand"
Convert !CONFIG_IS_ENABLED(NET) to CONFIG_IS_ENABLED(NO_NET) in board/xilinx/common/board.c to fix an issue with device having no MAC address (thanks Michal S.). Do the same at other places (icore_mx8mp.c, imx8mp_debix_model_a.c, board/ti/am335x/board.c, tiny-printf.c).
Move CMD_MII and CMD_MDIO into 'if NET || NET_LWIP'.
- "net-lwip: add TFTP support and tftpboot command":
Fix help string.
- "net: split cmd/net.c into cmd/net.c and cmd/net-common.c":
Apply Ilias' R-b.
- "net-lwip: add TFTP_BLOCKSIZE"
Apply Ilias' R-b. I moved the TFTP_BLOCKSIZE Kconfig into this commit where it belongs (it was previously in "net" split ... net.h").

Changes in v5:

- Rebased on next
- Refactor Kconfig options to avoid duplicates
- Library functions use a more consistent naming (dhcp_loop(), ping_loop() etc.) and take a struct udevice * parameter (Heinrich S.)
- Do not use net_process_receive_packet() for input anymore. Instead of calling eth_rx() which would invoke net_process_receive_packet(), we call a new net_lwip_rx(udev) function which invokes the device recv() and pushes the packets up the lwIP stack. Thus everything is tied to a udevice now. (Heinrich S.)
- Add "configs: replace '# CONFIG_NET is not set' with CONFIG_NO_NET=y" (Tom R.)
- tftp: unify display with legacy command: add throughput, 65 hashes per line, one every 10 blocks received (Tom R.)
- Moved net-lwip/* to net/lwip/* (Simon G.)
- Rename static function low_level_output() to linkoutput() since it is the name used in the lwIP netif struct.
- Fixed off-by-one in parse_url() which could cause wget to fail when passed a URL with a host name (as opposed to a URL with an IP address).
- Improved TFTP performance by adding support for the blksize option (patches "lwip: tftp: add support of blksize option to client" and "net-lwip: add TFTP_BLOCKSIZE) (Tom R.)
- Add an optional port number to the tftp command for easier testing (syntax: tftp [[ip:[port:]]filename])
- wget: display an "unsupported URI" error if uri is not http://
(Jon H.)
- Adjusted the lwIP TCP options in lib/lwip/u-boot/lwipopts.h for better performance, in particular TCP_WND.
- Add "net: fec_mxc_init(): do not ignore return status of fec_open()"
- Set the proper environment variables when DHCP succeeds (ipaddr%d etc.) and read the proper ones for the given device in new_netif(), allowing correct behavior when several adapters are available (tested on i.MX8M Plus).
- Fix an alignment issue with outgoing packets (see the linkoutput() function). With that the i.MX8M Plus ENET1 interface works properly. (reported by Tim H.).
- Add review tags

Changes in v4:

- Fixed the DHCP algorithm which was missing a sys_timeout() call in the "fine timer" callback. This should close the issue that Tom R. reported with his Raspberry Pi 3 (it does fix it on mine).
- The DHCP exchange timeout is increased from 2 to 10 seconds
- The DHCP exchange can be interrupted with Ctrl-C.
- "net: introduce alternative implementation as net-lwip/": rework dependencies. A few symbols have 'depends on !NET_LWIP' and in addition 'NET_LWIP depends on !SANDBOX'. Sandbox, DSA and fastboot are unsupported, because they are deeply welded to the current stack.
- All network commands (dns, ping, tftp and wget):
* Get rid of global variables (Ilias A.)
* Use printf() rather than log_info()
- "net-lwip: add ping command": use packet count instead of timeout, fix code style (Ilias A.)
- Add "net: split cmd/net.c into cmd/net.c and cmd/net-common.c" extracted from the wget patch (Ilias A.).
- Add "net: split include/net.h into net{,-common,-legacy,-lwip}.h" (Ilias A.)
- Add "flash: prefix error codes with FL_" which is required to avoid name clashes when splitting net.h
- Reworked the initialization of the lwIP stack. One and only one network interface (struct netif) is added for the duration of the command that uses that interface. That's commit "net-lwip:
add DHCP support and dhcp commmand".
- Drop "test: dm: dsa, eth: disable tests when CONFIG_NET_LWIP=y", not needed now that NET_LWIP depend on !SANDBOX.
- qemu_arm64_lwip_defconfig now enables CMD_DNS and CMD_WGET (so that all the supported network commands are available).

Changes in v3:

- Make NET_LWIP a Kconfig choice in patch "net: introduce alternative implementation as net-lwip/" (Tom R.)
- Drop the patch introducing lwIP as a Git subtree and document the git command in the cover letter instead (Tom R.)
- "net-lwip: add TFTP support and tftpboot command": use the same "Bytes transferred =" message as in the legacy implementation (Tom R., Maxim U.)
- Drop "test/py: net: add _lwip variants of dhcp, ping and tftpboot tests" which is not needed anymore.
- Add missing kfree() calls in cmd/net-common.c and fix the parsing of decimal address in net-lwip/wget.c (patch "net-lwip: add wget command") (Maxim U.)
- "net-lwip: add ping command": drop the ICMP payload (Ilias A.). Set the sequence number to zero when entering ping_loop().

Changes in v2:

** Address comments from Ilias A.

- "net-lwip: add wget command"
Implement the wget_with_dns() function to do most of the wget work and call it from do_wget(). This allows to simplify patch "net-lwip: add support for EFI_HTTP_BOOT".

- "net-lwip: import net command from cmd/net.c"
Move a few functions from cmd/net.c to a new file cmd/net-common.c rather than duplicating then in cmd/net-lwip.c.

- "net-lwip: add support for EFI_HTTP_BOOT"
Since wget_with_dns() is now implemented in "net-lwip: add wget command", just enable the wget command when the lwIP stack is enabled and EFI_HTTP_BOOT is requested.

** Address comments from Tom R.

- "net-lwip: add DHCP support and dhcp commmand", "net-lwip: add TFTP support and tftpboot command", "net-lwip: add ping command",
"net-lwip: add dns command",
"net-lwip: add wget command"
Do not introduce new CMD_XXX_LWIP symbols and use existing CMD_XXX instead.

- "configs: add qemu_arm64_lwip_defconfig"
Use #include <configs/qemu_arm64_defconfig>.

- "net-lwip: import lwIP library under lib/lwip"
Patch removed and replaced by the introduction of a Git subtree:
"Squashed 'lib/lwip/lwip/' content from commit 0a0452b2c3".

Note that I have not yet addressed your comments on "test: dm: dsa,
eth: disable tests when CONFIG_NET_LWIP=y"). I need some more time for that and I think running CI on this v2 will help better understand what is needed for v3.

** Miscellaneous improvements

- "net: introduce alternative implementation as net-lwip/":

* Make DFU_OVER_TFTP not DFU_TFTP incompatible with NET_LWIP. It seems quite natural to supplement "depends on NET" with "&& !NET_LWIP".
* Make PROT_*_LWIP not visible by removing the Kconfig prompt.

Jerome Forissier (36):
Makefile: detect HOST_ARCH properly when CROSS_COMPILE is multi-word
flash: prefix error codes with FL_
at91: rename mem_init() to at91_mem_init()
arm: omap2: add missing #include <netdev.h>
net: fm: call dtsec_init_phy() only when it is defined
net: wget: removed unused function wget_success()
net: phy: ncsi: depend on NET
net: ftgmac100: depend on NET
net: wget: allow EFI boot
net: fec_mxc_init(): do not ignore return status of fec_open() test/py: net_boot: fix comment
test/py: test_efi_loader: add missing dependency on cmd_tftpboot test/py: test_efi_loader: add HTTP (wget) test for the EFI loader
net: introduce alternative implementation as net-lwip/
configs: replace '# CONFIG_NET is not set' with CONFIG_NO_NET=y
net: split include/net.h into net{,-common,-legacy,-lwip}.h
net: move copy_filename() to new file net/net-common.c
net: eth-uclass: add function eth_start_udev()
net-lwip: build lwIP
net-lwip: add DHCP support and dhcp commmand
net-lwip: add TFTP support and tftpboot command
net-lwip: add ping command
net-lwip: add dns command
net: split cmd/net.c into cmd/net.c and cmd/net-common.c
net-lwip: add wget command
cmd: bdinfo: enable -e when CONFIG_CMD_NET_LWIP=y
configs: add qemu_arm64_lwip_defconfig
lwip: tftp: add support of blksize option to client
net-lwip: add TFTP_BLOCKSIZE
CI: add qemu_arm64_lwip to the test matrix
MAINTAINERS: net-lwip: add myself as a maintainer
Kconfig: fix undefined symbols (g_dnl*) when NET_LWIP is default
enabled
configs: use syntax CONFIG_FOO=n in tools-only_defconfig [TESTING] Kconfig: enable NET_LWIP by default except for SANDBOX [TESTING] configs: set CONFIG_NET=y for FTGMAC100 [TESTING] configs: set CONFIG_NET=y when PXE is enabled

Jonathan Humphreys (1):
net-lwip: lwIP wget supports user defined port in the uri, so allow

    it.
 .azure-pipelines.yml                          |   7 +
 Kconfig                                       |  31 +
 MAINTAINERS                                   |  11 +
 Makefile                                      |   6 +-
 arch/arm/mach-at91/include/mach/at91_common.h |   2 +-
 arch/arm/mach-at91/spl_at91.c                 |   2 +-
 arch/arm/mach-at91/spl_atmel.c                |   2 +-
 arch/arm/mach-omap2/omap3/emac.c              |   1 +
 .../atmel/at91sam9m10g45ek/at91sam9m10g45ek.c |   2 +-
 board/atmel/at91sam9n12ek/at91sam9n12ek.c     |   2 +-
 board/atmel/at91sam9x5ek/at91sam9x5ek.c       |   2 +-
 .../atmel/sama5d27_som1_ek/sama5d27_som1_ek.c |   2 +-
 .../sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c   |   2 +-
 board/atmel/sama5d2_icp/sama5d2_icp.c         |   2 +-
 .../atmel/sama5d2_xplained/sama5d2_xplained.c |   2 +-
 .../atmel/sama5d3_xplained/sama5d3_xplained.c |   2 +-
 board/atmel/sama5d3xek/sama5d3xek.c           |   2 +-
 .../atmel/sama5d4_xplained/sama5d4_xplained.c |   2 +-
 board/atmel/sama5d4ek/sama5d4ek.c             |   2 +-
 board/cobra5272/flash.c                       |  26 +-
 .../conclusive/kstr-sama5d27/kstr-sama5d27.c  |   2 +-
 board/engicam/imx8mp/icore_mx8mp.c            |   2 +-
 board/freescale/m5253demo/flash.c             |   6 +-
 board/gardena/smart-gateway-at91sam/spl.c     |   2 +-
 .../imx8mp_debix_model_a.c                    |   2 +-
 board/siemens/corvus/board.c                  |   2 +-
 board/siemens/smartweb/smartweb.c             |   2 +-
 board/siemens/taurus/taurus.c                 |   2 +-
 board/ti/am335x/board.c                       |   3 +-
 board/xilinx/common/board.c                   |   3 +-
 boot/Kconfig                                  |   4 +-
 cmd/Kconfig                                   | 129 ++-
 cmd/Makefile                                  |   9 +-
 cmd/bdinfo.c                                  |   5 +-
 cmd/elf.c                                     |   2 +-
 cmd/net-common.c                              | 109 ++
 cmd/net-lwip.c                                |  45 +
 cmd/net.c                                     | 115 ---
 common/Kconfig                                |   2 +-
 common/board_r.c                              |   4 +-
 common/flash.c                                |  44 +-
 common/spl/Kconfig                            |   1 +
 common/usb_kbd.c                              |   2 +-
 configs/LicheePi_Zero_defconfig               |   2 +-
 configs/M5249EVB_defconfig                    |   2 +-
 configs/ad401_defconfig                       |   1 +
 configs/am335x_pdu001_defconfig               |   2 +-
 configs/am43xx_evm_defconfig                  |   1 +
 configs/am43xx_evm_qspiboot_defconfig         |   1 +
 configs/am43xx_evm_rtconly_defconfig          |   1 +
 configs/am43xx_evm_usbhost_boot_defconfig     |   1 +
 configs/am43xx_hs_evm_defconfig               |   1 +
 configs/am43xx_hs_evm_qspi_defconfig          |   1 +
 configs/am57xx_evm_defconfig                  |   1 +
 configs/am57xx_hs_evm_defconfig               |   1 +
 configs/am57xx_hs_evm_usb_defconfig           |   1 +
 configs/am62ax_evm_r5_defconfig               |   2 +-
 configs/am62px_evm_r5_defconfig               |   2 +-
 configs/am62x_beagleplay_r5_defconfig         |   2 +-
 configs/amcore_defconfig                      |   2 +-
 configs/anbernic-rgxx3-rk3566_defconfig       |   2 +-
 configs/ap143_defconfig                       |   2 +-
 configs/ap152_defconfig                       |   2 +-
 configs/apple_m1_defconfig                    |   2 +-
 configs/arndale_defconfig                     |   1 +
 configs/astro_mcf5373l_defconfig              |   2 +-
 configs/at91sam9rlek_dataflash_defconfig      |   2 +-
 configs/at91sam9rlek_mmc_defconfig            |   2 +-
 configs/at91sam9rlek_nandflash_defconfig      |   2 +-
 configs/bananapi-cm4-cm4io_defconfig          |   1 +
 configs/bananapi-m2-pro_defconfig             |   1 +
 configs/bananapi-m2s_defconfig                |   1 +
 configs/bananapi-m5_defconfig                 |   1 +
 configs/bcm7260_defconfig                     |   2 +-
 configs/bcm7445_defconfig                     |   2 +-
 configs/bcm968380gerg_ram_defconfig           |   2 +-
 configs/bcmns_defconfig                       |   2 +-
 configs/beelink-gsking-x_defconfig            |   1 +
 configs/beelink-gt1-ultimate_defconfig        |   1 +
 configs/beelink-gtking_defconfig              |   1 +
 configs/beelink-gtkingpro_defconfig           |   1 +
 configs/chromebook_samus_tpl_defconfig        |   2 +-
 configs/clearfog_defconfig                    |   1 +
 configs/clearfog_gt_8k_defconfig              |   1 +
 configs/clearfog_sata_defconfig               |   1 +
 configs/clearfog_spi_defconfig                |   1 +
 configs/cortina_presidio-asic-base_defconfig  |   2 +-
 configs/cortina_presidio-asic-pnand_defconfig |   2 +-
 configs/dra7xx_evm_defconfig                  |   1 +
 configs/dra7xx_hs_evm_defconfig               |   1 +
 configs/dra7xx_hs_evm_usb_defconfig           |   1 +
 configs/durian_defconfig                      |   2 +-
 configs/e850-96_defconfig                     |   2 +-
 configs/ea-lpc3250devkitv2_defconfig          |   2 +-
 configs/efi-x86_app32_defconfig               |   2 +-
 configs/efi-x86_app64_defconfig               |   2 +-
 configs/emsdp_defconfig                       |   2 +-
 configs/evb-ast2500_defconfig                 |   1 +
 configs/evb-ast2600_defconfig                 |   1 +
 configs/evb-px5_defconfig                     |   2 +-
 configs/generic-rk3568_defconfig              |   2 +-
 configs/generic-rk3588_defconfig              |   2 +-
 configs/hc2910_2aghd05_defconfig              |   2 +-
 configs/helios4_defconfig                     |   1 +
 configs/igep00x0_defconfig                    |   2 +-
 configs/imx6q_bosch_acc_defconfig             |   2 +-
 configs/imx6ulz_smm_m2_defconfig              |   2 +-
 configs/imx8mn_var_som_defconfig              |   1 +
 configs/iot_devkit_defconfig                  |   2 +-
 configs/jethub_j100_defconfig                 |   1 +
 configs/jethub_j80_defconfig                  |   1 +
 configs/khadas-vim2_defconfig                 |   1 +
 configs/khadas-vim3_defconfig                 |   1 +
 configs/khadas-vim3l_defconfig                |   1 +
 configs/khadas-vim_defconfig                  |   1 +
 configs/kontron-sl-mx6ul_defconfig            |   1 +
 configs/kontron-sl-mx8mm_defconfig            |   1 +
 configs/kontron_pitx_imx8m_defconfig          |   1 +
 configs/kontron_sl28_defconfig                |   1 +
 configs/legoev3_defconfig                     |   2 +-
 configs/libretech-ac_defconfig                |   1 +
 configs/libretech-cc_defconfig                |   1 +
 configs/libretech-cc_v2_defconfig             |   1 +
 configs/libretech-s905d-pc_defconfig          |   1 +
 configs/libretech-s912-pc_defconfig           |   1 +
 configs/marsboard_defconfig                   |   1 +
 configs/mk808_defconfig                       |   2 +-
 configs/mvebu_crb_cn9130_defconfig            |   1 +
 configs/mvebu_db_armada8k_defconfig           |   1 +
 configs/mvebu_db_cn9130_defconfig             |   1 +
 configs/mvebu_mcbin-88f8040_defconfig         |   1 +
 configs/mvebu_puzzle-m801-88f8040_defconfig   |   1 +
 configs/mx23evk_defconfig                     |   2 +-
 configs/mx28evk_defconfig                     |   2 +-
 configs/mx53cx9020_defconfig                  |   1 +
 configs/mx6cuboxi_defconfig                   |   1 +
 configs/mx6memcal_defconfig                   |   2 +-
 configs/mx6ulz_14x14_evk_defconfig            |   2 +-
 configs/mx7dsabresd_defconfig                 |   1 +
 configs/mx7dsabresd_qspi_defconfig            |   1 +
 configs/mx7ulp_com_defconfig                  |   2 +-
 configs/mx7ulp_evk_defconfig                  |   2 +-
 configs/mx7ulp_evk_plugin_defconfig           |   2 +-
 configs/myir_mys_6ulx_defconfig               |   1 +
 configs/nanopi-k2_defconfig                   |   1 +
 configs/netgear_cg3100d_ram_defconfig         |   2 +-
 configs/novena_defconfig                      |   1 +
 configs/nsim_700_defconfig                    |   2 +-
 configs/nsim_700be_defconfig                  |   2 +-
 configs/nsim_hs38be_defconfig                 |   2 +-
 configs/odroid-c2_defconfig                   |   1 +
 configs/odroid-c4_defconfig                   |   1 +
 configs/odroid-go-ultra_defconfig             |   1 +
 configs/odroid-hc4_defconfig                  |   1 +
 configs/odroid-n2_defconfig                   |   1 +
 configs/odroid-n2l_defconfig                  |   1 +
 configs/odroid-xu3_defconfig                  |   1 +
 configs/openpiton_riscv64_defconfig           |   2 +-
 configs/openpiton_riscv64_spl_defconfig       |   2 +-
 configs/origen_defconfig                      |   2 +-
 configs/p200_defconfig                        |   1 +
 configs/p201_defconfig                        |   1 +
 configs/p212_defconfig                        |   1 +
 configs/pe2201_defconfig                      |   2 +-
 configs/peach-pi_defconfig                    |   1 +
 configs/peach-pit_defconfig                   |   1 +
 configs/phycore_pcl063_defconfig              |   1 +
 configs/pico-dwarf-imx6ul_defconfig           |   1 +
 configs/pico-dwarf-imx7d_defconfig            |   1 +
 configs/pico-hobbit-imx6ul_defconfig          |   1 +
 configs/pico-hobbit-imx7d_defconfig           |   1 +
 configs/pico-imx6ul_defconfig                 |   1 +
 configs/pico-imx7d_bl33_defconfig             |   1 +
 configs/pico-imx7d_defconfig                  |   1 +
 configs/pico-nymph-imx7d_defconfig            |   1 +
 configs/pico-pi-imx6ul_defconfig              |   1 +
 configs/pico-pi-imx7d_defconfig               |   1 +
 configs/pinecube_defconfig                    |   2 +-
 configs/pm9261_defconfig                      |   2 +-
 configs/qemu_arm64_lwip_defconfig             |  10 +
 configs/radxa-zero2_defconfig                 |   1 +
 configs/radxa-zero_defconfig                  |   1 +
 configs/riotboard_defconfig                   |   1 +
 configs/s400_defconfig                        |   1 +
 configs/s5p4418_nanopi2_defconfig             |   2 +-
 configs/s5p_goni_defconfig                    |   2 +-
 configs/s5pc210_universal_defconfig           |   2 +-
 configs/sama5d27_giantboard_defconfig         |   2 +-
 configs/sama5d29_curiosity_mmc1_defconfig     |   2 +-
 configs/sama5d29_curiosity_mmc_defconfig      |   2 +-
 .../sama5d29_curiosity_qspiflash_defconfig    |   2 +-
 configs/sama7g54_curiosity_mmc_defconfig      |   2 +-
 .../sama7g54_curiosity_nandflash_defconfig    |   2 +-
 .../sama7g54_curiosity_qspiflash_defconfig    |   2 +-
 configs/seeed_npi_imx6ull_defconfig           |   1 +
 configs/sipeed_maix_bitm_defconfig            |   2 +-
 configs/sipeed_maix_smode_defconfig           |   2 +-
 configs/smdk5250_defconfig                    |   1 +
 configs/smdk5420_defconfig                    |   1 +
 configs/snow_defconfig                        |   1 +
 configs/spring_defconfig                      |   1 +
 configs/stemmy_defconfig                      |   2 +-
 configs/stm32f429-discovery_defconfig         |   2 +-
 configs/stm32f429-evaluation_defconfig        |   2 +-
 configs/stm32f469-discovery_defconfig         |   2 +-
 configs/stm32h743-disco_defconfig             |   2 +-
 configs/stm32h743-eval_defconfig              |   2 +-
 configs/stm32h750-art-pi_defconfig            |   2 +-
 configs/stm32mp25_defconfig                   |   2 +-
 configs/stmark2_defconfig                     |   2 +-
 configs/ten64_tfa_defconfig                   |   1 +
 configs/th1520_lpi4a_defconfig                |   2 +-
 configs/thunderx_88xx_defconfig               |   2 +-
 configs/tools-only_defconfig                  |  34 +-
 configs/topic_miami_defconfig                 |   2 +-
 configs/topic_miamilite_defconfig             |   2 +-
 configs/topic_miamiplus_defconfig             |   2 +-
 configs/total_compute_defconfig               |   2 +-
 configs/trats2_defconfig                      |   2 +-
 configs/trats_defconfig                       |   2 +-
 configs/turris_mox_defconfig                  |   1 +
 configs/turris_omnia_defconfig                |   1 +
 configs/u200_defconfig                        |   1 +
 configs/vexpress_aemv8a_juno_defconfig        |   1 +
 configs/vexpress_aemv8a_semi_defconfig        |   1 +
 configs/vexpress_aemv8r_defconfig             |   1 +
 configs/vexpress_ca9x4_defconfig              |   1 +
 configs/vexpress_fvp_defconfig                |   1 +
 configs/videostrong-kii-pro_defconfig         |   1 +
 configs/wandboard_defconfig                   |   1 +
 configs/wetek-core2_defconfig                 |   1 +
 configs/wetek-hub_defconfig                   |   1 +
 configs/wetek-play2_defconfig                 |   1 +
 configs/xenguest_arm64_defconfig              |   2 +-
 configs/xenguest_arm64_virtio_defconfig       |   2 +-
 configs/xilinx_versal_mini_defconfig          |   2 +-
 configs/xilinx_versal_mini_emmc0_defconfig    |   2 +-
 configs/xilinx_versal_mini_emmc1_defconfig    |   2 +-
 configs/xilinx_versal_mini_ospi_defconfig     |   2 +-
 configs/xilinx_versal_mini_qspi_defconfig     |   2 +-
 configs/xilinx_versal_net_mini_defconfig      |   2 +-
 configs/xilinx_versal_net_mini_emmc_defconfig |   2 +-
 configs/xilinx_versal_net_mini_ospi_defconfig |   2 +-
 configs/xilinx_versal_net_mini_qspi_defconfig |   2 +-
 configs/xilinx_zynqmp_mini_defconfig          |   2 +-
 configs/xilinx_zynqmp_mini_emmc0_defconfig    |   2 +-
 configs/xilinx_zynqmp_mini_emmc1_defconfig    |   2 +-
 configs/xilinx_zynqmp_mini_nand_defconfig     |   2 +-
 .../xilinx_zynqmp_mini_nand_single_defconfig  |   2 +-
 configs/xilinx_zynqmp_mini_qspi_defconfig     |   2 +-
 configs/zynq_cse_nand_defconfig               |   2 +-
 configs/zynq_cse_nor_defconfig                |   2 +-
 configs/zynq_cse_qspi_defconfig               |   2 +-
 drivers/dfu/Kconfig                           |   2 +
 drivers/fastboot/Kconfig                      |   1 +
 drivers/mtd/altera_qspi.c                     |   4 +-
 drivers/mtd/cfi_flash.c                       |  36 +-
 drivers/net/Kconfig                           |   4 +-
 drivers/net/fec_mxc.c                         |   3 +-
 drivers/net/fm/eth.c                          |   2 +
 drivers/net/phy/Kconfig                       |   3 +-
 drivers/usb/gadget/Kconfig                    |   3 +-
 include/flash.h                               |  20 +-
 include/net-common.h                          | 490 +++++++++
 include/net-legacy.h                          | 560 +++++++++++
 include/net-lwip.h                            |  41 +
 include/net.h                                 | 943 +-----------------
 lib/Makefile                                  |   2 +
 lib/lwip/Makefile                             |  55 +
 lib/lwip/lwip/src/apps/tftp/tftp.c            |  94 +-
 .../lwip/src/include/lwip/apps/tftp_client.h  |   1 +
 lib/lwip/u-boot/arch/cc.h                     |  45 +
 lib/lwip/u-boot/arch/sys_arch.h               |   0
 lib/lwip/u-boot/limits.h                      |   0
 lib/lwip/u-boot/lwipopts.h                    | 157 +++
 lib/tiny-printf.c                             |   3 +-
 net/Kconfig                                   |  81 +-
 net/Makefile                                  |  20 +-
 net/eth-uclass.c                              |  38 +-
 net/lwip/Kconfig                              |  44 +
 net/lwip/Makefile                             |   8 +
 net/lwip/dhcp.c                               | 134 +++
 net/lwip/dns.c                                | 127 +++
 net/lwip/eth_internal.h                       |  35 +
 net/lwip/net-lwip.c                           | 302 ++++++
 net/lwip/ping.c                               | 177 ++++
 net/lwip/tftp.c                               | 286 ++++++
 net/lwip/wget.c                               | 357 +++++++
 net/net-common.c                              |  13 +
 net/net.c                                     |  12 -
 net/wget.c                                    |  11 +-
 test/py/tests/test_efi_loader.py              |  62 +-
 test/py/tests/test_net_boot.py                |   2 +-
 293 files changed, 3704 insertions(+), 1437 deletions(-)
 create mode 100644 cmd/net-common.c
 create mode 100644 cmd/net-lwip.c
 create mode 100644 configs/qemu_arm64_lwip_defconfig
 create mode 100644 include/net-common.h
 create mode 100644 include/net-legacy.h
 create mode 100644 include/net-lwip.h
 create mode 100644 lib/lwip/Makefile
 create mode 100644 lib/lwip/u-boot/arch/cc.h
 create mode 100644 lib/lwip/u-boot/arch/sys_arch.h
 create mode 100644 lib/lwip/u-boot/limits.h
 create mode 100644 lib/lwip/u-boot/lwipopts.h
 create mode 100644 net/lwip/Kconfig
 create mode 100644 net/lwip/Makefile
 create mode 100644 net/lwip/dhcp.c
 create mode 100644 net/lwip/dns.c
 create mode 100644 net/lwip/eth_internal.h
 create mode 100644 net/lwip/net-lwip.c
 create mode 100644 net/lwip/ping.c
 create mode 100644 net/lwip/tftp.c
 create mode 100644 net/lwip/wget.c
 create mode 100644 net/net-common.c
Signature · 1 line
2.40.1
#1 lore raw

PATCH v9 1/37 Makefile: detect HOST_ARCH properly when CROSS_COMPILE is multi-word

When CROSS_COMPILE contains multiple words, HOST_ARCH is not properly detected and the sandbox build fail. It typically happens when using ccache. For example:

 $ make sandbox_defconfig
 $ make CROSS_COMPILE="ccache x86_64-linux-gnu-" \
        CC="ccache x86_64-linux-gnu-gcc"
 [...]
 In file included from boot/bootmeth_efi.c:16:
 include/efi_default_filename.h:33:2: error: #error Unsupported UEFI architecture
    33 | #error Unsupported UEFI architecture
       |  ^~~~~

A similar error occurs when the build is done via buildman and ~/.buildman contains:

[toolchain-wrapper]
wrapper = ccache

Fix the issue by considering only the last word in $(CROSS_COMPILE).

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index f90e48f58a5..dc7bdd79420 100644
@@ -21,7 +21,7 @@ include include/host_arch.h
 ifeq ("", "$(CROSS_COMPILE)")
   MK_ARCH="${shell uname -m}"
 else
-  MK_ARCH="${shell echo $(CROSS_COMPILE) | sed -n 's/^[[:space:]]*\([^\/]*\/\)*\([^-]*\)-[^[:space:]]*/\2/p'}"
+  MK_ARCH="${shell echo ${lastword $(CROSS_COMPILE)} | sed -n 's/^[[:space:]]*\([^\/]*\/\)*\([^-]*\)-[^[:space:]]*/\2/p'}"
 endif
 unexport HOST_ARCH
 ifeq ("x86_64", $(MK_ARCH))
Signature · 1 line
2.40.1
#2 lore raw

PATCH v9 2/37 flash: prefix error codes with FL_

In reply to Jerome Forissier

Prefix the flash status codes (ERR_*) with FL_ in order to avoid clashes with third-party libraries. Case in point: including the lwIP library header file <lwip/err.h> which defines err_enum_t as an enum with values being ERR_*.

---
 board/cobra5272/flash.c           | 26 +++++++++---------
 board/freescale/m5253demo/flash.c |  6 ++---
 common/flash.c                    | 44 +++++++++++++++----------------
 drivers/mtd/cfi_flash.c           | 36 ++++++++++++-------------
 include/flash.h                   | 20 +++++++-------
 5 files changed, 66 insertions(+), 66 deletions(-)
board/cobra5272/flash.c +13 -13
index 616842e62f4..d324aa6ac11 100644
@@ -135,22 +135,22 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
 {
 	ulong result;
 	int iflag, cflag, prot, sect;
-	int rc = ERR_OK;
+	int rc = FL_ERR_OK;
 	int chip1;
 	ulong start;
 
 	/* first look for protection bits */
 
 	if (info->flash_id == FLASH_UNKNOWN)
-		return ERR_UNKNOWN_FLASH_TYPE;
+		return FL_ERR_UNKNOWN_FLASH_TYPE;
 
 	if ((s_first < 0) || (s_first > s_last)) {
-		return ERR_INVAL;
+		return FL_ERR_INVAL;
 	}
 
 	if ((info->flash_id & FLASH_VENDMASK) !=
 	    (AMD_MANUFACT & FLASH_VENDMASK)) {
-		return ERR_UNKNOWN_FLASH_VENDOR;
+		return FL_ERR_UNKNOWN_FLASH_VENDOR;
 	}
 
 	prot = 0;
@@ -160,7 +160,7 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
 		}
 	}
 	if (prot)
-		return ERR_PROTECTED;
+		return FL_ERR_PROTECTED;
 
 	/*
 	 * Disable interrupts which might cause a timeout
@@ -217,11 +217,11 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
 			MEM_FLASH_ADDR1 = CMD_READ_ARRAY;
 
 			if (chip1 == ERR) {
-				rc = ERR_PROG_ERROR;
+				rc = FL_ERR_PROG_ERROR;
 				goto outahere;
 			}
 			if (chip1 == TMO) {
-				rc = ERR_TIMEOUT;
+				rc = FL_ERR_TIMEOUT;
 				goto outahere;
 			}
 
@@ -252,7 +252,7 @@ static int write_word(flash_info_t *info, ulong dest, ulong data)
 {
 	volatile u16 *addr = (volatile u16 *) dest;
 	ulong result;
-	int rc = ERR_OK;
+	int rc = FL_ERR_OK;
 	int cflag, iflag;
 	int chip1;
 	ulong start;
@@ -262,7 +262,7 @@ static int write_word(flash_info_t *info, ulong dest, ulong data)
 	 */
 	result = *addr;
 	if ((result & data) != data)
-		return ERR_NOT_ERASED;
+		return FL_ERR_NOT_ERASED;
 
 	/*
 	 * Disable interrupts which might cause a timeout
@@ -302,7 +302,7 @@ static int write_word(flash_info_t *info, ulong dest, ulong data)
 	*addr = CMD_READ_ARRAY;
 
 	if (chip1 == ERR || *addr != data)
-		rc = ERR_PROG_ERROR;
+		rc = FL_ERR_PROG_ERROR;
 
 	if (iflag)
 		enable_interrupts();
@@ -320,13 +320,13 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
 
 	if (addr & 1) {
 		printf ("unaligned destination not supported\n");
-		return ERR_ALIGN;
+		return FL_ERR_ALIGN;
 	}
 
 #if 0
 	if (cnt & 1) {
 		printf ("odd transfer sizes not supported\n");
-		return ERR_ALIGN;
+		return FL_ERR_ALIGN;
 	}
 #endif
 
@@ -364,5 +364,5 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
 		cnt -= 1;
 	}
 
-	return ERR_OK;
+	return FL_ERR_OK;
 }
board/freescale/m5253demo/flash.c +3 -3
index 334518a4bc9..ab5d2ebff64 100644
@@ -72,7 +72,7 @@ int flash_get_offsets(ulong base, flash_info_t * info)
 		}
 	}
 
-	return ERR_OK;
+	return FL_ERR_OK;
 }
 
 void flash_print_info(flash_info_t * info)
@@ -369,9 +369,9 @@ int write_buff(flash_info_t * info, uchar * src, ulong addr, ulong cnt)
 	}
 
 	if (cnt == 0)
-		return ERR_OK;
+		return FL_ERR_OK;
 
-	return ERR_OK;
+	return FL_ERR_OK;
 }
 
 /*-----------------------------------------------------------------------
common/flash.c +22 -22

97 lines not on this page · raw message

drivers/mtd/cfi_flash.c +18 -18
index a7826e81c17..e50502824ac 100644
@@ -593,11 +593,11 @@ static int flash_status_check(flash_info_t *info, flash_sect_t sector,
 			       flash_read_long(info, sector, 0));
 			flash_write_cmd(info, sector, 0, info->cmd_reset);
 			udelay(1);
-			return ERR_TIMEOUT;
+			return FL_ERR_TIMEOUT;
 		}
 		udelay(1);		/* also triggers watchdog */
 	}
-	return ERR_OK;
+	return FL_ERR_OK;
 }
 
 /*-----------------------------------------------------------------------
@@ -616,9 +616,9 @@ static int flash_full_status_check(flash_info_t *info, flash_sect_t sector,
 	case CFI_CMDSET_INTEL_PROG_REGIONS:
 	case CFI_CMDSET_INTEL_EXTENDED:
 	case CFI_CMDSET_INTEL_STANDARD:
-		if (retcode == ERR_OK &&
+		if (retcode == FL_ERR_OK &&
 		    !flash_isset(info, sector, 0, FLASH_STATUS_DONE)) {
-			retcode = ERR_INVAL;
+			retcode = FL_ERR_INVAL;
 			printf("Flash %s error at address %lx\n", prompt,
 			       info->start[sector]);
 			if (flash_isset(info, sector, 0, FLASH_STATUS_ECLBS |
@@ -627,14 +627,14 @@ static int flash_full_status_check(flash_info_t *info, flash_sect_t sector,
 			} else if (flash_isset(info, sector, 0,
 						FLASH_STATUS_ECLBS)) {
 				puts("Block Erase Error.\n");
-				retcode = ERR_NOT_ERASED;
+				retcode = FL_ERR_NOT_ERASED;
 			} else if (flash_isset(info, sector, 0,
 						FLASH_STATUS_PSLBS)) {
 				puts("Locking Error\n");
 			}
 			if (flash_isset(info, sector, 0, FLASH_STATUS_DPS)) {
 				puts("Block locked.\n");
-				retcode = ERR_PROTECTED;
+				retcode = FL_ERR_PROTECTED;
 			}
 			if (flash_isset(info, sector, 0, FLASH_STATUS_VPENS))
 				puts("Vpp Low Error.\n");
@@ -702,12 +702,12 @@ static int flash_status_poll(flash_info_t *info, void *src, void *dst,
 		if (get_timer(start) > tout) {
 			printf("Flash %s timeout at address %lx data %lx\n",
 			       prompt, (ulong)dst, (ulong)flash_read8(dst));
-			return ERR_TIMEOUT;
+			return FL_ERR_TIMEOUT;
 		}
 		udelay(1);		/* also triggers watchdog */
 	}
 #endif /* CONFIG_SYS_CFI_FLASH_STATUS_POLL */
-	return ERR_OK;
+	return FL_ERR_OK;
 }
 
 /*-----------------------------------------------------------------------
@@ -810,7 +810,7 @@ static int flash_write_cfiword(flash_info_t *info, ulong dest, cfiword_t cword)
 		break;
 	}
 	if (!flag)
-		return ERR_NOT_ERASED;
+		return FL_ERR_NOT_ERASED;
 
 	/* Disable interrupts which might cause a timeout here */
 	flag = disable_interrupts();
@@ -899,7 +899,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp,
 		shift = 3;
 		break;
 	default:
-		retcode = ERR_INVAL;
+		retcode = FL_ERR_INVAL;
 		goto out_unmap;
 	}
 
@@ -930,7 +930,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp,
 		}
 	}
 	if (!flag) {
-		retcode = ERR_NOT_ERASED;
+		retcode = FL_ERR_NOT_ERASED;
 		goto out_unmap;
 	}
 
@@ -950,7 +950,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp,
 		retcode = flash_status_check(info, sector,
 					     info->buffer_write_tout,
 					     "write to buffer");
-		if (retcode == ERR_OK) {
+		if (retcode == FL_ERR_OK) {
 			/* reduce the number of loops by the width of
 			 * the port
 			 */
@@ -975,7 +975,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp,
 					src += 8, dst += 8;
 					break;
 				default:
-					retcode = ERR_INVAL;
+					retcode = FL_ERR_INVAL;
 					goto out_unmap;
 				}
 			}
@@ -1025,7 +1025,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp,
 			}
 			break;
 		default:
-			retcode = ERR_INVAL;
+			retcode = FL_ERR_INVAL;
 			goto out_unmap;
 		}
 
@@ -1043,7 +1043,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp,
 
 	default:
 		debug("Unknown Command Set\n");
-		retcode = ERR_INVAL;
+		retcode = FL_ERR_INVAL;
 		break;
 	}
 
@@ -1389,7 +1389,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
 		if (i > cnt)
 			i = cnt;
 		rc = flash_write_cfibuffer(info, wp, src, i);
-		if (rc != ERR_OK)
+		if (rc != FL_ERR_OK)
 			return rc;
 		i -= i & (info->portwidth - 1);
 		wp += i;
@@ -1398,7 +1398,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
 		FLASH_SHOW_PROGRESS(scale, dots, digit, i);
 		/* Only check every once in a while */
 		if ((cnt & 0xFFFF) < buffered_size && ctrlc())
-			return ERR_ABORTED;
+			return FL_ERR_ABORTED;
 	}
 #else
 	while (cnt >= info->portwidth) {
@@ -1413,7 +1413,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
 		FLASH_SHOW_PROGRESS(scale, dots, digit, info->portwidth);
 		/* Only check every once in a while */
 		if ((cnt & 0xFFFF) < info->portwidth && ctrlc())
-			return ERR_ABORTED;
+			return FL_ERR_ABORTED;
 	}
 #endif /* CONFIG_SYS_FLASH_USE_BUFFER_WRITE */
 
include/flash.h +10 -10
index 60babe8a805..32bc65e7b60 100644
@@ -127,16 +127,16 @@ void flash_perror(int err);
 /*-----------------------------------------------------------------------
  * return codes from flash_write():
  */
-#define ERR_OK				0
-#define ERR_TIMEOUT			1
-#define ERR_NOT_ERASED			2
-#define ERR_PROTECTED			4
-#define ERR_INVAL			8
-#define ERR_ALIGN			16
-#define ERR_UNKNOWN_FLASH_VENDOR	32
-#define ERR_UNKNOWN_FLASH_TYPE		64
-#define ERR_PROG_ERROR			128
-#define ERR_ABORTED			256
+#define FL_ERR_OK			0
+#define FL_ERR_TIMEOUT			1
+#define FL_ERR_NOT_ERASED		2
+#define FL_ERR_PROTECTED		4
+#define FL_ERR_INVAL			8
+#define FL_ERR_ALIGN			16
+#define FL_ERR_UNKNOWN_FLASH_VENDOR	32
+#define FL_ERR_UNKNOWN_FLASH_TYPE	64
+#define FL_ERR_PROG_ERROR		128
+#define FL_ERR_ABORTED			256
 
 /*-----------------------------------------------------------------------
  * Protection Flags for flash_protect():
Signature · 1 line
2.40.1
#3 lore raw

PATCH v9 3/37 at91: rename mem_init() to at91_mem_init()

In reply to Jerome Forissier

THe AT91-based platforms have a mem_init() function declared in arch/arm/mach-at91/include/mach/at91_common.h and implemented in various places. In preparation of the introduction of the lwIP networking library which also has a global mem_init() function, rename the AT91 one to at91_mem_init().

---
 arch/arm/mach-at91/include/mach/at91_common.h       | 2 +-
 arch/arm/mach-at91/spl_at91.c                       | 2 +-
 arch/arm/mach-at91/spl_atmel.c                      | 2 +-
 board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c     | 2 +-
 board/atmel/at91sam9n12ek/at91sam9n12ek.c           | 2 +-
 board/atmel/at91sam9x5ek/at91sam9x5ek.c             | 2 +-
 board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c     | 2 +-
 board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c | 2 +-
 board/atmel/sama5d2_icp/sama5d2_icp.c               | 2 +-
 board/atmel/sama5d2_xplained/sama5d2_xplained.c     | 2 +-
 board/atmel/sama5d3_xplained/sama5d3_xplained.c     | 2 +-
 board/atmel/sama5d3xek/sama5d3xek.c                 | 2 +-
 board/atmel/sama5d4_xplained/sama5d4_xplained.c     | 2 +-
 board/atmel/sama5d4ek/sama5d4ek.c                   | 2 +-
 board/conclusive/kstr-sama5d27/kstr-sama5d27.c      | 2 +-
 board/gardena/smart-gateway-at91sam/spl.c           | 2 +-
 board/siemens/corvus/board.c                        | 2 +-
 board/siemens/smartweb/smartweb.c                   | 2 +-
 board/siemens/taurus/taurus.c                       | 2 +-
 19 files changed, 19 insertions(+), 19 deletions(-)
arch/arm/mach-at91/include/mach/at91_common.h +1 -1
index 683e539b1b3..8fec346c1e4 100644
@@ -28,7 +28,7 @@ void at91_pllb_init(u32 pllar);
 void at91_mck_init(u32 mckr);
 void at91_mck_init_down(u32 mckr);
 void at91_pmc_init(void);
-void mem_init(void);
+void at91_mem_init(void);
 void at91_phy_reset(void);
 void at91_sdram_hw_init(void);
 void at91_mck_init(u32 mckr);
arch/arm/mach-at91/spl_at91.c +1 -1
index cde1700a283..0d1233cd109 100644
@@ -142,7 +142,7 @@ void board_init_f(ulong dummy)
 	preloader_console_init();
 #endif
 
-	mem_init();
+	at91_mem_init();
 
 	at91_spl_board_init();
 }
arch/arm/mach-at91/spl_atmel.c +1 -1
index 62a7df8a195..7bfbadf0483 100644
@@ -134,7 +134,7 @@ void board_init_f(ulong dummy)
 
 	board_early_init_f();
 
-	mem_init();
+	at91_mem_init();
 
 	ret = spl_init();
 	if (ret) {
board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c +1 -1
index 3bd94d0889d..af486e977e5 100644
@@ -125,7 +125,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2)
 		      2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
 }
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	struct atmel_mpddrc_config ddr2;
 
board/atmel/at91sam9n12ek/at91sam9n12ek.c +1 -1
index afc0c0520e1..6f9abcbb127 100644
@@ -167,7 +167,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2)
 		      2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
 }
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
 	struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
board/atmel/at91sam9x5ek/at91sam9x5ek.c +1 -1
index e5688c6cf13..f52b9a97731 100644
@@ -181,7 +181,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2)
 		      2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
 }
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
 	struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c +1 -1
index 36995a927cf..cb3cd7ac9ae 100644
@@ -146,7 +146,7 @@ static void ddrc_conf(struct atmel_mpddrc_config *ddrc)
 		      (8 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET));
 }
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
 	struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC;
board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c +1 -1
index c775d593e58..15cbd0daa6f 100644
@@ -208,7 +208,7 @@ static void ddrc_conf(struct atmel_mpddrc_config *ddrc)
 	ddrc->cal_mr4 |= ATMEL_MPDDRC_CAL_MR4_MR4R(0xFFFE);
 }
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
 	struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC;
board/atmel/sama5d2_icp/sama5d2_icp.c +1 -1
index 986da01639f..6f0d578abf7 100644
@@ -180,7 +180,7 @@ static void ddrc_conf(struct atmel_mpddrc_config *ddrc)
 		      (7 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET));
 }
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
 	struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC;
board/atmel/sama5d2_xplained/sama5d2_xplained.c +1 -1
index c8a8eb49826..d104736fa7c 100644
@@ -146,7 +146,7 @@ static void ddrc_conf(struct atmel_mpddrc_config *ddrc)
 		      7 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET);
 }
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
 	struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC;
board/atmel/sama5d3_xplained/sama5d3_xplained.c +1 -1
index 54cc3c4d900..f98322fb540 100644
@@ -175,7 +175,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2)
 		      8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
 }
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	struct atmel_mpddrc_config ddr2;
 
board/atmel/sama5d3xek/sama5d3xek.c +1 -1
index f2e1242fcb0..28079a81517 100644
@@ -241,7 +241,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2)
 		      8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
 }
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	struct atmel_mpddrc_config ddr2;
 
board/atmel/sama5d4_xplained/sama5d4_xplained.c +1 -1
index 09ca16ca88c..f9112fc5321 100644
@@ -184,7 +184,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2)
 		      8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
 }
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	struct atmel_mpddrc_config ddr2;
 
board/atmel/sama5d4ek/sama5d4ek.c +1 -1
index 1f8b85f0614..0bdc6adbdc8 100644
@@ -169,7 +169,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2)
 		      8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
 }
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	struct atmel_mpddrc_config ddr2;
 	const struct atmel_mpddr *mpddr = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC;
board/conclusive/kstr-sama5d27/kstr-sama5d27.c +1 -1
index 64282ae9dc7..37750137ad9 100644
@@ -182,7 +182,7 @@ static void ddrc_conf(struct atmel_mpddrc_config *ddrc)
 		      (8 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET));
 }
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
 	struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC;
board/gardena/smart-gateway-at91sam/spl.c +1 -1
index fb3ec48f9c5..db9ba881884 100644
@@ -110,7 +110,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2)
 		      2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
 }
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
 	struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
board/siemens/corvus/board.c +1 -1
index 7d73d1f2b36..cd27fc1cc37 100644
@@ -187,7 +187,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2)
 		      2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET);
 }
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	struct atmel_mpddrc_config ddr2;
 
board/siemens/smartweb/smartweb.c +1 -1
index 946fbc3f229..e9e4bc348cb 100644
@@ -238,7 +238,7 @@ void at91_spl_board_init(void)
 			 | AT91_SDRAMC_TRP_VAL(2) | AT91_SDRAMC_TRCD_VAL(2) \
 			 | AT91_SDRAMC_TRAS_VAL(5) | AT91_SDRAMC_TXSR_VAL(8))
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	struct at91_matrix *ma = (struct at91_matrix *)ATMEL_BASE_MATRIX;
 	struct at91_port *port = (struct at91_port *)ATMEL_BASE_PIOC;
board/siemens/taurus/taurus.c +1 -1
index bda12a97708..3764ab48ab3 100644
@@ -177,7 +177,7 @@ void sdramc_configure(unsigned int mask)
 	sdramc_initialize(ATMEL_BASE_CS1, &setting);
 }
 
-void mem_init(void)
+void at91_mem_init(void)
 {
 	unsigned int ram_size = 0;
 
Signature · 1 line
2.40.1
#4 lore raw

PATCH v9 4/37 arm: omap2: add missing #include <netdev.h>

In reply to Jerome Forissier

emac.c implements cpu_eth_init() so it needs to pull the corresponding header file.

---
 arch/arm/mach-omap2/omap3/emac.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-omap2/omap3/emac.c +1 -0
index 7348e92cabd..1e30a06361d 100644
@@ -9,6 +9,7 @@
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/am35x_def.h>
+#include <netdev.h>
 
 /*
  * Initializes on-chip ethernet controllers.
Signature · 1 line
2.40.1
#6 lore raw

PATCH v9 5/37 net: fm: call dtsec_init_phy() only when it is defined

In reply to Jerome Forissier

dtsec_init_phy() is defined only with MII so add the proper conditional in the caller code.

---
 drivers/net/fm/eth.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/fm/eth.c +2 -0
index 19f3f0fef07..e4ec7696939 100644
@@ -701,8 +701,10 @@ static int init_phy(struct fm_eth *fm_eth)
 		supported |= SUPPORTED_2500baseX_Full;
 #endif
 
+#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) && !defined(BITBANGMII)
 	if (fm_eth->type == FM_ETH_1G_E)
 		dtsec_init_phy(fm_eth);
+#endif
 
 #ifdef CONFIG_PHYLIB
 #ifdef CONFIG_DM_MDIO
Signature · 1 line
2.40.1
#7 lore raw

PATCH v9 6/37 net: wget: removed unused function wget_success()

In reply to Jerome Forissier

wget_success() is used nowhere so remove it.

---
 net/wget.c | 7 -------
 1 file changed, 7 deletions(-)
net/wget.c +0 -7
index f1dd7abeff6..0e4dc5159d0 100644
@@ -199,13 +199,6 @@ void wget_fail(char *error_message, unsigned int tcp_seq_num,
 	wget_send(action, tcp_seq_num, tcp_ack_num, 0);
 }
 
-void wget_success(u8 action, unsigned int tcp_seq_num,
-		  unsigned int tcp_ack_num, int len, int packets)
-{
-	printf("Packets received %d, Transfer Successful\n", packets);
-	wget_send(action, tcp_seq_num, tcp_ack_num, len);
-}
-
 /*
  * Interfaces of U-BOOT
  */
Signature · 1 line
2.40.1
#8 lore raw

PATCH v9 7/37 net: phy: ncsi: depend on NET

In reply to Jerome Forissier

PHY_NCSI enables drivers/net/phy/ncsi.c which calls net_loop() and net_set_timeout_handler(). That's the legacy NET stack (as opposed to NET_LWIP). Therefore add the dependency to Kconfig.

---
 drivers/net/phy/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/net/phy/Kconfig +1 -0
index 73064b2af68..a9efc509814 100644
@@ -368,6 +368,7 @@ config PHY_FIXED
 
 config PHY_NCSI
 	bool "NC-SI based PHY"
+	depends on NET
 
 endif #PHYLIB
 
Signature · 1 line
2.40.1
#9 lore raw

PATCH v9 8/37 net: ftgmac100: depend on NET

In reply to Jerome Forissier

FTGMAC100 enables drivers/net/ftgmac100.c which uses PHY_INTERFACE_MODE_NCSI, which is defined only when PHY_NCSI is enabled. Therefore FTGMAC100 depends on PHY_NCSI. However adding such a dependency causes a "recursive dependency detected!" message, so add a dependency on NET instead (PHY_NCSI depends on NET). All in all, either the stack is NET and FTGMAC100 can be enabled, or it is NET_LWIP (or NO_NET) and it cannot.

---
 drivers/net/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/net/Kconfig +1 -0
index 69ae7c07508..3382e533f42 100644
@@ -461,6 +461,7 @@ config FTMAC100
 config FTGMAC100
 	bool "Ftgmac100 Ethernet Support"
 	select PHYLIB
+	depends on NET
 	help
 	  This driver supports the Faraday's FTGMAC100 Gigabit SoC
 	  Ethernet controller that can be found on Aspeed SoCs (which
Signature · 1 line
2.40.1
#10 lore raw

PATCH v9 9/37 net: wget: allow EFI boot

In reply to Jerome Forissier

wget followed by bootefi currently fails as follows:

U-Boot> wget 200000 192.168.0.30:helloworld.efi
Waiting for Ethernet connection... done.
HTTP/1.0 200 OK
Packets received 13, Transfer Successful
Bytes transferred = 12720 (31b0 hex)
U-Boot> bootefi 200000
No UEFI binary known at 200000
U-Boot>

Fix the problem by adding the missing efi_set_bootdev() call.

---
 net/wget.c | 4 ++++
 1 file changed, 4 insertions(+)
net/wget.c +4 -0
index 0e4dc5159d0..cf7681a4e79 100644
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <display_options.h>
 #include <env.h>
+#include <efi_loader.h>
 #include <image.h>
 #include <lmb.h>
 #include <mapmem.h>
@@ -429,6 +430,9 @@ static void wget_handler(uchar *pkt, u16 dport,
 	case WGET_TRANSFERRED:
 		printf("Packets received %d, Transfer Successful\n", packets);
 		net_set_state(wget_loop_state);
+		efi_set_bootdev("Net", "", image_url,
+				map_sysmem(image_load_addr, 0),
+				net_boot_file_size);
 		break;
 	}
 }
Signature · 1 line
2.40.1
#11 lore raw

PATCH v9 10/37 net: fec_mxc_init(): do not ignore return status of fec_open()

In reply to Jerome Forissier

The fec_mxc_init() function currently always returns 0. This does not allow the callers to detect when for instance the PHY initialization failed due to the port being unconnected. Fix that by returning the status of fec_open().

---
 drivers/net/fec_mxc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/fec_mxc.c +1 -2
index 0a0d92bc2cd..2dc1364beec 100644
@@ -615,8 +615,7 @@ static int fecmxc_init(struct udevice *dev)
 	if (fec->xcv_type != SEVENWIRE)
 		miiphy_restart_aneg(dev);
 #endif
-	fec_open(dev);
-	return 0;
+	return fec_open(dev);
 }
 
 /**
Signature · 1 line
2.40.1
#12 lore raw

PATCH v9 11/37 test/py: net_boot: fix comment

In reply to Jerome Forissier

If env__pxe_boot_test_skip is not present, it defaults to True not False. Therefore fix the comment.

---
 test/py/tests/test_net_boot.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
test/py/tests/test_net_boot.py +1 -1
index 63309fe82e1..d7d74356928 100644
@@ -75,7 +75,7 @@ env__net_pxe_bootable_file = {
     'check_pattern': 'ERROR',
 }
 
-# False or omitted if a PXE boot test should be tested.
+# False if a PXE boot test should be tested.
 # If PXE boot testing is not possible or desired, set this variable to True.
 # For example: If pxe configuration file is not proper to boot
 env__pxe_boot_test_skip = False
Signature · 1 line
2.40.1
#13 lore raw

PATCH v9 12/37 test/py: test_efi_loader: add missing dependency on cmd_tftpboot

In reply to Jerome Forissier

test_efi_helloworld_net() and test_efi_grub_net() depend on cmd_tftpboot so add the missing annotations.

---
 test/py/tests/test_efi_loader.py | 2 ++
 1 file changed, 2 insertions(+)
test/py/tests/test_efi_loader.py +2 -0
index 85473a9049b..7c1e0ffa594 100644
@@ -149,6 +149,7 @@ def fetch_tftp_file(u_boot_console, env_conf):
 
 @pytest.mark.buildconfigspec('of_control')
 @pytest.mark.buildconfigspec('cmd_bootefi_hello_compile')
[email protected]('cmd_tftpboot')
 def test_efi_helloworld_net(u_boot_console):
     """Run the helloworld.efi binary via TFTP.
 
@@ -178,6 +179,7 @@ def test_efi_helloworld_builtin(u_boot_console):
 
 @pytest.mark.buildconfigspec('of_control')
 @pytest.mark.buildconfigspec('cmd_bootefi')
[email protected]('cmd_tftpboot')
 def test_efi_grub_net(u_boot_console):
     """Run the grub.efi binary via TFTP.
 
Signature · 1 line
2.40.1
#14 lore raw

PATCH v9 13/37 test/py: test_efi_loader: add HTTP (wget) test for the EFI loader

In reply to Jerome Forissier

Add a test to test_efi_loader.py similar to the TFTP test but for HTTP with the wget command.

---
 test/py/tests/test_efi_loader.py | 62 +++++++++++++++++++++++---------
 1 file changed, 46 insertions(+), 16 deletions(-)
test/py/tests/test_efi_loader.py +46 -16
index 7c1e0ffa594..5f3b448a066 100644
@@ -45,11 +45,18 @@ env__efi_loader_helloworld_file = {
     'crc32': 'c2244b26',                   # CRC32 check sum
     'addr': 0x40400000,                    # load address
 }
+
+# False if the helloworld EFI over HTTP boot test should be performed.
+# If HTTP boot testing is not possible or desired, set this variable to True or
+# ommit it.
+env__efi_helloworld_net_http_test_skip = True
 """
 
 import pytest
 import u_boot_utils
 
+PROTO_TFTP, PROTO_HTTP = range(0, 2)
+
 net_set_up = False
 
 def test_efi_pre_commands(u_boot_console):
@@ -110,10 +117,10 @@ def test_efi_setup_static(u_boot_console):
     global net_set_up
     net_set_up = True
 
-def fetch_tftp_file(u_boot_console, env_conf):
-    """Grab an env described file via TFTP and return its address
+def fetch_file(u_boot_console, env_conf, proto):
+    """Grab an env described file via TFTP or HTTP and return its address
 
-    A file as described by an env config <env_conf> is downloaded from the TFTP
+    A file as described by an env config <env_conf> is downloaded from the
     server. The address to that file is returned.
     """
     if not net_set_up:
@@ -128,7 +135,13 @@ def fetch_tftp_file(u_boot_console, env_conf):
         addr = u_boot_utils.find_ram_base(u_boot_console)
 
     fn = f['fn']
-    output = u_boot_console.run_command('tftpboot %x %s' % (addr, fn))
+    if proto == PROTO_TFTP:
+        cmd = 'tftpboot'
+    elif proto == PROTO_HTTP:
+        cmd = 'wget'
+    else:
+        assert False
+    output = u_boot_console.run_command('%s %x %s' % (cmd, addr, fn))
     expected_text = 'Bytes transferred = '
     sz = f.get('size', None)
     if sz:
@@ -147,17 +160,8 @@ def fetch_tftp_file(u_boot_console, env_conf):
 
     return addr
 
[email protected]('of_control')
[email protected]('cmd_bootefi_hello_compile')
[email protected]('cmd_tftpboot')
-def test_efi_helloworld_net(u_boot_console):
-    """Run the helloworld.efi binary via TFTP.
-
-    The helloworld.efi file is downloaded from the TFTP server and is executed
-    using the fallback device tree at $fdtcontroladdr.
-    """
-
-    addr = fetch_tftp_file(u_boot_console, 'env__efi_loader_helloworld_file')
+def do_test_efi_helloworld_net(u_boot_console, proto):
+    addr = fetch_file(u_boot_console, 'env__efi_loader_helloworld_file', proto)
 
     output = u_boot_console.run_command('bootefi %x' % addr)
     expected_text = 'Hello, world'
@@ -165,6 +169,32 @@ def test_efi_helloworld_net(u_boot_console):
     expected_text = '## Application failed'
     assert expected_text not in output
 
[email protected]('of_control')
[email protected]('cmd_bootefi_hello_compile')
[email protected]('cmd_tftpboot')
+def test_efi_helloworld_net_tftp(u_boot_console):
+    """Run the helloworld.efi binary via TFTP.
+
+    The helloworld.efi file is downloaded from the TFTP server and is executed
+    using the fallback device tree at $fdtcontroladdr.
+    """
+
+    do_test_efi_helloworld_net(u_boot_console, PROTO_TFTP);
+
[email protected]('of_control')
[email protected]('cmd_bootefi_hello_compile')
[email protected]('cmd_wget')
+def test_efi_helloworld_net_http(u_boot_console):
+    """Run the helloworld.efi binary via HTTP.
+
+    The helloworld.efi file is downloaded from the HTTP server and is executed
+    using the fallback device tree at $fdtcontroladdr.
+    """
+    if u_boot_console.config.env.get('env__efi_helloworld_net_http_test_skip', True):
+        pytest.skip('helloworld.efi HTTP test is not enabled!')
+
+    do_test_efi_helloworld_net(u_boot_console, PROTO_HTTP);
+
 @pytest.mark.buildconfigspec('cmd_bootefi_hello')
 def test_efi_helloworld_builtin(u_boot_console):
     """Run the builtin helloworld.efi binary.
@@ -187,7 +217,7 @@ def test_efi_grub_net(u_boot_console):
     executed.
     """
 
-    addr = fetch_tftp_file(u_boot_console, 'env__efi_loader_grub_file')
+    addr = fetch_file(u_boot_console, 'env__efi_loader_grub_file', PROTO_TFTP)
 
     u_boot_console.run_command('bootefi %x' % addr, wait_for_prompt=False)
 
Signature · 1 line
2.40.1
#15 lore raw

PATCH v9 14/37 net: introduce alternative implementation as net-lwip/

In reply to Jerome Forissier

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.

Other adjustments to Kconfig files are made to fix "unmet direct dependencies detected" for USB_FUNCTION_SDP and CMD_FASTBOOT when the default networking stack is set to NET_LWIP ("default NET_LWIP" instead of "default NET" in Kconfig).

---
 Kconfig                    | 30 +++++++++++++++++++
 boot/Kconfig               |  1 +
 cmd/Kconfig                |  1 +
 common/Kconfig             |  2 +-
 common/spl/Kconfig         |  1 +
 drivers/dfu/Kconfig        |  1 +
 drivers/fastboot/Kconfig   |  1 +
 drivers/net/Kconfig        |  1 +
 drivers/net/phy/Kconfig    |  2 +-
 drivers/usb/gadget/Kconfig |  2 +-
 net/Kconfig                | 61 +++++++++++++++++++-------------------
 net/Makefile               |  4 +++
 net/lwip/Kconfig           | 34 +++++++++++++++++++++
 13 files changed, 108 insertions(+), 33 deletions(-)
 create mode 100644 net/lwip/Kconfig
Kconfig +30 -0
index 82df59f176e..6657b9e5e30 100644
@@ -745,8 +745,38 @@ source "dts/Kconfig"
 
 source "env/Kconfig"
 
+menu Networking
+
+choice
+	prompt "Networking stack"
+	default NET
+
+config NO_NET
+	bool "No networking support"
+
+config NET
+	bool "Legacy U-Boot networking stack"
+	imply NETDEVICES
+
+config NET_LWIP
+	bool "Use lwIP for networking stack"
+	imply NETDEVICES
+	depends on !SANDBOX
+	help
+	  Include networking support based on the lwIP (lightweight IP)
+	  TCP/IP stack (https://nongnu.org/lwip). This is a replacement for
+	  the default U-Boot network stack and applications located in net/
+	  and enabled via CONFIG_NET as well as other pieces of code that
+	  depend on CONFIG_NET (such as cmd/net.c enabled via CONFIG_CMD_NET).
+	  Therefore the two symbols CONFIG_NET and CONFIG_NET_LWIP are mutually
+	  exclusive.
+
+endchoice
+
 source "net/Kconfig"
 
+endmenu
+
 source "drivers/Kconfig"
 
 source "fs/Kconfig"
boot/Kconfig +1 -0
index 940389d4882..5762de87b21 100644
@@ -502,6 +502,7 @@ config BOOTMETH_ANDROID
 	select ANDROID_BOOT_IMAGE
 	select CMD_BCB
 	select CMD_FASTBOOT
+	select FASTBOOT
 	select PARTITION_TYPE_GUID
 	select PARTITION_UUIDS
 	help
cmd/Kconfig +1 -0
index 978f44eda42..de56c497005 100644
@@ -1644,6 +1644,7 @@ config CMD_USB
 
 config CMD_USB_SDP
 	bool "sdp"
+	depends on USB_GADGET_DOWNLOAD
 	select USB_FUNCTION_SDP
 	help
 	  Enables the command "sdp" which is used to have U-Boot emulating the
common/Kconfig +1 -1
index 83c81edac20..1fbe4e0812f 100644
@@ -424,7 +424,7 @@ config LOGF_FUNC_PAD
 
 config LOG_SYSLOG
 	bool "Log output to syslog server"
-	depends on NET
+	depends on NET || NET_LWIP
 	help
 	  Enables a log driver which broadcasts log records via UDP port 514
 	  to syslog servers.
common/spl/Kconfig +1 -0
index c08ff064493..962ad11102b 100644
@@ -1063,6 +1063,7 @@ config SPL_DM_SPI_FLASH
 
 config SPL_NET
 	bool "Support networking"
+	depends on !NET_LWIP
 	help
 	  Enable support for network devices (such as Ethernet) in SPL.
 	  This permits SPL to load U-Boot over a network link rather than
drivers/dfu/Kconfig +1 -0
index 971204758aa..d034b501360 100644
@@ -20,6 +20,7 @@ config DFU_WRITE_ALT
 config DFU_TFTP
 	bool "DFU via TFTP"
 	depends on NETDEVICES
+	depends on !NET_LWIP
 	select UPDATE_COMMON
 	select DFU_OVER_TFTP
 	help
drivers/fastboot/Kconfig +1 -0
index 70207573de2..1eb460f5a02 100644
@@ -1,5 +1,6 @@
 menu "Fastboot support"
 	depends on CMDLINE
+	depends on !NET_LWIP
 
 config FASTBOOT
 	bool
drivers/net/Kconfig +1 -0
index 3382e533f42..eba0bf8b1f1 100644
@@ -48,6 +48,7 @@ config DM_DSA
 	bool "Enable Driver Model for DSA switches"
 	depends on DM_MDIO
 	depends on PHY_FIXED
+	depends on !NET_LWIP
 	help
 	  Enable driver model for DSA switches
 
drivers/net/phy/Kconfig +1 -1
index a9efc509814..13e73810ad6 100644
@@ -11,7 +11,7 @@ config MV88E6352_SWITCH
 
 menuconfig PHYLIB
 	bool "Ethernet PHY (physical media interface) support"
-	depends on NET
+	depends on NET || NET_LWIP
 	help
 	  Enable Ethernet PHY (physical media interface) support.
 
drivers/usb/gadget/Kconfig +1 -1
index 4621a6fd5e6..03fe3bca197 100644
@@ -224,7 +224,7 @@ endif # USB_GADGET_DOWNLOAD
 
 config USB_ETHER
 	bool "USB Ethernet Gadget"
-	depends on NET
+	depends on NET || NET_LWIP
 	default y if ARCH_SUNXI && USB_MUSB_GADGET
 	help
 	  Creates an Ethernet network device through a USB peripheral
net/Kconfig +31 -30

83 lines not on this page · raw message

net/Makefile +4 -0
index 64ab7ec740a..70eec8caf0d 100644
@@ -5,6 +5,8 @@
 
 #ccflags-y += -DDEBUG
 
+ifeq ($(CONFIG_NET),y)
+
 obj-$(CONFIG_NET)      += arp.o
 obj-$(CONFIG_CMD_BOOTP) += bootp.o
 obj-$(CONFIG_CMD_CDP)  += cdp.o
@@ -38,3 +40,5 @@ obj-$(CONFIG_CMD_WGET) += wget.o
 # sprintf(buf, index ? "foo%d" : "foo", index)
 # and this is intentional usage.
 CFLAGS_eth_common.o += -Wno-format-extra-args
+
+endif
net/lwip/Kconfig new file +34 -0
new file mode 100644
index 00000000000..eb31d044197
@@ -0,0 +1,34 @@
+#
+# Network configuration (with lwIP stack)
+#
+
+config LWIP_DEBUG
+	bool "Enable debug traces in the lwIP library"
+
+config LWIP_ASSERT
+	bool "Enable assertions in the lwIP library"
+
+config PROT_DHCP_LWIP
+	bool
+	select PROT_UDP_LWIP
+
+config PROT_DNS_LWIP
+	bool
+	select PROT_UDP_LWIP
+
+config PROT_RAW_LWIP
+	bool
+
+config PROT_TCP_LWIP
+	bool
+
+config PROT_TCP_SACK_LWIP
+	bool "TCP SACK support"
+	depends on PROT_TCP_LWIP
+	default y
+	help
+	  TCP protocol with selective acknowledgements. Improves
+	  file transfer speed in wget.
+
+config PROT_UDP_LWIP
+	bool
Signature · 1 line
2.40.1
#16 lore raw

PATCH v9 15/37 configs: replace '# CONFIG_NET is not set' with CONFIG_NO_NET=y

In reply to Jerome Forissier

The parent patch has made the networking stack a choice between NO_NET, NET and NET_LWIP. Therefore '# CONFIG_NET is not set' is now 'CONFIG_NO_NET=y'. Adjust the defconfigs accordingly. Note that this patch is intended to be folded in but is kept separate separate for now to make review easier.

---
 configs/LicheePi_Zero_defconfig                  | 2 +-
 configs/M5249EVB_defconfig                       | 2 +-
 configs/am335x_pdu001_defconfig                  | 2 +-
 configs/am62ax_evm_r5_defconfig                  | 2 +-
 configs/am62px_evm_r5_defconfig                  | 2 +-
 configs/am62x_beagleplay_r5_defconfig            | 2 +-
 configs/amcore_defconfig                         | 2 +-
 configs/anbernic-rgxx3-rk3566_defconfig          | 2 +-
 configs/ap143_defconfig                          | 2 +-
 configs/ap152_defconfig                          | 2 +-
 configs/apple_m1_defconfig                       | 2 +-
 configs/astro_mcf5373l_defconfig                 | 2 +-
 configs/at91sam9rlek_dataflash_defconfig         | 2 +-
 configs/at91sam9rlek_mmc_defconfig               | 2 +-
 configs/at91sam9rlek_nandflash_defconfig         | 2 +-
 configs/bcm7260_defconfig                        | 2 +-
 configs/bcm7445_defconfig                        | 2 +-
 configs/bcm968380gerg_ram_defconfig              | 2 +-
 configs/bcmns_defconfig                          | 2 +-
 configs/chromebook_samus_tpl_defconfig           | 2 +-
 configs/cortina_presidio-asic-base_defconfig     | 2 +-
 configs/cortina_presidio-asic-pnand_defconfig    | 2 +-
 configs/durian_defconfig                         | 2 +-
 configs/e850-96_defconfig                        | 2 +-
 configs/ea-lpc3250devkitv2_defconfig             | 2 +-
 configs/efi-x86_app32_defconfig                  | 2 +-
 configs/efi-x86_app64_defconfig                  | 2 +-
 configs/emsdp_defconfig                          | 2 +-
 configs/evb-px5_defconfig                        | 2 +-
 configs/generic-rk3568_defconfig                 | 2 +-
 configs/generic-rk3588_defconfig                 | 2 +-
 configs/hc2910_2aghd05_defconfig                 | 2 +-
 configs/igep00x0_defconfig                       | 2 +-
 configs/imx6q_bosch_acc_defconfig                | 2 +-
 configs/imx6ulz_smm_m2_defconfig                 | 2 +-
 configs/iot_devkit_defconfig                     | 2 +-
 configs/legoev3_defconfig                        | 2 +-
 configs/mk808_defconfig                          | 2 +-
 configs/mx23evk_defconfig                        | 2 +-
 configs/mx28evk_defconfig                        | 2 +-
 configs/mx6memcal_defconfig                      | 2 +-
 configs/mx6ulz_14x14_evk_defconfig               | 2 +-
 configs/mx7ulp_com_defconfig                     | 2 +-
 configs/mx7ulp_evk_defconfig                     | 2 +-
 configs/mx7ulp_evk_plugin_defconfig              | 2 +-
 configs/netgear_cg3100d_ram_defconfig            | 2 +-
 configs/nsim_700_defconfig                       | 2 +-
 configs/nsim_700be_defconfig                     | 2 +-
 configs/nsim_hs38be_defconfig                    | 2 +-
 configs/openpiton_riscv64_defconfig              | 2 +-
 configs/openpiton_riscv64_spl_defconfig          | 2 +-
 configs/origen_defconfig                         | 2 +-
 configs/pe2201_defconfig                         | 2 +-
 configs/pinecube_defconfig                       | 2 +-
 configs/pm9261_defconfig                         | 2 +-
 configs/s5p4418_nanopi2_defconfig                | 2 +-
 configs/s5p_goni_defconfig                       | 2 +-
 configs/s5pc210_universal_defconfig              | 2 +-
 configs/sama5d27_giantboard_defconfig            | 2 +-
 configs/sama5d29_curiosity_mmc1_defconfig        | 2 +-
 configs/sama5d29_curiosity_mmc_defconfig         | 2 +-
 configs/sama5d29_curiosity_qspiflash_defconfig   | 2 +-
 configs/sama7g54_curiosity_mmc_defconfig         | 2 +-
 configs/sama7g54_curiosity_nandflash_defconfig   | 2 +-
 configs/sama7g54_curiosity_qspiflash_defconfig   | 2 +-
 configs/sipeed_maix_bitm_defconfig               | 2 +-
 configs/sipeed_maix_smode_defconfig              | 2 +-
 configs/stemmy_defconfig                         | 2 +-
 configs/stm32f429-discovery_defconfig            | 2 +-
 configs/stm32f429-evaluation_defconfig           | 2 +-
 configs/stm32f469-discovery_defconfig            | 2 +-
 configs/stm32h743-disco_defconfig                | 2 +-
 configs/stm32h743-eval_defconfig                 | 2 +-
 configs/stm32h750-art-pi_defconfig               | 2 +-
 configs/stm32mp25_defconfig                      | 2 +-
 configs/stmark2_defconfig                        | 2 +-
 configs/th1520_lpi4a_defconfig                   | 2 +-
 configs/thunderx_88xx_defconfig                  | 2 +-
 configs/tools-only_defconfig                     | 2 +-
 configs/topic_miami_defconfig                    | 2 +-
 configs/topic_miamilite_defconfig                | 2 +-
 configs/topic_miamiplus_defconfig                | 2 +-
 configs/total_compute_defconfig                  | 2 +-
 configs/trats2_defconfig                         | 2 +-
 configs/trats_defconfig                          | 2 +-
 configs/xenguest_arm64_defconfig                 | 2 +-
 configs/xenguest_arm64_virtio_defconfig          | 2 +-
 configs/xilinx_versal_mini_defconfig             | 2 +-
 configs/xilinx_versal_mini_emmc0_defconfig       | 2 +-
 configs/xilinx_versal_mini_emmc1_defconfig       | 2 +-
 configs/xilinx_versal_mini_ospi_defconfig        | 2 +-
 configs/xilinx_versal_mini_qspi_defconfig        | 2 +-
 configs/xilinx_versal_net_mini_defconfig         | 2 +-
 configs/xilinx_versal_net_mini_emmc_defconfig    | 2 +-
 configs/xilinx_versal_net_mini_ospi_defconfig    | 2 +-
 configs/xilinx_versal_net_mini_qspi_defconfig    | 2 +-
 configs/xilinx_zynqmp_mini_defconfig             | 2 +-
 configs/xilinx_zynqmp_mini_emmc0_defconfig       | 2 +-
 configs/xilinx_zynqmp_mini_emmc1_defconfig       | 2 +-
 configs/xilinx_zynqmp_mini_nand_defconfig        | 2 +-
 configs/xilinx_zynqmp_mini_nand_single_defconfig | 2 +-
 configs/xilinx_zynqmp_mini_qspi_defconfig        | 2 +-
 configs/zynq_cse_nand_defconfig                  | 2 +-
 configs/zynq_cse_nor_defconfig                   | 2 +-
 configs/zynq_cse_qspi_defconfig                  | 2 +-
 105 files changed, 105 insertions(+), 105 deletions(-)
configs/LicheePi_Zero_defconfig +1 -1
index 009384eaf1b..c37c49ccbb1 100644
@@ -5,4 +5,4 @@ CONFIG_SPL=y
 CONFIG_MACH_SUN8I_V3S=y
 CONFIG_DRAM_CLK=360
 # CONFIG_HAS_ARMV7_SECURE_BASE is not set
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
configs/M5249EVB_defconfig +1 -1
index eac85b9c2d5..ed1446d81cb 100644
@@ -22,7 +22,7 @@ CONFIG_CMD_MX_CYCLIC=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_CACHE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
configs/am335x_pdu001_defconfig +1 -1
index febe5ebaabb..508caef8adb 100644
@@ -42,7 +42,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_SPL_OF_TRANSLATE=y
configs/am62ax_evm_r5_defconfig +1 -1
index 44ccb6baa90..1fba779dd0a 100644
@@ -67,7 +67,7 @@ CONFIG_ENV_IS_NOWHERE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_PART=1
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_REGMAP=y
configs/am62px_evm_r5_defconfig +1 -1
index ace55696737..53925bdbfcb 100644
@@ -71,7 +71,7 @@ CONFIG_ENV_IS_NOWHERE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_PART=1
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_DEVICE_REMOVE=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
configs/am62x_beagleplay_r5_defconfig +1 -1
index d0cc4f5b405..2179b016134 100644
@@ -68,7 +68,7 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_SPL_MULTI_DTB_FIT=y
 CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_REGMAP=y
configs/amcore_defconfig +1 -1
index f1f5201b30a..94c5379590d 100644
@@ -33,7 +33,7 @@ CONFIG_CMD_DIAG=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_USE_HOSTNAME=y
 CONFIG_HOSTNAME="AMCORE"
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
configs/anbernic-rgxx3-rk3566_defconfig +1 -1
index a03509bf467..937c27a947e 100644
@@ -41,7 +41,7 @@ CONFIG_OF_LIVE=y
 # CONFIG_OF_UPSTREAM is not set
 CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_SPL_REGMAP=y
 CONFIG_SPL_SYSCON=y
configs/ap143_defconfig +1 -1
index c22048c1b53..13842e6c0f8 100644
@@ -46,7 +46,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-flash.0:256k(u-boot),64k(u-boot-env),6336k
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_SPI_MAX_HZ=25000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_MTD=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
configs/ap152_defconfig +1 -1
index ec700a5b3f0..5cc0ad2e682 100644
@@ -46,7 +46,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-flash.0:256k(u-boot),64k(u-boot-env),6336k
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_SPI_MAX_HZ=25000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_MTD=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
configs/apple_m1_defconfig +1 -1
index 20d2cff93f7..e425f114791 100644
@@ -11,7 +11,7 @@ CONFIG_SYS_PBSIZE=276
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_BOARD_LATE_INIT=y
 CONFIG_CMD_SELECT_FONT=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SYS_64BIT_LBA=y
 CONFIG_APPLE_SPI_KEYB=y
 # CONFIG_MMC is not set
configs/astro_mcf5373l_defconfig +1 -1
index d1942c28971..8dd369d68a1 100644
@@ -27,7 +27,7 @@ CONFIG_CMD_I2C=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_JFFS2=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_FPGA_ALTERA=y
 CONFIG_FPGA_CYCLON2=y
 CONFIG_FPGA_XILINX=y
configs/at91sam9rlek_dataflash_defconfig +1 -1
index 931af2b2fda..01ac2cc8d1e 100644
@@ -41,7 +41,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_SPI_MAX_HZ=15000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
 CONFIG_AT91_GPIO=y
configs/at91sam9rlek_mmc_defconfig +1 -1
index 70d431c1f52..93f7d762109 100644
@@ -39,7 +39,7 @@ CONFIG_CMD_FAT=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_FAT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
 CONFIG_AT91_GPIO=y
configs/at91sam9rlek_nandflash_defconfig +1 -1
index 1277a357cd2..928ad9f4f70 100644
@@ -40,7 +40,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
 CONFIG_AT91_GPIO=y
configs/bcm7260_defconfig +1 -1
index 2bf3c0d7fbe..345e37bca7e 100644
@@ -35,7 +35,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_BCMSTB=y
 CONFIG_MTD=y
configs/bcm7445_defconfig +1 -1
index 07e3b57ac33..eb6629ba57a 100644
@@ -37,7 +37,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_BCMSTB=y
 CONFIG_MTD=y
configs/bcm968380gerg_ram_defconfig +1 -1
index 6c119eb42a6..053c459e05c 100644
@@ -41,7 +41,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_NAND=y
 # CONFIG_CMD_SLEEP is not set
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 CONFIG_BCM6345_GPIO=y
 CONFIG_LED=y
configs/bcmns_defconfig +1 -1
index 365284e94c3..f2719821656 100644
@@ -28,7 +28,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_OF_EMBED=y
 CONFIG_USE_HOSTNAME=y
 CONFIG_HOSTNAME="NS"
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CLK=y
 CONFIG_MTD=y
 CONFIG_DM_MTD=y
configs/chromebook_samus_tpl_defconfig +1 -1
index 1be57560f89..075e3f192a3 100644
@@ -74,7 +74,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="bzImage"
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 # CONFIG_ACPIGEN is not set
configs/cortina_presidio-asic-base_defconfig +1 -1
index eb5743da64d..78167d56d83 100644
@@ -31,7 +31,7 @@ CONFIG_CMD_TIMER=y
 CONFIG_CMD_SMC=y
 CONFIG_OF_CONTROL=y
 CONFIG_OF_LIVE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CORTINA_GPIO=y
 # CONFIG_MMC is not set
 CONFIG_DM_SERIAL=y
configs/cortina_presidio-asic-pnand_defconfig +1 -1
index c7367d4d91c..f1526227d65 100644
@@ -32,7 +32,7 @@ CONFIG_CMD_TIMER=y
 CONFIG_CMD_SMC=y
 CONFIG_OF_CONTROL=y
 CONFIG_OF_LIVE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CORTINA_GPIO=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
configs/durian_defconfig +1 -1
index f1d45ca3064..ae7a05edee1 100644
@@ -28,7 +28,7 @@ CONFIG_SYS_PROMPT="durian#"
 CONFIG_CMD_PCI=y
 CONFIG_OF_CONTROL=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SCSI_AHCI=y
 CONFIG_AHCI_PCI=y
 # CONFIG_MMC is not set
configs/e850-96_defconfig +1 -1
index 2949da24267..6b1a3fb3098 100644
@@ -12,7 +12,7 @@ CONFIG_SYS_LOAD_ADDR=0x80000000
 # CONFIG_AUTOBOOT is not set
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_CMD_RNG=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CLK_EXYNOS850=y
 # CONFIG_MMC is not set
 CONFIG_SOC_SAMSUNG=y
configs/ea-lpc3250devkitv2_defconfig +1 -1
index af9fc5f2f5c..c3af7afced1 100644
@@ -25,7 +25,7 @@ CONFIG_SYS_PROMPT="EA-LPC3250v2=> "
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_OF_CONTROL=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_LPC32XX_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_LPC32XX=y
configs/efi-x86_app32_defconfig +1 -1
index 53ec63461d5..c2856b4000f 100644
@@ -35,7 +35,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="bzImage"
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 # CONFIG_GZIP is not set
configs/efi-x86_app64_defconfig +1 -1
index 3d021483dd0..0b709cf4dad 100644
@@ -38,7 +38,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="bzImage"
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_CONSOLE_SCROLL_LINES=5
configs/emsdp_defconfig +1 -1
index 07bed2b5623..26efa794058 100644
@@ -30,7 +30,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="app.bin"
 CONFIG_VERSION_VARIABLE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_MMC=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_DW_SNPS=y
configs/evb-px5_defconfig +1 -1
index ccd38831533..8efab0c2fc0 100644
@@ -57,7 +57,7 @@ CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names interrupt-parent"
 CONFIG_TPL_OF_PLATDATA=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_TPL_DM=y
 CONFIG_REGMAP=y
 CONFIG_SPL_REGMAP=y
configs/generic-rk3568_defconfig +1 -1
index 66a33afbbaf..383dad3087b 100644
@@ -40,7 +40,7 @@ CONFIG_OF_LIVE=y
 # CONFIG_OF_UPSTREAM is not set
 CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_SPL_REGMAP=y
 CONFIG_SPL_SYSCON=y
configs/generic-rk3588_defconfig +1 -1
index 42bc2c9a765..3c81401968d 100644
@@ -35,7 +35,7 @@ CONFIG_OF_LIVE=y
 # CONFIG_OF_UPSTREAM is not set
 CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_SPL_REGMAP=y
 CONFIG_SPL_SYSCON=y
configs/hc2910_2aghd05_defconfig +1 -1
index e68b44478a9..4302436d2e6 100644
@@ -36,7 +36,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_PARTITION_TYPE_GUID=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_GPIO is not set
 # CONFIG_I2C is not set
 # CONFIG_INPUT is not set
configs/igep00x0_defconfig +1 -1
index 473891607b0..b33db8d7f5d 100644
@@ -66,7 +66,7 @@ CONFIG_ENV_UBI_VOLUME="config"
 CONFIG_ENV_UBI_VOLUME_REDUND="config_r"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SPL_DM=y
 CONFIG_DM_I2C=y
 CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
configs/imx6q_bosch_acc_defconfig +1 -1
index dce1b64bf69..3fca5d5139d 100644
@@ -81,7 +81,7 @@ CONFIG_SYS_MMC_ENV_PART=1
 CONFIG_ENV_WRITEABLE_LIST=y
 CONFIG_ENV_ACCESS_IGNORE_FORCE=y
 CONFIG_VERSION_VARIABLE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SPL_DM=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_DM_BOOTCOUNT=y
configs/imx6ulz_smm_m2_defconfig +1 -1
index 93ead4c373b..c2adff17abf 100644
@@ -42,7 +42,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_BUF_ADDR=0x82000000
configs/iot_devkit_defconfig +1 -1
index c4920052f82..3dda897f765 100644
@@ -34,7 +34,7 @@ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="app.bin"
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_MMC=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_DW_SNPS=y
configs/legoev3_defconfig +1 -1
index 34ef3493cac..60b7a84205c 100644
@@ -44,7 +44,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="uImage"
 CONFIG_VERSION_VARIABLE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DAVINCI=y
configs/mk808_defconfig +1 -1
index 9a342d3a33a..36ab4b03401 100644
@@ -68,7 +68,7 @@ CONFIG_OF_DTB_PROPS_REMOVE=y
 CONFIG_SPL_OF_PLATDATA=y
 CONFIG_TPL_OF_PLATDATA=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_TPL_DM=y
 CONFIG_REGMAP=y
 CONFIG_SPL_REGMAP=y
configs/mx23evk_defconfig +1 -1
index 7d0e7cc1e00..59ab64ec97a 100644
@@ -41,7 +41,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="uImage"
 CONFIG_VERSION_VARIABLE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_MXS_GPIO=y
 CONFIG_MMC_MXS=y
 CONFIG_PINCTRL=y
configs/mx28evk_defconfig +1 -1
index 1fe68ef93f9..868d870cb68 100644
@@ -48,7 +48,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="uImage"
 CONFIG_VERSION_VARIABLE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SPL_DM=y
 CONFIG_MXS_GPIO=y
 CONFIG_MMC_MXS=y
configs/mx6memcal_defconfig +1 -1
index 4c8a5960d38..5cc8236feb9 100644
@@ -38,7 +38,7 @@ CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_CACHE=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_BOUNCE_BUFFER=y
 # CONFIG_MMC is not set
 CONFIG_FSL_USDHC=y
configs/mx6ulz_14x14_evk_defconfig +1 -1
index d57b47ef47a..2c13dd4dbc3 100644
@@ -36,7 +36,7 @@ CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_DM_74X164=y
 CONFIG_DM_I2C=y
configs/mx7ulp_com_defconfig +1 -1
index f8dcc0abef5..6ea84c053ca 100644
@@ -33,7 +33,7 @@ CONFIG_CMD_FAT=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_IMX_RGPIO2P=y
 # CONFIG_MXC_GPIO is not set
configs/mx7ulp_evk_defconfig +1 -1
index 38e6b62df45..5aadb9e93f1 100644
@@ -33,7 +33,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_IMX_RGPIO2P=y
 # CONFIG_MXC_GPIO is not set
configs/mx7ulp_evk_plugin_defconfig +1 -1
index d007d180969..2f45fac0a89 100644
@@ -31,7 +31,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_IMX_RGPIO2P=y
 # CONFIG_MXC_GPIO is not set
configs/netgear_cg3100d_ram_defconfig +1 -1
index 352b98fc0a5..377cc26f937 100644
@@ -39,7 +39,7 @@ CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_SPI=y
 # CONFIG_CMD_SLEEP is not set
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 CONFIG_BCM6345_GPIO=y
 CONFIG_LED=y
configs/nsim_700_defconfig +1 -1
index be2539e8cd7..e8400c2dc30 100644
@@ -25,7 +25,7 @@ CONFIG_OF_EMBED=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="uImage"
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_DM_SERIAL=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550=y
configs/nsim_700be_defconfig +1 -1
index 1fcf36a28a5..9ce1a255227 100644
@@ -26,7 +26,7 @@ CONFIG_OF_EMBED=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="uImage"
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_DM_SERIAL=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550=y
configs/nsim_hs38be_defconfig +1 -1
index 9c26e4da7d2..80d0e54192d 100644
@@ -27,7 +27,7 @@ CONFIG_OF_EMBED=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="uImage"
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_DM_SERIAL=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550=y
configs/openpiton_riscv64_defconfig +1 -1
index cdb9e1c932e..9df92e5c318 100644
@@ -61,7 +61,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 # CONFIG_DOS_PARTITION is not set
 CONFIG_OF_EMBED=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CPU=y
 CONFIG_MMC=y
 # CONFIG_MMC_WRITE is not set
configs/openpiton_riscv64_spl_defconfig +1 -1
index a08040d878d..29304cc50fe 100644
@@ -77,7 +77,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 # CONFIG_DOS_PARTITION is not set
 # CONFIG_SPL_PARTITION_UUIDS is not set
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CPU=y
 CONFIG_MMC=y
 # CONFIG_MMC_WRITE is not set
configs/origen_defconfig +1 -1
index dc9285d4e99..26702d77079 100644
@@ -41,7 +41,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_DFU_MMC=y
 CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000
 CONFIG_MMC_DW=y
configs/pe2201_defconfig +1 -1
index 5d32cbf8bf1..91fe7ebf982 100644
@@ -27,7 +27,7 @@ CONFIG_CMD_DM=y
 CONFIG_CMD_PCI=y
 CONFIG_OF_CONTROL=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SCSI_AHCI=y
 CONFIG_AHCI_PCI=y
 # CONFIG_MMC is not set
configs/pinecube_defconfig +1 -1
index 7cc0a862949..7567a6aa739 100644
@@ -9,7 +9,7 @@ CONFIG_DRAM_ODT_EN=y
 CONFIG_I2C0_ENABLE=y
 # CONFIG_HAS_ARMV7_SECURE_BASE is not set
 CONFIG_SPL_I2C=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MVTWSI=y
 CONFIG_SYS_I2C_SLAVE=0x7f
configs/pm9261_defconfig +1 -1
index 9f4d434f3e2..026c6de3109 100644
@@ -37,7 +37,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=physmap-flash.0:256k(u-boot)ro,64k(u-boot-env)
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
 CONFIG_AT91_GPIO=y
configs/s5p4418_nanopi2_defconfig +1 -1
index ee72778995b..0bee0008294 100644
@@ -49,7 +49,7 @@ CONFIG_CMD_FAT=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_MMC_ENV_DEV=2
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_NEXELL=y
 CONFIG_MMC_DW=y
configs/s5p_goni_defconfig +1 -1
index 4316510541c..084e19e1258 100644
@@ -44,7 +44,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_DFU_MMC=y
 CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000
 CONFIG_DM_I2C_GPIO=y
configs/s5pc210_universal_defconfig +1 -1
index 67959ad79cd..99e873ff427 100644
@@ -41,7 +41,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_DFU_MMC=y
 CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000
 CONFIG_SYS_I2C_S3C24X0=y
configs/sama5d27_giantboard_defconfig +1 -1
index 283c9300c56..34274ca4a32 100644
@@ -64,7 +64,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dmas dma-names"
 CONFIG_ENV_IS_IN_FAT=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_CLK=y
configs/sama5d29_curiosity_mmc1_defconfig +1 -1
index 61edb23b196..5d9173a0e57 100644
@@ -70,7 +70,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_HOSTNAME=y
 CONFIG_HOSTNAME="SAMA5D29"
 CONFIG_VERSION_VARIABLE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
 CONFIG_AT91_UTMI=y
configs/sama5d29_curiosity_mmc_defconfig +1 -1
index 0b16f386735..2b765f56dda 100644
@@ -69,7 +69,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_HOSTNAME=y
 CONFIG_HOSTNAME="SAMA5D29"
 CONFIG_VERSION_VARIABLE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
 CONFIG_AT91_UTMI=y
configs/sama5d29_curiosity_qspiflash_defconfig +1 -1
index 9b522e81ef5..d840d0f3d6f 100644
@@ -69,7 +69,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_HOSTNAME=y
 CONFIG_HOSTNAME="SAMA5D29"
 CONFIG_VERSION_VARIABLE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
 CONFIG_AT91_UTMI=y
configs/sama7g54_curiosity_mmc_defconfig +1 -1
index 00a091df0e5..ba8643c912c 100644
@@ -74,7 +74,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_HOSTNAME=y
 CONFIG_HOSTNAME="SAMA7G54"
 CONFIG_VERSION_VARIABLE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CLK=y
 CONFIG_CLK_CCF=y
 CONFIG_CLK_AT91=y
configs/sama7g54_curiosity_nandflash_defconfig +1 -1
index 0b2116d0419..49b08d3fc2b 100644
@@ -72,7 +72,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_HOSTNAME=y
 CONFIG_HOSTNAME="SAMA7G54"
 CONFIG_VERSION_VARIABLE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CLK=y
 CONFIG_CLK_CCF=y
 CONFIG_CLK_AT91=y
configs/sama7g54_curiosity_qspiflash_defconfig +1 -1
index 00e5362a1fa..8fa5857e245 100644
@@ -73,7 +73,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_HOSTNAME=y
 CONFIG_HOSTNAME="SAMA7G54"
 CONFIG_VERSION_VARIABLE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CLK=y
 CONFIG_CLK_CCF=y
 CONFIG_CLK_AT91=y
configs/sipeed_maix_bitm_defconfig +1 -1
index 67d5a007a8e..8788eabf55a 100644
@@ -17,7 +17,7 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_HUSH_PARSER=y
 CONFIG_MTDIDS_DEFAULT="nor0=spi3:0"
 CONFIG_MTDPARTS_DEFAULT="nor0:1M(u-boot),0x1000@0xfff000(env)"
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CLK_K210_SET_RATE=y
 # CONFIG_INPUT is not set
 CONFIG_SF_DEFAULT_BUS=3
configs/sipeed_maix_smode_defconfig +1 -1
index 049fac02cac..c8d8b1ac9e1 100644
@@ -18,7 +18,7 @@ CONFIG_SYS_PBSIZE=276
 CONFIG_HUSH_PARSER=y
 CONFIG_MTDIDS_DEFAULT="nor0=spi3:0"
 CONFIG_MTDPARTS_DEFAULT="nor0:1M(u-boot),0x1000@0xfff000(env)"
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_INPUT is not set
 CONFIG_SF_DEFAULT_BUS=3
 CONFIG_FS_EXT4=y
configs/stemmy_defconfig +1 -1
index ee8e6be6e2c..efa3b477a6e 100644
@@ -28,7 +28,7 @@ CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
 CONFIG_CMD_GETTIME=y
 CONFIG_EFI_PARTITION=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_BUF_ADDR=0x18100000
 CONFIG_FASTBOOT_FLASH=y
configs/stm32f429-discovery_defconfig +1 -1
index 5d59edb7381..21a466572bd 100644
@@ -27,7 +27,7 @@ CONFIG_CMD_IMLS=y
 CONFIG_CMD_TIMER=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_FLASH=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
configs/stm32f429-evaluation_defconfig +1 -1
index 3e220d73984..8f20d4ca3f5 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_TIMER=y
 # CONFIG_ISO_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_ARM_PL180_MMCI=y
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
configs/stm32f469-discovery_defconfig +1 -1
index 9b5f38b9efa..33292bfaf0c 100644
@@ -26,7 +26,7 @@ CONFIG_CMD_TIMER=y
 # CONFIG_ISO_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_ARM_PL180_MMCI=y
 CONFIG_MTD=y
 CONFIG_DM_MTD=y
configs/stm32h743-disco_defconfig +1 -1
index 89d79e98b6f..f098b8dd6da 100644
@@ -30,6 +30,6 @@ CONFIG_CMD_EXT4_WRITE=y
 # CONFIG_ISO_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_STM32_SDMMC2=y
 # CONFIG_PINCTRL_FULL is not set
configs/stm32h743-eval_defconfig +1 -1
index 6b4ebd11691..82823e8631f 100644
@@ -30,6 +30,6 @@ CONFIG_CMD_EXT4_WRITE=y
 # CONFIG_ISO_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_STM32_SDMMC2=y
 # CONFIG_PINCTRL_FULL is not set
configs/stm32h750-art-pi_defconfig +1 -1
index 319b3033a40..df3ff43f4a9 100644
@@ -36,7 +36,7 @@ CONFIG_CMD_EXT4_WRITE=y
 # CONFIG_ISO_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_DM_DMA=y
 CONFIG_STM32_SDMMC2=y
 # CONFIG_PINCTRL_FULL is not set
configs/stm32mp25_defconfig +1 -1
index 87038cc773a..9885466f390 100644
@@ -31,7 +31,7 @@ CONFIG_CMD_TIMER=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_CMD_LOG=y
 CONFIG_OF_LIVE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_GPIO_HOG=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_STM32F7=y
configs/stmark2_defconfig +1 -1
index f43a24c5b5e..79b21acd032 100644
@@ -39,7 +39,7 @@ CONFIG_ENV_SPI_CS=1
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_HOSTNAME=y
 CONFIG_HOSTNAME="stmark2"
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_FSL=y
 CONFIG_MTD=y
configs/th1520_lpi4a_defconfig +1 -1
index 49ff92f6de3..6893d7622fe 100644
@@ -58,7 +58,7 @@ CONFIG_CMD_BOOTMENU=y
 CONFIG_PARTITION_TYPE_GUID=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_BLOCK_CACHE is not set
 # CONFIG_GPIO is not set
 # CONFIG_I2C is not set
configs/thunderx_88xx_defconfig +1 -1
index b754cc01cc8..107ad279e1b 100644
@@ -32,7 +32,7 @@ CONFIG_SYS_PROMPT="ThunderX_88XX> "
 # CONFIG_CMD_SAVEENV is not set
 # CONFIG_CMD_ENV_EXISTS is not set
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_MMC is not set
 CONFIG_DM_SERIAL=y
 CONFIG_DEBUG_UART_SKIP_INIT=y
configs/tools-only_defconfig +1 -1
index b54d2cefa10..e00f2c48598 100644
@@ -22,7 +22,7 @@ CONFIG_BOOTCOMMAND="run distro_bootcmd"
 # CONFIG_CMD_DATE is not set
 CONFIG_OF_CONTROL=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_ACPIGEN is not set
 CONFIG_AXI=y
 CONFIG_AXI_SANDBOX=y
configs/topic_miami_defconfig +1 -1
index 638d7306146..74b03d19ffb 100644
@@ -52,7 +52,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_OF_EMBED=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_DFU_RAM=y
 CONFIG_SYS_DFU_DATA_BUF_SIZE=0x600000
configs/topic_miamilite_defconfig +1 -1
index af47fab83c0..46071399a4d 100644
@@ -52,7 +52,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_OF_EMBED=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_DFU_RAM=y
 CONFIG_SYS_DFU_DATA_BUF_SIZE=0x600000
configs/topic_miamiplus_defconfig +1 -1
index ad321749694..5562c738c5e 100644
@@ -52,7 +52,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_OF_EMBED=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_DFU_RAM=y
 CONFIG_SYS_DFU_DATA_BUF_SIZE=0x600000
configs/total_compute_defconfig +1 -1
index 5f21d2e367a..b3d2e5c88a6 100644
@@ -43,7 +43,7 @@ CONFIG_CMD_AVB=y
 CONFIG_CMD_UBI=y
 # CONFIG_ISO_PARTITION is not set
 CONFIG_OF_CONTROL=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_CLK=y
 # CONFIG_MMC_WRITE is not set
 CONFIG_ARM_PL180_MMCI=y
configs/trats2_defconfig +1 -1
index 67561368128..acfc42842e3 100644
@@ -43,7 +43,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_DFU_MMC=y
 CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000
 CONFIG_DM_I2C_GPIO=y
configs/trats_defconfig +1 -1
index 98925243bf4..070ab268474 100644
@@ -42,7 +42,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 CONFIG_DFU_MMC=y
 CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000
 CONFIG_DM_I2C_GPIO=y
configs/xenguest_arm64_defconfig +1 -1
index 6d040c2c15c..91657e0cd8b 100644
@@ -37,7 +37,7 @@ CONFIG_CMD_PVBLOCK=y
 # CONFIG_CMD_SLEEP is not set
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_MMC is not set
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
 CONFIG_DM_SERIAL=y
configs/xenguest_arm64_virtio_defconfig +1 -1
index d00a1ba0143..217b45a2c5e 100644
@@ -42,7 +42,7 @@ CONFIG_CMD_PCI=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
 CONFIG_PARTITION_TYPE_GUID=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_MMC is not set
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCI_REGION_MULTI_ENTRY=y
configs/xilinx_versal_mini_defconfig +1 -1
index b97bf5e60a9..e9183bc8071 100644
@@ -57,7 +57,7 @@ CONFIG_SYS_ALT_MEMTEST=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_SLEEP is not set
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 # CONFIG_MMC is not set
 CONFIG_ARM_DCC=y
configs/xilinx_versal_mini_emmc0_defconfig +1 -1
index 5c949e34442..7ba7e65597a 100644
@@ -55,7 +55,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_EMBED=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
configs/xilinx_versal_mini_emmc1_defconfig +1 -1
index 04cba5bc72d..54cc51ee7f3 100644
@@ -55,7 +55,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_EMBED=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
configs/xilinx_versal_mini_ospi_defconfig +1 -1
index 8f162597603..5ffb2cd5bfb 100644
@@ -51,7 +51,7 @@ CONFIG_SYS_PROMPT="Versal> "
 # CONFIG_CMD_ITEST is not set
 # CONFIG_CMD_SOURCE is not set
 # CONFIG_CMD_SETEXPR is not set
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 # CONFIG_MMC is not set
 CONFIG_MTD=y
configs/xilinx_versal_mini_qspi_defconfig +1 -1
index 8fbde1c7d3c..552cbdd740b 100644
@@ -53,7 +53,7 @@ CONFIG_SYS_PROMPT="Versal> "
 # CONFIG_CMD_SOURCE is not set
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is not set
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 # CONFIG_GPIO is not set
 # CONFIG_I2C is not set
configs/xilinx_versal_net_mini_defconfig +1 -1
index d6ebd080463..c4b1a5d5416 100644
@@ -61,7 +61,7 @@ CONFIG_CMD_CACHE=y
 # CONFIG_CMD_SLEEP is not set
 CONFIG_OF_EMBED=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 # CONFIG_GPIO is not set
 # CONFIG_I2C is not set
configs/xilinx_versal_net_mini_emmc_defconfig +1 -1
index fc88eee10af..c64ab92533b 100644
@@ -50,7 +50,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_EMBED=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 CONFIG_MMC_HS200_SUPPORT=y
 CONFIG_MMC_SDHCI=y
configs/xilinx_versal_net_mini_ospi_defconfig +1 -1
index 872a4a55952..f1a136fe52c 100644
@@ -50,7 +50,7 @@ CONFIG_SYS_PROMPT="Versal NET> "
 # CONFIG_CMD_ITEST is not set
 # CONFIG_CMD_SOURCE is not set
 # CONFIG_CMD_SETEXPR is not set
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 # CONFIG_MMC is not set
 CONFIG_MTD=y
configs/xilinx_versal_net_mini_qspi_defconfig +1 -1
index 00319e06102..75589c478d8 100644
@@ -52,7 +52,7 @@ CONFIG_SYS_PROMPT="Versal NET> "
 # CONFIG_CMD_SOURCE is not set
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is not set
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 # CONFIG_GPIO is not set
 # CONFIG_I2C is not set
configs/xilinx_zynqmp_mini_defconfig +1 -1
index 4b45074efc4..09d73b0617f 100644
@@ -53,7 +53,7 @@ CONFIG_CMD_CACHE=y
 # CONFIG_CMD_SLEEP is not set
 CONFIG_OF_EMBED=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 # CONFIG_DM_MAILBOX is not set
 # CONFIG_MMC is not set
configs/xilinx_zynqmp_mini_emmc0_defconfig +1 -1
index 49c7235fb8c..0e0242d8aac 100644
@@ -64,7 +64,7 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_EMBED=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 CONFIG_SPL_DM_SEQ_ALIAS=y
 # CONFIG_DM_MAILBOX is not set
configs/xilinx_zynqmp_mini_emmc1_defconfig +1 -1
index 1ef89f50444..01297f615b8 100644
@@ -64,7 +64,7 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_EMBED=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 CONFIG_SPL_DM_SEQ_ALIAS=y
 # CONFIG_DM_MAILBOX is not set
configs/xilinx_zynqmp_mini_nand_defconfig +1 -1
index b4719536be1..fd27f565b03 100644
@@ -48,7 +48,7 @@ CONFIG_CLOCKS=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_EMBED=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 # CONFIG_DM_MAILBOX is not set
 # CONFIG_MMC is not set
configs/xilinx_zynqmp_mini_nand_single_defconfig +1 -1
index 7ede17654dd..480c00ed152 100644
@@ -48,7 +48,7 @@ CONFIG_CLOCKS=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_EMBED=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 # CONFIG_DM_MAILBOX is not set
 # CONFIG_MMC is not set
configs/xilinx_zynqmp_mini_qspi_defconfig +1 -1
index 0d79ecece71..d8830a6f247 100644
@@ -67,7 +67,7 @@ CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_EMBED=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 CONFIG_SPL_DM_SEQ_ALIAS=y
 # CONFIG_FIRMWARE is not set
configs/zynq_cse_nand_defconfig +1 -1
index 750ea0db2b2..e7414c78d1e 100644
@@ -69,7 +69,7 @@ CONFIG_SYS_MAXARGS=32
 CONFIG_OF_EMBED=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 CONFIG_SPL_DM_SEQ_ALIAS=y
 # CONFIG_MMC is not set
configs/zynq_cse_nor_defconfig +1 -1
index 3155fe0b378..4f2186b2a51 100644
@@ -69,7 +69,7 @@ CONFIG_SYS_MAXARGS=32
 CONFIG_OF_EMBED=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 CONFIG_SPL_DM_SEQ_ALIAS=y
 # CONFIG_MMC is not set
configs/zynq_cse_qspi_defconfig +1 -1
index f2e1aa6d3ab..a372a13fe2d 100644
@@ -78,7 +78,7 @@ CONFIG_SYS_MAXARGS=32
 CONFIG_OF_EMBED=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-# CONFIG_NET is not set
+CONFIG_NO_NET=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 CONFIG_SPL_DM_SEQ_ALIAS=y
 # CONFIG_MMC is not set
Signature · 1 line
2.40.1
#17 lore raw

PATCH v9 16/37 net: split include/net.h into net{, -common, -legacy, -lwip}.h

In reply to Jerome Forissier

Make net.h a wrapper which includes net-common.h and either net-legacy.h or net-lwip.h based on NET_LWIP.

---
 Makefile             |   4 +-
 include/net-common.h | 485 ++++++++++++++++++++++
 include/net-legacy.h | 560 +++++++++++++++++++++++++
 include/net-lwip.h   |  14 +
 include/net.h        | 943 +------------------------------------------
 5 files changed, 1066 insertions(+), 940 deletions(-)
 create mode 100644 include/net-common.h
 create mode 100644 include/net-legacy.h
 create mode 100644 include/net-lwip.h
Makefile +3 -1
index dc7bdd79420..4c2170b10f2 100644
@@ -836,7 +836,9 @@ UBOOTINCLUDE    := \
 			-I$(srctree)/arch/arm/thumb1/include)) \
 	-I$(srctree)/arch/$(ARCH)/include \
 	-include $(srctree)/include/linux/kconfig.h \
-	-I$(srctree)/dts/upstream/include
+	-I$(srctree)/dts/upstream/include \
+	$(if $(CONFIG_NET_LWIP), -I$(srctree)/lib/lwip/lwip/src/include \
+		-I$(srctree)/lib/lwip/u-boot)
 
 NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
 
include/net-common.h new file +485 -0

485 lines not on this page · raw message

include/net-legacy.h new file +560 -0

560 lines not on this page · raw message

include/net-lwip.h new file +14 -0
new file mode 100644
index 00000000000..5c3f9e7e86c
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __NET_LWIP_H__
+#define __NET_LWIP_H__
+
+#include <lwip/ip4.h>
+#include <lwip/netif.h>
+
+struct netif *net_lwip_new_netif(struct udevice *udev);
+struct netif *net_lwip_new_netif_noip(struct udevice *udev);
+void net_lwip_remove_netif(struct netif *netif);
+struct netif *net_lwip_get_netif(void);
+
+#endif /* __NET_LWIP_H__ */
include/net.h +4 -939

953 lines not on this page · raw message

Signature · 1 line
2.40.1
#18 lore raw

PATCH v9 17/37 net: move copy_filename() to new file net/net-common.c

In reply to Jerome Forissier

copy_filename() can be useful when NET_LWIP is enabled, therefore move it out of net/net.c which is built only when networking choice is NET.

---
 net/Makefile     |  2 ++
 net/net-common.c | 13 +++++++++++++
 net/net.c        | 12 ------------
 3 files changed, 15 insertions(+), 12 deletions(-)
 create mode 100644 net/net-common.c
net/Makefile +2 -0
index 70eec8caf0d..a9cecee637a 100644
@@ -42,3 +42,5 @@ obj-$(CONFIG_CMD_WGET) += wget.o
 CFLAGS_eth_common.o += -Wno-format-extra-args
 
 endif
+
+obj-y += net-common.o
net/net-common.c new file +13 -0
new file mode 100644
index 00000000000..a7f767d5e9c
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0
+
+void copy_filename(char *dst, const char *src, int size)
+{
+	if (src && *src && (*src == '"')) {
+		++src;
+		--size;
+	}
+
+	while ((--size > 0) && src && *src && (*src != '"'))
+		*dst++ = *src++;
+	*dst = '\0';
+}
net/net.c +0 -12
index d9bc9df643f..32629aa80ce 100644
@@ -1684,18 +1684,6 @@ void net_set_udp_header(uchar *pkt, struct in_addr dest, int dport, int sport,
 	ip->udp_xsum = 0;
 }
 
-void copy_filename(char *dst, const char *src, int size)
-{
-	if (src && *src && (*src == '"')) {
-		++src;
-		--size;
-	}
-
-	while ((--size > 0) && src && *src && (*src != '"'))
-		*dst++ = *src++;
-	*dst = '\0';
-}
-
 int is_serverip_in_cmd(void)
 {
 	return !!strchr(net_boot_file_name, ':');
Signature · 1 line
2.40.1
#19 lore raw

PATCH v9 18/37 net: eth-uclass: add function eth_start_udev()

In reply to Jerome Forissier

Add a function to start a given network device, and update eth_init() to use it.

---
 drivers/mtd/altera_qspi.c |  4 ++--
 include/net-common.h      |  1 +
 net/eth-uclass.c          | 38 +++++++++++++++++++++++++-------------
 3 files changed, 28 insertions(+), 15 deletions(-)
drivers/mtd/altera_qspi.c +2 -2
index c26615821c8..e5c8df750b7 100644
@@ -96,7 +96,7 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
 	ret = mtd_erase(mtd, &instr);
 	flash_set_verbose(0);
 	if (ret)
-		return ERR_PROTECTED;
+		return FL_ERR_PROTECTED;
 
 	puts(" done\n");
 	return 0;
@@ -114,7 +114,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
 
 	ret = mtd_write(mtd, to, cnt, &retlen, src);
 	if (ret)
-		return ERR_PROTECTED;
+		return FL_ERR_PROTECTED;
 
 	return 0;
 }
include/net-common.h +1 -0
index 26674ec7e90..43bc6b9a0d5 100644
@@ -192,6 +192,7 @@ int eth_env_set_enetaddr_by_index(const char *base_name, int index,
 int usb_ether_init(void);
 
 int eth_init(void);			/* Initialize the device */
+int eth_start_udev(struct udevice *dev);
 int eth_send(void *packet, int length);	   /* Send a packet */
 #if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER)
 int eth_receive(void *packet, int length); /* Receive a packet*/
net/eth-uclass.c +25 -13
index e34d7af0229..6dd9b9bb98e 100644
@@ -284,6 +284,27 @@ static int on_ethaddr(const char *name, const char *value, enum env_op op,
 }
 U_BOOT_ENV_CALLBACK(ethaddr, on_ethaddr);
 
+int eth_start_udev(struct udevice *dev)
+{
+	struct eth_device_priv *priv = dev_get_uclass_priv(dev);
+	int ret;
+
+	if (priv->running)
+		return 0;
+
+	if (!device_active(dev))
+		return -EINVAL;
+
+	ret = eth_get_ops(dev)->start(dev);
+	if (ret >= 0) {
+		priv->state = ETH_STATE_ACTIVE;
+		priv->running = true;
+		ret = 0;
+	}
+
+	return ret;
+}
+
 int eth_init(void)
 {
 	struct udevice *current = NULL;
@@ -328,20 +349,11 @@ int eth_init(void)
 		if (current) {
 			debug("Trying %s\n", current->name);
 
-			if (device_active(current)) {
-				ret = eth_get_ops(current)->start(current);
-				if (ret >= 0) {
-					struct eth_device_priv *priv =
-						dev_get_uclass_priv(current);
-
-					priv->state = ETH_STATE_ACTIVE;
-					priv->running = true;
-					ret = 0;
-					goto end;
-				}
-			} else {
+			ret = eth_start_udev(current);
+			if (ret < 0)
 				ret = eth_errno;
-			}
+			else
+				goto end;
 
 			debug("FAIL\n");
 		} else {
Signature · 1 line
2.40.1
#20 lore raw

Re: [PATCH v9 18/37] net: eth-uclass: add function eth_start_udev()

Hi Jerome,

Quoted 17 lines · Jerome Forissier

Add a function to start a given network device, and update eth_init() to use it.

---
 drivers/mtd/altera_qspi.c |  4 ++--
 include/net-common.h      |  1 +
 net/eth-uclass.c          | 38 +++++++++++++++++++++++++-------------
 3 files changed, 28 insertions(+), 15 deletions(-)
drivers/mtd/altera_qspi.c +0 -0
index c26615821c8..e5c8df750b7 100644

drivers/mtd/altera_qspi.c int flash_erase(flash_info_t *info, int s_first, int s_last) · line 99

Quoted 5 lines
drivers/mtd/altera_qspi.c +1 -1
@@ -96,7 +96,7 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
        ret = mtd_erase(mtd, &instr);
        flash_set_verbose(0);
        if (ret)
-               return ERR_PROTECTED;
+               return FL_ERR_PROTECTED;

Could you put these in another patch?

Quoted 17 lines
drivers/mtd/altera_qspi.c +1 -1
        puts(" done\n");
        return 0;
@@ -114,7 +114,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
 
        ret = mtd_write(mtd, to, cnt, &retlen, src);
        if (ret)
-               return ERR_PROTECTED;
+               return FL_ERR_PROTECTED;
 
        return 0;
 }
include/net-common.h +0 -0
index 26674ec7e90..43bc6b9a0d5 100644

include/net-common.h int eth_env_set_enetaddr_by_index(const char *base_name, int index, · line 195

Quoted 4 lines
include/net-common.h +1 -0
@@ -192,6 +192,7 @@ int eth_env_set_enetaddr_by_index(const char *base_name, int index,
 int usb_ether_init(void);
 
 int eth_init(void);                    /* Initialize the device */
+int eth_start_udev(struct udevice *dev);

Please add a proper function comment to all exported functions.

Quoted 14 lines
include/net-common.h +0 -0
 int eth_send(void *packet, int length);           /* Send a packet */
 #if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER)
 int eth_receive(void *packet, int length); /* Receive a packet*/
net/eth-uclass.c +3 -0
index e34d7af0229..6dd9b9bb98e 100644
@@ -284,6 +284,27 @@ static int on_ethaddr(const char *name, const char *value, enum env_op op,
 }
 U_BOOT_ENV_CALLBACK(ethaddr, on_ethaddr);
 
+int eth_start_udev(struct udevice *dev)
+{
+       struct eth_device_priv *priv = dev_get_uclass_priv(dev);

net/eth-uclass.c static int on_ethaddr(const char *name, const char *value, enum env_op op, · line 299

Quoted 10 lines
net/eth-uclass.c +10 -0
+       int ret;
+
+       if (priv->running)
+               return 0;
+
+       if (!device_active(dev))
+               return -EINVAL;
+
+       ret = eth_get_ops(dev)->start(dev);
+       if (ret >= 0) {

It is better to have the error path jump out, so:

if (ret < 0)
return ret;

net/eth-uclass.c static int on_ethaddr(const char *name, const char *value, enum env_op op, · line 305

Quoted 6 lines
net/eth-uclass.c +6 -0
+               priv->state = ETH_STATE_ACTIVE;
+               priv->running = true;
+               ret = 0;
+       }
+
+       return ret;

return 0

Quoted 17 lines
net/eth-uclass.c +2 -8
+}
+
 int eth_init(void)
 {
        struct udevice *current = NULL;
@@ -328,20 +349,11 @@ int eth_init(void)
                if (current) {
                        debug("Trying %s\n", current->name);
 
-                       if (device_active(current)) {
-                               ret = eth_get_ops(current)->start(current);
-                               if (ret >= 0) {
-                                       struct eth_device_priv *priv =
-                                               dev_get_uclass_priv(current);
-
-                                       priv->state = ETH_STATE_ACTIVE;
-                                       priv->running = true;

net/eth-uclass.c int eth_init(void) · line 356

Quoted 10 lines
net/eth-uclass.c +4 -5
-                                       ret = 0;
-                                       goto end;
-                               }
-                       } else {
+                       ret = eth_start_udev(current);
+                       if (ret < 0)
                                ret = eth_errno;
-                       }
+                       else
+                               goto end;

Can that be just a 'break' ?

Quoted 6 lines
net/eth-uclass.c +0 -1
                        debug("FAIL\n");
                } else {
--

2.40.1

Regards,
Simon

#21 lore raw

Re: [PATCH v9 18/37] net: eth-uclass: add function eth_start_udev()

Quoted 16 lines · Simon Glass

Hi Jerome,

Quoted 12 lines · Jerome Forissier

Add a function to start a given network device, and update eth_init() to use it.

---
 drivers/mtd/altera_qspi.c |  4 ++--
 include/net-common.h      |  1 +
 net/eth-uclass.c          | 38 +++++++++++++++++++++++++-------------
 3 files changed, 28 insertions(+), 15 deletions(-)
Quoted 12 lines

drivers/mtd/altera_qspi.c int flash_erase(flash_info_t *info, int s_first, int s_last) · line 99

Quoted 10 lines
drivers/mtd/altera_qspi.c +1 -1
index c26615821c8..e5c8df750b7 100644
@@ -96,7 +96,7 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
        ret = mtd_erase(mtd, &instr);
        flash_set_verbose(0);
        if (ret)
-               return ERR_PROTECTED;
+               return FL_ERR_PROTECTED;

Could you put these in another patch?

Oops! They belong in "flash: prefix error codes with FL_" [1] in my "Miscellaneous fixes" series which I will update too.

[1] https://lists.denx.de/pipermail/u-boot/2024-August/563326.html

Quoted 18 lines
Quoted 18 lines
drivers/mtd/altera_qspi.c +1 -1
        puts(" done\n");
        return 0;
@@ -114,7 +114,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
 
        ret = mtd_write(mtd, to, cnt, &retlen, src);
        if (ret)
-               return ERR_PROTECTED;
+               return FL_ERR_PROTECTED;
 
        return 0;
 }
include/net-common.h +0 -0
index 26674ec7e90..43bc6b9a0d5 100644
@@ -192,6 +192,7 @@ int eth_env_set_enetaddr_by_index(const char *base_name, int index,
 int usb_ether_init(void);
 
Quoted 4 lines

include/net-common.h int eth_env_set_enetaddr_by_index(const char *base_name, int index, · line 195

Quoted 2 lines
include/net-common.h +1 -0
 int eth_init(void);                    /* Initialize the device */
+int eth_start_udev(struct udevice *dev);

Please add a proper function comment to all exported functions.

OK

Quoted 27 lines
Quoted 14 lines
include/net-common.h +0 -0
 int eth_send(void *packet, int length);           /* Send a packet */
 #if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER)
 int eth_receive(void *packet, int length); /* Receive a packet*/
net/eth-uclass.c +3 -0
index e34d7af0229..6dd9b9bb98e 100644
@@ -284,6 +284,27 @@ static int on_ethaddr(const char *name, const char *value, enum env_op op,
 }
 U_BOOT_ENV_CALLBACK(ethaddr, on_ethaddr);
 
+int eth_start_udev(struct udevice *dev)
+{
+       struct eth_device_priv *priv = dev_get_uclass_priv(dev);

net/eth-uclass.c static int on_ethaddr(const char *name, const char *value, enum env_op op, · line 299

Quoted 10 lines
net/eth-uclass.c +10 -0
+       int ret;
+
+       if (priv->running)
+               return 0;
+
+       if (!device_active(dev))
+               return -EINVAL;
+
+       ret = eth_get_ops(dev)->start(dev);
+       if (ret >= 0) {

It is better to have the error path jump out, so:

Quoted 2 lines

if (ret < 0)
return ret;

OK

Quoted 8 lines

net/eth-uclass.c static int on_ethaddr(const char *name, const char *value, enum env_op op, · line 305

Quoted 6 lines
net/eth-uclass.c +6 -0
+               priv->state = ETH_STATE_ACTIVE;
+               priv->running = true;
+               ret = 0;
+       }
+
+       return ret;

return 0

OK

Quoted 21 lines
Quoted 21 lines
net/eth-uclass.c +2 -12
+}
+
 int eth_init(void)
 {
        struct udevice *current = NULL;
@@ -328,20 +349,11 @@ int eth_init(void)
                if (current) {
                        debug("Trying %s\n", current->name);
 
-                       if (device_active(current)) {
-                               ret = eth_get_ops(current)->start(current);
-                               if (ret >= 0) {
-                                       struct eth_device_priv *priv =
-                                               dev_get_uclass_priv(current);
-
-                                       priv->state = ETH_STATE_ACTIVE;
-                                       priv->running = true;
-                                       ret = 0;
-                                       goto end;
-                               }
-                       } else {
Quoted 8 lines

net/eth-uclass.c int eth_init(void) · line 356

Quoted 6 lines
net/eth-uclass.c +4 -1
+                       ret = eth_start_udev(current);
+                       if (ret < 0)
                                ret = eth_errno;
-                       }
+                       else
+                               goto end;

Can that be just a 'break' ?

Yep.

Quoted 9 lines
Quoted 6 lines
net/eth-uclass.c +0 -1
                        debug("FAIL\n");
                } else {
--

2.40.1

Regards,
Simon

Thanks,

Signature · 1 line
Jerome
#22 lore raw

PATCH v9 19/37 net-lwip: build lwIP

In reply to Jerome Forissier

Build the lwIP library when NET_LWIP is enabled. The following files are adaptation layers written specially for U-Boot:

lib/lwip/u-boot/arch/cc.h
lib/lwip/u-boot/arch/sys_arch.h (empty)
lib/lwip/u-boot/limits.h (empty)
lib/lwip/u-boot/lwipopts.h

They were initially contributed by Maxim in a previous RFC patch series.

---
 lib/Makefile                    |   2 +
 lib/lwip/Makefile               |  55 +++++++++++
 lib/lwip/u-boot/arch/cc.h       |  45 +++++++++
 lib/lwip/u-boot/arch/sys_arch.h |   0
 lib/lwip/u-boot/limits.h        |   0
 lib/lwip/u-boot/lwipopts.h      | 157 ++++++++++++++++++++++++++++++++
 net/lwip/Kconfig                |  10 ++
 7 files changed, 269 insertions(+)
 create mode 100644 lib/lwip/Makefile
 create mode 100644 lib/lwip/u-boot/arch/cc.h
 create mode 100644 lib/lwip/u-boot/arch/sys_arch.h
 create mode 100644 lib/lwip/u-boot/limits.h
 create mode 100644 lib/lwip/u-boot/lwipopts.h
lib/Makefile +2 -0
index e389ad014f8..7378d907258 100644
@@ -96,6 +96,8 @@ obj-$(CONFIG_LIBAVB) += libavb/
 obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += libfdt/
 obj-$(CONFIG_$(SPL_TPL_)OF_REAL) += fdtdec_common.o fdtdec.o
 
+obj-$(CONFIG_NET_LWIP) += lwip/
+
 ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16-ccitt.o
 obj-$(CONFIG_$(SPL_TPL_)HASH) += crc16-ccitt.o
lib/lwip/Makefile new file +55 -0

55 lines not on this page · raw message

lib/lwip/u-boot/arch/cc.h new file +45 -0

45 lines not on this page · raw message

lib/lwip/u-boot/arch/sys_arch.h new file +0 -0
new file mode 100644
index 00000000000..e69de29bb2d
lib/lwip/u-boot/limits.h new file +0 -0
new file mode 100644
index 00000000000..e69de29bb2d
lib/lwip/u-boot/lwipopts.h new file +157 -0

157 lines not on this page · raw message

net/lwip/Kconfig +10 -0
index eb31d044197..4e2f4885f7a 100644
@@ -32,3 +32,13 @@ config PROT_TCP_SACK_LWIP
 
 config PROT_UDP_LWIP
 	bool
+
+config LWIP_TCP_WND
+	int "Value of TCP_WND"
+	default 3000000
+	help
+	  Default value for TCP_WND in the lwIP configuration
+	  Lower values result in slower wget transfer speeds in
+	  general, especially when the latency on the network is high,
+	  but QEMU with "-net user" needs no more than a few KB or the
+	  transfer will stall and eventually time out.
Signature · 1 line
2.40.1
#23 lore raw

PATCH v9 20/37 net-lwip: add DHCP support and dhcp commmand

In reply to Jerome Forissier

Add what it takes to enable NETDEVICES with NET_LWIP and enable DHCP as well as the dhcp command. CMD_TFTPBOOT is selected by BOOTMETH_EFI due to this code having an implicit dependency on do_tftpb().

---
 board/engicam/imx8mp/icore_mx8mp.c            |   2 +-
 .../imx8mp_debix_model_a.c                    |   2 +-
 board/ti/am335x/board.c                       |   3 +-
 board/xilinx/common/board.c                   |   3 +-
 boot/Kconfig                                  |   3 +-
 cmd/Kconfig                                   |  91 +++---
 cmd/Makefile                                  |   6 +-
 cmd/elf.c                                     |   2 +-
 cmd/net-lwip.c                                |  13 +
 common/board_r.c                              |   4 +-
 common/usb_kbd.c                              |   2 +-
 drivers/net/Kconfig                           |   2 +-
 include/net-lwip.h                            |   3 +
 lib/tiny-printf.c                             |   3 +-
 net/Makefile                                  |  14 +-
 net/lwip/Makefile                             |   5 +
 net/lwip/dhcp.c                               | 125 ++++++++
 net/lwip/eth_internal.h                       |  35 +++
 net/lwip/net-lwip.c                           | 286 ++++++++++++++++++
 net/lwip/tftp.c                               |  11 +
 20 files changed, 560 insertions(+), 55 deletions(-)
 create mode 100644 cmd/net-lwip.c
 create mode 100644 net/lwip/Makefile
 create mode 100644 net/lwip/dhcp.c
 create mode 100644 net/lwip/eth_internal.h
 create mode 100644 net/lwip/net-lwip.c
 create mode 100644 net/lwip/tftp.c
board/engicam/imx8mp/icore_mx8mp.c +1 -1
index e2ed70caa43..bfdc447c478 100644
@@ -33,7 +33,7 @@ static void setup_fec(void)
 	setbits_le32(&gpr->gpr[1], BIT(22));
 }
 
-#if CONFIG_IS_ENABLED(NET)
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
 int board_phy_config(struct phy_device *phydev)
 {
 	if (phydev->drv->config)
board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c +1 -1
index 112770ba493..c709d017483 100644
@@ -29,7 +29,7 @@ static void setup_fec(void)
 	setbits_le32(&gpr->gpr[1], BIT(22));
 }
 
-#if CONFIG_IS_ENABLED(NET)
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
 int board_phy_config(struct phy_device *phydev)
 {
 	if (phydev->drv->config)
board/ti/am335x/board.c +2 -1
index 681002ba1da..249c9fd2e7e 100644
@@ -900,7 +900,8 @@ int board_late_init(void)
 #endif
 
 /* CPSW plat */
-#if CONFIG_IS_ENABLED(NET) && !CONFIG_IS_ENABLED(OF_CONTROL)
+#if (CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)) && \
+    !CONFIG_IS_ENABLED(OF_CONTROL)
 struct cpsw_slave_data slave_data[] = {
 	{
 		.slave_reg_ofs  = CPSW_SLAVE0_OFFSET,
board/xilinx/common/board.c +2 -1
index 0b43407b9e9..c2be31afa6b 100644
@@ -495,7 +495,8 @@ int board_late_init_xilinx(void)
 				ret |= env_set_by_index("uuid", id, uuid);
 			}
 
-			if (!CONFIG_IS_ENABLED(NET))
+			if (!(CONFIG_IS_ENABLED(NET) ||
+			      CONFIG_IS_ENABLED(NET_LWIP)))
 				continue;
 
 			for (i = 0; i < EEPROM_HDR_NO_OF_MAC_ADDR; i++) {
boot/Kconfig +2 -1
index 5762de87b21..fc133fe0ffa 100644
@@ -380,7 +380,7 @@ config BOOT_DEFAULTS_CMDS
 	select CMD_PART if PARTITIONS
 	select CMD_DHCP if CMD_NET
 	select CMD_PING if CMD_NET
-	select CMD_PXE if CMD_NET
+	select CMD_PXE if (CMD_NET && !NET_LWIP)
 	select CMD_BOOTI if ARM64
 	select CMD_BOOTZ if ARM && !ARM64
 	imply CMD_MII if NET
@@ -558,6 +558,7 @@ config BOOTMETH_EXTLINUX_PXE
 config BOOTMETH_EFILOADER
 	bool "Bootdev support for EFI boot"
 	depends on EFI_BINARY_EXEC
+	select CMD_TFTPBOOT if CMD_NET
 	default y
 	help
 	  Enables support for EFI boot using bootdevs. This makes the
cmd/Kconfig +53 -38

138 lines not on this page · raw message

cmd/Makefile +5 -1
index 87133cc27a8..fe733cf6ba9 100644
@@ -127,7 +127,11 @@ obj-y += legacy-mtd-utils.o
 endif
 obj-$(CONFIG_CMD_MUX) += mux.o
 obj-$(CONFIG_CMD_NAND) += nand.o
-obj-$(CONFIG_CMD_NET) += net.o
+ifdef CONFIG_CMD_NET
+obj-$(CONFIG_NET) += net.o
+obj-$(CONFIG_NET_LWIP) += net-lwip.o
+CFLAGS_net-lwip.o := -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot
+endif
 obj-$(CONFIG_ENV_SUPPORT) += nvedit.o
 obj-$(CONFIG_CMD_NVEDIT_EFI) += nvedit_efi.o
 obj-$(CONFIG_CMD_ONENAND) += onenand.o
cmd/elf.c +1 -1
index 673c6c30511..c2c048d243f 100644
@@ -130,7 +130,7 @@ int do_bootvx(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 	else
 		addr = hextoul(argv[1], NULL);
 
-#if defined(CONFIG_CMD_NET)
+#if defined(CONFIG_CMD_NET) && !defined(CONFIG_NET_LWIP)
 	/*
 	 * Check to see if we need to tftp the image ourselves
 	 * before starting
cmd/net-lwip.c new file +13 -0
new file mode 100644
index 00000000000..82edb5fd2e6
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
+/* Copyright (C) 2024 Linaro Ltd. */
+
+#include <command.h>
+#include <net.h>
+
+#if defined(CONFIG_CMD_DHCP)
+U_BOOT_CMD(
+        dhcp,   3,      1,      do_dhcp,
+        "boot image via network using DHCP/TFTP protocol",
+        "[loadAddress] [[hostIPaddr:]bootfilename]"
+);
+#endif
common/board_r.c +2 -2
index d4ba245ac69..5e122c6778b 100644
@@ -471,7 +471,7 @@ static int initr_status_led(void)
 }
 #endif
 
-#ifdef CONFIG_CMD_NET
+#if defined(CONFIG_CMD_NET)
 static int initr_net(void)
 {
 	puts("Net:   ");
@@ -726,7 +726,7 @@ static init_fnc_t init_sequence_r[] = {
 #ifdef CONFIG_PCI_ENDPOINT
 	pci_ep_init,
 #endif
-#ifdef CONFIG_CMD_NET
+#if defined(CONFIG_CMD_NET)
 	INIT_FUNC_WATCHDOG_RESET
 	initr_net,
 #endif
common/usb_kbd.c +1 -1
index f3b4a3c94e6..1a7d8ca9a67 100644
@@ -418,7 +418,7 @@ static int usb_kbd_testc(struct stdio_dev *sdev)
 	 */
 	unsigned long poll_delay = CONFIG_SYS_HZ / 50;
 
-#ifdef CONFIG_CMD_NET
+#if defined(CONFIG_CMD_NET) && !defined(CONFIG_NET_LWIP)
 	/*
 	 * If net_busy_flag is 1, NET transfer is running,
 	 * then we check key-pressed every second (first check may be
drivers/net/Kconfig +1 -1
index eba0bf8b1f1..33aa4ecf658 100644
@@ -97,7 +97,7 @@ config DSA_SANDBOX
 
 menuconfig NETDEVICES
 	bool "Network device support"
-	depends on NET
+	depends on NET || NET_LWIP
 	select DM_ETH
 	help
 	  You must select Y to enable any network device support
include/net-lwip.h +3 -0
index 5c3f9e7e86c..cfd06726577 100644
@@ -10,5 +10,8 @@ struct netif *net_lwip_new_netif(struct udevice *udev);
 struct netif *net_lwip_new_netif_noip(struct udevice *udev);
 void net_lwip_remove_netif(struct netif *netif);
 struct netif *net_lwip_get_netif(void);
+int net_lwip_rx(struct udevice *udev, struct netif *netif);
+
+int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 
 #endif /* __NET_LWIP_H__ */
lib/tiny-printf.c +2 -1
index 9a70c6095b3..f6727360097 100644
@@ -269,7 +269,8 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va)
 				}
 				break;
 			case 'p':
-				if (CONFIG_IS_ENABLED(NET) || _DEBUG) {
+				if (CONFIG_IS_ENABLED(NET) ||
+				    CONFIG_IS_ENABLED(NET_LWIP) || _DEBUG) {
 					pointer(info, fmt, va_arg(va, void *));
 					/*
 					 * Skip this because it pulls in _ctype which is
net/Makefile +9 -5
index a9cecee637a..68370595a8e 100644
@@ -12,11 +12,6 @@ obj-$(CONFIG_CMD_BOOTP) += bootp.o
 obj-$(CONFIG_CMD_CDP)  += cdp.o
 obj-$(CONFIG_CMD_DNS)  += dns.o
 obj-$(CONFIG_DM_DSA)   += dsa-uclass.o
-obj-$(CONFIG_$(SPL_)DM_ETH) += eth-uclass.o
-obj-$(CONFIG_$(SPL_TPL_)BOOTDEV_ETH) += eth_bootdev.o
-obj-$(CONFIG_DM_MDIO)  += mdio-uclass.o
-obj-$(CONFIG_DM_MDIO_MUX) += mdio-mux-uclass.o
-obj-$(CONFIG_$(SPL_)DM_ETH) += eth_common.o
 obj-$(CONFIG_CMD_LINK_LOCAL) += link_local.o
 obj-$(CONFIG_IPV6)     += ndisc.o
 obj-$(CONFIG_$(SPL_)DM_ETH) += net.o
@@ -43,4 +38,13 @@ CFLAGS_eth_common.o += -Wno-format-extra-args
 
 endif
 
+ifeq ($(filter y,$(CONFIG_NET) $(CONFIG_NET_LWIP)),y)
+obj-$(CONFIG_$(SPL_TPL_)BOOTDEV_ETH) += eth_bootdev.o
+obj-$(CONFIG_DM_MDIO)  += mdio-uclass.o
+obj-$(CONFIG_DM_MDIO_MUX) += mdio-mux-uclass.o
+obj-$(CONFIG_$(SPL_)DM_ETH) += eth-uclass.o
+obj-$(CONFIG_$(SPL_)DM_ETH) += eth_common.o
 obj-y += net-common.o
+endif
+
+obj-$(CONFIG_NET_LWIP) += lwip/
net/lwip/Makefile new file +5 -0
new file mode 100644
index 00000000000..4e92a101ddb
@@ -0,0 +1,5 @@
+ccflags-y += -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot
+
+obj-$(CONFIG_$(SPL_)DM_ETH) += net-lwip.o
+obj-$(CONFIG_CMD_DHCP) += dhcp.o
+obj-$(CONFIG_CMD_TFTPBOOT) += tftp.o
net/lwip/dhcp.c new file +125 -0

125 lines not on this page · raw message

net/lwip/eth_internal.h new file +35 -0
new file mode 100644
index 00000000000..0b829a8d388
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * (C) Copyright 2001-2015
+ * Wolfgang Denk, DENX Software Engineering, [email protected].
+ * Joe Hershberger, National Instruments
+ */
+
+#ifndef __ETH_INTERNAL_H
+#define __ETH_INTERNAL_H
+
+/* Do init that is common to driver model and legacy networking */
+void eth_common_init(void);
+
+/**
+ * eth_env_set_enetaddr_by_index() - set the MAC address environment variable
+ *
+ * This sets up an environment variable with the given MAC address (@enetaddr).
+ * The environment variable to be set is defined by <@base_name><@index>addr.
+ * If @index is 0 it is omitted. For common Ethernet this means ethaddr,
+ * eth1addr, etc.
+ *
+ * @base_name:	Base name for variable, typically "eth"
+ * @index:	Index of interface being updated (>=0)
+ * @enetaddr:	Pointer to MAC address to put into the variable
+ * Return: 0 if OK, other value on error
+ */
+int eth_env_set_enetaddr_by_index(const char *base_name, int index,
+				 uchar *enetaddr);
+
+int eth_mac_skip(int index);
+void eth_current_changed(void);
+void eth_set_dev(struct udevice *dev);
+void eth_set_current_to_next(void);
+
+#endif
net/lwip/net-lwip.c new file +286 -0

286 lines not on this page · raw message

net/lwip/tftp.c new file +11 -0
new file mode 100644
index 00000000000..1fa246f55d9
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+
+/* Copyright (C) 2024 Linaro Ltd. */
+
+#include <command.h>
+#include <net-lwip.h>
+
+int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
+{
+	/* Not implemented */
+	return CMD_RET_FAILURE;
+}
Signature · 1 line
2.40.1
#24 lore raw

Re: [PATCH v9 20/37] net-lwip: add DHCP support and dhcp commmand

Hi Jerome,

Quoted 40 lines · Jerome Forissier

Add what it takes to enable NETDEVICES with NET_LWIP and enable DHCP as well as the dhcp command. CMD_TFTPBOOT is selected by BOOTMETH_EFI due to this code having an implicit dependency on do_tftpb().

---
 board/engicam/imx8mp/icore_mx8mp.c            |   2 +-
 .../imx8mp_debix_model_a.c                    |   2 +-
 board/ti/am335x/board.c                       |   3 +-
 board/xilinx/common/board.c                   |   3 +-
 boot/Kconfig                                  |   3 +-
 cmd/Kconfig                                   |  91 +++---
 cmd/Makefile                                  |   6 +-
 cmd/elf.c                                     |   2 +-
 cmd/net-lwip.c                                |  13 +
 common/board_r.c                              |   4 +-
 common/usb_kbd.c                              |   2 +-
 drivers/net/Kconfig                           |   2 +-
 include/net-lwip.h                            |   3 +
 lib/tiny-printf.c                             |   3 +-
 net/Makefile                                  |  14 +-
 net/lwip/Makefile                             |   5 +
 net/lwip/dhcp.c                               | 125 ++++++++
 net/lwip/eth_internal.h                       |  35 +++
 net/lwip/net-lwip.c                           | 286 ++++++++++++++++++
 net/lwip/tftp.c                               |  11 +
 20 files changed, 560 insertions(+), 55 deletions(-)
 create mode 100644 cmd/net-lwip.c
 create mode 100644 net/lwip/Makefile
 create mode 100644 net/lwip/dhcp.c
 create mode 100644 net/lwip/eth_internal.h
 create mode 100644 net/lwip/net-lwip.c
 create mode 100644 net/lwip/tftp.c
board/engicam/imx8mp/icore_mx8mp.c +0 -0
index e2ed70caa43..bfdc447c478 100644

board/engicam/imx8mp/icore_mx8mp.c static void setup_fec(void) · line 36

Quoted 5 lines
board/engicam/imx8mp/icore_mx8mp.c +1 -1
@@ -33,7 +33,7 @@ static void setup_fec(void)
        setbits_le32(&gpr->gpr[1], BIT(22));
 }
 
-#if CONFIG_IS_ENABLED(NET)
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)

How about making NET mean 'net', rather than having two options?

Perhaps the existing NET needs to be renamed to NET_INTERNAL or something like that?

Quoted 8 lines
board/engicam/imx8mp/icore_mx8mp.c +0 -0
 int board_phy_config(struct phy_device *phydev)
 {
        if (phydev->drv->config)
board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c +0 -0
index 112770ba493..c709d017483 100644

board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c static void setup_fec(void) · line 34

Quoted 7 lines
board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c +1 -1
@@ -29,7 +29,7 @@ static void setup_fec(void)
        setbits_le32(&gpr->gpr[1], BIT(22));
 }
 
-#if CONFIG_IS_ENABLED(NET)
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
 int board_phy_config(struct phy_device *phydev)
 {

[..]

Regards,
Simon

#25 lore raw

Re: [PATCH v9 20/37] net-lwip: add DHCP support and dhcp commmand

Hi Simon,

Quoted 47 lines · Simon Glass

Hi Jerome,

Quoted 43 lines · Jerome Forissier

Add what it takes to enable NETDEVICES with NET_LWIP and enable DHCP as well as the dhcp command. CMD_TFTPBOOT is selected by BOOTMETH_EFI due to this code having an implicit dependency on do_tftpb().

---
 board/engicam/imx8mp/icore_mx8mp.c            |   2 +-
 .../imx8mp_debix_model_a.c                    |   2 +-
 board/ti/am335x/board.c                       |   3 +-
 board/xilinx/common/board.c                   |   3 +-
 boot/Kconfig                                  |   3 +-
 cmd/Kconfig                                   |  91 +++---
 cmd/Makefile                                  |   6 +-
 cmd/elf.c                                     |   2 +-
 cmd/net-lwip.c                                |  13 +
 common/board_r.c                              |   4 +-
 common/usb_kbd.c                              |   2 +-
 drivers/net/Kconfig                           |   2 +-
 include/net-lwip.h                            |   3 +
 lib/tiny-printf.c                             |   3 +-
 net/Makefile                                  |  14 +-
 net/lwip/Makefile                             |   5 +
 net/lwip/dhcp.c                               | 125 ++++++++
 net/lwip/eth_internal.h                       |  35 +++
 net/lwip/net-lwip.c                           | 286 ++++++++++++++++++
 net/lwip/tftp.c                               |  11 +
 20 files changed, 560 insertions(+), 55 deletions(-)
 create mode 100644 cmd/net-lwip.c
 create mode 100644 net/lwip/Makefile
 create mode 100644 net/lwip/dhcp.c
 create mode 100644 net/lwip/eth_internal.h
 create mode 100644 net/lwip/net-lwip.c
 create mode 100644 net/lwip/tftp.c
board/engicam/imx8mp/icore_mx8mp.c +0 -0
index e2ed70caa43..bfdc447c478 100644
@@ -33,7 +33,7 @@ static void setup_fec(void)
        setbits_le32(&gpr->gpr[1], BIT(22));
 }
 
Quoted 7 lines

board/engicam/imx8mp/icore_mx8mp.c static void setup_fec(void) · line 36

Quoted 2 lines
board/engicam/imx8mp/icore_mx8mp.c +1 -1
-#if CONFIG_IS_ENABLED(NET)
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)

How about making NET mean 'net', rather than having two options?

Perhaps the existing NET needs to be renamed to NET_INTERNAL or something like that?

The problem with that is it will make it a bit harder to remove the legacy NET implementation, because every occurrence of "if NET" would need to be questioned if it is applicable to NET_INTERNAL only or to NET_LWIP too. IOW, some of the thinking already done here would need to be done again.

Quoted 18 lines
Quoted 15 lines
board/engicam/imx8mp/icore_mx8mp.c +0 -0
 int board_phy_config(struct phy_device *phydev)
 {
        if (phydev->drv->config)
board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c +1 -1
index 112770ba493..c709d017483 100644
@@ -29,7 +29,7 @@ static void setup_fec(void)
        setbits_le32(&gpr->gpr[1], BIT(22));
 }
 
-#if CONFIG_IS_ENABLED(NET)
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
 int board_phy_config(struct phy_device *phydev)
 {

[..]

Quoted 2 lines

Regards,
Simon

Regards,

Signature · 1 line
Jerome
#26 lore raw

Re: [PATCH v9 20/37] net-lwip: add DHCP support and dhcp commmand

Quoted 55 lines · Jerome Forissier

Hi Simon,

Quoted 52 lines · Simon Glass

Hi Jerome,

Quoted 40 lines · Jerome Forissier

Add what it takes to enable NETDEVICES with NET_LWIP and enable DHCP as well as the dhcp command. CMD_TFTPBOOT is selected by BOOTMETH_EFI due to this code having an implicit dependency on do_tftpb().

---
 board/engicam/imx8mp/icore_mx8mp.c            |   2 +-
 .../imx8mp_debix_model_a.c                    |   2 +-
 board/ti/am335x/board.c                       |   3 +-
 board/xilinx/common/board.c                   |   3 +-
 boot/Kconfig                                  |   3 +-
 cmd/Kconfig                                   |  91 +++---
 cmd/Makefile                                  |   6 +-
 cmd/elf.c                                     |   2 +-
 cmd/net-lwip.c                                |  13 +
 common/board_r.c                              |   4 +-
 common/usb_kbd.c                              |   2 +-
 drivers/net/Kconfig                           |   2 +-
 include/net-lwip.h                            |   3 +
 lib/tiny-printf.c                             |   3 +-
 net/Makefile                                  |  14 +-
 net/lwip/Makefile                             |   5 +
 net/lwip/dhcp.c                               | 125 ++++++++
 net/lwip/eth_internal.h                       |  35 +++
 net/lwip/net-lwip.c                           | 286 ++++++++++++++++++
 net/lwip/tftp.c                               |  11 +
 20 files changed, 560 insertions(+), 55 deletions(-)
 create mode 100644 cmd/net-lwip.c
 create mode 100644 net/lwip/Makefile
 create mode 100644 net/lwip/dhcp.c
 create mode 100644 net/lwip/eth_internal.h
 create mode 100644 net/lwip/net-lwip.c
 create mode 100644 net/lwip/tftp.c
board/engicam/imx8mp/icore_mx8mp.c +0 -0
index e2ed70caa43..bfdc447c478 100644

board/engicam/imx8mp/icore_mx8mp.c static void setup_fec(void) · line 36

Quoted 5 lines
board/engicam/imx8mp/icore_mx8mp.c +1 -1
@@ -33,7 +33,7 @@ static void setup_fec(void)
        setbits_le32(&gpr->gpr[1], BIT(22));
 }
 
-#if CONFIG_IS_ENABLED(NET)
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)

How about making NET mean 'net', rather than having two options?

Quoted 8 lines
Quoted 2 lines

Perhaps the existing NET needs to be renamed to NET_INTERNAL or something like that?

The problem with that is it will make it a bit harder to remove the legacy NET implementation, because every occurrence of "if NET" would need to be questioned if it is applicable to NET_INTERNAL only or to NET_LWIP too. IOW, some of the thinking already done here would need to be done again.

Would a new symbol instead help? Make both NET and NEW_LWIP select HAS_NETWORKING or something along those lines.

Signature · 1 line
Tom
#27 lore raw

Re: [PATCH v9 20/37] net-lwip: add DHCP support and dhcp commmand

Quoted 59 lines · Tom Rini
Quoted 58 lines · Jerome Forissier

Hi Simon,

Quoted 54 lines · Simon Glass

Hi Jerome,

Quoted 40 lines · Jerome Forissier

Add what it takes to enable NETDEVICES with NET_LWIP and enable DHCP as well as the dhcp command. CMD_TFTPBOOT is selected by BOOTMETH_EFI due to this code having an implicit dependency on do_tftpb().

---
 board/engicam/imx8mp/icore_mx8mp.c            |   2 +-
 .../imx8mp_debix_model_a.c                    |   2 +-
 board/ti/am335x/board.c                       |   3 +-
 board/xilinx/common/board.c                   |   3 +-
 boot/Kconfig                                  |   3 +-
 cmd/Kconfig                                   |  91 +++---
 cmd/Makefile                                  |   6 +-
 cmd/elf.c                                     |   2 +-
 cmd/net-lwip.c                                |  13 +
 common/board_r.c                              |   4 +-
 common/usb_kbd.c                              |   2 +-
 drivers/net/Kconfig                           |   2 +-
 include/net-lwip.h                            |   3 +
 lib/tiny-printf.c                             |   3 +-
 net/Makefile                                  |  14 +-
 net/lwip/Makefile                             |   5 +
 net/lwip/dhcp.c                               | 125 ++++++++
 net/lwip/eth_internal.h                       |  35 +++
 net/lwip/net-lwip.c                           | 286 ++++++++++++++++++
 net/lwip/tftp.c                               |  11 +
 20 files changed, 560 insertions(+), 55 deletions(-)
 create mode 100644 cmd/net-lwip.c
 create mode 100644 net/lwip/Makefile
 create mode 100644 net/lwip/dhcp.c
 create mode 100644 net/lwip/eth_internal.h
 create mode 100644 net/lwip/net-lwip.c
 create mode 100644 net/lwip/tftp.c
board/engicam/imx8mp/icore_mx8mp.c +0 -0
index e2ed70caa43..bfdc447c478 100644

board/engicam/imx8mp/icore_mx8mp.c static void setup_fec(void) · line 36

Quoted 5 lines
board/engicam/imx8mp/icore_mx8mp.c +1 -1
@@ -33,7 +33,7 @@ static void setup_fec(void)
        setbits_le32(&gpr->gpr[1], BIT(22));
 }
 
-#if CONFIG_IS_ENABLED(NET)
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)

How about making NET mean 'net', rather than having two options?

Perhaps the existing NET needs to be renamed to NET_INTERNAL or something like that?

Quoted 8 lines
Quoted 5 lines

The problem with that is it will make it a bit harder to remove the legacy NET implementation, because every occurrence of "if NET" would need to be questioned if it is applicable to NET_INTERNAL only or to NET_LWIP too. IOW, some of the thinking already done here would need to be done again.

Would a new symbol instead help? Make both NET and NEW_LWIP select HAS_NETWORKING or something along those lines.

Well in principle this HAS_NETWORKING would be !NO_NET, wouldn't it?

Signature · 1 line
Jerome
#28 lore raw

Re: [PATCH v9 20/37] net-lwip: add DHCP support and dhcp commmand

Quoted 68 lines · Jerome Forissier
Quoted 65 lines · Tom Rini
Quoted 63 lines · Jerome Forissier

Hi Simon,

Quoted 47 lines · Simon Glass

Hi Jerome,

Quoted 43 lines · Jerome Forissier

Add what it takes to enable NETDEVICES with NET_LWIP and enable DHCP as well as the dhcp command. CMD_TFTPBOOT is selected by BOOTMETH_EFI due to this code having an implicit dependency on do_tftpb().

---
 board/engicam/imx8mp/icore_mx8mp.c            |   2 +-
 .../imx8mp_debix_model_a.c                    |   2 +-
 board/ti/am335x/board.c                       |   3 +-
 board/xilinx/common/board.c                   |   3 +-
 boot/Kconfig                                  |   3 +-
 cmd/Kconfig                                   |  91 +++---
 cmd/Makefile                                  |   6 +-
 cmd/elf.c                                     |   2 +-
 cmd/net-lwip.c                                |  13 +
 common/board_r.c                              |   4 +-
 common/usb_kbd.c                              |   2 +-
 drivers/net/Kconfig                           |   2 +-
 include/net-lwip.h                            |   3 +
 lib/tiny-printf.c                             |   3 +-
 net/Makefile                                  |  14 +-
 net/lwip/Makefile                             |   5 +
 net/lwip/dhcp.c                               | 125 ++++++++
 net/lwip/eth_internal.h                       |  35 +++
 net/lwip/net-lwip.c                           | 286 ++++++++++++++++++
 net/lwip/tftp.c                               |  11 +
 20 files changed, 560 insertions(+), 55 deletions(-)
 create mode 100644 cmd/net-lwip.c
 create mode 100644 net/lwip/Makefile
 create mode 100644 net/lwip/dhcp.c
 create mode 100644 net/lwip/eth_internal.h
 create mode 100644 net/lwip/net-lwip.c
 create mode 100644 net/lwip/tftp.c
board/engicam/imx8mp/icore_mx8mp.c +0 -0
index e2ed70caa43..bfdc447c478 100644
@@ -33,7 +33,7 @@ static void setup_fec(void)
        setbits_le32(&gpr->gpr[1], BIT(22));
 }
 
Quoted 7 lines

board/engicam/imx8mp/icore_mx8mp.c static void setup_fec(void) · line 36

Quoted 2 lines
board/engicam/imx8mp/icore_mx8mp.c +1 -1
-#if CONFIG_IS_ENABLED(NET)
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)

How about making NET mean 'net', rather than having two options?

Perhaps the existing NET needs to be renamed to NET_INTERNAL or something like that?

The problem with that is it will make it a bit harder to remove the legacy NET implementation, because every occurrence of "if NET" would need to be questioned if it is applicable to NET_INTERNAL only or to NET_LWIP too. IOW, some of the thinking already done here would need to be done again.

Quoted 4 lines
Quoted 2 lines

Would a new symbol instead help? Make both NET and NEW_LWIP select HAS_NETWORKING or something along those lines.

Well in principle this HAS_NETWORKING would be !NO_NET, wouldn't it?

Yes, yes it would.

Signature · 1 line
Tom
#29 lore raw

PATCH v9 21/37 net-lwip: add TFTP support and tftpboot command

In reply to Jerome Forissier

Implement do_tftpb(). This implementation of the tftp command supports an optional port number. For example:

tftp 192.168.0.30:9069:file.bin

It also supports taking the server IP from ${tftpserverip} if defined, before falling back to ${serverip}.

---
 cmd/Kconfig          |   3 +-
 cmd/net-lwip.c       |   8 ++
 include/net-common.h |   4 +
 include/net-lwip.h   |   4 +
 net/lwip/dhcp.c      |  11 +-
 net/lwip/net-lwip.c  |  16 +++
 net/lwip/tftp.c      | 279 ++++++++++++++++++++++++++++++++++++++++++-
 7 files changed, 319 insertions(+), 6 deletions(-)
cmd/Kconfig +1 -2
index 4084ecf0dfd..fd841cd4e53 100644
@@ -2108,10 +2108,9 @@ config CMD_MDIO
 config CMD_TFTPBOOT
 	bool "tftp"
 	select PROT_UDP_LWIP if NET_LWIP
-	default n
+	default y
 	help
 	  tftpboot - load file via network using TFTP protocol
-	  Currently a placeholder (not implemented) when NET_LWIP=y.
 
 endif  # if CMD_NET
 
cmd/net-lwip.c +8 -0
index 82edb5fd2e6..80f0872bb8f 100644
@@ -11,3 +11,11 @@ U_BOOT_CMD(
         "[loadAddress] [[hostIPaddr:]bootfilename]"
 );
 #endif
+
+#if defined(CONFIG_CMD_TFTPBOOT)
+U_BOOT_CMD(
+	tftpboot,	3,	0,	do_tftpb,
+	"boot image via network using TFTP protocol\n",
+	"[loadAddress] [[hostIPaddr:]bootfilename]"
+);
+#endif
include/net-common.h +4 -0
index 43bc6b9a0d5..77d9fff18d2 100644
@@ -440,6 +440,10 @@ static inline struct in_addr env_get_ip(char *var)
 
 int net_init(void);
 
+/* NET compatibility */
+enum proto_t;
+int net_loop(enum proto_t protocol);
+
 /**
  * dhcp_run() - Run DHCP on the current ethernet device
  *
include/net-lwip.h +4 -0
index cfd06726577..37744b0e2cd 100644
@@ -6,6 +6,10 @@
 #include <lwip/ip4.h>
 #include <lwip/netif.h>
 
+enum proto_t {
+	TFTPGET
+};
+
 struct netif *net_lwip_new_netif(struct udevice *udev);
 struct netif *net_lwip_new_netif_noip(struct udevice *udev);
 void net_lwip_remove_netif(struct netif *netif);
net/lwip/dhcp.c +10 -1
index e492ad82a9b..2b5d51924af 100644
@@ -114,11 +114,20 @@ int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 int dhcp_run(ulong addr, const char *fname, bool autoload)
 {
 	char *dhcp_argv[] = {"dhcp", NULL, };
+#ifdef CONFIG_CMD_TFTPBOOT
+	char *tftp_argv[] = {"tftpboot", boot_file_name, NULL, };
+#endif
 	struct cmd_tbl cmdtp = {};	/* dummy */
 
 	if (autoload) {
-		/* Will be supported when TFTP is added */
+#ifdef CONFIG_CMD_TFTPBOOT
+		/* Assume DHCP was already performed */
+		if (boot_file_name[0])
+			return do_tftpb(&cmdtp, 0, 2, tftp_argv);
+		return 0;
+#else
 		return -EOPNOTSUPP;
+#endif
 	}
 
 	return do_dhcp(&cmdtp, 0, 1, dhcp_argv);
net/lwip/net-lwip.c +16 -0
index fa4ad2a65f8..dd8e3deeff4 100644
@@ -24,6 +24,7 @@ static uchar net_pkt_buf[(PKTBUFSRX) * PKTSIZE_ALIGN + PKTALIGN];
 uchar *net_rx_packets[PKTBUFSRX];
 uchar *net_rx_packet;
 const u8 net_bcast_ethaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
+char net_boot_file_name[1024];
 
 static err_t linkoutput(struct netif *netif, struct pbuf *p)
 {
@@ -280,6 +281,21 @@ void net_process_received_packet(uchar *in_packet, int len)
 #endif
 }
 
+int net_loop(enum proto_t protocol)
+{
+	char *argv[1];
+
+	switch (protocol) {
+	case TFTPGET:
+		argv[0] = "tftpboot";
+		return do_tftpb(NULL, 0, 1, argv);
+	default:
+		return -EINVAL;
+	}
+
+	return -EINVAL;
+}
+
 u32_t sys_now(void)
 {
 	return get_timer(0);
net/lwip/tftp.c +276 -3

286 lines not on this page · raw message

Signature · 1 line
2.40.1
#30 lore raw

PATCH v9 22/37 net-lwip: add ping command

In reply to Jerome Forissier

Add support for the the ping command with NET_LWIP. The implementation is derived from lwIP's contrib/apps/ping/ping.c.

---
 cmd/Kconfig        |  11 +--
 cmd/net-lwip.c     |   8 ++
 include/net-lwip.h |   1 +
 net/lwip/Makefile  |   1 +
 net/lwip/ping.c    | 177 +++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 193 insertions(+), 5 deletions(-)
 create mode 100644 net/lwip/ping.c
cmd/Kconfig +6 -5
index fd841cd4e53..844f3d25c4e 100644
@@ -2000,11 +2000,6 @@ config CMD_WGET
 	  wget is a simple command to download kernel, or other files,
 	  from a http server over TCP.
 
-config CMD_PING
-	bool "ping"
-	help
-	  Send ICMP ECHO_REQUEST to network host
-
 config CMD_PING6
 	bool "ping6"
 	depends on IPV6
@@ -2105,6 +2100,12 @@ config CMD_MDIO
 	  The MDIO interface is orthogonal to the MII interface and extends
 	  it by adding access to more registers through indirect addressing.
 
+config CMD_PING
+	bool "ping"
+	select PROT_RAW_LWIP if NET_LWIP
+	help
+	  Send ICMP ECHO_REQUEST to network host
+
 config CMD_TFTPBOOT
 	bool "tftp"
 	select PROT_UDP_LWIP if NET_LWIP
cmd/net-lwip.c +8 -0
index 80f0872bb8f..feed719beef 100644
@@ -12,6 +12,14 @@ U_BOOT_CMD(
 );
 #endif
 
+#if defined(CONFIG_CMD_PING)
+U_BOOT_CMD(
+	ping,	2,	1,	do_ping,
+	"send ICMP ECHO_REQUEST to network host",
+	"pingAddress"
+);
+#endif
+
 #if defined(CONFIG_CMD_TFTPBOOT)
 U_BOOT_CMD(
 	tftpboot,	3,	0,	do_tftpb,
include/net-lwip.h +1 -0
index 37744b0e2cd..9aa371e962c 100644
@@ -17,5 +17,6 @@ struct netif *net_lwip_get_netif(void);
 int net_lwip_rx(struct udevice *udev, struct netif *netif);
 
 int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 
 #endif /* __NET_LWIP_H__ */
net/lwip/Makefile +1 -0
index 4e92a101ddb..b5af37a9b18 100644
@@ -2,4 +2,5 @@ ccflags-y += -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot
 
 obj-$(CONFIG_$(SPL_)DM_ETH) += net-lwip.o
 obj-$(CONFIG_CMD_DHCP) += dhcp.o
+obj-$(CONFIG_CMD_PING) += ping.o
 obj-$(CONFIG_CMD_TFTPBOOT) += tftp.o
net/lwip/ping.c new file +177 -0

177 lines not on this page · raw message

Signature · 1 line
2.40.1
#31 lore raw

PATCH v9 23/37 net-lwip: add dns command

In reply to Jerome Forissier

Add CMD_DNS when NET_LWIP is enabled to provide the dns command using lwIP.

---
 cmd/Kconfig        |  11 ++--
 cmd/net-lwip.c     |   8 +++
 include/net-lwip.h |   1 +
 net/lwip/Makefile  |   1 +
 net/lwip/dns.c     | 127 +++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 143 insertions(+), 5 deletions(-)
 create mode 100644 net/lwip/dns.c
cmd/Kconfig +6 -5
index 844f3d25c4e..b26beb56fa2 100644
@@ -2018,11 +2018,6 @@ config CMD_SNTP
 	help
 	  Synchronize RTC via network
 
-config CMD_DNS
-	bool "dns"
-	help
-	  Lookup the IP of a hostname
-
 config CMD_LINK_LOCAL
 	bool "linklocal"
 	select LIB_RAND
@@ -2077,6 +2072,12 @@ config CMD_DHCP
 	help
 	  Boot image via network using DHCP/TFTP protocol
 
+config CMD_DNS
+	bool "dns"
+	select PROT_DNS_LWIP if NET_LWIP
+	help
+	  Lookup the IP of a hostname
+
 config CMD_MII
 	bool "mii"
 	imply CMD_MDIO
cmd/net-lwip.c +8 -0
index feed719beef..c021da6a674 100644
@@ -27,3 +27,11 @@ U_BOOT_CMD(
 	"[loadAddress] [[hostIPaddr:]bootfilename]"
 );
 #endif
+
+#if defined(CONFIG_CMD_DNS)
+U_BOOT_CMD(
+	dns,	3,	1,	do_dns,
+	"lookup the IP of a hostname",
+	"hostname [envvar]"
+);
+#endif
include/net-lwip.h +1 -0
index 9aa371e962c..ff9d03b23e8 100644
@@ -17,6 +17,7 @@ struct netif *net_lwip_get_netif(void);
 int net_lwip_rx(struct udevice *udev, struct netif *netif);
 
 int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 
 #endif /* __NET_LWIP_H__ */
net/lwip/Makefile +1 -0
index b5af37a9b18..645d8a8c457 100644
@@ -2,5 +2,6 @@ ccflags-y += -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot
 
 obj-$(CONFIG_$(SPL_)DM_ETH) += net-lwip.o
 obj-$(CONFIG_CMD_DHCP) += dhcp.o
+obj-$(CONFIG_CMD_DNS) += dns.o
 obj-$(CONFIG_CMD_PING) += ping.o
 obj-$(CONFIG_CMD_TFTPBOOT) += tftp.o
net/lwip/dns.c new file +127 -0

127 lines not on this page · raw message

Signature · 1 line
2.40.1
#32 lore raw

PATCH v9 24/37 net: split cmd/net.c into cmd/net.c and cmd/net-common.c

In reply to Jerome Forissier

Extract some code from cmd/net.c that will be useful in a subsequent commit to implement wget with NET_LWIP.

---
 cmd/Makefile     |   5 ++-
 cmd/net-common.c | 109 ++++++++++++++++++++++++++++++++++++++++++++
 cmd/net.c        | 115 -----------------------------------------------
 3 files changed, 113 insertions(+), 116 deletions(-)
 create mode 100644 cmd/net-common.c
cmd/Makefile +4 -1
index fe733cf6ba9..2c3de45a074 100644
@@ -130,7 +130,10 @@ obj-$(CONFIG_CMD_NAND) += nand.o
 ifdef CONFIG_CMD_NET
 obj-$(CONFIG_NET) += net.o
 obj-$(CONFIG_NET_LWIP) += net-lwip.o
-CFLAGS_net-lwip.o := -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot
+obj-$(filter y,$(CONFIG_CMD_NET) $(CONFIG_CMD_NET_LWIP)) += net-common.o
+lwip-includes := -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot
+CFLAGS_net-lwip.o := $(lwip-includes)
+CFLAGS_net-common.o := $(lwip-includes)
 endif
 obj-$(CONFIG_ENV_SUPPORT) += nvedit.o
 obj-$(CONFIG_CMD_NVEDIT_EFI) += nvedit_efi.o
cmd/net-common.c new file +109 -0

109 lines not on this page · raw message

cmd/net.c +0 -115

118 lines not on this page · raw message

Signature · 1 line
2.40.1
#33 lore raw

PATCH v9 25/37 net-lwip: add wget command

In reply to Jerome Forissier

Add support for the wget command with NET_LWIP. The command normally expects a URL: wget [loadaddr] url, but it also accepts the legacy
syntax: wget [loadaddr] [server:]file.
The server IP may alternatively be supplied via ${httpserverip} which has higher priority than ${serverip}.

Based on code initially developed by Maxim U.

---
 cmd/Kconfig        |  16 +-
 cmd/net-lwip.c     |   8 +
 include/net-lwip.h |  18 +++
 net/lwip/Makefile  |   1 +
 net/lwip/wget.c    | 363 +++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 399 insertions(+), 7 deletions(-)
 create mode 100644 net/lwip/wget.c
cmd/Kconfig +9 -7
index b26beb56fa2..fcefbbd5df0 100644
@@ -1993,13 +1993,6 @@ config SYS_DISABLE_AUTOLOAD
 	  is complete.  Enable this option to disable this behavior and instead
 	  require files to be loaded over the network by subsequent commands.
 
-config CMD_WGET
-	bool "wget"
-	select PROT_TCP
-	help
-	  wget is a simple command to download kernel, or other files,
-	  from a http server over TCP.
-
 config CMD_PING6
 	bool "ping6"
 	depends on IPV6
@@ -2114,6 +2107,15 @@ config CMD_TFTPBOOT
 	help
 	  tftpboot - load file via network using TFTP protocol
 
+config CMD_WGET
+	bool "wget"
+	select PROT_TCP if NET
+	select PROT_TCP_LWIP if NET_LWIP
+	select PROT_DNS_LWIP if NET_LWIP
+	help
+	  wget is a simple command to download kernel, or other files,
+	  from a http server over TCP.
+
 endif  # if CMD_NET
 
 endif  # if NET || NET_LWIP
cmd/net-lwip.c +8 -0
index c021da6a674..42f8bd6b259 100644
@@ -35,3 +35,11 @@ U_BOOT_CMD(
 	"hostname [envvar]"
 );
 #endif
+
+#if defined(CONFIG_CMD_WGET)
+U_BOOT_CMD(
+	wget,   3,      1,      do_wget,
+	"boot image via network using HTTP protocol",
+	"[loadAddress] URL"
+);
+#endif
include/net-lwip.h +18 -0
index ff9d03b23e8..1c3583f82a1 100644
@@ -16,8 +16,26 @@ void net_lwip_remove_netif(struct netif *netif);
 struct netif *net_lwip_get_netif(void);
 int net_lwip_rx(struct udevice *udev, struct netif *netif);
 
+/**
+ * wget_with_dns() - runs dns host IP address resulution before wget
+ *
+ * @dst_addr:	destination address to download the file
+ * @uri:	uri string of target file of wget
+ * Return:	downloaded file size, negative if failed
+ */
+
+int wget_with_dns(ulong dst_addr, char *uri);
+/**
+ * wget_validate_uri() - varidate the uri
+ *
+ * @uri:	uri string of target file of wget
+ * Return:	true if uri is valid, false if uri is invalid
+ */
+bool wget_validate_uri(char *uri);
+
 int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]);
 
 #endif /* __NET_LWIP_H__ */
net/lwip/Makefile +1 -0
index 645d8a8c457..f2558f8763a 100644
@@ -5,3 +5,4 @@ obj-$(CONFIG_CMD_DHCP) += dhcp.o
 obj-$(CONFIG_CMD_DNS) += dns.o
 obj-$(CONFIG_CMD_PING) += ping.o
 obj-$(CONFIG_CMD_TFTPBOOT) += tftp.o
+obj-$(CONFIG_CMD_WGET) += wget.o
net/lwip/wget.c new file +363 -0

363 lines not on this page · raw message

Signature · 1 line
2.40.1
#34 lore raw

PATCH v9 26/37 net-lwip: lwIP wget supports user defined port in the uri, so allow it.

In reply to Jerome Forissier

From: Jonathan Humphreys <[email protected]>

---
 net/lwip/wget.c | 6 ------
 1 file changed, 6 deletions(-)
net/lwip/wget.c +0 -6
index e8768fc2acd..b495ebd1aa9 100644
@@ -349,12 +349,6 @@ bool wget_validate_uri(char *uri)
 		ret = false;
 		goto out;
 	}
-	s = strchr(authority, ':');
-	if (s) {
-		log_err("user defined port is not supported\n");
-		ret = false;
-		goto out;
-	}
 
 out:
 	free(str_copy);
Signature · 1 line
2.40.1
#35 lore raw

PATCH v9 27/37 cmd: bdinfo: enable -e when CONFIG_CMD_NET_LWIP=y

In reply to Jerome Forissier

Support "bdinfo -e" when lwIP is selected.

---
 cmd/bdinfo.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
cmd/bdinfo.c +3 -2
index 437ac4e8630..472e5c42b08 100644
@@ -151,7 +151,7 @@ static int bdinfo_print_all(struct bd_info *bd)
 	bdinfo_print_num_l("relocaddr", gd->relocaddr);
 	bdinfo_print_num_l("reloc off", gd->reloc_off);
 	printf("%-12s= %u-bit\n", "Build", (uint)sizeof(void *) * 8);
-	if (IS_ENABLED(CONFIG_CMD_NET))
+	if (IS_ENABLED(CONFIG_CMD_NET) || IS_ENABLED(CONFIG_CMD_NET_LWIP))
 		print_eth();
 	bdinfo_print_num_l("fdt_blob", (ulong)map_to_sysmem(gd->fdt_blob));
 	bdinfo_print_num_l("new_fdt", (ulong)map_to_sysmem(gd->new_fdt));
@@ -197,7 +197,8 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 		case 'a':
 			return bdinfo_print_all(bd);
 		case 'e':
-			if (!IS_ENABLED(CONFIG_CMD_NET))
+			if (!IS_ENABLED(CONFIG_CMD_NET) &&
+			    !IS_ENABLED(CONFIG_CMD_NET_LWIP))
 				return CMD_RET_USAGE;
 			print_eth();
 			return CMD_RET_SUCCESS;
Signature · 1 line
2.40.1
#36 lore raw

PATCH v9 28/37 configs: add qemu_arm64_lwip_defconfig

In reply to Jerome Forissier

Add qemu_arm64_lwip_defconfig which #include's qemu_arm64_defconfig and selects NET_LWIP instead of NET. This config has all the supported net commands enabled.

---
 configs/qemu_arm64_lwip_defconfig | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 configs/qemu_arm64_lwip_defconfig
configs/qemu_arm64_lwip_defconfig new file +10 -0
new file mode 100644
index 00000000000..c7198340592
@@ -0,0 +1,10 @@
+#include <configs/qemu_arm64_defconfig>
+
+CONFIG_ARM=y
+CONFIG_ARCH_QEMU=y
+
+CONFIG_NET_LWIP=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_WGET=y
+CONFIG_EFI_HTTP_BOOT=y
+CONFIG_LWIP_TCP_WND=8000
Signature · 1 line
2.40.1
#37 lore raw

PATCH v9 29/37 lwip: tftp: add support of blksize option to client

In reply to Jerome Forissier

The TFTP protocol uses a default block size of 512 bytes. This value is sub-optimal for ethernet devices, which have a MTU (Maximum Transmission Unit) of 1500 bytes. When taking into acount the overhead of the IP and UDP layers, this leaves 1468 bytes for the TFTP payload.

This patch introduces a new function: tftp_client_set_blksize() which may be used to change the block size from the default. It has to be called after tftp_client_init() and before tftp_get(). If the server does not support the option, the client will still accept to receive 512-byte blocks.

---
 lib/lwip/lwip/src/apps/tftp/tftp.c            | 94 +++++++++++++++++--
 .../lwip/src/include/lwip/apps/tftp_client.h  |  1 +
 2 files changed, 89 insertions(+), 6 deletions(-)
lib/lwip/lwip/src/apps/tftp/tftp.c +88 -6
index ddfdbfc0c1b..e08e9665124 100644
@@ -57,7 +57,7 @@
 #include "lwip/timeouts.h"
 #include "lwip/debug.h"
 
-#define TFTP_MAX_PAYLOAD_SIZE 512
+#define TFTP_DEFAULT_BLOCK_SIZE 512
 #define TFTP_HEADER_LENGTH    4
 
 #define TFTP_RRQ   1
@@ -65,6 +65,7 @@
 #define TFTP_DATA  3
 #define TFTP_ACK   4
 #define TFTP_ERROR 5
+#define TFTP_OACK  6
 
 enum tftp_error {
   TFTP_ERROR_FILE_NOT_FOUND    = 1,
@@ -88,9 +89,11 @@ struct tftp_state {
   int timer;
   int last_pkt;
   u16_t blknum;
+  u16_t blksize;
   u8_t retries;
   u8_t mode_write;
   u8_t tftp_mode;
+  bool wait_oack;
 };
 
 static struct tftp_state tftp_state;
@@ -137,10 +140,24 @@ send_request(const ip_addr_t *addr, u16_t port, u16_t opcode, const char* fname,
 {
   size_t fname_length = strlen(fname)+1;
   size_t mode_length = strlen(mode)+1;
-  struct pbuf* p = init_packet(opcode, 0, fname_length + mode_length - 2);
+  size_t blksize_length = 0;
+  struct pbuf* p;
   char* payload;
   err_t ret;
 
+  if (tftp_state.blksize) {
+    blksize_length = 14; /* maximum (blksize is a u16_t): 'blksize\0XXXXX\0' */
+    if (tftp_state.blksize < 10000)
+	    blksize_length--;
+    if (tftp_state.blksize < 1000)
+	    blksize_length--;
+    if (tftp_state.blksize < 100)
+	    blksize_length--;
+    if (tftp_state.blksize < 10)
+	    blksize_length--;
+  }
+
+  p = init_packet(opcode, 0, fname_length + mode_length + blksize_length - 2);
   if (p == NULL) {
     return ERR_MEM;
   }
@@ -148,7 +165,10 @@ send_request(const ip_addr_t *addr, u16_t port, u16_t opcode, const char* fname,
   payload = (char*) p->payload;
   MEMCPY(payload+2,              fname, fname_length);
   MEMCPY(payload+2+fname_length, mode,  mode_length);
+  if (tftp_state.blksize)
+    sprintf(payload+2+fname_length+mode_length, "blksize%c%d%c", 0, tftp_state.blksize, 0);
 
+  tftp_state.wait_oack = true;
   ret = udp_sendto(tftp_state.upcb, p, addr, port);
   pbuf_free(p);
   return ret;
@@ -221,14 +241,14 @@ send_data(const ip_addr_t *addr, u16_t port)
     pbuf_free(tftp_state.last_data);
   }
 
-  tftp_state.last_data = init_packet(TFTP_DATA, tftp_state.blknum, TFTP_MAX_PAYLOAD_SIZE);
+  tftp_state.last_data = init_packet(TFTP_DATA, tftp_state.blknum, TFTP_DEFAULT_BLOCK_SIZE);
   if (tftp_state.last_data == NULL) {
     return;
   }
 
   payload = (u16_t *) tftp_state.last_data->payload;
 
-  ret = tftp_state.ctx->read(tftp_state.handle, &payload[2], TFTP_MAX_PAYLOAD_SIZE);
+  ret = tftp_state.ctx->read(tftp_state.handle, &payload[2], TFTP_DEFAULT_BLOCK_SIZE);
   if (ret < 0) {
     send_error(addr, port, TFTP_ERROR_ACCESS_VIOLATION, "Error occurred while reading the file.");
     close_handle();
@@ -239,6 +259,28 @@ send_data(const ip_addr_t *addr, u16_t port)
   resend_data(addr, port);
 }
 
+static u16_t payload_size(void)
+{
+  if (tftp_state.blksize)
+    return tftp_state.blksize;
+  return TFTP_DEFAULT_BLOCK_SIZE;
+}
+
+static const char *
+find_option(struct pbuf *p, const char *option)
+{
+  int i;
+  u16_t optlen = strlen(option);
+  const char *b = p->payload;
+
+  for (i = 0; i + optlen + 1 < p->len; i++) {
+    if (lwip_strnstr(b + i, option, optlen))
+      return b + i + optlen + 2;
+  }
+
+  return NULL;
+}
+
 static void
 tftp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16_t port)
 {
@@ -338,6 +380,15 @@ tftp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr
       }
 
       blknum = lwip_ntohs(sbuf[1]);
+      if (tftp_state.blksize && tftp_state.wait_oack) {
+        /*
+         * Data received while we are expecting an OACK for our blksize option.
+         * This means the server doesn't support it, let's switch back to the
+         * default block size.
+         */
+       tftp_state.blksize = 0;
+       tftp_state.wait_oack = false;
+      }
       if (blknum == tftp_state.blknum) {
         pbuf_remove_header(p, TFTP_HEADER_LENGTH);
 
@@ -349,7 +400,7 @@ tftp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr
           send_ack(addr, port, blknum);
         }
 
-        if (p->tot_len < TFTP_MAX_PAYLOAD_SIZE) {
+        if (p->tot_len < payload_size()) {
           close_handle();
         } else {
           tftp_state.blknum++;
@@ -386,7 +437,7 @@ tftp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr
       lastpkt = 0;
 
       if (tftp_state.last_data != NULL) {
-        lastpkt = tftp_state.last_data->tot_len != (TFTP_MAX_PAYLOAD_SIZE + TFTP_HEADER_LENGTH);
+        lastpkt = tftp_state.last_data->tot_len != (TFTP_DEFAULT_BLOCK_SIZE + TFTP_HEADER_LENGTH);
       }
 
       if (!lastpkt) {
@@ -405,6 +456,25 @@ tftp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr
         close_handle();
       }
       break;
+    case PP_HTONS(TFTP_OACK): {
+      const char *optval = find_option(p, "blksize");
+      u16_t srv_blksize = 0;
+      tftp_state.wait_oack = false;
+      if (optval) {
+	if (!tftp_state.blksize) {
+	  /* We did not request this option */
+          send_error(addr, port, TFTP_ERROR_ILLEGAL_OPERATION, "blksize unexpected");
+	}
+	srv_blksize = atoi(optval);
+	if (srv_blksize <= 0 || srv_blksize > tftp_state.blksize) {
+	  send_error(addr, port, TFTP_ERROR_ILLEGAL_OPERATION, "Invalid blksize");
+	}
+	LWIP_DEBUGF(TFTP_DEBUG | LWIP_DBG_STATE, ("tftp: accepting blksize=%d\n", srv_blksize));
+	tftp_state.blksize = srv_blksize;
+      }
+      send_ack(addr, port, 0);
+      break;
+    }
     default:
       send_error(addr, port, TFTP_ERROR_ILLEGAL_OPERATION, "Unknown operation");
       break;
@@ -493,6 +563,18 @@ tftp_init_client(const struct tftp_context *ctx)
   return tftp_init_common(LWIP_TFTP_MODE_CLIENT, ctx);
 }
 
+/** @ingroup tftp
+ * Set the block size to be used by the TFTP client. The server may choose to
+ * accept a lower value.
+ * @param blksize Block size in bytes
+ */
+void
+tftp_client_set_blksize(u16_t blksize)
+{
+  if (blksize != TFTP_DEFAULT_BLOCK_SIZE)
+    tftp_state.blksize = blksize;
+}
+
 /** @ingroup tftp
  * Deinitialize ("turn off") TFTP client/server.
  */
lib/lwip/lwip/src/include/lwip/apps/tftp_client.h +1 -0
index 24dbda6a8c9..e1e21d06b67 100644
@@ -44,6 +44,7 @@ enum tftp_transfer_mode {
 };
 
 err_t tftp_init_client(const struct tftp_context* ctx);
+void tftp_client_set_blksize(u16_t blksize);
 err_t tftp_get(void* handle, const ip_addr_t *addr, u16_t port, const char* fname, enum tftp_transfer_mode mode);
 err_t tftp_put(void* handle, const ip_addr_t *addr, u16_t port, const char* fname, enum tftp_transfer_mode mode);
 
Signature · 1 line
2.40.1
#38 lore raw

PATCH v9 30/37 net-lwip: add TFTP_BLOCKSIZE

In reply to Jerome Forissier

Add support for setting the TFTP block size. The default value (1468) is fine for Ethernet and allows a better throughput than the TFTP default (512), if the server supports the blksize option of course.

I tested this change with qemu_arm64_lwip_defconfig. The throughput is now 875 KiB/s vs. 313 KiB/s before. That is still a low number, but I think we can't expect more without implementing the windowsize option.

---
 net/Kconfig     | 20 ++++++++++----------
 net/lwip/tftp.c |  2 ++
 2 files changed, 12 insertions(+), 10 deletions(-)
net/Kconfig +10 -10
index 16a9de47e94..76ab7d91eeb 100644
@@ -60,16 +60,6 @@ config SYS_FAULT_ECHO_LINK_DOWN
 	  this option is active, then CONFIG_SYS_FAULT_MII_ADDR also needs to
 	  be configured.
 
-config TFTP_BLOCKSIZE
-	int "TFTP block size"
-	default 1468
-	help
-	  Default TFTP block size.
-	  The MTU is typically 1500 for ethernet, so a TFTP block of
-	  1468 (MTU minus eth.hdrs) provides a good throughput with
-	  almost-MTU block sizes.
-	  You can also activate CONFIG_IP_DEFRAG to set a larger block.
-
 config TFTP_PORT
 	bool "Set TFTP UDP source/destination ports via the environment"
 	help
@@ -254,6 +244,16 @@ config NET_RANDOM_ETHADDR
 	  generated. It will be saved to the appropriate environment variable,
 	  too.
 
+config TFTP_BLOCKSIZE
+	int "TFTP block size"
+	default 1468
+	help
+	  Default TFTP block size.
+	  The MTU is typically 1500 for ethernet, so a TFTP block of
+	  1468 (MTU minus eth.hdrs) provides a good throughput with
+	  almost-MTU block sizes.
+	  You can also activate CONFIG_IP_DEFRAG to set a larger block.
+
 endif   # if NET || NET_LWIP
 
 config SYS_RX_ETH_BUFFER
net/lwip/tftp.c +2 -0
index 50b8fbad00d..51cd1e0207c 100644
@@ -138,6 +138,8 @@ static int tftp_loop(struct udevice *udev, ulong addr, char *fname,
 	if (!(err == ERR_OK || err == ERR_USE))
 		log_err("tftp_init_client err: %d\n", err);
 
+	tftp_client_set_blksize(CONFIG_TFTP_BLOCKSIZE);
+
 	ctx.start_time = get_timer(0);
 	err = tftp_get(&ctx, &srvip, srvport, fname, TFTP_MODE_OCTET);
 	/* might return different errors, like routing problems */
Signature · 1 line
2.40.1
#39 lore raw

PATCH v9 31/37 CI: add qemu_arm64_lwip to the test matrix

In reply to Jerome Forissier

Build and run qemu_arm64_lwip_defconfig in CI. This tests the lightweight IP (lwIP) implementation of the dhcp, tftpboot and ping commands.

---
 .azure-pipelines.yml | 7 +++++++
 1 file changed, 7 insertions(+)
.azure-pipelines.yml +7 -0
index 93111eb6127..59fddb96a48 100644
@@ -238,6 +238,10 @@ stages:
           cd \${WORK_DIR}
           git config --global --add safe.directory \${WORK_DIR}
           git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks
+          # qemu_arm64_lwip_defconfig is the same as qemu_arm64 but with NET_LWIP enabled.
+          # The test config and the boardenv file from qemu_arm64 can be re-used so create symlinks
+          ln -s conf.qemu_arm64_na /tmp/uboot-test-hooks/bin/travis-ci/conf.qemu_arm64_lwip_na
+          ln -s u_boot_boardenv_qemu_arm64_na.py /tmp/uboot-test-hooks/py/travis-ci/u_boot_boardenv_qemu_arm64_lwip_na.py
           ln -s travis-ci /tmp/uboot-test-hooks/bin/\`hostname\`
           ln -s travis-ci /tmp/uboot-test-hooks/py/\`hostname\`
           grub-mkimage --prefix=\"\" -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
@@ -415,6 +419,9 @@ stages:
         qemu_arm64:
           TEST_PY_BD: "qemu_arm64"
           TEST_PY_TEST_SPEC: "not sleep"
+        qemu_arm64_lwip:
+          TEST_PY_BD: "qemu_arm64_lwip"
+          TEST_PY_TEST_SPEC: "test_net_dhcp or test_net_ping or test_net_tftpboot"
         qemu_m68k:
           TEST_PY_BD: "M5208EVBE"
           TEST_PY_ID: "--id qemu"
Signature · 1 line
2.40.1
#40 lore raw

PATCH v9 32/37 MAINTAINERS: net-lwip: add myself as a maintainer

In reply to Jerome Forissier

Add myself as a maintainer for the lwIP network stack integration code and network commands. The library code itself (i.e., most files under lib/lwip/ except README, Makefile and integration files in u-boot) is unmodified from upstream and therefore does not need a maintainer.

---
 MAINTAINERS | 11 +++++++++++
 1 file changed, 11 insertions(+)
MAINTAINERS +11 -0
index 2050ae24df8..cbd59d17e4f 100644
@@ -1351,6 +1351,17 @@ F:	drivers/net/
 F:	include/net.h
 F:	net/
 
+NETWORK (LWIP)
+M:	Jerome Forissier <[email protected]>
+S:	Maintained
+F:	cmd/net-lwip.c
+F:	configs/qemu_arm64_lwip_defconfig
+F:	include/net-lwip.h
+F:	lib/lwip/Makefile
+F:	lib/lwip/README
+F:	lib/lwip/u-boot/
+F:	net/lwip/
+
 NIOS
 M:	Thomas Chou <[email protected]>
 S:	Maintained
Signature · 1 line
2.40.1
#41 lore raw

PATCH v9 33/37 Kconfig: fix undefined symbols (g_dnl*) when NET_LWIP is default enabled

In reply to Jerome Forissier

Fix for link errors on am62px_evm_a53and other platforms when NET_LWIP is enabled:

common/dfu.c:34:(.text.run_usb_dnl_gadget+0x68): undefined reference to `g_dnl_clear_detach [...]
common/spl/spl_dfu.c:29:(.text.spl_dfu_cmd+0xb0): undefined reference to `run_usb_dnl_gadget'

- DFU_OVER_USB compiles common/dfu.c which calls g_dnl_clear_detach() which is implemented in drivers/usb/gadget/g_dnl.c which needs USB_GADGET_DOWNLOAD
- SPL_DFU compiles common/spl/spl_dfu.c which calls run_usb_dnl_gadget() which is implemented in common/dfu.c which needs DFU_OVER_USB

Therefore add these dependencies to Kconfig.

---
 drivers/dfu/Kconfig        | 1 +
 drivers/usb/gadget/Kconfig | 1 +
 2 files changed, 2 insertions(+)
drivers/dfu/Kconfig +1 -0
index d034b501360..7de629f103a 100644
@@ -8,6 +8,7 @@ config DFU_OVER_USB
 	bool
 	select HASH
 	depends on USB_GADGET
+	depends on USB_GADGET_DOWNLOAD
 
 config DFU_OVER_TFTP
 	bool
drivers/usb/gadget/Kconfig +1 -0
index 03fe3bca197..ce9364c3172 100644
@@ -324,6 +324,7 @@ config SPL_DFU
 	select SPL_HASH
 	select SPL_DFU_NO_RESET
 	depends on SPL_RAM_SUPPORT
+	depends on DFU_OVER_USB
 	help
 	  This feature enables the DFU (Device Firmware Upgrade) in SPL with
 	  RAM memory device support. The ROM code will load and execute
Signature · 1 line
2.40.1
#42 lore raw

PATCH v9 34/37 configs: use syntax CONFIG_FOO=n in tools-only_defconfig

In reply to Jerome Forissier

The tools-only defconfig causes troubles on MacOSX due to the default C compiler being Clang (LLVM) rather than GCC and more specifically due to [1]. Therefore replace "$ CONFIG_FOO is not set" with the equivalent "CONFIG_FOO=n" using the following command:

 $ sed -i -e 's/# \(CONFIG_[^ ]*\) is not set/\1=n/' \
       configs/tools-only_defconfig

This fixes the tools_only_macOS CI job on GitHub [2].

[1] https://github.com/llvm/llvm-project/issues/78778
[2] https://dev.azure.com/u-boot/u-boot/_build/results?buildId=9105&view=results

---
 configs/tools-only_defconfig | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
configs/tools-only_defconfig +16 -16
index e00f2c48598..7511e30d709 100644
@@ -4,26 +4,26 @@ CONFIG_ENV_SIZE=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="sandbox"
 CONFIG_SYS_LOAD_ADDR=0x0
 CONFIG_PCI=y
-# CONFIG_SANDBOX_SDL is not set
+CONFIG_SANDBOX_SDL=n
 CONFIG_ANDROID_BOOT_IMAGE=y
 CONFIG_TIMESTAMP=y
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
-# CONFIG_BOOTSTD_FULL is not set
-# CONFIG_BOOTMETH_CROS is not set
-# CONFIG_BOOTMETH_VBE is not set
+CONFIG_BOOTSTD_FULL=n
+CONFIG_BOOTMETH_CROS=n
+CONFIG_BOOTMETH_VBE=n
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="run distro_bootcmd"
-# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
-# CONFIG_CMD_BOOTI is not set
-# CONFIG_CMD_ELF is not set
-# CONFIG_CMD_EXTENSION is not set
-# CONFIG_CMD_DATE is not set
+CONFIG_CMD_BOOTD=n
+CONFIG_CMD_BOOTM=n
+CONFIG_CMD_BOOTI=n
+CONFIG_CMD_ELF=n
+CONFIG_CMD_EXTENSION=n
+CONFIG_CMD_DATE=n
 CONFIG_OF_CONTROL=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_NO_NET=y
-# CONFIG_ACPIGEN is not set
+CONFIG_ACPIGEN=n
 CONFIG_AXI=y
 CONFIG_AXI_SANDBOX=y
 CONFIG_SANDBOX_GPIO=y
@@ -32,9 +32,9 @@ CONFIG_DM_RTC=y
 CONFIG_SOUND=y
 CONFIG_SYSRESET=y
 CONFIG_TIMER=y
-# CONFIG_VIRTIO_MMIO is not set
-# CONFIG_VIRTIO_PCI is not set
-# CONFIG_VIRTIO_SANDBOX is not set
-# CONFIG_GENERATE_ACPI_TABLE is not set
-# CONFIG_EFI_LOADER is not set
+CONFIG_VIRTIO_MMIO=n
+CONFIG_VIRTIO_PCI=n
+CONFIG_VIRTIO_SANDBOX=n
+CONFIG_GENERATE_ACPI_TABLE=n
+CONFIG_EFI_LOADER=n
 CONFIG_TOOLS_MKEFICAPSULE=y
Signature · 1 line
2.40.1
Reviewed-by on v9 34/37
#43 lore raw

Re: [PATCH v9 34/37] configs: use syntax CONFIG_FOO=n in tools-only_defconfig

Quoted 3 lines · Jerome Forissier

The tools-only defconfig causes troubles on MacOSX due to the default C compiler being Clang (LLVM) rather than GCC and more specifically due to [1]. Therefore replace "$ CONFIG_FOO is not set" with the

"# CONFIG_FOO" not "$ CONFIG_FOO".

Quoted 5 lines

equivalent "CONFIG_FOO=n" using the following command:

 $ sed -i -e 's/# \(CONFIG_[^ ]*\) is not set/\1=n/' \
       configs/tools-only_defconfig
Quoted 7 lines

This fixes the tools_only_macOS CI job on GitHub [2].

[1] https://github.com/llvm/llvm-project/issues/78778
[2] https://dev.azure.com/u-boot/u-boot/_build/results?buildId=9105&view=results

Signature · 1 line
Tom
#44 lore raw

Re: [PATCH v9 34/37] configs: use syntax CONFIG_FOO=n in tools-only_defconfig

Quoted 7 lines · Tom Rini
Quoted 3 lines · Jerome Forissier

The tools-only defconfig causes troubles on MacOSX due to the default C compiler being Clang (LLVM) rather than GCC and more specifically due to [1]. Therefore replace "$ CONFIG_FOO is not set" with the

"# CONFIG_FOO" not "$ CONFIG_FOO".

Fixed in v10

Quoted 8 lines
Quoted 8 lines

equivalent "CONFIG_FOO=n" using the following command:

 $ sed -i -e 's/# \(CONFIG_[^ ]*\) is not set/\1=n/' \
       configs/tools-only_defconfig

This fixes the tools_only_macOS CI job on GitHub [2].

Quoted 7 lines
Quoted 5 lines

[1] https://github.com/llvm/llvm-project/issues/78778
[2] https://dev.azure.com/u-boot/u-boot/_build/results?buildId=9105&view=results

Thanks!

Signature · 1 line
Jerome
#45 lore raw

PATCH v9 35/37 Kconfig: enable NET_LWIP by default except for SANDBOX

In reply to Jerome Forissier

Enable NET_LWIP by default for testing purposes. SANDBOX doesn't support NET_LWIP so default to NET in this case.

---
 Kconfig | 1 +
 1 file changed, 1 insertion(+)
Kconfig +1 -0
index 6657b9e5e30..2b316afa542 100644
@@ -749,6 +749,7 @@ menu Networking
 
 choice
 	prompt "Networking stack"
+	default NET_LWIP if !SANDBOX
 	default NET
 
 config NO_NET
Signature · 1 line
2.40.1
#46 lore raw

Re: [PATCH v9 35/37] [TESTING] Kconfig: enable NET_LWIP by default except for SANDBOX

Hi Jerome,

Quoted 3 lines · Jerome Forissier

Enable NET_LWIP by default for testing purposes. SANDBOX doesn't support NET_LWIP so default to NET in this case.

Sandbox needs to support NET_LWIP.

Quoted 19 lines
---
 Kconfig | 1 +
 1 file changed, 1 insertion(+)
Kconfig +1 -1
index 6657b9e5e30..2b316afa542 100644
@@ -749,6 +749,7 @@ menu Networking
 
 choice
        prompt "Networking stack"
+       default NET_LWIP if !SANDBOX
        default NET
 
 config NO_NET
--
Quoted 2 lines

2.40.1

Regards,
Simon

#47 lore raw

Re: [PATCH v9 35/37] [TESTING] Kconfig: enable NET_LWIP by default except for SANDBOX

Quoted 9 lines · Simon Glass

Hi Jerome,

Quoted 3 lines · Jerome Forissier

Enable NET_LWIP by default for testing purposes. SANDBOX doesn't support NET_LWIP so default to NET in this case.

Sandbox needs to support NET_LWIP.

I agree in principle, but AFAICT it is not a trivial task. Does it have to be done in this series or can it be dealt with later?

I would need to look into this more closely to give details, but if I remember correctly the sandbox tests expect a precise sequence of network packets. For example when doing a TFTP tests, it expects an ARP packet to go out first, but when lwIP is used the ARP might not go out because the IP may already be in the cache. So the sandbox is definitely not a black box in that respect which makes things a bit more difficult.

Thanks,

Signature · 1 line
Jerome
#48 lore raw

Re: [PATCH v9 35/37] [TESTING] Kconfig: enable NET_LWIP by default except for SANDBOX

Hi Jerome,

Quoted 9 lines · Jerome Forissier
Quoted 5 lines · Simon Glass

Hi Jerome,

Quoted 1 line · Jerome Forissier
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Enable NET_LWIP by default for testing purposes. SANDBOX doesn't support NET_LWIP so default to NET in this case.

Sandbox needs to support NET_LWIP.

I agree in principle, but AFAICT it is not a trivial task. Does it have to be done in this series or can it be dealt with later?

Does it build OK with sandbox? We use it for almost all of our feature development and testing, so I cannot imagine bringing this in if it doesn't work. How did you develop this feature?

Quoted 7 lines

I would need to look into this more closely to give details, but if I remember correctly the sandbox tests expect a precise sequence of network packets. For example when doing a TFTP tests, it expects an ARP packet to go out first, but when lwIP is used the ARP might not go out because the IP may already be in the cache. So the sandbox is definitely not a black box in that respect which makes things a bit more difficult.

The key thing is to have a way to reset the state. So long as you have that, you should be able to put networking back to the initial state before running a test.

Regards,
Simon

#49 lore raw

Re: [PATCH v9 35/37] [TESTING] Kconfig: enable NET_LWIP by default except for SANDBOX

Hi Simon,

Quoted 17 lines · Simon Glass

Hi Jerome,

Quoted 12 lines · Jerome Forissier
Quoted 8 lines · Simon Glass

Hi Jerome,

Quoted 3 lines · Jerome Forissier

Enable NET_LWIP by default for testing purposes. SANDBOX doesn't support NET_LWIP so default to NET in this case.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Sandbox needs to support NET_LWIP.

I agree in principle, but AFAICT it is not a trivial task. Does it have to be done in this series or can it be dealt with later?

Does it build OK with sandbox? We use it for almost all of our feature development and testing, so I cannot imagine bringing this in if it doesn't work. How did you develop this feature?

sandbox is deeply rooted into the old network stack. It fakes ACK responses, handles the ping request/replies with the sandbox ethernet driver etc. I was looking on adding LWIP support for it, but it's not trivial and I don't want us to add another hacky 'glue layer'. Since LWIP is a big feature on its own -- and is working on real hardware and QEMU, we discussed adding it, so people can test and contribute fixes while we fix sandbox.

Quoted 9 lines
Quoted 8 lines

I would need to look into this more closely to give details, but if I remember correctly the sandbox tests expect a precise sequence of network packets. For example when doing a TFTP tests, it expects an ARP packet to go out first, but when lwIP is used the ARP might not go out because the IP may already be in the cache. So the sandbox is definitely not a black box in that respect which makes things a bit more difficult.

Quoted 3 lines

The key thing is to have a way to reset the state. So long as you have that, you should be able to put networking back to the initial state before running a test.

Thanks
/Ilias

Quoted 3 lines

Regards,
Simon

#50 lore raw

Re: [PATCH v9 35/37] [TESTING] Kconfig: enable NET_LWIP by default except for SANDBOX

Hi Ilias,

Quoted 30 lines · Ilias Apalodimas

Hi Simon,

Quoted 17 lines · Simon Glass

Hi Jerome,

Quoted 12 lines · Jerome Forissier
Quoted 8 lines · Simon Glass

Hi Jerome,

Quoted 3 lines · Jerome Forissier

Enable NET_LWIP by default for testing purposes. SANDBOX doesn't support NET_LWIP so default to NET in this case.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Sandbox needs to support NET_LWIP.

I agree in principle, but AFAICT it is not a trivial task. Does it have to be done in this series or can it be dealt with later?

Does it build OK with sandbox? We use it for almost all of our feature development and testing, so I cannot imagine bringing this in if it doesn't work. How did you develop this feature?

Quoted 7 lines

sandbox is deeply rooted into the old network stack. It fakes ACK responses, handles the ping request/replies with the sandbox ethernet driver etc. I was looking on adding LWIP support for it, but it's not trivial and I don't want us to add another hacky 'glue layer'. Since LWIP is a big feature on its own -- and is working on real hardware and QEMU, we discussed adding it, so people can test and contribute fixes while we fix sandbox.

At the very least it needs to build on sandbox.

I am not sure what tests LWIP has. The U-Boot networking tests are very simple on sandbox. The test provides a handler to generate a packet that it wants, then does a networking operation. It should not be hard to plumb that through.

I am nervous about this going in with an intention to fix it up later...

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines

I would need to look into this more closely to give details, but if I remember correctly the sandbox tests expect a precise sequence of network packets. For example when doing a TFTP tests, it expects an ARP packet to go out first, but when lwIP is used the ARP might not go out because the IP may already be in the cache. So the sandbox is definitely not a black box in that respect which makes things a bit more difficult.

Quoted 3 lines
Quoted 3 lines

The key thing is to have a way to reset the state. So long as you have that, you should be able to put networking back to the initial state before running a test.

Regards,
Simon

#51 lore raw

Re: [PATCH v9 35/37] [TESTING] Kconfig: enable NET_LWIP by default except for SANDBOX

Quoted 42 lines · Simon Glass

Hi Ilias,

Quoted 30 lines · Ilias Apalodimas

Hi Simon,

Quoted 17 lines · Simon Glass

Hi Jerome,

Quoted 12 lines · Jerome Forissier
Quoted 8 lines · Simon Glass

Hi Jerome,

Quoted 3 lines · Jerome Forissier

Enable NET_LWIP by default for testing purposes. SANDBOX doesn't support NET_LWIP so default to NET in this case.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Sandbox needs to support NET_LWIP.

I agree in principle, but AFAICT it is not a trivial task. Does it have to be done in this series or can it be dealt with later?

Does it build OK with sandbox? We use it for almost all of our feature development and testing, so I cannot imagine bringing this in if it doesn't work. How did you develop this feature?

Quoted 7 lines

sandbox is deeply rooted into the old network stack. It fakes ACK responses, handles the ping request/replies with the sandbox ethernet driver etc. I was looking on adding LWIP support for it, but it's not trivial and I don't want us to add another hacky 'glue layer'. Since LWIP is a big feature on its own -- and is working on real hardware and QEMU, we discussed adding it, so people can test and contribute fixes while we fix sandbox.

Quoted 1 line

At the very least it needs to build on sandbox.

It builds with sandbox, one of my tests is to switch the global default to lwIP and make sure nothing blows up.

Quoted 6 lines

I am not sure what tests LWIP has. The U-Boot networking tests are very simple on sandbox. The test provides a handler to generate a packet that it wants, then does a networking operation. It should not be hard to plumb that through.

I am nervous about this going in with an intention to fix it up later...

We have two flavours of tests. One is the sandbox-specific state machines, and the other is functional testing. This series passes functional testing while adding another functional test (for wget). I'm quite fine with having sandbox figure out lwIP be a later TODO.

Signature · 1 line
Tom
#52 lore raw

Re: [PATCH v9 35/37] [TESTING] Kconfig: enable NET_LWIP by default except for SANDBOX

Hi Tom,

Quoted 54 lines · Tom Rini
Quoted 42 lines · Simon Glass

Hi Ilias,

Quoted 30 lines · Ilias Apalodimas

Hi Simon,

Quoted 17 lines · Simon Glass

Hi Jerome,

Quoted 12 lines · Jerome Forissier
Quoted 8 lines · Simon Glass

Hi Jerome,

Quoted 3 lines · Jerome Forissier

Enable NET_LWIP by default for testing purposes. SANDBOX doesn't support NET_LWIP so default to NET in this case.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Sandbox needs to support NET_LWIP.

I agree in principle, but AFAICT it is not a trivial task. Does it have to be done in this series or can it be dealt with later?

Does it build OK with sandbox? We use it for almost all of our feature development and testing, so I cannot imagine bringing this in if it doesn't work. How did you develop this feature?

Quoted 7 lines

sandbox is deeply rooted into the old network stack. It fakes ACK responses, handles the ping request/replies with the sandbox ethernet driver etc. I was looking on adding LWIP support for it, but it's not trivial and I don't want us to add another hacky 'glue layer'. Since LWIP is a big feature on its own -- and is working on real hardware and QEMU, we discussed adding it, so people can test and contribute fixes while we fix sandbox.

Quoted 1 line

At the very least it needs to build on sandbox.

It builds with sandbox, one of my tests is to switch the global default to lwIP and make sure nothing blows up.

Quoted 5 lines

I am not sure what tests LWIP has. The U-Boot networking tests are very simple on sandbox. The test provides a handler to generate a packet that it wants, then does a networking operation. It should not be hard to plumb that through.

Quoted 6 lines
Quoted 1 line

I am nervous about this going in with an intention to fix it up later...

We have two flavours of tests. One is the sandbox-specific state machines, and the other is functional testing. This series passes functional testing while adding another functional test (for wget). I'm quite fine with having sandbox figure out lwIP be a later TODO.

OK, well let's not leave it too long. It makes tests nice and simple to write - just a function that can parse and generate any required packets.

Also if someone can answer my first question (what tests LWIP has) that would help.

Regards,
Simon

#53 lore raw

Re: [PATCH v9 35/37] [TESTING] Kconfig: enable NET_LWIP by default except for SANDBOX

Quoted 64 lines · Simon Glass

Hi Tom,

Quoted 54 lines · Tom Rini
Quoted 42 lines · Simon Glass

Hi Ilias,

Quoted 30 lines · Ilias Apalodimas

Hi Simon,

Quoted 17 lines · Simon Glass

Hi Jerome,

Quoted 12 lines · Jerome Forissier
Quoted 8 lines · Simon Glass

Hi Jerome,

Quoted 3 lines · Jerome Forissier

Enable NET_LWIP by default for testing purposes. SANDBOX doesn't support NET_LWIP so default to NET in this case.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Sandbox needs to support NET_LWIP.

I agree in principle, but AFAICT it is not a trivial task. Does it have to be done in this series or can it be dealt with later?

Does it build OK with sandbox? We use it for almost all of our feature development and testing, so I cannot imagine bringing this in if it doesn't work. How did you develop this feature?

Quoted 7 lines

sandbox is deeply rooted into the old network stack. It fakes ACK responses, handles the ping request/replies with the sandbox ethernet driver etc. I was looking on adding LWIP support for it, but it's not trivial and I don't want us to add another hacky 'glue layer'. Since LWIP is a big feature on its own -- and is working on real hardware and QEMU, we discussed adding it, so people can test and contribute fixes while we fix sandbox.

Quoted 1 line

At the very least it needs to build on sandbox.

It builds with sandbox, one of my tests is to switch the global default to lwIP and make sure nothing blows up.

Quoted 5 lines

I am not sure what tests LWIP has. The U-Boot networking tests are very simple on sandbox. The test provides a handler to generate a packet that it wants, then does a networking operation. It should not be hard to plumb that through.

Quoted 6 lines
Quoted 1 line

I am nervous about this going in with an intention to fix it up later...

We have two flavours of tests. One is the sandbox-specific state machines, and the other is functional testing. This series passes functional testing while adding another functional test (for wget). I'm quite fine with having sandbox figure out lwIP be a later TODO.

Quoted 6 lines

OK, well let's not leave it too long. It makes tests nice and simple to write - just a function that can parse and generate any required packets.

Also if someone can answer my first question (what tests LWIP has) that would help.

There are unit and functional tests in lib/lwip/lwip/test but I have no idea how to run them and even if they are run in some upstream CI.

That said, NET_LWIP is functionally tested via test/py, more specifically:

test_net_dhcp()
test_net_ping()
test_net_tftpboot()
test_efi_setup_dhcp()
test_efi_helloworld_net_tftp()
test_efi_helloworld_net_http()

Regards,

Signature · 1 line
Jerome
#54 lore raw

PATCH v9 36/37 configs: set CONFIG_NET=y for FTGMAC100

In reply to Jerome Forissier

FTGMAC100 is not compatible with NET_LWIP which was enabled as the default stack in a previous commit. So enable NET in the defconfig.

---
 configs/evb-ast2500_defconfig | 1 +
 configs/evb-ast2600_defconfig | 1 +
 2 files changed, 2 insertions(+)
configs/evb-ast2500_defconfig +1 -0
index 6685f37e3f5..d20ccf16797 100644
@@ -35,6 +35,7 @@ CONFIG_CMD_NCSI=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_REGMAP=y
 CONFIG_CLK=y
configs/evb-ast2600_defconfig +1 -0
index e6a4e4d1b7c..47faf05a242 100644
@@ -78,6 +78,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_SECT_SIZE_AUTO=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
Signature · 1 line
2.40.1
Reviewed-by on v9 36/37
#55 lore raw

RE: [PATCH v9 36/37] [TESTING] configs: set CONFIG_NET=y for FTGMAC100

Quoted 47 lines

-----Original Message-----
From: Jerome Forissier <[email protected]>
Sent: Friday, August 23, 2024 9:49 PM
To: [email protected]
Cc: Ilias Apalodimas <[email protected]>; Javier Tia <[email protected]>; Raymond Mao <[email protected]>; Maxim Uvarov <[email protected]>; Tim Harvey <[email protected]>; Anton Antonov <[email protected]>; Jerome Forissier <[email protected]>; Maxim Sloyko <[email protected]>; Tom Rini <[email protected]>; ChiaWei Wang <[email protected]>
Subject: [PATCH v9 36/37] [TESTING] configs: set CONFIG_NET=y for FTGMAC100

FTGMAC100 is not compatible with NET_LWIP which was enabled as the default stack in a previous commit. So enable NET in the defconfig.

---
 configs/evb-ast2500_defconfig | 1 +
 configs/evb-ast2600_defconfig | 1 +
 2 files changed, 2 insertions(+)
configs/evb-ast2500_defconfig +1 -0
index 6685f37e3f5..d20ccf16797 100644
@@ -35,6 +35,7 @@ CONFIG_CMD_NCSI=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_REGMAP=y
 CONFIG_CLK=y
configs/evb-ast2600_defconfig +0 -0
index e6a4e4d1b7c..47faf05a242 100644
@@ -78,6 +78,7 @@ CONFIG_ENV_OVERWRITE=y

CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_ENV_SECT_SIZE_AUTO=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
--
2.40.1

#56 lore raw

PATCH v9 37/37 configs: set CONFIG_NET=y when PXE is enabled

In reply to Jerome Forissier

Many platforms won't build when NET_LWIP is the default choice in Kconfig:

include/config_distro_bootcmd.h:443:9: error: expected '}' before 'BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE' [...]

Set the legacy stack (CONFIG_NET=y) for these platforms.

---
 configs/ad401_defconfig                     | 1 +
 configs/am43xx_evm_defconfig                | 1 +
 configs/am43xx_evm_qspiboot_defconfig       | 1 +
 configs/am43xx_evm_rtconly_defconfig        | 1 +
 configs/am43xx_evm_usbhost_boot_defconfig   | 1 +
 configs/am43xx_hs_evm_defconfig             | 1 +
 configs/am43xx_hs_evm_qspi_defconfig        | 1 +
 configs/am57xx_evm_defconfig                | 1 +
 configs/am57xx_hs_evm_defconfig             | 1 +
 configs/am57xx_hs_evm_usb_defconfig         | 1 +
 configs/arndale_defconfig                   | 1 +
 configs/bananapi-cm4-cm4io_defconfig        | 1 +
 configs/bananapi-m2-pro_defconfig           | 1 +
 configs/bananapi-m2s_defconfig              | 1 +
 configs/bananapi-m5_defconfig               | 1 +
 configs/beelink-gsking-x_defconfig          | 1 +
 configs/beelink-gt1-ultimate_defconfig      | 1 +
 configs/beelink-gtking_defconfig            | 1 +
 configs/beelink-gtkingpro_defconfig         | 1 +
 configs/clearfog_defconfig                  | 1 +
 configs/clearfog_gt_8k_defconfig            | 1 +
 configs/clearfog_sata_defconfig             | 1 +
 configs/clearfog_spi_defconfig              | 1 +
 configs/dra7xx_evm_defconfig                | 1 +
 configs/dra7xx_hs_evm_defconfig             | 1 +
 configs/dra7xx_hs_evm_usb_defconfig         | 1 +
 configs/helios4_defconfig                   | 1 +
 configs/imx8mn_var_som_defconfig            | 1 +
 configs/jethub_j100_defconfig               | 1 +
 configs/jethub_j80_defconfig                | 1 +
 configs/khadas-vim2_defconfig               | 1 +
 configs/khadas-vim3_defconfig               | 1 +
 configs/khadas-vim3l_defconfig              | 1 +
 configs/khadas-vim_defconfig                | 1 +
 configs/kontron-sl-mx6ul_defconfig          | 1 +
 configs/kontron-sl-mx8mm_defconfig          | 1 +
 configs/kontron_pitx_imx8m_defconfig        | 1 +
 configs/kontron_sl28_defconfig              | 1 +
 configs/libretech-ac_defconfig              | 1 +
 configs/libretech-cc_defconfig              | 1 +
 configs/libretech-cc_v2_defconfig           | 1 +
 configs/libretech-s905d-pc_defconfig        | 1 +
 configs/libretech-s912-pc_defconfig         | 1 +
 configs/marsboard_defconfig                 | 1 +
 configs/mvebu_crb_cn9130_defconfig          | 1 +
 configs/mvebu_db_armada8k_defconfig         | 1 +
 configs/mvebu_db_cn9130_defconfig           | 1 +
 configs/mvebu_mcbin-88f8040_defconfig       | 1 +
 configs/mvebu_puzzle-m801-88f8040_defconfig | 1 +
 configs/mx53cx9020_defconfig                | 1 +
 configs/mx6cuboxi_defconfig                 | 1 +
 configs/mx7dsabresd_defconfig               | 1 +
 configs/mx7dsabresd_qspi_defconfig          | 1 +
 configs/myir_mys_6ulx_defconfig             | 1 +
 configs/nanopi-k2_defconfig                 | 1 +
 configs/novena_defconfig                    | 1 +
 configs/odroid-c2_defconfig                 | 1 +
 configs/odroid-c4_defconfig                 | 1 +
 configs/odroid-go-ultra_defconfig           | 1 +
 configs/odroid-hc4_defconfig                | 1 +
 configs/odroid-n2_defconfig                 | 1 +
 configs/odroid-n2l_defconfig                | 1 +
 configs/odroid-xu3_defconfig                | 1 +
 configs/p200_defconfig                      | 1 +
 configs/p201_defconfig                      | 1 +
 configs/p212_defconfig                      | 1 +
 configs/peach-pi_defconfig                  | 1 +
 configs/peach-pit_defconfig                 | 1 +
 configs/phycore_pcl063_defconfig            | 1 +
 configs/pico-dwarf-imx6ul_defconfig         | 1 +
 configs/pico-dwarf-imx7d_defconfig          | 1 +
 configs/pico-hobbit-imx6ul_defconfig        | 1 +
 configs/pico-hobbit-imx7d_defconfig         | 1 +
 configs/pico-imx6ul_defconfig               | 1 +
 configs/pico-imx7d_bl33_defconfig           | 1 +
 configs/pico-imx7d_defconfig                | 1 +
 configs/pico-nymph-imx7d_defconfig          | 1 +
 configs/pico-pi-imx6ul_defconfig            | 1 +
 configs/pico-pi-imx7d_defconfig             | 1 +
 configs/radxa-zero2_defconfig               | 1 +
 configs/radxa-zero_defconfig                | 1 +
 configs/riotboard_defconfig                 | 1 +
 configs/s400_defconfig                      | 1 +
 configs/seeed_npi_imx6ull_defconfig         | 1 +
 configs/smdk5250_defconfig                  | 1 +
 configs/smdk5420_defconfig                  | 1 +
 configs/snow_defconfig                      | 1 +
 configs/spring_defconfig                    | 1 +
 configs/ten64_tfa_defconfig                 | 1 +
 configs/turris_mox_defconfig                | 1 +
 configs/turris_omnia_defconfig              | 1 +
 configs/u200_defconfig                      | 1 +
 configs/vexpress_aemv8a_juno_defconfig      | 1 +
 configs/vexpress_aemv8a_semi_defconfig      | 1 +
 configs/vexpress_aemv8r_defconfig           | 1 +
 configs/vexpress_ca9x4_defconfig            | 1 +
 configs/vexpress_fvp_defconfig              | 1 +
 configs/videostrong-kii-pro_defconfig       | 1 +
 configs/wandboard_defconfig                 | 1 +
 configs/wetek-core2_defconfig               | 1 +
 configs/wetek-hub_defconfig                 | 1 +
 configs/wetek-play2_defconfig               | 1 +
 102 files changed, 102 insertions(+)
configs/ad401_defconfig +1 -0
index b44b9c63e83..9502523b447 100644
@@ -56,3 +56,4 @@ CONFIG_USB=y
 CONFIG_DM_USB_GADGET=y
 CONFIG_USB_GADGET=y
 CONFIG_WDT=y
+CONFIG_NET=y
configs/am43xx_evm_defconfig +1 -0
index d73b1cb804b..394c1a5225c 100644
@@ -108,3 +108,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_ETHER=y
 CONFIG_SPL_USB_ETHER=y
+CONFIG_NET=y
configs/am43xx_evm_qspiboot_defconfig +1 -0
index 89e212595af..9d9b96b9adb 100644
@@ -70,3 +70,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0403
 CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_NET=y
configs/am43xx_evm_rtconly_defconfig +1 -0
index 2ff01193285..ccb934cdf96 100644
@@ -87,3 +87,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0403
 CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_NET=y
configs/am43xx_evm_usbhost_boot_defconfig +1 -0
index 845b686ac93..c67d7e86042 100644
@@ -108,3 +108,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0403
 CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_NET=y
configs/am43xx_hs_evm_defconfig +1 -0
index ff5073cbb2b..5925f66391d 100644
@@ -105,3 +105,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_ETHER=y
 CONFIG_SPL_USB_ETHER=y
+CONFIG_NET=y
configs/am43xx_hs_evm_qspi_defconfig +1 -0
index 5ef59d830e5..c36b572c58e 100644
@@ -71,3 +71,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0403
 CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_NET=y
configs/am57xx_evm_defconfig +1 -0
index 7c3ceeb07db..039efaf7f2f 100644
@@ -123,3 +123,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0451
 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022
 CONFIG_LIBAVB=y
+CONFIG_NET=y
configs/am57xx_hs_evm_defconfig +1 -0
index 1f7eca4691e..5b009f56676 100644
@@ -119,3 +119,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0451
 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022
 CONFIG_LIBAVB=y
+CONFIG_NET=y
configs/am57xx_hs_evm_usb_defconfig +1 -0
index 807e1d66a6d..d4b6caa159c 100644
@@ -120,3 +120,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0451
 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022
 CONFIG_SPL_DFU=y
 CONFIG_LIBAVB=y
+CONFIG_NET=y
configs/arndale_defconfig +1 -0
index b664ad58773..9a8439a24df 100644
@@ -57,3 +57,4 @@ CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_HOST_ETHER=y
+CONFIG_NET=y
configs/bananapi-cm4-cm4io_defconfig +1 -0
index cb78dabc13a..a2baec987b6 100644
@@ -88,3 +88,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/bananapi-m2-pro_defconfig +1 -0
index 196bc4077d6..fad40f49fdc 100644
@@ -81,3 +81,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/bananapi-m2s_defconfig +1 -0
index 7b137d5e1c4..d3e2bb9aeac 100644
@@ -86,3 +86,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/bananapi-m5_defconfig +1 -0
index 99ed7c9669a..0505283a061 100644
@@ -81,3 +81,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/beelink-gsking-x_defconfig +1 -0
index c1e60ede4a0..28e13a155b3 100644
@@ -78,3 +78,4 @@ CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
+CONFIG_NET=y
configs/beelink-gt1-ultimate_defconfig +1 -0
index 0e30e13c823..73a843f9e5a 100644
@@ -82,3 +82,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/beelink-gtking_defconfig +1 -0
index 0b644f0e349..281f6ae496b 100644
@@ -78,3 +78,4 @@ CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
+CONFIG_NET=y
configs/beelink-gtkingpro_defconfig +1 -0
index a694617a968..93ac53fb1dc 100644
@@ -78,3 +78,4 @@ CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
+CONFIG_NET=y
configs/clearfog_defconfig +1 -0
index 62dbf2aa48f..bd21d3e0f02 100644
@@ -77,3 +77,4 @@ CONFIG_SYS_NS16550=y
 CONFIG_KIRKWOOD_SPI=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
+CONFIG_NET=y
configs/clearfog_gt_8k_defconfig +1 -0
index df7e04a75bb..5e1292dc7e7 100644
@@ -81,3 +81,4 @@ CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_MCS7830=y
 CONFIG_USB_ETHER_RTL8152=y
 CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_NET=y
configs/clearfog_sata_defconfig +1 -0
index 41382f995d3..16d052223b3 100644
@@ -78,3 +78,4 @@ CONFIG_SYS_NS16550=y
 CONFIG_KIRKWOOD_SPI=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
+CONFIG_NET=y
configs/clearfog_spi_defconfig +1 -0
index f345b12e6c7..820f3575316 100644
@@ -78,3 +78,4 @@ CONFIG_SYS_NS16550=y
 CONFIG_KIRKWOOD_SPI=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
+CONFIG_NET=y
configs/dra7xx_evm_defconfig +1 -0
index 0cea5504364..784b75bd1a0 100644
@@ -147,3 +147,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0451
 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022
 CONFIG_SPL_DFU=y
+CONFIG_NET=y
configs/dra7xx_hs_evm_defconfig +1 -0
index 5f56b187503..b9227251d55 100644
@@ -141,3 +141,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0451
 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022
 CONFIG_SPL_DFU=y
+CONFIG_NET=y
configs/dra7xx_hs_evm_usb_defconfig +1 -0
index 5b67a0e8392..4263c1a7b8a 100644
@@ -128,3 +128,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0451
 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022
 CONFIG_SPL_DFU=y
+CONFIG_NET=y
configs/helios4_defconfig +1 -0
index 29b6230e901..1a2166d3778 100644
@@ -77,3 +77,4 @@ CONFIG_SYS_NS16550=y
 CONFIG_KIRKWOOD_SPI=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
+CONFIG_NET=y
configs/imx8mn_var_som_defconfig +1 -0
index 218415fad57..cb92a63ab1f 100644
@@ -113,3 +113,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_IMX_WATCHDOG=y
+CONFIG_NET=y
configs/jethub_j100_defconfig +1 -0
index 9de6b4b44d9..805223551a3 100644
@@ -73,3 +73,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xfada
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_RANDOM_UUID=y
+CONFIG_NET=y
configs/jethub_j80_defconfig +1 -0
index 85306872f9a..c22d81a755b 100644
@@ -77,3 +77,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xfada
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_RANDOM_UUID=y
+CONFIG_NET=y
configs/khadas-vim2_defconfig +1 -0
index 50f8b306505..5eb7106b674 100644
@@ -77,3 +77,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e
 CONFIG_USB_GADGET_PRODUCT_NUM=0xfada
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_NET=y
configs/khadas-vim3_defconfig +1 -0
index 32579b8ac36..d0f03dad0a8 100644
@@ -102,3 +102,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/khadas-vim3l_defconfig +1 -0
index b9f4690045a..94dd1055b3c 100644
@@ -102,3 +102,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/khadas-vim_defconfig +1 -0
index ac00e8975e1..13be376ebd7 100644
@@ -68,3 +68,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e
 CONFIG_USB_GADGET_PRODUCT_NUM=0xfada
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_NET=y
configs/kontron-sl-mx6ul_defconfig +1 -0
index f295ecfe4b7..7096d21468b 100644
@@ -109,3 +109,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
+CONFIG_NET=y
configs/kontron-sl-mx8mm_defconfig +1 -0
index 1b7d22b43e1..684ec802c5e 100644
@@ -149,3 +149,4 @@ CONFIG_EFI_SET_TIME=y
 CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
 CONFIG_EFI_CAPSULE_ON_DISK=y
 CONFIG_EFI_CAPSULE_FIRMWARE_FIT=y
+CONFIG_NET=y
configs/kontron_pitx_imx8m_defconfig +1 -0
index c2133470fc9..c49432504ba 100644
@@ -113,3 +113,4 @@ CONFIG_USB_DWC3=y
 CONFIG_EFI_SET_TIME=y
 CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
 CONFIG_EFI_CAPSULE_FIRMWARE_FIT=y
+CONFIG_NET=y
configs/kontron_sl28_defconfig +1 -0
index a1d5f89b1ec..f4db4e8f5e0 100644
@@ -131,3 +131,4 @@ CONFIG_WDT_SP805=y
 CONFIG_EFI_SET_TIME=y
 CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
 CONFIG_EFI_CAPSULE_FIRMWARE_FIT=y
+CONFIG_NET=y
configs/libretech-ac_defconfig +1 -0
index 6ad04570022..874153174df 100644
@@ -96,3 +96,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/libretech-cc_defconfig +1 -0
index beb919ca6e8..fe40804f9fc 100644
@@ -79,3 +79,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/libretech-cc_v2_defconfig +1 -0
index 6859dfd517c..646f71be6a0 100644
@@ -83,3 +83,4 @@ CONFIG_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
+CONFIG_NET=y
configs/libretech-s905d-pc_defconfig +1 -0
index 0adc0afdf30..eb02012a21d 100644
@@ -90,3 +90,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/libretech-s912-pc_defconfig +1 -0
index cbce0cf4000..1be8ab43e4b 100644
@@ -89,3 +89,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/marsboard_defconfig +1 -0
index 198fec2cb2c..24c48b101ee 100644
@@ -71,3 +71,4 @@ CONFIG_IMX_HDMI=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_BMP_16BPP=y
+CONFIG_NET=y
configs/mvebu_crb_cn9130_defconfig +1 -0
index 4d5f575b038..722fe226b43 100644
@@ -86,3 +86,4 @@ CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_MCS7830=y
 CONFIG_USB_ETHER_RTL8152=y
 CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_NET=y
configs/mvebu_db_armada8k_defconfig +1 -0
index 6913796c010..9964c5d8244 100644
@@ -75,3 +75,4 @@ CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_MCS7830=y
 CONFIG_USB_ETHER_RTL8152=y
 CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_NET=y
configs/mvebu_db_cn9130_defconfig +1 -0
index 9133e25b241..3cf83522e67 100644
@@ -91,3 +91,4 @@ CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_MCS7830=y
 CONFIG_USB_ETHER_RTL8152=y
 CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_NET=y
configs/mvebu_mcbin-88f8040_defconfig +1 -0
index eef612a261e..c89d6c33d4e 100644
@@ -81,3 +81,4 @@ CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_MCS7830=y
 CONFIG_USB_ETHER_RTL8152=y
 CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_NET=y
configs/mvebu_puzzle-m801-88f8040_defconfig +1 -0
index b00e92908b3..8304fd6cd87 100644
@@ -83,3 +83,4 @@ CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_EHCI_HCD=y
 # CONFIG_EFI_LOADER is not set
+CONFIG_NET=y
configs/mx53cx9020_defconfig +1 -0
index c20c6a40a1d..9d127dd2d64 100644
@@ -41,3 +41,4 @@ CONFIG_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
 CONFIG_IMX_VIDEO_SKIP=y
+CONFIG_NET=y
configs/mx6cuboxi_defconfig +1 -0
index e3aba715aa5..cd400eec02f 100644
@@ -93,3 +93,4 @@ CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_BMP_16BPP=y
 CONFIG_IMX_WATCHDOG=y
+CONFIG_NET=y
configs/mx7dsabresd_defconfig +1 -0
index 7811b17bf0f..2072fea5bc7 100644
@@ -89,3 +89,4 @@ CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_IMX_WATCHDOG=y
 CONFIG_ERRNO_STR=y
+CONFIG_NET=y
configs/mx7dsabresd_qspi_defconfig +1 -0
index 2ee8bd36252..36464c1387e 100644
@@ -91,3 +91,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_ERRNO_STR=y
+CONFIG_NET=y
configs/myir_mys_6ulx_defconfig +1 -0
index b165dd407d1..39ceea85115 100644
@@ -70,3 +70,4 @@ CONFIG_SPL_USB_HOST=y
 CONFIG_USB_GADGET=y
 CONFIG_SPL_USB_GADGET=y
 # CONFIG_RANDOM_UUID is not set
+CONFIG_NET=y
configs/nanopi-k2_defconfig +1 -0
index 2e1c756bf7a..db0a6f8c079 100644
@@ -46,3 +46,4 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_DEBUG_UART_SKIP_INIT=y
 CONFIG_MESON_SERIAL=y
+CONFIG_NET=y
configs/novena_defconfig +1 -0
index 322689ef3a2..978a02112b2 100644
@@ -106,3 +106,4 @@ CONFIG_IMX_VIDEO_SKIP=y
 CONFIG_IMX_HDMI=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_BMP_16BPP=y
+CONFIG_NET=y
configs/odroid-c2_defconfig +1 -0
index ce5eaec3cd2..e922314e54a 100644
@@ -71,3 +71,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/odroid-c4_defconfig +1 -0
index 4ef1e681666..9b59ecea421 100644
@@ -82,3 +82,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/odroid-go-ultra_defconfig +1 -0
index 06437fe3ae0..20e4bdea976 100644
@@ -75,3 +75,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xfada
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_NET=y
configs/odroid-hc4_defconfig +1 -0
index 60233fb9cee..ffcdb4f4a2e 100644
@@ -99,3 +99,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/odroid-n2_defconfig +1 -0
index a4cc766f84a..72a0c2e51c7 100644
@@ -79,3 +79,4 @@ CONFIG_VIDEO_DT_SIMPLEFB=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/odroid-n2l_defconfig +1 -0
index 3f657d18812..45617f04705 100644
@@ -74,3 +74,4 @@ CONFIG_VIDEO_DT_SIMPLEFB=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/odroid-xu3_defconfig +1 -0
index c80900e2cc5..66e51ad1b79 100644
@@ -72,3 +72,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x04e8
 CONFIG_USB_GADGET_PRODUCT_NUM=0x6601
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_ERRNO_STR=y
+CONFIG_NET=y
configs/p200_defconfig +1 -0
index b6946034795..1a84f5cfb5b 100644
@@ -45,3 +45,4 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_DEBUG_UART_SKIP_INIT=y
 CONFIG_MESON_SERIAL=y
+CONFIG_NET=y
configs/p201_defconfig +1 -0
index dcc1454be16..dfbe1b79ed0 100644
@@ -46,3 +46,4 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_DEBUG_UART_SKIP_INIT=y
 CONFIG_MESON_SERIAL=y
+CONFIG_NET=y
configs/p212_defconfig +1 -0
index 9cf22ca4db7..1ae033bc804 100644
@@ -54,3 +54,4 @@ CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_MESON_GXL=y
+CONFIG_NET=y
configs/peach-pi_defconfig +1 -0
index 27d438efb79..b420b278764 100644
@@ -90,3 +90,4 @@ CONFIG_VIDEO_BRIDGE=y
 CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y
 CONFIG_TPM=y
 CONFIG_ERRNO_STR=y
+CONFIG_NET=y
configs/peach-pit_defconfig +1 -0
index 1c7e0114a85..42323d5e547 100644
@@ -89,3 +89,4 @@ CONFIG_VIDEO_BRIDGE=y
 CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y
 CONFIG_TPM=y
 CONFIG_ERRNO_STR=y
+CONFIG_NET=y
configs/phycore_pcl063_defconfig +1 -0
index 2f6b158a677..fdc2b1493d9 100644
@@ -68,3 +68,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x4fff
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 # CONFIG_RANDOM_UUID is not set
+CONFIG_NET=y
configs/pico-dwarf-imx6ul_defconfig +1 -0
index 8b90285980f..668a9321504 100644
@@ -79,3 +79,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
+CONFIG_NET=y
configs/pico-dwarf-imx7d_defconfig +1 -0
index 9d5241a50d0..e390cd4e304 100644
@@ -95,3 +95,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_BMP_16BPP=y
+CONFIG_NET=y
configs/pico-hobbit-imx6ul_defconfig +1 -0
index e3aca6e82e1..7283a6754d1 100644
@@ -82,3 +82,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
+CONFIG_NET=y
configs/pico-hobbit-imx7d_defconfig +1 -0
index 690139c09ca..a48ce623f2b 100644
@@ -94,3 +94,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_BMP_16BPP=y
+CONFIG_NET=y
configs/pico-imx6ul_defconfig +1 -0
index ce29718a903..2d4e68ca76e 100644
@@ -90,3 +90,4 @@ CONFIG_VIDEO_LOGO=y
 CONFIG_VIDEO_MXS=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
+CONFIG_NET=y
configs/pico-imx7d_bl33_defconfig +1 -0
index 1327523e289..c63a4620089 100644
@@ -94,3 +94,4 @@ CONFIG_VIDEO_MXS=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_BMP_16BPP=y
+CONFIG_NET=y
configs/pico-imx7d_defconfig +1 -0
index 6009b1c65c1..f614c6fbc40 100644
@@ -96,3 +96,4 @@ CONFIG_VIDEO_MXS=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_BMP_16BPP=y
+CONFIG_NET=y
configs/pico-nymph-imx7d_defconfig +1 -0
index 9d5241a50d0..e390cd4e304 100644
@@ -95,3 +95,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_BMP_16BPP=y
+CONFIG_NET=y
configs/pico-pi-imx6ul_defconfig +1 -0
index 81f3e9bbebb..2b86127d59b 100644
@@ -82,3 +82,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
+CONFIG_NET=y
configs/pico-pi-imx7d_defconfig +1 -0
index 28c46abed78..6a14e3bcd72 100644
@@ -98,3 +98,4 @@ CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_BMP_16BPP=y
 CONFIG_IMX_WATCHDOG=y
+CONFIG_NET=y
configs/radxa-zero2_defconfig +1 -0
index 92e0a8833cc..ba90842e973 100644
@@ -77,3 +77,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/radxa-zero_defconfig +1 -0
index 5179c58dadc..b734fa8c6a4 100644
@@ -73,3 +73,4 @@ CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
+CONFIG_NET=y
configs/riotboard_defconfig +1 -0
index a1e806be421..3f61fe5831e 100644
@@ -89,3 +89,4 @@ CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_BMP_16BPP=y
 CONFIG_SPL_OF_LIBFDT=y
+CONFIG_NET=y
configs/s400_defconfig +1 -0
index d75d296fa0e..01607562552 100644
@@ -60,3 +60,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e
 CONFIG_USB_GADGET_PRODUCT_NUM=0xfada
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_NET=y
configs/seeed_npi_imx6ull_defconfig +1 -0
index e7557025dd2..f093c26dd7f 100644
@@ -75,3 +75,4 @@ CONFIG_SPL_USB_HOST=y
 CONFIG_USB_GADGET=y
 CONFIG_SPL_USB_GADGET=y
 # CONFIG_RANDOM_UUID is not set
+CONFIG_NET=y
configs/smdk5250_defconfig +1 -0
index 8b42c8bdb32..abc601da69f 100644
@@ -73,3 +73,4 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX88179=y
 CONFIG_ERRNO_STR=y
+CONFIG_NET=y
configs/smdk5420_defconfig +1 -0
index 55a53178f9c..dd4e4fb9849 100644
@@ -58,3 +58,4 @@ CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_HOST_ETHER=y
+CONFIG_NET=y
configs/snow_defconfig +1 -0
index 2c0757194bd..664ea4032f7 100644
@@ -108,3 +108,4 @@ CONFIG_VIDEO_BRIDGE_NXP_PTN3460=y
 CONFIG_TPM=y
 CONFIG_ERRNO_STR=y
 CONFIG_UNIT_TEST=y
+CONFIG_NET=y
configs/spring_defconfig +1 -0
index 2bd45cb9d60..4b5a4e61896 100644
@@ -101,3 +101,4 @@ CONFIG_VIDEO_BRIDGE=y
 CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y
 CONFIG_TPM=y
 CONFIG_ERRNO_STR=y
+CONFIG_NET=y
configs/ten64_tfa_defconfig +1 -0
index 88609d8401f..5cb2c6070ad 100644
@@ -97,3 +97,4 @@ CONFIG_WDT=y
 CONFIG_WDT_SP805=y
 CONFIG_TPM=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_NET=y
configs/turris_mox_defconfig +1 -0
index c62e0d04c9c..7b394a904cf 100644
@@ -106,3 +106,4 @@ CONFIG_USB_ETHER_RTL8152=y
 CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_WDT=y
 CONFIG_WDT_ARMADA_37XX=y
+CONFIG_NET=y
configs/turris_omnia_defconfig +1 -0
index c8756a3a788..e82e1e727ed 100644
@@ -129,3 +129,4 @@ CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_WDT=y
 CONFIG_WDT_ORION=y
+CONFIG_NET=y
configs/u200_defconfig +1 -0
index 879ae0defa7..6079f68d82a 100644
@@ -63,3 +63,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xfada
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_NET=y
configs/vexpress_aemv8a_juno_defconfig +1 -0
index 7ac70edc2ea..63647b0ff8d 100644
@@ -36,3 +36,4 @@ CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SYS_MAX_FLASH_SECT=259
 CONFIG_USB=y
+CONFIG_NET=y
configs/vexpress_aemv8a_semi_defconfig +1 -0
index 29f8213e6e0..234d7d86cd1 100644
@@ -31,3 +31,4 @@ CONFIG_SYS_FLASH_EMPTY_INFO=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_SYS_MAX_FLASH_SECT=256
+CONFIG_NET=y
configs/vexpress_aemv8r_defconfig +1 -0
index 96fbef5fa19..2d8810782ff 100644
@@ -14,3 +14,4 @@ CONFIG_SYS_PBSIZE=541
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_SYS_PROMPT="VExpress64# "
 # CONFIG_MMC is not set
+CONFIG_NET=y
configs/vexpress_ca9x4_defconfig +1 -0
index 67adba437bf..ec33e22a982 100644
@@ -36,6 +36,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_OF_EMBED=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
+CONFIG_NET=y
 CONFIG_CLK=y
 CONFIG_ARM_PL180_MMCI=y
 CONFIG_SYS_MMC_MAX_BLK_COUNT=127
configs/vexpress_fvp_defconfig +1 -0
index 7362c1fc35c..c054cbef539 100644
@@ -3,3 +3,4 @@ CONFIG_ARCH_VEXPRESS64=y
 CONFIG_DEFAULT_DEVICE_TREE="arm_fvp"
 CONFIG_IDENT_STRING=" arm_fvp"
 # CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_NET=y
configs/videostrong-kii-pro_defconfig +1 -0
index 7a5af234471..6f9b2f15e92 100644
@@ -69,3 +69,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/wandboard_defconfig +1 -0
index e9deab38038..df41406a7ef 100644
@@ -91,3 +91,4 @@ CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_BMP_16BPP=y
 CONFIG_IMX_WATCHDOG=y
+CONFIG_NET=y
configs/wetek-core2_defconfig +1 -0
index c4b126c2b7e..2f601f8c008 100644
@@ -76,3 +76,4 @@ CONFIG_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
+CONFIG_NET=y
configs/wetek-hub_defconfig +1 -0
index 85cff73f50f..6fd4cc1410a 100644
@@ -69,3 +69,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
configs/wetek-play2_defconfig +1 -0
index efdf820165b..fa270b4db66 100644
@@ -69,3 +69,4 @@ CONFIG_VIDEO_BMP_RLE8=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_NET=y
Signature · 1 line
2.40.1
#57 lore raw
In reply to Jerome Forissier
Quoted 10 lines · Jerome Forissier

This is a rework of a patch series by Maxim Uvarov: "net/lwip: add lwip library for the network stack" [1]. The goal is to introduce the lwIP TCP/IP stack [2] [3] as an alternative to the current implementation in net/, selectable with Kconfig, and ultimately keep only lwIP if possible. Some reasons for doing so are:
- Make the support of HTTPS in the wget command easier. Javier T. and Raymond M. (CC'd) have some additional lwIP and Mbed TLS patches to do so. With that it becomes possible to fetch and launch a distro installer such as Debian etc. using a secure, authenticated connection directly from the U-Boot shell. Several use cases:

Quoted 8 lines

* Authentication: prevent MITM attack (third party replacing the
binary with a different one)
* Confidentiality: prevent third parties from grabbing a copy of the
image as it is being downloaded
* Allow connection to servers that do not support plain HTTP anymore
(this is becoming more and more common on the Internet these days)
- Possibly benefit from additional features implemented in lwIP
- Less code to maintain in U-Boot

As an odd thing, the series leads to ethernut5 failing to build, strangely over the RTC driver it uses, for me. I did have to manually merge the CMD_WGET related patch, but I don't think that was what went wrong here.

Signature · 1 line
Tom
#58 lore raw
Quoted 21 lines · Tom Rini
Quoted 10 lines · Jerome Forissier

This is a rework of a patch series by Maxim Uvarov: "net/lwip: add lwip library for the network stack" [1]. The goal is to introduce the lwIP TCP/IP stack [2] [3] as an alternative to the current implementation in net/, selectable with Kconfig, and ultimately keep only lwIP if possible. Some reasons for doing so are:
- Make the support of HTTPS in the wget command easier. Javier T. and Raymond M. (CC'd) have some additional lwIP and Mbed TLS patches to do so. With that it becomes possible to fetch and launch a distro installer such as Debian etc. using a secure, authenticated connection directly from the U-Boot shell. Several use cases:

Quoted 8 lines

* Authentication: prevent MITM attack (third party replacing the
binary with a different one)
* Confidentiality: prevent third parties from grabbing a copy of the
image as it is being downloaded
* Allow connection to servers that do not support plain HTTP anymore
(this is becoming more and more common on the Internet these days)
- Possibly benefit from additional features implemented in lwIP
- Less code to maintain in U-Boot

Quoted 2 lines

As an odd thing, the series leads to ethernut5 failing to build, strangely over the RTC driver it uses, for me.

Weird.

Quoted 2 lines

I did have to manually
merge the CMD_WGET related patch,

Weird.

Quoted 2 lines

but I don't think that was what went
wrong here.

Could you try to build from GitHub perhaps?
Branch https://github.com/jforissier/u-boot/tree/to-upstream/v9 builds fine here:

$ ./tools/buildman/buildman ethernut5
Building current source for 1 boards (1 thread, 24 jobs per thread)
       arm:  w+   ethernut5
+===================== WARNING ======================
+This board does not use CONFIG_DM_I2C (Driver Model
+for I2C drivers). Please update the board to use
+CONFIG_DM_I2C before the v2022.04 release. Failure to
+update by the deadline may result in board removal.
+See doc/develop/driver-model/migration.rst for more info.
+====================================================
    0    1    0 /1              ethernut5

Thanks,

Signature · 1 line
Jerome
#59 lore raw
Quoted 45 lines · Jerome Forissier
Quoted 21 lines · Tom Rini
Quoted 10 lines · Jerome Forissier

This is a rework of a patch series by Maxim Uvarov: "net/lwip: add lwip library for the network stack" [1]. The goal is to introduce the lwIP TCP/IP stack [2] [3] as an alternative to the current implementation in net/, selectable with Kconfig, and ultimately keep only lwIP if possible. Some reasons for doing so are:
- Make the support of HTTPS in the wget command easier. Javier T. and Raymond M. (CC'd) have some additional lwIP and Mbed TLS patches to do so. With that it becomes possible to fetch and launch a distro installer such as Debian etc. using a secure, authenticated connection directly from the U-Boot shell. Several use cases:

Quoted 8 lines

* Authentication: prevent MITM attack (third party replacing the
binary with a different one)
* Confidentiality: prevent third parties from grabbing a copy of the
image as it is being downloaded
* Allow connection to servers that do not support plain HTTP anymore
(this is becoming more and more common on the Internet these days)
- Possibly benefit from additional features implemented in lwIP
- Less code to maintain in U-Boot

Quoted 2 lines

As an odd thing, the series leads to ethernut5 failing to build, strangely over the RTC driver it uses, for me.

Weird.

Quoted 2 lines

I did have to manually
merge the CMD_WGET related patch,

Weird.

Quoted 2 lines

but I don't think that was what went
wrong here.

Could you try to build from GitHub perhaps?
Branch https://github.com/jforissier/u-boot/tree/to-upstream/v9 builds fine here:

$ ./tools/buildman/buildman ethernut5
Building current source for 1 boards (1 thread, 24 jobs per thread)
       arm:  w+   ethernut5
+===================== WARNING ======================

Review

Quoted 7 lines
(quoted diff) +6 -0
+This board does not use CONFIG_DM_I2C (Driver Model
+for I2C drivers). Please update the board to use
+CONFIG_DM_I2C before the v2022.04 release. Failure to
+update by the deadline may result in board removal.
+See doc/develop/driver-model/migration.rst for more info.
+====================================================
    0    1    0 /1              ethernut5

I think you weren't on latest next branch when you posted v9, and that's at least the merge conflict. I see the platform builds on your branch as well, but fails still, on mine.

Signature · 1 line
Tom
#60 lore raw
Quoted 42 lines · Tom Rini
Quoted 41 lines · Jerome Forissier
Quoted 21 lines · Tom Rini
Quoted 10 lines · Jerome Forissier

This is a rework of a patch series by Maxim Uvarov: "net/lwip: add lwip library for the network stack" [1]. The goal is to introduce the lwIP TCP/IP stack [2] [3] as an alternative to the current implementation in net/, selectable with Kconfig, and ultimately keep only lwIP if possible. Some reasons for doing so are:
- Make the support of HTTPS in the wget command easier. Javier T. and Raymond M. (CC'd) have some additional lwIP and Mbed TLS patches to do so. With that it becomes possible to fetch and launch a distro installer such as Debian etc. using a secure, authenticated connection directly from the U-Boot shell. Several use cases:

Quoted 8 lines

* Authentication: prevent MITM attack (third party replacing the
binary with a different one)
* Confidentiality: prevent third parties from grabbing a copy of the
image as it is being downloaded
* Allow connection to servers that do not support plain HTTP anymore
(this is becoming more and more common on the Internet these days)
- Possibly benefit from additional features implemented in lwIP
- Less code to maintain in U-Boot

Quoted 2 lines

As an odd thing, the series leads to ethernut5 failing to build, strangely over the RTC driver it uses, for me.

Weird.

Quoted 2 lines

I did have to manually
merge the CMD_WGET related patch,

Weird.

Quoted 2 lines

but I don't think that was what went
wrong here.

Could you try to build from GitHub perhaps?
Branch https://github.com/jforissier/u-boot/tree/to-upstream/v9 builds fine here:

Quoted 15 lines

Review

Quoted 11 lines
$ ./tools/buildman/buildman ethernut5
Building current source for 1 boards (1 thread, 24 jobs per thread)
       arm:  w+   ethernut5
+===================== WARNING ======================
(quoted diff) +6 -0
+This board does not use CONFIG_DM_I2C (Driver Model
+for I2C drivers). Please update the board to use
+CONFIG_DM_I2C before the v2022.04 release. Failure to
+update by the deadline may result in board removal.
+See doc/develop/driver-model/migration.rst for more info.
+====================================================
    0    1    0 /1              ethernut5

I think you weren't on latest next branch when you posted v9, and that's at least the merge conflict. I see the platform builds on your branch as well, but fails still, on mine.

I was on latest master as recommended by the documentation [1] but perhaps I missed an announcement that next should be used instead? Anyway I'm looking into the issues now. Thanks!

[1] https://docs.u-boot.org/en/latest/develop/sending_patches.html

Signature · 1 line
Jerome
#61 lore raw
Quoted 61 lines · Jerome Forissier
Quoted 42 lines · Tom Rini
Quoted 41 lines · Jerome Forissier
Quoted 21 lines · Tom Rini
Quoted 10 lines · Jerome Forissier

This is a rework of a patch series by Maxim Uvarov: "net/lwip: add lwip library for the network stack" [1]. The goal is to introduce the lwIP TCP/IP stack [2] [3] as an alternative to the current implementation in net/, selectable with Kconfig, and ultimately keep only lwIP if possible. Some reasons for doing so are:
- Make the support of HTTPS in the wget command easier. Javier T. and Raymond M. (CC'd) have some additional lwIP and Mbed TLS patches to do so. With that it becomes possible to fetch and launch a distro installer such as Debian etc. using a secure, authenticated connection directly from the U-Boot shell. Several use cases:

Quoted 8 lines

* Authentication: prevent MITM attack (third party replacing the
binary with a different one)
* Confidentiality: prevent third parties from grabbing a copy of the
image as it is being downloaded
* Allow connection to servers that do not support plain HTTP anymore
(this is becoming more and more common on the Internet these days)
- Possibly benefit from additional features implemented in lwIP
- Less code to maintain in U-Boot

Quoted 2 lines

As an odd thing, the series leads to ethernut5 failing to build, strangely over the RTC driver it uses, for me.

Weird.

Quoted 2 lines

I did have to manually
merge the CMD_WGET related patch,

Weird.

Quoted 2 lines

but I don't think that was what went
wrong here.

Could you try to build from GitHub perhaps?
Branch https://github.com/jforissier/u-boot/tree/to-upstream/v9 builds fine here:

Quoted 15 lines

Review

Quoted 11 lines
$ ./tools/buildman/buildman ethernut5
Building current source for 1 boards (1 thread, 24 jobs per thread)
       arm:  w+   ethernut5
+===================== WARNING ======================
(quoted diff) +6 -0
+This board does not use CONFIG_DM_I2C (Driver Model
+for I2C drivers). Please update the board to use
+CONFIG_DM_I2C before the v2022.04 release. Failure to
+update by the deadline may result in board removal.
+See doc/develop/driver-model/migration.rst for more info.
+====================================================
    0    1    0 /1              ethernut5

I think you weren't on latest next branch when you posted v9, and that's at least the merge conflict. I see the platform builds on your branch as well, but fails still, on mine.

Quoted 5 lines

I was on latest master as recommended by the documentation [1] but perhaps I missed an announcement that next should be used instead? Anyway I'm looking into the issues now. Thanks!

[1] https://docs.u-boot.org/en/latest/develop/sending_patches.html

Ah, OK. Yeah, so
https://docs.u-boot.org/en/latest/develop/release_cycle.html was updated to reflect when next opens, but sending_patches needs to be clarified. I'll go look at that now. When the next branch is open, new work should be based on that.

Signature · 1 line
Tom
#62 lore raw
In reply to Jerome Forissier

Hi Jerome,

Quoted 15 lines

Jerome Forissier (36):
Makefile: detect HOST_ARCH properly when CROSS_COMPILE is multi-word
flash: prefix error codes with FL_
at91: rename mem_init() to at91_mem_init()
arm: omap2: add missing #include <netdev.h>
net: fm: call dtsec_init_phy() only when it is defined
net: wget: removed unused function wget_success()
net: phy: ncsi: depend on NET
net: ftgmac100: depend on NET
net: wget: allow EFI boot
net: fec_mxc_init(): do not ignore return status of fec_open() test/py: net_boot: fix comment
test/py: test_efi_loader: add missing dependency on cmd_tftpboot test/py: test_efi_loader: add HTTP (wget) test for the EFI loader

All of the above look like they should be sent as a separate fixes series which the following can depend on, they all look like fixes that are separate to the rest and likely are useful on their own. It would have the advantage of slimming down the series.

Quoted 348 lines

net: introduce alternative implementation as net-lwip/
configs: replace '# CONFIG_NET is not set' with CONFIG_NO_NET=y
net: split include/net.h into net{,-common,-legacy,-lwip}.h
net: move copy_filename() to new file net/net-common.c
net: eth-uclass: add function eth_start_udev()
net-lwip: build lwIP
net-lwip: add DHCP support and dhcp commmand
net-lwip: add TFTP support and tftpboot command
net-lwip: add ping command
net-lwip: add dns command
net: split cmd/net.c into cmd/net.c and cmd/net-common.c
net-lwip: add wget command
cmd: bdinfo: enable -e when CONFIG_CMD_NET_LWIP=y
configs: add qemu_arm64_lwip_defconfig
lwip: tftp: add support of blksize option to client
net-lwip: add TFTP_BLOCKSIZE
CI: add qemu_arm64_lwip to the test matrix
MAINTAINERS: net-lwip: add myself as a maintainer
Kconfig: fix undefined symbols (g_dnl*) when NET_LWIP is default
enabled
configs: use syntax CONFIG_FOO=n in tools-only_defconfig [TESTING] Kconfig: enable NET_LWIP by default except for SANDBOX [TESTING] configs: set CONFIG_NET=y for FTGMAC100 [TESTING] configs: set CONFIG_NET=y when PXE is enabled

Jonathan Humphreys (1):
net-lwip: lwIP wget supports user defined port in the uri, so allow

    it.
 .azure-pipelines.yml                          |   7 +
 Kconfig                                       |  31 +
 MAINTAINERS                                   |  11 +
 Makefile                                      |   6 +-
 arch/arm/mach-at91/include/mach/at91_common.h |   2 +-
 arch/arm/mach-at91/spl_at91.c                 |   2 +-
 arch/arm/mach-at91/spl_atmel.c                |   2 +-
 arch/arm/mach-omap2/omap3/emac.c              |   1 +
 .../atmel/at91sam9m10g45ek/at91sam9m10g45ek.c |   2 +-
 board/atmel/at91sam9n12ek/at91sam9n12ek.c     |   2 +-
 board/atmel/at91sam9x5ek/at91sam9x5ek.c       |   2 +-
 .../atmel/sama5d27_som1_ek/sama5d27_som1_ek.c |   2 +-
 .../sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c   |   2 +-
 board/atmel/sama5d2_icp/sama5d2_icp.c         |   2 +-
 .../atmel/sama5d2_xplained/sama5d2_xplained.c |   2 +-
 .../atmel/sama5d3_xplained/sama5d3_xplained.c |   2 +-
 board/atmel/sama5d3xek/sama5d3xek.c           |   2 +-
 .../atmel/sama5d4_xplained/sama5d4_xplained.c |   2 +-
 board/atmel/sama5d4ek/sama5d4ek.c             |   2 +-
 board/cobra5272/flash.c                       |  26 +-
 .../conclusive/kstr-sama5d27/kstr-sama5d27.c  |   2 +-
 board/engicam/imx8mp/icore_mx8mp.c            |   2 +-
 board/freescale/m5253demo/flash.c             |   6 +-
 board/gardena/smart-gateway-at91sam/spl.c     |   2 +-
 .../imx8mp_debix_model_a.c                    |   2 +-
 board/siemens/corvus/board.c                  |   2 +-
 board/siemens/smartweb/smartweb.c             |   2 +-
 board/siemens/taurus/taurus.c                 |   2 +-
 board/ti/am335x/board.c                       |   3 +-
 board/xilinx/common/board.c                   |   3 +-
 boot/Kconfig                                  |   4 +-
 cmd/Kconfig                                   | 129 ++-
 cmd/Makefile                                  |   9 +-
 cmd/bdinfo.c                                  |   5 +-
 cmd/elf.c                                     |   2 +-
 cmd/net-common.c                              | 109 ++
 cmd/net-lwip.c                                |  45 +
 cmd/net.c                                     | 115 ---
 common/Kconfig                                |   2 +-
 common/board_r.c                              |   4 +-
 common/flash.c                                |  44 +-
 common/spl/Kconfig                            |   1 +
 common/usb_kbd.c                              |   2 +-
 configs/LicheePi_Zero_defconfig               |   2 +-
 configs/M5249EVB_defconfig                    |   2 +-
 configs/ad401_defconfig                       |   1 +
 configs/am335x_pdu001_defconfig               |   2 +-
 configs/am43xx_evm_defconfig                  |   1 +
 configs/am43xx_evm_qspiboot_defconfig         |   1 +
 configs/am43xx_evm_rtconly_defconfig          |   1 +
 configs/am43xx_evm_usbhost_boot_defconfig     |   1 +
 configs/am43xx_hs_evm_defconfig               |   1 +
 configs/am43xx_hs_evm_qspi_defconfig          |   1 +
 configs/am57xx_evm_defconfig                  |   1 +
 configs/am57xx_hs_evm_defconfig               |   1 +
 configs/am57xx_hs_evm_usb_defconfig           |   1 +
 configs/am62ax_evm_r5_defconfig               |   2 +-
 configs/am62px_evm_r5_defconfig               |   2 +-
 configs/am62x_beagleplay_r5_defconfig         |   2 +-
 configs/amcore_defconfig                      |   2 +-
 configs/anbernic-rgxx3-rk3566_defconfig       |   2 +-
 configs/ap143_defconfig                       |   2 +-
 configs/ap152_defconfig                       |   2 +-
 configs/apple_m1_defconfig                    |   2 +-
 configs/arndale_defconfig                     |   1 +
 configs/astro_mcf5373l_defconfig              |   2 +-
 configs/at91sam9rlek_dataflash_defconfig      |   2 +-
 configs/at91sam9rlek_mmc_defconfig            |   2 +-
 configs/at91sam9rlek_nandflash_defconfig      |   2 +-
 configs/bananapi-cm4-cm4io_defconfig          |   1 +
 configs/bananapi-m2-pro_defconfig             |   1 +
 configs/bananapi-m2s_defconfig                |   1 +
 configs/bananapi-m5_defconfig                 |   1 +
 configs/bcm7260_defconfig                     |   2 +-
 configs/bcm7445_defconfig                     |   2 +-
 configs/bcm968380gerg_ram_defconfig           |   2 +-
 configs/bcmns_defconfig                       |   2 +-
 configs/beelink-gsking-x_defconfig            |   1 +
 configs/beelink-gt1-ultimate_defconfig        |   1 +
 configs/beelink-gtking_defconfig              |   1 +
 configs/beelink-gtkingpro_defconfig           |   1 +
 configs/chromebook_samus_tpl_defconfig        |   2 +-
 configs/clearfog_defconfig                    |   1 +
 configs/clearfog_gt_8k_defconfig              |   1 +
 configs/clearfog_sata_defconfig               |   1 +
 configs/clearfog_spi_defconfig                |   1 +
 configs/cortina_presidio-asic-base_defconfig  |   2 +-
 configs/cortina_presidio-asic-pnand_defconfig |   2 +-
 configs/dra7xx_evm_defconfig                  |   1 +
 configs/dra7xx_hs_evm_defconfig               |   1 +
 configs/dra7xx_hs_evm_usb_defconfig           |   1 +
 configs/durian_defconfig                      |   2 +-
 configs/e850-96_defconfig                     |   2 +-
 configs/ea-lpc3250devkitv2_defconfig          |   2 +-
 configs/efi-x86_app32_defconfig               |   2 +-
 configs/efi-x86_app64_defconfig               |   2 +-
 configs/emsdp_defconfig                       |   2 +-
 configs/evb-ast2500_defconfig                 |   1 +
 configs/evb-ast2600_defconfig                 |   1 +
 configs/evb-px5_defconfig                     |   2 +-
 configs/generic-rk3568_defconfig              |   2 +-
 configs/generic-rk3588_defconfig              |   2 +-
 configs/hc2910_2aghd05_defconfig              |   2 +-
 configs/helios4_defconfig                     |   1 +
 configs/igep00x0_defconfig                    |   2 +-
 configs/imx6q_bosch_acc_defconfig             |   2 +-
 configs/imx6ulz_smm_m2_defconfig              |   2 +-
 configs/imx8mn_var_som_defconfig              |   1 +
 configs/iot_devkit_defconfig                  |   2 +-
 configs/jethub_j100_defconfig                 |   1 +
 configs/jethub_j80_defconfig                  |   1 +
 configs/khadas-vim2_defconfig                 |   1 +
 configs/khadas-vim3_defconfig                 |   1 +
 configs/khadas-vim3l_defconfig                |   1 +
 configs/khadas-vim_defconfig                  |   1 +
 configs/kontron-sl-mx6ul_defconfig            |   1 +
 configs/kontron-sl-mx8mm_defconfig            |   1 +
 configs/kontron_pitx_imx8m_defconfig          |   1 +
 configs/kontron_sl28_defconfig                |   1 +
 configs/legoev3_defconfig                     |   2 +-
 configs/libretech-ac_defconfig                |   1 +
 configs/libretech-cc_defconfig                |   1 +
 configs/libretech-cc_v2_defconfig             |   1 +
 configs/libretech-s905d-pc_defconfig          |   1 +
 configs/libretech-s912-pc_defconfig           |   1 +
 configs/marsboard_defconfig                   |   1 +
 configs/mk808_defconfig                       |   2 +-
 configs/mvebu_crb_cn9130_defconfig            |   1 +
 configs/mvebu_db_armada8k_defconfig           |   1 +
 configs/mvebu_db_cn9130_defconfig             |   1 +
 configs/mvebu_mcbin-88f8040_defconfig         |   1 +
 configs/mvebu_puzzle-m801-88f8040_defconfig   |   1 +
 configs/mx23evk_defconfig                     |   2 +-
 configs/mx28evk_defconfig                     |   2 +-
 configs/mx53cx9020_defconfig                  |   1 +
 configs/mx6cuboxi_defconfig                   |   1 +
 configs/mx6memcal_defconfig                   |   2 +-
 configs/mx6ulz_14x14_evk_defconfig            |   2 +-
 configs/mx7dsabresd_defconfig                 |   1 +
 configs/mx7dsabresd_qspi_defconfig            |   1 +
 configs/mx7ulp_com_defconfig                  |   2 +-
 configs/mx7ulp_evk_defconfig                  |   2 +-
 configs/mx7ulp_evk_plugin_defconfig           |   2 +-
 configs/myir_mys_6ulx_defconfig               |   1 +
 configs/nanopi-k2_defconfig                   |   1 +
 configs/netgear_cg3100d_ram_defconfig         |   2 +-
 configs/novena_defconfig                      |   1 +
 configs/nsim_700_defconfig                    |   2 +-
 configs/nsim_700be_defconfig                  |   2 +-
 configs/nsim_hs38be_defconfig                 |   2 +-
 configs/odroid-c2_defconfig                   |   1 +
 configs/odroid-c4_defconfig                   |   1 +
 configs/odroid-go-ultra_defconfig             |   1 +
 configs/odroid-hc4_defconfig                  |   1 +
 configs/odroid-n2_defconfig                   |   1 +
 configs/odroid-n2l_defconfig                  |   1 +
 configs/odroid-xu3_defconfig                  |   1 +
 configs/openpiton_riscv64_defconfig           |   2 +-
 configs/openpiton_riscv64_spl_defconfig       |   2 +-
 configs/origen_defconfig                      |   2 +-
 configs/p200_defconfig                        |   1 +
 configs/p201_defconfig                        |   1 +
 configs/p212_defconfig                        |   1 +
 configs/pe2201_defconfig                      |   2 +-
 configs/peach-pi_defconfig                    |   1 +
 configs/peach-pit_defconfig                   |   1 +
 configs/phycore_pcl063_defconfig              |   1 +
 configs/pico-dwarf-imx6ul_defconfig           |   1 +
 configs/pico-dwarf-imx7d_defconfig            |   1 +
 configs/pico-hobbit-imx6ul_defconfig          |   1 +
 configs/pico-hobbit-imx7d_defconfig           |   1 +
 configs/pico-imx6ul_defconfig                 |   1 +
 configs/pico-imx7d_bl33_defconfig             |   1 +
 configs/pico-imx7d_defconfig                  |   1 +
 configs/pico-nymph-imx7d_defconfig            |   1 +
 configs/pico-pi-imx6ul_defconfig              |   1 +
 configs/pico-pi-imx7d_defconfig               |   1 +
 configs/pinecube_defconfig                    |   2 +-
 configs/pm9261_defconfig                      |   2 +-
 configs/qemu_arm64_lwip_defconfig             |  10 +
 configs/radxa-zero2_defconfig                 |   1 +
 configs/radxa-zero_defconfig                  |   1 +
 configs/riotboard_defconfig                   |   1 +
 configs/s400_defconfig                        |   1 +
 configs/s5p4418_nanopi2_defconfig             |   2 +-
 configs/s5p_goni_defconfig                    |   2 +-
 configs/s5pc210_universal_defconfig           |   2 +-
 configs/sama5d27_giantboard_defconfig         |   2 +-
 configs/sama5d29_curiosity_mmc1_defconfig     |   2 +-
 configs/sama5d29_curiosity_mmc_defconfig      |   2 +-
 .../sama5d29_curiosity_qspiflash_defconfig    |   2 +-
 configs/sama7g54_curiosity_mmc_defconfig      |   2 +-
 .../sama7g54_curiosity_nandflash_defconfig    |   2 +-
 .../sama7g54_curiosity_qspiflash_defconfig    |   2 +-
 configs/seeed_npi_imx6ull_defconfig           |   1 +
 configs/sipeed_maix_bitm_defconfig            |   2 +-
 configs/sipeed_maix_smode_defconfig           |   2 +-
 configs/smdk5250_defconfig                    |   1 +
 configs/smdk5420_defconfig                    |   1 +
 configs/snow_defconfig                        |   1 +
 configs/spring_defconfig                      |   1 +
 configs/stemmy_defconfig                      |   2 +-
 configs/stm32f429-discovery_defconfig         |   2 +-
 configs/stm32f429-evaluation_defconfig        |   2 +-
 configs/stm32f469-discovery_defconfig         |   2 +-
 configs/stm32h743-disco_defconfig             |   2 +-
 configs/stm32h743-eval_defconfig              |   2 +-
 configs/stm32h750-art-pi_defconfig            |   2 +-
 configs/stm32mp25_defconfig                   |   2 +-
 configs/stmark2_defconfig                     |   2 +-
 configs/ten64_tfa_defconfig                   |   1 +
 configs/th1520_lpi4a_defconfig                |   2 +-
 configs/thunderx_88xx_defconfig               |   2 +-
 configs/tools-only_defconfig                  |  34 +-
 configs/topic_miami_defconfig                 |   2 +-
 configs/topic_miamilite_defconfig             |   2 +-
 configs/topic_miamiplus_defconfig             |   2 +-
 configs/total_compute_defconfig               |   2 +-
 configs/trats2_defconfig                      |   2 +-
 configs/trats_defconfig                       |   2 +-
 configs/turris_mox_defconfig                  |   1 +
 configs/turris_omnia_defconfig                |   1 +
 configs/u200_defconfig                        |   1 +
 configs/vexpress_aemv8a_juno_defconfig        |   1 +
 configs/vexpress_aemv8a_semi_defconfig        |   1 +
 configs/vexpress_aemv8r_defconfig             |   1 +
 configs/vexpress_ca9x4_defconfig              |   1 +
 configs/vexpress_fvp_defconfig                |   1 +
 configs/videostrong-kii-pro_defconfig         |   1 +
 configs/wandboard_defconfig                   |   1 +
 configs/wetek-core2_defconfig                 |   1 +
 configs/wetek-hub_defconfig                   |   1 +
 configs/wetek-play2_defconfig                 |   1 +
 configs/xenguest_arm64_defconfig              |   2 +-
 configs/xenguest_arm64_virtio_defconfig       |   2 +-
 configs/xilinx_versal_mini_defconfig          |   2 +-
 configs/xilinx_versal_mini_emmc0_defconfig    |   2 +-
 configs/xilinx_versal_mini_emmc1_defconfig    |   2 +-
 configs/xilinx_versal_mini_ospi_defconfig     |   2 +-
 configs/xilinx_versal_mini_qspi_defconfig     |   2 +-
 configs/xilinx_versal_net_mini_defconfig      |   2 +-
 configs/xilinx_versal_net_mini_emmc_defconfig |   2 +-
 configs/xilinx_versal_net_mini_ospi_defconfig |   2 +-
 configs/xilinx_versal_net_mini_qspi_defconfig |   2 +-
 configs/xilinx_zynqmp_mini_defconfig          |   2 +-
 configs/xilinx_zynqmp_mini_emmc0_defconfig    |   2 +-
 configs/xilinx_zynqmp_mini_emmc1_defconfig    |   2 +-
 configs/xilinx_zynqmp_mini_nand_defconfig     |   2 +-
 .../xilinx_zynqmp_mini_nand_single_defconfig  |   2 +-
 configs/xilinx_zynqmp_mini_qspi_defconfig     |   2 +-
 configs/zynq_cse_nand_defconfig               |   2 +-
 configs/zynq_cse_nor_defconfig                |   2 +-
 configs/zynq_cse_qspi_defconfig               |   2 +-
 drivers/dfu/Kconfig                           |   2 +
 drivers/fastboot/Kconfig                      |   1 +
 drivers/mtd/altera_qspi.c                     |   4 +-
 drivers/mtd/cfi_flash.c                       |  36 +-
 drivers/net/Kconfig                           |   4 +-
 drivers/net/fec_mxc.c                         |   3 +-
 drivers/net/fm/eth.c                          |   2 +
 drivers/net/phy/Kconfig                       |   3 +-
 drivers/usb/gadget/Kconfig                    |   3 +-
 include/flash.h                               |  20 +-
 include/net-common.h                          | 490 +++++++++
 include/net-legacy.h                          | 560 +++++++++++
 include/net-lwip.h                            |  41 +
 include/net.h                                 | 943 +-----------------
 lib/Makefile                                  |   2 +
 lib/lwip/Makefile                             |  55 +
 lib/lwip/lwip/src/apps/tftp/tftp.c            |  94 +-
 .../lwip/src/include/lwip/apps/tftp_client.h  |   1 +
 lib/lwip/u-boot/arch/cc.h                     |  45 +
 lib/lwip/u-boot/arch/sys_arch.h               |   0
 lib/lwip/u-boot/limits.h                      |   0
 lib/lwip/u-boot/lwipopts.h                    | 157 +++
 lib/tiny-printf.c                             |   3 +-
 net/Kconfig                                   |  81 +-
 net/Makefile                                  |  20 +-
 net/eth-uclass.c                              |  38 +-
 net/lwip/Kconfig                              |  44 +
 net/lwip/Makefile                             |   8 +
 net/lwip/dhcp.c                               | 134 +++
 net/lwip/dns.c                                | 127 +++
 net/lwip/eth_internal.h                       |  35 +
 net/lwip/net-lwip.c                           | 302 ++++++
 net/lwip/ping.c                               | 177 ++++
 net/lwip/tftp.c                               | 286 ++++++
 net/lwip/wget.c                               | 357 +++++++
 net/net-common.c                              |  13 +
 net/net.c                                     |  12 -
 net/wget.c                                    |  11 +-
 test/py/tests/test_efi_loader.py              |  62 +-
 test/py/tests/test_net_boot.py                |   2 +-
 293 files changed, 3704 insertions(+), 1437 deletions(-)
 create mode 100644 cmd/net-common.c
 create mode 100644 cmd/net-lwip.c
 create mode 100644 configs/qemu_arm64_lwip_defconfig
 create mode 100644 include/net-common.h
 create mode 100644 include/net-legacy.h
 create mode 100644 include/net-lwip.h
 create mode 100644 lib/lwip/Makefile
 create mode 100644 lib/lwip/u-boot/arch/cc.h
 create mode 100644 lib/lwip/u-boot/arch/sys_arch.h
 create mode 100644 lib/lwip/u-boot/limits.h
 create mode 100644 lib/lwip/u-boot/lwipopts.h
 create mode 100644 net/lwip/Kconfig
 create mode 100644 net/lwip/Makefile
 create mode 100644 net/lwip/dhcp.c
 create mode 100644 net/lwip/dns.c
 create mode 100644 net/lwip/eth_internal.h
 create mode 100644 net/lwip/net-lwip.c
 create mode 100644 net/lwip/ping.c
 create mode 100644 net/lwip/tftp.c
 create mode 100644 net/lwip/wget.c
 create mode 100644 net/net-common.c

--
2.40.1

#63 lore raw

Hi Peter,

Quoted 18 lines · Peter Robinson

Hi Jerome,

Quoted 15 lines

Jerome Forissier (36):
Makefile: detect HOST_ARCH properly when CROSS_COMPILE is multi-word
flash: prefix error codes with FL_
at91: rename mem_init() to at91_mem_init()
arm: omap2: add missing #include <netdev.h>
net: fm: call dtsec_init_phy() only when it is defined
net: wget: removed unused function wget_success()
net: phy: ncsi: depend on NET
net: ftgmac100: depend on NET
net: wget: allow EFI boot
net: fec_mxc_init(): do not ignore return status of fec_open() test/py: net_boot: fix comment
test/py: test_efi_loader: add missing dependency on cmd_tftpboot test/py: test_efi_loader: add HTTP (wget) test for the EFI loader

Quoted 4 lines

All of the above look like they should be sent as a separate fixes series which the following can depend on, they all look like fixes that are separate to the rest and likely are useful on their own. It would have the advantage of slimming down the series.

I agree. I'll send them soon.

Thanks,

Signature · 1 line
Jerome