On Sat, Aug 22, 2015 at 08:20:35PM -0700, Jordan Justen wrote:
> I committed this patch. Thanks!
> 
> I did have a question. I see that we need the HTTP_BOOT_ENABLE flag,
> or the release build will overflow the 1MB image size. Is that the
> only reason to only optionally enable the feature?
> 
It's still a driver under development and there are some missing features
e.g. Http Utility protocol, DHCPv6 support, etc., so I make it optional.

Gary Lin

> -Jordan
> 
> On 2015-08-19 20:48:44, Gary Ching-Pang Lin wrote:
> > 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 <g...@suse.com>
> > Reviewed-by: Fu Siyuan <siyuan...@intel.com>
> > ---
> >  OvmfPkg/OvmfPkgIa32.dsc    | 10 ++++++++++
> >  OvmfPkg/OvmfPkgIa32.fdf    |  5 +++++
> >  OvmfPkg/OvmfPkgIa32X64.dsc | 10 ++++++++++
> >  OvmfPkg/OvmfPkgIa32X64.fdf |  5 +++++
> >  OvmfPkg/OvmfPkgX64.dsc     | 10 ++++++++++
> >  OvmfPkg/OvmfPkgX64.fdf     |  5 +++++
> >  6 files changed, 45 insertions(+)
> > 
> > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> > index 4ab618d..9a6de15 100644
> > --- a/OvmfPkg/OvmfPkgIa32.dsc
> > +++ b/OvmfPkg/OvmfPkgIa32.dsc
> > @@ -35,6 +35,7 @@ [Defines]
> >    #
> >    DEFINE SECURE_BOOT_ENABLE      = FALSE
> >    DEFINE NETWORK_IP6_ENABLE      = FALSE
> > +  DEFINE HTTP_BOOT_ENABLE        = FALSE
> >  
> >  [BuildOptions]
> >    GCC:*_UNIXGCC_*_CC_FLAGS             = -DMDEPKG_NDEBUG
> > @@ -129,6 +130,10 @@ [LibraryClasses]
> >    
> > AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
> >  !endif
> >  
> > +!if $(HTTP_BOOT_ENABLE) == TRUE
> > +  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
> > +!endif
> > +
> >    
> > S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
> >    SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
> >    
> > OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
> > @@ -551,6 +556,11 @@ [Components]
> >    MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> >    MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
> >  !endif
> > +!if $(HTTP_BOOT_ENABLE) == TRUE
> > +  NetworkPkg/DnsDxe/DnsDxe.inf
> > +  NetworkPkg/HttpDxe/HttpDxe.inf
> > +  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
> > +!endif
> >    OvmfPkg/VirtioNetDxe/VirtioNet.inf
> >  
> >    #
> > diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf
> > index 16675f8..0e4ee49 100644
> > --- a/OvmfPkg/OvmfPkgIa32.fdf
> > +++ b/OvmfPkg/OvmfPkgIa32.fdf
> > @@ -324,6 +324,11 @@ [FV.DXEFV]
> >    INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> >    INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
> >  !endif
> > +!if $(HTTP_BOOT_ENABLE) == TRUE
> > +  INF  NetworkPkg/DnsDxe/DnsDxe.inf
> > +  INF  NetworkPkg/HttpDxe/HttpDxe.inf
> > +  INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
> > +!endif
> >    INF  OvmfPkg/VirtioNetDxe/VirtioNet.inf
> >  
> >  #
> > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
> > index 90ca42a..2f8006d 100644
> > --- a/OvmfPkg/OvmfPkgIa32X64.dsc
> > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc
> > @@ -35,6 +35,7 @@ [Defines]
> >    #
> >    DEFINE SECURE_BOOT_ENABLE      = FALSE
> >    DEFINE NETWORK_IP6_ENABLE      = FALSE
> > +  DEFINE HTTP_BOOT_ENABLE        = FALSE
> >  
> >  [BuildOptions]
> >    GCC:*_UNIXGCC_*_CC_FLAGS             = -DMDEPKG_NDEBUG
> > @@ -134,6 +135,10 @@ [LibraryClasses]
> >    
> > AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
> >  !endif
> >  
> > +!if $(HTTP_BOOT_ENABLE) == TRUE
> > +  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
> > +!endif
> > +
> >    
> > S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
> >    SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
> >    
> > OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
> > @@ -558,6 +563,11 @@ [Components.X64]
> >    MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> >    MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
> >  !endif
> > +!if $(HTTP_BOOT_ENABLE) == TRUE
> > +  NetworkPkg/DnsDxe/DnsDxe.inf
> > +  NetworkPkg/HttpDxe/HttpDxe.inf
> > +  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
> > +!endif
> >    OvmfPkg/VirtioNetDxe/VirtioNet.inf
> >  
> >    #
> > diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf
> > index e6c525a..74412d4 100644
> > --- a/OvmfPkg/OvmfPkgIa32X64.fdf
> > +++ b/OvmfPkg/OvmfPkgIa32X64.fdf
> > @@ -324,6 +324,11 @@ [FV.DXEFV]
> >    INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> >    INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
> >  !endif
> > +!if $(HTTP_BOOT_ENABLE) == TRUE
> > +  INF  NetworkPkg/DnsDxe/DnsDxe.inf
> > +  INF  NetworkPkg/HttpDxe/HttpDxe.inf
> > +  INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
> > +!endif
> >    INF  OvmfPkg/VirtioNetDxe/VirtioNet.inf
> >  
> >  #
> > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> > index b72eaa9..5407d9d 100644
> > --- a/OvmfPkg/OvmfPkgX64.dsc
> > +++ b/OvmfPkg/OvmfPkgX64.dsc
> > @@ -35,6 +35,7 @@ [Defines]
> >    #
> >    DEFINE SECURE_BOOT_ENABLE      = FALSE
> >    DEFINE NETWORK_IP6_ENABLE      = FALSE
> > +  DEFINE HTTP_BOOT_ENABLE        = FALSE
> >  
> >  [BuildOptions]
> >    GCC:*_UNIXGCC_*_CC_FLAGS             = -DMDEPKG_NDEBUG
> > @@ -134,6 +135,10 @@ [LibraryClasses]
> >    
> > AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
> >  !endif
> >  
> > +!if $(HTTP_BOOT_ENABLE) == TRUE
> > +  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
> > +!endif
> > +
> >    
> > S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
> >    SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
> >    
> > OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
> > @@ -556,6 +561,11 @@ [Components]
> >    MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> >    MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
> >  !endif
> > +!if $(HTTP_BOOT_ENABLE) == TRUE
> > +  NetworkPkg/DnsDxe/DnsDxe.inf
> > +  NetworkPkg/HttpDxe/HttpDxe.inf
> > +  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
> > +!endif
> >    OvmfPkg/VirtioNetDxe/VirtioNet.inf
> >  
> >    #
> > diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf
> > index 08daf48..e9ba97b 100644
> > --- a/OvmfPkg/OvmfPkgX64.fdf
> > +++ b/OvmfPkg/OvmfPkgX64.fdf
> > @@ -324,6 +324,11 @@ [FV.DXEFV]
> >    INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> >    INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
> >  !endif
> > +!if $(HTTP_BOOT_ENABLE) == TRUE
> > +  INF  NetworkPkg/DnsDxe/DnsDxe.inf
> > +  INF  NetworkPkg/HttpDxe/HttpDxe.inf
> > +  INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
> > +!endif
> >    INF  OvmfPkg/VirtioNetDxe/VirtioNet.inf
> >  
> >  #
> > -- 
> > 2.1.4
> > 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> 
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to