REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1874

Build configuration is updated to support different
*FspBinPkg between FSP wrapper API and Dispatch modes.

Default will be Dispatch mode and to build FSP wrapper
for API mode:
"py -2 build_bios.py --platform KabylakeRvp3 --fspapi"

Cc: Michael Kubacki <michael.a.kuba...@intel.com>
Cc: Nate DeSimone <nathaniel.l.desim...@intel.com>
Cc: Liming Gao <liming....@intel.com>
Signed-off-by: Chasel Chiu <chasel.c...@intel.com>
---
 Platform/Intel/build_bios.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py
index 9f8d78f6e8..09eceddeff 100644
--- a/Platform/Intel/build_bios.py
+++ b/Platform/Intel/build_bios.py
@@ -125,6 +125,16 @@ def pre_build(build_config, build_type="DEBUG", 
silent=False, toolchain=None):
     config["BASE_TOOLS_PATH"] = config["EDK_TOOLS_PATH"]
     config["EDK_TOOLS_BIN"] = os.path.join(config["WORKSPACE"],
                                            config["EDK_TOOLS_BIN"])
+
+    #
+    # Board may have different FSP binary between API and Dispatch modes.
+    # In API mode if FSP_BIN_PKG_FOR_API_MODE is assigned, it should
+    # override FSP_BIN_PKG.
+    #
+    if config.get("API_MODE_FSP_WRAPPER_BUILD", "FALSE") == "TRUE":
+        if config.get("FSP_BIN_PKG_FOR_API_MODE") is not None:
+            config['FSP_BIN_PKG'] = config['FSP_BIN_PKG_FOR_API_MODE']
+
     config["PLATFORM_FSP_BIN_PACKAGE"] = \
         os.path.join(config['WORKSPACE_FSP_BIN'], config['FSP_BIN_PKG'])
     config['PROJECT_DSC'] = os.path.join(config["WORKSPACE_PLATFORM"],
-- 
2.13.3.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#41851): https://edk2.groups.io/g/devel/message/41851
Mute This Topic: https://groups.io/mt/31918437/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to