diff --git a/board/common/Config.in b/board/common/Config.in index 5ce1e8e8..60904edd 100644 --- a/board/common/Config.in +++ b/board/common/Config.in @@ -1,38 +1,15 @@ menu "Images" source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-rootfs/Config.in" +source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-rauc/Config.in" endmenu -menuconfig SIGN_ENABLED - bool "Image Signing" - default y - -choice - prompt "Signing key source" - depends on SIGN_ENABLED - default SIGN_SRC_DIR - -config SIGN_SRC_DIR - bool "Directory" - -config SIGN_SRC_PKCS11 - bool "PKCS#11 URL" - -endchoice - -config SIGN_KEY - string "Signing key" - depends on SIGN_ENABLED - default "${BR2_EXTERNAL_INFIX_PATH}/board/common/signing-keys/development" if SIGN_SRC_DIR - menuconfig TRUSTED_KEYS bool "Trusted keys for image" - depends on SIGN_ENABLED help Keys that will be accepted for this image - config TRUSTED_KEYS_DEVELOPMENT bool "Development key" depends on TRUSTED_KEYS diff --git a/board/common/image/image-itb-rauc/Config.in b/board/common/image/image-itb-rauc/Config.in new file mode 100644 index 00000000..27f7017d --- /dev/null +++ b/board/common/image/image-itb-rauc/Config.in @@ -0,0 +1,27 @@ +menuconfig IMAGE_ITB_RAUC + bool "RAUC upgrade bundle (ITB)" + select IMAGE_ITB_ROOTFS + select BR2_PACKAGE_HOST_RAUC + help + Create RAUC upgrade bundle, for targets using ITB images, + that can be used to upgrade a running system to this version + of Infix. + +config IMAGE_ITB_RAUC_KEY + string "signing key" + depends on IMAGE_ITB_RAUC + default "${BR2_EXTERNAL_INFIX_PATH}/board/common/signing-keys/development/infix.key" + help + Path to the private key, in PKCS#8 format, used to sign + the RAUC bundle; or a PKCS#11 URI. + +config IMAGE_ITB_RAUC_CERT + string "signing certificate" + depends on IMAGE_ITB_RAUC + default "${BR2_EXTERNAL_INFIX_PATH}/board/common/signing-keys/development/infix.crt" + help + Path to the X509 certificate which will be associated with + the bundle signature. + + NOTE: This cert MUST be included in the trust store of the + system on which this bundle is to be installed. diff --git a/board/common/image/image-itb-rauc/generate.sh b/board/common/image/image-itb-rauc/generate.sh new file mode 100755 index 00000000..8552402c --- /dev/null +++ b/board/common/image/image-itb-rauc/generate.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +set -e + +squash="${BINARIES_DIR}"/rootfs.squashfs +itbh="${BINARIES_DIR}"/rootfs.itbh +pkg="${BINARIES_DIR}"/"${ARTIFACT}.pkg" + +cp -f "${PKGDIR}"/hooks.sh "${WORKDIR}"/hooks.sh + +# RAUC internally uses the file extension to find a suitable install +# handler, hence the name must be .img +cp -f "${squash}" "${WORKDIR}"/rootfs.img +cp -f "${itbh}" "${WORKDIR}"/rootfs.itbh + +cat >"${WORKDIR}"/manifest.raucm <"$work/manifest.raucm" <