git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1255
6f19259b-4bc3-4df7-8a09-
765794883524
16 files changed:
//\r
// command execution fail\r
//\r
//\r
// command execution fail\r
//\r
- EdkLog.log(EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));\r
+ EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
throw new BuildException("CreateMtFile failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException("CreateMtFile failed!");\r
}\r
} catch (Exception e) {\r
// command execution fail\r
//\r
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
// command execution fail\r
//\r
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
- throw new BuildException("Strip failed!");\r
+ throw new BuildException("EfiCompress failed!");\r
\r
}\r
} catch (Exception e) {\r
\r
}\r
} catch (Exception e) {\r
**/ \r
public void bufferToStruct (byte[] dataBuffer){\r
if (dataBuffer.length != 16) {\r
**/ \r
public void bufferToStruct (byte[] dataBuffer){\r
if (dataBuffer.length != 16) {\r
- throw new BuildException ("Buffer is not fitting GUID type!");\r
+ throw new BuildException ("Buffer is not sized [" + dataBuffer.length + "] for data type, GUID!");\r
}\r
\r
data1 = (int)(dataBuffer[3]& 0xff);\r
}\r
\r
data1 = (int)(dataBuffer[3]& 0xff);\r
String str;\r
\r
if (!file.exists()) {\r
String str;\r
\r
if (!file.exists()) {\r
- throw new BuildException("The file" + file + "is not exist"); \r
+ throw new BuildException("The file, " + file + " does not exist!"); \r
} \r
try {\r
fileReader = new FileReader(file);\r
} \r
try {\r
fileReader = new FileReader(file);\r
-}
\ No newline at end of file
log(this.peImageName);\r
revl = runner.execute();\r
if (EFI_SUCCESS == revl) {\r
log(this.peImageName);\r
revl = runner.execute();\r
if (EFI_SUCCESS == revl) {\r
- log("fwimage succeeded!", Project.MSG_VERBOSE);\r
+ log("FwImage succeeded!", Project.MSG_VERBOSE);\r
} else {\r
//\r
// command execution fail\r
//\r
log("ERROR = " + Integer.toHexString(revl));\r
} else {\r
//\r
// command execution fail\r
//\r
log("ERROR = " + Integer.toHexString(revl));\r
- throw new BuildException("fwimage failed!");\r
+ throw new BuildException("FwImage failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
//\r
// command execution success \r
//\r
//\r
// command execution success \r
//\r
- log("gencrc32section succeeded!", Project.MSG_VERBOSE);\r
+ log("GenCRC32Section succeeded!", Project.MSG_VERBOSE);\r
} else {\r
// \r
// command execution fail\r
//\r
log("ERROR = " + Integer.toHexString(revl));\r
} else {\r
// \r
// command execution fail\r
//\r
log("ERROR = " + Integer.toHexString(revl));\r
+// LAH Added This Line\r
+ throw new BuildException("GenCRC32Section failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
// Check does the BaseName, Guid, FileType set value.\r
//\r
if (this.baseName.equals("")) {\r
// Check does the BaseName, Guid, FileType set value.\r
//\r
if (this.baseName.equals("")) {\r
- throw new BuildException ("Must set BaseName!\n");\r
+ throw new BuildException ("Must set OutputFileBasename!\n");\r
}\r
\r
if (this.ffsFileGuid.equals("")) {\r
}\r
\r
if (this.ffsFileGuid.equals("")) {\r
if (fileSize == ffsHeader.getSize()) {\r
throw new BuildException (\r
"FFS_ATTRIB_TAIL_PRESENT=TRUE is " +\r
if (fileSize == ffsHeader.getSize()) {\r
throw new BuildException (\r
"FFS_ATTRIB_TAIL_PRESENT=TRUE is " +\r
- "invalid for 0-length files"\r
+ "invalid for zero length files"\r
); \r
}\r
fileSize = fileSize + 2;\r
); \r
}\r
fileSize = fileSize + 2;\r
public void setFfsAttribDataAlignment(String ffsAligment) {\r
this.ffsAttribDataAlignment = stringToInt(ffsAligment.replaceAll(" ", "").toLowerCase());\r
if (this.ffsAttribDataAlignment < 0 || this.ffsAttribDataAlignment > 7) {\r
public void setFfsAttribDataAlignment(String ffsAligment) {\r
this.ffsAttribDataAlignment = stringToInt(ffsAligment.replaceAll(" ", "").toLowerCase());\r
if (this.ffsAttribDataAlignment < 0 || this.ffsAttribDataAlignment > 7) {\r
- throw new BuildException ("FFS_ATTRIB_DATA_ALIGMENT must be 0-7");\r
+ throw new BuildException ("FFS_ATTRIB_DATA_ALIGMENT must be an integer value from 0 through 7, inclusive");\r
} else {\r
attributes |= (((byte)this.ffsAttribDataAlignment) << 3);\r
}\r
} else {\r
attributes |= (((byte)this.ffsAttribDataAlignment) << 3);\r
}\r
\r
byte[] buffer = new byte[16];\r
if (GuidStr.length()!=36) {\r
\r
byte[] buffer = new byte[16];\r
if (GuidStr.length()!=36) {\r
- throw new BuildException ("Guid length is not correct!");\r
+ throw new BuildException ("The GUID length [" + GuidStr.length() + "] is not correct!");\r
}\r
\r
\r
SplitStr = GuidStr.split("-");\r
if (SplitStr.length != 5) {\r
}\r
\r
\r
SplitStr = GuidStr.split("-");\r
if (SplitStr.length != 5) {\r
- throw new BuildException ("Guid type is not correct!");\r
+ throw new BuildException ("The GUID format is not correct!");\r
try {\r
value = Integer.parseInt(intStringNoPrefix, radix);\r
} catch (NumberFormatException e) {\r
try {\r
value = Integer.parseInt(intStringNoPrefix, radix);\r
} catch (NumberFormatException e) {\r
- log("Incorrect format of int (" + intString + "). -1 is assumed");\r
+ log("Incorrect format of int [" + intString + "]. -1 is assumed");\r
log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);\r
revl = runner.execute();\r
if (EFI_SUCCESS == revl) {\r
log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);\r
revl = runner.execute();\r
if (EFI_SUCCESS == revl) {\r
- log("gensection succeeded!", Project.MSG_VERBOSE);\r
+ log("GenSection succeeded!", Project.MSG_VERBOSE);\r
} else {\r
//\r
// command execution fail\r
//\r
log("ERROR = " + Integer.toHexString(revl));\r
} else {\r
//\r
// command execution fail\r
//\r
log("ERROR = " + Integer.toHexString(revl));\r
- throw new BuildException("gensection failed!");\r
+ throw new BuildException("GenSection failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
\r
// change the old DEP file format (makefile compatible) to just file list\r
if (!cleanup()) {\r
\r
// change the old DEP file format (makefile compatible) to just file list\r
if (!cleanup()) {\r
- throw new BuildException(depsFile + " was not generated");\r
+ throw new BuildException(depsFile + " was not generated!");\r
//\r
// set Logger\r
//\r
//\r
// set Logger\r
//\r
- FrameworkLogger logger = new FrameworkLogger(project, "modifytask");\r
+ FrameworkLogger logger = new FrameworkLogger(project, "modifyinftask");\r
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));\r
EdkLog.setLogger(logger);\r
//\r
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));\r
EdkLog.setLogger(logger);\r
//\r
/// check if file exist.\r
/// \r
if (! sectFile.exists()) {\r
/// check if file exist.\r
/// \r
if (! sectFile.exists()) {\r
- throw new BuildException("The file " + this.fileName + " is not exist!\n"); \r
+ throw new BuildException("The file " + this.fileName + " does not exist!\n"); \r
\r
} catch (Exception e) {\r
System.out.print(e.getMessage());\r
\r
} catch (Exception e) {\r
System.out.print(e.getMessage());\r
- throw new BuildException("section file2Buffer failed!\n"); \r
+ throw new BuildException("SectFile, toBuffer failed!\n"); \r
-}
\ No newline at end of file
//\r
// command execution success\r
//\r
//\r
// command execution success\r
//\r
- EdkLog.log(EdkLog.EDK_VERBOSE, "splitfile succeeded!");\r
+ EdkLog.log(EdkLog.EDK_VERBOSE, "SplitFile succeeded!");\r
} else {\r
//\r
// command execution fail\r
//\r
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
} else {\r
//\r
// command execution fail\r
//\r
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
- throw new BuildException("splitfile failed!");\r
+ throw new BuildException("SplitFile failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
log(this.commandType.substring(2));\r
revl = runner.execute();\r
if (EFI_SUCCESS == revl) {\r
log(this.commandType.substring(2));\r
revl = runner.execute();\r
if (EFI_SUCCESS == revl) {\r
- log("strgather succeeded!", Project.MSG_VERBOSE);\r
+ log("StrGather succeeded!", Project.MSG_VERBOSE);\r
} else {\r
///\r
/// command execution fail\r
///\r
log("ERROR = " + Integer.toHexString(revl));\r
} else {\r
///\r
/// command execution fail\r
///\r
log("ERROR = " + Integer.toHexString(revl));\r
- throw new BuildException("strgather failed!");\r
+ throw new BuildException("StrGather failed!");\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
}\r
} catch (Exception e) {\r
throw new BuildException(e.getMessage());\r
//\r
// set Logger\r
//\r
//\r
// set Logger\r
//\r
- FrameworkLogger logger = new FrameworkLogger(project, "edkStrip");\r
+ FrameworkLogger logger = new FrameworkLogger(project, "strip");\r
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));\r
EdkLog.setLogger(logger);\r
//\r
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));\r
EdkLog.setLogger(logger);\r
//\r
String command;\r
String argument;\r
if (path == null) {\r
String command;\r
String argument;\r
if (path == null) {\r
} else {\r
command = path + File.separatorChar + "Strip";\r
}\r
} else {\r
command = path + File.separatorChar + "Strip";\r
}\r
try {\r
executeTool ();\r
} catch (Exception e) {\r
try {\r
executeTool ();\r
} catch (Exception e) {\r
- throw new BuildException("Call tools failed!\n");\r
+ throw new BuildException("Call to executeTool failed!\n");\r
OutputFile = new File (this.outPutFileName);\r
long fileLen = OutputFile.length();\r
if (!OutputFile.exists()) {\r
OutputFile = new File (this.outPutFileName);\r
long fileLen = OutputFile.length();\r
if (!OutputFile.exists()) {\r
- throw new BuildException("The file " + outPutFileName + " is not exist!\n");\r
+ throw new BuildException("The file " + outPutFileName + " does not exist!\n");\r
\r
} catch (Exception e) {\r
System.out.print(e.getMessage());\r
\r
} catch (Exception e) {\r
System.out.print(e.getMessage());\r
- throw new BuildException("Call tool2buffer failed!\n");\r
+ throw new BuildException("Tool call, toBuffer failed!\n");\r
crcProcess.waitFor();\r
} catch (Exception e) {\r
System.out.print (e.getMessage());\r
crcProcess.waitFor();\r
} catch (Exception e) {\r
System.out.print (e.getMessage());\r
- throw new BuildException("Execute tools fails!\n");\r
+ throw new BuildException("Execution of externalTool task failed!\n");\r
log(vfrFileName);\r
int returnVal = runner.execute();\r
if (EFI_SUCCESS == returnVal) {\r
log(vfrFileName);\r
int returnVal = runner.execute();\r
if (EFI_SUCCESS == returnVal) {\r
- log("VfrCompiler succeeded!", Project.MSG_VERBOSE);\r
+ log("VfrCompile succeeded!", Project.MSG_VERBOSE);\r
} else {\r
log("ERROR = " + Integer.toHexString(returnVal));\r
} else {\r
log("ERROR = " + Integer.toHexString(returnVal));\r
- throw new BuildException("VfrCompiler failed!");\r
+ throw new BuildException("VfrCompile failed!");\r
}\r
} catch (IOException e) {\r
throw new BuildException(e.getMessage());\r
}\r
}\r
}\r
} catch (IOException e) {\r
throw new BuildException(e.getMessage());\r
}\r
}\r
-}
\ No newline at end of file