]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/OptRomInfStatement.py
BaseTools: Update Makefile to support FFS file generation
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / OptRomInfStatement.py
index d64f836164863fc2a1f9b5ce23131fab0def2897..80c4bbab6effa848b416e2535c742e10f7f29c44 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # process OptionROM generation from INF statement\r
 #\r
-#  Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -50,10 +50,10 @@ class OptRomInfStatement (FfsInfStatement):
             self.OverrideAttribs = OptionRom.OverrideAttribs()\r
 \r
         if self.OverrideAttribs.NeedCompress == None:\r
-            self.OverrideAttribs.NeedCompress = self.OptRomDefs.get ('COMPRESS')\r
+            self.OverrideAttribs.NeedCompress = self.OptRomDefs.get ('PCI_COMPRESS')\r
             if self.OverrideAttribs.NeedCompress is not None:\r
                 if self.OverrideAttribs.NeedCompress.upper() not in ('TRUE', 'FALSE'):\r
-                    GenFdsGlobalVariable.ErrorLogger( "Expected TRUE/FALSE for COMPRESS: %s" %self.InfFileName)\r
+                    GenFdsGlobalVariable.ErrorLogger( "Expected TRUE/FALSE for PCI_COMPRESS: %s" %self.InfFileName)\r
                 self.OverrideAttribs.NeedCompress = \\r
                     self.OverrideAttribs.NeedCompress.upper() == 'TRUE'\r
 \r
@@ -81,7 +81,7 @@ class OptRomInfStatement (FfsInfStatement):
     #   @param  self        The object pointer\r
     #   @retval string      Generated .efi file name\r
     #\r
-    def GenFfs(self):\r
+    def GenFfs(self, IsMakefile=False):\r
         #\r
         # Parse Inf file get Module related information\r
         #\r
@@ -98,13 +98,13 @@ class OptRomInfStatement (FfsInfStatement):
         # For the rule only has simpleFile\r
         #\r
         if isinstance (Rule, RuleSimpleFile.RuleSimpleFile) :\r
-            EfiOutputList = self.__GenSimpleFileSection__(Rule)\r
+            EfiOutputList = self.__GenSimpleFileSection__(Rule, IsMakefile=IsMakefile)\r
             return EfiOutputList\r
         #\r
         # For Rule has ComplexFile\r
         #\r
         elif isinstance(Rule, RuleComplexFile.RuleComplexFile):\r
-            EfiOutputList = self.__GenComplexFileSection__(Rule)\r
+            EfiOutputList = self.__GenComplexFileSection__(Rule, IsMakefile=IsMakefile)\r
             return EfiOutputList\r
 \r
     ## __GenSimpleFileSection__() method\r
@@ -115,7 +115,7 @@ class OptRomInfStatement (FfsInfStatement):
     #   @param  Rule        The rule object used to generate section\r
     #   @retval string      File name of the generated section file\r
     #\r
-    def __GenSimpleFileSection__(self, Rule):\r
+    def __GenSimpleFileSection__(self, Rule, IsMakefile = False):\r
         #\r
         # Prepare the parameter of GenSection\r
         #\r
@@ -138,7 +138,7 @@ class OptRomInfStatement (FfsInfStatement):
     #   @param  Rule        The rule object used to generate section\r
     #   @retval string      File name of the generated section file\r
     #\r
-    def __GenComplexFileSection__(self, Rule):\r
+    def __GenComplexFileSection__(self, Rule, IsMakefile=False):\r
 \r
         OutputFileList = []\r
         for Sect in Rule.SectionList:\r