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
Sean Brogan
76912197fa
BaseTools:replace the chinese quotation mark with unicode "
...
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2013
chinese quotation mark are used in the file
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:47 +08:00
Feng, Bob C
959791dd6c
BaseTools: Sort file list in Makefile
...
This patch is going to sort the file list in generated
Makefile. This change make the autogen makefile easy to
compare.
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 >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
2019-07-25 09:00:59 +08:00
Feng, Bob C
bb824f685d
BaseTools: Fixed the mis-using strip() function issue.
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2003
lstrip(parameter) do the match based on the char
in parameter but not only the whole parameter string.
In GenMake line 1082,
CmdSign.lstrip('/Fo') will strip the '/' or
'F' or 'o' on the left of CmdSign. This is not expected.
This patch is going to fix such 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-07-22 12:06:03 +08:00
Feng, Bob C
5f89bcc460
BaseTools: Create ".cache" folder when initialize Build object
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1986
Create "Conf/.cache" folder as early as possible
so that the later code do need to check
if it exits and then create it.
Signed-off-by: Bob Feng <bob.c.feng@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-07-22 09:21:14 +08:00
Cole Robinson
eebc135ffb
BaseTools: Fix python3.8 SyntaxWarning
...
Building with python3.8 shows a warning like:
SyntaxWarning: invalid escape sequence \(
GuidName = re.compile("\(GUID=[-a-fA-F0-9]+")
It seems harmless, but it's easy enough to fix: mark the string as
raw with the 'r' prefix like is used elsewhere in the file
Signed-off-by: Cole Robinson <crobinso@redhat.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com >
2019-07-15 09:09:25 +08:00
Jiewen Yao
a79841a024
BaseTools: Add HOST_APPLICATION module type.
...
It can be used to indicate a module can be build to run
as OS application and run in OS environment.
Cc: Bob Feng <bob.c.feng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-07-12 21:06:57 +08:00
Bob Feng
2d100d1d73
BaseTools: Fixed the issue when ToolDefinitionFile is not generated
...
ToolDefinitionFile is generated by PlatformAutoGen.ToolDefinition()
Code assume ToolDefinition is always called before using
ToolDefinitionFile, but in some cases, it's not true.
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 >
2019-07-12 17:11:58 +08:00
Feng, Bob C
688ec2d006
BaseTools: Detect the change of env variable used in tooldef.txt
...
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 >
2019-07-10 09:29:43 +08:00
Feng, Bob C
1d06b46cf1
BaseTools: Fixed the issue of the CFlag for compile PcdValueInit.c
...
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 >
2019-07-10 09:26:18 +08:00
Antoine Cœur
2d53d54a5b
BaseTools: Fix various typos
...
Fix various typos in BaseTools.
Signed-off-by: Cœur <coeur@gmx.fr >
Reviewed-by: Bob Feng <bob.c.feng@intel.com >
2019-07-08 08:59:29 +08:00
Jin, Eric
104a1aa19b
BaseTools/Capsule: Supports multiple payloads and drivers in capsule
...
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 >
2019-06-28 11:39:06 +08:00