lpcmanager

Parents 9191cb1496fc
Children 878b58a39717
FW update : pass target flash type as additional argument to PLC object 'RunUpdateScript' call
--- a/HostFirmwareUpdater.py Tue Sep 08 10:06:15 2020 +0200
+++ b/HostFirmwareUpdater.py Mon Nov 02 11:39:40 2020 +0100
@@ -34,6 +34,8 @@
import os
import hashlib
+from LPCArch import GetLPCArch
+
UPDATE_SCRIPT_TIMEOUT = 600
class HostFirmwareUpdater(object):
@@ -65,7 +67,9 @@
self._CreateFirmwareImageFileSizeMD5File()
self._CreateFirmwareImageFileMD5File()
# start the update script
- status, textError = self.controller._connector.RunUpdateScript(self.updateType)
+ product_name = GetLPCArch()
+ updateFlashTypeArg = "mmc" if product_name == "MC10" else "ubi"
+ status, textError = self.controller._connector.RunUpdateScript(self.updateType, updateFlashTypeArg)
if not status :
raise Exception(textError)
# The update script is now running: Feeding the update script with firmware image data