]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/GenFds: enhance INF built arch filter
authorYonghong Zhu <yonghong.zhu@intel.com>
Wed, 11 May 2016 08:09:26 +0000 (16:09 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Mon, 16 May 2016 01:03:41 +0000 (09:03 +0800)
The bug is use FILE_GUID override to build the same module more than
once, GenFds report warning "xxx NOT found in DSC file; Is it really
a binary module?". The root cause is the module path with FILE_GUID
overridden has the file name FILE_GUIDmodule.inf, then
PlatformDataBase.Modules use FILE_GUIDmodule.inf as key which cause
__GetPlatformArchList__ return empty.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/GenFds/FfsInfStatement.py

index bba42c730865b9ad95bea84659f6f4bfe69b30ba..b0b22d194d77dd86456ebdbfac4f0816b4765238 100644 (file)
@@ -570,6 +570,16 @@ class FfsInfStatement(FfsInfStatementClassObject):
             if  PlatformDataBase != None:\r
                 if InfFileKey in PlatformDataBase.Modules:\r
                     DscArchList.append (Arch)\r
+                else:\r
+                    #\r
+                    # BaseTools support build same module more than once, the module path with FILE_GUID overridden has\r
+                    # the file name FILE_GUIDmodule.inf, then PlatformDataBase.Modules use FILE_GUIDmodule.inf as key,\r
+                    # but the path (self.MetaFile.Path) is the real path\r
+                    #\r
+                    for key in PlatformDataBase.Modules.keys():\r
+                        if InfFileKey == str((PlatformDataBase.Modules[key]).MetaFile.Path):\r
+                            DscArchList.append (Arch)\r
+                            break\r
 \r
         return DscArchList\r
 \r