diff options
| author | Gary Ching-Pang Lin <glin@suse.com> | 2015-10-14 17:04:10 +0800 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2016-09-06 14:49:52 -0400 |
| commit | 3d79bcb2651b9eae809b975b3e03e2f96c067072 (patch) | |
| tree | a3125f9143e88e160826b6511caaaad84623577e /shim.c | |
| parent | 8438ae7a012fded349462706426b713ea98f1276 (diff) | |
| download | efi-boot-shim-3d79bcb2651b9eae809b975b3e03e2f96c067072.tar.gz efi-boot-shim-3d79bcb2651b9eae809b975b3e03e2f96c067072.zip | |
Add the optional HTTPBoot support
This commit adds the basic support for HTTPBoot, i.e. to fetch
the next stage loader with the HTTP protocol.
It requires gnu-efi >= 3.0.3 to support the URI device path and
Ip4Config2 or Ip6Config protocol support in the UEFI implementation.
To build shim.efi with HTTPBoot support:
make ENABLE_HTTPBOOT=1 shim.efi
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Diffstat (limited to 'shim.c')
| -rw-r--r-- | shim.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -39,6 +39,7 @@ #include "PeImage.h" #include "shim.h" #include "netboot.h" +#include "httpboot.h" #include "shim_cert.h" #include "replacements.h" #include "tpm.h" @@ -1722,6 +1723,17 @@ EFI_STATUS start_image(EFI_HANDLE image_handle, CHAR16 *ImagePath) } data = sourcebuffer; datasize = sourcesize; +#if defined(ENABLE_HTTPBOOT) + } else if (find_httpboot(li->DeviceHandle)) { + efi_status = httpboot_fetch_buffer (image_handle, &sourcebuffer, + &sourcesize); + if (efi_status != EFI_SUCCESS) { + perror(L"Unable to fetch HTTP image: %r\n", efi_status); + return efi_status; + } + data = sourcebuffer; + datasize = sourcesize; +#endif } else { /* * Read the new executable off disk |
