mirror of https://github.com/acidanthera/audk.git
Add Build Macro to build SEC modules.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1784 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
641cd03cea
commit
706c2ad4ba
|
@ -17921,7 +17921,7 @@
|
||||||
<Section SectionType="EFI_SECTION_RAW">
|
<Section SectionType="EFI_SECTION_RAW">
|
||||||
<!--add 12 bytes blank.pad file-->
|
<!--add 12 bytes blank.pad file-->
|
||||||
<Filenames>
|
<Filenames>
|
||||||
<Filename>Blank.pad</Filename>
|
<Filename>${PLATFORM_DIR}/Blank.pad</Filename>
|
||||||
</Filenames>
|
</Filenames>
|
||||||
</Section>
|
</Section>
|
||||||
<Section SectionType="EFI_SECTION_PE32"/>
|
<Section SectionType="EFI_SECTION_PE32"/>
|
||||||
|
|
|
@ -738,6 +738,29 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Build the real mode ASM file
|
||||||
|
-->
|
||||||
|
<macrodef name="Build_RealAsm">
|
||||||
|
<attribute name="FILEPATH"/>
|
||||||
|
<attribute name="FILENAME"/>
|
||||||
|
<attribute name="FILEEXT" default="asm"/>
|
||||||
|
|
||||||
|
<element name="EXTRA.INC" optional="yes"/>
|
||||||
|
<element name="EXTRA.ARG" optional="yes"/>
|
||||||
|
|
||||||
|
<sequential>
|
||||||
|
<!-- Lack Dependency Check -->
|
||||||
|
<exec dir="${DEST_DIR_OUTPUT}" executable="${ASM}" failonerror="true">
|
||||||
|
<arg line="/nologo /omf ${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT} /Bl${ASMLINK} ${ASMLINK_FLAGS}"/>
|
||||||
|
</exec>
|
||||||
|
<concat destfile="${DEST_DIR_OUTPUT}/@{FILENAME}.cat" binary="yes">
|
||||||
|
<filelist dir="${MODULE_DIR}" files="Blank2.pad"/>
|
||||||
|
<filelist dir="${DEST_DIR_OUTPUT}" files="@{FILENAME}.com"/>
|
||||||
|
</concat>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
DUMMY
|
DUMMY
|
||||||
-->
|
-->
|
||||||
|
@ -1124,6 +1147,41 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
EFI_SECTION_RAW_SEC
|
||||||
|
-->
|
||||||
|
<macrodef name="EFI_SECTION_RAW_SEC">
|
||||||
|
<attribute name="FILEPATH"/>
|
||||||
|
<attribute name="FILENAME"/>
|
||||||
|
<attribute name="FILEEXT" default="cat"/>
|
||||||
|
|
||||||
|
<element name="PRE.PROCESS" optional="yes"/>
|
||||||
|
<element name="POST.PROCESS" optional="yes"/>
|
||||||
|
|
||||||
|
<sequential>
|
||||||
|
<OnDependency>
|
||||||
|
<sourcefiles>
|
||||||
|
<file name="${DEST_DIR_OUTPUT}/ResetVec.@{FILEEXT}"/>
|
||||||
|
<file name="${DEST_DIR_OUTPUT}/@{FILENAME}.te"/>
|
||||||
|
</sourcefiles>
|
||||||
|
<targetfiles>
|
||||||
|
<file name="${DEST_DIR_OUTPUT}/@{FILENAME}.sec"/>
|
||||||
|
</targetfiles>
|
||||||
|
|
||||||
|
<sequential>
|
||||||
|
<PRE.PROCESS/>
|
||||||
|
<secfixup secexefile="${DEST_DIR_OUTPUT}/@{FILENAME}.te" resetvectorDatafile="${DEST_DIR_OUTPUT}/ResetVec.@{FILEEXT}"
|
||||||
|
outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.bin"/>
|
||||||
|
|
||||||
|
<gensection inputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.bin"
|
||||||
|
outputfile="${DEST_DIR_OUTPUT}/@{FILENAME}.sec"
|
||||||
|
sectiontype="EFI_SECTION_RAW"/>
|
||||||
|
<POST.PROCESS/>
|
||||||
|
</sequential>
|
||||||
|
</OnDependency>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
EFI_SECTION_FIRMWARE_VOLUME_IMAGE
|
EFI_SECTION_FIRMWARE_VOLUME_IMAGE
|
||||||
-->
|
-->
|
||||||
|
|
|
@ -379,7 +379,7 @@ public class FfsProcess {
|
||||||
if (fileName == null) {
|
if (fileName == null) {
|
||||||
ele.setAttribute("file", "${DEST_DIR_OUTPUT}" + File.separatorChar + basename + getSectionExt(type));
|
ele.setAttribute("file", "${DEST_DIR_OUTPUT}" + File.separatorChar + basename + getSectionExt(type));
|
||||||
} else {
|
} else {
|
||||||
ele.setAttribute("file", "${PLATFORM_DIR}" + File.separatorChar + fileName);
|
ele.setAttribute("file", fileName);
|
||||||
}
|
}
|
||||||
root.appendChild(ele);
|
root.appendChild(ele);
|
||||||
} else {
|
} else {
|
||||||
|
@ -390,7 +390,7 @@ public class FfsProcess {
|
||||||
if (fileName == null) {
|
if (fileName == null) {
|
||||||
ele.setAttribute("fileName", "${DEST_DIR_OUTPUT}" + File.separatorChar + basename + getSectionExt(type));
|
ele.setAttribute("fileName", "${DEST_DIR_OUTPUT}" + File.separatorChar + basename + getSectionExt(type));
|
||||||
} else {
|
} else {
|
||||||
ele.setAttribute("fileName", "${PLATFORM_DIR}" + File.separatorChar + fileName);
|
ele.setAttribute("fileName", fileName);
|
||||||
}
|
}
|
||||||
root.appendChild(ele);
|
root.appendChild(ele);
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,9 +77,9 @@ public class FrameworkBuildTask extends Task{
|
||||||
|
|
||||||
private Set<File> msaFiles = new LinkedHashSet<File>();
|
private Set<File> msaFiles = new LinkedHashSet<File>();
|
||||||
|
|
||||||
//
|
///
|
||||||
// This is only for none-multi-thread build to reduce overriding message
|
/// This is only for none-multi-thread build to reduce overriding message
|
||||||
//
|
///
|
||||||
public static Hashtable<String, String> originalProperties = new Hashtable<String, String>();
|
public static Hashtable<String, String> originalProperties = new Hashtable<String, String>();
|
||||||
|
|
||||||
String toolsDefFilename = ToolDefinitions.DEFAULT_TOOLS_DEF_FILE_PATH;
|
String toolsDefFilename = ToolDefinitions.DEFAULT_TOOLS_DEF_FILE_PATH;
|
||||||
|
|
|
@ -465,7 +465,11 @@ public class ModuleBuildFileGenerator {
|
||||||
String[] list = fp.getGenSectionElements(document, "${BASE_NAME}", fpdModuleId.getModule().getGuid(), targetFilename);
|
String[] list = fp.getGenSectionElements(document, "${BASE_NAME}", fpdModuleId.getModule().getGuid(), targetFilename);
|
||||||
|
|
||||||
for (int i = 0; i < list.length; i++) {
|
for (int i = 0; i < list.length; i++) {
|
||||||
Element ele = document.createElement(list[i]);
|
String sectiontype = list[i];
|
||||||
|
if (sectiontype.equalsIgnoreCase("EFI_SECTION_RAW") && project.getProperty("MODULE_TYPE").equalsIgnoreCase("SEC")) {
|
||||||
|
sectiontype += "_SEC";
|
||||||
|
}
|
||||||
|
Element ele = document.createElement(sectiontype);
|
||||||
ele.setAttribute("FILEPATH", ".");
|
ele.setAttribute("FILEPATH", ".");
|
||||||
ele.setAttribute("FILENAME", "${BASE_NAME}");
|
ele.setAttribute("FILENAME", "${BASE_NAME}");
|
||||||
root.appendChild(ele);
|
root.appendChild(ele);
|
||||||
|
|
|
@ -337,10 +337,10 @@ public class FpdParserTask extends Task {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is used for Single Module Build.
|
This method is used for Single Module Build.
|
||||||
|
|
||||||
|
|
||||||
@throws BuildException
|
@throws BuildException
|
||||||
FPD file is not valid.
|
FPD file is not valid.
|
||||||
**/
|
**/
|
||||||
|
|
Loading…
Reference in New Issue