summaryrefslogtreecommitdiff
path: root/tests/futility/test_update.sh
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2018-09-22 13:07:11 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-09-27 19:43:58 -0700
commita61d3d89c7717d86632cdc1d92bee1ac55fcb83b (patch)
treeca5c8d2068d7d21a3b4d0175dea4f636aa877666 /tests/futility/test_update.sh
parentd35d0566f16122195b210c365ee8e831a2544f61 (diff)
downloadvboot-a61d3d89c7717d86632cdc1d92bee1ac55fcb83b.tar.gz
futility: update: Add --programmer to override flashrom programmer for servo
Many developers need to reflash or update firmware using servo, and the firmware logic has been complicated enough that simply calling 'flashrom -w image.bin -p $SERVO' will usually destroy many important settings, for example HWID, VPD, and other data provisioned in factory. It should be more convenient if we can use 'futility update' against servo. The '--programmer' provides first step - to override the flashrom programmer so we can read and write via special programmer (like servo). With this change, developers can reflash using: futility -p $SERVO -i $IMAGE --force --wp 0 BRANCH=None BUG=b:116326638 TEST=make futil; sudo tests/futility/run_test_scripts.sh $(pwd)/build/futility Change-Id: Iad4819ff8258086e1abb58fefd462d94050754d0 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1239817 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'tests/futility/test_update.sh')
-rwxr-xr-xtests/futility/test_update.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/futility/test_update.sh b/tests/futility/test_update.sh
index c5615f0f..1b80e2e5 100755
--- a/tests/futility/test_update.sh
+++ b/tests/futility/test_update.sh
@@ -277,3 +277,13 @@ test_update "Full update (--quirks min_platform_version)" \
"${FROM_IMAGE}" "${TMP}.expected.full" \
--quirks min_platform_version=3 \
-i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1,3
+
+# Test special programmer
+if type flashrom >/dev/null 2>&1; then
+ echo "TEST: Full update (dummy programmer)"
+ cp -f "${FROM_IMAGE}" "${TMP}.emu"
+ sudo "${FUTILITY}" update --programmer \
+ dummy:emulate=VARIABLE_SIZE,image=${TMP}.emu,size=8388608 \
+ -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1,3 >&2
+ cmp "${TMP}.emu" "${TMP}.expected.full"
+fi