endef
define Build/haier-sim_wr1800k-factory
- -[ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) ] && \
- mkdir -p "$(1).tmp" && \
- $(CP) $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) "$(1).tmp/UploadBrush-bin.img" && \
- $(MKHASH) md5 "$(1).tmp/UploadBrush-bin.img" | head -c32 > "$(1).tmp/check_MD5.txt" && \
- $(TAR) -czf $(1).tmp.tgz -C "$(1).tmp" UploadBrush-bin.img check_MD5.txt && \
- $(STAGING_DIR_HOST)/bin/openssl aes-256-cbc -e -salt -in $(1).tmp.tgz -out "$(1)" -k QiLunSmartWL && \
- printf %32s "$(DEVICE_MODEL)" >> "$(1)" && \
- rm -rf "$(1).tmp" $(1).tmp.tgz && \
- $(CP) $(1) $(BIN_DIR)/
+ mkdir -p "$@.tmp"
+ mv "$@" "$@.tmp/UploadBrush-bin.img"
+ $(MKHASH) md5 "$@.tmp/UploadBrush-bin.img" | head -c32 > "$@.tmp/check_MD5.txt"
+ $(TAR) -czf "$@.tmp.tgz" -C "$@.tmp" UploadBrush-bin.img check_MD5.txt
+ $(STAGING_DIR_HOST)/bin/openssl aes-256-cbc -e -salt -in "$@.tmp.tgz" -out "$@" -k QiLunSmartWL
+ printf %32s $(DEVICE_MODEL) >> "$@"
+ rm -rf "$@.tmp" "$@.tmp.tgz"
endef
define Build/iodata-mstc-header
KERNEL_LOADADDR := 0x82000000
KERNEL := kernel-bin | relocate-kernel 0x80001000 | lzma | \
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
- KERNEL_INITRAMFS := $$(KERNEL) | \
- haier-sim_wr1800k-factory $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.bin
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ ARTIFACTS := initramfs-factory.bin
+ ARTIFACT/initramfs-factory.bin := append-image-stage initramfs-kernel.bin | \
+ haier-sim_wr1800k-factory
+endif
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
DEVICE_PACKAGES := kmod-mt7915e uboot-envtools
endef