summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common/GlobalData.py
Commit message (Collapse)AuthorAgeFilesLines
* BaseTools: Add new RegEx pattern to GlobalDataCarsey, Jaben2018-04-081-0/+3
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: GlobalData Add a regular expression for a hex numberCarsey, Jaben2018-03-291-0/+2
| | | | | | | | | | add a shared precompiled regular expression Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Add new RegExp for future useCarsey, Jaben2018-03-291-0/+2
| | | | | | | | | | | Add a precompiled RegExp for 4 hex chars. v2: fixed incorrect numbers of {} Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Regular Expressions refactor out the hex char for later reuseCarsey, Jaben2018-03-291-1/+2
| | | | | | | | | | | | | move hex character info from GUID expressions into seperate variable to facilitate reuse. I had a type with insufficient {} in the first version. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: add GUID pattern to global dataCarsey, Jaben2018-03-291-0/+7
| | | | | | | | | | add a shared global regular expression for GUID matching Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: GlobalData share same MACRO name definitionCarsey, Jaben2018-03-291-3/+6
| | | | | | | | | | use the same MACRO name definition across shared regular expression patterns. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: GlobalData remove unused variableCarsey, Jaben2018-03-091-2/+1
| | | | | | | | | | gWideStringPattern is not used. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Report Structure PCD value and SKU, DefaultStore infoLiming Gao2017-12-251-0/+3
| | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=706 Add Structure PCD support for Build report. Structure PCD field value described in DEC/DSC will be display in build report. And, PCD value for each SKU and Default store will also be shown in build report. Contributed-under: TianoCore Contribution Agreement 1.1 Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Support Structure PCD value assignment in DEC/DSCLiming Gao2017-12-251-0/+3
| | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=542 This is pure BaseTools enhancement to support PCD with one structure. User can specify PCD value based on its structure field. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Update Makefile to support FFS file generationYonghong Zhu2017-12-051-0/+1
| | | | | | | | | | | Update Makefile to support FFS file generation with new build option --genfds-multi-thread. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix a bug Build directory should relative to WORKSPACEYonghong Zhu2017-10-161-0/+1
| | | | | | | | | | | | | The bug is for build output files it still use mws.join function, it cause maybe we will get the build output files in the PACKAGES_PATH because mws.join will try WORKSPACE first, if the file doesn't exist then try PACKAGES_PATH. But for build output, we expected it should relative to WORKSPACE. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: add support for BIOS build with binary cacheYonghong Zhu2017-09-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add three new options: --hash enables hash-based caching during build process. when --hash is enabled, build tool will base on the module hash value to do the incremental build, without --hash, build tool will base on the timestamp to do the incremental build. --hash option use md5 method to get every hash value, DSC/FDF, tools_def.txt, build_rule.txt and build command are calculated as global hash value, Package DEC and its include header files are calculated as package hash value, Module source files and its INF file are calculated as module hash value. Library hash value will combine the global hash value and its dependent package hash value. Driver hash value will combine the global hash value, its dependent package hash value and its linked library hash value. When --hash and --binary-destination are specified, build tool will copy generated binary files for each module into the directory specified by binary-destination at the build phase. Binary-destination directory caches all generated binary files. When --hash and --binary-source are specified, build tool will try to get the binary files from the binary source directory at the build phase.If the cached binary has the same hash value, it will be directly used. Otherwise, build tool will compile the source files and generate the binary files. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Add mixed PCD support featureYonghong Zhu2016-04-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem statement: The current build system requires that a PCD must use the same access method for all modules. A Binary Module may use a different PCD access method than: 1.A source tree build it is integrated into. 2.Other Binary Modules in platform build that use the same PCD. Solution: 1. Source build: No change. PCDs must use the same access method for building all Source Modules. 2. Mixed Source & Binary Builds or Binary Only Builds: 1) Source Modules - No changes 2) Module that is interpreted as a Binary Module a.DSC file may optionally override default value of PatchableInModule PCDs in scope of Binary Module. b.DSC file must declare DynamicEx PCD subtype for all DynamicEx PCDs from Binary Modules. c.FDF file must list Binary Module INF Build update: 1. PCDs in a binary module are permitted to use the PatchableInModule or DynamicEx access methods (the Binary INF clearly identifies the PCD access method for each PCD). The build must support binary modules that use the same or different PCD access method than the Source INFs or other Binary INFs. 2. Build report list PCDs that have mixed PCD access methods. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Add support to merge Prebuild and Postbuild into build ProcessYonghong Zhu2016-04-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This feature is enhance build tool to incorporate execution of prebuild and postbuild. 1.Prebuild script a.DEFINE PREBUILD in DSC [Defines] section b.Build command -D PREBUILD to override the one in DSC [Defines] section 1)If PREBUILD is a file, then this file will be used as prebuild script. 2)If PREBUILD is empty, then prebuild script will be disabled. 3)If PREBUILD is not defined in [Defines] section and not passed in on command line, then prebuild script is also disabled. 2.Prebuild option a.All options of build tool b.TARGET, ARCH and TOOL_CHAIN_TAG value, Those value will be from target.txt file if they are not in build command line. c.Additional options following prebuild definition. Quotes are needed when these additional options are present. d.Quotes would also be required if the path to the prebuild command contains space or special characters. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Add two new sections for PCD in the build reportYonghong Zhu2016-03-291-0/+3
| | | | | | | | | | | | | Build Spec updated to add two new sections for PCD in the build report. 1.Conditional directives section:If the DSC or FDF file contains conditional directive statements. 2.Unused PCDs section: If the DSC or FDF file define values for PCDs that are not used by any module and are not used in conditional directive statements. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix nmake failure due to command-line length limitationYonghong Zhu2016-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | NMAKE is limited to command-line length of 4096 characters. Due to the large number of /I directives specified on command line (one per include directory), the path length of WORKSPACE is multiplied by the number of /I directives and can exceed the limit. This patch: 1. Add new build option -l, --cmd-len to set the maximum command line length, default value is 4096. 2. Generate the response file only if the command line length exceed its maximum characters (default is 4096) when build the module. Cover PP_FLAGS, CC_FLAGS, VFRPP_FLAGS, APP_FLAGS, ASLPP_FLAGS, ASLCC_FLAGS and ASM_FLAGS. 3. The content of the response file is combine from the FLAGS option and INC option. 4. When build failure, it would print out the response file's file location and its content. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: add new command line option to support override PCD valueYonghong Zhu2016-03-161-1/+2
| | | | | | | | | | | | | | | | | | | | | this patch add new feature to support override PCD value on the command line. The value from the command line is the highest priority. 1.Add option(--pcd) to support both PcdName and TokenSpaceGuild.PcdName 2.For void* type PCD, use following format: cstring PCD: --pcd PcdName="string" unicodestring PCD: --pcd PcdName=L"string" CArray PCD: --pcd PcdName=B"{0x1, 0x2}" 3.Build Report, use *B to show the PCD value was overridden in the command line. 4.Error Condition: Report error if the PCD is not found Report error if the PcdName is found under multiple different TokenSpaceGuid Report error if PCD value syntax is incorrect Report error if void* type PCD value exceed its max size Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* License header updated to match correct format.Yingke Liu2014-08-281-1/+9
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15971 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTool trunk (version r2649) into EDKII BaseTools.Gao, Liming2014-01-271-71/+71
| | | | | | | Signed-off-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15188 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTool trunk (version r2610) into EDKII BaseTools.Liming Gao2013-11-181-0/+19
| | | | | | | Signed-off-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14856 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTools Trunk (version r2518) to EDKII main trunk.lgao42012-04-101-0/+4
| | | | | | | Signed-off-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13178 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTool trunk (version r2460) into EDKII BaseTools. The change mainly ↵lgao42011-12-071-0/+1
| | | | | | | | | | | | | | | includes: 1. Support use expression as DSC file PCD value. 2. Update FDF parser to fix bug to get complete macro value. 3. Fix bug to replace SET statement macro and evaluate SET statement PCD value in FDF file. 4. Fix a bug for MACRO defined in conditional block cannot be processed correctly Signed-off-by: lgao4 Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12827 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTools Trunk (version r2387) to EDKII main trunk.lgao42011-10-291-2/+9
| | | | | | | Signed-off-by: lgao4 Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12602 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTools Branch (version r2323) to EDKII main trunk. lgao42011-09-191-0/+4
| | | | | | | Signed-off-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12379 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTools Branch (version r2321) to EDKII main trunk. lgao42011-09-181-1/+0
| | | | | | | | Signed-off-by: lgao4 Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12372 6f19259b-4bc3-4df7-8a09-765794883524
* Sync EDKII BaseTools to BaseTools project r1971lgao42010-05-181-2/+2
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10502 6f19259b-4bc3-4df7-8a09-765794883524
* Check In tool source code based on Build tool project revision r1655.lgao42009-07-171-0/+37
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8964 6f19259b-4bc3-4df7-8a09-765794883524