Commit Graph

421 Commits

Author SHA1 Message Date
Ard Biesheuvel f49513f666 BaseTools/tools_def: switch GCC/X64 to the PIE small model
The ordinary small code model for x86_64 cannot be used in UEFI, since
it assumes the executable is loaded in the first 2 GB of memory.
Therefore, we use the large model instead, which can execute anywhere,
but uses absolute 64-bit wide quantities for all symbol references,
which is costly in terms of code size.

So switch to the PIE small code model, this uses 32-bit relative
references where possible, but does not make any assumptions about the
load address (i.e., all absolute symbol references are 64-bits wide).
Note that, due to the 'protected' visibility pragma introduced in an
earlier patch, there is no need for the EDK2 build system to deal with
GOT related ELF relocation types.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-By: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-07-21 13:32:09 +02:00
Ard Biesheuvel 247093f45d BaseTools/tools_def: enable Os optimization for GCC X64 builds
Now that we switched to the __builtin_ms_va_list VA_LIST type for
GCC/X64, we can trust the compiler to do the right thing even under
optimization, and so we can enable -Os optimization all the way back
to GCC44, and drop the -D define that prevents the use of the __builtin
VA_LIST types. Note that this requires the -maccumulate-outgoing-args
switch as well.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-By: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-07-21 13:32:09 +02:00
Laszlo Ersek 9c4dbdff1d BaseTools/tools_def.template: bump minimum required NASM versions
NASM had been unable to assemble segment register operations before the
following git commit:

  http://repo.or.cz/nasm.git/commitdiff/21d4ccc3c338

That commit was first released in NASM 2.10:

  http://repo.or.cz/nasm.git/commitdiff/ff62f33da0a2

This makes NASM 2.07 unusable for edk2 in general, because now we have a
lot of X64 assembly code that works with segment registers. For example
in:

  UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm

Bump the minimum required version to 2.10, for use with GCC toolchains.

Furthermore, list NASM 2.12.01 as a requirement for all other toolchains.
In particular, for source level debugging, VS20xx requires CodeView 8
debug symbols, and only NASM 2.12.01 and later produce those. (Suggested
by Liming, Mike, and Andrew.)

Cc: Andrew Fish <afish@apple.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Ref: http://thread.gmane.org/gmane.comp.bios.edk2.devel/14612
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-07-18 19:22:58 +02:00
Leif Lindholm 3f7f287178 BaseTools: use unsigned chars on ARM architectures
By default, the ARM architectures have unsigned chars, whereas the other
architectures supported by EDK2 by default have signed chars.
However, EDK2 uses -funsigned-chars on those architectures to change the
default behaviour.

Unfortunately, the ARM architectures explicitly break their default
behaviour by specifying -fsigned-chars (I presume in a pre-emptive
attempt at avoiding incompatibility).

Since this situation is already confusing enough, switch the ARM
architectures to also specify -funsigned-chars explicitly rather than
just dropping the current parameter.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-12 13:19:38 +08:00
Cinnamon Shia 716132efb1 BaseTools: Remove /Oi from Visual Studio tool chains.
Remove /Oi from Visual Studio tool chains. because of the following reasons:
1. Intrinsic is Compiler-dependent.
2. Adding /Oi (Generate Intrinsic Functions) doesn't promise 100% replacing
   the function call with inline functions.
   /Oi is only a request, but doesn't force, the compilers to use the intrinsic.
   The visual studio optimizer can still use the library version.
3. Since EDK2 doesn't include Visual Studio header files, intrinsic function
   should not be used.

Built Nt32Pkg, OvmfPkg, ShellPkg, MdeModulePkg and CryptoPkg successfully.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
2016-04-08 11:23:27 +08:00
Ard Biesheuvel f37d891c1b BaseTools AARCH64: move DEBUG GCC49 to the small code model
When building AARCH64 platforms that include a Shell binary built from
source, we run into trouble when using the tiny code model for DEBUG
builds. The reason is that the Shell binary built in DEBUG mode exceeds
the 1 MB range of the ADR instruction, so anything that gets pulled into
the final link of the Shell binary either needs to be built with the small
or large model, or needs to be sorted in some way to put the ADR references
close to their targets.

Since code size is not a big concern for DEBUG builds anyway, let's move
to the small code model for all modules when using DEBUG GCC49. This way,
there is no need for workarounds that are specific to UEFI_APPLICATION
modules in general, or the Shell application in particular.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-03-25 12:37:47 +01:00
Ard Biesheuvel 20d00edf21 BaseTools/GCC: set -Wno-unused-but-set-variables only on RELEASE builds
This aligns the GCC definitions for 4.6 and up to align with the ARM and
AARCH64 definitions, which is to ignore unused but set variables only on
RELEASE builds. This allows us to find instances of unused variables that
are left behind after refactoring. It also allows us to find bad new code,
which, due to the EDK2 coding style which disallows initialized automatic
variables, may contain such variables without having been noticed by other
toolchains.

(Slightly edited) observation from Jordan Justen
<jordan.l.justen@intel.com>: RELEASE builds must keep the flag because
debug code (such as assertions) may collapse to nothing -- e.g. if a
platform defines MDEPKG_NDEBUG for RELEASE -- and therefore trigger the
warning.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
[lersek@redhat.com: incorporate commit message update from Jordan]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2016-03-25 10:53:02 +01:00
Michael Kinney c261c27dce BaseTools/tools_def.txt: Add -march=i586 for IA32 GCC targets
Newer GCC compilers use a default of march higher than i586
for -m32 (IA32 configuration) and this is causing generation of
instructions that are not compatible with all IA32 targets.
Specically Galileo platform support in the QuarkPlatformPkg does
not boot if GCC48 or higher is used.

This is similar to the following checkin that was done to address
this same issue for VS2012 and higher tool chains:

SHA-1: 71028ba2c4

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Leroy Leahy <leroy.p.leahy@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-02-24 20:28:07 -08:00
Larry Hauch cbf14fa084 BaseTools/Conf/XMLSchema: Reformat XML using Visual Studio 2013
There are no functional changes in this patch.
The only change is to the XML format, updated using Visual Studio
Edit->Advanced->Format Document.

Different XML Schema editors use different formats for indentation and
line breaks. Visual Studio 2013 uses a two space indentation for content.

Cc: Zhu Yonghong <yonghong.zhu@intel.com>

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Larry Hauch <larry.hauch@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-02-19 09:44:32 +08:00
Ard Biesheuvel d764d59849 BaseTools AARCH64: build XIP modules with strict alignment
GCC for AARCH64 recognizes byte swapping load and store sequences
and may replace them with wider loads or stores combined with rev
instructions. In some cases (i.e., with GCC version 5 and later)
this may result in unaligned accesses, which are not allowed before
we turn the MMU on.

So build any modules or static libraries that may execute with the MMU
off with -mstrict-align. Other modules don't need this switch, so we
can remove it from the CLANG35/AARCH64 common CC flags.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19638 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-11 08:50:49 +00:00
Ard Biesheuvel 3a02a87f9f BaseTools AARCH64: add separate GCC build rule for XIP objects
This introduces a special .c to .obj build rule for GCC/AARCH64 that
takes into account additional compiler flags that have been specified
via *_*_*_CC_XIPFLAGS. These will be passed after (and in addition to)
the ordinary CC_FLAGS.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19637 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-11 08:50:39 +00:00
Ard Biesheuvel c2a892d7c8 BaseTools CLANG35: use -target in PP flags as well
The Clang preprocessor may rely on builtin defines that are target
dependent, so we should add the -target argument also when invoking
the preprocessor directly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19584 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-04 09:31:42 +00:00
Ard Biesheuvel d4dcd5542a BaseTools CLANG35: use linux-gnu target triplets explicitly
Since we are combining Clang with the GNU linker, make that explicit in
the target triplet. This affects certain builtin defines and other compiler
behavior that may be unspecified otherwise.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19583 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-04 09:31:33 +00:00
Ard Biesheuvel b9f7890c47 BaseTools ARM: add CLANG35 support
This extends the existing CLANG35 toolchain definition with support for
building for the ARM architecture. In order to be able to reuse the existing
ARM GCC definitions as much as possible, the following changes have been
made to the existing ARM GCC support:
- the -mapcs option has been removed; it is a no-op under Thumb (our default)
  and we use AAPCS (-mabi=aapcs) anyway
- the -mword-relocations option has been moved from GCC_ARM_CC_FLAGS to
  the GCC4x specific option: CLANG does not support it, and uses '-mllvm
  -marm-use-movt=0' instead.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19284 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15 15:02:24 +00:00
Ard Biesheuvel b12ef6b964 BaseTools RVCT: use scatter file to enforce minimum section alignment
Up until SVN r18540, GenFw created invalid PE/COFF binaries for the ARM
architecture, by allowing PE/COFF .data sections to appear at offsets
that were not aligned to the global PE/COFF section alignment. The
reason for this was that the relocation metadata emitted by RVCT's
armlink only contains dynamic absolute relocations, so it is impossible
to recalculate relative relocations between .text and .data, and so the
relative offset between the two needs to be preserved.

Since r18540, we do align .data to the PE/COFF section alignment,
resulting in potentially corrupt PE/COFF binaries unless .data happens
to appear at a 32-byte aligned offset. So let's introduce a RVCT scatter
file that sets this alignment for the ELF .data section (and subsequent
.bss section).

At the same time, set the start offset to 0x220 bytes (which is the size
of our 32-bit PE/COFF header) so that the memory layouts are identical
between ELF and PE/COFF. Also add a 4 KB aligned version that can be
used to build DXE_RUNTIME_DRIVER modules with runtime memory protection
enabled.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19235 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-14 07:55:46 +00:00
Ard Biesheuvel 214a3b7941 BaseTools GCC: avoid the use of COMMON symbols
The default behavior of the GCC compiler is to emit uninitialized globals
with external linkage into a COMMON section, where duplicate definitions
are merged. This may result in unexpected behavior, since global variables
defined under the same name in different C files may not refer to the same
logical data item.

For instance, the definitions of EFI_EVENT mVirtualAddressChangeEvent that
[used to] appear in the following files:

  CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c
  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c

will be folded into a single instance of the variable when the latter
module includes the former library, which can lead to unexpected results.

Even if some may argue that there are legal uses for COMMON allocation, the
high modularity of EDK2 combined with the low level of awareness of the
intracicies surrounding common allocation and the generally poor EDK2
developer discipline regarding the use of the STATIC keyword* make a strong
case for disabling it by default, and re-enabling it explicitly for packages
that depend on it.

So prevent GCC from emitting variables into the COMMON section, by passing
-fno-common to the compiler, and discarding the section in the GNU ld linker
script.

* Any function or variable that is only referenced from the translation unit
  that defines it could be made STATIC. This does not only prevent issues
  like the above, it also allows the compiler to generate better code, e.g.,
  drop out of line function definitions after inlining all invocations or
  perform constant propagation on variables.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19164 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-08 07:40:12 +00:00
Wang Yu 5d9cd24ede BaseTools: Add VS2015 tool chain in tools_def.template
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wang Yu <yu.wang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19101 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-03 03:19:01 +00:00
Eugene Cohen 8e18fbd70d BaseTools RVCT: add preprocessor preinclude for AutoGen.h
Ensure that AutoGen.h is force-included when the RVCT preprocessor
is invoked.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19097 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-02 16:11:33 +00:00
Ard Biesheuvel 67b3c0f958 BaseTools GCC: move PECOFF_HEADER_SIZE definition before LD script
Older versions of binutils need all symbols to be defined when consuming
the linker script passed via the command line. So move the definition
'--defsym=PECOFF_HEADER_SIZE=...' before the '--script=...' command line
argument.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18747 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-09 08:39:28 +00:00
Ard Biesheuvel 63e1c23b22 BaseTools/AARCH64: use large code model for GCC <= 4.8
As it turns out, upstream GCC only supports the AArch64 'tiny' code
model as of version 4.9. Since the default 'small' code model requires
4 KB section alignment (which is undesirable for the XIP modules),
revert GCC 4.7 and 4.8 to using the 'large' code model instead.

Reported-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18569 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-02 14:48:30 +00:00
Ard Biesheuvel 64a63d6942 BaseTools/ARM: move to unified GCC linker script
Instead of using the ARM builtin linker script for GNU ld, use the
new unified one instead. This will allow us to increase the section
alignment for DXE_RUNTIME_MODULEs, which is a prerequisite for
enabling the UEFIv2.5 Properties Table memory protection feature.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18565 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-01 14:01:07 +00:00
Ard Biesheuvel 0bd0d6dff6 BaseTools/GenFw: disable RVCT linker size optimization
Disable the RVCT size optimization that may put sections at an offset
that is not aligned to their own alignment, by adding the --no_legacyalign
switch to the RVCT linker command line. This is necessary since such sections
cannot be correctly converted into PE/COFF sections without padding them at
the front, which defeats the purpose of the optimization anyway.

With the optimization gone, we can also remove the special case for ARM in
GenFw that could result in corrupt PE/COFF images to be emitted. Instead,
sections whose base address is not aligned correctly are outright rejected.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18540 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-24 19:35:16 +00:00
Ard Biesheuvel 06cd723125 BaseTools AARCH64: use tiny code model by default
The AARCH64 tiny code model produces more efficient code, since it
uses relative symbol references rather than absolute references, i.e.,
an emitted relative reference refers to the symbol directly rather
than a literal containing its 64-bit absolute address. This saves
space in the binary, and reduces the number of relocation fixups that
need to be applied by the PE/COFF loader.

So now that we support relative relocations in GenFw, move to the
tiny code model by default. Note that the large model can still be
selected by individual modules by adding -mcmodel=large to the
appropriate CC_FLAGS.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18242 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-20 06:39:12 +00:00
Liming Gao 71028ba2c4 BaseTools: Add /arch:IA32 option in VS2012 and VS2013
VS2012 and VS2013 turn on optimizations by default that generate the
use of CMOV instruction. This is a change from previous version VS2008.
This means when you build with VS2012 or VS2013, it will generate UD
exceptions on Quark.

To resolve it, add /arch:IA32 options to not use enhanced instructions.
https://msdn.microsoft.com/en-us/library/7t5yh4fd(v=vs.140).aspx

Update the default options of VS2012 & VS2013 tool chain IA32 arch in
BaseTools\Conf\tools_def.template to make sure the generated Quark
compatibility driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18230 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-18 02:52:32 +00:00
Ard Biesheuvel 70bd69912a BaseTools GCC: prevent unaligned memory accesses on ARM GCC 4.6
In GCC 4.7, a feature was added to the ARM backend that allows
unaligned loads and stores to be emitted. Since it is enabled by
default on ARMv6 and later CPUs, and since such code is not suitable
in our case (i.e., bare metal code), we must disable it by passing the
-mno-unaligned-access option if we are using GCC 4.7 or later.

However, this particular feature and its enabling by default have been
backported to version 4.6 by Linaro. Since the Linaro toolchains are
widely used for ARM development, and also shipped by distros such as
Ubuntu, we should disable the feature on version 4.6 as well.
Unfortunately, since the upstream version does not support the feature,
it also does not understand the -mno-unaligned-access option.

Since GCC sets the builtin #define __ARM_FEATURE_UNALIGNED to 1 when
-munaligned-access is in effect, we can force the build to fail in this
case by passing -D__ARM_FEATURE_UNALIGNED=0 on the GCC command line.

This will produce the following error message:

  <command-line>:0:0: error: "__ARM_FEATURE_UNALIGNED" redefined [-Werror]
  <built-in>:0:0: note: this is the location of the previous definition

and terminate the build.

This patch may cause some existing builds to fail, but they will be
builds that were previously at risk of unexpected runtime exceptions.
Those builds can also easily be switched to the GCC47 profile instead,
generating safe binaries.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18228 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-17 12:02:50 +00:00
Ard Biesheuvel 26ecc55c02 BaseTools IA32/X64: prevent .eh_frame sections from being generated
After the recent GNU linker script changes, the following warning is
emitted many times during the OVMF build:

BFD: <...>: warning: Empty loadable segment detected, is this intentional ?

This is caused by the fact that, now that the section layout has changed
somewhat, the .eh_frame section is assigned an ELF segment of its own,
which ends up with no contents at all after we strip the .eh_frame
section from the output. (Note that the program headers that contain the
segment information are completely irrelevant to us since the PE/COFF
conversion does not rely on them.)

Since we only retain the .eh_frame data for external debugging, and not
for things like stack unwinding or generating backtraces at runtime, we
can remedy the situation by passing -fno-asynchronous-unwind-tables on
the GCC command line. This option instructs the compiler to emit the
unwind data into a debug section called .debug_frame instead of into
.eh_frame.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Build-tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18217 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-13 06:02:00 +00:00
Ard Biesheuvel 64ffb95441 BaseTools: remove ARMGCC and ARMLINUXGCC toolchains
The ARMGCC and ARMLINUXGCC toolchains are specific to the ARM and
AARCH64 architectures, and overlap with the toolchain configuration
that is provided by the GCC44 - GCC49 toolchains, which are defined
for all architectures.

To reduce the maintenance burden, and make it easier to keep these
different architectures aligned, remove the ARMGCC and ARMLINUXGCC
toolchains entirely.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18212 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-12 05:25:48 +00:00
Ard Biesheuvel 5c02fc49ae BaseTools: add CLANG35 toolchain with AARCH64 support
This adds support for building the AARCH64 platforms using the
Clang compiler and assembler combined with the GNU (cross-)linker.

The chosen name CLANG35 is based on version 3.5 being the oldest
supported version, but no issues are known that should prevent its
use with any later version.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18198 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-10 07:55:26 +00:00
Yingke Liu 55668ca245 BaseTools/Trim: Fixed a bug that cannot trim long values
The long value substitution must move to the front of
HEX substitution, and updated build_rule to add --trim-long

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18170 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-06 08:05:59 +00:00
Ard Biesheuvel c4a59af8c1 BaseTools IA32/X64: Use GccBase.lds instead of gcc*-ld-script
These scripts all now have the same contents, so we only need to use
GccBase.lds. Therefore we can delete gcc-4K-align-ld-script,
gcc4.4-ld-script and gcc4.9-ld-script.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18142 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-03 08:23:59 +00:00
Ard Biesheuvel 6b3720e438 BaseTools AARCH64: move to unified GCC linker script
Drop the GCC AARCH64 specific linker script and use the new
unified one instead.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18138 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-03 08:23:05 +00:00
Ard Biesheuvel c28a4ab663 BaseTools IA32/X64: get header size and alignment from ld commandline
Instead of hardcoding the values for the PE/COFF header size and the
section alignment, set them on the linker command line. This factors
out these values from the various linker scripts, which will allow us
to unify them in a subsequent patch.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18134 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-03 08:22:16 +00:00
Leif Lindholm 28e80befa4 BaseTools: aarch64: add -fno-asynchronous-unwind-tables to gcc cflags
Some toolchains, at least Fedora GCC, generate inline unwind tables in
object files. These confuses GenFw to no end, leading to build failures:
  GenFw: ERROR 3000: Invalid WriteSections64(): ...
         unsupported ELF EM_AARCH64 relocation 0x105.
  GenFw: ERROR 3000: Invalid WriteSections64(): ...
         unsupported ELF EM_AARCH64 relocation 0x0.

I am aware of no current use of these tables, so explicitly disable
their generation for aarch64.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Wei Huang <wei@redhat.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17905 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-09 16:29:44 +00:00
Ard Biesheuvel 64a910f3da BaseTools: AArch64: use explicit linker scripts
Instead of relying on the builtin linker script of GNU ld, which
may vary based on binutils version (which is not tightly coupled to
the GCC version) and linker command line options, introduce a linker
script for AArch64 to be used by all GCC/binutils versions.

The script is laid out such that two ELF sections .text and .data are
created that map onto the PE/COFF with the same names. By aligning
.data to the minimum alignment of .text, and by not adding any
additional padding -which is what LD's builtin linker script does- the
relative offset between .text and .data is retained after the PE/COFF
conversion. This should prevent problems with debuggers and other
tooling that are ELF based.

Also provided is an overlay linker script that increases the alignment
of .text and .data to 64 KB. This is intended for DXE_RUNTIME_DRIVER
modules, to make them compatible with the newly introduced
Properties Table feature.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Olivier Martin <Olivier.Martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17824 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-06 15:57:50 +00:00
Jordan Justen 288ed59079 Revert tree to r17801
Revert r17802 "BaseTools: AArch64: use explicit linker scripts"
Revert r17803 "ArmVirtPkg: build runtime drivers with 64 KB section alignment"
Revert r17804 "IntelFrameworkModulePkg: AcpiS3SaveDxe: prepare for End-of-Dxe callback"
Revert r17805 "IntelFrameworkModulePkg: AcpiS3SaveDxe: call S3Ready() at End-of-Dxe"
Revert r17806 "OvmfPkg: AcpiS3SaveDxe: prepare for End-of-Dxe callback"

Requested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17807 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02 07:23:33 +00:00
Ard Biesheuvel f0dbe9fa0a BaseTools: AArch64: use explicit linker scripts
Instead of relying on the builtin linker script of GNU ld, which
may vary based on binutils version (which is not tightly coupled to
the GCC version) and linker command line options, introduce a linker
script for AArch64 to be used by all GCC/binutils versions.

The script is laid out such that two ELF sections .text and .data are
created that map onto the PE/COFF with the same names. By aligning
.data to the minimum alignment of .text, and by not adding any
additional padding -which is what LD's builtin linker script does- the
relative offset between .text and .data is retained after the PE/COFF
conversion. This should prevent problems with debuggers and other
tooling that are ELF based.

Also provided is an overlay linker script that increases the alignment
of .text and .data to 64 KB. This is intended for DXE_RUNTIME_DRIVER
modules, to make them compatible with the newly introduced
Properties Table feature.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17802 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02 06:36:00 +00:00
Yingke Liu bbb6369486 BaseTools: Updated tool_def to support 4K alignment.
Replace '/MERGE:.data=.text /MERGE:.rdata=.text' with /MERGE:.rdata=.data

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17726 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-29 03:14:33 +00:00
Yingke Liu 061eb5c31d BaseTools: Update IASL download link and remove specific version info.
The version of IASL compiler in the tools_def.template file no longer exists on the acpica.org site.
Update download link and remove the specific version info from the tools_def.template file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17725 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-29 03:10:25 +00:00
Yingke Liu 867d1cd4cd BaseTools: Append FILE_GUID to BaseName.
This patch makes sure the EFI file in $(BIN_DIR) is unique. If there are modules with same BaseName, the FILE_GUID is appended.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17608 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-10 07:50:59 +00:00
Liming Gao 49b0a79388 BaseTools: Update BuildRule for *.nasmb
*.nasmb is place of *.asm16. To keep the same output file, copy the output
file with .com postfix.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17580 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-08 09:44:57 +00:00
Jordan Justen c85bc0c9d4 BaseTools/Conf: Don't support upper case nasm extensions
For *.asm and *.s, there have been cases of *.Asm and *.S files, but
since the nasm extensions are new, we don't need to support the upper
case extensions.

In other words, remove .Nasm and .NASM.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17544 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-01 23:21:00 +00:00
Yingke Liu ec22bede67 BaseTools: Add default BuildRuleOrder in tools_def.template
*_*_*_*_BUILDRULEORDER = nasm Nasm NASM asm Asm ASM S s
*_XCODE32_*_*_BUILDRULEORDER    = S s nasm Nasm NASM
*_XCLANG_*_*_BUILDRULEORDER     = S s nasm Nasm NASM
*_XCODE5_*_*_BUILDRULEORDER     = S s nasm Nasm NASM

Tool Chain in Mac Os will use S as the first priority. Other tool chains
use nasm as the first priority.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17510 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-26 10:32:47 +00:00
Cinnamon Shia ca04b83afb NT32Pkg: Fix build errors from building secure boot with NT32 X64
Root cause: The CryptoPkg\Library\IntrinsicLib needs override MSFT build option to remove /Oi and /GL, 
but it doesn’t work because of the build option override in Nt32Pkg.dsc.
Solution: Remove /X in BaseTools/Conf/tools_def.template

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hp.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17069 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-23 05:39:51 +00:00
Liming Gao c5f1d437ed BaseTools Fix NASM tool version in comments of tools_def.template
NASM tool version should be 2.07 instead of 2.0.7.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16596 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-09 10:07:02 +00:00
Scott Duplichan 62771cee1d Fix ARM build failure with gcc 4.6.
Gcc option -mno-unaligned-access is supported by gcc 4.7 and newer, so it shouldn't be used with gcc 4.6.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16464 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-02 00:44:04 +00:00
Scott Duplichan 915a379b1c BaseTools: Extend support for Windows hosted gcc to versions 4.4-4.7.
Revision 16400 adds support for Windows hosted gcc versions 4.8 and 4.9.
With this change, all of the GCCXX tool chains can be used from Windows.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16418 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-24 02:43:17 +00:00
Scott Duplichan 285a175441 BaseTools: Modify gcc 4.8 and 4.9 tool chain definition to support building from Windows.
Here is a new patch that adds Windows support for both gcc 4.8.x and gcc 4.9.x. 
This time testing is more thorough: boot testing using Duet for all 4 combinations of 
IA32/X64 and gcc 4.8.2 and gcc 4.9.1 passes. A Windows hosted gcc 4.8.2 has been added here:
http://sourceforge.net/projects/edk2developertoolsforwindows/

The environment variable settings for Windows look like:

set UEFI_BUILD_TOOLS=%cd%\tools
set NASM_PREFIX=%UEFI_BUILD_TOOLS%\nasm211\
set GCC48_BIN=%UEFI_BUILD_TOOLS%\gcc482-x86\bin\
set GCC48_DLL=%UEFI_BUILD_TOOLS%\gcc482-x86\dll\;%GCC48_BIN%
set GCC48_ARM_PREFIX=%UEFI_BUILD_TOOLS%\gcc482-arm\bin\
set GCC48_AARCH64_PREFIX=%UEFI_BUILD_TOOLS%\gcc482-aarch64\bin\
set GCC49_BIN=%UEFI_BUILD_TOOLS%\gcc491-x86\bin\
set GCC49_DLL=%UEFI_BUILD_TOOLS%\gcc491-x86\dll\;%GCC49_BIN%
set GCC49_ARM_PREFIX=%UEFI_BUILD_TOOLS%\gcc491-arm\bin\
set GCC49_AARCH64_PREFIX=%UEFI_BUILD_TOOLS%\gcc491-aarch64\bin\

No change is needed for building from Linux. 

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16400 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-18 02:38:20 +00:00
Liming Gao d808fc659d BaseTools: Correct NASM output file type for UNIXGCC and CYGGCC.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16399 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-18 02:19:47 +00:00
Nikolai Saoukh 0a0ca7877d BaseTools: Use '/' as path separator for objcopy --add-gnu-debuglink
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Nikolai Saoukh <nms@otdel-1.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16172 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-25 02:29:18 +00:00
Andrew Fish e5367bfb61 BaseTools: Fix XCODE5 to work properly with NASM
The default object type for NASM is raw binary, and this will not link.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16085 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-10 16:48:59 +00:00
Jordan Justen b3f9cdaebb BaseTools tools_def: Indicate that NASM 2.07 or later is required
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16018 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-01 17:22:58 +00:00
Jordan Justen ff0279814a BaseTools build_rule: Add .nasm => .obj build rule
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16017 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-01 17:22:51 +00:00
Jordan Justen 9a5a743582 BaseTools tools_def: Add NASM_FLAGS
Note: Only tested with the GCC49 toolchain so far.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16016 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-01 17:07:19 +00:00
Anderw Fish 9358dc21e7 BaseTools: Cleanup XCODE build rules
Update C-Code-File rule since XCODE never needs the SYMRENAME step.
Add *.S16 to Mash16-Code-File rule to supoprt 16-bit assmebly with XCODE

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anderw Fish <afish@apple.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com> 


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15980 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 18:34:04 +00:00
Anderw Fish 4484f397d3 BaseTools: Add the XCODE5 tools target to supoprt Xcode 5
Xcode 5 changed the arguments required to supoprt X64 EFIAPI so it is a new 
target. XCODE5 supports Xcode 5.* and Xcode 6.*, and will probably support
future versions of Xcode as well. 

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anderw Fish <afish@apple.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com> 



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15979 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 18:29:46 +00:00
Yingke Liu 97fa0ee9b1 License header updated to match correct format.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15971 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-28 13:53:34 +00:00
Andrew Fish 057ac410e3 BaseTools: add support Xcode 5 in the EmulatorPkg
The XCODE32 target is used to build the x86_64 Mac OS X application for the 
emulator. The other Xcode targets build the EFIAPI needed for UEFI. This patch
removes an obsolete command line argument.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15930 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-28 04:57:12 +00:00
Olivier Martin cb60328323 BaseTools: Added support for GCC stack protector for ARM architecture
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15854 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-20 18:02:38 +00:00
Jordan Justen abb158ded4 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.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15820 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-18 23:03:17 +00:00
Michael Kinney 65ce860e49 Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney  <michael.d.kinney@intel.com>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>

Add support for RSA 2048 SHA 256 signing and verification encoded in a PI FFS GUIDED Encapsulation Section.  The primary use case of this feature is in support of signing and verification of encapsulated FVs for Recovery and Capsule Update, but can potentially be used for signing and verification of any content that can be stored in a PI conformant FFS file.  Signing operations are performed from python scripts that wrap OpenSsl command line utilities.  Verification operations are performed using the OpenSsl libraries in the CryptoPkg.

The guided encapsulation sections uses the UEFI 2.4 Specification defined GUID called EFI_CERT_TYPE_RSA2048_SHA256_GUID.  The data layout for the encapsulation section starts with the UEFI 2.4 Specification defined structure called EFI_CERT_BLOCK_RSA_2048_SHA256 followed immediately by the data.  The signing tool included in these patches performs encode/decode operations using this data layout.  HashType is set to the UEFI 2.4 Specification defined GUID called EFI_HASH_ALGORITHM_SHA256_GUID.

MdePkg/Include/Guid/WinCertificate.h
================================= 
//
// WIN_CERTIFICATE_UEFI_GUID.CertType
// 
#define EFI_CERT_TYPE_RSA2048_SHA256_GUID \
  {0xa7717414, 0xc616, 0x4977, {0x94, 0x20, 0x84, 0x47, 0x12, 0xa7, 0x35, 0xbf } }

///
/// WIN_CERTIFICATE_UEFI_GUID.CertData
/// 
typedef struct {
  EFI_GUID  HashType;
  UINT8     PublicKey[256];
  UINT8     Signature[256];
} EFI_CERT_BLOCK_RSA_2048_SHA256;

MdePkg/Include/Protocol/Hash.h
================================= 
#define EFI_HASH_ALGORITHM_SHA256_GUID \
  { \
    0x51aa59de, 0xfdf2, 0x4ea3, {0xbc, 0x63, 0x87, 0x5f, 0xb7, 0x84, 0x2e, 0xe9 } \
  }

The verification operations require the use of public key(s).  A new PCD called gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer is added to the SecurityPkg that supports one or more SHA 256 hashes of the public keys.  A SHA 256 hash is performed to minimize the FLASH overhead of storing the public keys.  When a verification operation is performed, a SHA 256 hash is performed on EFI_CERT_BLOCK_RSA_2048_SHA256.PublicKey and a check is made to see if that hash matches any of the hashes in the new PCD.  It is recommended that this PCD always be configured in the DSC file as storage type of [PcdsDynamixExVpd], so the public keys are stored in a protected read-only region.

While working on this feature, I noticed that the CRC32 signing and verification feature was incomplete.  It only supported CRC32 based verification in the DXE Phase, so the attached patches also provide support for CRC32 based verification in the PEI Phase.

I also noticed that the most common method for incorporating guided section extraction libraries was to directly link them to the DXE Core, which is not very flexible.  The attached patches also add a generic section extraction PEIM and a generic section extraction DXE driver that can each be linked against one or more section extraction libraries.  This provides a platform developer with the option of providing section extraction services with the DXE Core or providing section extraction services with these generic PEIM/DXE Drivers.

Patch Summary
==============
1)	BaseTools - Rsa2049Sha256Sign python script that can perform test signing or custom signing of PI FFS file GUIDed sections
  a.	Wrapper for a set of OpenSsl command line utility operations
  b.	OpenSsl command line tool must be installed in location that is in standard OS path or in path specified by OS environment variable called OPENSSL_PATH
  c.	Provides standard EDK II command line arguments for a tool that encodes/decodes guided encapsulation section 

Rsa2048Sha256Sign - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
usage: Rsa2048Sha256Sign -e|-d [options] <input_file>

positional arguments:
  input_file            specify the input filename

optional arguments:
  -e                    encode file
  -d                    decode file
  -o filename, --output filename
                        specify the output filename
  --private-key PRIVATEKEYFILE
                        specify the private key filename. If not specified, a
                        test signing key is used.
  -v, --verbose         increase output messages
  -q, --quiet           reduce output messages
  --debug [0-9]         set debug level
  --version             display the program version and exit
  -h, --help            display this help text

2)	BaseTools - Rsa2049Sha256GenerateKeys python script that can generate new private/public key and PCD value that is SHA 256 hash of public key using OpenSsl command line utilities.
  a.	Wrapper for a set of OpenSsl command line utility operations
  b.	OpenSsl command line tool must be installed in location that is in standard path or in path specified by OS environment variable called OPENSSL_PATH

Rsa2048Sha256GenerateKeys - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
usage: Rsa2048Sha256GenerateKeys [options]

optional arguments:
  -o [filename [filename ...]], --output [filename [filename ...]]
                        specify the output private key filename in PEM format
  -i [filename [filename ...]], --input [filename [filename ...]]
                        specify the input private key filename in PEM format
  --public-key-hash PUBLICKEYHASHFILE
                        specify the public key hash filename that is SHA 256
                        hash of 2048 bit RSA public key in binary format
  --public-key-hash-c PUBLICKEYHASHCFILE
                        specify the public key hash filename that is SHA 256
                        hash of 2048 bit RSA public key in C structure format
  -v, --verbose         increase output messages
  -q, --quiet           reduce output messages
  --debug [0-9]         set debug level
  --version             display the program version and exit
  -h, --help            display this help text

3)	BaseTools\Conf\tools_def.template
  a.	Define GUID/Tool to perform RSA 2048 SHA 256 test signing and instructions on how to use alternate private/public key
b.	GUID is EFI_CERT_TYPE_RSA2048_SHA256_GUID
  c.	Tool is Rsa2049Sha256Sign
4)	MdeModulePkg\Library\PeiCrc32GuidedSectionExtractionLib
  a.	Add peer for DxeCrc32GuidedSectionExtractionLib so both PEI and DXE phases can perform basic integrity checks of PEI and DXE components
5)	MdeModulePkg\Universal\SectionExtractionPei
  a.	Generic PEIM that can link against one or more NULL section extraction library instances to provided one or more GUIDED Section Extraction PPIs
6)	MdeModulePkg\Universal\SectionExtractionDxe
  a.	Generic DXE Driver that can link against one or more NULL section extraction library instances to provide one or more GUIDED Section Extraction Protocols.
7)	SecurityPkg\Library\PeiRsa2048Sha256GuidedSectionExtractLib
  a.	NULL library instances that performs PEI phase RSA 2048 SHA 256 signature verification using OpenSsl libraries from CryptoPkg.
  b.	Based on algorithms from SecurityPkg Authenticated Variable services
  c.	Uses public key from gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer.
8)	SecurityPkg\Library\DxeRsa2048Sha256GuidedSectionExtractLib
  a.	NULL library instances that performs DXE phase RSA 2048 SHA 256 signature verification using OpenSsl libraries from CryptoPkg.
  b.	Based on algorithms from SecurityPkg Authenticated Variable services
  c.	Uses public key from gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer.




git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15800 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-14 06:30:10 +00:00
lhauch d8162fb5aa CodeModule: BaseTools - tools_def.txt VS2010, VS2010x86, VS2012 and VS2012x86 update locations for rc.exe tool
This change will point to the correct location of the rc.exe tool.
RC.exe is used for building UEFI compliant drivers that must have a UEFI_HII_RESOURCE_SECTION generated as part of the .efi image file.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: lhauch <larry.hauch@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15735 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-01 18:11:32 +00:00
Wang, Yu 537bc12400 Add VS2013 tool chain in BaseTools\Conf\tools_def.template. Also, two issues came up related to vs2013 build and caused the build to fail.
Vs2013 issue #1:  warning message about uninitialized variables or pointers like this:
s:\incbld\ia32\intelframeworkmodulepkg\bus\isa\isabusdxe\isabus.c(395) : warning C4701: potentially uninitialized local variable 'DevicePathData' used
s:\incbld\ia32\intelframeworkmodulepkg\bus\isa\isabusdxe\isabus.c(395) : warning C4703: potentially uninitialized local pointer variable 'DevicePathData' used
LINK : fatal error LNK1257: code generation failed
The following online messages shows discussions related to this vs2013 issue and how Microsoft engineer responded.  They suggest a work around by adding the initialization for the variables.
https://connect.microsoft.com/VisualStudio/feedback/details/816730/bogus-warning-from-vs-2013

Vs2013 issue #2:
C:\Program Files\Windows Kits\8.1\include\um\winnt.h(5105) : error C2220: warning treated as error - no 'object' file generated
C:\Program Files\Windows Kits\8.1\include\um\winnt.h(5105) : warning C4005: 'InterlockedCompareExchange64' : macro redefinition
This happened for Nt32Pkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wang, Yu <yu.wang@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15722 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-31 06:14:01 +00:00
Jordan Justen dafe0fedc5 BaseTools: Add GCC49 toolchain; align data sections to 0x40
GCC 4.9 may use 64-byte (0x40) alignment for data sections.

Therefore we use a different link script for GCC 4.9. The only
difference from the gcc4.4-ld-script is the alignment for data
sections.

When using the GCC48 toolchain with GCC 4.9, this error would be
encountered by GenFw:
> GenFw: ERROR 3000: Invalid
>   Unsupported section alignment.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15697 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-28 17:37:10 +00:00
Gao, Liming e4ac870fe9 Sync BaseTool trunk (version r2670) into EDKII BaseTools.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Liu, Yingke D (yingke.d.liu@intel.com)


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15605 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-01 07:10:10 +00:00
Gao, Liming f51461c829 Sync BaseTool trunk (version r2649) into EDKII BaseTools.
Signed-off-by: Gao, Liming <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15188 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-27 05:23:15 +00:00
Gao, Liming 2bc3256ca6 Sync BaseTool trunk (version r2640) into EDKII BaseTools.
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Liu, Jiang A <jiang.a.liu@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15089 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-10 05:25:50 +00:00
Liming Gao 4afd3d0422 Sync BaseTool trunk (version r2599) into EDKII BaseTools.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Heshen Chen <chen.heshen@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14591 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-23 02:18:16 +00:00
lgao4 25918452ed Sync BaseTools Trunk (version r2524) to EDKII main trunk.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liu Yingke <yingke.d.liu@intel.com>
Reviewed-by: Yurui Zeng <yurui.zeng@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13353 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-23 08:27:14 +00:00
lgao4 64b2609fcf Sync BaseTools Trunk (version r2518) to EDKII main trunk.
Signed-off-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13178 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-10 07:18:20 +00:00
lgao4 9508d0fa4f Sync BaseTool trunk (version r2474) into EDKII BaseTools.
Signed-off-by: lgao4
Reviewed-by: gikidy



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12883 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-16 08:52:13 +00:00
lgao4 2bcc713e74 Sync BaseTool trunk (version r2423) into EDKII BaseTools. The change mainly includes:
1. Fix !include issues
  2. Fix Trim to skip the postfix 'U' for hexadecimal and decimal numbers
  3. Fix building error C2733 when building C++ code.
  4. Add GCC46 tool chain definition
  5. Add new RVCT and RVCTLINUX tool chains

Signed-off-by: lgao4


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12782 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-25 06:21:03 +00:00
lgao4 d40b2ee60e Sync BaseTool trunk (version r2397) into EDKII BaseTools. The change mainly includes
1. Fix the issue that root directory of disk can’t be used as WORKSPACE.
2. Update AutoGen code style to pass C++ compiler.

Signed-off-by: lgao4
Reviewed-by: jsu1

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12676 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-09 04:32:08 +00:00
lgao4 0d2711a693 Sync BaseTools Trunk (version r2387) to EDKII main trunk.
Signed-off-by: lgao4
Reviewed-by: gikidy

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12602 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-29 06:59:30 +00:00
lgao4 79b74a03e0 Sync BaseTools Branch (version r2362) to EDKII main trunk.
Signed-off-by: lgao4
Reviewed-by: jsu1
Reviewed-by: ydliu

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12525 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-11 02:49:48 +00:00
lgao4 29e22e2bd6 Sync BaseTools Branch (version r2324) to EDKII main trunk.
Signed-off-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12435 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-23 06:03:45 +00:00
lgao4 b36d134faf Sync BaseTools Branch (version r2321) to EDKII main trunk.
Signed-off-by: lgao4
Reviewed-by: gikidy


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12372 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-18 12:17:25 +00:00
lgao4 4234283c3a Sync BaseTools Branch (version r2271) to EDKII main trunk.
BaseTool Branch:
  https://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/branches/Releases/BaseTools_r2100

Signed-off-by: lgao4
Reviewed-by: hchen30

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12214 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-26 07:46:26 +00:00
lgao4 da92f27632 Sync BaseTools Branch (version r2149) to EDKII main trunk.
BaseTool Branch:
  https://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/branches/Releases/BaseTools_r2100

  



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11640 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-11 10:26:49 +00:00
lgao4 641370270f Sync EDKII BaseTools to BaseTools project r2100.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11118 6f19259b-4bc3-4df7-8a09-765794883524
2010-12-06 05:17:09 +00:00
lgao4 6780eef1f9 Sync EDKII BaseTools to BaseTools project r2093.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11057 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-15 02:51:34 +00:00
lgao4 08dd311f5d Sync EDKII BaseTools to BaseTools project r2065.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10915 6f19259b-4bc3-4df7-8a09-765794883524
2010-10-11 06:26:52 +00:00
qhuang8 e56468c072 Sync EDKII BaseTools to BaseTools project r2042.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10850 6f19259b-4bc3-4df7-8a09-765794883524
2010-09-06 01:58:00 +00:00
lgao4 756ad8f8e9 Sync EDKII BaseTools to BaseTools project r2006.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10764 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-03 03:29:17 +00:00
qhuang8 6310ffd781 Sync EDKII BaseTools to BaseTools project r2000
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10706 6f19259b-4bc3-4df7-8a09-765794883524
2010-07-28 03:07:30 +00:00
qhuang8 14c48571ae Sync EDKII BaseTools to BaseTools project r1997
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10680 6f19259b-4bc3-4df7-8a09-765794883524
2010-07-21 02:46:15 +00:00
qhuang8 9053bc517e Sync EDKII BaseTools to BaseTools project r1988
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10607 6f19259b-4bc3-4df7-8a09-765794883524
2010-06-28 09:33:10 +00:00
lgao4 40d841f6a8 Sync EDKII BaseTools to BaseTools project r1971
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10502 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-18 05:04:32 +00:00
lgao4 636f2be673 Sync EDKII BaseTools to BaseTools project r1928
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10234 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-12 10:54:01 +00:00
lgao4 d5d56f1bc5 Sync EDKII BaseTools to BaseTools project r1911.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10177 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-04 05:29:52 +00:00
lgao4 52302d4dee Sync EDKII BaseTools to BaseTools project r1903.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10123 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-28 23:39:39 +00:00
andrewfish cfbd0c5f1a Default to Cortex ARM CPU type to match UEFI specification. Drive thumb from ARCHCC flags.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9883 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-30 21:31:33 +00:00
andrewfish 5e9edaea7c Turn on Thumb/Thumb2 and optimize for size.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9863 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-29 20:22:14 +00:00
andrewfish bf586ab919 Fix Xcode bug in template
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9831 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-27 02:50:13 +00:00
lgao4 a709adfaf0 Sync tool code to BuildTools project r1783.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9623 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-29 06:16:53 +00:00
lgao4 b303ea726e Sync tool code to BuildTools project r1739.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9397 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-09 11:47:35 +00:00
vanjeff fd171542e0 Sync basetools' source and binary files with r1707 of the basetools project.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9257 6f19259b-4bc3-4df7-8a09-765794883524
2009-09-11 03:14:43 +00:00
qhuang8 8e2978b4ad Add /GF compiler option for IPF ICC tool chains by default.
This option enables read-only string pools to reduce the final PE/COFF image size.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9220 6f19259b-4bc3-4df7-8a09-765794883524
2009-09-01 15:03:44 +00:00
jljusten e0d22735b7 Change the default location for IASL on Unix.
The default is now /usr/bin/iasl, but $(HOME)/programs/iasl is
also shown as a commented example.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9077 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-15 05:05:02 +00:00
jljusten 726d5a8edc Remove '/' directory separator from CYGWIN & UNIXGCC tool specications.
This allows for the UNIXGCC_*_PETOOLS_PREFIX and CYGWIN_* macros
to potentially have a prefix before the executable name.  This allows
more flexibility for gcc/binutils when the executables include
a prefix.  Some commented examples are shown where this might be used.
For example:
  DEFINE UNIXGCC_IA32_PETOOLS_PREFIX = i386-pc-mingw32-
    or
  DEFINE UNIXGCC_IA32_PETOOLS_PREFIX = ENV(HOME)/programs/gcc/ia32/bin/i686-pc-mingw32-

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9076 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-15 05:05:00 +00:00
lgao4 30fdf1140b Check In tool source code based on Build tool project revision r1655.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8964 6f19259b-4bc3-4df7-8a09-765794883524
2009-07-17 09:10:31 +00:00
klu2 c9c705a855 add quote for file path in @file option
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8762 6f19259b-4bc3-4df7-8a09-765794883524
2009-07-06 15:03:25 +00:00
lgao4 38d4998ad4 Add ASL_OUTFLAG to contain the different ASL output options.
ASL_FLAG to contain other ASL options.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8584 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-17 09:34:46 +00:00
klu2 ecb11926ec The MULTIPLE_THREAD should be choice from "Disable", "Enable" but not "TRUE", "FALSE"
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8441 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-02 07:10:41 +00:00
klu2 c9d0e0815b Add MULTIPLE_THREAD option.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8439 6f19259b-4bc3-4df7-8a09-765794883524
2009-06-02 03:02:10 +00:00
gikidy d4244a08ad Remove -Os for UNIXGCC CC FLAGS to reduce size.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8251 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-06 09:40:50 +00:00
lgao4 de29c94afc Add the optional EfiRom CodeRevision option.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8241 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-05 07:31:56 +00:00
jwang36 15543340da Implemented feature request hsd202262 and incorporated SMM support
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8229 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-03 06:40:59 +00:00
jljusten c470d83142 Add WIN32 binary build of LzmaCompress. Add LzmaCompress to tools_def.template.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8228 6f19259b-4bc3-4df7-8a09-765794883524
2009-05-01 06:45:01 +00:00
gikidy 2a9aee6d37 Fix a typo.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8161 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-23 08:18:24 +00:00
klu2 b2f5a3718b Remove unused EFI32 macro.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8102 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-16 06:33:05 +00:00
klu2 7f612040d6 Remove unused EFI32 macro.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8101 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-16 06:32:34 +00:00
eric_tian 623471a383 update
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8078 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-14 03:20:33 +00:00
eric_tian 3b6c90a16b update tools_def.template to supply all possible combination of toolchain and ASL
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8075 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-13 12:50:50 +00:00
lgao4 2ab2aad18b Fix AcpiTable C file build failure, because the compiler don't know how to set subsystem when entrypoint is not main. Append /SUBSYSTEM:CONSOLE link option.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7987 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-31 02:21:43 +00:00
jljusten a440187f4e Change default setting for UNIXGCC_IASL. The previous
default value used the HOME environment variable, which is
not always defined on windows, and therefore will
cause the build to break for windows based builds.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7986 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-30 17:56:42 +00:00
klu2 13987f5775 Fix build broken for missing defintiion of UNIXGCC_IASL
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7984 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-30 07:58:20 +00:00
qhuang8 2391e54c73 Update framework database to point to existing packages files.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7982 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-30 06:38:22 +00:00
jljusten dd1e6e117e Change fake entry point used during ACPI Table building from main
to ReferenceAcpiTable.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7979 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-29 18:42:16 +00:00
jljusten c609489087 Update Conf template files to support ACPI building with UNIXGCC.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7978 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-29 18:42:14 +00:00
jwang36 77696b61eb Add $(MD) command for vfr build rule to avoid build failure for some R8 modules
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7976 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-29 16:16:19 +00:00
klu2 941199475d add map generation for GCC tool chain
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7934 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-24 13:08:39 +00:00
klu2 8a83f2c897 use -pie(Position Independent for executable file) instead of "-dll". A EFI image generated by UNIXGCC tool chain should be relocated when loaded.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7911 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-19 14:55:41 +00:00
klu2 80610cae7d Use options for size reduction
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7882 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-16 02:03:39 +00:00
klu2 47e8adb6d8 EFI driver should base 0x0
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7877 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-13 08:54:14 +00:00
lgao4 b6e96fbcf3 Correct TianoCompress name for Linux/GCC.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7833 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-09 02:09:22 +00:00
jwang36 92bb89c95c Changed deprecated DPATH to DLL for CYGWINGCC tool chain.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7732 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-28 10:24:41 +00:00
jwang36 a7d376877f 1. Use FAMILY defined in *_TAGNAME_*_*_FAMILY as the toolchain family
2. Force file name case check in Windows
3. Consolidate file/path operations
4. Support binary file type in build_rule.txt
5. Generate $(FILE_TYPES) macro only when it's used in build_rule.txt
6. Fix HSD202142 and HSD202144
 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7529 6f19259b-4bc3-4df7-8a09-765794883524
2009-02-16 13:37:23 +00:00
lgao4 2895c5060c Add general Tiano Compress tool path.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7214 6f19259b-4bc3-4df7-8a09-765794883524
2009-01-08 08:46:46 +00:00
klu2 296ac32a66 Remove ASM16 tool definition, it is same as ASM tool for all tool chain in fact.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7199 6f19259b-4bc3-4df7-8a09-765794883524
2009-01-07 02:34:39 +00:00
klu2 05e33af874 Add ASM16 rule for ICC tool chain.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7193 6f19259b-4bc3-4df7-8a09-765794883524
2009-01-06 08:26:44 +00:00
jwang36 a388ec434a Updated the macro description according to the latest changes in build tool.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7159 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-31 06:06:11 +00:00
jwang36 2eab98c107 1) Re-fine and fully test the mechanism of getting over the long command line limitation
2) Change the -s option from "SpawnMode" to be "SilentMode"
3) Change the prototype of PeiCoreEntryPoint in AutoGen-ed code
4) Remove CalcDeps module since it's no longer needed.
5) Remove "-k", "-g" and "-l" switches from build
6) Remove MULTIPLE_THREAD in target.template. Use MAX_CONCURRENT_THREAD_NUMBER to get the functionality.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7158 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-31 05:53:26 +00:00
lgao4 e1b4bd1486 Roll back to add rule for uni file, change Uni output file to $(DEBUG_DIR)(+)$(MODULE_NAME)StrDefs.h.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7119 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-25 03:22:58 +00:00
lgao4 f5e6003bdf Remove unused PCH compiler option and unused build rule for uni file.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7117 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-25 01:09:52 +00:00
eric_tian 5edaeedefb revert to older version as /Zm option for "ml" can not work well.
A bug exists when there are such statement in a asm file:
_InterlockedCompareExchangePointer  PROC
_InterlockedCompareExchangePointer  ENDP
_InterlockedCompareExchange32   PROC
    mov     ecx, [esp + 4]
    mov     eax, [esp + 8]
    mov     edx, [esp + 12]
    lock    cmpxchg [ecx], edx
    ret
_InterlockedCompareExchange32   ENDP

The assembly will export _InterlockedCompareExchangePointer but not _InterlockedCompareExchange32 when using /Zm option.
This option also introduced another strange issue in link time. Link tool will complain it can not find all symbols exported in the asm file when it is built by /Zm option.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6864 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-05 07:35:41 +00:00
eric_tian 39eb632ebb add /Zm option for VS2005 assembly to make sure it is compatible with MASM5.1 syntax. Or "ml" in Vs2005 may break on old code style.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6856 6f19259b-4bc3-4df7-8a09-765794883524
2008-12-05 05:25:48 +00:00
jwang36 1a974389fd Added /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) in EBC_CC_FLAGSto ensure correct R8's module entry point for EBC arch.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6772 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-28 06:11:32 +00:00
lgao4 abf1c3e47f Check In Build.exe and tools_def.template
1. Declare entry point, constructor into AutoGen.h
2. Create ModuleNameStrDefs.h to contain uni code string ID. 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6762 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-27 09:15:52 +00:00
klu2 f560de7307 Pcd Tools need .Map file when building a EFI binary for EBC tool chain.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6735 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-26 08:21:25 +00:00
jljusten 6ff04b8e40 Use VFRPP tool for VFR pre-processing.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6675 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-21 19:09:26 +00:00
lgao4 64cd21af35 Update ASL build rule, Add PeiLibPciCfgModify into EDKII GlueLib PeiServiceLib to support the modules that uses EDKII Glue Lib
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6551 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-17 02:12:36 +00:00
mdkinney 0764e7ed0b Remove all references to ASMLINK16. Those are never used.
Change ASMLINK to use link16.exe instead of link.exe to make it clear this is a 16-bit operation
Remove all references to ASMLINK from IPF and X64 builds



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6381 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-04 21:57:13 +00:00
mdkinney acae1bc393 Remove all references to ASMLINK16. Those are never used.
Change ASMLINK to use link16.exe instead of link.exe to make it clear this is a 16-bit operation
Remove all references to ASMLINK from IPF and X64 builds



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6380 6f19259b-4bc3-4df7-8a09-765794883524
2008-11-04 21:50:46 +00:00
lgao4 ffe084ee76 1. Add ASM source files directory into its Include path.
2. Change the output directory for ASL files to the subdirectory in order to avoid the same file names. 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5867 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-10 06:51:00 +00:00
lgao4 f0373115cc Add the special build rule for AcpiTable C Source file.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5759 6f19259b-4bc3-4df7-8a09-765794883524
2008-09-01 01:18:00 +00:00
vanjeff 576b299ac9 add .mut file type support for Microcode files.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5730 6f19259b-4bc3-4df7-8a09-765794883524
2008-08-26 06:18:30 +00:00
lgao4 98335d901b Minor change to remove /GL- option unsupported by ICC tool chain.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5707 6f19259b-4bc3-4df7-8a09-765794883524
2008-08-21 13:23:12 +00:00
lgao4 a1c949f333 Update GenSec to handle the input file whose size is Zero. And add the unified ASL tool path and flags for ASL code.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5706 6f19259b-4bc3-4df7-8a09-765794883524
2008-08-21 13:11:01 +00:00
jwang36 f285eb1628 1. Enhanced the format of build_rule.txt to allow module type and arch information.
2. Enhanced Trim to convert ASL style of include to C style of include
3. Enhanced Trim to convert some EDK coding convention to EDK2 ECP convention
4. Added warning message when encountering unrecognized content in DSC/DEC/INF File
5. Enhanced the GenDepex to ignore everything outside DEPENDENCY_STANT and DEPENDENCY_END in dxs file


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5634 6f19259b-4bc3-4df7-8a09-765794883524
2008-08-12 07:54:36 +00:00
lgao4 bdf37b3c46 Change VfrCompile.exe to VfrCompile to support the different OS.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5623 6f19259b-4bc3-4df7-8a09-765794883524
2008-08-10 03:56:03 +00:00
lgao4 30962c7752 Abstract VFR compiler and Flag to marco that user can customize.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5610 6f19259b-4bc3-4df7-8a09-765794883524
2008-08-07 03:29:10 +00:00
eric_tian 73aa7f049b merge the generation of SecMain into the whole build process.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5491 6f19259b-4bc3-4df7-8a09-765794883524
2008-07-16 05:28:50 +00:00
eric_tian 865c7e1722 Provide source level debug ability in *unix environment.
[Background]
The UnixPkg provide an simulator in *unix. To support source level debug, we need force all modules be built as ELF shard objects and dynamically load all of modules using dlopen(). For peicore, peim and dxecore, we provide a wrapper to provide PeCoffLoader interface 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5382 6f19259b-4bc3-4df7-8a09-765794883524
2008-06-30 06:25:43 +00:00
eric_tian ed0b86b183 make change to support UnixPkg build. The changes are listed as follows:
1. change ASM_PFX() macro, the underscore preceding to function symbol don't be added in Linux.
2. move some illegal characters in .S file.
3. change ELFGCC flag in tools_def.template to support Linux&ELFGCC build

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5381 6f19259b-4bc3-4df7-8a09-765794883524
2008-06-30 05:50:49 +00:00
qwang12 616380f68b Add "-l" to make VFR Compiler to generate .lst file to assist debug.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5334 6f19259b-4bc3-4df7-8a09-765794883524
2008-06-05 07:48:54 +00:00
jwang36 23fdff8236 Added dependency of makefile to source files in order to let source files be rebuilt when tool option changes
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5333 6f19259b-4bc3-4df7-8a09-765794883524
2008-06-05 07:36:19 +00:00
qwang12 fd6e8b4b82 add VFRPP patch for EBC WINDDK3790x1830 tool chain.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5328 6f19259b-4bc3-4df7-8a09-765794883524
2008-06-05 01:43:26 +00:00
lgao4 0a1d7bdc45 Add ASL_FLAGS template for user reference.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5205 6f19259b-4bc3-4df7-8a09-765794883524
2008-05-15 04:58:49 +00:00
jwang36 c0577805c9 Fixed VFR compile issue for EBC architecture in MYTOOLS toolchain
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5203 6f19259b-4bc3-4df7-8a09-765794883524
2008-05-15 03:00:04 +00:00
klu2 adf74fc6b2 Fix typo.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5184 6f19259b-4bc3-4df7-8a09-765794883524
2008-05-08 06:25:45 +00:00
klu2 1f4dfdd962 Add ASM16 tool configuration for MYTOOLS tag.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5181 6f19259b-4bc3-4df7-8a09-765794883524
2008-05-08 04:12:33 +00:00
lgao4 25ab7ab110 For MicroCode module, default copy the created image to bin directory for easy reference.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5087 6f19259b-4bc3-4df7-8a09-765794883524
2008-04-18 03:08:20 +00:00
lgao4 4ee8254a0c Disable unused C++ EH and RTTI feature by adding /GX- option for VC7 and adding /GR- option for VC8.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4849 6f19259b-4bc3-4df7-8a09-765794883524
2008-03-14 03:12:29 +00:00
lhauch 5b4756eacc Fixing gcc CC Flags and ld flags - adding map
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4847 6f19259b-4bc3-4df7-8a09-765794883524
2008-03-13 20:46:42 +00:00
lhauch c2192d9324 changing shortcut name to descriptive names for grouping librarys
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4842 6f19259b-4bc3-4df7-8a09-765794883524
2008-03-12 14:08:12 +00:00
lhauch 01c665a0a8 Fixed VFR flag to: --no-pre-processing
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4743 6f19259b-4bc3-4df7-8a09-765794883524
2008-02-22 00:22:32 +00:00
jwang36 87acd19c6d Standardized the command line options of VfrCompile.exe and changed its uses in build_rule.template.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4740 6f19259b-4bc3-4df7-8a09-765794883524
2008-02-21 00:50:13 +00:00
jwang36 e2336e3968 a. Added binary file support during AutoGen
b. Removed "extern int __make_me_compile_correctly;" from AutoGen.h
c. Added BUILD_RULE_CONF in target.txt to specify build rules file

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4705 6f19259b-4bc3-4df7-8a09-765794883524
2008-02-19 06:39:47 +00:00
jwang36 f9619f52af Added "-nopp" to VfrCompile.exe tool to bypass the preprocessing on input file
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4698 6f19259b-4bc3-4df7-8a09-765794883524
2008-02-18 01:35:38 +00:00
qhuang8 b7fc5c8937 Remove non-existing files reference.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4658 6f19259b-4bc3-4df7-8a09-765794883524
2008-02-01 15:12:19 +00:00
lhauch fa7f89da6f modified the UNIXGCC information
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4492 6f19259b-4bc3-4df7-8a09-765794883524
2008-01-03 21:41:41 +00:00
lhauch ab9281201a fixed paths for UNIXGCC tools
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4489 6f19259b-4bc3-4df7-8a09-765794883524
2008-01-03 21:01:44 +00:00
jwang36 63245e966f Added $(ASL_FLAGS) to $(ASL) command line
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4445 6f19259b-4bc3-4df7-8a09-765794883524
2007-12-28 05:31:13 +00:00
lhauch 41ca88052a fixed a typo - GS8192 should be Gs8192
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4444 6f19259b-4bc3-4df7-8a09-765794883524
2007-12-28 00:03:12 +00:00
lhauch f260433e67 Added QIPF_fr32 flags to IPF CC flags, neede by UEFI ABI for Itanium
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4443 6f19259b-4bc3-4df7-8a09-765794883524
2007-12-27 21:05:46 +00:00
jwang36 106c688f93 Fixed out-of-date contents (PVCS tracker 732)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4434 6f19259b-4bc3-4df7-8a09-765794883524
2007-12-25 09:23:17 +00:00
jwang36 d78f8ac7ee Fixed typos (PVCS tracker 749)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4433 6f19259b-4bc3-4df7-8a09-765794883524
2007-12-25 09:17:00 +00:00
jwang36 1c2c04dfea Fixed typos (PVCS Tracker 750)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4432 6f19259b-4bc3-4df7-8a09-765794883524
2007-12-25 09:15:38 +00:00
jwang36 f71c1d39e4 Changed the NMAKE path from VS2003 to VS2005 for ICC tool chain
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4424 6f19259b-4bc3-4df7-8a09-765794883524
2007-12-24 02:51:41 +00:00
jwang36 58ce61eb5d a. Enabled building R8 modules
b. Always inherit library's [depex] if there's no dxs file declared in module's inf file

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4419 6f19259b-4bc3-4df7-8a09-765794883524
2007-12-22 16:58:04 +00:00
jwang36 64cf8bc004 Changed the ICC tools to use VS2005's tools and dlls because of crash of ICC working with VS2003.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4390 6f19259b-4bc3-4df7-8a09-765794883524
2007-12-12 03:50:49 +00:00
lhauch 7e6ae4d97f Rearranged flags so they are in consiste locations, change ASM warning from /W3 /W0 to just /W3
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4335 6f19259b-4bc3-4df7-8a09-765794883524
2007-11-28 01:20:03 +00:00
jwang36 4bf477810f Fixed the dependency issue on wrong name of makefile.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4291 6f19259b-4bc3-4df7-8a09-765794883524
2007-11-08 03:57:35 +00:00
yshang1 8a0d144b39 Add the -mno-red-zone for gcc on x64. Since the GNU calling convention of x64 defines the 128bytes red zone beyond the stack point could not be modified by interrupt or exception handler, and Edk prime assumes all data beyond stack point should be volatile, if not add the option, the interrupt or exception handler may corrupt the red zone, which may be used as temporary storage.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4271 6f19259b-4bc3-4df7-8a09-765794883524
2007-11-06 05:30:16 +00:00
jwang36 04e031d000 a. Changed MYTOOLS to use Visual Studio Team Suite for IA32 and X64. IPF is still use WINDKK.
b. Re-generated build.exe and GenFds.exe to incorporate new changes of build tools
c. Enable multi-thread build mode by default


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4246 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-31 09:07:31 +00:00
jljusten 8f5a1bcc35 BaseTools/Conf/tools_def.template:
Added '-x assembler' to *_UNIXGCC_*_ASM_FLAGS so pre-processed assembly
  files (*.iii) will assemble correctly.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4235 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-29 23:17:12 +00:00
jljusten 9ba67b5c81 BaseTools/Conf/build_rule.template:
Fixes for GCC toolpath on unix.  (Changes tested on OS X).


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4233 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-29 18:34:07 +00:00
jljusten 2347330465 BaseTools/Conf/tools_def.template:
Changes for UNIXGCC toolchain.
  Tested on OS X with x86_64-pc-mingw32 bintools/gcc


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4232 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-29 08:01:12 +00:00
jljusten 07a756b95e Restoring $WORKSPACE/BaseTools location, as the plan is to deprecate
$WORKSPACE/Tools instead.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4147 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-17 01:54:36 +00:00
jljusten 8b2d58875a Moved $WORKSPACE/BaseTools to $WORKSPACE/Tools/BaseTools.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4142 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-16 20:56:54 +00:00
jwang36 30311cfc7a Solved the VS2005 assembler issue in which "/omf" switch cannot call linker.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4132 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-16 12:17:53 +00:00
jwang36 8e5c3581bb Changed the default directory of VS2005TEAMSTUIE to the default installation directory of Visual Studio 2005 Team Suite Edition.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4129 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-16 08:08:01 +00:00
jwang36 af437b7c2e Added VS2005TEAMSUITE tool chain
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4126 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-16 06:50:20 +00:00
jwang36 c8c6d794df Added GCC assembly code preprocessing support
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4114 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-15 06:17:00 +00:00
jwang36 cba02989d1 Added DLL attribute for SLINK and/or CC command because Intel Compiler and linker need the cl.exe and lib.exe from Visual Studio.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4106 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-12 03:36:32 +00:00
jwang36 06ca7f7102 Corrected the wrong ARCH in WINDDK3790x1830 tool chain and added MAKE command for it.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4105 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-12 03:02:30 +00:00
jwang36 eb1c2d7bd9 Added MAKE command for ICC and CYGWINGCC tool chain
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4095 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-11 13:34:31 +00:00
jwang36 b7509087b0 a) Supported MAKE command in tools_def.txt
b) Cleaned several message strings in code
c) Solved hang issue when the build.exe is broken by Ctrl+C
d) Added more specific information for "-v" option of build.exe
e) Added "-v"/"-d"/"-q" option for GenFds.exe in makefile if build.exe is called with one of them.
f) Removed the calling to vsvars32.bat and added "--nt32" option in edksetup.bat because the nmake.exe's path has been put in tools_def.txt and build.exe will use that information to call nmake.exe
g) Removed the calling to vsvars32.bat in BaseTools/toolsetup.bat


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4091 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-11 08:58:33 +00:00
jwang36 e6d6b06d50 Enabled Visual Studio 2005 Professional Edition tool chain
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4077 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-10 08:27:03 +00:00
jwang36 327f4e7d26 Fixed an issue in which the dependent makefile is put in wrong rule.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3975 6f19259b-4bc3-4df7-8a09-765794883524
2007-09-29 02:50:00 +00:00