summaryrefslogtreecommitdiff
path: root/meta-aspeed
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2022-08-08 14:35:05 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-08-09 06:54:46 +0300
commitc1c74d03fed1e9387f2a759157333451ba5c429f (patch)
tree116b50e62e6bd79cf9e3fefa78d08b507bcb4530 /meta-aspeed
parentd1da1a9d5824e9a95582d2d3b3b73aa564c7c896 (diff)
downloadopenbmc-c1c74d03fed1e9387f2a759157333451ba5c429f.tar.xz
meta-aspeed: otptool: Embed config name in OTP image output filename
We're moving towards support for generating multiple OTP binaries per platform configuration, so allow for differentiation in the file paths. Change-Id: Iff01e524013fbf8cfdec0f8d7e7a599ee457514d Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Diffstat (limited to 'meta-aspeed')
-rw-r--r--meta-aspeed/classes/otptool.bbclass12
-rw-r--r--meta-aspeed/classes/socsec-sign.bbclass2
2 files changed, 9 insertions, 5 deletions
diff --git a/meta-aspeed/classes/otptool.bbclass b/meta-aspeed/classes/otptool.bbclass
index bb766c186c..52625190e8 100644
--- a/meta-aspeed/classes/otptool.bbclass
+++ b/meta-aspeed/classes/otptool.bbclass
@@ -17,8 +17,12 @@ create_otp_helper() {
elif [ ! -d "${OTPTOOL_KEY_DIR}" ] ; then
bbfatal "Invalid otptool signing key directory: ${OTPTOOL_KEY_DIR}"
else
+ otptool_config_slug="$(basename ${OTPTOOL_CONFIG} .json)"
+ otptool_config_outdir="${B}"/"${CONFIG_B_PATH}"/"${otptool_config_slug}"
+ mkdir -p "${otptool_config_outdir}"
otptool make_otp_image \
--key_folder ${OTPTOOL_KEY_DIR} \
+ --output_folder "${otptool_config_outdir}" \
${OTPTOOL_CONFIG} \
${OTPTOOL_EXTRA_OPTS}
@@ -26,15 +30,15 @@ create_otp_helper() {
bbfatal "Generated OTP image failed."
fi
- otptool \
- print \
- ${B}/${CONFIG_B_PATH}/otp-all.image
+ otptool print "${otptool_config_outdir}"/otp-all.image
if [ $? -ne 0 ]; then
bbfatal "Printed OTP image failed."
fi
- install -m 0644 ${B}/${CONFIG_B_PATH}/otp-* ${DEPLOYDIR}
+ install -m 0644 -T \
+ "${otptool_config_outdir}"/otp-all.image \
+ ${DEPLOYDIR}/"${otptool_config_slug}"-otp-all.image
fi
}
diff --git a/meta-aspeed/classes/socsec-sign.bbclass b/meta-aspeed/classes/socsec-sign.bbclass
index d81a86588a..da71b7c216 100644
--- a/meta-aspeed/classes/socsec-sign.bbclass
+++ b/meta-aspeed/classes/socsec-sign.bbclass
@@ -63,7 +63,7 @@ sign_spl() {
verify_spl_otp() {
socsec verify \
--sec_image ${DEPLOYDIR}/${SPL_IMAGE} \
- --otp_image ${DEPLOYDIR}/otp-all.image
+ --otp_image ${DEPLOYDIR}/"$(basename ${OTPTOOL_CONFIG} .json)"-otp-all.image
if [ $? -ne 0 ]; then
bbfatal "Verified OTP image failed."