summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2018-08-21 22:03:44 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-09-01 03:26:35 -0700
commitb7a007a22971e3a257b40844d4f685875ee56d5e (patch)
tree519f3cebcc1a67bd4dbff457ff3cd719ecbe1086 /tests
parentad02d85e4fe8c2f96cf7abd3db25eafda056952e (diff)
downloadvboot-b7a007a22971e3a257b40844d4f685875ee56d5e.tar.gz
futility: cmd_update: Preserve image sections before update
When updating RO (or going to compare with contents), we need to preserve (copy) section data from system active firmware image. The `preserve_images` will try to preserve a list of known sections in full update (`--wp=0`) mode, so we VPD data and HWID won't be lost. BUG=chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh BRANCH=None Change-Id: I85c4ba972853dbc0fc101bee269c0effe70988b1 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1183653 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/futility/test_update.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/futility/test_update.sh b/tests/futility/test_update.sh
index 9e8a6aa5..43de6a0e 100755
--- a/tests/futility/test_update.sh
+++ b/tests/futility/test_update.sh
@@ -30,6 +30,8 @@ set -o pipefail
# In all the test scenario, we want to test "updating from PEPPY to LINK".
TO_IMAGE=${TMP}.src.link
FROM_IMAGE=${TMP}.src.peppy
+TO_HWID="X86 LINK TEST 6638"
+FROM_HWID="X86 PEPPY TEST 4211"
cp -f ${LINK_BIOS} ${TO_IMAGE}
cp -f ${PEPPY_BIOS} ${FROM_IMAGE}
@@ -49,6 +51,10 @@ cp -f "${TO_IMAGE}" "${TMP}.expected.full"
cp -f "${FROM_IMAGE}" "${TMP}.expected.rw"
cp -f "${FROM_IMAGE}" "${TMP}.expected.a"
cp -f "${FROM_IMAGE}" "${TMP}.expected.b"
+"${FUTILITY}" gbb -s --hwid="${FROM_HWID}" "${TMP}.expected.full"
+"${FUTILITY}" load_fmap "${TMP}.expected.full" \
+ RW_VPD:${TMP}.from/RW_VPD \
+ RO_VPD:${TMP}.from/RO_VPD
"${FUTILITY}" load_fmap "${TMP}.expected.rw" \
RW_SECTION_A:${TMP}.to/RW_SECTION_A \
RW_SECTION_B:${TMP}.to/RW_SECTION_B \