[edk2-devel] [edk2-platforms] [PATCH V1 15/17] Platform/Intel: Add WhitleyOpenBoardPkg to build_bios.py
Nate DeSimone
nathaniel.l.desimone at intel.com
Tue Jul 13 00:41:29 UTC 2021
Signed-off-by: Nate DeSimone <nathaniel.l.desimone at intel.com>
Co-authored-by: Isaac Oram <isaac.w.oram at intel.com>
Co-authored-by: Mohamed Abbas <mohamed.abbas at intel.com>
Cc: Chasel Chiu <chasel.chiu at intel.com>
Cc: Michael D Kinney <michael.d.kinney at intel.com>
Cc: Isaac Oram <isaac.w.oram at intel.com>
Cc: Mohamed Abbas <mohamed.abbas at intel.com>
Cc: Liming Gao <gaoliming at byosoft.com.cn>
Cc: Eric Dong <eric.dong at intel.com>
Cc: Michael Kubacki <Michael.Kubacki at microsoft.com>
---
Platform/Intel/build.cfg | 2 ++
Platform/Intel/build_bios.py | 28 ++++++++++++++++------------
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/Platform/Intel/build.cfg b/Platform/Intel/build.cfg
index ede542f9f5..896ea340df 100644
--- a/Platform/Intel/build.cfg
+++ b/Platform/Intel/build.cfg
@@ -62,3 +62,5 @@ UpXtreme = WhiskeylakeOpenBoardPkg/UpXtreme/build_config.cfg
WhiskeylakeURvp = WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg
CometlakeURvp = CometlakeOpenBoardPkg/CometlakeURvp/build_config.cfg
TigerlakeURvp = TigerlakeOpenBoardPkg/TigerlakeURvp/build_config.cfg
+CooperCityRvp = WhitleyOpenBoardPkg/CooperCityRvp/build_config.cfg
+WilsonCityRvp = WhitleyOpenBoardPkg/WilsonCityRvp/build_config.cfg
diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py
index 8f855f63eb..4450b2c37f 100644
--- a/Platform/Intel/build_bios.py
+++ b/Platform/Intel/build_bios.py
@@ -1,4 +1,5 @@
-
+#!/usr/bin/env python3
+#
# @ build_bios.py
# Builds BIOS using configuration files and dynamically
# imported functions from board directory
@@ -35,7 +36,7 @@ except ImportError:
def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None):
"""Sets the environment variables that shall be used for the build
- :param build_config: The build configuration as defined in the JOSN
+ :param build_config: The build configuration as defined in the JSON
configuration files
:type build_config: Dictionary
:param build_type: The build target, DEBUG, RELEASE, RELEASE_PDB,
@@ -58,7 +59,7 @@ def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None):
# update the current config with the build config
config.update(build_config)
- # make the config and build python 2.7 compartible
+ # make the config and build python 2.7 compatible
config = py_27_fix(config)
# Set WORKSPACE environment.
@@ -130,9 +131,9 @@ def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None):
config["PACKAGES_PATH"] += os.pathsep + filepath
config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_DRIVERS"]
config["PACKAGES_PATH"] += os.pathsep + \
- os.path.join(config["WORKSPACE"], "FSP")
+ os.path.join(config["WORKSPACE"], config["WORKSPACE_FSP_BIN"])
config["PACKAGES_PATH"] += os.pathsep + \
- os.path.join(config["WORKSPACE"], "edk2")
+ os.path.join(config["WORKSPACE"], config["WORKSPACE_CORE"])
config["PACKAGES_PATH"] += os.pathsep + os.path.join(config["WORKSPACE"])
config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_PLATFORM_BIN"]
config["EDK_TOOLS_PATH"] = os.path.join(config["WORKSPACE"],
@@ -389,7 +390,10 @@ def build(config):
command.append(config["REBUILD_MODE"])
if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
- command.append(config["EXT_BUILD_FLAGS"])
+ ext_build_flags = config["EXT_BUILD_FLAGS"].split(" ")
+ ext_build_flags = [x.strip() for x in ext_build_flags]
+ ext_build_flags = [x for x in ext_build_flags if x != ""]
+ command.extend(ext_build_flags)
if config.get('BINARY_CACHE_CMD_LINE'):
command.append(config['HASH'])
@@ -453,7 +457,7 @@ def post_build(config):
shell = True
command = ["FitGen", "-D",
final_fd, temp_fd, "-NA",
- "-I", config["BIOS_INFO_GUID"]]
+ "-I", config["BIOS_INFO_GUID"]] #@todo: Need mechanism to add additional options to the FitGen command line
if os.name == "posix": # linux
shell = False
@@ -600,7 +604,7 @@ def post_build_ex(config):
def clean_ex(config):
- """ An extension of the platform cleanning
+ """ An extension of the platform cleaning
:param config: The environment variables used in the clean process
:type config: Dictionary
@@ -658,7 +662,7 @@ def execute_script(command, env_variables, collect_env=False,
:type command: List:String
:param env_variables: Environment variables passed to the process
:type env_variables: String
- :param collect_env: Enables the collection of evironment variables
+ :param collect_env: Enables the collection of environment variables
when process execution is done
:type collect_env: Boolean
:param enable_std_pipe: Enables process out to be piped to
@@ -705,7 +709,7 @@ def execute_script(command, env_variables, collect_env=False,
# wait for process to be done
execute.wait()
- # if collect enviroment variables
+ # if collect environment variables
if collect_env:
# get the new environment variables
std_out, env = get_environment_variables(std_out, env_marker)
@@ -713,7 +717,7 @@ def execute_script(command, env_variables, collect_env=False,
def patch_config(config):
- """ An extension of the platform cleanning
+ """ An extension of the platform cleaning
:param config: The environment variables used in the build process
:type config: Dictionary
@@ -888,7 +892,7 @@ def get_config():
def get_platform_config(platform_name, config_data):
- """ Reads the platform specifig config file
+ """ Reads the platform specific config file
param platform_name: The name of the platform to be built
:type platform_name: String
--
2.27.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77717): https://edk2.groups.io/g/devel/message/77717
Mute This Topic: https://groups.io/mt/84168632/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list