]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/PeiReBaseTask.java
Updated PeiRebase to produce a map file of the relocations done by this tool. This...
[mirror_edk2.git] / Tools / Source / FrameworkTasks / org / tianocore / framework / tasks / PeiReBaseTask.java
index c033c0d199d881f4a0c2cc33f5c874c303e56281..c479e0d3344198c81dd91cd5b6d107b908abd769 100644 (file)
@@ -40,7 +40,7 @@ public class PeiReBaseTask extends Task implements EfiDefine {
     // / Input file\r
     // /\r
     private String inputFile = "";\r
     // / Input file\r
     // /\r
     private String inputFile = "";\r
-\r
+    private String inputFileName = "";\r
     // /\r
     // / Output file\r
     // /\r
     // /\r
     // / Output file\r
     // /\r
@@ -104,9 +104,10 @@ public class PeiReBaseTask extends Task implements EfiDefine {
         File file = new File(outputFile);\r
         if (!file.isAbsolute() && (!this.outputDir.equalsIgnoreCase(""))) {\r
             argument = inputFile + " " +  "-O " + outputDir + File.separatorChar\r
         File file = new File(outputFile);\r
         if (!file.isAbsolute() && (!this.outputDir.equalsIgnoreCase(""))) {\r
             argument = inputFile + " " +  "-O " + outputDir + File.separatorChar\r
-                    + outputFile + " " + this.baseAddr;\r
+                    + outputFile + " " + this.baseAddr + " "\r
+                    + "-M " + outputDir + + File.separatorChar + outputFile + ".map";\r
         } else {\r
         } else {\r
-            argument = inputFile + " " + "-O " + outputFile + " " + this.baseAddr;\r
+            argument = inputFile + " " + "-O " + outputFile + " " + this.baseAddr+ " " + "-M " + outputFile + ".map";\r
         }\r
         \r
         //\r
         }\r
         \r
         //\r
@@ -128,7 +129,8 @@ public class PeiReBaseTask extends Task implements EfiDefine {
             //\r
             // Set debug log information.\r
             //\r
             //\r
             // Set debug log information.\r
             //\r
-            EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_INFO, this.inputFileName);\r
             \r
             revl = runner.execute();\r
             \r
             \r
             revl = runner.execute();\r
             \r
@@ -136,16 +138,13 @@ public class PeiReBaseTask extends Task implements EfiDefine {
                 //\r
                 // command execution success\r
                 //\r
                 //\r
                 // command execution success\r
                 //\r
-                EdkLog.log(EdkLog.EDK_INFO,"PeiBase succeeded!");\r
+                EdkLog.log(EdkLog.EDK_VERBOSE, "PeiReBase succeeded!");\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                EdkLog.log(EdkLog.EDK_ERROR, "PeiBase failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("PeiBase failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-\r
+                EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+                throw new BuildException("PeiReBase failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
@@ -172,6 +171,7 @@ public class PeiReBaseTask extends Task implements EfiDefine {
      *            string of input file name.\r
      */\r
     public void setInputFile(String inputFile) {\r
      *            string of input file name.\r
      */\r
     public void setInputFile(String inputFile) {\r
+        this.inputFileName = (new File(inputFile)).getName();\r
         this.inputFile = "-I " + inputFile;\r
     }\r
 \r
         this.inputFile = "-I " + inputFile;\r
     }\r
 \r