meta-aspeed: otptool: Multiple configurations
Enable generating multiple OTP binaries by specifying multiple OTP
configuration files.
Change-Id: I1ce81cd2c1d0f501578b927eb31cce5a37cdcf1f
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/meta-aspeed/classes/socsec-sign.bbclass b/meta-aspeed/classes/socsec-sign.bbclass
index da71b7c..2f72c4e 100644
--- a/meta-aspeed/classes/socsec-sign.bbclass
+++ b/meta-aspeed/classes/socsec-sign.bbclass
@@ -61,13 +61,15 @@
}
verify_spl_otp() {
- socsec verify \
- --sec_image ${DEPLOYDIR}/${SPL_IMAGE} \
- --otp_image ${DEPLOYDIR}/"$(basename ${OTPTOOL_CONFIG} .json)"-otp-all.image
+ for otptool_config in ${OTPTOOL_CONFIGS} ; do
+ socsec verify \
+ --sec_image ${DEPLOYDIR}/${SPL_IMAGE} \
+ --otp_image ${DEPLOYDIR}/"$(basename ${otptool_config} .json)"-otp-all.image
- if [ $? -ne 0 ]; then
- bbfatal "Verified OTP image failed."
- fi
+ if [ $? -ne 0 ]; then
+ bbfatal "Verified OTP image failed."
+ fi
+ done
}
do_deploy:append() {