summaryrefslogtreecommitdiffstats
path: root/BaseTools
Commit message (Collapse)AuthorAgeFilesLines
* Revert "BaseTools/BfmLib: Add a tool BfmLib"Liming Gao2019-07-118-5881/+0
| | | | | | | | | | | This reverts commit dc7b0dc8d662b3bedece2cf1015e2a94884cb111. There are the concerns on code design and code quality, and request to rewrite FCE, BfmLib and FMMT for the review. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Feng Bob C <bob.c.feng@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Bob C <bob.c.feng@intel.com>
* Revert "BaseTools/FCE: Add a tool FCE"Liming Gao2019-07-1123-23443/+2
| | | | | | | | | | | This reverts commit 3c59d94637adbfdd497b5a2c16073c7dc62b669c. There are the concerns on code design and code quality, and request to rewrite FCE, BfmLib and FMMT for the review. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Feng Bob C <bob.c.feng@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Bob C <bob.c.feng@intel.com>
* Revert "BaseTools/FMMT: Add a tool FMMT"Liming Gao2019-07-1111-9036/+0
| | | | | | | | | | | This reverts commit 080981d72dcbb782ad73716c439639324b0aa4dd. There are the concerns on code design and code quality, and request to rewrite FCE, BfmLib and FMMT for the review. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Feng Bob C <bob.c.feng@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Bob C <bob.c.feng@intel.com>
* Revert "BaseTools: fix FCE build when edksetup not executed"Liming Gao2019-07-111-1/+1
| | | | | | | | | | | This reverts commit d031fc07eb83c9d13bff3ebac25da458d5a47917. There are the concerns on code design and code quality, and request to rewrite FCE, BfmLib and FMMT for the review. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Feng Bob C <bob.c.feng@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Bob C <bob.c.feng@intel.com>
* Revert "BaseTools/FMMT: Change FMMT script type in PosixLike"Liming Gao2019-07-111-29/+29
| | | | | | | | | | | This reverts commit 2112fc71b1112554bcfb75a454002d2bbeed552f. There are the concerns on code design and code quality, and request to rewrite FCE, BfmLib and FMMT for the review. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Feng Bob C <bob.c.feng@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Bob C <bob.c.feng@intel.com>
* Revert "BaseTools/BfmLib: Change BfmLib script type in PosixLike"Liming Gao2019-07-111-29/+29
| | | | | | | | | | | This reverts commit 556bf5b3570a2290ad82c1a027740e72230baa26. There are the concerns on code design and code quality, and request to rewrite FCE, BfmLib and FMMT for the review. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Feng Bob C <bob.c.feng@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Bob C <bob.c.feng@intel.com>
* Revert "BaseTools/FCE: Change FCE script type in PosixLike"Liming Gao2019-07-111-29/+29
| | | | | | | | | | | This reverts commit 8a842b31b93323ee3dc7631059292d30f6179cd3. There are the concerns on code design and code quality, and request to rewrite FCE, BfmLib and FMMT for the review. Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Feng Bob C <bob.c.feng@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Bob C <bob.c.feng@intel.com>
* BaseTools: Detect the change of env variable used in tooldef.txtFeng, Bob C2019-07-101-2/+5
| | | | | | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1921 Add TOOLS_DEF.ARCH file to all workspace meta files list. TOOLS_DEF.ARCH include the evaluated Tool definition information which is filtered by current tool_chain. With this change, when the environment variable which is used in ToolDef.txt is changed, build tool will rebuild the platform. 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> Cc: Steven Shi <steven.shi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fixed the issue of the CFlag for compile PcdValueInit.cFeng, Bob C2019-07-101-1/+2
| | | | | | | | | | | | This issue happens when using Structured PCD. Build tool use set to store the cflags for compile PcdValueInit.c, that is the order of cflags is disorder. This patch make -U, /U flags appear before -D, /D 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/FCE: Change FCE script type in PosixLikeShenglei Zhang2019-07-081-29/+29
| | | | | | | | | | Change the script type from PC to UNIX. 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> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/BfmLib: Change BfmLib script type in PosixLikeShenglei Zhang2019-07-081-29/+29
| | | | | | | | | | Change the script type from PC to UNIX. 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> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/FMMT: Change FMMT script type in PosixLikeShenglei Zhang2019-07-081-29/+29
| | | | | | | | | | Change the script type from PC to UNIX. 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> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Fix various typosAntoine Cœur2019-07-0815-22/+22
| | | | | | | Fix various typos in BaseTools. Signed-off-by: Cœur <coeur@gmx.fr> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: fix FCE build when edksetup not executedLeif Lindholm2019-07-051-1/+1
| | | | | | | | | | | | Commit 3c59d94637ad ("BaseTools/FCE: Add a tool FCE") added a new tool that is always built. Pre-existing tools locate the makefile includes with relative paths, but FCE uses EDK_TOOLS_PATH, adding a new dependency on having sourced edksetup.sh before building BaseTools. Change FCE GNUmakefile to match other tools. Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
* 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>