]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Eot/EotMain.py
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / BaseTools / Source / Python / Eot / EotMain.py
index fd4bee6f901e3e30eebe2e0f750ba3b95809688a..791fcdfeaed8059ee7ebd4add209b7468fe29ffe 100644 (file)
@@ -2,13 +2,7 @@
 # This file is used to be the main entrance of EOT tool\r
 #\r
 # Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\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
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
 \r
 ##\r
@@ -21,7 +15,8 @@ import Eot.EotGlobalData as EotGlobalData
 from optparse import OptionParser\r
 from Common.StringUtils import NormPath\r
 from Common import BuildToolError\r
-from Common.Misc import GuidStructureStringToGuidString, sdict\r
+from Common.Misc import GuidStructureStringToGuidString\r
+from collections import OrderedDict as sdict\r
 from Eot.Parser import *\r
 from Eot.InfParserLite import EdkInfParser\r
 from Common.StringUtils import GetSplitValueList\r
@@ -390,7 +385,7 @@ class FirmwareVolume(Image):
         FfsDxeCoreGuid = None\r
         FfsPeiPrioriGuid = None\r
         FfsDxePrioriGuid = None\r
-        for FfsID in self.UnDispatchedFfsDict.keys():\r
+        for FfsID in list(self.UnDispatchedFfsDict.keys()):\r
             Ffs = self.UnDispatchedFfsDict[FfsID]\r
             if Ffs.Type == 0x03:\r
                 FfsSecCoreGuid = FfsID\r
@@ -496,7 +491,7 @@ class FirmwareVolume(Image):
     def DisPatchDxe(self, Db):\r
         IsInstalled = False\r
         ScheduleList = sdict()\r
-        for FfsID in self.UnDispatchedFfsDict.keys():\r
+        for FfsID in list(self.UnDispatchedFfsDict.keys()):\r
             CouldBeLoaded = False\r
             DepexString = ''\r
             FileDepex = None\r
@@ -561,7 +556,7 @@ class FirmwareVolume(Image):
 \r
     def DisPatchPei(self, Db):\r
         IsInstalled = False\r
-        for FfsID in self.UnDispatchedFfsDict.keys():\r
+        for FfsID in list(self.UnDispatchedFfsDict.keys()):\r
             CouldBeLoaded = True\r
             DepexString = ''\r
             FileDepex = None\r
@@ -1104,7 +1099,7 @@ class MultipleFv(FirmwareVolume):
             Fv.frombuffer(Buf, 0, len(Buf))\r
 \r
             self.BasicInfo.append([Fv.Name, Fv.FileSystemGuid, Fv.Size])\r
-            self.FfsDict.append(Fv.FfsDict)\r
+            self.FfsDict.update(Fv.FfsDict)\r
 \r
 ## Class Eot\r
 #\r
@@ -1514,7 +1509,7 @@ class Eot(object):
                             % (Identifier, '.NotifyPpi', '->NotifyPpi', MODEL_IDENTIFIER_FUNCTION_CALLING)\r
             SearchPpi(SqlCommand, Identifier, SourceFileID, SourceFileFullPath, ItemMode)\r
 \r
-            # Find Procotols\r
+            # Find Protocols\r
             ItemMode = 'Produced'\r
             SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s\r
                             where (Name like '%%%s%%' or Name like '%%%s%%' or Name like '%%%s%%' or Name like '%%%s%%') and Model = %s""" \\r
@@ -1596,7 +1591,7 @@ class Eot(object):
             if not InfFile:\r
                 continue\r
             EdkLogger.quiet("Parsing %s ..."  % str(InfFile))\r
-            EdkInfParser(InfFile, EotGlobalData.gDb, Inf_Files[InfFile], '')\r
+            EdkInfParser(InfFile, EotGlobalData.gDb, Inf_Files[InfFile])\r
 \r
         EotGlobalData.gDb.Conn.commit()\r
         EdkLogger.quiet("Building database for meta data files done!")\r