diff options
author | Hung-Te Lin <hungte@chromium.org> | 2018-11-09 09:41:03 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-12-11 13:00:55 -0800 |
commit | 48d08d76c3cee2fb4ea3a7d965c64550d02f3bbd (patch) | |
tree | 6ef2c52f0340eb7afff703ebbb7cbe5c21028163 /tests/futility | |
parent | 644bb1b079bed1c2ce370aa1a80a3e943ec78a56 (diff) | |
download | vboot-48d08d76c3cee2fb4ea3a7d965c64550d02f3bbd.tar.gz |
futility: updater: Add 'image.bin' as host image name in archive
The firmware updater archive is going to rename the prefix of host (AP)
firmware image from 'bios' to 'image' (CL:1318712), to be more
consistent with firmware package output. We need to include both old and
new names in updater manifest construction.
For --mode=output, we will produce both 'bios.bin' and 'image.bin'. In
future there should be only 'image.bin' after migration is completed.
BUG=b:65745723
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None
Change-Id: I8b7e3bc2953b70525fb14fcf6aadaf6d1e00e4aa
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1327862
Diffstat (limited to 'tests/futility')
-rw-r--r-- | tests/futility/link_bios.manifest.json (renamed from tests/futility/link.manifest.json) | 0 | ||||
-rw-r--r-- | tests/futility/link_image.manifest.json | 7 | ||||
-rwxr-xr-x | tests/futility/test_update.sh | 38 |
3 files changed, 29 insertions, 16 deletions
diff --git a/tests/futility/link.manifest.json b/tests/futility/link_bios.manifest.json index 9bd33f52..9bd33f52 100644 --- a/tests/futility/link.manifest.json +++ b/tests/futility/link_bios.manifest.json diff --git a/tests/futility/link_image.manifest.json b/tests/futility/link_image.manifest.json new file mode 100644 index 00000000..e3296a0e --- /dev/null +++ b/tests/futility/link_image.manifest.json @@ -0,0 +1,7 @@ +{ + "link": { + "host": { "versions": { "ro": "Google_Link.2695.1.133", "rw": "Google_Link.2695.1.133" }, + "keys": { "root": "7b5c520ceabce86f13e02b7ca363cfb509fc5b98", "recovery": "7e74cd6d66f361da068c0419d2e0946b4d091e1c" }, + "image": "image.bin" } + } +} diff --git a/tests/futility/test_update.sh b/tests/futility/test_update.sh index 03743f97..54f2723d 100755 --- a/tests/futility/test_update.sh +++ b/tests/futility/test_update.sh @@ -306,11 +306,17 @@ echo 'echo "${WL_TAG}"' >"${A}/bin/vpd" chmod +x "${A}/bin/vpd" cp -f "${LINK_BIOS}" "${A}/bios.bin" -echo "TEST: Manifest (--manifest)" +echo "TEST: Manifest (--manifest, bios.bin)" ${FUTILITY} update -a "${A}" --manifest >"${TMP}.json.out" -cmp "${TMP}.json.out" "${SCRIPTDIR}/link.manifest.json" +cmp "${TMP}.json.out" "${SCRIPTDIR}/link_bios.manifest.json" -cp -f "${TO_IMAGE}" "${A}/bios.bin" +mv -f "${A}/bios.bin" "${A}/image.bin" +echo "TEST: Manifest (--manifest, image.bin)" +${FUTILITY} update -a "${A}" --manifest >"${TMP}.json.out" +cmp "${TMP}.json.out" "${SCRIPTDIR}/link_image.manifest.json" + + +cp -f "${TO_IMAGE}" "${A}/image.bin" test_update "Full update (--archive, single package)" \ "${FROM_IMAGE}" "${TMP}.expected.full" \ -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 @@ -318,50 +324,50 @@ test_update "Full update (--archive, single package)" \ echo "TEST: Output (--mode=output)" mkdir -p "${TMP}.output" ${FUTILITY} update -i "${LINK_BIOS}" --mode=output --output_dir="${TMP}.output" -cmp "${LINK_BIOS}" "${TMP}.output/bios.bin" +cmp "${LINK_BIOS}" "${TMP}.output/image.bin" mkdir -p "${A}/keyset" -cp -f "${LINK_BIOS}" "${A}/bios.bin" +cp -f "${LINK_BIOS}" "${A}/image.bin" cp -f "${TMP}.to/rootkey" "${A}/keyset/rootkey.WL" cp -f "${TMP}.to/VBLOCK_A" "${A}/keyset/vblock_A.WL" cp -f "${TMP}.to/VBLOCK_B" "${A}/keyset/vblock_B.WL" -${FUTILITY} gbb -s --rootkey="${TMP}.from/rootkey" "${A}/bios.bin" -${FUTILITY} load_fmap "${A}/bios.bin" VBLOCK_A:"${TMP}.from/VBLOCK_A" -${FUTILITY} load_fmap "${A}/bios.bin" VBLOCK_B:"${TMP}.from/VBLOCK_B" +${FUTILITY} gbb -s --rootkey="${TMP}.from/rootkey" "${A}/image.bin" +${FUTILITY} load_fmap "${A}/image.bin" VBLOCK_A:"${TMP}.from/VBLOCK_A" +${FUTILITY} load_fmap "${A}/image.bin" VBLOCK_B:"${TMP}.from/VBLOCK_B" test_update "Full update (--archive, whitelabel, no VPD)" \ - "${A}/bios.bin" "!Need VPD set for white" \ + "${A}/image.bin" "!Need VPD set for white" \ -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 test_update "Full update (--archive, whitelabel, no VPD - factory mode)" \ - "${LINK_BIOS}" "${A}/bios.bin" \ + "${LINK_BIOS}" "${A}/image.bin" \ -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 --mode=factory test_update "Full update (--archive, whitelabel, no VPD - quirk mode)" \ - "${LINK_BIOS}" "${A}/bios.bin" \ + "${LINK_BIOS}" "${A}/image.bin" \ -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 --quirks=allow_empty_wltag test_update "Full update (--archive, WL, single package)" \ - "${A}/bios.bin" "${LINK_BIOS}" \ + "${A}/image.bin" "${LINK_BIOS}" \ -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 --signature_id=WL WL_TAG="WL" PATH="${A}/bin:${PATH}" \ test_update "Full update (--archive, WL, fake vpd)" \ - "${A}/bios.bin" "${LINK_BIOS}" \ + "${A}/image.bin" "${LINK_BIOS}" \ -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 echo "TEST: Output (-a, --mode=output)" mkdir -p "${TMP}.outa" -cp -f "${A}/bios.bin" "${TMP}.emu" +cp -f "${A}/image.bin" "${TMP}.emu" WL_TAG="WL" PATH="${A}/bin:${PATH}" \ ${FUTILITY} update -a "${A}" --mode=output --emu="${TMP}.emu" \ --output_dir="${TMP}.outa" -cmp "${LINK_BIOS}" "${TMP}.outa/bios.bin" +cmp "${LINK_BIOS}" "${TMP}.outa/image.bin" # Test archive with Unified Build contents. cp -r "${SCRIPTDIR}/models" "${A}/" mkdir -p "${A}/images" -mv "${A}/bios.bin" "${A}/images/bios_coral.bin" +mv "${A}/image.bin" "${A}/images/bios_coral.bin" cp -f "${PEPPY_BIOS}" "${A}/images/bios_peppy.bin" cp -f "${LINK_BIOS}" "${A}/images/bios_link.bin" cp -f "${TMP}.to/rootkey" "${A}/keyset/rootkey.whitetip-wl" |