[edk2-devel] [PATCH] BaseTools:Replace PlatformInfo with PlatformAutoGen for Moudle

Fan, ZhijuX posted 1 patch 4 years, 7 months ago
Failed in applying to current master (apply log)
BaseTools/Source/Python/build/build.py | 3 +++
1 file changed, 3 insertions(+)
[edk2-devel] [PATCH] BaseTools:Replace PlatformInfo with PlatformAutoGen for Moudle
Posted by Fan, ZhijuX 4 years, 7 months ago
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2188

build -p MdeModulePkg\MdeModulePkg.dsc -a IA32 -m
MdeModulePkg\Universal\PCD\Pei\Pcd.inf

Error:
AttributeError: 'PlatformInfo' object has no attribute
'DynamicPcdList'

The DSC data object used to build a separate module today 
is PlatformInfo rather than PlatformAutoGen
'PlatformAutoGen' object has attribute 'DynamicPcdList'

This patch is going to fixed this issue

Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
---
 BaseTools/Source/Python/build/build.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index e81d3d6486..e845c139c9 100755
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1860,6 +1860,9 @@ class Build():
                             Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile,Pa.DataPipe)
                             if Ma is None:
                                 continue
+                            if Ma.PcdIsDriver:
+                                Ma.PlatformInfo = Pa
+                                Ma.Workspace = Wa
                             MaList.append(Ma)
 
                             if GlobalData.gBinCacheSource and self.Target in [None, "", "all"]:
-- 
2.14.1.windows.1


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

View/Reply Online (#47179): https://edk2.groups.io/g/devel/message/47179
Mute This Topic: https://groups.io/mt/34112948/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] BaseTools:Replace PlatformInfo with PlatformAutoGen for Moudle
Posted by Bob Feng 4 years, 7 months ago
Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: Fan, ZhijuX 
Sent: Thursday, September 12, 2019 4:19 PM
To: devel@edk2.groups.io
Cc: Gao, Liming <liming.gao@intel.com>; Feng, Bob C <bob.c.feng@intel.com>
Subject: [PATCH] BaseTools:Replace PlatformInfo with PlatformAutoGen for Moudle

BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2188

build -p MdeModulePkg\MdeModulePkg.dsc -a IA32 -m MdeModulePkg\Universal\PCD\Pei\Pcd.inf

Error:
AttributeError: 'PlatformInfo' object has no attribute 'DynamicPcdList'

The DSC data object used to build a separate module today is PlatformInfo rather than PlatformAutoGen 'PlatformAutoGen' object has attribute 'DynamicPcdList'

This patch is going to fixed this issue

Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
---
 BaseTools/Source/Python/build/build.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index e81d3d6486..e845c139c9 100755
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1860,6 +1860,9 @@ class Build():
                             Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile,Pa.DataPipe)
                             if Ma is None:
                                 continue
+                            if Ma.PcdIsDriver:
+                                Ma.PlatformInfo = Pa
+                                Ma.Workspace = Wa
                             MaList.append(Ma)
 
                             if GlobalData.gBinCacheSource and self.Target in [None, "", "all"]:
--
2.14.1.windows.1


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

View/Reply Online (#47244): https://edk2.groups.io/g/devel/message/47244
Mute This Topic: https://groups.io/mt/34112948/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-