Fixed EDKT482. Added support for multiple msa files in the same directory.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2079 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<MsaHeader>
|
<MsaHeader>
|
||||||
<ModuleName>Hello World UEFI Application</ModuleName>
|
<ModuleName>Hello_World_UEFI_Application</ModuleName>
|
||||||
<ModuleType>UEFI_APPLICATION</ModuleType>
|
<ModuleType>UEFI_APPLICATION</ModuleType>
|
||||||
<GuidValue>6987936E-ED34-44db-AE97-1FA5E4ED2116</GuidValue>
|
<GuidValue>6987936E-ED34-44db-AE97-1FA5E4ED2116</GuidValue>
|
||||||
<Version>1.0</Version>
|
<Version>1.0</Version>
|
||||||
@ -48,4 +48,4 @@
|
|||||||
<ModuleEntryPoint>UefiMain</ModuleEntryPoint>
|
<ModuleEntryPoint>UefiMain</ModuleEntryPoint>
|
||||||
</Extern>
|
</Extern>
|
||||||
</Externs>
|
</Externs>
|
||||||
</ModuleSurfaceArea>
|
</ModuleSurfaceArea>
|
||||||
|
@ -207,11 +207,10 @@ public class FrameworkBuildTask extends Task{
|
|||||||
// If find more than one FPD files, report error.
|
// If find more than one FPD files, report error.
|
||||||
//
|
//
|
||||||
File buildFile = null;
|
File buildFile = null;
|
||||||
if (msaFiles.size() > 1) {
|
if (msaFiles.size() > 0) {
|
||||||
throw new BuildException("Found " + msaFiles.size() + " MSA files in current dir. ");
|
if (activePlatform == null) {
|
||||||
} else if (msaFiles.size() == 1 && activePlatform == null) {
|
throw new BuildException("If trying to build a single module, please set ACTIVE_PLATFORM in file [" + targetFilename + "]. ");
|
||||||
throw new BuildException("If trying to build a single module, please set ACTIVE_PLATFORM in file [" + targetFilename + "]. ");
|
}
|
||||||
} else if (msaFiles.size() == 1 && activePlatform != null) {
|
|
||||||
//
|
//
|
||||||
// Build the single module
|
// Build the single module
|
||||||
//
|
//
|
||||||
@ -278,17 +277,21 @@ public class FrameworkBuildTask extends Task{
|
|||||||
}
|
}
|
||||||
File tmpFile = new File(GlobalData.getWorkspacePath() + File.separatorChar + activePlatform);
|
File tmpFile = new File(GlobalData.getWorkspacePath() + File.separatorChar + activePlatform);
|
||||||
EdkLog.log(this, "Using the FPD file [" + tmpFile.getPath() + "] for the active platform. ");
|
EdkLog.log(this, "Using the FPD file [" + tmpFile.getPath() + "] for the active platform. ");
|
||||||
EdkLog.log(this, "Processing the MSA file [" + buildFile.getPath() + "] ..>> ");
|
|
||||||
GenBuildTask genBuildTask = new GenBuildTask();
|
File[] moduleFiles = msaFiles.toArray(new File[msaFiles.size()]);
|
||||||
genBuildTask.setSingleModuleBuild(true);
|
for (int i = 0; i < moduleFiles.length; ++i) {
|
||||||
genBuildTask.setType(type);
|
EdkLog.log(this, "Processing the MSA file [" + moduleFiles[i].getPath() + "] ..>> ");
|
||||||
getProject().setProperty("PLATFORM_FILE", activePlatform);
|
GenBuildTask genBuildTask = new GenBuildTask();
|
||||||
if( !multithread) {
|
genBuildTask.setSingleModuleBuild(true);
|
||||||
originalProperties.put("PLATFORM_FILE", activePlatform);
|
genBuildTask.setType(type);
|
||||||
|
getProject().setProperty("PLATFORM_FILE", activePlatform);
|
||||||
|
if( !multithread) {
|
||||||
|
originalProperties.put("PLATFORM_FILE", activePlatform);
|
||||||
|
}
|
||||||
|
genBuildTask.setProject(getProject());
|
||||||
|
genBuildTask.setMsaFile(moduleFiles[i]);
|
||||||
|
genBuildTask.perform();
|
||||||
}
|
}
|
||||||
genBuildTask.setProject(getProject());
|
|
||||||
genBuildTask.setMsaFile(buildFile);
|
|
||||||
genBuildTask.perform();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,6 +253,10 @@ public class GenBuildTask extends Ant {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (archList.length == 0) {
|
||||||
|
EdkLog.log(this, EdkLog.EDK_WARNING, "Warning: " + moduleId + " was not found in current platform FPD file!\n");
|
||||||
|
}
|
||||||
|
|
||||||
for (int k = 0; k < archList.length; k++) {
|
for (int k = 0; k < archList.length; k++) {
|
||||||
|
|
||||||
getProject().setProperty("ARCH", archList[k]);
|
getProject().setProperty("ARCH", archList[k]);
|
||||||
@ -422,7 +426,7 @@ public class GenBuildTask extends Ant {
|
|||||||
getProject().setProperty("VERSION", moduleId.getVersion());
|
getProject().setProperty("VERSION", moduleId.getVersion());
|
||||||
getProject().setProperty("MODULE_TYPE", moduleId.getModuleType());
|
getProject().setProperty("MODULE_TYPE", moduleId.getModuleType());
|
||||||
getProject().setProperty("MODULE_DIR", moduleId.getMsaFile().getParent().replaceAll("(\\\\)", "/"));
|
getProject().setProperty("MODULE_DIR", moduleId.getMsaFile().getParent().replaceAll("(\\\\)", "/"));
|
||||||
getProject().setProperty("MODULE_RELATIVE_DIR", moduleId.getModuleRelativePath().replaceAll("(\\\\)", "/"));
|
getProject().setProperty("MODULE_RELATIVE_DIR", moduleId.getModuleRelativePath().replaceAll("(\\\\)", "/") + File.separatorChar + moduleId.getName());
|
||||||
|
|
||||||
//
|
//
|
||||||
// SUBSYSTEM
|
// SUBSYSTEM
|
||||||
|
Reference in New Issue
Block a user