]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: Add HttpBoot support
authorGary Ching-Pang Lin <glin@suse.com>
Sun, 23 Aug 2015 01:44:15 +0000 (01:44 +0000)
committerjljusten <jljusten@Edk2>
Sun, 23 Aug 2015 01:44:15 +0000 (01:44 +0000)
This commit introdues a new build option to OvmfPkg: HTTP_BOOT_ENABLE.
When HttpBoot is enabled, a new Network boot option will show in the
boot manager menu with the device path like this:

PciRoot(0x0)/Pci(0x3,0x0)/MAC(525400123456,0x1)/IPv4(0.0.0.0)/Uri()

It works like the PXE one but fetches the NBP from the given http
url instead of the tftp service.

A simple testing environment can be set up with the QEMU tap network
and dnsmasq + lighttpd.

Here is the example of the dnsmasq config:

  interface=<tap interface>
  dhcp-range=192.168.111.100,192.168.111.120,12h
  dhcp-option=60,"HTTPClient"
  dhcp-boot="http://<tap ip>/<efi file>"

It's similar to the PXE server settings except the tftp function is
disabled, the option 60 must be "HTTPClient", and the boot uri is a
http url.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18258 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/OvmfPkgIa32.dsc
OvmfPkg/OvmfPkgIa32.fdf
OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg/OvmfPkgIa32X64.fdf
OvmfPkg/OvmfPkgX64.dsc
OvmfPkg/OvmfPkgX64.fdf

index 4ab618d39570e8cbfe5f89231ad4e4599f43c263..9a6de15dc522bfdefe93db3f88dff8ca89efb4e2 100644 (file)
@@ -35,6 +35,7 @@
   #\r
   DEFINE SECURE_BOOT_ENABLE      = FALSE\r
   DEFINE NETWORK_IP6_ENABLE      = FALSE\r
+  DEFINE HTTP_BOOT_ENABLE        = FALSE\r
 \r
 [BuildOptions]\r
   GCC:*_UNIXGCC_*_CC_FLAGS             = -DMDEPKG_NDEBUG\r
   AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf\r
 !endif\r
 \r
+!if $(HTTP_BOOT_ENABLE) == TRUE\r
+  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf\r
+!endif\r
+\r
   S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf\r
   SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf\r
   OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf\r
   MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
   MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
   MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf\r
+!endif\r
+!if $(HTTP_BOOT_ENABLE) == TRUE\r
+  NetworkPkg/DnsDxe/DnsDxe.inf\r
+  NetworkPkg/HttpDxe/HttpDxe.inf\r
+  NetworkPkg/HttpBootDxe/HttpBootDxe.inf\r
 !endif\r
   OvmfPkg/VirtioNetDxe/VirtioNet.inf\r
 \r
index 16675f887b7bba0956a9d6bd7eecb3808cd2f1eb..0e4ee4960266a7c91bddb9df96f9ee52d6069585 100644 (file)
@@ -323,6 +323,11 @@ FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {
   INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
   INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
   INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf\r
+!endif\r
+!if $(HTTP_BOOT_ENABLE) == TRUE\r
+  INF  NetworkPkg/DnsDxe/DnsDxe.inf\r
+  INF  NetworkPkg/HttpDxe/HttpDxe.inf\r
+  INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf\r
 !endif\r
   INF  OvmfPkg/VirtioNetDxe/VirtioNet.inf\r
 \r
index 90ca42a4d9be10efefa4b10beefe596afa6647c6..2f8006da376f7d65b05dd1dfd01f10636addcee7 100644 (file)
@@ -35,6 +35,7 @@
   #\r
   DEFINE SECURE_BOOT_ENABLE      = FALSE\r
   DEFINE NETWORK_IP6_ENABLE      = FALSE\r
+  DEFINE HTTP_BOOT_ENABLE        = FALSE\r
 \r
 [BuildOptions]\r
   GCC:*_UNIXGCC_*_CC_FLAGS             = -DMDEPKG_NDEBUG\r
   AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf\r
 !endif\r
 \r
+!if $(HTTP_BOOT_ENABLE) == TRUE\r
+  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf\r
+!endif\r
+\r
   S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf\r
   SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf\r
   OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf\r
   MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
   MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
   MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf\r
+!endif\r
+!if $(HTTP_BOOT_ENABLE) == TRUE\r
+  NetworkPkg/DnsDxe/DnsDxe.inf\r
+  NetworkPkg/HttpDxe/HttpDxe.inf\r
+  NetworkPkg/HttpBootDxe/HttpBootDxe.inf\r
 !endif\r
   OvmfPkg/VirtioNetDxe/VirtioNet.inf\r
 \r
index e6c525a5057edf07628d35eb66e607a0b7e7bc2e..74412d46400e2bb9eb37a66e3a56a589c8ac4dc6 100644 (file)
@@ -323,6 +323,11 @@ FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {
   INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
   INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
   INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf\r
+!endif\r
+!if $(HTTP_BOOT_ENABLE) == TRUE\r
+  INF  NetworkPkg/DnsDxe/DnsDxe.inf\r
+  INF  NetworkPkg/HttpDxe/HttpDxe.inf\r
+  INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf\r
 !endif\r
   INF  OvmfPkg/VirtioNetDxe/VirtioNet.inf\r
 \r
index b72eaa92f82e397d54d87dfdce34da7daf814db2..5407d9db4732c8d7f64388dacd4ab52a1dcd006b 100644 (file)
@@ -35,6 +35,7 @@
   #\r
   DEFINE SECURE_BOOT_ENABLE      = FALSE\r
   DEFINE NETWORK_IP6_ENABLE      = FALSE\r
+  DEFINE HTTP_BOOT_ENABLE        = FALSE\r
 \r
 [BuildOptions]\r
   GCC:*_UNIXGCC_*_CC_FLAGS             = -DMDEPKG_NDEBUG\r
   AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf\r
 !endif\r
 \r
+!if $(HTTP_BOOT_ENABLE) == TRUE\r
+  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf\r
+!endif\r
+\r
   S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf\r
   SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf\r
   OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf\r
   MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
   MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
   MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf\r
+!endif\r
+!if $(HTTP_BOOT_ENABLE) == TRUE\r
+  NetworkPkg/DnsDxe/DnsDxe.inf\r
+  NetworkPkg/HttpDxe/HttpDxe.inf\r
+  NetworkPkg/HttpBootDxe/HttpBootDxe.inf\r
 !endif\r
   OvmfPkg/VirtioNetDxe/VirtioNet.inf\r
 \r
index 08daf48d6a649dd24aab97e38833b25c13213f8c..e9ba97b9ea871045d582d2be694b5219c234a066 100644 (file)
@@ -323,6 +323,11 @@ FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {
   INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
   INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
   INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf\r
+!endif\r
+!if $(HTTP_BOOT_ENABLE) == TRUE\r
+  INF  NetworkPkg/DnsDxe/DnsDxe.inf\r
+  INF  NetworkPkg/HttpDxe/HttpDxe.inf\r
+  INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf\r
 !endif\r
   INF  OvmfPkg/VirtioNetDxe/VirtioNet.inf\r
 \r