summaryrefslogtreecommitdiffstats
path: root/BaseTools
Commit message (Collapse)AuthorAgeFilesLines
* BaseTools/FMMT: Add a tool FMMTShenglei Zhang2019-07-0411-0/+9036
| | | | | | | | | | | FMMT is a tool to enable removal, addition and replacement of FFS files in FD image binaries. https://bugzilla.tianocore.org/show_bug.cgi?id=1847 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: Bob Feng <bob.c.feng@intel.com>
* BaseTools/FCE: Add a tool FCEShenglei Zhang2019-07-0423-2/+23443
| | | | | | | | | | | FCE is a tool to retrieve and change HII configuration data in Firmware Device(*.fd) files. https://bugzilla.tianocore.org/show_bug.cgi?id=1848 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: Bob Feng <bob.c.feng@intel.com>
* BaseTools/BfmLib: Add a tool BfmLibShenglei Zhang2019-07-048-0/+5881
| | | | | | | | | | BmfLib is added for FCE tool. https://bugzilla.tianocore.org/show_bug.cgi?id=1848 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: Bob Feng <bob.c.feng@intel.com>
* Edk2Setup: Support different VS tool chain setupDandan Bi2019-06-283-14/+135
| | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1693 This patch is to update edksetup with additional option: VS2017 VS2015 VS2013 VS2012 to setup different VS environment. And will report error if the specified VS tool is not installed. For VS2017, also consider the case that only VS2017 build tool is installed. 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>
* Edk2: Remove nt32 related flag in bat filesDandan Bi2019-06-281-8/+0
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1693 NT32Pkg has been removed, remove nt32 related flags in bat files. 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/Capsule: Supports multiple payloads and drivers in capsuleJin, Eric2019-06-283-266/+731
| | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1834 1)Add arguments "--embedded-driver" to support embedded driver in command line. 2)Add arguments "--update-image-index" to identify ImageIndex within the device in command line. 3)Add arguments "-j JSONFILE" to support multiple payloads and embedded drivers with JSON file. The update is in a backwards compatible manner, so all command line options to support single payload are still supported. But all the options associated with multiple payloads should be provided in a JSON file. Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Eric Jin <eric.jin@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Move Build Cache related function out of CreateAsBuiltInfBob Feng2019-06-252-37/+59
| | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1932 There are two functions in current CreateAsBuiltInf, Copy Binary files to build cache folder and create asbuild inf file. This patch is to separate UpdateBuildCache and CreateAsBuiltInf into two functions. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Steven Shi <steven.shi@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Christian Rodriguez <christian.rodriguez@intel.com> Reviewed-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* BaseTools: refine CreateAsBuiltInf functionBob Feng2019-06-252-6/+5
| | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1932 ModuleAutogen.CreateAsBuiltInf IsOnlyCopy parameter and related function can be moved out of CreateAsBuiltInf, so that CreateAsBuiltInf is more clean. Cc: Liming Gao <liming.gao@intel.com> Cc: Steven Shi <steven.shi@intel.com> Cc: Christian Rodriguez <christian.rodriguez@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* BaseTools:Add DetectNotUsedItem.py to Edk2\BaseTools\ScriptsFan, ZhijuX2019-06-251-0/+198
| | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1850 This script is used to Detect unreferenced PCD and GUID/Protocols/PPIs. The input parameters are Dec file and package directory. This script can be run in both Py2 and Py3. 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> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools:Add import in FvImageSectionFan, ZhijuX2019-06-241-0/+1
| | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1872 Since MultipleWorkspace is not imported in FvImageSection, an error of "global name 'MWS' is not defined" appeared. 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:Introduce CopyFileOnChange() function to copy cache filesShi, Steven2019-06-173-5/+64
| | | | | | | | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1894 Basetool need a CopyFileOnChange() function to avoid cache file writing race in multi-thread build. Some platforms build fail with file IO writing race issue when the build cache is enabled to store cache files in multi-threads. This is because common same library cache files (e.g. some libs in MdePkg) can be stored by many different driver modules' build threads at same time. Current build cache need a function to check whether the same cache file already exist, and only copy source file if it is different from the destination file. This patch introduces an atomic copy function to avoid duplicated cache files copy. 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: Cannot store library cache of different arch togetherShi, Steven2019-06-171-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1895 Build cache cannot store cache for the same library modules in different arch together. E.g. Both the below IA32 and X64 arch BaseLib caches should exist after build Ovmf3264, but now only the one in X64 arch exist. The reason is the current Basetool use a set() to same all library AutoGen objects, but the different arch lib AutoGen objects have same __hash_ value which comes from the lib MetaFile(The path of module file): def __hash__(self): return hash(self.MetaFile) So the different arch lib AutoGen objects are duplicated one to the set() and only one can exist. This is why the Basetool can only store one arch cache for library. This patch adds the arch string into the PlatformAutoGen and ModuleAutoGen __hash_ definitions and ensure the different platform and module AutoGen objects have different __hash_ values. 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:Build Cache output notification messageShi, Steven2019-06-171-0/+10
| | | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1868 Build need output the cache miss or hit notification message when consume the build cache. Current build does not output any message which is not clear for user to know whether the module built result is from cache or not. This patch adds message about the cache miss or hit when build consumes the cache. 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:Build cache cannot store the cache files for library packageShi, Steven2019-06-171-1/+4
| | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1867 Current build cache cannot store the cache for library package. build -p MdePkg\MdePkg.dsc -a IA32 -b DEBUG -t VS2015x86 --hash --binary-destination=BinCache After build, the expected result is the BinCache folder is generated and the MdePkg build cache files (e.g. .hash and .lib) are stored in the BinCache folder. But the BinCache folder is not generated at all. This patch is going to fix that issue. 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: add script to configure local git optionsLeif Lindholm2019-06-121-0/+204
| | | | | | | | | | | | | Patch contribution and review is greatly simplified by following the steps described in "Laszlo's unkempt guide": https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-guide-for-edk2-contributors-and-maintainers but there are a lot of tedious manual steps in there, so here is a python script that configures all options I am aware of *for the repository the script is executed from*. Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: add centralized location for git config filesLeif Lindholm2019-06-122-0/+32
| | | | | | | | | | | | Before adding the git environment initialization script, add the following files that will be pointed to after running said script: - BaseTools/Conf/diff.order - BaseTools/Conf/gitattributes Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Refactor hash tracking after checking for Sources sectionRodriguez, Christian2019-06-104-27/+53
| | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1804 After adding a check to see if [Sources] section lists all the header type files of a module, track module and library hashes for --hash feature. If above check is not in compilance for a library or module, force hash invalidation on that library or module. 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: Add a checking for Sources section in INF fileRodriguez, Christian2019-06-101-0/+38
| | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1804 Add a check to see if [Sources] section lists all the header type files of a module. Performance impact should be minimal with this patch since information is already being fetched for Makefile purposes. All other information is already cached in memory. No extra IO time is needed. 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:Make BaseTools support new rules to generate RAW FFS FILEFan, ZhijuX2019-06-105-7/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1765 If RAW FFS File Rule has no section for its data.For RAW FFS File, directly call GenFfs tool to generate FFS file. Ffs Rule: [Rule.Common.USER_DEFINED.MicroCode] FILE RAW = $(NAMED_GUID) { $(INF_OUTPUT)/$(MODULE_NAME).bin } [Rule.Common.USER_DEFINED.LOGO] FILE RAW = $(NAMED_GUID) { |.bmp } As shown in the rule above,if SectionType and FileType not defined, FFS files are generated directly, and no other type of file is generated. The patch is to make the BaseTools support these two rules 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: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>