vabtool: Print out error message during retries
The sr_key_provision() and pr_key_provision() functions will retry 3 times
if a failure occurs. This change modifies the flow to print an error message
before retrying the sequence.
@@ -350,6 +350,11 @@ sr_key_provision() {
else
res=$(sdm_sr_provision_status "${pcie_addr}")
[ ${res} -eq 0 ] && break
+ if [ ${res} -ge ${#SDM_SR_PROVISION_STATUS[@]} ]; then
+ printf "Error code: ${res}\n"
+ else
+ printf "%s\n" "${SDM_SR_PROVISION_STATUS[${res}]}"
+ fi
fi
printf "Error: retrying[%d]\n" $(( i + 1 ))
@@ -390,6 +395,12 @@ pr_key_provision() {
res=$?
[ ${res} -eq 0 ] && break
+ if [ ${res} -ge ${#SDM_PR_PROVISION_STATUS[@]} ]; then
+ printf "Error code: ${res}\n"
+ else
+ printf "%s\n" "${SDM_PR_PROVISION_STATUS[${res}]}"
+ fi
+
printf "Error: retrying[%d]\n" $(( i + 1 ))
boot_page=$(fpga_boot_page "${pcie_addr}")
