The Intel(R) UEFI Packaging Tool, UPT.exe that is included in the BaseTools 
will create DEC and INF files when installing a UEFI Distribution Package (UDP).
Both the INF and DEC files may have sections and content within a section that 
is reordered when installing a UDP.

INF Spec Change
When the tool creates INF files from the XML content in the UDP, it will create 
INF files using the following section ordering.
Header
[Defines]
[BuildOptions]
[LibraryClasses]
[Packages]
[FixedPcd]
[PcdEx]
[FeaturePcd]
[Pcd]
[PatchPcd]
[Sources]
[Protocols]
[Ppis]
[Guids]
[Binaries]
[Depex]
[UserExtensions]

In order to be consistent, I would like to change the EBNF syntax in the INF 
specification, Section 3.2 from this order:
<EDK_II_INF>

::=

<Header>?



<Defines>

<BuildOptions>*

<Sources>*

<Binaries>*

<Guids>*

<Protocols>*

<Ppis>*

if (LIBRARY_CLASS is declared in Defines Section):

<Depex>*
elif (MODULE_TYPE == "USER_DEFINED"
|| MODULE_TYPE == "UEFI_DRIVER"):
<Depex>*
elif (MODULE_TYPE == "PEIM"
|| MODULE_TYPE == "DXE_DRIVER"
|| MODULE_TYPE == "DXE_RUNTIME_DRIVER"
|| MODULE_TYPE == "DXE_SAL_DRIVER"
|| MODULE_TYPE == "DXE_SMM_DRIVER"):
<Depex>+
elif (MODULE_TYPE == "PEI_CORE"
|| MODULE_TYPE == "DXE_CORE"
|| MODULE_TYPE == "SMM_CORE"
|| MODULE_TYPE == "UEFI_APPLCIATION"): Do not specify a depex section.
<Packages>*
<LibraryClasses>*
<Pcds>*
<UserExtensions>*
To this order:
<EDK_II_INF>

::=

<Header>?



<Defines>

<BuildOptions>*
<LibraryClasses>*
<Packages>*
<Pcds>*
<Sources>*
<Protocols>*
<Ppis>*
<Guids>*

<Binaries>*

if (LIBRARY_CLASS is declared in Defines Section):

<Depex>*
elif (MODULE_TYPE == "USER_DEFINED"
|| MODULE_TYPE == "UEFI_DRIVER"):
<Depex>*
elif (MODULE_TYPE == "PEIM"
|| MODULE_TYPE == "DXE_DRIVER"
|| MODULE_TYPE == "DXE_RUNTIME_DRIVER"
|| MODULE_TYPE == "DXE_SAL_DRIVER"
|| MODULE_TYPE == "DXE_SMM_DRIVER"):
<Depex>+
elif (MODULE_TYPE == "PEI_CORE"
|| MODULE_TYPE == "DXE_CORE"
|| MODULE_TYPE == "SMM_CORE"
|| MODULE_TYPE == "UEFI_APPLCIATION"): Do not specify a depex section.
<UserExtensions>*

This change is only to provide documentation of the ordering by the UPT tool 
when creating an INF, there is no functional change. Developers can still put 
the sections (other than the Header and [Defines] sections), in any order when 
they create INF files.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lhauch <[email protected]>

DEC File Changes when installing a UDP using UPT
There is no change to the DEC file EBNF syntax, however I do want to note that 
a section that specified multiple PCD access methods will be broken up into 
individual sections.
Original DEC file used to create a UDP having a section:
[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
  gTestPkgTspGuid.MultiPcd|0x00011003|UINT32|0x00000003

After installing the UDP file, the DEC will have four separate sections:
[PcdsFixedAtBuild]
  gTestPkgTspGuid.MultiPcd|0x00011003|UINT32|0x00000003

[PcdsDynamic]
  gTestPkgTspGuid.MultiPcd|0x00011003|UINT32|0x00000003

[PcdsDynamicEx]
  gTestPkgTspGuid.MultiPcd|0x00011003|UINT32|0x00000003

[PcdsPatchableInModule]
  gTestPkgTspGuid.MultiPcd|0x00011003|UINT32|0x00000003

ALSO:
In order to facilitate validation of INF files, we will also like to create a 
new tool that can be used for content (not format) validation of INF and DEC 
files. This tool would take two files as arguments, either DEC or INF files, 
and do an object level comparison.

I would also like to know if we should also provide the ability (option flag) 
to process two different directory trees as part of this tool?

Please let me know if there are other features that should be included here, 
such as what you would like to see from adding a -v, --verbose flag.

Cheers,
Larry Hauch
Intel Corporation
SSG, STO, Platform Software Infrastructure
2800 Center Dr.
DuPont, WA 98327
Work: (253) 371-8550

------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to