installer: force updating firmware in factory install mode. Factory test images (and install shims) are configured with "leave_firmware_alone" because they may contain firmware blobs that are different from the real version to install. So we have to explicitly assign the "force" flag when factory installer is trying to update the firmware to the assigned version (by make_factory_package --firmwareupdate). BUG=chrome-os-partner:3152 TEST=none, will be updated before commiting Change-Id: I449de11cb1785fd69890527313fbdce18f8b835f R=wfrichar@chromium.org,rspangler@chromium.org Review URL: http://codereview.chromium.org/6795002
diff --git a/chromeos-postinst b/chromeos-postinst index bdecbd2..ef3d396 100755 --- a/chromeos-postinst +++ b/chromeos-postinst
@@ -104,8 +104,11 @@ -x "${FIRMWARE_UPDATE_SCRIPT}" ]; then FIRMWARE_UPDATE_MODE="" if [ -n "${IS_FACTORY_INSTALL}" ]; then - # factory-mode - FIRMWARE_UPDATE_MODE="--mode=factory_install" + # factory-mode (--force must be the first parameter when being invoked) + # Factory install shim will invoke similiar command in memento_updater.sh, + # so if you modify any parameters here, please remember to also update + # memento_updater.sh. + FIRMWARE_UPDATE_MODE="--force --mode=factory_install" elif [ -n "${IS_RECOVERY_INSTALL}" ]; then # recovery-mode FIRMWARE_UPDATE_MODE="--mode=recovery"