mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-05 12:54:24 +02:00
Polished the build tools' screen output to be in a more coherent form
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@916 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
c06913ffea
commit
219e224747
@ -148,6 +148,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
<sequential>
|
<sequential>
|
||||||
<shellscript shell="cmd.exe" tmpsuffix=".cmd" >
|
<shellscript shell="cmd.exe" tmpsuffix=".cmd" >
|
||||||
|
<arg line="/q"/>
|
||||||
<arg line="/c"/>
|
<arg line="/c"/>
|
||||||
<arg line="call"/>
|
<arg line="call"/>
|
||||||
"${DLINK}" /LIBPATH:"${env.MSVCDir}\Lib" /LIBPATH:"${env.MSVCDir}\PlatformSdk\Lib" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib ${OBJECTS} ${LIBS} /base:0x10000000 /out:${BIN_DIR}\SecMain.exe /pdb:${DEST_DIR_DEBUG}\SecMain.pdb
|
"${DLINK}" /LIBPATH:"${env.MSVCDir}\Lib" /LIBPATH:"${env.MSVCDir}\PlatformSdk\Lib" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib ${OBJECTS} ${LIBS} /base:0x10000000 /out:${BIN_DIR}\SecMain.exe /pdb:${DEST_DIR_DEBUG}\SecMain.pdb
|
||||||
|
@ -108,24 +108,21 @@ public class CreateMtFileTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// Set debug log information.
|
// Set debug log information.
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.outputFile)).getName());
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
if (EFI_SUCCESS == revl) {
|
if (EFI_SUCCESS == revl) {
|
||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO,"CreateMtFile succeeded!");
|
EdkLog.log(EdkLog.EDK_VERBOSE, "CreateMtFile succeeded!");
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_ERROR, "CreateMtFile failed. (error="
|
EdkLog.log(EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));
|
||||||
+ Integer.toHexString(revl) + ")");
|
throw new BuildException("CreateMtFile failed!");
|
||||||
throw new BuildException("CreateMtFile failed. (error="
|
|
||||||
+ Integer.toHexString(revl) + ")");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
|
@ -104,7 +104,8 @@ public class EfiCompressTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// Set debug log information.
|
// Set debug log information.
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
||||||
|
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
@ -112,15 +113,13 @@ public class EfiCompressTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO,"EfiCompress succeeded!");
|
EdkLog.log(EdkLog.EDK_VERBOSE, "EfiCompress succeeded!");
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_ERROR, "EfiCompress failed. (error="
|
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||||
+ Integer.toHexString(revl) + ")");
|
throw new BuildException("Strip failed!");
|
||||||
throw new BuildException("Strip failed. (error="
|
|
||||||
+ Integer.toHexString(revl) + ")");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -161,7 +161,9 @@ public class EfiRomTask extends Task implements EfiDefine {
|
|||||||
argList.add(((Input)pe32ComprList.next()).getFile());
|
argList.add(((Input)pe32ComprList.next()).getFile());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EdkLog.log(EdkLog.EDK_INFO, argList.toString().replaceAll(",",""));
|
|
||||||
|
EdkLog.log(EdkLog.EDK_VERBOSE, argList.toString().replaceAll(",",""));
|
||||||
|
EdkLog.log(EdkLog.EDK_INFO, " ");
|
||||||
|
|
||||||
//
|
//
|
||||||
// lauch the program
|
// lauch the program
|
||||||
@ -177,15 +179,15 @@ public class EfiRomTask extends Task implements EfiDefine {
|
|||||||
exitCode = cmdProc.waitFor();
|
exitCode = cmdProc.waitFor();
|
||||||
if (exitCode != 0) {
|
if (exitCode != 0) {
|
||||||
int len = cmdOut.read(buf, 0, 1024);
|
int len = cmdOut.read(buf, 0, 1024);
|
||||||
EdkLog.log(EdkLog.EDK_ERROR,new String(buf, 0, len));
|
EdkLog.log(EdkLog.EDK_INFO, new String(buf, 0, len));
|
||||||
} else {
|
} else {
|
||||||
EdkLog.log(EdkLog.EDK_INFO, "FlashMap succeed!");
|
EdkLog.log(EdkLog.EDK_VERBOSE, "EfiRom succeeded!");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
} finally {
|
} finally {
|
||||||
if (exitCode != 0) {
|
if (exitCode != 0) {
|
||||||
//throw new BuildException("GenFvImage: failed to generate FV file!");
|
throw new BuildException("EfiRom failed!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,9 +29,9 @@ import org.apache.tools.ant.BuildException;
|
|||||||
import org.tianocore.logger.EdkLog;
|
import org.tianocore.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SecFixupTask class.
|
* FlashMapTask class.
|
||||||
*
|
*
|
||||||
* SecFixupTask is used to call SecFixup.exe to fix up sec image.
|
* FlashMapTask is used to call FlashMap.exe to generate flash map defition files and fd files.
|
||||||
*/
|
*/
|
||||||
public class FlashMapTask extends Task implements EfiDefine {
|
public class FlashMapTask extends Task implements EfiDefine {
|
||||||
// /
|
// /
|
||||||
@ -40,7 +40,7 @@ public class FlashMapTask extends Task implements EfiDefine {
|
|||||||
private final String toolName = "FlashMap";
|
private final String toolName = "FlashMap";
|
||||||
|
|
||||||
// /
|
// /
|
||||||
// / Flash default file
|
// / Flash definition file
|
||||||
// /
|
// /
|
||||||
private String flashDefFile = "";
|
private String flashDefFile = "";
|
||||||
|
|
||||||
@ -181,7 +181,6 @@ public class FlashMapTask extends Task implements EfiDefine {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EdkLog.log(EdkLog.EDK_INFO, argList.toString().replace(",",""));
|
|
||||||
//
|
//
|
||||||
// lauch the program
|
// lauch the program
|
||||||
//
|
//
|
||||||
@ -198,19 +197,19 @@ public class FlashMapTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// log command line string.
|
// log command line string.
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, cmdProc.getOutputStream().toString());
|
EdkLog.log(EdkLog.EDK_VERBOSE, cmdProc.getOutputStream().toString());
|
||||||
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.flashDefFile)).getName());
|
||||||
if (exitCode != 0) {
|
if (exitCode != 0) {
|
||||||
int len = cmdOut.read(buf, 0, 1024);
|
int len = cmdOut.read(buf, 0, 1024);
|
||||||
EdkLog.log(EdkLog.EDK_ERROR, new String(buf, 0, len));
|
EdkLog.log(EdkLog.EDK_INFO, new String(buf, 0, len));
|
||||||
} else {
|
} else {
|
||||||
EdkLog.log(EdkLog.EDK_INFO, "FlashMap succeed!");
|
EdkLog.log(EdkLog.EDK_VERBOSE, "FlashMap succeeded!");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
} finally {
|
} finally {
|
||||||
if (exitCode != 0) {
|
if (exitCode != 0) {
|
||||||
// throw new BuildException("GenFvImage: failed to generate FV
|
throw new BuildException("FlashMap failed!");
|
||||||
// file!");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,12 +26,9 @@ class FrameworkLogger implements LogMethod {
|
|||||||
public FrameworkLogger(Project project, String taskName) {
|
public FrameworkLogger(Project project, String taskName) {
|
||||||
this.project = project;
|
this.project = project;
|
||||||
this.titleName = taskName;
|
this.titleName = taskName;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void putMessage(Object msgSource, int msgLevel, String msg) {
|
public void putMessage(Object msgSource, int msgLevel, String msg) {
|
||||||
|
|
||||||
String frameworkMsg = " [" + this.titleName + "] " + msg;
|
String frameworkMsg = " [" + this.titleName + "] " + msg;
|
||||||
this.project.log(frameworkMsg, Project.MSG_INFO);
|
this.project.log(frameworkMsg, Project.MSG_INFO);
|
||||||
}
|
}
|
||||||
|
@ -16,12 +16,15 @@
|
|||||||
**/
|
**/
|
||||||
package org.tianocore.framework.tasks;
|
package org.tianocore.framework.tasks;
|
||||||
|
|
||||||
import org.apache.tools.ant.Task;
|
import java.io.File;
|
||||||
import org.apache.tools.ant.Project;
|
|
||||||
import org.apache.tools.ant.BuildException;
|
import org.apache.tools.ant.BuildException;
|
||||||
|
import org.apache.tools.ant.Project;
|
||||||
|
import org.apache.tools.ant.Task;
|
||||||
import org.apache.tools.ant.taskdefs.Execute;
|
import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
|
import org.tianocore.logger.EdkLog;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -38,6 +41,7 @@ public class FwImageTask extends Task implements EfiDefine{
|
|||||||
/// input PE image
|
/// input PE image
|
||||||
///
|
///
|
||||||
private String peImage = "";
|
private String peImage = "";
|
||||||
|
private String peImageName = "";
|
||||||
///
|
///
|
||||||
/// output EFI image
|
/// output EFI image
|
||||||
///
|
///
|
||||||
@ -93,24 +97,18 @@ public class FwImageTask extends Task implements EfiDefine{
|
|||||||
|
|
||||||
runner.setAntRun(project);
|
runner.setAntRun(project);
|
||||||
runner.setCommandline(cmdline.getCommandline());
|
runner.setCommandline(cmdline.getCommandline());
|
||||||
//System.out.println(Commandline.toString(cmdline.getCommandline()));
|
|
||||||
//GenBuildTask.myLogger.log(Commandline.toString(cmdline.getCommandline()),0);
|
log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);
|
||||||
//getProject().log(Commandline.toString(cmdline.getCommandline()));
|
log(this.peImageName);
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
if (EFI_SUCCESS == revl) {
|
if (EFI_SUCCESS == revl) {
|
||||||
//
|
log("fwimage succeeded!", Project.MSG_VERBOSE);
|
||||||
// command execution success
|
|
||||||
//
|
|
||||||
System.out.println("fwimage succeeded!");
|
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
System.out.println("fwimage failed. (error="
|
log("ERROR = " + Integer.toHexString(revl));
|
||||||
+ Integer.toHexString(revl) + ")");
|
throw new BuildException("fwimage failed!");
|
||||||
throw new BuildException("fwimage failed. (error="
|
|
||||||
+ Integer.toHexString(revl) + ")");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
@ -155,6 +153,7 @@ public class FwImageTask extends Task implements EfiDefine{
|
|||||||
@param peImage name of PE image
|
@param peImage name of PE image
|
||||||
**/
|
**/
|
||||||
public void setPeImage(String peImage) {
|
public void setPeImage(String peImage) {
|
||||||
|
this.peImageName = (new File(peImage)).getName();
|
||||||
this.peImage = " " + peImage;
|
this.peImage = " " + peImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,24 +104,21 @@ public class GenAcpiTableTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// Set debug log information.
|
// Set debug log information.
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
if (EFI_SUCCESS == revl) {
|
if (EFI_SUCCESS == revl) {
|
||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO,"GenAcpiTable successed!");
|
EdkLog.log(EdkLog.EDK_VERBOSE, "GenAcpiTable succeeded!");
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_ERROR, "GenAcpiTable failed. (error="
|
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||||
+ Integer.toHexString(revl) + ")");
|
throw new BuildException("GenAcpiTable failed!");
|
||||||
throw new BuildException("GenAcpiTable failed. (error="
|
|
||||||
+ Integer.toHexString(revl) + ")");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
|
@ -89,29 +89,23 @@ public class GenCRC32SectionTask extends Task implements EfiDefine{
|
|||||||
|
|
||||||
runner.setAntRun(project);
|
runner.setAntRun(project);
|
||||||
runner.setCommandline(cmdline.getCommandline());
|
runner.setCommandline(cmdline.getCommandline());
|
||||||
System.out.println(Commandline.toString(cmdline.getCommandline()));
|
log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);
|
||||||
|
log(" ");
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
if (EFI_SUCCESS == revl){
|
if (EFI_SUCCESS == revl){
|
||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
//
|
//
|
||||||
System.out.println("gencrc32section succeeded!");
|
log("gencrc32section succeeded!", Project.MSG_VERBOSE);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
System.out.println("gencrc32section failed. (error=" +
|
log("ERROR = " + Integer.toHexString(revl));
|
||||||
Integer.toHexString(revl) +
|
|
||||||
")"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -137,25 +137,21 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// Set debug log information.
|
// Set debug log information.
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
.getCommandline()));
|
EdkLog.log(EdkLog.EDK_INFO, (new File(scriptFile)).getName());
|
||||||
|
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
if (EFI_SUCCESS == revl) {
|
if (EFI_SUCCESS == revl) {
|
||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, "GenCapsuleHdr succeeded!");
|
EdkLog.log(EdkLog.EDK_VERBOSE, "GenCapsuleHdr succeeded!");
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_ERROR, "GenCapsuleHdr failed. (error="
|
EdkLog.log(EdkLog.EDK_ERROR, "ERROR = " + Integer.toHexString(revl));
|
||||||
+ Integer.toHexString(revl) + ")");
|
throw new BuildException("GenCapsuleHdr failed!");
|
||||||
throw new BuildException("GenCapsuleHdr failed. (error="
|
|
||||||
+ Integer.toHexString(revl) + ")");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
package org.tianocore.framework.tasks;
|
package org.tianocore.framework.tasks;
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
import org.apache.tools.ant.BuildException;
|
import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.Project;
|
import org.apache.tools.ant.Project;
|
||||||
import org.apache.tools.ant.Task;
|
import org.apache.tools.ant.Task;
|
||||||
@ -35,6 +37,7 @@ public class GenDepexTask extends Task implements EfiDefine {
|
|||||||
/// input pre-processed dependency text files name
|
/// input pre-processed dependency text files name
|
||||||
///
|
///
|
||||||
private String inputFile = "";
|
private String inputFile = "";
|
||||||
|
private String inputFileName = "";
|
||||||
///
|
///
|
||||||
/// padding integer value
|
/// padding integer value
|
||||||
///
|
///
|
||||||
@ -79,24 +82,17 @@ public class GenDepexTask extends Task implements EfiDefine {
|
|||||||
runner.setAntRun(project);
|
runner.setAntRun(project);
|
||||||
runner.setCommandline(commandLine.getCommandline());
|
runner.setCommandline(commandLine.getCommandline());
|
||||||
|
|
||||||
System.out.println(Commandline.toString(commandLine
|
log(Commandline.toString(commandLine.getCommandline()), Project.MSG_VERBOSE);
|
||||||
.getCommandline()));
|
log(inputFileName);
|
||||||
|
|
||||||
returnVal = runner.execute();
|
returnVal = runner.execute();
|
||||||
if (EFI_SUCCESS == returnVal) {
|
if (EFI_SUCCESS == returnVal) {
|
||||||
//
|
log("GenDepex succeeded!", Project.MSG_VERBOSE);
|
||||||
// command execution success
|
|
||||||
//
|
|
||||||
System.out.println("GenDepex execute succeeded!");
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
System.out.println("GenDepex failed. (error="
|
log("ERROR = " + Integer.toHexString(returnVal));
|
||||||
+ Integer.toHexString(returnVal) + ")");
|
throw new BuildException("GenDepex failed!");
|
||||||
throw new BuildException("GenDepex failed. (error="
|
|
||||||
+ Integer.toHexString(returnVal) + ")");
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
@ -131,6 +127,7 @@ public class GenDepexTask extends Task implements EfiDefine {
|
|||||||
@param inputFileName name of inputFile
|
@param inputFileName name of inputFile
|
||||||
**/
|
**/
|
||||||
public void setInputFile(String inputFileName) {
|
public void setInputFile(String inputFileName) {
|
||||||
|
this.inputFileName = (new File(inputFileName)).getName();
|
||||||
this.inputFile = " -I " + inputFileName;
|
this.inputFile = " -I " + inputFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,17 +169,16 @@ public class GenFfsFileTask extends Task implements EfiDefine, FfsTypes {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ffsFile = new File (outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix);
|
String ffsFilePath = outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix;
|
||||||
System.out.print("General Ffs file: file name is:\n");
|
ffsFile = new File (ffsFilePath);
|
||||||
System.out.print(outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix);
|
|
||||||
System.out.print("\n");
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create ffs ORG file. fileName = FfsFileGuid + BaseName + ffsSuffix +
|
// Create ffs ORG file. fileName = FfsFileGuid + BaseName + ffsSuffix +
|
||||||
// ".org".
|
// ".org".
|
||||||
//
|
//
|
||||||
ffsOrgFile = new File(outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix + ".org");
|
ffsOrgFile = new File(ffsFilePath + ".org");
|
||||||
|
|
||||||
|
log(ffsFile.getName());
|
||||||
|
log(ffsOrgFile.getName());
|
||||||
try {
|
try {
|
||||||
//
|
//
|
||||||
// Create file output stream -- dataBuffer.
|
// Create file output stream -- dataBuffer.
|
||||||
@ -428,8 +427,8 @@ public class GenFfsFileTask extends Task implements EfiDefine, FfsTypes {
|
|||||||
//
|
//
|
||||||
ffsBuffer.close();
|
ffsBuffer.close();
|
||||||
orgFfsBuffer.close();
|
orgFfsBuffer.close();
|
||||||
System.out.print ("Successful create ffs file!\n");
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
log("genffsfile failed!");
|
||||||
throw new BuildException (e.getMessage());
|
throw new BuildException (e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,7 @@ public class GenFvImageTask extends Task implements EfiDefine{
|
|||||||
ProcessBuilder pb = new ProcessBuilder(argList);
|
ProcessBuilder pb = new ProcessBuilder(argList);
|
||||||
pb.directory(new File(outputDir));
|
pb.directory(new File(outputDir));
|
||||||
int exitCode = 0;
|
int exitCode = 0;
|
||||||
|
log((new File(this.infFile)).getName());
|
||||||
try {
|
try {
|
||||||
Process cmdProc = pb.start();
|
Process cmdProc = pb.start();
|
||||||
InputStreamReader cmdOut = new InputStreamReader(cmdProc.getInputStream());
|
InputStreamReader cmdOut = new InputStreamReader(cmdProc.getInputStream());
|
||||||
@ -86,9 +87,9 @@ public class GenFvImageTask extends Task implements EfiDefine{
|
|||||||
exitCode = cmdProc.waitFor();
|
exitCode = cmdProc.waitFor();
|
||||||
if (exitCode != 0) {
|
if (exitCode != 0) {
|
||||||
int len = cmdOut.read(buf, 0, 1024);
|
int len = cmdOut.read(buf, 0, 1024);
|
||||||
log(new String(buf, 0, len), Project.MSG_ERR);
|
log(new String(buf, 0, len));
|
||||||
} else {
|
} else {
|
||||||
log("GenFvImage - DONE!", Project.MSG_VERBOSE);
|
log("GenFvImage succeeded!", Project.MSG_VERBOSE);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
|
@ -16,9 +16,11 @@
|
|||||||
|
|
||||||
package org.tianocore.framework.tasks;
|
package org.tianocore.framework.tasks;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.Project;
|
import org.apache.tools.ant.Project;
|
||||||
import org.apache.tools.ant.Task;
|
import org.apache.tools.ant.Task;
|
||||||
import org.apache.tools.ant.BuildException;
|
|
||||||
import org.apache.tools.ant.taskdefs.Execute;
|
import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
@ -29,6 +31,10 @@ public class GenSectionTask extends Task implements EfiDefine {
|
|||||||
///
|
///
|
||||||
private String inputFile = "";
|
private String inputFile = "";
|
||||||
///
|
///
|
||||||
|
///
|
||||||
|
///
|
||||||
|
private String inputFileName = "";
|
||||||
|
///
|
||||||
/// outputfile name
|
/// outputfile name
|
||||||
///
|
///
|
||||||
private String outputFile = "";
|
private String outputFile = "";
|
||||||
@ -86,22 +92,18 @@ public class GenSectionTask extends Task implements EfiDefine {
|
|||||||
|
|
||||||
runner.setAntRun(project);
|
runner.setAntRun(project);
|
||||||
runner.setCommandline(cmdline.getCommandline());
|
runner.setCommandline(cmdline.getCommandline());
|
||||||
System.out.println(Commandline.toString(cmdline.getCommandline()));
|
|
||||||
|
|
||||||
|
log(inputFileName);
|
||||||
|
log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
if (EFI_SUCCESS == revl) {
|
if (EFI_SUCCESS == revl) {
|
||||||
//
|
log("gensection succeeded!", Project.MSG_VERBOSE);
|
||||||
// command execution success
|
|
||||||
//
|
|
||||||
System.out.println("gensection succeeded!");
|
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
System.out.println("gensection failed. (error="
|
log("ERROR = " + Integer.toHexString(revl));
|
||||||
+ Integer.toHexString(revl) + ")");
|
throw new BuildException("gensection failed!");
|
||||||
throw new BuildException("gensection failed. (error="
|
|
||||||
+ Integer.toHexString(revl) + ")");
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
@ -127,6 +129,7 @@ public class GenSectionTask extends Task implements EfiDefine {
|
|||||||
@param inputFile name of input file
|
@param inputFile name of input file
|
||||||
**/
|
**/
|
||||||
public void setInputFile(String inputFile) {
|
public void setInputFile(String inputFile) {
|
||||||
|
this.inputFileName = (new File(inputFile)).getName();
|
||||||
this.inputFile = " -i " + inputFile;
|
this.inputFile = " -i " + inputFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,8 +125,8 @@ public class GenTeImageTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// Set debug log information.
|
// Set debug log information.
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
.getCommandline()));
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
||||||
|
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
@ -134,16 +134,13 @@ public class GenTeImageTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, "GenTeImage succeeded!");
|
EdkLog.log(EdkLog.EDK_VERBOSE, "GenTeImage succeeded!");
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_ERROR, "GenTeImage failed. (error="
|
EdkLog.log(EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));
|
||||||
+ Integer.toHexString(revl) + ")");
|
throw new BuildException("GenTeImage failed!");
|
||||||
throw new BuildException("GenTeImage failed. (error="
|
|
||||||
+ Integer.toHexString(revl) + ")");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
|
@ -113,7 +113,7 @@ public class GuidChkTask extends Task implements EfiDefine{
|
|||||||
printGuiDef +
|
printGuiDef +
|
||||||
printAllGuid;
|
printAllGuid;
|
||||||
try {
|
try {
|
||||||
System.out.println(command + " " + argument);
|
log(command + " " + argument, Project.MSG_VERBOSE);
|
||||||
//
|
//
|
||||||
// execute command line
|
// execute command line
|
||||||
//
|
//
|
||||||
@ -134,17 +134,13 @@ public class GuidChkTask extends Task implements EfiDefine{
|
|||||||
else {
|
else {
|
||||||
BufferedReader bin = new BufferedReader(new InputStreamReader(proc.getInputStream()));
|
BufferedReader bin = new BufferedReader(new InputStreamReader(proc.getInputStream()));
|
||||||
String line = bin.readLine();
|
String line = bin.readLine();
|
||||||
System.out.println(line);
|
|
||||||
while (line != null ){
|
while (line != null ){
|
||||||
System.out.print(line);
|
|
||||||
line = bin.readLine();
|
line = bin.readLine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
System.out.println("GuidChkTask Success!");
|
log("GuidChkTask Succeeded!", Project.MSG_VERBOSE);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("GuidChkTask failed!");
|
throw new BuildException("GuidChkTask failed!");
|
||||||
System.out.println(e.getMessage());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -35,6 +35,7 @@ import org.apache.tools.ant.taskdefs.Execute;
|
|||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
import org.apache.tools.ant.types.Path;
|
import org.apache.tools.ant.types.Path;
|
||||||
|
import org.tianocore.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Class MakeDeps is used to wrap MakeDeps.exe as an ANT task.
|
Class MakeDeps is used to wrap MakeDeps.exe as an ANT task.
|
||||||
@ -77,6 +78,10 @@ public class MakeDeps extends Task {
|
|||||||
|
|
||||||
Project prj = this.getOwningTarget().getProject();
|
Project prj = this.getOwningTarget().getProject();
|
||||||
String toolPath = prj.getProperty("env.FRAMEWORK_TOOLS_PATH");
|
String toolPath = prj.getProperty("env.FRAMEWORK_TOOLS_PATH");
|
||||||
|
FrameworkLogger logger = new FrameworkLogger(prj, "makedeps");
|
||||||
|
EdkLog.setLogLevel(prj.getProperty("env.LOGLEVEL"));
|
||||||
|
EdkLog.setLogger(logger);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// compose full tool path
|
/// compose full tool path
|
||||||
///
|
///
|
||||||
@ -118,8 +123,9 @@ public class MakeDeps extends Task {
|
|||||||
Iterator iterator = inputFileList.iterator();
|
Iterator iterator = inputFileList.iterator();
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Input inputFile = (Input)iterator.next();
|
Input inputFile = (Input)iterator.next();
|
||||||
|
String inputFileString = cleanupPathName(inputFile.getFile());
|
||||||
args.append(" -f ");
|
args.append(" -f ");
|
||||||
args.append(cleanupPathName(inputFile.getFile()));
|
args.append(inputFileString);
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -165,6 +171,9 @@ public class MakeDeps extends Task {
|
|||||||
runner.setAntRun(prj);
|
runner.setAntRun(prj);
|
||||||
runner.setCommandline(cmd.getCommandline());
|
runner.setCommandline(cmd.getCommandline());
|
||||||
|
|
||||||
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmd.getCommandline()));
|
||||||
|
EdkLog.log(EdkLog.EDK_INFO, " ");
|
||||||
|
|
||||||
int result = 0;
|
int result = 0;
|
||||||
try {
|
try {
|
||||||
result = runner.execute();
|
result = runner.execute();
|
||||||
@ -173,7 +182,7 @@ public class MakeDeps extends Task {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
log ("MakeDeps failed");
|
EdkLog.log(EdkLog.EDK_INFO, "MakeDeps failed!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,25 +119,21 @@ public class ModifyInfTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// Set debug log information.
|
// Set debug log information.
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
.getCommandline()));
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFVInfFileName)).getName());
|
||||||
|
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
if (EFI_SUCCESS == revl) {
|
if (EFI_SUCCESS == revl) {
|
||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, "ModifyInfTask succeeded!");
|
EdkLog.log(EdkLog.EDK_VERBOSE, "ModifyInfTask succeeded!");
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_ERROR, "ModifyInfTask failed. (error="
|
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||||
+ Integer.toHexString(revl) + ")");
|
throw new BuildException("ModifyInfTask failed!");
|
||||||
throw new BuildException("ModifyInfTask failed. (error="
|
|
||||||
+ Integer.toHexString(revl) + ")");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
|
@ -40,7 +40,7 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
|||||||
// / Input file
|
// / Input file
|
||||||
// /
|
// /
|
||||||
private String inputFile = "";
|
private String inputFile = "";
|
||||||
|
private String inputFileName = "";
|
||||||
// /
|
// /
|
||||||
// / Output file
|
// / Output file
|
||||||
// /
|
// /
|
||||||
@ -128,7 +128,8 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// Set debug log information.
|
// Set debug log information.
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
|
EdkLog.log(EdkLog.EDK_INFO, this.inputFileName);
|
||||||
|
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
@ -136,16 +137,13 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO,"PeiBase succeeded!");
|
EdkLog.log(EdkLog.EDK_VERBOSE, "PeiReBase succeeded!");
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_ERROR, "PeiBase failed. (error="
|
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||||
+ Integer.toHexString(revl) + ")");
|
throw new BuildException("PeiReBase failed!");
|
||||||
throw new BuildException("PeiBase failed. (error="
|
|
||||||
+ Integer.toHexString(revl) + ")");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
@ -172,6 +170,7 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
|||||||
* string of input file name.
|
* string of input file name.
|
||||||
*/
|
*/
|
||||||
public void setInputFile(String inputFile) {
|
public void setInputFile(String inputFile) {
|
||||||
|
this.inputFileName = (new File(inputFile)).getName();
|
||||||
this.inputFile = "-I " + inputFile;
|
this.inputFile = "-I " + inputFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,7 +111,8 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// Set debug log information.
|
// Set debug log information.
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.fvInputFile)).getName());
|
||||||
|
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
@ -119,16 +120,13 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO,"SecApResetVectorFixup succeeded!");
|
EdkLog.log(EdkLog.EDK_VERBOSE, "SecApResetVectorFixup succeeded!");
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_ERROR, "SecApResetVectorFixup failed. (error="
|
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||||
+ Integer.toHexString(revl) + ")");
|
throw new BuildException("SecApResetVectorFixup failed!");
|
||||||
throw new BuildException("SecApResetVectorFixup failed. (error="
|
|
||||||
+ Integer.toHexString(revl) + ")");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
|
@ -116,8 +116,7 @@ public class SecFixupTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// Set debug log information.
|
// Set debug log information.
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
.getCommandline()));
|
|
||||||
|
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
@ -125,16 +124,13 @@ public class SecFixupTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, "SecFixup succeeded!");
|
EdkLog.log(EdkLog.EDK_VERBOSE, "SecFixup succeeded!");
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_ERROR, "SecFixup failed. (error="
|
EdkLog.log(EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));
|
||||||
+ Integer.toHexString(revl) + ")");
|
throw new BuildException("SecFixup failed!");
|
||||||
throw new BuildException("SecFixup failed. (error="
|
|
||||||
+ Integer.toHexString(revl) + ")");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
|
@ -13,6 +13,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
**/
|
**/
|
||||||
package org.tianocore.framework.tasks;
|
package org.tianocore.framework.tasks;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
import org.apache.tools.ant.BuildException;
|
import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.Project;
|
import org.apache.tools.ant.Project;
|
||||||
import org.apache.tools.ant.Task;
|
import org.apache.tools.ant.Task;
|
||||||
@ -74,23 +76,18 @@ public class SetStampTask extends Task implements EfiDefine {
|
|||||||
runner.setAntRun(project);
|
runner.setAntRun(project);
|
||||||
runner.setCommandline(commandLine.getCommandline());
|
runner.setCommandline(commandLine.getCommandline());
|
||||||
|
|
||||||
System.out.println(Commandline.toString(commandLine
|
log(Commandline.toString(commandLine.getCommandline()), Project.MSG_VERBOSE);
|
||||||
.getCommandline()));
|
log((new File(this.peFile)).getName());
|
||||||
|
|
||||||
returnVal = runner.execute();
|
returnVal = runner.execute();
|
||||||
if (EFI_SUCCESS == returnVal) {
|
if (EFI_SUCCESS == returnVal) {
|
||||||
///
|
log("SetStamp succeeded!", Project.MSG_VERBOSE);
|
||||||
/// command execution success
|
|
||||||
///
|
|
||||||
System.out.println("SetStamp execute succeeded!");
|
|
||||||
} else {
|
} else {
|
||||||
///
|
///
|
||||||
/// command execution fail
|
/// command execution fail
|
||||||
///
|
///
|
||||||
System.out.println("SetStamp failed. (error="
|
log("ERROR = " + Integer.toHexString(returnVal));
|
||||||
+ Integer.toHexString(returnVal) + ")");
|
throw new BuildException("SetStamp failed!");
|
||||||
throw new BuildException("SetStamp failed. (error="
|
|
||||||
+ Integer.toHexString(returnVal) + ")");
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
|
@ -98,22 +98,20 @@ public class SplitfileTask extends Task implements EfiDefine {
|
|||||||
runner.setAntRun(project);
|
runner.setAntRun(project);
|
||||||
runner.setCommandline(cmdline.getCommandline());
|
runner.setCommandline(cmdline.getCommandline());
|
||||||
|
|
||||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
if (EFI_SUCCESS == revl) {
|
if (EFI_SUCCESS == revl) {
|
||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, "splitfile succeeded!");
|
EdkLog.log(EdkLog.EDK_VERBOSE, "splitfile succeeded!");
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_ERROR, "splitfile failed. (error="
|
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||||
+ Integer.toHexString(revl) + ")");
|
throw new BuildException("splitfile failed!");
|
||||||
throw new BuildException("splitfile failed. (error="
|
|
||||||
+ Integer.toHexString(revl) + ")");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
|
@ -148,22 +148,18 @@ public class StrGatherTask extends Task implements EfiDefine {
|
|||||||
|
|
||||||
runner.setAntRun(project);
|
runner.setAntRun(project);
|
||||||
runner.setCommandline(cmdline.getCommandline());
|
runner.setCommandline(cmdline.getCommandline());
|
||||||
System.out.println(Commandline.toString(cmdline.getCommandline()));
|
|
||||||
|
|
||||||
|
log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);
|
||||||
|
log(this.commandType.substring(2));
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
if (EFI_SUCCESS == revl) {
|
if (EFI_SUCCESS == revl) {
|
||||||
///
|
log("strgather succeeded!", Project.MSG_VERBOSE);
|
||||||
/// command execution success
|
|
||||||
///
|
|
||||||
System.out.println("strgather succeeded!");
|
|
||||||
} else {
|
} else {
|
||||||
///
|
///
|
||||||
/// command execution fail
|
/// command execution fail
|
||||||
///
|
///
|
||||||
System.out.println("strgather failed. (error="
|
log("ERROR = " + Integer.toHexString(revl));
|
||||||
+ Integer.toHexString(revl) + ")");
|
throw new BuildException("strgather failed!");
|
||||||
throw new BuildException("strgather failed. (error="
|
|
||||||
+ Integer.toHexString(revl) + ")");
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
|
@ -105,7 +105,8 @@ public class StripTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// Set debug log information.
|
// Set debug log information.
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
||||||
|
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
@ -113,16 +114,13 @@ public class StripTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO,"Strip succeeded!");
|
EdkLog.log(EdkLog.EDK_VERBOSE, "Strip succeeded!");
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_ERROR, "Strip failed. (error="
|
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||||
+ Integer.toHexString(revl) + ")");
|
throw new BuildException("Strip failed!");
|
||||||
throw new BuildException("Strip failed. (error="
|
|
||||||
+ Integer.toHexString(revl) + ")");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
|
@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
**/
|
**/
|
||||||
package org.tianocore.framework.tasks;
|
package org.tianocore.framework.tasks;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -39,7 +40,8 @@ public class VfrCompilerTask extends Task implements EfiDefine {
|
|||||||
private String outPutDir = "";
|
private String outPutDir = "";
|
||||||
private String createIfrBinFile = "";
|
private String createIfrBinFile = "";
|
||||||
private String processerArg ="";
|
private String processerArg ="";
|
||||||
private String vfrFile;
|
private String vfrFile = "";
|
||||||
|
private String vfrFileName = "";
|
||||||
|
|
||||||
private List<Object> includepathList = new ArrayList<Object>();
|
private List<Object> includepathList = new ArrayList<Object>();
|
||||||
|
|
||||||
@ -116,6 +118,7 @@ public class VfrCompilerTask extends Task implements EfiDefine {
|
|||||||
@param vfrFile The name of VFR file
|
@param vfrFile The name of VFR file
|
||||||
**/
|
**/
|
||||||
public void setVfrFile(String vfrFile) {
|
public void setVfrFile(String vfrFile) {
|
||||||
|
this.vfrFileName = (new File(vfrFile)).getName();
|
||||||
this.vfrFile = " " + vfrFile;
|
this.vfrFile = " " + vfrFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,17 +206,15 @@ public class VfrCompilerTask extends Task implements EfiDefine {
|
|||||||
runner.setAntRun(project);
|
runner.setAntRun(project);
|
||||||
runner.setCommandline(commandLine.getCommandline());
|
runner.setCommandline(commandLine.getCommandline());
|
||||||
|
|
||||||
System.out.println(Commandline.toString(commandLine.getCommandline()));
|
log(Commandline.toString(commandLine.getCommandline()), Project.MSG_VERBOSE);
|
||||||
|
log(vfrFileName);
|
||||||
int returnVal = runner.execute();
|
int returnVal = runner.execute();
|
||||||
if (EFI_SUCCESS == returnVal) {
|
if (EFI_SUCCESS == returnVal) {
|
||||||
System.out.println("VfrCompiler execution succeeded!");
|
log("VfrCompiler succeeded!", Project.MSG_VERBOSE);
|
||||||
} else {
|
} else {
|
||||||
System.out.println("VfrCompiler failed. (error=" +
|
log("ERROR = " + Integer.toHexString(returnVal));
|
||||||
Integer.toHexString(returnVal) + ")");
|
throw new BuildException("VfrCompiler failed!");
|
||||||
throw new BuildException("VfrCompiler failed. (error=" +
|
|
||||||
Integer.toHexString(returnVal) + ")");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new BuildException(e.getMessage());
|
throw new BuildException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,8 @@ public class ZeroDebugDataTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// Set debug log information.
|
// Set debug log information.
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.peFile)).getName());
|
||||||
|
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
@ -113,15 +114,13 @@ public class ZeroDebugDataTask extends Task implements EfiDefine {
|
|||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_INFO,"ZeroDebug succeeded!");
|
EdkLog.log(EdkLog.EDK_VERBOSE, "ZeroDebugData succeeded!");
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// command execution fail
|
// command execution fail
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_ERROR, "ZeroDebug failed. (error="
|
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||||
+ Integer.toHexString(revl) + ")");
|
throw new BuildException("ZeroDebugData failed!");
|
||||||
throw new BuildException("ZeroDebug failed. (error="
|
|
||||||
+ Integer.toHexString(revl) + ")");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -854,16 +854,6 @@ Returns:
|
|||||||
Output_Flag = FALSE;
|
Output_Flag = FALSE;
|
||||||
Pad_Flag = FALSE;
|
Pad_Flag = FALSE;
|
||||||
|
|
||||||
//
|
|
||||||
// Output the calling arguments
|
|
||||||
//
|
|
||||||
printf ("\n\n");
|
|
||||||
for (Index = 0; Index < argc; Index++) {
|
|
||||||
printf ("%s ", argv[Index]);
|
|
||||||
}
|
|
||||||
|
|
||||||
printf ("\n\n");
|
|
||||||
|
|
||||||
if (argc < 5) {
|
if (argc < 5) {
|
||||||
printf ("Not enough arguments\n");
|
printf ("Not enough arguments\n");
|
||||||
PrintGenDepexUsageInfo ();
|
PrintGenDepexUsageInfo ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user