|
@@ -384,13 +384,16 @@ define Build/tplink-v2-image
|
|
|
rm -rf [email protected]
|
|
|
endef
|
|
|
|
|
|
+compat_version=$(if $(DEVICE_COMPAT_VERSION),$(DEVICE_COMPAT_VERSION),1.0)
|
|
|
json_quote=$(subst ','\'',$(subst ",\",$(1)))
|
|
|
#")')
|
|
|
metadata_devices=$(if $(1),$(subst "$(space)","$(comma)",$(strip $(foreach v,$(1),"$(call json_quote,$(v))"))))
|
|
|
metadata_json = \
|
|
|
'{ $(if $(IMAGE_METADATA),$(IMAGE_METADATA)$(comma)) \
|
|
|
"metadata_version": "1.0", \
|
|
|
- "supported_devices":[$(call metadata_devices,$(1))], \
|
|
|
+ "compat_version": "$(call json_quote,$(compat_version))", \
|
|
|
+ $(if $(DEVICE_COMPAT_MESSAGE),"compat_message": "$(call json_quote,$(DEVICE_COMPAT_MESSAGE))"$(comma)) \
|
|
|
+ "supported_devices":[$(call metadata_devices,$(SUPPORTED_DEVICES))], \
|
|
|
"version": { \
|
|
|
"dist": "$(call json_quote,$(VERSION_DIST))", \
|
|
|
"version": "$(call json_quote,$(VERSION_NUMBER))", \
|
|
@@ -401,7 +404,7 @@ metadata_json = \
|
|
|
}'
|
|
|
|
|
|
define Build/append-metadata
|
|
|
- $(if $(SUPPORTED_DEVICES),-echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@)
|
|
|
+ $(if $(SUPPORTED_DEVICES),-echo $(call metadata_json) | fwtool -I - $@)
|
|
|
[ ! -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]" ;\
|