Jordan:
  Yes if NASM_PREFIX or IASL_PREFIX could be auto set. 

  OK. I got it. I have no other comments.  Reviewed-by: Gao, Liming 
<liming....@intel.com>

Thanks
Liming
-----Original Message-----
From: Jordan Justen [mailto:jljus...@gmail.com] 
Sent: Monday, August 04, 2014 2:53 PM
To: edk2-devel@lists.sourceforge.net; Gao, Liming
Subject: Re: [edk2] [PATCH] BaseTools: Add rules to build NASM source file into 
a binary

On 2014-08-03 20:31:04, Gao, Liming wrote:
> Thanks for your update. I agree to use NASM_PREFIX more simple. And, 
> we may update edksetup.bat and edksetup.sh to set NASM_PREFIX default 
> value for windows and linux if it is not set. For windows, its default 
> path can be C:\nasm\

Yeah, I had thought about that. Windows developers could also add NASM into 
their default path, or perhaps add a nasm.cmd script into their default path 
that runs NASM in another path.

Another idea I had is that BaseTools (build) might be able to set these 
variables dynamically within python code if they are not set.

Actually, I was thinking perhaps we should investigate something similar for 
setting a MSVC_X86_SUFFIX environment variable. Perhaps we could set this to " 
(x86)" dynamically to remove the need for all the 'x86' toolchains? Updating 
tools_def for setting flags on a new tool
(NASM) was quite frustrating when every generation of VC has 4 different 
version. (plain, xASL, x86 & x86xASL)

> But, for IASL, I still to suggest keep it as current style for 
> compatibility.

Maybe if we develop something dynamic for NASM_PREFIX, then we can use the same 
thing to default IASL_PREFIX to C:\ASL?

> For your rest of series, I just want to confirm why 
> ResetVector/Vtf0/Build.py is still required. Is it for compatibility 
> or other reasons? Could user configure the additional build flags to 
> Vtf0.inf to create the different VTF0 binary file?

I kept that around to allow for building of the binaries outside of the EDK II 
build process. You mentioned in review of v1 that we should keep the binaries 
around for a while.

-Jordan

> -----Original Message-----
> From: Justen, Jordan L
> Sent: Monday, August 04, 2014 3:59 AM
> To: edk2-devel@lists.sourceforge.net; Gao, Liming
> Cc: Justen, Jordan L
> Subject: [PATCH] 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 <jordan.l.jus...@intel.com>
> ---
> 
> Liming,
> 
> Does this version cover your 3 recommendations?
> 
> I thought we should use an environment variable for the PREFIX path, 
> like IASL does for UNIX. This would allow NASM_PATH to be specified 
> just once in the tools_def, rather than once for each toolchain. 
> (Maybe we should change IASL to do the same thing?)
> 
> Regarding this updated patch, and the rest of series, let me know if I can 
> add your Reviewed-by signature.
> 
> Thanks,
> 
> -Jordan
> 
>  BaseTools/Conf/build_rule.template | 16 ++++++++++++++++  
> BaseTools/Conf/tools_def.template  | 16 ++++++++++++++++
>  2 files changed, 32 insertions(+)
> 
> diff --git a/BaseTools/Conf/build_rule.template 
> b/BaseTools/Conf/build_rule.template
> index c1c0d4c..55f56c2 100644
> --- a/BaseTools/Conf/build_rule.template
> +++ b/BaseTools/Conf/build_rule.template
> @@ -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 diff --git 
> a/BaseTools/Conf/tools_def.template 
> b/BaseTools/Conf/tools_def.template
> index 897d137..b032393 100644
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -668,6 +668,15 @@ DEFINE SOURCERY_CYGWIN_TOOLS = 
> /cygdrive/c/Program Files/CodeSourcery/Sourcery G  
> ######################################################################
> ##############  
> ######################################################################
> ##############
>  #
> +# 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)  #  
> ######################################################################
> ############## @@ -6544,3 +6553,10 @@ 
> RELEASE_ARMLINUXGCC_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) 
> DEF(GCC  ##################
>  *_*_*_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
> --
> 2.0.1
> 
> 
> ----------------------------------------------------------------------
> --------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls. 
> Build a bridge from your legacy apps to the future.
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.
> clktrk _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to