summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source
Commit message (Collapse)AuthorAgeFilesLines
* BaseTools/UPT:merge UPT Tool use Python2 and Python3Zhijux Fan2019-02-0120-235/+84
| | | | | | | | | | | | | | 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>
* BaseTools:Similar to octal data rectificationZhijux Fan2019-02-014-3/+20
| | | | | | | | | | | | | | In python3, if Value is octal data, the int(Value, 0) report an error 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>
* BaseTools: Update argparse arguments since it not have version nowZhijux Fan2019-02-013-3/+6
| | | | | | | | | | | | | | argparse.ArgumentParser not have version parameter 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>
* BaseTools: replace long by intYunhua Feng2019-02-018-27/+27
| | | | | | | | | | | | | | | replace long by int Because the long() was not exist in 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: Yunhua Feng <yunhuax.feng@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>
* BaseTools: Remove unnecessary super functionYunhua Feng2019-02-011-5/+0
| | | | | | | | | | | | | | Remove unnecessary super function 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: Yunhua Feng <yunhuax.feng@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>
* BaseTools: nametuple not have verbose parameter in python3Yunhua Feng2019-02-011-1/+1
| | | | | | | | | | | | | | nametuple not have verbose parameter in 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: Yunhua Feng <yunhuax.feng@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>
* BaseTools: use OrderedDict instead of sdictFeng, Bob C2019-02-011-122/+1
| | | | | | | | | | | | | | use OrderedDict instead of sdict, and delete sdict 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: Yunhua Feng <yunhuax.feng@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>
* BaseTools: replace get_bytes_le() to bytes_leZhijux Fan2019-02-013-3/+3
| | | | | | | | | | | | | | UUID does not have the get_bytes_le() in 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>
* BaseTools: Rename iteritems to itemsZhijux Fan2019-02-013-5/+5
| | | | | | | | | | | | | | replace the list iteritems by items in 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>
* BaseTools:use iterate list to replace the itertoolsZhijux Fan2019-02-011-4/+2
| | | | | | | | | | | | | | itertools.imap() replace map(), itertools.ifilter() replace filter 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>
* BaseTool:Rename xrange() to range()Zhijux Fan2019-02-014-16/+16
| | | | | | | | | | | | | Because the xrange() was not exist in 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> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/DevicePath: Add a checking stepMike Turner2019-01-311-9/+8
| | | | | | | | | | | | | | | | Add a checking step in DevicePathUtilities.c to verify DevicePath. https://bugzilla.tianocore.org/show_bug.cgi?id=1372 v2: Remove ASSERT() and the redundant checking step. Update related description. 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/build/build: delete variableCarsey, Jaben2019-01-282-62/+1
| | | | | | | | | | | delete the shared global variable from Common.Misc delete the uncalled users of the variable from build.build Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/Common/Misc: Cleanup the importsCarsey, Jaben2019-01-281-17/+17
| | | | | | | | | | | | | Refactor to 'dict' from 'IterableUserDict' which was only required for old python interpreter. Sort imports according to PEP8 Remove those we dont need. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/Common/Misc: remove uncalled codeCarsey, Jaben2019-01-281-46/+0
| | | | | | | | | | no use for this code content. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:Define Macro in Inf file, the pcdvalue Can't convertFan, ZhijuX2019-01-281-2/+6
| | | | | | | | | | | | | | | | Define Macro in Inf file, the pcdvalue Can't convert in dec: gUefiOvmfPkgGuid.test1|"ddd"|VOID*|0x3c in inf: DEFINE ABC=PATH gUefiOvmfPkgTokenSpaceGuid.test1|$(ABC) Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/Common/Misc: move private functionsCarsey, Jaben2019-01-281-45/+45
| | | | | | | | | | | These 2 functions are only used internally. move them to the smallest scope and use them. Cc: Bob Feng <Bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Fix Pcd Array changes build report issue.Fan, ZhijuX2019-01-281-2/+5
| | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1472 The Pcd Array feature changes the Pcd Default value data structure which is used by build report. This patch is going to update build report to adapt that change. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/GenFds/Capsule: move function logicCarsey, Jaben2019-01-212-8/+2
| | | | | | | | | | | | | | Move PackRegistryFormatGuid logic from Common.Misc to this file. There were no other consumers of the function. As it is one line, just replace the logic without the separate function. v2 - change to fix the import statement Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/AutoGen: move functionsCarsey, Jaben2019-01-212-73/+72
| | | | | | | | | | | | Move SplitOption and ConvertStringToByteArray from Common.Misc to this file. There were no other consumers of the functions. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/DscBuildData: move functionCarsey, Jaben2019-01-212-34/+34
| | | | | | | | | | | Move IsFieldValuieAnArray from Common.Misc to this file. There were no other consumers of the function. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/Workspace/InfBuildData: move functionsCarsey, Jaben2019-01-212-42/+42
| | | | | | | | | | | Move ProtocolValue and PpiValue from Common.Misc to this file. There were no other consumers of these 2 functions. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:The BuildOptionPcd value is wrongFan, ZhijuX2019-01-211-1/+0
| | | | | | | | | | | In GenFds.py, Due to the second assignment, the value is wrong Its value should a list, not a string.and this line is not required Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Fix build report issue.Feng, Bob C2019-01-211-2/+4
| | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1472 The Pcd Array feature changes the Pcd Default value data structure which is used by build report. This patch is going to update build report to adapt that change. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/build/build: refactor and move functionsCarsey, Jaben2019-01-212-41/+42
| | | | | | | | | | | | | Move DataDump and DataRestore from Common.Misc to this file. There were no other consumers of these 2 functions. Import threading since that module is used in build. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools:build break if the Path contains SingleFile.ExtFan, ZhijuX2019-01-211-1/+1
| | | | | | | | | | | | | | BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1325 if SingleFile.Path = "/foo/bar.Sap/yada/source.S" and SingleFile.Ext = ".S". Then key would end up "/foo/bar" instead of "/foo/bar.Sap/yada/source" as intended. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Fix incorrect formatting of GenFds command dictionaryFelix Polyudov2019-01-211-1/+51
| | | | | | | | | | | | | | | GenFdsCommand returned dictionary with elements that are not compatible with GenFdsApi. As a result the following options were not processed by GenFdsApi: -v, -q, -d, --genfds-multi-thread, --ignore-sources The issue is introduced by commit b3497bad1221704a5dbc5da0b10f42625f1ad2ed. V2: Remove EFI_SOURCE references Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Felix Polyudov <felixp@ami.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools:Build fail when PCD use in the [DEPEX] section of INF filesFan, ZhijuX2019-01-211-2/+2
| | | | | | | | | | | | | | Update _FixedPcdVoidTypeDict to FixedVoidTypePcds '_FixedPcdVoidTypeDict' no longer exists because edk2 version (b23414f6). 'ModuleAutoGen' object has no attribute '_FixedPcdVoidTypeDict'. Build fail when PCD use in the [DEPEX] section of INF files Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Allow empty value for HiiPcd in DscFeng, Bob C2019-01-181-2/+0
| | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1466 DEC file defines PCD default value and PCD supported type. DSC can configure PCD type and value. If the value is same to default value in DEC file, DSC can only configure PCD type and leave empty for value. This usage supports all type PCD except for DynamicHii type. So, DynamicHii PCD should support this usage. Below is one example in DSC. for example, [PcdsDynamicHii.common.DEFAULT] PcdPkgTokenSpaceGuid.PcdCName|L"VarName"|gVarGuid|0x00||NV,BS 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: Liming Gao <liming.gao@intel.com>
* BaseTools: Remove EDK_SOURCE keyword from Inf Parser.Feng, Bob C2019-01-171-27/+7
| | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350 Remove unused EDK_SOURCE keyword from Inf Parser. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Remove EDK_SOURCE keyword from GenFds tool.Feng, Bob C2019-01-172-6/+0
| | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350 Remove unused EDK_SOURCE keyword from GenFds tool. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Remove EDK_SOURCE keyword from ECC ToolFeng, Bob C2019-01-172-47/+0
| | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350 Remove EDK_SOURCE keyword from ECC Tool. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools VolInfo: Fix XCODE5 build issueLiming Gao2019-01-161-1/+1
| | | | | | | | | | | XCODE5 reports warning "equality comparison with extraneous parentheses". Remove extraneous parentheses around the comparison to silence this warning. This issue is caused by commit 8daa4278e80c70e6caabc525cd122744488253f5. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Feng Bob C <bob.c.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools GenFw: Fix XCODE5 build issueLiming Gao2019-01-151-2/+2
| | | | | | | | | | | Warning message is that "equality comparison with extraneous parentheses" Remove extraneous parentheses around the comparison to silence this warning. This issue is caused by commit 8daa4278e80c70e6caabc525cd122744488253f5. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Feng Bob C <bob.c.feng@intel.com> Reviewed-by: Feng Bob C <bob.c.feng@intel.com>
* BaseTools: Remove unused logic for EDKIFeng, Bob C2019-01-141-1/+0
| | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350 Remove gEcpSource global variable in python tool. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com>
* BaseTools: Enable component override functionalityFeng, Bob C2019-01-143-11/+25
| | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1449 This patch enable build tools to recognize that when two given files have the same GUID, file path and ARCH in Dsc, The later one's definition will be used. 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: Carsey Jaben <jaben.carsey@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Remove unused logic from C toolsFeng, Bob C2019-01-1411-353/+10
| | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1350 Remove IA64 support from BaseTools C code. 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>
* BaseTools: Remove unused logic for IPFFeng, Bob C2019-01-1413-582/+20
| | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350 Remove IPF support from BaseTools C code. 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> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Remove unused logic for EDKIFeng, Bob C2019-01-1412-459/+117
| | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350 Remove EDK module type support from BaseTools python code. 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> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Report Error if use SET in DscFeng, Bob C2019-01-111-0/+5
| | | | | | | | | | | | | | Build tool do not support SET syntax in DSC. If the SET statement is used in DSC, build tool just ignore it. That behavior confused some users that they think SET statement works in DSC like in FDF. To avoid such confusion, build tool report ERROR if there is "SET" statement in Dsc file. 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: Cc: Liming Gao <liming.gao@intel.com>
* BaseTools: fix importsCarsey, Jaben2019-01-1014-32/+38
| | | | | | | | | | | | | | | 1 - Some of these imports are cascaded from another file. Import them locally. 2 - Some of these imports are not used. Remove them. 3 - Some of these were missing the namespace used to import them. These changes facilitate optimization of BaseTools: https://bugzilla.tianocore.org/show_bug.cgi?id=42 Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/VfrCompile: report error for Integer overflowDandan Bi2019-01-083-7/+7
| | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1415 When an integer constant specified in the .vfr file is too large for the varstore field it is being used with, the VFR compiler reports an overflow warning like this: Test.vfr(693): WARNING: Overflow: Value 1024 is too large to store in a UINT8 : String to UINT* Overflow Since Warning does not break the build process, and it is easy to miss it. This patch is to update the code to report error and break the build if meet this kind of issue. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/GenFds: permit stripped MM_CORE_STANDALONE binariesArd Biesheuvel2019-01-043-3/+3
| | | | | | | | | | | | | | | | | | | The standalone MM core is executed in place, and resides in a separate execution context which may be space constrained. Since code and data may be mapped with different attributes for security reasons, the PE/COFF binary could have a section alignment of 4 KB. This means that any relocation data is not only useless, but it will also take up 4 KB of valuable space. So add support for the RELOCS_STRIPPED attribute on FFS files of this type, so that we can get rid of the .reloc section altogether. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Correct PcdArray value assigment statementFeng, Bob C2019-01-042-45/+73
| | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1410 BaseTools should not generate C structure array initial value if the value is not specified with CODE style. This patch is going to remove the incorrect initial value statement and correct the Pcd Array value assignment statement. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fixed build report issue.Feng, Bob C2019-01-041-3/+4
| | | | | | | | | | | | This patch is going to fix the regression issue by 72a1d77694d51914c0dd6aa97dbfa58634b0a4a5 After enable PCD array, the Pcd.OverrideStruct has a new key, array index, but the build report is not changed correspondingly. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/GenFv: Support SecCore and PeiCore in different FVChasel, Chiu2018-12-281-41/+41
| | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1423 There is usage model that SecCore and PeiCore are in different FVs. Update BaseTools to support this usage model. Test: Verified on internal platform with the case SecCore and PeiCore in different FVs and built/booted successfully. 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: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Reset FdsGlobalVariableFeng, Bob C2018-12-251-0/+51
| | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1418 This patch is going to fix a regression issue that is introduced by commit b3497bad1221704a5dbc5da0b10f42625f1ad2ed. Before commit b3497b, build launched a external GenFds.py to generate Fd, so the global variable in GenFds.py was reset in each execution. After commit b3497b, each GenFds run in the same python interpeter, so we need to explicitly reset global variable in each GenFdsApi call. 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: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* BaseTools: Fix GenFds error doesn't break build.Derek Lin2018-12-191-2/+5
| | | | | | | | | Fix a bug because of b3497bad1221704a5dbc5da0b10f42625f1ad2ed. Before the patch, when GenFds fail, the build continue and return success. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Derek Lin <derek.lin2@hpe.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Add $(INC)-like support when compiling .nasm filesZhiju.Fan2018-12-191-1/+19
| | | | | | | | | | | | | | | | | | | | current edk2\BaseTools\Conf\build_rule.template, the compile of nasm source files does not have the $(INC) support. The '-I' option only includes the directory of the nasm source file (${s_path}(+)). Hence, it will be impossible for nasm files to include files outside of the nasm source file directory. As a comparison, the compile of both .s and .asm have $(INC) support in their compile commands. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=1085 Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Fixed metafile parser issuesFeng, Bob C2018-12-184-31/+34
| | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1406 This patch is going to fix the regressions that is introduced by commit 2f818ed0fb57d98985d151781a2ce9b8683129ee The internal array for storing the metadata info should be cached so that the meta file is parsed only once in one build. 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>