From 848b455d2e9441361f6e010f9b95ab8a7dccbae1 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 6 Aug 2018 21:20:57 +0200 Subject: [PATCH] image: use ucert to append signature Signed-off-by: Daniel Golle --- include/image-commands.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/image-commands.mk b/include/image-commands.mk index 28b39c310e..01040138a4 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -309,6 +309,12 @@ metadata_json = \ define Build/append-metadata $(if $(SUPPORTED_DEVICES),-echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@) + [ -s "$(BUILD_KEY)" -a -s "$(BUILD_KEY).ucert" ] && { \ + cp "$(BUILD_KEY).ucert" "$@.ucert" ;\ + usign -S -m "$@" -s "$(BUILD_KEY)" -x "$@.sig" ;\ + ucert -A -c "$@.ucert" -x "$@.sig" ;\ + fwtool -S "$@.ucert" "$@" ;\ + } endef define Build/kernel2minor -- 2.25.1