+ ) > $(call imgname,$(1),$(2))-factory.bin; \
+ fi; fi
+endef
+
+cameo7240_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,896k(kernel),2816k(rootfs),64k(mac)ro,64k(art)ro,3712k@0x40000(firmware)
+define Image/Build/Cameo7240
+ $(call PatchKernelLzma,$(2),$(3) $(cameo7240_mtdlayout))
+ if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt 917504 ]; then \
+ echo "Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
+ else if [ `stat -c%s $(KDIR)/root.$(1)` -gt 2818048 ]; then \
+ echo "Warning: $(KDIR)/root.$(1) is too big"; \
+ else \
+ mkimage -A mips -O linux -T kernel -a 0x80060000 -C lzma -e \
+ 0x80060000 \
+ -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
+ -d $(KDIR)/vmlinux-$(2).bin.lzma $(KDIR)/vmlinux-$(2).uImage; \
+ ( \
+ dd if=$(KDIR)/vmlinux-$(2).uImage bs=896k conv=sync; \
+ dd if=$(KDIR)/root.$(1) \
+ ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
+ ( \
+ dd if=$(KDIR)/vmlinux-$(2).uImage bs=896k conv=sync; \
+ dd if=$(KDIR)/root.$(1) bs=2752k conv=sync; \
+ echo -n $(4); \
+ ) > $(call imgname,$(1),$(2))-factory.bin; \