summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/UPT/Library
AgeCommit message (Collapse)AuthorFilesLines
2022-10-14BaseTools: Updated build tools to support new LoongArch.Chao Li1-1/+23
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4053 Python code changes for building EDK2 LoongArch platform. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Chao Li <lichao@loongson.cn> Co-authored-by: Baoqi Zhang <zhangbaoqi@loongson.cn> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2022-05-13BaseTools: Remove RVCT supportedk2-stable202205-rc1Rebecca Cran1-1/+0
RVCT is obsolete and no longer used. Remove support for it. Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-08-02python: Replace distutils.utils.split_quotes with shlex.splitCole1-2/+2
distutils is deprecated and may be removed in python 3.12. Use shlex.split which has been around since python 2.3. shlex.split does not split on all the ASCII control characters that split_quoted will[1], but for edk2 usage I don't think that matters. [1] https://stackoverflow.com/questions/54999301/what-is-the-difference-between-distutils-util-split-quoted-and-shlex-split Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-07-08BaseTools: Fix various typosAntoine Cœur2-2/+2
Fix various typos in BaseTools. Signed-off-by: Cœur <coeur@gmx.fr> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-04-09BaseTools: Replace BSD License with BSD+Patent LicenseMichael D Kinney13-91/+13
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>
2019-03-24BaseTools: Remove the logic SourceOverridePathFeng, Bob C1-3/+0
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>
2019-02-20BaseTools: replace Sdict with OrderedDict in UPTFeng, Bob C1-2/+2
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1504 V2: import OrderredDict as Sdict in Misc.py instead updating all the py files. Sdict class is removed on the commit 174a9d3cc8f74f7a731ac5f16ce6864c8eb359ec but there are still some py files import it. This patch is to use collections.OrderedDict to replace Sdict. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2019-02-18BaseTools: Correct the error message for UPTFeng, Bob C1-8/+10
This patch is going to correct the error message for UPT. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hess Chen <hess.chen@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>
2019-02-14BaseTools: Various typoAntoine Coeur8-37/+37
Various typo in BaseTools. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-02-01BaseTools: Handle the bytes and str differenceFeng, Bob C1-3/+1
Deal with bytes and str is different, remove the unicode(), correct open file parameter. Using utcfromtimestamp instead of fromtimestamp. 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: Zhiju.Fan <zhijux.fan@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-02-01BaseTools/UPT:merge UPT Tool use Python2 and Python3Zhijux Fan8-193/+61
In UPT Tool,merge python2 and python3 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: Zhiju.Fan <zhijux.fan@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2018-10-24BaseTools/UPT: Fix an issue of UNI string checking.Hess Chen1-0/+23
The tool now can detect the error that the content between double quotes contains another double quotes or enter key. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2018-10-15Revert BaseTools: PYTHON3 migrationLiming Gao8-54/+63
This reverts commit 6693f359b3c213513c5096a06c6f67244a44dc52.. 678f85131238622e576705117e299d81cff755c9. Python3 migration is the fundamental change. It requires every developer to install Python3. Before this migration, the well communication and wide verification must be done. But now, most people is not aware of this change, and not try it. So, Python3 migration is reverted and be moved to edk2-staging Python3 branch for the edk2 user evaluation. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
2018-10-13BaseTools/UPT: Porting UPT Tool from Python2 to Python3Yonghong Zhu8-60/+53
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>
2018-10-13BaseTools: Handle the bytes and str differenceYunhua Feng1-3/+1
Deal with bytes and str is different, remove the unicode() Using utcfromtimestamp instead of fromtimestamp. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2018-07-16BaseTools: Use absolute import in UPTGary Lin1-1/+2
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2018-07-09BaseTools: Clean up source filesLiming Gao12-542/+542
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2018-06-27BaseTools: Fix old python2 idiomsGary Lin4-6/+6
Based on "futurize -f lib2to3.fixes.fix_idioms" * Change some type comparisons to isinstance() calls: type(x) == T -> isinstance(x, T) type(x) is T -> isinstance(x, T) type(x) != T -> not isinstance(x, T) type(x) is not T -> not isinstance(x, T) * Change "while 1:" into "while True:". * Change both v = list(EXPR) v.sort() foo(v) and the more general v = EXPR v.sort() foo(v) into v = sorted(EXPR) foo(v) Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2018-06-27BaseTools: Adjust the spaces around commas and colonsGary Lin1-1/+1
Based on "futurize -f lib2to3.fixes.fix_ws_comma" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2018-06-27BaseTools: Refactor python print statementsGary Lin2-5/+7
Refactor print statements to be compatible with python 3. Based on "futurize -f libfuturize.fixes.fix_print_with_import" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2018-06-27BaseTools: Refactor python except statementsGary Lin4-10/+10
Convert "except ... ," to "except ... as" to be compatible with python3. Based on "futurize -f lib2to3.fixes.fix_except" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2018-06-11BaseTools/UPT: Update the import statement to use StringUtilsYonghong Zhu7-19/+19
The patch 5a57246eab80 Rename String to StringUtils, but it didn't update the UPT Tool for the import statement which cause UPT tool break. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2018-05-28BaseTools: Rename String to StringUtils.Marvin.Haeuser@outlook.com1-0/+0
For case-insensitive file systems, edk2 String.py collides with the Python string.py, which results in build errors. This,for example, applies to building via the Windows Subsystem for Linux from a DriveFS file system. This patch renames String to StringUtils to prevent conflicts for case-insensitive file systems. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2018-03-30BaseTools: Remove equality operator with NoneCarsey, Jaben7-51/+51
replace "== None" with "is None" and "!= None" with "is not None" 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>
2018-03-15BaseTools: UPT: remove unused variable and inaccessible code.Carsey, Jaben1-19/+1
gINCLUDE_PATTERN is never used. IncList is always empty. 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>
2017-08-24BaseTools/UPT: Fix UNI file name issueHess Chen1-1/+3
Fix the issue of creating duplicate UNI file names Fix the issue of removing packages Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-08-12BaseTools/UPT: Support Multiple InstallationHess Chen1-2/+7
Add a new feature to UPT to support installing multiple DIST packages in one time. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-03-09BaseTools/UPT: Add a checkpoint for missing '"'Hess Chen1-2/+11
Add a checkpoint for UNI file which is missing '"' at the end of a line. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-08-09BaseTools/UPT: Fix a install issueHess Chen1-1/+6
Fix a corner case issue of installing a module without any files which causes installing UNI file failure Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-08-03BaseTool/Upt: Avoid UNI file name conflictHess Chen1-1/+25
When creating a UNI file if there is a name conflict, add an index from 0 to the file name Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-08-03BaseTool/Upt: Add support for PrivateHess Chen2-9/+11
Support new syntax in package DEC file as below: [Includes.Common.Private] [Ppis.Common.Private] [Guids.Common.Private] [Protocols.Common.Private] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-04-26BaseTools/UPT: UPT to Support UTF-8Hess Chen1-4/+10
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2015-10-10BaseTool/UPT: Fix two wrong imports for UPTHess Chen2-2/+2
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18600 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-08BaseTools: Update UPT tool to support multiple workspacesHesheng Chen4-18/+27
Update UPT to refer MultipleWorkspace class to convert the file path from WORKSPACE and PACKAGES_PATH. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hesheng Chen <hesheng.chen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18580 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-08BaseTools/Upt: Add a BOM check for UNI file and fix some help message errorHess Chen2-2/+23
Add a BOM check for UNI file and fix some help message error Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: YangX Li <yangx.li@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17876 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-08BaseTools/Upt: Update UPT to ignore "!include" statement when parsing UNI fileHess Chen1-2/+3
Update UPT to ignore "!include" statement when parsing UNI file Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: YangX Li <yangx.li@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17872 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-19BaseTools/Upt: Fix several bugsHess Chen1-1/+1
1. Fix a bug of packaging a full path file in zip at Linux. 2. Fix a format error of generating Hob/Event/BootMode information. 3. Fix a bug of generating additional “GUID” subtype for “UNDEFINED” guid. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@Intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16149 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-03BaseTools/UPT: Replace os.linesep with '\r\n' when generating UNI files.Hess Chen2-32/+32
Replace os.linesep with '\r\n' when generating UNI files to make sure all files are under DOS format. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16041 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-26This patch is going to:Hess Chen11-342/+1826
1. Add a recovery mode for UPT failure 2. Add UNI file support 3. Add binary file header support 4. Add support for PCD error message 5. Add support for replace 6. Format generated INF/DEC files 7. Update dependency check 8. Other minor fixes Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15896 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-01Sync BaseTool trunk (version r2670) into EDKII BaseTools. Gao, Liming1-1/+27
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gao, Liming <liming.gao@intel.com> Reviewed-by: Liu, Yingke D (yingke.d.liu@intel.com) git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15605 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-27Sync BaseTool trunk (version r2649) into EDKII BaseTools.Gao, Liming5-1111/+1111
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
2014-01-10Sync BaseTool trunk (version r2640) into EDKII BaseTools.Gao, Liming1-3/+16
Signed-off-by: Gao, Liming <liming.gao@intel.com> Reviewed-by: Liu, Jiang A <jiang.a.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15089 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-23Sync BaseTool trunk (version r2599) into EDKII BaseTools.Liming Gao3-3/+29
Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Heshen Chen <chen.heshen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14591 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-25Roll back the changes for BaseToolsydong101-2/+2
Signed-off-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13467 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-21Fix a typo.ydong101-2/+2
Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13464 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-16Sync BaseTool trunk (version r2474) into EDKII BaseTools. lgao42-30/+1
Signed-off-by: lgao4 Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12883 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-07Sync BaseTool trunk (version r2460) into EDKII BaseTools. The change mainly ↵lgao41-1/+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
2011-11-25Sync BaseTool trunk (version r2423) into EDKII BaseTools. The change mainly ↵lgao41-0/+53
includes: 1. Fix !include issues 2. Fix Trim to skip the postfix 'U' for hexadecimal and decimal numbers 3. Fix building error C2733 when building C++ code. 4. Add GCC46 tool chain definition 5. Add new RVCT and RVCTLINUX tool chains Signed-off-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12782 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-09Sync BaseTool trunk (version r2397) into EDKII BaseTools. The change mainly ↵lgao41-2/+2
includes 1. Fix the issue that root directory of disk can’t be used as WORKSPACE. 2. Update AutoGen code style to pass C++ compiler. Signed-off-by: lgao4 Reviewed-by: jsu1 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12676 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-29Sync BaseTools Trunk (version r2387) to EDKII main trunk.lgao41-3/+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