audk/IntelFsp2Pkg
Tan, Ming 50528537b2 IntelFsp2Pkg/Tools/GenCfgOpt.py: Fix a bug about parse macro
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2827

Fix a bug about parse the macro value which use another macro.

Use the following example to verify:
[Define]
  DEFINE M1 = V1
  DEFINE M2 = $(M1)/V2

  !include $(M2)/pcd.dsc

The old code will failed parse M2 and cause following error:
Traceback (most recent call last):
  File "Edk2\IntelFsp2Pkg\Tools\GenCfgOpt.py", line 1550, in <module>
    sys.exit(Main())
  File "Edk2\IntelFsp2Pkg\Tools\GenCfgOpt.py", line 1513, in Main
    if GenCfgOpt.ParseDscFile(DscFile, FvDir) != 0:
  File "Edk2\IntelFsp2Pkg\Tools\GenCfgOpt.py", line 533, in ParseDscFile
    NewDscLines = IncludeDsc.readlines()
ValueError: I/O operation on closed file.

The tool should support the value use another macro, and expand it.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Ming Tan <ming.tan@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
2020-07-24 07:07:30 +00:00
..
FspNotifyPhase IntelFsp2Pkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:03 -07:00
FspSecCore IntelFsp2Pkg/FspSecCore: Use UefiCpuLib. 2020-06-29 02:13:50 +00:00
Include IntelFsp2Pkg: Add FSP*_ARCH_UPD. 2020-06-23 04:22:49 +00:00
Library IntelFsp2Pkg: Support Multi-Phase SiInit and debug handlers. 2020-05-14 12:34:01 +00:00
Tools IntelFsp2Pkg/Tools/GenCfgOpt.py: Fix a bug about parse macro 2020-07-24 07:07:30 +00:00
IntelFsp2Pkg.dec IntelFsp2Pkg: add TempRamExitPpi.h. 2019-06-20 12:11:22 +08:00
IntelFsp2Pkg.dsc IntelFsp2Pkg/FspSecCore: Use UefiCpuLib. 2020-06-29 02:13:50 +00:00
Readme.md IntelFsp2Pkg: Convert files to CRLF line ending 2017-04-06 15:42:56 +08:00

Readme.md