summaryrefslogtreecommitdiffstats
path: root/BaseTools
Commit message (Collapse)AuthorAgeFilesLines
* BaseTools: Fix a bug of genffs command generationFeng, Bob C2019-10-141-1/+2
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2221 The command used by multiple thread genffs feature in makefile for testing if file exist is generated based on the toolchain family. It should be based on the OS type. Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: strip trailing whitespaceLeif Lindholm2019-10-0410-18/+18
| | | | | | | Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools: correct line endings for ConvertFce Python scriptLeif Lindholm2019-10-041-5/+5
| | | | | | | | | | Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* BaseTools: fix line endings in SetupGit.py Conf filesLeif Lindholm2019-10-042-2/+2
| | | | | | | | | | | | | | A file header license/copyright header copied around in commit 5b3e695d8ac5 ("BaseTools: add centralized location for git config files") was missing a CR - add it in both faulty locations. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* BaseTools: add missing newlines at end of filesLeif Lindholm2019-10-043-3/+3
| | | | | | | | | | | | Some scripts in Source/Python were missing newlines at end of files, so add them. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* BaseTools: Fix GenMake multi-workspace failureKubacki, Michael A2019-10-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2232 Commit 0075ab2cec introduced an issue that causes an exception when multiple workspace packages paths are specified. For example, if edk2-platforms is used, the root directory will contain an edk and edk2-platforms directory representing the respective repositories. In GenMake, the path to the package DEC file for a module is discovered by getting the relative path of the INF to the workspace root directory. Each directory in the relative path is incrementally joined to the WORKSPACE directory. The file list in the joined path is searched for a DEC file. As an example, if the build command is used on a package outside the edk2 repository, the INF file path is relative to the edk2-platforms directory not edk2. This causes directory paths to be built that do not exist. Commit 0075ab2cec replaced the os.path.exists() call with a try except block that always fails when os.listdir() is invoked to enumerate the list of files in the built directory path on packages outside edk2. This commit restores the original conditional statement which avoids calling os.listdir() with an invalid directory path. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: use stdint.h for GCC ProcessorBind.h typedefsLeif Lindholm2019-10-011-13/+13
| | | | | | | | | | | | | | | | | The AArch64 definitions of UINT64/INT64 differ from the X64 ones. Since this is on the tool side, doing like X64 and picking the definitions from stdint.h feels like a better idea than hardcoding them. So copy the pattern from X64/ProcessorBind.h. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* BaseTools/LzmaCompress: Fix the option "d" dictionary sizeZhang, Shenglei2019-09-301-4/+8
| | | | | | | | | | | | | | The range of dictionary size is set from [0,30] to [0,27]. And update the help information for this. The previous logic for processing the parameter dict size is incorrect. Now fix the logic. The option "d" is added at 6b80310f34199d1f62e45e40fa902734735091fa. (https://bugzilla.tianocore.org/show_bug.cgi?id=2077) Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix the lib order in static_library_files.lstFeng, Bob C2019-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2216 This patch is going to fix the lib order in static_library_files.lst. This issue is introduced by commit 673d09a2dd. Before 673d09a2dd, build tool apply build rule for the module's library firstly and then apply build rule for module itself. Now, build tool apply build rule for module self and then for its library. That behavior impact the lib order in static_library_files.lst. This patch is to call module's LibraryAutoGenList function explicitly, where the applying build rule action for library is triggered. Cc: Liming Gao <liming.gao@intel.com> Cc: dann frazier <dann.frazier@canonical.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Tested-by: dann frazier <dann.frazier@canonical.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools:"--exclude" don't apply if parameter ends with separatorFan, ZhijuX2019-09-271-0/+1
| | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1944 FormatDosFiles.py Intel\ServerSiliconPkg --exclude Library\SimRegisters\ Its parameter "Library\SimRegisters\" ends with '\' but I can't seem to get it to exclude the SimRegisters directory This patch is going to fix this issue Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
* BaseTools: init DependencyHeaderFileSet for each MakeFile classFeng, Bob C2019-09-241-1/+5
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2203 This patch is going to fix a regression issue that build breaks when the custom makefile exist. Cc: Liming Gao <liming.gao@intel.com> Cc: Steven Shi <steven.shi@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* Add VS2019 Support on ToolSetup BatchesCheng, Ching JenX2019-09-233-23/+116
| | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2182 Inorder to support VS2019, we add VS2019 config process in Setup Batch Files, Because VS2019 and VS2017 could using same vswhere.exe to detect the InstallationPath, So we add the -version as the parameter of vswhere to get the correct VS2017/VS2019's InstallationPath v3: In BaseTools\set_vsprefix_envs.bat, move WINSDK10_PREFIX setting into VCToolsInstallDir check condition. Cc: Amy Chan <amy.chan@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Ching JenX Cheng <ching.jenx.cheng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Pete Batard <pete@akeo.ie>
* Add VS2019 Toolchain defCheng, Ching JenX2019-09-231-19/+201
| | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2182 In order to support VS2019, the first thing need to do is add 2019 toolchain on tools_def.template v2: add ARM/AARCH64/EBC Definitions, Combine VS2017_HOST and VS2019_HOST to VS_HOST Cc: Amy Chan <amy.chan@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Ching JenX Cheng <ching.jenx.cheng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Pete Batard <pete@akeo.ie>
* BaseTools/LzmaCompress: Add two switchesZhang, Shenglei2019-09-233-11/+38
| | | | | | | | | | | As is requested in the BZ 2077, add two switches to support setting compression mode and dictionary size. (https://bugzilla.tianocore.org/show_bug.cgi?id=2077) Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* Revert "BaseTools: Improve GetDependencyList function"Liming Gao2019-09-211-16/+13
| | | | | | | | | | This reverts commit bc9e4194cf3edaf9524c83098ba3f72008c70190. This change causes the dependent header files are missing in Makefile. It makes the incremental build not work. So, revert this change. Cc: Bob Feng<bob.c.feng@Intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng<bob.c.feng@Intel.com>
* BaseTools:Fix the issue that build report failedFan, ZhijuX2019-09-191-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2201 An error occurs using special VpdPcd that is not used in the Inf file In dsc: [PcdsDynamicExVpd.common.DEFAULT] gBoardModuleTokenSpaceGuid.test1|*|{CODE({ {0x0} // terminator })} In dec: [PcdsDynamicEx] # Vpd GPIO table gBoardModuleTokenSpaceGuid.test1|{0}|GPIO_INIT_CONFIG[]|0x50000018 { <HeaderFiles> Library/GpioLib.h <Packages> MdePkg/MdePkg.dec } ValueError: invalid literal for int() with base 0: '*' This Patch is going to fix issue Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Add more parameter checking for CopyFileOnChange()Steven Shi2019-09-191-1/+2
| | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2193 The current CopyFileOnChange() method in Misc.py does not accept the input SrcFile parameter as a dir, but the method does not check the SrcFile is dir or not. This patch is to add more input parameter type checking and error message output for method CopyFileOnChange. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:Remove the unnecessary operation of renaming a file.Feng, Bob C2019-09-171-20/+3
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2183 This patch is going to remove rename call to reduce unnecessary io operation so that saving build time. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: remove unnecessary calls of os.existFeng, Bob C2019-09-175-60/+63
| | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2101 This patch is going to remove unnecessary calls of os.exist() Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Improve GetDependencyList functionFeng, Bob C2019-09-171-13/+16
| | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2102 GetDependencyList get the header file via re.findall in the whole header file. This patch is to pre-process the header file and to feed the shorter string to re.findall. This patch is to improve GetDependencyList() efficiency Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools:change some incorrect parameter defaultsFan, ZhijuX2019-09-1719-23/+60
| | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1858 for Dict={},There are pitfalls in the way this default parameter is set and Dict is not used in functions, other functions have these two cases, I will change some incorrect parameter defaults This patch is going to fix this issue Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:Replace PlatformInfo with PlatformAutoGen for MoudleFan, ZhijuX2019-09-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2188 build -p MdeModulePkg\MdeModulePkg.dsc -a IA32 -m MdeModulePkg\Universal\PCD\Pei\Pcd.inf Error: AttributeError: 'PlatformInfo' object has no attribute 'DynamicPcdList' The DSC data object used to build a separate module today is PlatformInfo rather than PlatformAutoGen 'PlatformAutoGen' object has attribute 'DynamicPcdList' This patch is going to fixed this issue Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Fixed a bug of IgnoreAutoGenFeng, Bob C2019-09-121-0/+1
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2080 After checking that if the build can't ignore Autogen due to there is no compelet autogen files, the build tool need to do a completely Autogen. This patch is to fix a bug that if AutoGen can't be skiped, the SkipAutoGen flag need to set to False Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Robustness for multiple build environmentsBurt Silverman2019-09-111-0/+2
| | | | | | | | | | | | | When building BaseTools, GNUmakefile builds create directory BaseTools/Source/C/libs/. On the other hand, Makefile builds use libs as an nmake pseudo target, so it either must NOT exist as a file or directory, OR it must phony dependency like .PHONY. The latter solution conflicts with NmakeSubdirs.py. Therefore, I make it go away in the cleanall target. I could also add it to the clean target, but it strikes me that cleanall should be more forceful. Signed-off-by: Burt Silverman <burtms@gmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Enable --genfds-multi-thread to default buildFeng, Bob C2019-09-117-11/+14
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1302 This patch enable --genfds-multi-thread to default build. This patch keep --genfds-multi-thread build option for compatibility and also add a new build option to disable genfds-multi-thread as --no-genfds-multi-thread. Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fixed the build fail on Linux with --genfds-multi-threadFeng, Bob C2019-09-111-1/+1
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1302 If GenSec input file not exist, the related command will fail and make will stop on Linux. GenSec input file is allow to be non-existent. This patch is to let "make" continue if gensec input file not exist. Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fixed the bug of multi-thread genffs for override infFeng, Bob C2019-09-114-7/+10
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1302 If there is a inf override, and multi-thread genffs is enabled, build will fail. This patch is going to fix this bug. Cc: Liming Gao <liming.gao@intel.com> Cc: Steven Shi <steven.shi@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Sort Pcd settings to make PcdTokenNumber be fixedFeng, Bob C2019-09-102-1/+12
| | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2147 This patch is to sort the Pcd settings so that PcdTokenNumber will not change if the platform's Pcd settings are the same. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Steven Shi <steven.shi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fixed issue for IgnoreAutoGenFeng, Bob C2019-09-106-136/+253
| | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2080 This patch is to improve build -u option to re-use GlobalVar_<platformguid>_<arch>.bin file which is introduced by multiple-process-autogen feature. Cc: Liming Gao <liming.gao@intel.com> Cc: Steven Shi <steven.shi@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Acked-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fixed build clean regression issueFeng, Bob C2019-09-101-5/+3
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2166 file_lock and cache_lock are used as global data, so move file_lock and cache_lock initialization in Build object __init__ function. Cc: Liming Gao <liming.gao@intel.com> Cc: Steven Shi <steven.shi@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix a bug for Hii Pcd overrideBob Feng2019-09-101-2/+2
| | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2157 Hii Pcd links to a efi variable. The Variable default value is evaluated by related Hii Pcds setting. If multiple Hii Pcds links to one variable, and the offset overlap, the later Hii Pcds setting should be effective. There is a tool bug that is if the Pcds are in different dsc file which are included into the platform dsc file, build tool does not get the Pcds relative position correctly. That means build tool does not know which Pcd is the later one. As the result, the variable default value will be incorrect. This patch is to fix this bug. Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools:ECC need to handle lower case 'static'Fan, ZhijuX2019-09-094-4/+4
| | | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1778 We are going to add keyword (lower case) 'static' for functions and global variables which are not referenced outside their current C file. However, the ECC tool only recognizes upper case 'STATIC' at this moment. This will lead to issue reports for new codes that follow the above coding style. This patch is going to handle lower case 'static' Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:Ecc handle another copyright formatFan, ZhijuX2019-09-091-1/+1
| | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2057 Ecc can not handle the copyright format like (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR> This will cause Ecc to report wrong information. This patch is going to handle this format Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/GenFw AARCH64: fix up GOT based relative relocationsArd Biesheuvel2019-09-041-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We take great care to avoid GOT based relocations in EDK2 executables, primarily because they are pointless - we don't care about things like the CoW footprint or relocations that target read-only sections, and so GOT entries only bloat the binary. However, in some cases (e.g., when building the relocatable PrePi SEC module in ArmVirtPkg with the CLANG38 toolchain), we may end up with some GOT based relocations nonetheless, which break the build since GenFw does not know how to deal with them. The relocations emitted in this case are ADRP/LDR instruction pairs that are annotated as GOT based, which means that it is the linker's job to emit the GOT entry and tag it with an appropriate dynamic relocation that ensures that the correct absolute value is stored into the GOT entry when the executable is loaded. This dynamic relocation is not visible to GenFw, and so populating the PE/COFF relocation section for these entries is non-trivial. Since each ADRP/LDR pair refers to a single symbol that is local to the binary (given that shared libraries are not supported), we can actually convert the ADRP/LDR pair into an ADRP/ADD pair that produces the symbol address directly rather than loading it from memory. This leaves the GOT entry in the binary, but since it is now unused, it is no longer necessary to emit a PE/COFF relocation entry for it. Acked-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* BaseTools: Update GenFw tool to support -e -z option togetherLiming Gao2019-09-041-2/+15
| | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1727 -e -z option is to generate EFI image with zero debug entry. It can be used to check the EFI image in DEBUG build. This fix also supports the case -t -z option together for TE image. Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Feng Bob C <bob.c.feng@intel.com>
* BaseTools: Support more file types in build cacheShi, Steven2019-09-021-20/+14
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1958 Current build cache does not store and restore all types file of Hii/vfr, version and dpx. This patch adds more file types to support them in build cache. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fixed regression issue for building !x86 buildsedk2-stable201908Feng, Bob C2019-08-291-13/+16
| | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2134 This patch is to fix a build tool regression issue which was introduced by commit e8449e1d8e. In commit e8449e1d8e, build tool check the pcd before filter out the irrelevant library instance. The logic of evaluating the priority of the library class resolutions was not changed. Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Acked-by: Leif Lindholm <leif.lindholm@linaro.org> Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
* BaseTools: fix an incremental build issue.Feng, Bob C2019-08-291-6/+2
| | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2137 This patch is going to fix a regression issue of incremental build which was introduced by the commit 94459080c. The changing on INF file will not trigger module rebuild. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Steven Shi <steven.shi@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Incorrect error message for library instance not foundFeng, Bob C2019-08-234-9/+12
| | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2099 This is a regression issue introduced by commit e8449e. This patch is to fix this issue. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix incremental build genmake issueFeng, Bob C2019-08-231-1/+2
| | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2090 This is a regression issue introduced by commit e8449e. This patch is going to fix this issue. Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Support long file path in windows for misc functionsShi, Steven2019-08-231-1/+11
| | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2103 Current CopyFileOnChange() and SaveFileOnChange() in BaseTools\Source\Python\Common\Misc.py don't use the dedicated long file path API to handle the file path strings and cannot support the long file path copy and save in windows. This patch enhances them to support the long file path copy and save correctly. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Update incorrect variable name 'DataPile'Fan, ZhijuX2019-08-201-1/+1
| | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2093 The PlatformAutoGen object has a DataPipe property but no DataPile property So change the variable name 'DataPile' to 'DataPipe' in BuildReport.py This patch is going to fix that issue. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Improve the file saving and copying reliabilityShi, Steven2019-08-208-42/+119
| | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2079 The Basetool CopyFileOnChange() and SaveFileOnChange() functions might raise the IOError occasionally when build in Windows with multi-process and build cache enabled. The CopyFileOnChange() and SaveFileOnChange() might be invoked in multiple sub-processes simultaneously, and this patch adds global locks to sync these functions invoking which can harden their reliability. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Add GenFds multi-thread support in build cacheShi, Steven2019-08-201-6/+17
| | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1923 Fix the issue that the GenFds multi-thread will build fail if enable the build cache together. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Change the [Arch][Name] module key in Build cacheShi, Steven2019-08-202-33/+21
| | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1951 Current build cache use the module's [self.Arch][self.Name] info as the ModuleAutoGen object key in hash list and dictionary. The [self.Arch][self.Name] is not safe as the module key because there could be two modules with same module name and arch name in one platform. E.g. A platform can override a module or library instance in another different path, the overriding module can has the same module name and arch name as the original one. Directly use the ModuleAutoGen obj self as the key, because the obj __hash__ and __repr__ attributes already contain the full path and arch name. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Print first cache missing file for build cachleShi, Steven2019-08-202-0/+78
| | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1925 When a module build cache miss, add support to print the first cache missing file path and name. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Improve the cache hit in the edk2 build cacheShi, Steven2019-08-207-196/+865
| | | | | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1927 Current cache hash algorithm does not parse and generate the makefile to get the accurate dependency files for a module. It instead use the platform and package meta files to get the module depenedency in a quick but over approximate way. These meta files are monolithic and involve many redundant dependency for the module, which cause the module build cache miss easily. This patch introduces one more cache checkpoint and a new hash algorithm besides the current quick one. The new hash algorithm leverages the module makefile to achieve more accurate and precise dependency info for a module. When the build cache miss with the first quick hash, the Basetool will caculate new one after makefile is generated and then check again. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/tools_def.template: Add -gdwarf to XCODE5 X64Andrew Fish2019-08-191-2/+2
| | | | | | | | | | | | | Add -gdwarf to XCODE5 X64 builds to generate symbols for source level debug using lldb. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Andrew Fish <afish@apple.com>
* BaseTools: Fixed issue of incorrect Module Unique NameFeng, Bob C2019-08-192-3/+4
| | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2088 If there are more than one override instance for a same module, the Module Unique Name is generated incorrectly. Cc: Liming Gao <liming.gao@intel.com> Cc: Steven Shi <steven.shi@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/Capsule: Tool to generate Windows Firmware Update DriverJin, Eric2019-08-152-7/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1837 The tool is designed to generate Windows Firmware Update Drivers, the input is one drivername.cap with related parameters, the output Windows Driver package are composed by drivername.cap, drivername.inf and drivername.cat to update the single payload in device. usage: GenerateWindowsDriver [-h] [--output-folder OUTPUTFOLDER] [--product-fmp-guid PRODUCTFMPGUID] [--capsuleversion-dotstring CAPSULEVERSION_DOTSTRING] [--capsuleversion-hexstring CAPSULEVERSION_HEXSTRING] [--product-fw-provider PRODUCTFWPROVIDER] [--product-fw-mfg-name PRODUCTFWMFGNAME] [--product-fw-desc PRODUCTFWDESC] [--capsule-file-name CAPSULEFILENAME] [--pfx-file PFXFILE] [--arch ARCH] [--operating-system-string OPERATINGSYSTEMSTRING] Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Kinney Michael D <michael.d.kinney@intel.com> Signed-off-by: Eric Jin <eric.jin@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>