endef
define Build/pad-to
- dd if=$@ of=$@.new bs=$(1) conv=sync
- mv $@.new $@
+ $(call Image/pad-to,$@,$(1))
endef
define Build/pad-extra
"$(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 $@
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)))" \
} \
}'