Steven Shi
b0c15fb128
BaseTools: Add more parameter checking for CopyFileOnChange()
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2193
The current CopyFileOnChange() method in Misc.py does not
accept the input SrcFile parameter as a dir, but the method
does not check the SrcFile is dir or not. This patch is to
add more input parameter type checking and error message output
for method CopyFileOnChange.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Signed-off-by: Steven Shi <steven.shi@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com >
2019-09-19 08:48:31 +08:00
Feng, Bob C
22e75231ae
BaseTools:Remove the unnecessary operation of renaming a file.
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2183
This patch is going to remove rename call to reduce unnecessary
io operation so that saving build time.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-09-17 10:19:05 +08:00
Feng, Bob C
0075ab2cec
BaseTools: remove unnecessary calls of os.exist
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2101
This patch is going to remove unnecessary calls
of os.exist()
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 >
2019-09-17 10:19:05 +08:00
Feng, Bob C
bc9e4194cf
BaseTools: Improve GetDependencyList function
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2102
GetDependencyList get the header file via
re.findall in the whole header file.
This patch is to pre-process the header file and
to feed the shorter string to re.findall.
This patch is to improve GetDependencyList() efficiency
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 >
2019-09-17 10:19:05 +08:00
Fan, ZhijuX
e32f7bc96d
BaseTools:change some incorrect parameter defaults
...
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1858
for Dict={},There are pitfalls in the way this default parameter is set
and Dict is not used in functions, other functions have these two cases,
I will change some incorrect parameter defaults
This patch is going to fix this issue
Cc: Liming Gao <liming.gao@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com >
2019-09-17 10:18:51 +08:00
Fan, ZhijuX
b67735a7e8
BaseTools:Replace PlatformInfo with PlatformAutoGen for Moudle
...
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2188
build -p MdeModulePkg\MdeModulePkg.dsc -a IA32 -m
MdeModulePkg\Universal\PCD\Pei\Pcd.inf
Error:
AttributeError: 'PlatformInfo' object has no attribute
'DynamicPcdList'
The DSC data object used to build a separate module today
is PlatformInfo rather than PlatformAutoGen
'PlatformAutoGen' object has attribute 'DynamicPcdList'
This patch is going to fixed this issue
Cc: Liming Gao <liming.gao@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com >
2019-09-17 10:18:51 +08:00
Feng, Bob C
5a9db85880
BaseTools: Fixed a bug of IgnoreAutoGen
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2080
After checking that if the build can't
ignore Autogen due to there is no compelet autogen files,
the build tool need to do a completely Autogen.
This patch is to fix a bug that if AutoGen
can't be skiped, the SkipAutoGen flag
need to set to False
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 >
2019-09-12 14:08:15 +08:00
Feng, Bob C
7809492c10
BaseTools: Enable --genfds-multi-thread to default build
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1302
This patch enable --genfds-multi-thread to default build.
This patch keep --genfds-multi-thread build option for
compatibility and also add a new build option to disable
genfds-multi-thread as --no-genfds-multi-thread.
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 >
2019-09-11 09:43:59 +08:00
Feng, Bob C
f23da86415
BaseTools: Fixed the build fail on Linux with --genfds-multi-thread
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1302
If GenSec input file not exist, the related command will fail and make
will stop on Linux. GenSec input file is allow to be non-existent.
This patch is to let "make" continue if gensec input file not exist.
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 >
2019-09-11 09:43:59 +08:00
Feng, Bob C
e3c8311f8a
BaseTools: Fixed the bug of multi-thread genffs for override inf
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1302
If there is a inf override, and multi-thread genffs is enabled, build
will fail.
This patch is going to fix this bug.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Steven Shi <steven.shi@intel.com >
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-09-11 09:43:58 +08:00
Feng, Bob C
000ab98574
BaseTools: Sort Pcd settings to make PcdTokenNumber be fixed
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2147
This patch is to sort the Pcd settings so that PcdTokenNumber
will not change if the platform's Pcd settings are the same.
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Steven Shi <steven.shi@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-09-10 08:39:19 +08:00
Feng, Bob C
373298ca0d
BaseTools: Fixed issue for IgnoreAutoGen
...
https://bugzilla.tianocore.org/show_bug.cgi?id=2080
This patch is to improve build -u option to re-use
GlobalVar_<platformguid>_<arch>.bin file which is
introduced by multiple-process-autogen feature.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Steven Shi <steven.shi@intel.com >
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Acked-by: Liming Gao <liming.gao@intel.com >
2019-09-10 08:39:18 +08:00
Feng, Bob C
53e2eaba7a
BaseTools: Fixed build clean regression issue
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2166
file_lock and cache_lock are used as global data,
so move file_lock and cache_lock initialization in Build
object __init__ function.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Steven Shi <steven.shi@intel.com >
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-09-10 08:39:17 +08:00
Bob Feng
cbe7543ebb
BaseTools: Fix a bug for Hii Pcd override
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2157
Hii Pcd links to a efi variable. The Variable
default value is evaluated by related Hii Pcds
setting. If multiple Hii Pcds links to one variable,
and the offset overlap, the later Hii Pcds setting
should be effective. There is a tool bug that is if
the Pcds are in different dsc file which are included
into the platform dsc file, build tool does not get
the Pcds relative position correctly. That means
build tool does not know which Pcd is the later one. As
the result, the variable default value will be incorrect.
This patch is to fix this bug.
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 >
2019-09-10 08:39:16 +08:00
Fan, ZhijuX
d6f5a5050b
BaseTools:ECC need to handle lower case 'static'
...
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1778
We are going to add keyword (lower case) 'static' for functions and global
variables which are not referenced outside their current C file.
However, the ECC tool only recognizes upper case 'STATIC' at this moment.
This will lead to issue reports for new codes that follow the above coding
style.
This patch is going to handle lower case 'static'
Cc: Liming Gao <liming.gao@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com >
2019-09-09 11:14:42 +08:00
Fan, ZhijuX
03ad3d889c
BaseTools:Ecc handle another copyright format
...
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2057
Ecc can not handle the copyright format like
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
This will cause Ecc to report wrong information.
This patch is going to handle this format
Cc: Liming Gao <liming.gao@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com >
2019-09-09 11:13:52 +08:00
Shi, Steven
40db176d9d
BaseTools: Support more file types in build cache
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1958
Current build cache does not store and restore all
types file of Hii/vfr, version and dpx. This patch
adds more file types to support them in build cache.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Signed-off-by: Steven Shi <steven.shi@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-09-02 12:17:56 +08:00
Feng, Bob C
37eef91017
BaseTools: Fixed regression issue for building !x86 builds
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2134
This patch is to fix a build tool regression issue which
was introduced by commit e8449e1d8e
.
In commit e8449e1d8e
, build tool check the pcd before
filter out the irrelevant library instance.
The logic of evaluating the priority of the library class
resolutions was not changed.
Cc: Liming Gao <liming.gao@intel.com >
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Tested-by: Michael D Kinney <michael.d.kinney@intel.com >
Acked-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
Acked-by: Leif Lindholm <leif.lindholm@linaro.org >
Tested-by: Leif Lindholm <leif.lindholm@linaro.org >
2019-08-29 11:10:29 +08:00
Feng, Bob C
df43ea6c08
BaseTools: fix an incremental build issue.
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2137
This patch is going to fix a regression issue of incremental
build which was introduced by the commit 94459080c
.
The changing on INF file will not trigger module rebuild.
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Steven Shi <steven.shi@intel.com >
Tested-by: Michael D Kinney <michael.d.kinney@intel.com >
Acked-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-08-29 11:07:48 +08:00
Feng, Bob C
abc0155b03
BaseTools: Incorrect error message for library instance not found
...
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2099
This is a regression issue introduced by commit e8449e.
This patch is 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 >
2019-08-23 11:26:24 +08:00
Feng, Bob C
5f7bb39117
BaseTools: Fix incremental build genmake issue
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2090
This is a regression issue introduced by commit e8449e.
This patch is going to fix this issue.
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 >
2019-08-23 11:26:24 +08:00
Shi, Steven
6dd9aa4019
BaseTools: Support long file path in windows for misc functions
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2103
Current CopyFileOnChange() and SaveFileOnChange() in
BaseTools\Source\Python\Common\Misc.py don't use the dedicated
long file path API to handle the file path strings and cannot
support the long file path copy and save in windows. This patch
enhances them to support the long file path copy and save
correctly.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Signed-off-by: Steven Shi <steven.shi@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com >
2019-08-23 11:26:23 +08:00
Fan, ZhijuX
0970a80583
BaseTools: Update incorrect variable name 'DataPile'
...
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2093
The PlatformAutoGen object has a DataPipe property but no DataPile property
So change the variable name 'DataPile' to 'DataPipe' in BuildReport.py
This patch is going to fix that issue.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Bob Feng <bob.c.feng@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 >
2019-08-20 14:15:47 +08:00
Shi, Steven
94459080c1
BaseTools: Improve the file saving and copying reliability
...
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2079
The Basetool CopyFileOnChange() and SaveFileOnChange()
functions might raise the IOError occasionally when build
in Windows with multi-process and build cache enabled.
The CopyFileOnChange() and SaveFileOnChange() might be invoked
in multiple sub-processes simultaneously, and this patch adds
global locks to sync these functions invoking which can
harden their reliability.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Signed-off-by: Steven Shi <steven.shi@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com >
2019-08-20 14:06:07 +08:00
Shi, Steven
d01a998612
BaseTools: Add GenFds multi-thread support in build cache
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1923
Fix the issue that the GenFds multi-thread will build fail
if enable the build cache together.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Signed-off-by: Steven Shi <steven.shi@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com >
2019-08-20 14:06:07 +08:00
Shi, Steven
c340c5bd1b
BaseTools: Change the [Arch][Name] module key in Build cache
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1951
Current build cache use the module's [self.Arch][self.Name]
info as the ModuleAutoGen object key in hash list and dictionary.
The [self.Arch][self.Name] is not safe as the module key because
there could be two modules with same module name and arch name in
one platform. E.g. A platform can override a module or library
instance in another different path, the overriding module can has
the same module name and arch name as the original one.
Directly use the ModuleAutoGen obj self as the key, because
the obj __hash__ and __repr__ attributes already contain the
full path and arch name.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Signed-off-by: Steven Shi <steven.shi@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com >
2019-08-20 14:06:06 +08:00
Shi, Steven
56c786b0a9
BaseTools: Print first cache missing file for build cachle
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1925
When a module build cache miss, add support to print the first
cache missing file path and name.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Signed-off-by: Steven Shi <steven.shi@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com >
2019-08-20 14:06:06 +08:00
Shi, Steven
0e7e7a264c
BaseTools: Improve the cache hit in the edk2 build cache
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1927
Current cache hash algorithm does not parse and generate
the makefile to get the accurate dependency files for a
module. It instead use the platform and package meta files
to get the module depenedency in a quick but over approximate
way. These meta files are monolithic and involve many redundant
dependency for the module, which cause the module build
cache miss easily.
This patch introduces one more cache checkpoint and a new
hash algorithm besides the current quick one. The new hash
algorithm leverages the module makefile to achieve more
accurate and precise dependency info for a module. When
the build cache miss with the first quick hash, the
Basetool will caculate new one after makefile is generated
and then check again.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Signed-off-by: Steven Shi <steven.shi@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com >
2019-08-20 14:06:05 +08:00
Feng, Bob C
76e12fa334
BaseTools: Fixed issue of incorrect Module Unique Name
...
https://bugzilla.tianocore.org/show_bug.cgi?id=2088
If there are more than one override instance for a same module,
the Module Unique Name is generated incorrectly.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Steven Shi <steven.shi@intel.com >
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-08-19 09:06:14 +08:00
Jin, Eric
48d8d4d80b
BaseTools/Capsule: Tool to generate Windows Firmware Update Driver
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1837
The tool is designed to generate Windows Firmware Update Drivers,
the input is one drivername.cap with related parameters, the output
Windows Driver package are composed by drivername.cap, drivername.inf
and drivername.cat to update the single payload in device.
usage:
GenerateWindowsDriver [-h] [--output-folder OUTPUTFOLDER]
[--product-fmp-guid PRODUCTFMPGUID]
[--capsuleversion-dotstring CAPSULEVERSION_DOTSTRING]
[--capsuleversion-hexstring CAPSULEVERSION_HEXSTRING]
[--product-fw-provider PRODUCTFWPROVIDER]
[--product-fw-mfg-name PRODUCTFWMFGNAME]
[--product-fw-desc PRODUCTFWDESC]
[--capsule-file-name CAPSULEFILENAME]
[--pfx-file PFXFILE] [--arch ARCH]
[--operating-system-string OPERATINGSYSTEMSTRING]
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Kinney Michael D <michael.d.kinney@intel.com >
Signed-off-by: Eric Jin <eric.jin@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com >
2019-08-15 20:13:55 +08:00
Sean Brogan
e2aacac580
BaseTools/Capsule: Add WindowsCapsuleSupportHelper
...
Add initial version WindowsCapsuleSupportHelper.py
original source comes from
https://github.com/microsoft/mu_basecore/blob/dev/201905/BaseTools/Plugin/WindowsCapsuleSupportHelper/WindowsCapsuleSupportHelper.py
commit ebd9aad90dee3a3094b575928670cf81b8c685b5
Convert EOL to CRLF
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
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 >
2019-08-15 20:13:05 +08:00
Bob Feng
08a54c9e0a
BaseTools: Move buildoptions.py to Common folder
...
buildoptions is used by build.py and TargetTxtClassObj.py
Move buildoptions.py to Common folder so that
build tool and ECC tool work fine.
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 >
2019-08-14 13:54:49 +08:00
Rodriguez, Christian
82407bd129
BaseTools: Fix checking for Sources section in INF file
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1804
The check to see if [Sources] section lists all the header type
files of a module is missing the exclusion of source files that
fall under the scope of Package includes. This change adds the
exclusions.
Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Tested-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com >
2019-08-14 10:59:08 +08:00
Feng, Bob C
2b4c07bc22
BaseTools: Add "-" in a re to parse line in .map file
...
https://bugzilla.tianocore.org/show_bug.cgi?id=2058
If there are multiple module instances with different
guid used in .dsc file, the temp path of the module will
contain 8-4-4-4-12 format guid string. So "-" need to be
added into the regular expression for parsing it correctly.
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 >
2019-08-14 10:24:36 +08:00
Feng, Bob C
a000d5d1ca
BaseTools: Fix incremental build bug
...
https://bugzilla.tianocore.org/show_bug.cgi?id=2078
This is a build tool regression issue that
is introduced by multiple-process-autogen.
The workspace timestamp value is not pass
to module autogen object correctly, so build tool
does not detect the change of .dsc and ignore the autogen.
This patch is to fix this issue.
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 >
Tested-by: Michael D Kinney <michael.d.kinney@intel.com >
2019-08-14 10:23:25 +08:00
Feng, Bob C
a0792697bc
BaseTools: Fixed an issue that build raise exception
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2047
Build raise exception if there is libraryclass
missing in dsc file and --pcd build option is used.
Build should report the missing libraryclass but not
a call stack.
This patch is going to fix it.
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 >
2019-08-12 10:40:24 +08:00
Feng, Bob C
1a624dd7cf
BaseTools: Enable block queue log agent.
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875
To support Ctrl+S and Ctrl+Q, we enable block queue
for log.
Cc: Liming Gao <liming.gao@intel.com >
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Acked-by: Laszlo Ersek <lersek@redhat.com >
Tested-by: Laszlo Ersek <lersek@redhat.com >
Acked-by: Liming Gao <liming.gao@intel.com >
2019-08-09 23:15:55 +08:00
Feng, Bob C
4acae2b38e
BaseTools: Add the support for python 2
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875
python3 change the module name of Queue to queue.
python3 add a new log handler of QueueHandler.
This patch is to make Multiple process AutoGen
feature work for python2
Cc: Liming Gao <liming.gao@intel.com >
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Acked-by: Laszlo Ersek <lersek@redhat.com >
Tested-by: Laszlo Ersek <lersek@redhat.com >
Acked-by: Liming Gao <liming.gao@intel.com >
2019-08-09 23:15:55 +08:00
Feng, Bob C
c60fb00f6c
BaseTools: Move BuildOption parser out of build.py
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875
Build tool supports user to specify the conf folder.
To make the build options be evaluated at the beginning
of launching build, extract the buildoption function
from build.py to a new .py file.
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Acked-by: Laszlo Ersek <lersek@redhat.com >
Tested-by: Laszlo Ersek <lersek@redhat.com >
Acked-by: Liming Gao <liming.gao@intel.com >
2019-08-09 23:15:54 +08:00
Feng, Bob C
636ed13a7f
BaseTools: Add LogAgent to support multiple process Autogen
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875
AutoGen processes race the logfile. To resolve this issue,
this patch create a LogAgent thread in main process to write
the log content to console or file, Other process will send
the log content to the LogAgent.
Cc: Liming Gao <liming.gao@intel.com >
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Acked-by: Laszlo Ersek <lersek@redhat.com >
Tested-by: Laszlo Ersek <lersek@redhat.com >
Acked-by: Liming Gao <liming.gao@intel.com >
2019-08-09 23:15:54 +08:00
Feng, Bob C
3285fbda88
BaseTools: Add shared data for processes
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875
Add shared data for autogen processes.
Cc: Liming Gao <liming.gao@intel.com >
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Acked-by: Laszlo Ersek <lersek@redhat.com >
Tested-by: Laszlo Ersek <lersek@redhat.com >
Acked-by: Liming Gao <liming.gao@intel.com >
2019-08-09 23:15:53 +08:00
Feng, Bob C
673d09a2dd
BaseTools: Enable Multiple Process AutoGen
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875
Assign the Module AutoGen tasks into multiple
sub process.
Cc: Liming Gao <liming.gao@intel.com >
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Acked-by: Laszlo Ersek <lersek@redhat.com >
Tested-by: Laszlo Ersek <lersek@redhat.com >
Acked-by: Liming Gao <liming.gao@intel.com >
2019-08-09 23:15:53 +08:00
Feng, Bob C
e8449e1d8e
BaseTools: Decouple AutoGen Objects
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875
1. Separate the AutoGen.py into 3 small py files.
One is for AutoGen base class, one is for WorkspaceAutoGen class
and PlatformAutoGen class, and the one for ModuleAutoGen class.
2. Create a new class DataPipe to store the Platform scope settings.
Create a new class PlatformInfo to provide the same interface
as PlatformAutoGen. PlatformInfo class is initialized by
DataPipe instance.
Create a new class WorkspaceInfo to provide the same interface
as WorkspaceAutoGen. WorkspaceInfo class is initialized by
DataPipe instance.
3. Change ModuleAutoGen to depends on DataPipe, PlatformInfo and
WorkspaceInfo. Remove the dependency of ModuleAutoGen to PlatformAutoGen.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Steven Shi <steven.shi@intel.com >
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Acked-by: Laszlo Ersek <lersek@redhat.com >
Tested-by: Laszlo Ersek <lersek@redhat.com >
Acked-by: Liming Gao <liming.gao@intel.com >
2019-08-09 23:15:52 +08:00
Feng, Bob C
197ca7febf
BaseTools: Add functions to get platform scope build options
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875
These functions are used for get platform scope
build options. They will be used in later patches.
Cc: Liming Gao <liming.gao@intel.com >
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Acked-by: Laszlo Ersek <lersek@redhat.com >
Tested-by: Laszlo Ersek <lersek@redhat.com >
Acked-by: Liming Gao <liming.gao@intel.com >
2019-08-09 23:15:52 +08:00
Feng, Bob C
2927a6fd99
BaseTools: Split WorkspaceAutoGen._InitWorker into multiple functions
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875
The WorkspaceAutoGen.__InitWorker function is too long, it's hard
to read and understand.
This patch is to separate the __InitWorker into multiple small ones.
Cc: Liming Gao <liming.gao@intel.com >
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Acked-by: Laszlo Ersek <lersek@redhat.com >
Tested-by: Laszlo Ersek <lersek@redhat.com >
Acked-by: Liming Gao <liming.gao@intel.com >
2019-08-09 23:15:51 +08:00
Feng, Bob C
db01c8e3d8
BaseTools: Singleton the object to handle build conf file
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875
The build config files are target.txt, build rule, tooldef
During a build, the config is not changed, so the object to
handle them need to be singleton.
Cc: Liming Gao <liming.gao@intel.com >
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Acked-by: Laszlo Ersek <lersek@redhat.com >
Tested-by: Laszlo Ersek <lersek@redhat.com >
Acked-by: Liming Gao <liming.gao@intel.com >
2019-08-09 23:15:51 +08:00
Feng, Bob C
83d6207f99
BaseTools: Fixed a typo in Trim.py
...
This is a regression issue introduced
by commit 307e1650be
This patch is to fix this issue.
Cc: Liming Gao <liming.gao@intel.com >
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-08-02 00:18:00 +08:00
Matthew Carlson
101dc9e257
BaseTools:Added arch output to build report
...
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2016
Added arch output to build report so it's easy to tell
which arch is being generated. Useful when multiple versions
of a single module is being emitted for multiple archs.
This patch is going to Added arch output
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 >
2019-08-01 15:36:49 +08:00
Bob Feng
8ddec24dea
BaseTools:Updata the output encoding of the Popen function
...
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2015
Not all output works in utf-8, so change the encoding to
the default
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 >
2019-08-01 15:36:48 +08:00
Max Knutsen
307e1650be
BaseTools:Add extra debugging message
...
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2014
Add extra debugging to improve error identification.
Error while processing file if the file is read incorrectly
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: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-08-01 15:36:48 +08:00