Browse Source

WhitleyOpenBoardPkg: Add support for IFWI stitching

Adds support for stitching the IFWI (Integrated
Firmware Image) for Wilson City and Copper City

Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Reviewed-by:  Isaac Oram <isaac.w.oram@intel.com>
Nate DeSimone 2 years ago
parent
commit
5f67c572f4

+ 11 - 0
Platform/Intel/WhitleyOpenBoardPkg/CooperCityRvp/build_board.py

@@ -94,6 +94,17 @@ def post_build_ex(config, functions):
     :rtype: Dictionary
     """
     print("post_build_ex")
+    fv_path = os.path.join(config["BUILD_DIR_PATH"], "FV")
+    board_fd = config["BOARD"].upper()
+    final_fd = os.path.join(fv_path, "{}.fd".format(board_fd))
+    final_ifwi = os.path.join(fv_path, "{}.bin".format(board_fd))
+
+    ifwi_ingredients_path = os.path.join(config["WORKSPACE_PLATFORM_BIN"], "Ifwi", config["BOARD"])
+    flash_descriptor = os.path.join(ifwi_ingredients_path, "FlashDescriptor.bin")
+    intel_me = os.path.join(ifwi_ingredients_path, "Me.bin")
+    _merge_files((flash_descriptor, intel_me, final_fd), final_ifwi)
+    if os.path.isfile(final_fd):
+        print("IFWI image can be found at {}".format(final_ifwi))
     return None
 
 

+ 1 - 1
Platform/Intel/WhitleyOpenBoardPkg/CooperCityRvp/build_config.cfg

@@ -7,7 +7,7 @@
 
 
 [CONFIG]
-WORKSPACE_PLATFORM_BIN =
+WORKSPACE_PLATFORM_BIN = edk2-non-osi/Platform/Intel/WhitleyOpenBoardBinPkg
 EDK_SETUP_OPTION =
 openssl_path =
 PLATFORM_BOARD_PACKAGE = WhitleyOpenBoardPkg

+ 11 - 0
Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py

@@ -97,6 +97,17 @@ def post_build_ex(config, functions):
     :rtype: Dictionary
     """
     print("post_build_ex")
+    fv_path = os.path.join(config["BUILD_DIR_PATH"], "FV")
+    board_fd = config["BOARD"].upper()
+    final_fd = os.path.join(fv_path, "{}.fd".format(board_fd))
+    final_ifwi = os.path.join(fv_path, "{}.bin".format(board_fd))
+
+    ifwi_ingredients_path = os.path.join(config["WORKSPACE_PLATFORM_BIN"], "Ifwi", config["BOARD"])
+    flash_descriptor = os.path.join(ifwi_ingredients_path, "FlashDescriptor.bin")
+    intel_me = os.path.join(ifwi_ingredients_path, "Me.bin")
+    _merge_files((flash_descriptor, intel_me, final_fd), final_ifwi)
+    if os.path.isfile(final_fd):
+        print("IFWI image can be found at {}".format(final_ifwi))
     return None
 
 

+ 1 - 1
Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_config.cfg

@@ -7,7 +7,7 @@
 
 
 [CONFIG]
-WORKSPACE_PLATFORM_BIN =
+WORKSPACE_PLATFORM_BIN = edk2-non-osi/Platform/Intel/WhitleyOpenBoardBinPkg
 EDK_SETUP_OPTION =
 openssl_path =
 PLATFORM_BOARD_PACKAGE = WhitleyOpenBoardPkg