瀏覽代碼

image: ignore usign build errors

The tl-wa850re-v2 images from the ar71xx/tiny target are getting too big
with the default packages. The size check is done before the meta data
is added so there is no file to add meta data to or to sign. Originally
errors in Build/append-metadata were getting ignored, but if the signing
fails the error is not ignored.
This adds a check if the file to be signed is there and only does the
signing if it is there. This way it does not fail if the package
creation was already aborted earlier.

Fixes: 848b455d2e94 ("image: use ucert to append signature")
Signed-off-by: Hauke Mehrtens <[email protected]>
Hauke Mehrtens 7 年之前
父節點
當前提交
5933958168
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/image-commands.mk

+ 1 - 1
include/image-commands.mk

@@ -332,7 +332,7 @@ 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" ] || { \
+	[ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" -o ! -s "$@" ] || { \
 		cp "$(BUILD_KEY).ucert" "[email protected]" ;\
 		usign -S -m "$@" -s "$(BUILD_KEY)" -x "[email protected]" ;\
 		ucert -A -c "[email protected]" -x "[email protected]" ;\