trustfence: [cosmetic] rename script to trustfence-sign-artifact
The signing script is used for signing multiple artifacts, not just the kernel, so rename it for a broader use. https://jira.digi.com/browse/DEL-7047 Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
This commit is contained in:
parent
ae98d49748
commit
9b4a03c14c
|
|
@ -212,7 +212,7 @@ trustence_sign_cpio() {
|
||||||
mv "${1}-mkimg" "${1}"
|
mv "${1}-mkimg" "${1}"
|
||||||
fi
|
fi
|
||||||
# Sign/encrypt the ramdisk
|
# Sign/encrypt the ramdisk
|
||||||
trustfence-sign-kernel.sh -p "${DIGI_FAMILY}" -i "${1}" "${1}.tf"
|
trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -i "${1}" "${1}.tf"
|
||||||
else
|
else
|
||||||
# Copy the image with no changes
|
# Copy the image with no changes
|
||||||
cp "${1}" "${1}.tf"
|
cp "${1}" "${1}.tf"
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ do_deploy_append() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TMP_SIGNED_BOOTSCR="$(mktemp ${WORKDIR}/bootscr-signed.XXXXXX)"
|
TMP_SIGNED_BOOTSCR="$(mktemp ${WORKDIR}/bootscr-signed.XXXXXX)"
|
||||||
trustfence-sign-kernel.sh -p "${DIGI_FAMILY}" -b "${DEPLOYDIR}/boot.scr" "${TMP_SIGNED_BOOTSCR}"
|
trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -b "${DEPLOYDIR}/boot.scr" "${TMP_SIGNED_BOOTSCR}"
|
||||||
mv "${TMP_SIGNED_BOOTSCR}" "${DEPLOYDIR}/boot.scr"
|
mv "${TMP_SIGNED_BOOTSCR}" "${DEPLOYDIR}/boot.scr"
|
||||||
fi
|
fi
|
||||||
rm -f ${TMP_BOOTSCR}
|
rm -f ${TMP_BOOTSCR}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
#
|
#
|
||||||
# trustfence-sign-kernel.sh
|
# trustfence-sign-artifact.sh
|
||||||
#
|
#
|
||||||
# Copyright (C) 2016-2020 by Digi International Inc.
|
# Copyright (C) 2016-2020 by Digi International Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
|
@ -12,10 +12,11 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Description:
|
# Description:
|
||||||
# Script for building signed and encrypted kernel uImages using NXP CST.
|
# Script for building signed and encrypted artifacts using NXP CST.
|
||||||
#
|
#
|
||||||
# The following environment variables define the script behaviour:
|
# The following environment variables define the script behaviour:
|
||||||
# CONFIG_SIGN_KEYS_PATH: (mandatory) path to the CST folder by NXP with keys generated.
|
# CONFIG_SIGN_KEYS_PATH: (mandatory) path to the CST folder by NXP with keys generated.
|
||||||
|
# CONFIG_SIGN_MODE: (mandatory) Signing method: HAB/AHAB
|
||||||
# CONFIG_KEY_INDEX: (optional) key index to use for signing. Default is 0.
|
# CONFIG_KEY_INDEX: (optional) key index to use for signing. Default is 0.
|
||||||
# CONFIG_DEK_PATH: (optional) Path to keyfile. Define it to generate
|
# CONFIG_DEK_PATH: (optional) Path to keyfile. Define it to generate
|
||||||
# encrypted images
|
# encrypted images
|
||||||
|
|
@ -16,10 +16,10 @@ UBOOT_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT
|
||||||
|
|
||||||
SRC_URI = " \
|
SRC_URI = " \
|
||||||
${UBOOT_GIT_URI};branch=${SRCBRANCH} \
|
${UBOOT_GIT_URI};branch=${SRCBRANCH} \
|
||||||
file://trustfence-sign-kernel.sh;name=kernel-script \
|
file://trustfence-sign-artifact.sh;name=artifact-sign-script \
|
||||||
file://sign_hab;name=kernel-sign \
|
file://sign_hab;name=artifact-hab-sign \
|
||||||
file://encrypt_hab;name=kernel-encrypt \
|
file://encrypt_hab;name=artifact-hab-encrypt \
|
||||||
file://sign_ahab;name=kernel-sign \
|
file://sign_ahab;name=artifact-ahab-sign \
|
||||||
"
|
"
|
||||||
|
|
||||||
do_configure[noexec] = "1"
|
do_configure[noexec] = "1"
|
||||||
|
|
@ -36,7 +36,7 @@ do_install() {
|
||||||
bberror "Unkown TRUSTFENCE_SIGN_MODE value"
|
bberror "Unkown TRUSTFENCE_SIGN_MODE value"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
install -m 0755 trustfence-sign-kernel.sh ${D}${bindir}/
|
install -m 0755 trustfence-sign-artifact.sh ${D}${bindir}/
|
||||||
install -m 0755 git/scripts/csf_templates/* ${D}${bindir}/csf_templates
|
install -m 0755 git/scripts/csf_templates/* ${D}${bindir}/csf_templates
|
||||||
|
|
||||||
# Select U-Boot sign script depending on U-Boot including an SPL image
|
# Select U-Boot sign script depending on U-Boot including an SPL image
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ trustfence_sign() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TMP_KERNEL_IMAGE_SIGNED="$(mktemp ${KERNEL_IMAGE}-signed.XXXXXX)"
|
TMP_KERNEL_IMAGE_SIGNED="$(mktemp ${KERNEL_IMAGE}-signed.XXXXXX)"
|
||||||
trustfence-sign-kernel.sh -p "${DIGI_FAMILY}" -l "${KERNEL_IMAGE}" "${TMP_KERNEL_IMAGE_SIGNED}"
|
trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -l "${KERNEL_IMAGE}" "${TMP_KERNEL_IMAGE_SIGNED}"
|
||||||
|
|
||||||
if [ "${type}" = "Image.gz" ]; then
|
if [ "${type}" = "Image.gz" ]; then
|
||||||
# Compress the signed Image and restore the original filename
|
# Compress the signed Image and restore the original filename
|
||||||
|
|
@ -63,7 +63,7 @@ trustfence_sign() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TMP_DTB_IMAGE_SIGNED="$(mktemp ${DTB_IMAGE}-signed.XXXXXX)"
|
TMP_DTB_IMAGE_SIGNED="$(mktemp ${DTB_IMAGE}-signed.XXXXXX)"
|
||||||
trustfence-sign-kernel.sh -p "${DIGI_FAMILY}" -d "${DTB_IMAGE}" "${TMP_DTB_IMAGE_SIGNED}"
|
trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -d "${DTB_IMAGE}" "${TMP_DTB_IMAGE_SIGNED}"
|
||||||
mv "${TMP_DTB_IMAGE_SIGNED}" "${DTB_IMAGE}"
|
mv "${TMP_DTB_IMAGE_SIGNED}" "${DTB_IMAGE}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue