]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/FfsInfStatement.py
Sync EDKII BaseTools to BaseTools project r2093.
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / FfsInfStatement.py
index d95af34dfc6b721c3233d480b5ee848daf77fe0b..d2397e07da33154a3c4633db7c67d0c7be2691da 100644 (file)
@@ -80,7 +80,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
         #\r
 \r
         PathClassObj = PathClass(self.InfFileName, GenFdsGlobalVariable.WorkSpaceDir)\r
-        ErrorCode, ErrorInfo = PathClassObj.Validate()\r
+        ErrorCode, ErrorInfo = PathClassObj.Validate(".inf")\r
         if ErrorCode != 0:\r
             EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)\r
         \r
@@ -161,6 +161,14 @@ class FfsInfStatement(FfsInfStatementClassObject):
         #\r
 \r
         self.__InfParse__(Dict)\r
+        \r
+        #\r
+        # Allow binary type module not specify override rule in FDF file.\r
+        # \r
+        if len(self.BinFileList) >0 and not self.InDsc:\r
+            if self.Rule == None or self.Rule == "":\r
+                self.Rule = "BINARY"\r
+                \r
         #\r
         # Get the rule of how to generate Ffs file\r
         #\r
@@ -343,7 +351,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
         if len(PlatformArchList) == 0:\r
             self.InDsc = False\r
             PathClassObj = PathClass(self.InfFileName, GenFdsGlobalVariable.WorkSpaceDir)\r
-            ErrorCode, ErrorInfo = PathClassObj.Validate()\r
+            ErrorCode, ErrorInfo = PathClassObj.Validate(".inf")\r
             if ErrorCode != 0:\r
                 EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)\r
         if len(ArchList) == 1:\r