diff options
author | Hung-Te Lin <hungte@chromium.org> | 2020-09-24 16:10:12 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-16 11:12:50 +0000 |
commit | 772d739ac180e1601d24c47e6f21bb5dcc81c11f (patch) | |
tree | 9c5061d36d45e8b7e6b91a165617242a57b37ba4 /tests | |
parent | 920a1202ad7afdda4f0110eb1c18f1a40ab36b9a (diff) | |
download | vboot-772d739ac180e1601d24c47e6f21bb5dcc81c11f.tar.gz |
futility: update: load quirks from firmware image CBFS filestabilize-rust-13555.B
The firmware updater now looks at CBFS 'FW_MAIN_A' (RW A) and if a text
file 'updater_quirks' is found, the contents will be fetched to setup
default quirks.
This helps sharing same customization across multiple firmware images
(for different models) shared by same unibuild OS image. Without that,
we have to maintain a large list of hard-coded model names in firmware
updater source.
BRANCH=none
BUG=b:169284414
TEST=make runtests
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Change-Id: I938bffe9f16bc3adee0dc3efb6976efe581c6d8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2426093
Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/futility/test_update.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/futility/test_update.sh b/tests/futility/test_update.sh index 655bab4a..ae4a3624 100755 --- a/tests/futility/test_update.sh +++ b/tests/futility/test_update.sh @@ -480,4 +480,16 @@ if type cbfstool >/dev/null 2>&1; then "${TMP}.from.smm" "${TMP}.expected.full_smm" \ -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 \ --quirks eve_smm_store + + echo "min_platform_version=3" >"${TMP}.quirk" + cp -f "${TO_IMAGE}" "${TO_IMAGE}.quirk" + ${FUTILITY} dump_fmap -x "${TO_IMAGE}" "BOOT_STUB:${TMP}.cbfs" + # Create a fake CBFS using FW_MAIN_A size. + truncate -s $((0x000dffc0)) "${TMP}.cbfs" + ${FUTILITY} load_fmap "${TO_IMAGE}.quirk" "FW_MAIN_A:${TMP}.cbfs" + cbfstool "${TO_IMAGE}.quirk" add -r FW_MAIN_A -n updater_quirks \ + -f "${TMP}.quirk" -t raw + test_update "Full update (failure by CBFS quirks)" \ + "${FROM_IMAGE}" "!Need platform version >= 3 (current is 2)" \ + -i "${TO_IMAGE}.quirk" --wp=0 --sys_props 0,0x10001,1,2 fi |