X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=include%2Fimage-commands.mk;h=f7e6ba6aa6e730992fef12a0476b36a912626072;hp=28b39c310e499caea4fe8a6d9ad6dceb5d95363b;hb=ec78f03de589adc9bd47a02d723d7054510601dd;hpb=82618062cf7ed6b40d2c52c6f6b96364888ffda6 diff --git a/include/image-commands.mk b/include/image-commands.mk index 28b39c310e..f7e6ba6aa6 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)" -o ! -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