[edk2-devel] [Patch v3 2/3] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.

Liming Gao liming.gao at intel.com
Tue May 7 04:23:07 UTC 2019


> -----Original Message-----
> From: afish at apple.com [mailto:afish at apple.com]
> Sent: Tuesday, May 7, 2019 2:49 AM
> To: devel at edk2.groups.io; Laszlo Ersek <lersek at redhat.com>
> Cc: Gao, Liming <liming.gao at intel.com>; Wu, Jiaxin <jiaxin.wu at intel.com>; Ye, Ting <ting.ye at intel.com>; Fu, Siyuan
> <siyuan.fu at intel.com>
> Subject: Re: [edk2-devel] [Patch v3 2/3] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.
> 
> 
> 
> > On May 6, 2019, at 11:23 AM, Laszlo Ersek <lersek at redhat.com> wrote:
> >
> > On 05/05/19 17:21, Liming Gao wrote:
> >> Reply for the comments in the patch content.
> >>> -----Original Message-----
> >>> From: Laszlo Ersek [mailto:lersek at redhat.com]
> >>> Sent: Monday, April 29, 2019 9:05 PM
> >>> To: devel at edk2.groups.io; Gao, Liming <liming.gao at intel.com>
> >>> Cc: Wu, Jiaxin <jiaxin.wu at intel.com>; Ye, Ting <ting.ye at intel.com>; Fu, Siyuan <siyuan.fu at intel.com>
> >>> Subject: Re: [edk2-devel] [Patch v3 2/3] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.
> >>>
> >>> On 04/25/19 14:37, Liming Gao wrote:
> >
> > [...]
> >
> >>>> diff --git a/NetworkPkg/NetworkComponents.dsc.inc b/NetworkPkg/NetworkComponents.dsc.inc
> >>>> new file mode 100644
> >>>> index 0000000000..aede5ea8be
> >>>> --- /dev/null
> >>>> +++ b/NetworkPkg/NetworkComponents.dsc.inc
> >>>> @@ -0,0 +1,61 @@
> >>>> +## @file
> >>>> +# Network DSC include file for [Components*] section of all Architectures.
> >>>> +#
> >>>> +# This file can be included to the [Components*] section(s) of a platform DSC file
> >>>> +# by using "!include NetworkPkg/NetworkComponents.dsc.inc" to specify the INF files
> >>>> +# of EDKII network drivers according to the value of flags described in
> >>>> +# "NetworkDefines.dsc.inc".
> >>>> +#
> >>>> +# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> >>>> +#
> >>>> +#    SPDX-License-Identifier: BSD-2-Clause-Patent
> >>>> +#
> >>>> +##
> >>>> +
> >>>> +!if $(NETWORK_ENABLE) == TRUE
> >>>> +  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
> >>>> +
> >>>> +  !if $(NETWORK_SNP_ENABLE) == TRUE
> >>>> +    MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
> >>>> +  !endif
> >>>> +
> >>>> +  !if $(NETWORK_VLAN_ENABLE) == TRUE
> >>>> +    MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
> >>>> +  !endif
> >>>> +
> >>>> +  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
> >>>> +
> >>>> +  !if $(NETWORK_IP4_ENABLE) == TRUE
> >>>> +    MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
> >>>> +    MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
> >>>> +    MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
> >>>> +    MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
> >>>> +    MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
> >>>> +  !endif
> >>>> +
> >>>> +  !if $(NETWORK_IP6_ENABLE) == TRUE
> >>>> +    NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
> >>>> +    NetworkPkg/Ip6Dxe/Ip6Dxe.inf
> >>>> +    NetworkPkg/Udp6Dxe/Udp6Dxe.inf
> >>>> +    NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
> >>>> +  !endif
> >>>> +
> >>>> +  NetworkPkg/TcpDxe/TcpDxe.inf
> >>>> +  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
> >>>> +
> >>>> +  !if $(NETWORK_TLS_ENABLE) == TRUE
> >>>> +    NetworkPkg/TlsDxe/TlsDxe.inf
> >>>> +    NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> >>>> +  !endif
> >>>> +
> >>>> +  !if $(NETWORK_HTTP_BOOT_ENABLE) == TRUE
> >>>> +    NetworkPkg/DnsDxe/DnsDxe.inf
> >>>> +    NetworkPkg/HttpDxe/HttpDxe.inf
> >>>> +    NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
> >>>> +    NetworkPkg/HttpBootDxe/HttpBootDxe.inf
> >>>> +  !endif
> >>>> +
> >>>> +  !if $(NETWORK_ISCSI_ENABLE) == TRUE
> >>>> +    NetworkPkg/IScsiDxe/IScsiDxe.inf
> >>>> +  !endif
> >>>> +!endif
> >>>
> >>> OK, this matches the FDF include file (except for IScsiDxe, but that's a
> >>> problem I pointed out under (6)).
> >>>
> >>> The NETWORK_TLS_ENABLE part looks good too. It's worth noting that it
> >>> won't be suitable for OVMF, because OVMF hooks TlsAuthConfigLib into
> >>> TlsAuthConfigDxe, for dynamically setting the variables
> >>> "HttpTlsCipherList" and "TlsCaCertificate".
> >>>
> >>> But, that's not a problem for this generic DSC include file. OVMF can
> >>> simply set NETWORK_TLS_ENABLE to FALSE, and preserve its own (current)
> >>> TLS_ENABLE build flag, and everything in the DSC/FDF that depends on
> >>> that platform build flag.
> >>
> >> After include NetworkPkg/NetworkComponents.dsc.inc, you can override TlsAuthConfigDxe.inf
> >> with the below to match Ovmf usage.
> >>  NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {
> >>    <LibraryClasses>
> >>      NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf
> >>  }
> >
> > Oh, that's very interesting. Is this a documented feature of the DSC
> > files (from the DSC spec), or just something that happens to work with
> > BaseTools?
> >
> > In other words, are DSC files officially permitted to reference the same
> > component INF file multiple times, and the last reference will take
> > effect (including PCD and lib overrides)?
> >

BZ https://bugzilla.tianocore.org/show_bug.cgi?id=1449 for this support. It is in edk2 201903 stable tag. 
I will add this change in edk2 201903 notes. Bob will update build spec for this change. 

> 
> Laszlo,
> 
> Seems like this behavior would be good to define if it is not documented. I would expect an error (multiple definition), or a warning (last
> one winning).
> 
> For best compatibility promoting the current behavior, assuming it makes sense, is probably the way to go.
> 
> Thanks,
> 
> Andrew Fish
> 
> 
> >
> > (And thank you for the rest of the answers as well.)
> >
> > Cheers,
> > Laszlo
> >
> > 
> >


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40070): https://edk2.groups.io/g/devel/message/40070
Mute This Topic: https://groups.io/mt/31341797/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list