From 20898ea9340a4fd1631a4057b8de011b9f166255 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 6 May 2016 21:01:07 +0200 Subject: distro: Add efi pxe boot code Now that we can expose network functionality to EFI applications, the logical next step is to load them via pxe to execute them as well. This patch adds the necessary bits to the distro script to automatically load and execute EFI payloads. It identifies the dhcp client as a uEFI capable PXE client, hoping the server returns a tftp path to a workable EFI binary that we can then execute. To enable boards that don't come with a working device tree preloaded, this patch also adds support to load a device tree from the /dtb directory on the remote tftp server. Signed-off-by: Alexander Graf Reviewed-by: Tom Rini --- net/bootp.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'net') diff --git a/net/bootp.c b/net/bootp.c index d718e35b63..85dc524df4 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -413,12 +413,21 @@ static void bootp_timeout_handler(void) static u8 *add_vci(u8 *e) { + char *vci = NULL; + char *env_vci = getenv("bootp_vci"); + #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_NET_VCI_STRING) - put_vci(e, CONFIG_SPL_NET_VCI_STRING); + vci = CONFIG_SPL_NET_VCI_STRING; #elif defined(CONFIG_BOOTP_VCI_STRING) - put_vci(e, CONFIG_BOOTP_VCI_STRING); + vci = CONFIG_BOOTP_VCI_STRING; #endif + if (env_vci) + vci = env_vci; + + if (vci) + put_vci(e, vci); + return e; } -- cgit v1.2.3