[PATCH 0/9] efi_loader/net: spit protocols and add testing

Adriano Cordova adrianox at gmail.com
Fri May 16 10:18:30 CEST 2025


This series depends on series 456885 "test/py: enable HTTP testing".

Create lib/efi_loader/net/, implement each EFI network protocol in a
separated file under lib/efi_loader/net/ and let efi_net.c be used only
to un/install protocols. The network protocol EFI_FOO_PROTOCOL is now
implemented in lib/efi_loader/net/efi_foo.c.

Add an app netdump.efi used to test the EFI_HTTP_PROTOCOL and the
EFI_IP4_CONFIG2_PROTOCOL.

Add tests test_efi_httpprotocol_net_* in test_efi_loader.py to test
the EFI_HTTP_PROTOCOL in the CI using netdump.efi. A branch of
u-boot-test-hooks with the necessay env variables can be found at
https://github.com/0n41rd4/u-boot-test-hooks.git.

U-Boot branch with this series on top of
456885 "test/py: enable HTTP testing" and next:
https://github.com/0n41rd4/u-boot.git

Adriano Cordova (9):
  lib/efi_loader: Move EFI network files into /lib/efi_loader/net/
  efi_loader/net: Remove http and ip4_config2 data from efi_net.c
  efi_loader/net: Rename efi_ipconfig.c to efi_ip4_config2.c
  efi_loader/net: Remove simple network and pxe protocols from efi_net.c
  efi_loader/net: Remove efi_net_obj struct
  net/eth-uclass: Add eth_get_ethaddr_from_dev
  efi_loader/net/ip4_config2: Add support for multiple instances
  efi_loader: Add netdump efi app
  pytests/test_efi_loader: Test EFI_HTTP_PROTOCOL

 doc/api/efi.rst                               |    2 +-
 include/efi_api.h                             |   28 +-
 include/efi_loader.h                          |   16 +-
 include/net-common.h                          |    1 +
 lib/efi_loader/Makefile                       |    5 +-
 lib/efi_loader/efi_net.c                      | 1715 -----------------
 lib/efi_loader/net/Makefile                   |    5 +
 lib/efi_loader/{ => net}/efi_http.c           |   20 +-
 .../{efi_ipconfig.c => net/efi_ip4_config2.c} |   86 +-
 lib/efi_loader/net/efi_net.c                  |  749 +++++++
 lib/efi_loader/net/efi_pxe.c                  |  190 ++
 lib/efi_loader/net/efi_simple_network.c       |  880 +++++++++
 lib/efi_loader/netdump.c                      |  851 ++++++++
 lib/efi_selftest/efi_selftest_snp.c           |    4 +-
 net/eth-uclass.c                              |   11 +-
 test/py/tests/test_efi_loader.py              |   63 +
 16 files changed, 2846 insertions(+), 1780 deletions(-)
 delete mode 100644 lib/efi_loader/efi_net.c
 create mode 100644 lib/efi_loader/net/Makefile
 rename lib/efi_loader/{ => net}/efi_http.c (96%)
 rename lib/efi_loader/{efi_ipconfig.c => net/efi_ip4_config2.c} (69%)
 create mode 100644 lib/efi_loader/net/efi_net.c
 create mode 100644 lib/efi_loader/net/efi_pxe.c
 create mode 100644 lib/efi_loader/net/efi_simple_network.c
 create mode 100644 lib/efi_loader/netdump.c

-- 
2.48.1



More information about the U-Boot mailing list