From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web09.2669.1626136931516682625 for ; Mon, 12 Jul 2021 17:42:11 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: nathaniel.l.desimone@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10043"; a="295723196" X-IronPort-AV: E=Sophos;i="5.84,235,1620716400"; d="scan'208";a="295723196" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2021 17:42:06 -0700 X-IronPort-AV: E=Sophos;i="5.84,235,1620716400"; d="scan'208";a="653423043" Received: from nldesimo-desk1.amr.corp.intel.com ([10.212.211.135]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2021 17:42:04 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Isaac Oram , Mohamed Abbas , Chasel Chiu , Michael D Kinney , Liming Gao , Eric Dong , Michael Kubacki Subject: [edk2-platforms] [PATCH V1 15/17] Platform/Intel: Add WhitleyOpenBoardPkg to build_bios.py Date: Mon, 12 Jul 2021 17:41:29 -0700 Message-Id: <20210713004131.1782-16-nathaniel.l.desimone@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20210713004131.1782-1-nathaniel.l.desimone@intel.com> References: <20210713004131.1782-1-nathaniel.l.desimone@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Signed-off-by: Nate DeSimone Co-authored-by: Isaac Oram Co-authored-by: Mohamed Abbas Cc: Chasel Chiu Cc: Michael D Kinney Cc: Isaac Oram Cc: Mohamed Abbas Cc: Liming Gao Cc: Eric Dong Cc: Michael Kubacki --- 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