diff options
author | Hung-Te Lin <hungte@chromium.org> | 2023-02-09 20:48:10 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-02-12 10:37:43 +0000 |
commit | fd2a71c8378de63a728d4cca949622dfbcbb0931 (patch) | |
tree | a1e477cdd33f174cc3b942d9c259265d69d33864 | |
parent | 04a92c59a3c62100846b74e64def618b4d1ed20e (diff) | |
download | vboot-fd2a71c8378de63a728d4cca949622dfbcbb0931.tar.gz |
futility: updater: drop vboot1 support
As CL:4211436 mentioned, all vboot1 boards are now AUE and it is time to
drop vboot1 logic to simplify the updater.
BUG=b:124141368,b:172342538
TEST=make; run test
BRANCH=None
Change-Id: Ice445158abd2b6465dad7cade10ce88b46d3c981
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4235302
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
-rw-r--r-- | futility/updater.c | 44 | ||||
-rw-r--r-- | futility/updater_dut.c | 7 | ||||
-rw-r--r-- | futility/updater_utils.h | 1 | ||||
-rwxr-xr-x | tests/futility/test_update.sh | 135 |
4 files changed, 78 insertions, 109 deletions
diff --git a/futility/updater.c b/futility/updater.c index 96004713..6515402b 100644 --- a/futility/updater.c +++ b/futility/updater.c @@ -223,16 +223,11 @@ static int section_is_filled_with(const struct firmware_section *section, * Returns the section name if success, otherwise NULL. */ static const char *decide_rw_target(struct updater_config *cfg, - enum target_type target, - int is_vboot2) + enum target_type target) { const char *a = FMAP_RW_SECTION_A, *b = FMAP_RW_SECTION_B; int slot = dut_get_property(DUT_PROP_MAINFW_ACT, cfg); - /* In vboot1, always update B and check content with A. */ - if (!is_vboot2) - return target == TARGET_UPDATE ? b : a; - switch (slot) { case SLOT_A: return target == TARGET_UPDATE ? b : a; @@ -251,7 +246,7 @@ static const char *decide_rw_target(struct updater_config *cfg, * Returns 0 if success, non-zero if error. */ static int set_try_cookies(struct updater_config *cfg, const char *target, - int has_update, int is_vboot2) + int has_update) { int tries = 8; const char *slot; @@ -279,19 +274,16 @@ static int set_try_cookies(struct updater_config *cfg, const char *target, return 0; } - if (is_vboot2) { - if (dut_set_property_string("fw_try_next", slot)) { - ERROR("Failed to set fw_try_next to %s.\n", slot); - return -1; - } - if (!has_update && - dut_set_property_string("fw_result", "success")) { - ERROR("Failed to set fw_result to success.\n"); - return -1; - } + if (dut_set_property_string("fw_try_next", slot)) { + ERROR("Failed to set fw_try_next to %s.\n", slot); + return -1; + } + if (!has_update && + dut_set_property_string("fw_result", "success")) { + ERROR("Failed to set fw_result to success.\n"); + return -1; } - /* fw_try_count is identical to fwb_tries in vboot1. */ if (dut_set_property_int("fw_try_count", tries)) { ERROR("Failed to set fw_try_count to %d.\n", tries); return -1; @@ -908,7 +900,6 @@ static enum updater_error_codes update_try_rw_firmware( { const char *target, *self_target; int has_update = 1; - int is_vboot2 = dut_get_property(DUT_PROP_FW_VBOOT2, cfg); preserve_gbb(image_from, image_to, 1, 0, 0); if (!wp_enabled && section_needs_update( @@ -921,8 +912,7 @@ static enum updater_error_codes update_try_rw_firmware( if (check_compatible_tpm_keys(cfg, image_to)) return UPDATE_ERR_TPM_ROLLBACK; - VB2_DEBUG("Firmware %s vboot2.\n", is_vboot2 ? "is" : "is NOT"); - self_target = target = decide_rw_target(cfg, TARGET_SELF, is_vboot2); + self_target = target = decide_rw_target(cfg, TARGET_SELF); if (target == NULL) { ERROR("TRY-RW update needs system to boot in RW firmware.\n"); return UPDATE_ERR_TARGET; @@ -938,7 +928,7 @@ static enum updater_error_codes update_try_rw_firmware( has_update = section_needs_update(image_from, image_to, target); if (has_update) { - target = decide_rw_target(cfg, TARGET_UPDATE, is_vboot2); + target = decide_rw_target(cfg, TARGET_UPDATE); STATUS("TRY-RW UPDATE: Updating %s to try on reboot.\n", target); @@ -965,7 +955,7 @@ static enum updater_error_codes update_try_rw_firmware( } /* Always set right cookies for next boot. */ - if (set_try_cookies(cfg, target, has_update, is_vboot2)) + if (set_try_cookies(cfg, target, has_update)) return UPDATE_ERR_SET_COOKIES; /* Do not fail on updating legacy. */ @@ -1126,12 +1116,8 @@ enum updater_error_codes update_firmware(struct updater_config *cfg) if (cfg->try_update == TRY_UPDATE_DEFERRED_APPLY) { INFO("Apply deferred updates, only setting cookies for the " "next boot slot.\n"); - int vboot2 = dut_get_property(DUT_PROP_FW_VBOOT2, cfg); - if (set_try_cookies( - cfg, - decide_rw_target(cfg, TARGET_UPDATE, vboot2), - /*has_update=*/1, - vboot2)) + if (set_try_cookies(cfg, decide_rw_target(cfg, TARGET_UPDATE), + /*has_update=*/1)) return UPDATE_ERR_SET_COOKIES; return UPDATE_ERR_DONE; } diff --git a/futility/updater_dut.c b/futility/updater_dut.c index 8789f89b..f152a45e 100644 --- a/futility/updater_dut.c +++ b/futility/updater_dut.c @@ -85,12 +85,6 @@ static int dut_get_wp_hw(struct updater_config *cfg) return dut_get_property_int("wpsw_cur") ? WP_ENABLED : WP_DISABLED; } -/* A helper function to return "fw_vboot2" system property. */ -static int dut_get_fw_vboot2(struct updater_config *cfg) -{ - return dut_get_property_int("fw_vboot2"); -} - static int dut_get_platform_version(struct updater_config *cfg) { return dut_get_property_int("board_id"); @@ -131,7 +125,6 @@ void dut_init_properties(struct dut_property *props, int num) assert(num >= DUT_PROP_MAX); props[DUT_PROP_MAINFW_ACT].getter = dut_get_mainfw_act; props[DUT_PROP_TPM_FWVER].getter = dut_get_tpm_fwver; - props[DUT_PROP_FW_VBOOT2].getter = dut_get_fw_vboot2; props[DUT_PROP_PLATFORM_VER].getter = dut_get_platform_version; props[DUT_PROP_WP_HW].getter = dut_get_wp_hw; props[DUT_PROP_WP_SW].getter = dut_get_wp_sw; diff --git a/futility/updater_utils.h b/futility/updater_utils.h index 93964a4d..bdb0c49b 100644 --- a/futility/updater_utils.h +++ b/futility/updater_utils.h @@ -239,7 +239,6 @@ struct dut_property { enum dut_property_type { DUT_PROP_MAINFW_ACT, DUT_PROP_TPM_FWVER, - DUT_PROP_FW_VBOOT2, DUT_PROP_PLATFORM_VER, DUT_PROP_WP_HW, DUT_PROP_WP_SW, diff --git a/tests/futility/test_update.sh b/tests/futility/test_update.sh index 9724659d..19f2413e 100755 --- a/tests/futility/test_update.sh +++ b/tests/futility/test_update.sh @@ -186,147 +186,138 @@ test_update() { fi } -# --sys_props: mainfw_act, tpm_fwver, is_vboot2, platform_ver, [wp_hw, wp_sw] +# --sys_props: mainfw_act, tpm_fwver, platform_ver, [wp_hw, wp_sw] # tpm_fwver = <data key version:16><firmware version:16>. # TO_IMAGE is signed with data key version = 1, firmware version = 4 => 0x10004. # Test Full update. test_update "Full update" \ "${FROM_IMAGE}" "${TMP}.expected.full" \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 test_update "Full update (incompatible platform)" \ "${FROM_IMAGE}" "!platform is not compatible" \ - -i "${LINK_BIOS}" --wp=0 --sys_props 0,0x10001,1 + -i "${LINK_BIOS}" --wp=0 --sys_props 0,0x10001 test_update "Full update (TPM Anti-rollback: data key)" \ "${FROM_IMAGE}" "!Data key version rollback detected (2->1)" \ - -i "${TO_IMAGE}" --wp=0 --sys_props 1,0x20001,1 + -i "${TO_IMAGE}" --wp=0 --sys_props 1,0x20001 test_update "Full update (TPM Anti-rollback: kernel key)" \ "${FROM_IMAGE}" "!Firmware version rollback detected (5->4)" \ - -i "${TO_IMAGE}" --wp=0 --sys_props 1,0x10005,1 + -i "${TO_IMAGE}" --wp=0 --sys_props 1,0x10005 test_update "Full update (TPM Anti-rollback: 0 as tpm_fwver)" \ "${FROM_IMAGE}" "${TMP}.expected.full" \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x0,1 + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x0 test_update "Full update (TPM check failure due to invalid tpm_fwver)" \ "${FROM_IMAGE}" "!Invalid tpm_fwver: -1" \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,-1,1 + -i "${TO_IMAGE}" --wp=0 --sys_props 0,-1 test_update "Full update (Skip TPM check with --force)" \ "${FROM_IMAGE}" "${TMP}.expected.full" \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,-1,1 --force + -i "${TO_IMAGE}" --wp=0 --sys_props 0,-1 --force test_update "Full update (from stdin)" \ "${FROM_IMAGE}" "${TMP}.expected.full" \ - -i - --wp=0 --sys_props 0,-1,1 --force <"${TO_IMAGE}" + -i - --wp=0 --sys_props 0,-1 --force <"${TO_IMAGE}" test_update "Full update (GBB=0 -> 0)" \ "${FROM_IMAGE}.gbb0" "${TMP}.expected.full.gbb0" \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 test_update "Full update (GBB flags -> 0x27)" \ "${FROM_IMAGE}" "${TMP}.expected.full.gbb0x27" \ - -i "${TO_IMAGE}" --gbb_flags=0x27 --wp=0 --sys_props 0,0x10001,1 + -i "${TO_IMAGE}" --gbb_flags=0x27 --wp=0 --sys_props 0,0x10001 test_update "Full update (--host_only)" \ "${FROM_IMAGE}" "${TMP}.expected.full" \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 \ + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 \ --host_only --ec_image non-exist.bin --pd_image non_exist.bin test_update "Full update (GBB1.2 hwid digest)" \ "${FROM_IMAGE}" "${TMP}.expected.full.gbb12" \ - -i "${TO_IMAGE_GBB12}" --wp=0 --sys_props 0,0x10001,1 + -i "${TO_IMAGE_GBB12}" --wp=0 --sys_props 0,0x10001 test_update "Full update (Preserve VPD using FMAP_AREA_PRESERVE)" \ "${FROM_IMAGE}" "${TMP}.expected.full.empty_rw_vpd" \ - -i "${TO_IMAGE_WIPE_RW_VPD}" --wp=0 --sys_props 0,0x10001,1 + -i "${TO_IMAGE_WIPE_RW_VPD}" --wp=0 --sys_props 0,0x10001 # Test RW-only update. test_update "RW update" \ "${FROM_IMAGE}" "${TMP}.expected.rw" \ - -i "${TO_IMAGE}" --wp=1 --sys_props 0,0x10001,1 + -i "${TO_IMAGE}" --wp=1 --sys_props 0,0x10001 test_update "RW update (incompatible platform)" \ "${FROM_IMAGE}" "!platform is not compatible" \ - -i "${LINK_BIOS}" --wp=1 --sys_props 0,0x10001,1 + -i "${LINK_BIOS}" --wp=1 --sys_props 0,0x10001 test_update "RW update (incompatible rootkey)" \ "${FROM_DIFFERENT_ROOTKEY_IMAGE}" "!RW signed by incompatible root key" \ - -i "${TO_IMAGE}" --wp=1 --sys_props 0,0x10001,1 + -i "${TO_IMAGE}" --wp=1 --sys_props 0,0x10001 test_update "RW update (TPM Anti-rollback: data key)" \ "${FROM_IMAGE}" "!Data key version rollback detected (2->1)" \ - -i "${TO_IMAGE}" --wp=1 --sys_props 1,0x20001,1 + -i "${TO_IMAGE}" --wp=1 --sys_props 1,0x20001 test_update "RW update (TPM Anti-rollback: kernel key)" \ "${FROM_IMAGE}" "!Firmware version rollback detected (5->4)" \ - -i "${TO_IMAGE}" --wp=1 --sys_props 1,0x10005,1 + -i "${TO_IMAGE}" --wp=1 --sys_props 1,0x10005 # Test Try-RW update (vboot2). test_update "RW update (A->B)" \ "${FROM_IMAGE}" "${TMP}.expected.b" \ - -i "${TO_IMAGE}" -t --wp=1 --sys_props 0,0x10001,1 + -i "${TO_IMAGE}" -t --wp=1 --sys_props 0,0x10001 test_update "RW update (B->A)" \ "${FROM_IMAGE}" "${TMP}.expected.a" \ - -i "${TO_IMAGE}" -t --wp=1 --sys_props 1,0x10001,1 + -i "${TO_IMAGE}" -t --wp=1 --sys_props 1,0x10001 test_update "RW update -> fallback to RO+RW Full update" \ "${FROM_IMAGE}" "${TMP}.expected.full" \ - -i "${TO_IMAGE}" -t --wp=0 --sys_props 1,0x10002,1 + -i "${TO_IMAGE}" -t --wp=0 --sys_props 1,0x10002 test_update "RW update (incompatible platform)" \ "${FROM_IMAGE}" "!platform is not compatible" \ - -i "${LINK_BIOS}" -t --wp=1 --sys_props 0x10001,1 + -i "${LINK_BIOS}" -t --wp=1 --sys_props 0x10001 test_update "RW update (incompatible rootkey)" \ "${FROM_DIFFERENT_ROOTKEY_IMAGE}" "!RW signed by incompatible root key" \ - -i "${TO_IMAGE}" -t --wp=1 --sys_props 0,0x10001,1 + -i "${TO_IMAGE}" -t --wp=1 --sys_props 0,0x10001 test_update "RW update (TPM Anti-rollback: data key)" \ "${FROM_IMAGE}" "!Data key version rollback detected (2->1)" \ - -i "${TO_IMAGE}" -t --wp=1 --sys_props 1,0x20001,1 + -i "${TO_IMAGE}" -t --wp=1 --sys_props 1,0x20001 test_update "RW update (TPM Anti-rollback: kernel key)" \ "${FROM_IMAGE}" "!Firmware version rollback detected (5->4)" \ - -i "${TO_IMAGE}" -t --wp=1 --sys_props 1,0x10005,1 + -i "${TO_IMAGE}" -t --wp=1 --sys_props 1,0x10005 test_update "RW update -> fallback to RO+RW Full update (TPM Anti-rollback)" \ "${FROM_IMAGE}" "!Firmware version rollback detected (6->4)" \ - -i "${TO_IMAGE}" -t --wp=0 --sys_props 1,0x10006,1 - -# Test Try-RW update (vboot1). -test_update "RW update (vboot1, A->B)" \ - "${FROM_IMAGE}" "${TMP}.expected.b" \ - -i "${TO_IMAGE}" -t --wp=1 --sys_props 0,0 --sys_props 0,0x10001,0 - -test_update "RW update (vboot1, B->B)" \ - "${FROM_IMAGE}" "${TMP}.expected.b" \ - -i "${TO_IMAGE}" -t --wp=1 --sys_props 1,0 --sys_props 0,0x10001,0 + -i "${TO_IMAGE}" -t --wp=0 --sys_props 1,0x10006 # Test 'factory mode' test_update "Factory mode update (WP=0)" \ "${FROM_IMAGE}" "${TMP}.expected.full" \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 --mode=factory + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 --mode=factory test_update "Factory mode update (WP=0)" \ "${FROM_IMAGE}" "${TMP}.expected.full" \ - --factory -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + --factory -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 test_update "Factory mode update (WP=1)" \ "${FROM_IMAGE}" "!remove write protection for factory mode" \ - -i "${TO_IMAGE}" --wp=1 --sys_props 0,0x10001,1 --mode=factory + -i "${TO_IMAGE}" --wp=1 --sys_props 0,0x10001 --mode=factory test_update "Factory mode update (WP=1)" \ "${FROM_IMAGE}" "!remove write protection for factory mode" \ - --factory -i "${TO_IMAGE}" --wp=1 --sys_props 0,0x10001,1 + --factory -i "${TO_IMAGE}" --wp=1 --sys_props 0,0x10001 test_update "Factory mode update (GBB=0 -> 0x39)" \ "${FROM_IMAGE}.gbb0" "${TMP}.expected.full" \ - --factory -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + --factory -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 # Test legacy update test_update "Legacy update" \ @@ -336,67 +327,67 @@ test_update "Legacy update" \ # Test quirks test_update "Full update (wrong size)" \ "${FROM_IMAGE}.large" "!Failed writing firmware" \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 \ + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 \ --quirks unlock_me_for_update,eve_smm_store test_update "Full update (--quirks enlarge_image)" \ "${FROM_IMAGE}.large" "${TMP}.expected.large" --quirks enlarge_image \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 test_update "Full update (multi-line --quirks enlarge_image)" \ "${FROM_IMAGE}.large" "${TMP}.expected.large" --quirks ' enlarge_image - ' -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + ' -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 test_update "Full update (--quirks unlock_me_for_update)" \ "${FROM_IMAGE}" "${TMP}.expected.me_unlocked" \ --quirks unlock_me_for_update \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 test_update "Full update (failure by --quirks min_platform_version)" \ "${FROM_IMAGE}" "!Need platform version >= 3 (current is 2)" \ --quirks min_platform_version=3 \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1,2 + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,2 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 + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,3 test_update "Full update (incompatible platform)" \ "${FROM_IMAGE}".unpatched "!platform is not compatible" \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 test_update "Full update (--quirks no_check_platform)" \ "${FROM_IMAGE}".unpatched "${TMP}.expected.full" \ --quirks no_check_platform \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 test_update "Full update (--quirks preserve_me with non-host programmer)" \ "${FROM_IMAGE}" "${TMP}.expected.full" \ --quirks preserve_me \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 \ + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 \ -p raiden_debug_spi:target=AP test_update "Full update (--quirks preserve_me)" \ "${FROM_IMAGE}" "${TMP}.expected.full" \ --quirks preserve_me \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 test_update "Full update (--quirks preserve_me, autoupdate)" \ "${FROM_IMAGE}" "${TMP}.expected.me_preserved" \ --quirks preserve_me -m autoupdate \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 test_update "Full update (--quirks preserve_me, deferupdate_hold)" \ "${FROM_IMAGE}" "${TMP}.expected.me_preserved" \ --quirks preserve_me -m deferupdate_hold \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 test_update "Full update (--quirks preserve_me, factory)" \ "${FROM_IMAGE}" "${TMP}.expected.full" \ --quirks preserve_me -m factory \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 # Test archive and manifest. CL_TAG is for custom_label_tag. A="${TMP}.archive" @@ -418,7 +409,7 @@ cmp "${TMP}.json.out" "${SCRIPT_DIR}/futility/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 + -a "${A}" --wp=0 --sys_props 0,0x10001,3 echo "TEST: Output (--mode=output)" mkdir -p "${TMP}.output" @@ -437,25 +428,25 @@ cp -f "${TMP}.to/VBLOCK_B" "${A}/keyset/vblock_B.CL" test_update "Full update (--archive, custom label, no VPD)" \ "${A}/image.bin" "!Need VPD set for custom" \ - -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 + -a "${A}" --wp=0 --sys_props 0,0x10001,3 test_update "Full update (--archive, custom label, no VPD - factory mode)" \ "${LINK_BIOS}" "${A}/image.bin" \ - -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 --mode=factory + -a "${A}" --wp=0 --sys_props 0,0x10001,3 --mode=factory test_update "Full update (--archive, custom label, no VPD - quirk mode)" \ "${LINK_BIOS}" "${A}/image.bin" \ - -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 \ + -a "${A}" --wp=0 --sys_props 0,0x10001,3 \ --quirks=allow_empty_custom_label_tag test_update "Full update (--archive, custom label, single package)" \ "${A}/image.bin" "${LINK_BIOS}" \ - -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 --signature_id=CL + -a "${A}" --wp=0 --sys_props 0,0x10001,3 --signature_id=CL CL_TAG="CL" PATH="${A}/bin:${PATH}" \ test_update "Full update (--archive, custom label, fake vpd)" \ "${A}/image.bin" "${LINK_BIOS}" \ - -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 + -a "${A}" --wp=0 --sys_props 0,0x10001,3 echo "TEST: Output (-a, --mode=output)" mkdir -p "${TMP}.outa" @@ -482,25 +473,25 @@ patch_file "${FROM_IMAGE}.al" FW_MAIN_A 0 "corrupted" patch_file "${FROM_IMAGE}.av" FW_MAIN_A 0 "corrupted" test_update "Full update (--archive, model=link)" \ "${FROM_IMAGE}.al" "${LINK_BIOS}" \ - -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 --model=link + -a "${A}" --wp=0 --sys_props 0,0x10001,3 --model=link test_update "Full update (--archive, model=peppy)" \ "${FROM_IMAGE}.ap" "${PEPPY_BIOS}" \ - -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 --model=peppy + -a "${A}" --wp=0 --sys_props 0,0x10001,3 --model=peppy test_update "Full update (--archive, model=unknown)" \ "${FROM_IMAGE}.ap" "!Unsupported model: 'unknown'" \ - -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 --model=unknown + -a "${A}" --wp=0 --sys_props 0,0x10001,3 --model=unknown test_update "Full update (--archive, model=customtip, signature_id=CL)" \ "${FROM_IMAGE}.al" "${LINK_BIOS}" \ - -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 --model=customtip \ + -a "${A}" --wp=0 --sys_props 0,0x10001,3 --model=customtip \ --signature_id=customtip-cl test_update "Full update (--archive, detect-model)" \ "${FROM_IMAGE}.ap" "${PEPPY_BIOS}" \ - -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 \ + -a "${A}" --wp=0 --sys_props 0,0x10001,3 \ --programmer raiden_debug_spi:target=AP test_update "Full update (--archive, detect-model, unsupported FRID)" \ "${FROM_IMAGE}.av" "!Unsupported FRID: 'Google_Voxel'" \ - -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 \ + -a "${A}" --wp=0 --sys_props 0,0x10001,3 \ --programmer raiden_debug_spi:target=AP echo "*** Test Item: Detect model (--archive, --detect-model-only)" @@ -511,12 +502,12 @@ cmp "${TMP}.model.out" <(echo peppy) CL_TAG="cl" PATH="${A}/bin:${PATH}" \ test_update "Full update (-a, model=customtip, fake VPD)" \ "${FROM_IMAGE}.al" "${LINK_BIOS}" \ - -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 --model=customtip + -a "${A}" --wp=0 --sys_props 0,0x10001,3 --model=customtip # Custom label + Unibuild without default keys test_update "Full update (--a, model=customtip, no VPD, no default keys)" \ "${FROM_IMAGE}.al" "!Need VPD set for custom" \ - -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 --model=customtip + -a "${A}" --wp=0 --sys_props 0,0x10001,3 --model=customtip # Custom label + Unibuild with default keys as model name cp -f "${TMP}.to/rootkey" "${A}/keyset/rootkey.customtip" @@ -524,7 +515,7 @@ cp -f "${TMP}.to/VBLOCK_A" "${A}/keyset/vblock_A.customtip" cp -f "${TMP}.to/VBLOCK_B" "${A}/keyset/vblock_B.customtip" test_update "Full update (-a, model=customtip, no VPD, default keys)" \ "${FROM_IMAGE}.al" "${LINK_BIOS}" \ - -a "${A}" --wp=0 --sys_props 0,0x10001,1,3 --model=customtip + -a "${A}" --wp=0 --sys_props 0,0x10001,3 --model=customtip # Test special programmer if type flashrom >/dev/null 2>&1; then @@ -532,7 +523,7 @@ if type flashrom >/dev/null 2>&1; then cp -f "${FROM_IMAGE}" "${TMP}.emu" "${FUTILITY}" update --programmer \ dummy:emulate=VARIABLE_SIZE,image="${TMP}".emu,size=8388608 \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1,3 >&2 + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,3 >&2 cmp "${TMP}.emu" "${TMP}.expected.full" fi @@ -547,7 +538,7 @@ if type cbfstool >/dev/null 2>&1; then -f "${TMP}.smm" -t raw -b 0x1bf000 test_update "Legacy update (--quirks eve_smm_store)" \ "${TMP}.from.smm" "${TMP}.expected.full_smm" \ - -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 \ + -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001 \ --quirks eve_smm_store echo "min_platform_version=3" >"${TMP}.quirk" @@ -560,7 +551,7 @@ if type cbfstool >/dev/null 2>&1; then -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 + -i "${TO_IMAGE}.quirk" --wp=0 --sys_props 0,0x10001,2 fi rm -rf "${TMP}"* |