Просмотр исходного кода

image: use ucert to append signature

Signed-off-by: Daniel Golle <[email protected]>
Daniel Golle 7 лет назад
Родитель
Сommit
848b455d2e
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      include/image-commands.mk

+ 6 - 0
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" "[email protected]" ;\
+		usign -S -m "$@" -s "$(BUILD_KEY)" -x "[email protected]" ;\
+		ucert -A -c "[email protected]" -x "[email protected]" ;\
+		fwtool -S "[email protected]" "$@" ;\
+	}
 endef
 
 define Build/kernel2minor