summaryrefslogtreecommitdiffstats
path: root/BaseTools
Commit message (Collapse)AuthorAgeFilesLines
* BaseTools: Fix 'caculate' typosHao Wu2016-01-062-3/+3
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19604 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools CLANG35: use -target in PP flags as wellArd Biesheuvel2016-01-041-6/+6
| | | | | | | | | | | | | 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
* BaseTools CLANG35: use linux-gnu target triplets explicitlyArd Biesheuvel2016-01-041-4/+7
| | | | | | | | | | | | | 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
* BaseTool/UPT: Fix a typo issueHess Chen2015-12-301-1/+1
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19576 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTool/ECC: Add UTF-8 support on ECC toolHess Chen2015-12-301-2/+4
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19575 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Fix Makefile to correctly break during a build failureLarry Hauch2015-12-231-17/+23
| | | | | | | | | | Updated the Makefile so that nmake will correctly fail if the cxfreeze command fails to complete successfully. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Larry Hauch <larry.hauch@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19501 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Update Scripts to support VS2015 envLiming Gao2015-12-223-5/+20
| | | | | | | | | | | edk2 Edk2Setup.bat depends on those scripts to configure VS env. Update them to support VS2015. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19431 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Fix one bug in FD region for multiple workspace supportYonghong Zhu2015-12-171-3/+3
| | | | | | | | | | Update the os.path.join to mws.join for FILE/INF/CAPSULE/FV region type. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19319 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools ARM: add CLANG35 supportArd Biesheuvel2015-12-151-3/+25
| | | | | | | | | | | | | | | | | | | 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
* BaseTools/Scripts: Add ConvertUni.py scriptJordan Justen2015-12-151-0/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | This script uses python codecs to convert .uni string files between the utf-16 and utf-8 formats. The advantages of utf-8 data: * Generally smaller files * More commonly supported by editors * Not treated as binary data in patch files The script was tested on MdePkg with both python 2.7 and python 3.4. It was able to convert all MdePkg .uni files between utf-8 and utf-16 multiple times always producing the same files for each format. v2: * Rename ConvertUtf16ToUtf8.py to ConvertUni.py * Also support utf-8 to utf-16 conversion (with --utf-16) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19247 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools/Ecc: Fix a bug to report fake issueHess Chen2015-12-141-0/+4
| | | | | | | | | | Fix a bug to ignore the lib ins defined in [components] section but also listed in SkipDir Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19238 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools/GenFw RVCT: fix relocation processing of PT_DYNAMIC sectionsArd Biesheuvel2015-12-141-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike GNU ld, which can be instructed to emit symbol based static relocations into fully linked binaries using the --emit-relocs command line switch, the RVCT armlink tool can only emit dynamic relocations into the PT_DYNAMIC segment. This has two consequences . we can only identify absolute relocations, so there is no way to fix up relative relocations between sections, or check their validity in the PE/COFF layout . the r_offset fields of the PT_DYNAMIC DT_REL entries are relative either to the base of the image or to any of its segments but *not* to the base of the input section that contains the location they refer to, and converting them to PE/COFF image offsets is non-trivial unless the sections are laid out in the same way in the ELF and PE/COFF versions of the binary. There is really only one way to deal with this, and that is to require that the ELF and PE/COFF versions of the binary are identical in memory. So enforce that in the code. Also, fix the utterly broken relocation fixup code that dereferences ELF32_R_SYM(r_info) both as a 1-based program header index and a 0-based section header index. If this code ever produced working binaries, it was purely by chance. 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@19236 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools RVCT: use scatter file to enforce minimum section alignmentArd Biesheuvel2015-12-143-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* BaseTools GCC: avoid the use of COMMON symbolsArd Biesheuvel2015-12-082-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert the change in r19143 for BUILDRULEORDER.Yonghong Zhu2015-12-081-27/+0
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19150 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: update man page to add some descriptionsYonghong Zhu2015-12-071-345/+378
| | | | | | | | | | | add the description for --ignore-sources and --check-usage into man page. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19144 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: process the files by the priority in BUILDRULEORDERYonghong Zhu2015-12-071-0/+27
| | | | | | | | | | | | | By the BUILDRULEORDER feature to process files listed in INF [Sources] sections in priority order, if a filename is listed with multiple extensions, the tools will use only the file that matches the first extension in the space separated list. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19143 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Fix a bug when apply patches to SEC use the FILE_GUID overrideYonghong Zhu2015-12-071-1/+4
| | | | | | | | | | | | | Fix a bug when applying patches to SEC modules that use the FILE_GUID override. Since a temp dir is used when FILE_GUID override is used, the INF file path comparisons fail. The fix is to capture the real INF file path comparisons instead of using the temp dir path to the INF. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19142 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Enhance GenFv Tool to report error messageYonghong Zhu2015-12-072-31/+35
| | | | | | | | | | | | | When two vtf files in one FV image, no FV file can be generated, but it report the stack trace info. so we enhance the tool to report error message directly but not the stack trace info. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19141 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Fix a bug in the VPD report generationYonghong Zhu2015-12-071-3/+3
| | | | | | | | | | | | Changed the if condition to check whether current Region is FD VPD region to fix a bug in the VPD report generation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19139 6f19259b-4bc3-4df7-8a09-765794883524
* Revert the change in r19137.Yonghong Zhu2015-12-072-24/+21
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19138 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Enhance GenFv Tool to report error messageYonghong Zhu2015-12-072-21/+24
| | | | | | | | | | | | When two vtf files in one FV image, no FV file can be generated, but it report the stack trace info. so we enhance the tool to report error message directly but not the stack trace info. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19137 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Add support for INF statement in FD regionYonghong Zhu2015-12-073-31/+91
| | | | | | | | | | | | FD region today can be file or data, but not a patched image.Add support for an INF statement in an FD region, so the binary from the INF can be patched prior to being added to the FD region. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19136 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools PatchCheck.py: Support binary diffJordan Justen2015-12-031-0/+6
| | | | | | | | | | | This allows a patch with binary data that is generated with --binary to be parsed by the PatchCheck.py script. 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@19104 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Add VS2015 tool chain in tools_def.templateWang Yu2015-12-031-4/+515
| | | | | | | | 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
* BaseTools RVCT: add preprocessor preinclude for AutoGen.hEugene Cohen2015-12-021-1/+1
| | | | | | | | | | | 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
* BaseTools: Clean some coding style issuesYonghong Zhu2015-12-0128-557/+557
| | | | | | | | | | This patch clean some coding style issues, majorly for space character. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19080 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools/toolsetup.bat: fixed the error when the path contains spaceYonghong Zhu2015-11-301-16/+5
| | | | | | | | | | | | | We have a new simple and effective method to resolve the original issue that the PATH env's update error when the path contains space, so this patch remove the last check in and use the new method to fix the original 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19028 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Add build error detection for Dynamic PCD name conflictYonghong Zhu2015-11-301-16/+36
| | | | | | | | | | | | | | when multiple Dynamic PCD have different token space guid but same PCD name, it is difficult for user to check why the generated autogen.c and autogen.h are not consistent. so we add a check before generating autogen.c and report error directly that user can know what happened immediately. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19027 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Add a VPD report subsection of FLASH to the ReportYonghong Zhu2015-11-301-0/+35
| | | | | | | | | | | | Build Spec already added a VPD report subsection of FLASH to the Report chapter, it provide a simple way for user to determine where the VPD region and VPD PCDs are located in the fd 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19026 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools/GenFw ARM: allow R_ARM_REL32 relocationsArd Biesheuvel2015-11-241-0/+2
| | | | | | | | | | | | R_ARM_REL32 are relative relocations, so we don't need to do anything special when performing the ELF to PE/COFF conversion, since our memory layout is identical between the two binary formats. So just allow them. 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@18931 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTool/UPT: Add supporting of decimal numbers for INF_VERSION and ↵Hess Chen2015-11-183-8/+15
| | | | | | | | | | | DEC_SPECIFICATION Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18868 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools/toolsetup.bat: fixed the error when the path contains spaceYonghong Zhu2015-11-171-5/+16
| | | | | | | | | | | when the path contains space, it will report error for PATH Environment update. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18852 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Fix two warning reported in the make phase.Yonghong Zhu2015-11-172-3/+18
| | | | | | | | | | | when we make BaseTools, it report warnings about VfrError.cpp and VolInfo, so this patch fix this warning. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18851 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools/GenFw: add new option to not zero PE/COFF optional header fieldsYonghong Zhu2015-11-111-34/+48
| | | | | | | | | | | | Add new option --keepoptionalheader and that flag does not zero PE/COFF optional header fields including the version fields. It can support the case that the PE/COFF optional header would be kept. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18767 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools GCC: move PECOFF_HEADER_SIZE definition before LD scriptArd Biesheuvel2015-11-091-2/+2
| | | | | | | | | | | | | 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
* BaseTools: Allow decimal values in the EDK II meta-data fileYonghong Zhu2015-11-092-4/+15
| | | | | | | | | | | | Because the EDK II meta-data specifications already allow using decimal values in the EDK II Meta-data file [Defines] section, this patch update code to allow this usage. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18746 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Print PACKAGES_PATH build environment if it is set.Liming Gao2015-11-061-0/+6
| | | | | | | | | | Print the optional build environment PACKAGES_PATH and EDK_TOOLS_BIN. 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@18733 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Don't require ECP pkg in WORKSPACE when PACKAGES_PATH is setLiming Gao2015-11-061-10/+12
| | | | | | | | | | | When PACKAGES_PATH is set, ECP pkg may be in another directory, not exist in WORKSPACE. So, keep this check in single WORKSPACE. 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@18731 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools:remove the redundant directories for '-f' with absolute path.Yonghong Zhu2015-10-271-10/+15
| | | | | | | | | | | when the absolute path is given to '-f', it would create some redundant empty directories. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18675 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Add MultipleWorkspace.py in the common dependency.Liming Gao2015-10-261-0/+1
| | | | | | | | | | | Add new added MultipleWorkspace.py in the common dependency to freeze python tools for Windows. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18663 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools:added extern protocol/PPI/GUID definition in AutoGen for LibraryYonghong Zhu2015-10-261-15/+12
| | | | | | | | | | | | We already added the extern declaration for protocols/PPI/GUID in AutoGen.h file for driver, but missing this feature for the Library. so this patch add it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18661 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools/Scripts: Add PatchCheck.py scriptJordan Justen2015-10-221-0/+607
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This script can be used to check some expected rules for EDK II patches. It only works on git formatted patches. It checks both the commit message and the lines that are added in the patch diff. In the commit message it verifies line lengths, signature formats, and the Contributed-under tag. In the patch, it checks that line endings are CRLF for all files that don't have a .sh extension. It verifies that no trailing whitespace is present and that tab characters are not used. Patch contributors should use this script prior to submitting their patches. Package maintainers can also use it to verify incoming patches. It can also be run by specifying a git revision list, so actual patch files are not always required. For example, to checkout this last 5 patches in your git branch you can run: python PatchCheck.py HEAD~5.. Or, a shortcut (like git log): python PatchCheck.py -5 The --oneline option works similar to git log --oneline. The --silent option enables silent operation. The script supports python 2.7 and python 3. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Cc: Erik Bjorge <erik.c.bjorge@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18652 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools VfrCompiler: In order to keep consistent, add an optional ";" for ↵Eric Dong2015-10-151-6/+6
| | | | | | | | | | | | condition op-code. Current grammar for suppressif opcode not consistent in statement and option case, this patch fixed this issue. The same case also existed for other condition opcodes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18606 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Fix the issue to support windows root directoryLiming Gao2015-10-141-1/+1
| | | | | | | | | | Use os.path.relpath to get the relative directory instead of directly trim it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18602 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Fixed an error reported during generating reportYonghong Zhu2015-10-121-5/+6
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18601 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTool/UPT: Fix two wrong imports for UPTHess Chen2015-10-102-2/+2
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18600 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools/PeCoffLoader: fix handling of ARM MOVW/MOVT instruction relocsArd Biesheuvel2015-10-091-1/+1
| | | | | | | | | | | | | | The handling of ARM MOVW/MOVT relocations sets the FixupData twice (once incorrectly), but fails to advance the *FixupData pointer afterwards. This is not actually a problem, since the fixup data is never used but let's fix it anyway in case anyone reuses this code. 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@18596 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Update edksetup.sh to support multiple workspacesLiming Gao2015-10-081-17/+49
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Wu Hao A <hao.a.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18584 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Update Edk2Setup.bat to support multiple workspacesLiming Gao2015-10-082-1/+3
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Wu Hao A <hao.a.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18583 6f19259b-4bc3-4df7-8a09-765794883524