summaryrefslogtreecommitdiffstats
path: root/BaseTools
Commit message (Collapse)AuthorAgeFilesLines
* BaseTools:Update binary cache restore time to current timeSteven Shi2019-05-311-2/+2
| | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1742 Current Binary Cache doesn't update the restored file creation and modification times to the current time. Preserve the new restored file creation time as old cached time might has potential issue to block the make to build updated files based on the time stamp. Enhance to update the restored file creation time to current time. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Zhiju Fan <zhijux.fan@intel.com> Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:Extend the binary cache to support library cacheSteven Shi2019-05-311-0/+6
| | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1797 Current binary cache doesn't support to save and restore the library module. If a driver module cache miss happen, all its dependency library modules need rebuild which is very time-consuming. This patch is to extend the binary cache to support library. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Christian Rodriguez <christian.rodriguez@intel.com> Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:Change the path of the file that Binary CacheFan, ZhijuX2019-05-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1806 Current Binary Cache use the PlatformInfo.Name to distinguish the different platform cache paths in the database folder. But the different platforms might use the same PLATFORM_NAME in the DSC files. Different platform caches might overlay each other inside Binary Cache database if they use same platform name Use the PlatformInfo.Platform.OutputDirectory instead of the PlatformInfo.Name can solve the problem. This patch is going to fix that issue. Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Steven Shi <steven.shi@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Remove './SecMain' from 'run' targetBob Feng2019-05-241-4/+0
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1561 This patch is related to commit 9ca1f1 It's to remove the second .SecMain call from 'run' target. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools: Update Conf/target.template with the default EmulatorPkg.dscLiming Gao2019-05-231-2/+2
| | | | | | | | Nt32Pkg has been removed. The default platform is changed to EmulatorPkg.dsc. Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Remove './SecMain' from 'run' targetFeng, Bob C2019-05-221-4/+0
| | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1561 When a target of 'run' is passed into build.py, BaseTools unconditionally attempts to execute the application called './SecMain' in the build output directory. This behavior applies to the Nt32Pkg which is being replaced with features in the EmulatorPkg. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools:Update mailing list address in BaseTools error messagesFan, ZhijuX2019-05-2211-10/+12
| | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1815 The edk2 source tree contains four instances of the outdated mailing list address "edk2-devel@lists.01.org". I created a new variable, MSG_EDKII_MAIL_ADDR, to receive the new email address and replaced the old one with this variable Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Library hashing fix and optimization for --hash featureRodriguez, Christian2019-05-213-14/+52
| | | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1788 In V3: Must generate hashes before attempting to copy from cache for hash verifcation In V2: Build failure caused by passing incorrect boolean parameter to SaveFileOnChange(). Fixed for patch instances. Library hashing is now supported by the --hash feature. The --hash feature implementation assumed that the hashing could be done in place once per module, but that isn't true for libraries due to the fact that they are built as dependencies. So on a clean build, we now generate the .hash after the library dependencies are complete. Added early escape as optimization, if hash already exists in memory. Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Fix private includes for FILE_GUID overrideMichael D Kinney2019-05-212-1/+3
| | | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1648 When a module in a DSC file uses a FILE_GUID override in the module scoped <Defines> section, a copy of the modified INF file is placed in the Conf/.cache directory. The check for private includes uses the INF path to determine if the module is allowed to use the private includes. Since the INF path in this case is not in any package, this check always fails, and no private include paths are possible. The fix is to keep both the OriginalPath and the new Path in the PathClass object, and always use the OriginalPath to see if the module INF is in the package with private includes. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/VfrCompile: clean Framework Vfr supportDandan Bi2019-05-131-217/+55
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1464 This commit is to do the cleanup which are missing in previous commit 1b72fd5121b5b31918be0a9a0868a39070d4c8d4 BaseTools/VfrCompile: Remove framework VFR support Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Check the fread function and avoid dead loopLiu, Zhiguang2019-05-101-2/+9
| | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1789 If the input file is not a valid file, it may cause dead loop, because the return of fread function is not checked. Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:Enables FFS to support the GUID value formatFan, ZhijuX2019-05-101-1/+6
| | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1768 Per FDF spec, FFS Rule can specify the hard code FILE Guid value. But,BaseTools reports the build failure.It should be fixed. This patch is going to fix that issue. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Correct the value assignment for StructurePcdFan, ZhijuX2019-05-104-75/+219
| | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1752 This patch is to fix the code bug in StructurePcd overall value assignment logic. If a Pcd Array size is fixed but the size of actual value in Dsc or Dec is bigger than the Pcd array size, the tool will report error about such setting and stop build. The patch is tested minplatform, Ovmf, structure pcd regression test These tests are build pass. The patch also tested the following cases. Our cases focused on PcdArraySize. 1.flexiable PcdArraySize. 2.Fixed PcdArraySize, Pcd overall value exceeds the size of PcdArray. 3.Fixed PcdArraySize, Pcd overall value Not exceeds the size of PcdArray. 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>
* Revert "BaseTools:code of test python module is moved to edksetup"Fan, ZhijuX2019-05-091-0/+8
| | | | | | | | | | | | | This reverts commit df7c81b5b219c9aee776baa466dd64c9d318dd80. In commint df7c81b5b219c9,used a function to test python module But the Boolean value of the return value of this function is the opposite of the Correct result, resulting in an unexpected result Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Fix the issue that build report missing Module SizeBob Feng2019-05-091-1/+1
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1786 commit b1e27d changed GENFW output folder from DEBUG to OUTPUT, but that commit missed updating the buildreport.py for FwReportFileName. This patch is going 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:Delete FrameworkDatabase from BaseTools/ConfFan, ZhijuX2019-05-091-23/+0
| | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1627 The FrameworkDatabase was already obsolete, So, FrameworkDatabase can be removed from BaseTools/Conf. This patch is going to fix this issue. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/VfrCompile: Remove framework VFR supportDandan Bi2019-05-098-215/+15
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1464 Currently there is no usage of framework VFR, remove the support from VfrCompile. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools:The code used to test python module is moved to edksetupFan, ZhijuX2019-05-081-8/+0
| | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1582 testing for presence of python modules should be done in edksetup to reduce impact on subsequent build times. This code currently exists in BaseTools/Tests/RunTest.py. This patch is going to fix this issue. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:Remove unused BaseTools\Source\Python\UPT\DllFan, ZhijuX2019-05-081-0/+0
| | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1735 BaseTools runs from python source. It doesn't depend on dll any more. So, DLL can be removed. This patch is going to fix that issue. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:ECC report errors on account of analyze special charactersFan, ZhijuX2019-05-084-1/+14
| | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1751 In case that a C function body contains the string of L'', L'\"', L"\"", L''', L""", L"\"\"", L"\"^", L" \"", L"\" \"", ('L",\\\""') ECC tool running under python3 interpreter will report error. The antlr4 module misidentified this character This patch is going to fix that issue. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:corrected error message for the DatumType errorFan, ZhijuX2019-05-081-3/+7
| | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1762 For structure Pcd, Its DatumType may be self-defined, If the PCD DatumType format is incorrect, this PCD DatumType error message is inappropriate. This patch corrects the error message. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: support arm64 as a platform name in addition to aarch64Rebecca Cran2019-05-032-4/+6
| | | | | | | | | | | Some systems such as FreeBSD identify the platform as 'arm64' and not 'aarch64' as Linux does. Signed-off-by: Rebecca Cran <rebecca@bluestop.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> [lersek@redhat.com: fix up DKIM damage in the "From:" address]
* BaseTools:Fixed an issue where the order of GuidS changed in guid.xrefFan, ZhijuX2019-05-011-10/+10
| | | | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1749 Add content to dsc [PcdsPatchableInModule.common] gEfiMdeModulePkgTokenSpaceGuid.test1|FALSE The order of file Guid.xref will change after increment build. The root cause is set() is used in Get all the PCDS the order of the data may change if set() is used This patch is going to fix that issue. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Add GCC flags to Basetool build.Feng, Bob C2019-05-011-1/+2
| | | | | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1764 Some compiler flags restrict the compiler from making arbitrary decisions while handling undefined C/C++ behaviors. Therefore they can be used to fix some issues caused by undefined behavior. For example, for GCC, the following flags are available: -fno-delete-null-pointer-checks tells the compiler NOT to assume that null pointer deference does not exist. -fwrapv tells the compiler that signed overflow always wraps. This patch is going to add these 2 build options to BaseTool GCC build option. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* BaseTools: split long line into multiple short lines.Bob Feng2019-05-011-2/+5
| | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1764 To be easy to review in future, split the long line into multiple shorter lines. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* BaseTools/tools_def.template: Remove tools chain with ASL toolShenglei Zhang2019-04-281-1260/+0
| | | | | | | | | | | | | | | | | Microsoft ASL is not verified now. So remove tool chain with ASL tool. They are: VS2008xASL, VS2008x86xASL, VS2010xASL, VS2010x86xASL, VS2012xASL, VS2012x86xASL, VS2013xASL, VS2013x86xASL, VS2015xASL, VS2015x86xASL and CYGGCCxASL. https://bugzilla.tianocore.org/show_bug.cgi?id=1667 v2:Remove definitions of WIN_ASL_BIN, MS_ASL_OUTFLAGS and MS_ASL_FLAGS. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Support customized compiling commandBob Feng2019-04-281-1/+6
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1737 User may add other commands before CC command from build_rule.txt for specific purpose. It worked fine before commit 05217d210e. This patch is going to fix the bug in commit 05217d210e to support customized CC command. 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/PiFirmwareFile: fix undefined behavior in SECTION_SIZELaszlo Ersek2019-04-241-2/+9
| | | | | | | | | | | | | | | | Sync SECTION_SIZE() from MdePkg to BaseTools, from an earlier patch in this series. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1710 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* BaseTools: Remove ICC tool chain in tools_def.templateShenglei Zhang2019-04-241-1092/+0
| | | | | | | | | | | | | | There is no Intel compiler test. Suggest to remove ICC tool chain from tools_def.template. https://bugzilla.tianocore.org/show_bug.cgi?id=1666 Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 323b5b06c593ba6e438847dec7d4acec7f9df970)
* BaseTools: Hash false success.. minor change in hash invalidationChristian Rodriguez2019-04-221-2/+2
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1692 Change part of the hash error handling to invalidate hashes in the cache destination not the cache source. Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:fixed the incorrect autogen makefile which cause build failure.Fan, ZhijuX2019-04-221-8/+7
| | | | | | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1729 On some build environment, build fails but on the other build machines, build success. This is the regression issue introduced by commit 05217d210e8da37b47d0be58ec363f7af2fa1c18 As Dict is unordered, an error occurs when extract the index of the Dict in the order of the keys after the creation of a new item. Keys are indexed inconsistently before and after adding a new item. The logic of the program is to store the key's corresponding index as reference data in the MakeFile and use it as part of the macro. The data model is: $(LIST_%d) % Dict.keys().index(Key) So for now, use OrdereDict instead of Dict. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Enhance Bin Cache database to support save the cacheRodriguez, Christian2019-04-221-8/+7
| | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1726 V2: Added the platform name to the path Add more level sub-directories in the database to support save the cache for multiple platforms with multiple tool-chains and targets, just like edk2 Build output. Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Sometime write file not immediate to diskYunhua Feng2019-04-221-4/+13
| | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/process_bug.cgi On Windows OS, sometime the generated file is not immediate saved to disk. When run nmake, prompt AutoGen.h not found, and stop build. Below blog shows Write-Replace to fix it. This patch uses this way to write temp file, then rename the temp file to the real file. https://blog.gocept.com/2013/07/15/reliable-file-updates-with-python/ Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools:update ConvertFceToStructurePcd.py with the char order PCD name.Fan, ZhijuX2019-04-181-0/+5
| | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1718 BaseTools\Scripts\ConvertFceToStructurePcd.py Update script to sort the PCD order base on PcdName, then base on Pcd field name. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Hash false success with back to back buildsRodriguez, Christian2019-04-162-0/+49
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1692 Add error handling to the --hash feature so that hash files are invalidated when a build error occurs. Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:Coding problems cause can not encode FMP Auth HeaderFan, ZhijuX2019-04-161-1/+1
| | | | | | | | | | | GenerateCapsule: error: can not encode FMP Auth Header The system cannot find the file specified. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:Enable the /MP option of MSVC compilerFan, ZhijuX2019-04-162-70/+140
| | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1672 The /MP option of MSVC compiler can reduce the total time to compile the source files on the command line. This patch is going to enable this MSVC option in BaseTools. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Fix corner-cases of --hash featureChristian Rodriguez2019-04-102-4/+16
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1680 Re-use libraries, since they have already been hashed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Fix corner-cases of --hash featureRodriguez, Christian2019-04-101-3/+13
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1680 Respect artifact location within directory structure. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Fix corner-cases of --hash featureRodriguez, Christian2019-04-101-8/+9
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1680 Re-order hashing operations so we don't do redundant hashes. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Fix corner-cases of --hash featureRodriguez, Christian2019-04-101-0/+14
| | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1680 Consider modules with .inc source files as Binary Modules and do not Skip by hash. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Fixed issue in MultiThread Genfds functionFeng, Bob C2019-04-106-13/+37
| | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1450 In the Multiple thread Genfds feature, build tool generates GenSec, GenFFS command in Makefile. The Non-Hii Driver does not generate .offset file for uni string offset, but the build tool has not knowledge about this in autogen phase. So in this patch, I add a check in Makefile for GenSec command. If the GenSec input file does not exist, the GenSec will not be called. And if GenSec command is not called, its output file, which is also the input file of GenFfs command, will also not exist.So for GenFfs command, I add a new command parameter -oi which means the input file is an optional input file which would not exist. so that I can generate GenFfs command with "-oi" parameter in Makefile. Contributed-under: TianoCore Contribution Agreement 1.1 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/PatchCheck: Generate error if Contributed-under foundMichael D Kinney2019-04-091-8/+11
| | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1655 With the change to BSD+Patent License, the TianoCore Contributor's Agreement has been removed and as a result, a Contributed-under tag is no longer appropriate in patches. Remove the check for the TianoCore Contributor's Agreement and instead, generate an error if a patch contains a Contributed-under tag in the commit message. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* BaseTools: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-09479-3355/+479
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:Coding problems caused by special charactersFan, ZhijuX2019-04-015-10/+10
| | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1670 During BaseTools compiling under Chinese or Japanese language Windows, python exception occurring. UnicodeDecodeError: 'ascii' codec can't decode byte 0xbd in position 3528: ordinal not in range(128) Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:Trim will trig exception when input asl UTF8 format fileFan, ZhijuX2019-04-011-23/+21
| | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1641 The command trim --asl-file -o test.i UTF8.asl will trig the exception. Trim tool should report error message for unsupported UTF8 file instead of the exception. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/C/Common: Improve performance of boundary validationShenglei Zhang2019-03-271-3/+4
| | | | | | | | | | | | | | The boundary validation checking in MakeTable() performs on every loop iteration. This could be improved by checking just once before the loop. https://bugzilla.tianocore.org/show_bug.cgi?id=1329 Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/TianoCompress: Improve performance of boundary validationShenglei Zhang2019-03-271-3/+4
| | | | | | | | | | | | | | The boundary validation checking in MakeTable() performs on every loop iteration. This could be improved by checking just once before the loop. https://bugzilla.tianocore.org/show_bug.cgi?id=1329 Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTool: Fixed an issue of Structure PCDFeng, Bob C2019-03-271-7/+7
| | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1665 Build fail when the structure pcd has member of flexible size array Contributed-under: TianoCore Contribution Agreement 1.1 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: Remove the logic SourceOverridePathFeng, Bob C2019-03-2412-72/+4
| | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350 SOURCE_OVERRIDE_PATH is for EDK component INF files. The corresponding logic should be removed. Contributed-under: TianoCore Contribution Agreement 1.1 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>