]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/Section.py
Sync BaseTools Trunk (version r2387) to EDKII main trunk.
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / Section.py
index 2e24697a3dc7b4ee18abdae99752a975e0527c52..6f57ad568196050b0347cddd2193038c72498a37 100644 (file)
@@ -1,9 +1,9 @@
 ## @file\r
 # section base class\r
 #\r
-#  Copyright (c) 2007, Intel Corporation\r
+#  Copyright (c) 2007-2011, Intel Corporation. All rights reserved.<BR>\r
 #\r
-#  All rights reserved. This program and the accompanying materials\r
+#  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #  which accompanies this distribution.  The full text of the license may be found at\r
 #  http://opensource.org/licenses/bsd-license.php\r
@@ -129,7 +129,7 @@ class Section (SectionClassObject):
         if FileType != None:\r
             for File in FfsInf.BinFileList:\r
                 if File.Arch == "COMMON" or FfsInf.CurrentArch == File.Arch:\r
-                    if File.Type == FileType or (FfsInf.PiSpecVersion >= 0x0001000A and FileType == 'DXE_DPEX'and File.Type == 'SMM_DEPEX'):\r
+                    if File.Type == FileType or (int(FfsInf.PiSpecVersion, 16) >= 0x0001000A and FileType == 'DXE_DPEX'and File.Type == 'SMM_DEPEX'):\r
                         if '*' in FfsInf.TargetOverrideList or File.Target == '*' or File.Target in FfsInf.TargetOverrideList or FfsInf.TargetOverrideList == []:\r
                             FileList.append(File.Path)\r
                         else:\r
@@ -139,14 +139,10 @@ class Section (SectionClassObject):
                 else:\r
                     GenFdsGlobalVariable.InfLogger ("\nCurrent ARCH \'%s\' of File %s is not in the Support Arch Scope of %s specified by INF %s in FDF" %(FfsInf.CurrentArch, File.File, File.Arch, FfsInf.InfFileName))\r
 \r
-        if Suffix != None and os.path.exists(FfsInf.EfiOutputPath):\r
-            # Update to search files with suffix in all sub-dirs.\r
-            Tuple = os.walk(FfsInf.EfiOutputPath)\r
-            for Dirpath, Dirnames, Filenames in Tuple:\r
-                for F in Filenames:\r
-                    if os.path.splitext(F)[1] in (Suffix):\r
-                        FullName = os.path.join(Dirpath, F)\r
-                        FileList.append(FullName)\r
+        if Suffix != None:\r
+            SuffixMap = FfsInf.GetFinalTargetSuffixMap()\r
+            if Suffix in SuffixMap:\r
+                FileList.extend(SuffixMap[Suffix])\r
 \r
         #Process the file lists is alphabetical for a same section type\r
         if len (FileList) > 1:\r