efinet Configure network from UEFI device path
authorMichael Chang <mchang@suse.com>
Tue, 25 Apr 2023 15:05:19 +0000 (11:05 -0400)
committerPeter Michael Green <plugwash@raspbian.org>
Sun, 28 Jul 2024 22:42:11 +0000 (22:42 +0000)
commit83db1c2e18f8d41dde134f4eba4105431865278b
tree5b9caa0a7fae891d12a1c645e297fb60b31e598c
parent8a079e6ac9500b94ac3d043746adf7045eae4484
efinet Configure network from UEFI device path

The PXE Base Code protocol used to obtain cached PXE DHCPACK packet is
no longer provided for HTTP Boot.  Instead, we have to get the HTTP boot
information from the device path nodes defined in following UEFI
Specification sections.

    9.3.5.12 IPv4 Device Path
    9.3.5.13 IPv6 Device Path
    9.3.5.23 Uniform Resource Identifiers (URI) Device Path

This patch basically does:

include/grub/efi/api.h:
Add new structure for Uniform Resource Identifiers (URI) Device Path

grub-core/net/drivers/efi/efinet.c:

Check if PXE Base Code is available.  If not, try to obtain the netboot
information from the device path where the image booted from.  The
DHCPACK packet is recoverd from the information in device patch and fed
into the same DHCP packet processing functions to ensure the network
interface is set up the same way it used to be.

Signed-off-by: Michael Chang <mchang@suse.com>
Signed-off-by: Ken Lin <ken.lin@hpe.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Gbp-Pq: Topic network
Gbp-Pq: Name efinet-Configure-network-from-UEFI-device-path.patch
grub-core/net/drivers/efi/efinet.c
include/grub/efi/api.h