Commit Graph

1141 Commits

Author SHA1 Message Date
Yonghong Zhu 481252bbc9 BaseTools: Fix the bug for .aml to use ASL binary type in Asbuilt inf
Per build spec, the .aml file should use ASL binary type in the Asbuilt
inf file. the original bug is .aml file may use BIN as binary type when
the module type is not BASE or USER_DEFINED. This patch 1) fix this bug.
2) fix some indent coding style issue.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-27 09:39:53 +08:00
Yonghong Zhu df81077f77 BaseTools: Update FMP Capsule support to follow FDF spec
Current the FMP Capsule feature is supported, but its format has a little
different with FDF spec. so this patch 1) Align the FMP Capsule with FDF
spec. 2) fix some style issue, eg: Tab. 3) Add a SectionParser function to
check the section header info since this method is used in 7 places.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-27 09:39:15 +08:00
Hess Chen 4a21fb3b67 BaseTools/UPT: UPT to Support UTF-8
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-04-26 12:02:02 +08:00
Hess Chen b739e14d7f BaseTools/ECC: Remove UNI checkpoint from ECC
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-04-26 12:01:07 +08:00
Hess Chen f8895c2ad4 Update ECC to support more doxygen keywords
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-04-26 11:20:59 +08:00
Yonghong Zhu 6b17c11b6f BaseTools: add the support for --pcd feature to patch the binary efi
the original --pcd feature can override the Pcd value when build the
source driver, while it missed the binary driver. this patch add the
support to patch the binary efi for --pcd feature.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-20 09:32:52 +08:00
Yonghong Zhu 2a29017e3e BaseTools: Add mixed PCD support feature
Problem statement:
The current build system requires that a PCD must use the same access
method for all modules. A Binary Module may use a different PCD access
method than: 1.A source tree build it is integrated into. 2.Other Binary
Modules in platform build that use the same PCD.

Solution:
1. Source build:
No change. PCDs must use the same access method for building all Source
Modules.
2. Mixed Source & Binary Builds or Binary Only Builds:
1) Source Modules - No changes
2) Module that is interpreted as a Binary Module
a.DSC file may optionally override default value of PatchableInModule
PCDs in scope of Binary Module.
b.DSC file must declare DynamicEx PCD subtype for all DynamicEx PCDs
from Binary Modules.
c.FDF file must list Binary Module INF

Build update:
1. PCDs in a binary module are permitted to use the PatchableInModule
or DynamicEx access methods (the Binary INF clearly identifies the PCD
access method for each PCD). The build must support binary modules that
use the same or different PCD access method than the Source INFs or
other Binary INFs.
2. Build report list PCDs that have mixed PCD access methods.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-20 09:24:46 +08:00
Yonghong Zhu 61ee1dff16 BaseTools: fix a bug for PEI VPD Pcd collection
When a PEI phase VPD PCD only list in the DSC IA32 arch, then build X64
arch image, it missed to collect this PEI VPD pcd into VPD Pcd map file.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-19 18:40:37 +08:00
Yonghong Zhu e642ceb8a5 BaseTools/GenFds: remove the old logic since ActivePlatform is abs. path
We can support the DSC file out of workspace. this old logic first make
the absolute path to relative path and strips the leading slash off,
then append it to workspace. it cause GenFds failure on Linux when the
DSC file is out of workspace. Since we make sure the ActivePlatform is
abs. path, so we don't need this old logic to change the abs. path to
relative.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Marvin Haeuser <marvin.haeuser@outlook.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-19 18:35:42 +08:00
Yonghong Zhu d429fcd0d2 BaseTools: enhance error handling for DSC file
Add logic for DSC file validation for Prebuild init. Add logic to detect
error for DSC parser when '{' is missing.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-19 18:32:35 +08:00
Thomas Palmer 7717798408 BaseTools/Build: Consider only build-specified architectures
When building for any specific architecture, the build script today
is loading DSC sections for other architectures not in the build.
The build process should disregard DSC sections that are not
relevant to the build.

This fixes scenario whereby a build occurs in a source tree that was
been cleaned of non-essential directories.  For instance, X64 builds
do not require the ArmPkg directory to build a firmware image.  This
condition (build break when ArmPkg is absent) occurs when included
DSCs have sections for multiple architectures.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-04-19 10:30:54 +08:00
Marvin.Haeuser@outlook.com 7a5f1426c5 BaseTools: Fix PLATFORM_DIR variable value.
In commit 017fb1cd4c, the PLATFORM_DIR
macro has been updated to resolve to the correct path. However, it is
incorrectly accessed via curved rather than curly braces by GenMake.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-04-15 10:33:24 +08:00
Yonghong Zhu 670bf6a722 BaseTools/VolInfo: Update to handle PE image with .code section only
rebase the image which only has .code section, but no other section, the
tool return error. this patch fix this bug to support it.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-15 08:43:49 +08:00
Yonghong Zhu 3c4db2dfe2 BaseTools/GenFw: Update to handle PE image with .code section only
current GenFw rebase the image which only has .code section, but no other
section, the tool return error. this patch fix this bug to support it.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-15 08:43:12 +08:00
Yonghong Zhu 67a69059f7 BaseTools: Fix the bug to correctly handle the [BuildOptions]
the last fix call os.path.normpath() function, which removes the
trailing slash character, it cause NASM failure for ResetVector
driver.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-15 08:41:21 +08:00
Yonghong Zhu 2b1c08acfc BaseTools: fix the bug for [BuildOptions] of multiple workspace support
when enable Multiple workspace and there have other option(eg: -I) before
$(WORKSPACE), handleWsMacro cannot return correct which cause the
ArmVirtPkg build failure.
example:
[BuildOptions]
  *_*_AARCH64_PLATFORM_FLAGS == -I$(WORKSPACE)/ArmVirtPkg/Include

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-14 12:58:11 +08:00
Yonghong Zhu 017fb1cd4c BaseTools: fix PLATFORM_DIR variable value for multiple workspace
when enable the multiple workspace, the PLATFORM_DIR still is
$(WORKSPACE)\AnyPkg, even though it is in a PACKAGES_PATH folder. this
patch fix this issue to use the real path.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-14 12:57:19 +08: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
Yonghong Zhu eca5be7a7d BaseTools: generate hash value in build report for each output EFI image
Build report add new report type 'HASH' to include the hash value for
each output EFI image.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-12 13:16:06 +08:00
Yonghong Zhu 9947f5769f BaseTools/VolInfo: generate HASH value for each PE image
VolInfo Tool add new option --hash to use openssl to generate hash value
for each PE image. If the image base address is not zero, we will rebase
its base address to zero before generate hash value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-12 13:14:21 +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
Yonghong Zhu f0dc69e61b BaseTools: Add support to merge Prebuild and Postbuild into build Process
This feature is enhance build tool to incorporate execution of prebuild
and postbuild.

1.Prebuild script
a.DEFINE PREBUILD in DSC [Defines] section
b.Build command -D PREBUILD to override the one in DSC [Defines] section
1)If PREBUILD is a file, then this file will be used as prebuild script.
2)If PREBUILD is empty, then prebuild script will be disabled.
3)If PREBUILD is not defined in [Defines] section and not passed in on
command line, then prebuild script is also disabled.

2.Prebuild option
a.All options of build tool
b.TARGET, ARCH and TOOL_CHAIN_TAG value, Those value will be from
target.txt file if they are not in build command line.
c.Additional options following prebuild definition. Quotes are needed
when these additional options are present.
d.Quotes would also be required if the path to the prebuild command
contains space or special characters.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-07 13:13:22 +08:00
Yonghong Zhu d7cd335681 BaseTools: Enhance --Pcd which override by build option
This patch 1) enhance the help info for --pcd to use " but not '.
2) Add the condition statements for build option Pcd type check.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-07 13:12:22 +08:00
Yonghong Zhu 213ae07750 BaseTools: cache the defined Guid tool to improve the performance
Current GenFds Tool class GuidSection() is parsing the tools_def.txt for
every GUID'ed section that has a GUID defined tool, it cause a bad
performance. so this patch cache the defined Guid tool to improve the
performance.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-06 13:40:14 +08:00
Yonghong Zhu cfaaf99bdd BaseTools/GenFds: Fix the bug for wrong alignment generate for RAW file
When do the multiple raw file support feature, it cause the regression
that the raw file section alignment value was wrongly overridden by the
single raw file. this patch: 1) fix the wrong overridden bug. 2) remove
the duplicate code for combine multiple raw file into one.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-04-05 13:24:04 +08:00
Yonghong Zhu c8d07c5eeb BaseTools: Add two new sections for PCD in the build report
Build Spec updated to add two new sections for PCD in the build report.
1.Conditional directives section:If the DSC or FDF file contains
conditional directive statements.
2.Unused PCDs section: If the DSC or FDF file define values for PCDs that
are not used by any module and are not used in conditional directive
statements.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-03-29 15:21:46 +08:00
Yonghong Zhu 4fa7b3301e BaseTools: Remove the unnecessary check for RAW File
Because the __VerifyFile function already checked whether the file is
valid.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-03-28 12:27:50 +08:00
Yonghong Zhu 877c0a93be BaseTools: generate alignment when the FV content come from the filesystem
when the FV contents come from the filesystem instead of from a named FDF
section, the build tool missed to generate alignment for this FV. The fix
is get the alignment value from FV header and use this value to generate
alignment.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-03-27 15:12:50 +08:00
Yonghong Zhu 860992ed70 BaseTools: Extend the RAW format to support multiple binary files
Current FDF spec updated to support multiple binary files for RAW File
in the [FV] and [Capsule] section. For the multiple normal files, it may
have the optional FfsAlignment.
Example:
FILE RAW = 197DB236-F856-4924-91F8-C1F12FB875F3 {
 Align=16 $(PLATFORM_PACKAGE)/Binaries/File1.pdb
 Align=16 $(PLATFORM_PACKAGE)/Binaries/File2.pdb
 Align=16 $(PLATFORM_PACKAGE)/Binaries/File3.pdb
}

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-03-27 15:11:52 +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
Peter Kirmeier 4480414642 BaseTools: Updated BuildNotes URLs
Updated URLs (git repository and step-by-step instructions)

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Peter Kirmeier <topeterk@freenet.de>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-03-25 09:46:44 +08:00
Yonghong Zhu 3570e33248 BaseTools: not include the undefined macro in response file
In last Nmake patch, when we generate the response file, we would replace
all the Macros in the make file. Once there have undefined macro used,
the tool direct report error. In this patch, we use following solution to
resolve the failure.
1. Add all the defined macros into AutoGenObject macro dict
2. For the undefined macros which used in the Make file, when we generate
the response file, we not include this macro, let make phase to handle.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-03-23 17:36:09 +08:00
Yonghong Zhu 725cdb8fbf BaseTools: Fix nmake failure due to command-line length limitation
NMAKE is limited to command-line length of 4096 characters. Due to the
large number of /I directives specified on command line (one per include
directory), the path length of WORKSPACE is multiplied by the number of
/I directives and can exceed the limit.
This patch:
1. Add new build option -l, --cmd-len to set the maximum command line
length, default value is 4096.
2. Generate the response file only if the command line length exceed its
maximum characters (default is 4096) when build the module. Cover
PP_FLAGS, CC_FLAGS, VFRPP_FLAGS, APP_FLAGS, ASLPP_FLAGS, ASLCC_FLAGS and
ASM_FLAGS.
3. The content of the response file is combine from the FLAGS option and
INC option.
4. When build failure, it would print out the response file's file
location and its content.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-03-22 17:16:49 +08:00
Yonghong Zhu 763e8edf61 BaseTools: add new command line option to support override PCD value
this patch add new feature to support override PCD value on the command
line. The value from the command line is the highest priority.
1.Add option(--pcd) to support both PcdName and TokenSpaceGuild.PcdName
2.For void* type PCD, use following format:
  cstring PCD: --pcd PcdName="string"
  unicodestring PCD: --pcd PcdName=L"string"
  CArray PCD: --pcd PcdName=B"{0x1, 0x2}"
3.Build Report, use *B to show the PCD value was overridden in the
command line.
4.Error Condition:
Report error if the PCD is not found
Report error if the PcdName is found under multiple different TokenSpaceGuid
Report error if PCD value syntax is incorrect
Report error if void* type PCD value exceed its max size

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-03-16 10:35:52 +08:00
Marvin Haeuser 89a811538e BaseTools: Support recent versions of cx_freeze.
This patch fixes the assumed invalid command to start recent versions
of cx_freeze on Windows, which are python and not Windows
executables. To launch them correctly, the '$(PYTHON_HOME)\python'
prefix has been added, so that Python can interpret the tool.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-03-15 17:03:10 +08:00
Yonghong Zhu df1e1b63d4 BaseTools: Add two macros into AutoGenObject macro dict
Add DEST_DIR_OUTPUT and DEST_DIR_DEBUG into AutoGenObject macro dict.
Because some module (eg: BaseUefiCpuLib) may use this macro in the make
file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-03-15 16:59:52 +08:00
Peter Kirmeier f9b940ecf9 BaseTools: Mentioned get_vsvars.bat at ReadMe
When someone doesn't know where to find or what to do with
vsvars32.bat, get_vsvars.bat can be used.

CC: Yonghong Zhu <yonghong.zhu@intel.com>
CC: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Peter Kirmeier <topeterk@freenet.de>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-03-15 12:35:15 +08:00
Yonghong Zhu 53c1329529 BaseTools/BPDG: Fix the bug to get the PCD Size
The original bug is only consider int format of PcdSize, but forgot the
Hex format. The fix is use the already exist variable PCD.PcdBinSize
which done to translate PCD size cover both format.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-03-14 11:33:12 +08:00
Yonghong Zhu 3a0f8bdef3 BaseTools: update the mail address for stack trace info
Update the mail address from edk2-devel@lists.sourceforge.net to
edk2-devel@lists.01.org.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Andrew Fish <afish@apple.com>
2016-03-11 12:29:59 +08:00
Jordan Justen 7e869eeb15 BaseTools ConvertMasmToNasm: Support Python 3
The script is updated to support both python 2.7 and python 3.

v2:
 * Use io.open() rather than open() (Jaben)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
2016-03-10 10:01:40 -08:00
Jordan Justen bc6a342535 BaseTools ConvertMasmToNasm: Fix exception when no arguments are given
Convert to use the argparse library rather than optparse.

As part of the conversion, the script will now give an error message
if no arguments are given. Previously the script would give an
exception when no arguments were given.

Fixes: https://github.com/tianocore/edk2/issues/65
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-03-10 10:01:39 -08:00
Jordan Justen 5369c2bb73 BaseTools ConvertMasmToNasm: Fix running script outside of a git tree
The script previously would hit an exception if it was run outside of
a git tree.

The exception looked like:

edk2/BaseTools/Scripts/ConvertMasmToNasm.py Version 0.01
Traceback (most recent call last):
  File "edk2/BaseTools/Scripts/ConvertMasmToNasm.py", line 986, in <module>
    ConvertAsmApp()
  File "edk2/BaseTools/Scripts/ConvertMasmToNasm.py", line 984, in __init__
    ConvertAsmFile(src, dst, self)
  File "edk2/BaseTools/Scripts/ConvertMasmToNasm.py", line 209, in __init__
    CommonUtils.__init__(self, clone)
  File "edk2/BaseTools/Scripts/ConvertMasmToNasm.py", line 69, in __init__
    self.gitemail = clone.gitemail
AttributeError: ConvertAsmApp instance has no attribute 'gitemail'

Fixes: https://github.com/tianocore/edk2/issues/63
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-03-10 09:59:11 -08:00
Cohen, Eugene eca22f362c BaseTools: Update ARM/AArch64 GenFv vector processing for encapsulated FVs
Instead of only handling SEC Core or PEI Core instances in the outer FV,
the GenFv tool will now recurse into FV image FFS files to look for instances
in encapsulated FVs so the vector area can be updated appropriately.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-03-10 22:04:11 +07:00
Yonghong Zhu 815ada26cb BaseTools: report warning if VOID* PCD with {} value is not 8-byte aligned
For VOID* Pcd with {} value, If platform developer wants to put in a
specific hex offset value that is not 8-byte aligned for VOID * then we
allow it with a warning message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-03-10 17:39:58 +08:00
Liming Gao 452582852d BaseTools: Change source files to DOS format.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-03-10 17:37:51 +08:00
Marvin Haeuser 01e418d652 BaseTools: Add Multiple Workspaces support for custom Makefiles.
This patch makes sure the MODULE_DIR variable points to the correct
location when multiple workspaces are used. Currently, it is
always prefixed with $(WORKSPACE), which only works as long as the
package is in the Workspace.
Code modules were not effected because the required paths were valid,
but for custom Makefiles, the MODULE_DIR variable is used.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-03-09 10:05:27 +08:00
Yonghong Zhu b9da8fe0e3 BaseTools/LZMA: fix the format issue for last patch
There are no functional changes in this patch. fixing the format base on
last commit.
The only change is 1) add back the blank line, which can help we better
compare with the original LZMA source code. 2) remove the indent of
#ifndef and #endif.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-03-03 12:06:41 +08:00
Yonghong Zhu b0c583cdd1 BaseTools: fix LzmaCompress VS2013 make failure
when make BaseTools by VS2013, LzmaEnc.c report warning C4127:
conditional expression is constant, so this patch fix this issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-02-29 17:56:48 +08: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