ath79: add TP-Link WR842N v3
[openwrt/openwrt.git] / include / image-commands.mk
index 56bad539b32a7fae10b1dcd094567c9db6decc07..8251a814000d2507676ccf51075860e86f64da18 100644 (file)
@@ -294,6 +294,20 @@ define Build/openmesh-image
                "$(call param_get_default,rootfs,$(1),$@)" "rootfs"
 endef
 
+define Build/qsdk-ipq-factory-nand
+       $(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
+               $@.its ubi $@
+       PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
+       @mv $@.new $@
+endef
+
+define Build/qsdk-ipq-factory-nor
+       $(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
+               $@.its hlos $(IMAGE_KERNEL) rootfs $(IMAGE_ROOTFS)
+       PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
+       @mv $@.new $@
+endef
+
 define Build/senao-header
        $(STAGING_DIR_HOST)/bin/mksenaofw $(1) -e $@ -o $@.new
        mv $@.new $@
@@ -341,12 +355,14 @@ 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))], \
                "version": { \
                        "dist": "$(call json_quote,$(VERSION_DIST))", \
                        "version": "$(call json_quote,$(VERSION_NUMBER))", \
                        "revision": "$(call json_quote,$(REVISION))", \
-                       "board": "$(call json_quote,$(BOARD))" \
+                       "target": "$(call json_quote,$(TARGETID))", \
+                       "board": "$(call json_quote,$(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)))" \
                } \
        }'