diff options
author | Daniel Golle <daniel@makrotopia.org> | 2018-08-06 21:20:57 +0200 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2018-08-07 23:20:49 +0200 |
commit | 848b455d2e9441361f6e010f9b95ab8a7dccbae1 (patch) | |
tree | 58314aef44937a3a46e0d9842a1007313a52cc2f /include | |
parent | 7a52ce3fafab59a17f692a3a24717c8b0f358407 (diff) | |
download | upstream-848b455d2e9441361f6e010f9b95ab8a7dccbae1.tar.gz upstream-848b455d2e9441361f6e010f9b95ab8a7dccbae1.tar.bz2 upstream-848b455d2e9441361f6e010f9b95ab8a7dccbae1.zip |
image: use ucert to append signature
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/image-commands.mk | 6 |
1 files changed, 6 insertions, 0 deletions
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 |