@@ -46,8 +46,7 @@ IMAGE_TYPEDEP:swu = "${@ '${SWU_DELTA_UPDATE_ARTIFACT_TYPE}' \
if d.getVar('DELTA_UPDATE_TYPE') == "rdiff" or d.getVar('DELTA_UPDATE_TYPE') == "zchunk" \
else '${SWU_UPDATE_ARTIFACT_TYPE}' }"
-IMAGER_BUILD_DEPS:swu += "${@'swupdate-certificates-key' if bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}"
-IMAGER_INSTALL:swu += "cpio ${@'openssl swupdate-certificates-key' if bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}"
+IMAGER_INSTALL:swu += "cpio"
IMAGE_INSTALL += "${@'swupdate-certificates' if bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}"
@@ -1,7 +1,7 @@
#
# CIP Core, generic profile
#
-# Copyright (c) Siemens AG, 2023
+# Copyright (c) Siemens AG, 2023-2024
#
# Authors:
# Quirin Gylstorff <quirin.gylstorff@siemens.com>
@@ -14,6 +14,9 @@ inherit read-only-rootfs
SWU_SIGNED ?= "1"
SWU_HW_COMPAT ?= "cip-core-1.0"
+IMAGER_BUILD_DEPS:swu += "${@'swupdate-signer' if bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}"
+IMAGER_INSTALL:swu += "${@'swupdate-signer' if bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}"
+IMAGE_INSTALL += "${@'swupdate-certificates' if bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}"
IMAGE_INSTALL += " swupdate"
IMAGE_INSTALL:remove:sid = "swupdate"
deleted file mode 100644
@@ -1,6 +0,0 @@
-#!/bin/sh
-in_file=$1
-out_file=$2
-openssl dgst \
- -sha256 -sign "/usr/share/swupdate-signing/swupdate-sign.key" "$in_file" \
- > "$out_file"
@@ -18,17 +18,10 @@ PROVIDES += "swupdate-certificates-key"
DEBIAN_PROVIDES = "swupdate-certificates-key"
SWU_SIGN_KEY ??= ""
-SWU_SIGN_SCRIPT ??= "sign-swu-cms"
SRC_URI:append = " ${@ "file://"+d.getVar('SWU_SIGN_KEY') if d.getVar('SWU_SIGN_KEY') else '' }"
-SRC_URI:append = " ${@ "file://"+d.getVar('SWU_SIGN_SCRIPT') if d.getVar('SWU_SIGN_SCRIPT') else '' }"
-do_install[cleandirs] = "${D}/usr/share/swupdate-signing/ \
- ${D}/usr/bin/"
+do_install[cleandirs] = "${D}/usr/share/swupdate-signing"
do_install() {
- if [ ! -f ${WORKDIR}/${SWU_SIGN_SCRIPT} ]; then
- bbfatal "You must add a '${SWU_SIGN_SCRIPT}' to execute the signing process"
- fi
- install -m 0700 ${WORKDIR}/${SWU_SIGN_SCRIPT} ${D}/usr/bin/sign-swu
if [ -z ${SWU_SIGN_KEY} ]; then
bbfatal "You must set SWU_SIGN_KEY and provide the required file as artifacts to this recipe"
fi
similarity index 100%
rename from recipes-devtools/swupdate-certificates/files/sign-swu-cms
rename to recipes-devtools/swupdate-signer/files/sign-swu-cms
new file mode 100644
@@ -0,0 +1,26 @@
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+# Quirin Gylstorff <quirin.gylstorff@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+
+inherit dpkg-raw
+DPKG_ARCH = "all"
+DEBIAN_MULTI_ARCH = "foreign"
+
+PROVIDES = "swupdate-signer"
+DEBIAN_PROVIDES = "swupdate-signer"
+
+DEPENDS = "swupdate-certificates-key"
+DEBIAN_DEPENDS += "openssl, swupdate-certificates-key"
+
+SRC_URI = "file://sign-swu-cms"
+
+do_install[cleandirs] = "${D}/usr/bin/"
+do_install() {
+ install -m 0755 ${WORKDIR}/sign-swu-cms ${D}/usr/bin/sign-swu
+}