]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/GenBuild/org/tianocore/build/FfsProcess.java
Change GenBuildLogger format.
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / FfsProcess.java
index 8d9704be1e94f76c8fe1cd47658f9d07eb02e123..702c28fee765b2dbcf4bd7a94214ef2802a8d4a5 100644 (file)
@@ -26,14 +26,14 @@ import org.tianocore.build.global.GlobalData;
 import org.tianocore.build.global.SurfaceAreaQuery;\r
 import org.tianocore.build.id.FpdModuleIdentification;\r
 import org.tianocore.common.definitions.EdkDefinitions;\r
+import org.tianocore.common.logger.EdkLog;\r
 import org.w3c.dom.Document;\r
 import org.w3c.dom.Element;\r
 \r
 /** \r
   <p><code>FfsProcess</code> is a class to find the corresponding FFS layout. </p>\r
   \r
-  <p>Property <code>COMMON_FILE</code> specified which file to search. The element\r
-  in <code>COMMON_FILE</code> is like following: </p>\r
+  <p>The FFS Layout is like following: </p>\r
   \r
   <pre>\r
     &lt;Ffs type="APPLICATION"&gt;\r
@@ -104,22 +104,20 @@ public class FfsProcess {
     }\r
 \r
     /**\r
-      Find the corresponding FFS layout in <code>COMMON_FILE</code> if it\r
-      does not specify in module's surface area. \r
+      Find the corresponding FFS layout in <code>FPD</code>. \r
       \r
       @param buildType Current module's component type\r
       @param project Ant project\r
       @return whether find the corresponding FFS layout\r
       @throws BuildException\r
-              If specified COMMON_FILE XML file is not valide.\r
+              If can't find FFS Layout in FPD.\r
     **/\r
     public boolean initSections(String buildType, Project project, FpdModuleIdentification fpdModuleId) throws BuildException {\r
         //\r
         // Try to find Ffs layout from FPD file\r
         //\r
-        SurfaceAreaQuery.push(GlobalData.getFpdBuildOptions());\r
-        BuildOptionsDocument.BuildOptions.Ffs[] ffsArray = SurfaceAreaQuery.getFpdFfs();\r
-        SurfaceAreaQuery.pop();\r
+        SurfaceAreaQuery saq = new SurfaceAreaQuery(GlobalData.getFpdBuildOptionsMap());\r
+        BuildOptionsDocument.BuildOptions.Ffs[] ffsArray = saq.getFpdFfs();\r
         for (int i = 0; i < ffsArray.length; i++) {\r
             if (isMatch(ffsArray[i].getFfsKey(), buildType)) {\r
                 ffsXmlObject = ffsArray[i];\r
@@ -132,7 +130,7 @@ public class FfsProcess {
         // Otherwise report warning message\r
         //\r
         if (buildType == null) {\r
-            System.out.println("Warning: this module doesn't specify a FfsFormatKey. ");\r
+            EdkLog.log(EdkLog.EDK_WARNING, "Warning: this module doesn't specify a FfsFormatKey. ");\r
         } else {\r
             throw new BuildException("Can't find the FfsFormatKey [" + buildType + "] attribute in the FPD file!");            \r
         }\r