1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-05-07 16:59:30 +00:00

arm/classes: Factor out image signing arguments in tfm_image_sign

Factor out the image signing arguments in tfm_image_sign.bbclass into
its own variable, TFM_IMAGE_SIGN_ARGS, so that it can be customized on a
per-machine basis if necessary.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Peter Hoyes
2023-02-22 12:04:37 +00:00
committed by Jon Mason
parent 1f6d2b2692
commit 81aaae5754
+16 -10
View File
@@ -35,6 +35,21 @@ DEPENDS += "trusted-firmware-m-scripts-native"
# right path until this is relocated automatically.
export OPENSSL_MODULES="${STAGING_LIBDIR_NATIVE}/ossl-modules"
# The arguments passed to the TF-M image signing script. Override this variable
# in an image recipe to customize the arguments.
TFM_IMAGE_SIGN_ARGS ?= "\
-v ${RE_LAYOUT_WRAPPER_VERSION} \
--layout "${TFM_IMAGE_SIGN_DIR}/${host_binary_layout}" \
-k "${RECIPE_SYSROOT_NATIVE}/${TFM_SIGN_PRIVATE_KEY}" \
--public-key-format full \
--align 1 \
--pad \
--pad-header \
--measured-boot-record \
-H ${RE_IMAGE_OFFSET} \
-s auto \
"
#
# sign_host_image
#
@@ -65,16 +80,7 @@ EOF
host_binary_signed="${TFM_IMAGE_SIGN_DIR}/signed_$(basename "${1}")"
${PYTHON} "${STAGING_LIBDIR_NATIVE}/tfm-scripts/wrapper/wrapper.py" \
-v ${RE_LAYOUT_WRAPPER_VERSION} \
--layout "${TFM_IMAGE_SIGN_DIR}/${host_binary_layout}" \
-k "${RECIPE_SYSROOT_NATIVE}/${TFM_SIGN_PRIVATE_KEY}" \
--public-key-format full \
--align 1 \
--pad \
--pad-header \
--measured-boot-record \
-H ${RE_IMAGE_OFFSET} \
-s auto \
${TFM_IMAGE_SIGN_ARGS} \
"${1}" \
"${host_binary_signed}"
}