summaryrefslogtreecommitdiff
path: root/BaseTools
AgeCommit message (Collapse)AuthorFilesLines
2017-10-16BaseTools: Fix a bug Build directory should relative to WORKSPACEYonghong Zhu3-1/+3
The bug is for build output files it still use mws.join function, it cause maybe we will get the build output files in the PACKAGES_PATH because mws.join will try WORKSPACE first, if the file doesn't exist then try PACKAGES_PATH. But for build output, we expected it should relative to WORKSPACE. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-10-11BaseTools: Fix the Keyword error for <ExtendedFvEntry> in FDF FileYonghong Zhu1-1/+1
current in FDF spec 3.6 [FV] section it use "FV_EXT_ENTRY_TYPE" as Keyword for <ExtendedFvEntry>, while in the code it use "FV_EXT_ENTRY". To keep compatibility, this patch support both keyword in the code first. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-10-11BaseTools: Fix the bug 'DSC DEFAULT' in report wrongly use FDF valueYonghong Zhu3-15/+18
current the PCD value in DSC file may be override by FDF file, then it cause the 'DSC DEFAULT' in build report wrongly display the FDF value but not the DSC file's value. This patch add a attribute DscDefaultValue for PcdClassObject to save the actual DSC file's PCD value and use this value to display for 'DSC DEFAULT'. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-10-10BaseTools: Fix a bug to use module's Name attribute as compareYonghong Zhu1-1/+1
Fix a bug to use module's Name attribute as compare for single module build. ModuleFile.File can't be used to compare INF file, because it is the relative path. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-10-03BaseTools: PI 1.6 to support FV extended header contain FV used sizeYunhua Feng4-4/+39
Per PI 1.6 we added an FV Extended Header entry that would contain the size of the FV that was in use. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-28BaseTools: Fix the regression bug to build single moduleYonghong Zhu1-0/+12
The bug is introduced by 1b8eca to collect single module's build time. Now the fix solution is copied from Platform build. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-27BaseTools: add support for BIOS build with binary cacheYonghong Zhu3-9/+189
Add three new options: --hash enables hash-based caching during build process. when --hash is enabled, build tool will base on the module hash value to do the incremental build, without --hash, build tool will base on the timestamp to do the incremental build. --hash option use md5 method to get every hash value, DSC/FDF, tools_def.txt, build_rule.txt and build command are calculated as global hash value, Package DEC and its include header files are calculated as package hash value, Module source files and its INF file are calculated as module hash value. Library hash value will combine the global hash value and its dependent package hash value. Driver hash value will combine the global hash value, its dependent package hash value and its linked library hash value. When --hash and --binary-destination are specified, build tool will copy generated binary files for each module into the directory specified by binary-destination at the build phase. Binary-destination directory caches all generated binary files. When --hash and --binary-source are specified, build tool will try to get the binary files from the binary source directory at the build phase.If the cached binary has the same hash value, it will be directly used. Otherwise, build tool will compile the source files and generate the binary files. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-26BaseTools: report build time measured by module of EDKII BuildYonghong Zhu3-11/+92
In the build report, we add AutoGen Phase, Make Phase and GenFds Phase time duration in the Platform Summary section, and we also add a item in Module section to display module and library's build time. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-25BaseTools: extend FFS alignment to 16MYonghong Zhu12-56/+140
Current FFS only supports 64KiB alignment for data, Per PI 1.6 requirement, we extend FFS alignment to 16M. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-21BaseTool/VfrCompiler: Support Bit fields in EFI/Buffer VarStoreDandan Bi8-490/+1196
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=545 Enhance VfrCompiler to parse following case: 1. EFI/Buffer VarStore can contain bit fields in their structure. 2. For question Oneof/Checkbox/numeric, their storage can be bit fields of an EFI VarStore/Buffer VarStore. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-21BaseTool/VfrCompile: Support Union type in VFRDandan Bi3-37/+65
https://bugzilla.tianocore.org/show_bug.cgi?id=603 Update VfrCompiler to parse the UNION type in vfr file Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-19BaseTools/tools_def AARCH64: enable frame pointers for RELEASE buildsArd Biesheuvel1-5/+5
Commit 8f0b62a5dac0 ("BaseTools/tools_def AARCH64: enable frame pointers for DEBUG builds") removed the -fomit-frame-pointer switch from the CFLAGS definitions that are shared between AARCH64 DEBUG and RELEASE builds, and moved it to the RELEASE specific ones, so that DEBUG builds can produce a backtrace when a crash occurs. This is actually a useful thing to have for RELEASE builds as well. AArch64 has 30 general purpose registers, and so the performance hit of having a frame pointer is unlikely to be noticeable, nor are the additional 8 bytes of stack space likely to present a problem. So remove -fomit-frame-pointer altogether this time. Contributed-under: TianoCore Contribution Agreement 1.1 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>
2017-09-19BaseTools: Fix a bug to correct SourceFileListYonghong Zhu1-0/+7
We met a case that use two microcode files in the Microcode.inf file, one is .mcb file, another is .txt file. then it cause build failure because the SourceFileList include the .txt file's output file, while this output file is still not be generated, so it cause GetFileDependency report failure. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-11BaseTools: Fix a bug for Mixed Pcd value display in the reportYonghong Zhu1-1/+11
the case is that override the mixed pcd value in DSC [Components] section, the value display in the report is incorrect. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-09BaseTools: Not show *B when Pcd value in build option same with DECYonghong Zhu1-3/+3
Per build spec, If the value obtained from either a build option, the DSC or FDF is the same as the value in the DEC, then *B , *P or *F will not be shown in the report. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-09BaseTools: Fix the bug that same region print twice in the build logYonghong Zhu1-26/+32
This patch fixed the bug that same region print twice in the build log. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-09BaseTools: correct to use specific arch to generate DSC databaseYonghong Zhu1-1/+1
Not generic to use 'Common' arch, but use current build arch. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-09-08BaseTools/GCC: set -Wno-unused-const-variable on RELEASE buildsThomas Lamprecht1-8/+8
TianoCore BZ#700 [1] Set the '-Wno-unused-const-variables' in RELEASE builds with the GGC49 and GCC5 toolchain. This fixes the RELEASE build of OVMF with GCC in version 6 or newer. GCC 6 added the '-Wunused-const-variable' warning, which gets activated by '-Wunused-variable' and has the following behavior: "Warn whenever a constant static variable is unused aside from its declaration" [2] Commit 2ad6ba80a1bd58382bde6b994070f7c01d2fb48d introduced a case where exactly this happens on a RELEASE build. All uses of the static const variable are located in debug code only, which gets thrown out by the compiler on RELEASE builds and thus triggers the unused-const-variable warning. There is currently no GCC 6 toolchain target defined and doing so would add a lot of boilerplate code. Instead, use the fact that GCC ignores unknown '-Wno-*' options: "[...] if the -Wno- form is used [...] no diagnostic is produced for -Wno-unknown-warning unless other diagnostics are being produced" This behavior is available in GCC 4.9 [3] (and also earlier, for that matter), so add the flag to the GCC49 and GCC5 toolchain, even if both GCC versions do not supports it. GCC49 doesn't enables LTO whereas GCC5 does. As GCC 6.0 through 6.2 had bugs relating to LTO there can be desire to use the GCC49 target even if compiling with GCC 6, see 432f1d83f77a. Orient the changes on 20d00edf21d2 which moved the '-Wno-unused-but-set-variable' flag to RELEASE builds only, as there it ensure that it does not gets raised if the only usage of a variable is in (then collapsed) debug code. [1] https://bugzilla.tianocore.org/show_bug.cgi?id=700 [2] https://gcc.gnu.org/onlinedocs/gcc-6.4.0/gcc/Warning-Options.html#index-Wunused-const-variable [3] https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Warning-Options.html Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> [lersek@redhat.com: fix typo in subject]
2017-09-05BaseTools: update help info for -Y option to include 'HASH'Yonghong Zhu1-1/+1
Per build spec,the default set of flags for -Y option include 'HASH', so this patch to update the help info. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-31BaseTools/Gcc ARM AARCH64: add support for building device tree binariesArd Biesheuvel2-0/+33
While modern AARCH64 server systems use ACPI for describing the platform topology to the OS, ARM systems and AARCH64 outside of the server space mostly use device tree binaries, which are compiled from device tree source files using the device tree compiler. Currently, such source files and binaries may be kept in the EDK2 platform trees, but are not integrated with the build, which means they need to be kept in sync and recompiled manually, which is cumbersome. So let's wire up BaseTools support for them: add tool definitions for the DTC compiler and preprocessor flags that allow these source files to use FixedPcd expressions and other macros defined by AutoGen.h This way, a device tree binary can be built from source and emitted into a FFS file automatically using something like: DeviceTree.inf: [Defines] INF_VERSION = 0x00010019 BASE_NAME = SomePlatformDeviceTree FILE_GUID = 25462CDA-221F-47DF-AC1D-259CFAA4E326 # gDtPlatformDefaultDtbFileGuid MODULE_TYPE = USER_DEFINED VERSION_STRING = 1.0 [Sources] SomePlatform.dts [Packages] MdePkg/MdePkg.dec SomePlatform.fdf: INF RuleOverride = DTB xxx/yyy/DeviceTree.inf [Rule.Common.USER_DEFINED.DTB] FILE FREEFORM = $(NAMED_GUID) { RAW BIN |.dtb } where it can be picked at runtime by the DTB loader that may refer to it using gDtPlatformDefaultDtbFileGuid. Note that this is very similar to how ACPI tables may be emitted into a FFS file with a known GUID and picked up by AcpiTableDxe at runtime. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-31BaseTools: Enable --whole-archive in GCC tool chain as the default optionLiming Gao1-2/+2
https://bugzilla.tianocore.org/show_bug.cgi?id=581 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-29BaseTools/Conf: Support LLVM39 and LLVM40 in CLANG38 toolchainShi, Steven1-2/+3
https://bugzilla.tianocore.org/show_bug.cgi?id=676 Add LLVM39 and LLVM40 support in CLANG38 toolchain Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-29BaseTools: Update toolsetup.bat to support the case without EDK_TOOLS_BINLiming Gao1-10/+5
When EDK_TOOLS_BIN is not set, %EDK_TOOLS_PATH%\Bin\Win32 will be used as the binary tool directory. But, %EDK_TOOLS_PATH%\Bin\Win32 may not exist. On this case, toolsetup.bat should continue to do the other setting, such VS tool chain and tool conf file copy. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-29BaseTools: Support /WHOLEARCHIVE option in VS2015 tool chainLiming Gao2-1/+6
https://bugzilla.tianocore.org/show_bug.cgi?id=582 Don't enable this option in the default setting, because it may cause VS2015 linker crash. Platform can enable this option in PlatformPkg.dsc like below: [BuildOptions] *_*_*_DLINK2_FLAGS = /WHOLEARCHIVE Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-26BaseTools/EfiRom: Add multiple device id supportDaniel Verkamp2-23/+129
This is a patch to implement writing and dumping of PCI 3.0 Device ID lists in EFI option ROMs in the EfiRom tool. Using this modification, multiple space-delimited device IDs can be specified after -i. The first device in the list is used for the main PCI ROM header Device ID field and is also written in the list. The list is only written when more than one device ID has been specified; when only one device ID is given on the command line, the EfiRom output should be identical to the current code. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=666 Cc: Liming Gao <liming.gao@intel.com> Cc: Tomas Pilar <tpilar@solarflare.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-25BaseTools: Update tools_def to remove /Gw option in VS NOOPT targetLiming Gao1-16/+16
To remove /Gw option is to disable size optimization. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-25BaseTools: Add the missing -pie link option in GCC tool chainLiming Gao1-2/+2
https://bugzilla.tianocore.org/show_bug.cgi?id=671 GCC tool chain uses -fpie in CC_FLAGS. So, add -pie in DLINK_FLAGS. More discussion in https://lists.01.org/pipermail/edk2-devel/2017-August/013508.html 3.13 Options for Linking ======================== '-pie' Produce a position independent executable on targets that support it. For predictable results, you must also specify the same set of options used for compilation ('-fpie', '-fPIE', or model suboptions) when you specify this linker option. 3.18 Options for Code Generation Conventions ============================================ '-fpie' '-fPIE' These options are similar to '-fpic' and '-fPIC', but generated position independent code can be only linked into executables. Usually these options are used when '-pie' GCC option is used during linking. '-fpie' and '-fPIE' both define the macros '__pie__' and '__PIE__'. The macros have the value 1 for '-fpie' and 2 for '-fPIE'. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2017-08-24BaseTools/UPT: Fix UNI file name issueHess Chen4-4/+16
Fix the issue of creating duplicate UNI file names Fix the issue of removing packages Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-24BaseTools: Roll back GenFw Change to keep unknown field in RSDS debug entryLiming Gao1-7/+1
https://lists.01.org/pipermail/edk2-devel/2017-August/013488.html These fields are actually a GUID and DWORD respectively: the GUID identifies the PDB to make it possible to verify that a given PDB matches the PE file, and the DWORD is the "age" of the PDB which is simply a helper value that is incremented by 1 by the linker every time the file is remade. Wiping the GUID will cause PDB parsers (such as the MS DIA SDK that IDA and most other tools use) to treat the PDB as a mismatch and refuse to load it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
2017-08-14BaseTools: Fix Segmentation fault: 11 when build AppPkg with XCODE5Andrew Fish1-1/+11
it is a bug in mtoc setting the size of the debug directory entry to the size of the .debug section, not the size of the EFI_IMAGE_DEBUG_DIRECTORY_ENTRY. It was causing a loop to iterate and get bogus EFI_IMAGE_DEBUG_DIRECTORY_ENTRY data and pass that to memset() and boom. Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-13BaseTools: Support TabSpace between section tag in DEC fileYanyan Zhang1-1/+1
Per DEC spec, multiple section tag use <TS> to separate, and it can support Tab, so this patch fix the bug to use Tab. <TabSpace> ::= {<Tab>} {<Space>} <TS> ::= <TabSpace>* Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yanyan Zhang <yanyanx.zhang@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-12BaseTools: Don't need to add extra quotes when UI string from fileBin Wang1-2/+1
when the UI string is read from files, we don't need to add the extra quotes. Otherwise, it will cause UI name has this extra quotes. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bin Wang <binx.a.wang@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-12BaseTools/UPT: Support Multiple InstallationHess Chen8-102/+145
Add a new feature to UPT to support installing multiple DIST packages in one time. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-11BaseTools/Scripts: Add sample makefile for use with RunMakefile.pyMichael D Kinney1-0/+43
https://bugzilla.tianocore.org/show_bug.cgi?id=670 Add sample makefile that can be used to test RunMakefile.py script and can also be used as a template to start a new PREBUILD/POSTBUILD makefile. This makefile contains TAB characters instead of spaces on purpose to maximize compatibility with make utilities. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-11BaseTools/Scripts: Add python script to run a makefileMichael D Kinney1-0/+178
https://bugzilla.tianocore.org/show_bug.cgi?id=670 Add the python script RunMakefile.py that can be used in a PREBUILD/POSTBUIILD action to invoke a makefile passing in context as makefile defines. The command line arguments passed into RunMakefile.py are converted to the following set of defines. * ACTIVE_PLATFORM * TARGET_ARCH * TOOL_CHAIN_TAG * CONF_DIRECTORY * TARGET * EXTRA_FLAGS In addition, a makefile can access the system environment variables including WORKSPACE and PACKAGES_PATH. The makefile target from the following set is also passed into the makefile. If no target is passed into build, then the 'all' target is used. [all|fds|genc|genmake|clean|cleanall|cleanlib|modules|libraries|run] A platform DSC file can use a statements in the [Defines] section of the following form to use this script. MAKEFILE is a WORKSPACE or PACKAGES_PATH relative path to the makefile to run. [Defines] PREBUILD = python BaseTools/Script/RunMakefile.py --makefile MAKEFILE POSTBUILD = python BaseTools/Script/RunMakefile.py --makefile MAKEFILE Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-11BaseTools/build: Expand PREBUILD/POSTBUILD DSC actionsMichael D Kinney2-30/+82
https://bugzilla.tianocore.org/show_bug.cgi?id=670 * Extend PREBUILD/POSTBUILD define values to support more than one argument. * Delay normalization of PREBUILD/POSTBUILD define values until all arguments in the define values can be processed. * Convert PREBUILD/POSTBUILD build define value arguments that are WORKSPACE or PACKAGES_PATH relative paths to absolute paths. * Append -p PlatformFile, --conf=ConfDirectory, and build target flags to command line used to execute PREBUILD/POSTBUILD actions. * Remove PrebuildScript and PostbuildScript fields from the Build class and use Prebuild and Postbuild fields instead. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-11BaseTools: Fix Xcode 9 Beta treating 32-bit left shift as undefinedYonghong Zhu2-4/+4
Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=635 Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-07BaseTools/Conf: apply nasmb, asm16 build rule orderChris Ruffin1-1/+1
Prioritize nasmb rule over asm16 where both source types are specified. Change-Id: I33ec348dab66b313ddb05cb15f2d8407a648c320 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chris Ruffin <chris.ruffin@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-08-04BaseTools/VfrCompile: Remove the MAX_PATH limitationDandan Bi2-26/+1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=579 Since we have already used LongFilePath() to convert file path, so we can remove the MAX_PATH limitation. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Daniel Díaz <daniel.diaz@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2017-08-04BaseTools/VfrCompile: Fix segmentation fault issuesDandan Bi1-7/+7
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=532 (1) Add NULL check before using a pointer. (2) Use "%s" format string in DebugError function to avoid crash caused by incorrect input. Cc: Bo Chen <chenbo@pdx.edu> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2017-08-03edk2: Move License.txt file to rootMichael D Kinney1-25/+0
https://bugzilla.tianocore.org/show_bug.cgi?id=642 Add top level License.txt file with the BSD 2-Clause License that is used by the majority of the EKD II open source project content. Merge copyright statements from the BSD 2-Clause License files in each package directory and remove the duplication License.txt file from package directories. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Andrew Fish <afish@apple.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-08-03edk2: Move TianoCore Contribution Agreement to rootMichael D Kinney1-218/+0
https://bugzilla.tianocore.org/show_bug.cgi?id=629 Move Contributions.txt that contains the TianoCore Contribution Agreement 1.0 to the root of the edk2 repository and remove the duplicate Contributions.txt files from all packages. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Andrew Fish <afish@apple.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-08-03BaseTools/PatchCheck: Support Contribution Agreement 1.1Michael D Kinney1-3/+6
https://bugzilla.tianocore.org/show_bug.cgi?id=628 Update PatchCheck.py to support either "Contributed-under: TianoCore Contribution Agreement 1.0" or "Contributed-under: TianoCore Contribution Agreement 1.1" in the commit message. Temporarily continue to allow the TianoCore Contribution Agreement 1.0 agreement. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Andrew Fish <afish@apple.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-08-01BaseTools/GenCrc32: Fix a bug to hand empty file for decodeYonghong Zhu1-2/+6
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=535 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>
2017-08-01BaseTools/EfiLdrImage: Fix a segmentation fault from vfprintf()Yonghong Zhu1-3/+3
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=533 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>
2017-08-01BaseTools/EfiRom: Fix a segmentation fault from vsprintf()/vfprintf()Yonghong Zhu1-3/+3
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=534 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>
2017-08-01BaseTools/GenFfs: Fix a segmentation fault from vsprintf()/vfprintf()Yonghong Zhu1-3/+3
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=536 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>
2017-08-01BaseTools/GenSec: Fix a segmentation fault in main()Yonghong Zhu1-2/+6
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=537 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>
2017-08-01BaseTools/Split: Fix the segmentation fault in GetSplitValue()Yonghong Zhu1-3/+7
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=538 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>
2017-08-01BaseTools: Fix the bug to correctly check Pcd type that in FDF fileYonghong Zhu1-0/+7
We set Pcd value in FDF and used this Pcd as PatchableInModule type in module, it cause build report generate failure. because we incorrectly set the Pcd type during check whether the Pcd is used. 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>