AvbSlotVerifyData *out_data;
char *cmdline;
char *extra_args;
+ char *slot_suffix = "";
bool unlocked = false;
int res = CMD_RET_FAILURE;
return CMD_RET_FAILURE;
}
- if (argc != 1)
+ if (argc < 1 || argc > 2)
return CMD_RET_USAGE;
+ if (argc == 2)
+ slot_suffix = argv[1];
+
printf("## Android Verified Boot 2.0 version %s\n",
avb_version_string());
slot_result =
avb_slot_verify(avb_ops,
requested_partitions,
- "",
+ slot_suffix,
unlocked,
AVB_HASHTREE_ERROR_MODE_RESTART_AND_INVALIDATE,
&out_data);
U_BOOT_CMD_MKENT(read_part, 5, 0, do_avb_read_part, "", ""),
U_BOOT_CMD_MKENT(read_part_hex, 4, 0, do_avb_read_part_hex, "", ""),
U_BOOT_CMD_MKENT(write_part, 5, 0, do_avb_write_part, "", ""),
- U_BOOT_CMD_MKENT(verify, 1, 0, do_avb_verify_part, "", ""),
+ U_BOOT_CMD_MKENT(verify, 2, 0, do_avb_verify_part, "", ""),
#ifdef CONFIG_OPTEE_TA_AVB
U_BOOT_CMD_MKENT(read_pvalue, 3, 0, do_avb_read_pvalue, "", ""),
U_BOOT_CMD_MKENT(write_pvalue, 3, 0, do_avb_write_pvalue, "", ""),
"avb read_pvalue <name> <bytes> - read a persistent value <name>\n"
"avb write_pvalue <name> <value> - write a persistent value <name>\n"
#endif
- "avb verify - run verification process using hash data\n"
+ "avb verify [slot_suffix] - run verification process using hash data\n"
" from vbmeta structure\n"
+ " [slot_suffix] - _a, _b, etc (if vbmeta partition is slotted)\n"
);
mmc read ${loadaddr} ${boot_start} ${boot_size}; \
bootm $loadaddr $loadaddr $fdtaddr; \
+If partitions you want to verify are slotted (have A/B suffixes), then current
+slot suffix should be passed to 'avb verify' sub-command, e.g.:
+
+=> avb verify _a
To switch on automatic generation of vbmeta partition in AOSP build, add these
lines to device configuration mk file: