Browse Source

Platform/Intel: Switch to FSP Dispatch mode.

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.kubacki@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Chasel Chiu 5 years ago
parent
commit
c9db829d6a
1 changed files with 10 additions and 0 deletions
  1. 10 0
      Platform/Intel/build_bios.py

+ 10 - 0
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"],