PeiReBaseTask class.\r
\r
PeiReBaseTask is used to call PeiReBase.exe to rebase efi fv file.\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
+\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
\r
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
PeiReBaseTask class.\r
// / Output directory, this variable is added by jave wrap\r
// /\r
private String outputDir = "";\r
- \r
+\r
///\r
/// Base address\r
///\r
private String baseAddr = "";\r
- \r
+\r
///\r
- /// Architecture \r
+ /// Architecture\r
///\r
private String arch = "";\r
- \r
+\r
/**\r
* execute\r
- * \r
+ *\r
* PeiReBaseTask execute function is to assemble tool command line & execute\r
* tool command line\r
- * \r
+ *\r
* @throws BuidException\r
*/\r
public void execute() throws BuildException {\r
FrameworkLogger logger = new FrameworkLogger(project, toolName.toLowerCase());\r
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));\r
EdkLog.setLogger(logger);\r
- \r
+\r
//\r
// absolute path of efi tools\r
//\r
if (path != null) {\r
command = path + File.separatorChar + command;\r
}\r
- \r
+\r
//\r
// argument of tools\r
//\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
- argument = inputFile + " " + "-O " + outputFile + " " + this.baseAddr;\r
+ argument = inputFile + " " + "-O " + outputFile + " " + this.baseAddr+ " " + "-M " + outputFile + ".map";\r
}\r
- \r
+\r
//\r
// return value of fwimage execution\r
//\r
//\r
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
EdkLog.log(EdkLog.EDK_INFO, this.inputFileName);\r
- \r
+\r
revl = runner.execute();\r
- \r
+\r
if (EFI_SUCCESS == revl) {\r
//\r
// command execution success\r
\r
/**\r
* getInputFile\r
- * \r
+ *\r
* This function is to get class member "inputFile".\r
- * \r
+ *\r
* @return string of input file name.\r
*/\r
public String getInputFile() {\r
\r
/**\r
* setComponentType\r
- * \r
+ *\r
* This function is to set class member "inputFile".\r
- * \r
+ *\r
* @param inputFile\r
* string of input file name.\r
*/\r
\r
/**\r
* getOutputFile\r
- * \r
+ *\r
* This function is to get class member "outputFile"\r
- * \r
+ *\r
* @return outputFile string of output file name.\r
*/\r
public String getOutputFile() {\r
\r
/**\r
* setOutputFile\r
- * \r
+ *\r
* This function is to set class member "outputFile"\r
- * \r
+ *\r
* @param outputFile\r
* string of output file name.\r
*/\r
\r
/**\r
* getOutputDir\r
- * \r
+ *\r
* This function is to get class member "outputDir"\r
- * \r
+ *\r
* @return outputDir string of output directory.\r
*/\r
public String getOutputDir() {\r
\r
/**\r
* setOutputDir\r
- * \r
+ *\r
* This function is to set class member "outputDir"\r
- * \r
+ *\r
* @param outputDir\r
* string of output directory.\r
*/\r
\r
/**\r
* getBaseAddr\r
- * \r
+ *\r
* This function is to get class member "baseAddr"\r
- * \r
+ *\r
* @return baseAddr string of base address.\r
*/\r
public String getBaseAddr() {\r
\r
/**\r
* setBaseAddr\r
- * \r
+ *\r
* This function is to set class member "baseAddr"\r
- * \r
+ *\r
* @param baseAddr string of base address\r
*/\r
public void setBaseAddr(String baseAddr) {\r
\r
/**\r
* getArch\r
- * \r
+ *\r
* This function is to get class member "arch".\r
- * \r
+ *\r
* @return arch Architecture\r
*/\r
public String getArch() {\r
\r
/**\r
* setArch\r
- * \r
- * This function is to set class member "arch" \r
- * \r
+ *\r
+ * This function is to set class member "arch"\r
+ *\r
* @param arch Architecture\r
*/\r
public void setArch(String arch) {\r