Revision: 15820
          http://sourceforge.net/p/edk2/code/15820
Author:   jljusten
Date:     2014-08-18 23:03:17 +0000 (Mon, 18 Aug 2014)
Log Message:
-----------
BaseTools: Add rules to build NASM source file into a binary

v2:
 * Use EDK II tool name of NASMB rather than NASMBIN
 * Use EDK II extension of .nasmb rather than .nasmbin
v3:
 * Create listing file
 * Don't change into source directory
 * Add ENV(NASM_PREFIX) before nasm for NASM_PATH

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Reviewed-by: Liming Gao <[email protected]>

Modified Paths:
--------------
    trunk/edk2/BaseTools/Conf/build_rule.template
    trunk/edk2/BaseTools/Conf/tools_def.template

Modified: trunk/edk2/BaseTools/Conf/build_rule.template
===================================================================
--- trunk/edk2/BaseTools/Conf/build_rule.template       2014-08-18 23:00:50 UTC 
(rev 15819)
+++ trunk/edk2/BaseTools/Conf/build_rule.template       2014-08-18 23:03:17 UTC 
(rev 15820)
@@ -440,6 +440,22 @@
       otool -t $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib | hex2bin.py ${dst}
       
 
+[Nasm-to-Binary-Code-File]
+    <InputFile>
+        ?.nasmb, ?.NASMB
+
+    <ExtraDependency>
+        $(MAKE_FILE)
+
+    <OutputFile>
+        $(OUTPUT_DIR)(+)${s_base}.bin
+
+    <Command>
+        "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
+        Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii 
${d_path}(+)${s_base}.i
+        "$(NASM)" -I${s_path}(+) -l ${d_path}(+)${s_base}.lst $(NASMB_FLAGS) 
-o $dst ${d_path}(+)${s_base}.iii
+
+
 [Microcode-File.USER_DEFINED, Microcode-File.Microcode]
     <InputFile>
         ?.txt, ?.TXT, ?.Txt, ?.mut, ?.inc

Modified: trunk/edk2/BaseTools/Conf/tools_def.template
===================================================================
--- trunk/edk2/BaseTools/Conf/tools_def.template        2014-08-18 23:00:50 UTC 
(rev 15819)
+++ trunk/edk2/BaseTools/Conf/tools_def.template        2014-08-18 23:03:17 UTC 
(rev 15820)
@@ -668,6 +668,15 @@
 
####################################################################################
 
####################################################################################
 #
+# Other Supported Tools
+# =====================
+#   NASM                 2.0.3   http://www.nasm.us/
+#                        Note: Converts NASM source to .bin. Object linking to
+#                              EDK II driver modules is not currently 
supported.
+#
+####################################################################################
+####################################################################################
+#
 # Intel EFI Byte Code Compiler (Template)
 #
 
####################################################################################
@@ -6571,3 +6580,9 @@
 *_*_*_VPDTOOL_PATH         = BPDG
 *_*_*_VPDTOOL_GUID         = 8C3D856A-9BE6-468E-850A-24F7A8D38E08
 
+##################
+# NASM tool definitions
+##################
+*_*_*_NASM_PATH                = ENV(NASM_PREFIX)nasm
+# NASMB uses NASM produce a .bin from a .nasmb NASM source file
+*_*_*_NASMB_FLAGS              = -f bin

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to