diff options
author | wuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-18 02:38:01 +0000 |
---|---|---|
committer | wuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-18 02:38:01 +0000 |
commit | 706c2ad4ba7110e8a427dbfa4c99a0d56065a726 (patch) | |
tree | b620af3a70e8729bf29f9652b1b2f887102ebf46 | |
parent | 641cd03cea3267e081a0fe83131c325e78348da5 (diff) | |
download | edk2-platforms-706c2ad4ba7110e8a427dbfa4c99a0d56065a726.tar.xz |
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
6 files changed, 70 insertions, 8 deletions
diff --git a/EdkModulePkg/EdkModulePkg.fpd b/EdkModulePkg/EdkModulePkg.fpd index e847ed10dd..5529116824 100644 --- a/EdkModulePkg/EdkModulePkg.fpd +++ b/EdkModulePkg/EdkModulePkg.fpd @@ -17921,7 +17921,7 @@ <Section SectionType="EFI_SECTION_RAW">
<!--add 12 bytes blank.pad file-->
<Filenames>
- <Filename>Blank.pad</Filename>
+ <Filename>${PLATFORM_DIR}/Blank.pad</Filename>
</Filenames>
</Section>
<Section SectionType="EFI_SECTION_PE32"/>
diff --git a/Tools/Conf/BuildMacro.xml b/Tools/Conf/BuildMacro.xml index 8e7ef78025..621ec609cb 100644 --- a/Tools/Conf/BuildMacro.xml +++ b/Tools/Conf/BuildMacro.xml @@ -739,6 +739,29 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. </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
-->
<macrodef name="Build_DUMMY">
@@ -1125,6 +1148,41 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. </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
-->
<macrodef name="EFI_SECTION_FIRMWARE_VOLUME_IMAGE">
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/FfsProcess.java b/Tools/Java/Source/GenBuild/org/tianocore/build/FfsProcess.java index 26b9390901..baa9eab9a5 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/FfsProcess.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/FfsProcess.java @@ -379,7 +379,7 @@ public class FfsProcess { if (fileName == null) {
ele.setAttribute("file", "${DEST_DIR_OUTPUT}" + File.separatorChar + basename + getSectionExt(type));
} else {
- ele.setAttribute("file", "${PLATFORM_DIR}" + File.separatorChar + fileName);
+ ele.setAttribute("file", fileName);
}
root.appendChild(ele);
} else {
@@ -390,7 +390,7 @@ public class FfsProcess { if (fileName == null) {
ele.setAttribute("fileName", "${DEST_DIR_OUTPUT}" + File.separatorChar + basename + getSectionExt(type));
} else {
- ele.setAttribute("fileName", "${PLATFORM_DIR}" + File.separatorChar + fileName);
+ ele.setAttribute("fileName", fileName);
}
root.appendChild(ele);
}
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java b/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java index 4ba6ec4c6a..3d17befe19 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java @@ -77,9 +77,9 @@ public class FrameworkBuildTask extends Task{ 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>();
String toolsDefFilename = ToolDefinitions.DEFAULT_TOOLS_DEF_FILE_PATH;
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java b/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java index a38c3c69d1..da6847d9da 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java @@ -465,7 +465,11 @@ public class ModuleBuildFileGenerator { String[] list = fp.getGenSectionElements(document, "${BASE_NAME}", fpdModuleId.getModule().getGuid(), targetFilename);
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("FILENAME", "${BASE_NAME}");
root.appendChild(ele);
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java b/Tools/Java/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java index 86fb256e95..d45abcdcd8 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java @@ -337,10 +337,10 @@ public class FpdParserTask extends Task { }
}
}
+
/**
This method is used for Single Module Build.
-
@throws BuildException
FPD file is not valid.
**/
|