+define Image/Build/SPW303V
+ # Generate the tagged image
+ $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \
+ --output $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp \
+ --boardid $(2) --chipid $(3) --entry $(KERNEL_ENTRY) \
+ --load-addr $(LOADADDR) --rsa-signature "$(5)" \
+ $(6) $(7) $(8) $(9)
+ # Fix up header
+ $(STAGING_DIR_HOST)/bin/spw303v -i $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp \
+ -o $(BIN_DIR)/openwrt-$(4)-$(1)-cfe-sysupgrade.bin
+ $(STAGING_DIR_HOST)/bin/xorimage -i $(BIN_DIR)/openwrt-$(4)-$(1)-cfe-sysupgrade.bin \
+ -o $(BIN_DIR)/openwrt-$(4)-$(1)-cfe-factory.bin
+ rm -f $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp
+endef
+