Browse Source

mediatek: fix append-gl-metadata when running in buildbot

Use same logic as in append-metadata so build doesn't fail in case of
missing build-key (it was previously failing on the buildbot runners).

Signed-off-by: Daniel Golle <[email protected]>
Daniel Golle 2 years ago
parent
commit
a384490b10
1 changed files with 5 additions and 2 deletions
  1. 5 2
      target/linux/mediatek/image/filogic.mk

+ 5 - 2
target/linux/mediatek/image/filogic.mk

@@ -58,9 +58,12 @@ metadata_gl_json = \
 
 define Build/append-gl-metadata
 	$(if $(SUPPORTED_DEVICES),-echo $(call metadata_gl_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@)
-	[ ! -s "$(BUILD_KEY)" -o ! -s "$@" ] || { \
+	sha256sum "$@" | cut -d" " -f1 > "[email protected]"
+	[ ! -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]" ;\
-		fwtool -S "[email protected]" "$@" ;\
+		ucert -A -c "[email protected]" -x "[email protected]" ;\
+		fwtool -S "[email protected]" "$@" ;\
 	}
 endef