From: Alexander Graf Date: Tue, 18 Oct 2016 13:49:40 +0000 (+0200) Subject: efi_loader: Revert device_handle to disk after net boot X-Git-Tag: v2016.11-rc3~84^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3fb97e267a5e136d8386a7cb1d5b4fe63af518eb;p=u-boot efi_loader: Revert device_handle to disk after net boot When you boot an efi payload from network, then exit that payload and load another payload from disk afterwords, the disk payload will currently see the network device as its boot path. This breaks grub2 for example which tries to find its modules based on the path it was loaded from. This patch fixes that issue by always reverting to disk paths if we're not in the network boot. That way the data structures after a network boot look the same as before. Signed-off-by: Alexander Graf --- diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 8714666c03..c8079c4fe8 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -207,6 +207,8 @@ static unsigned long do_bootefi_exec(void *efi, void *fdt) if (!memcmp(bootefi_device_path[0].str, "N\0e\0t", 6)) loaded_image_info.device_handle = nethandle; + else + loaded_image_info.device_handle = bootefi_device_path; #endif #ifdef CONFIG_GENERATE_SMBIOS_TABLE efi_smbios_register();