+ for r in $(7) ; do \
+ [ -n "$$$$r" ] && dashr="-$$$$r" || dashr= ; \
+ $(STAGING_DIR_HOST)/bin/mkdniimg \
+ -B $(6) -v OpenWrt.$(REVISION) -r "$$$$r" $(8) \
+ -i $(call imgname,$(1),$(2))-sysupgrade.bin \
+ -o $(call imgname,$(1),$(2))-factory$$$$dashr.img; \
+ done
+endef
+
+define Image/Build/Netgear/initramfs
+ $(call PatchKernelLzma,$(2),$(3) $($(4)))
+ $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(KDIR)/vmlinux-$(2).uImage)
+ $(STAGING_DIR_HOST)/bin/wndr3700 \
+ $(KDIR)/vmlinux-$(2).uImage \
+ $(call imgname,$(1),$(2))-uImage.bin \
+ $(5)
+endef
+
+ifdef CONFIG_PACKAGE_uboot-ar71xx-nbg460n_550n_550nh
+ define Image/Build/ZyXEL
+ $(call PatchKernelLzma,$(2),$(3))
+ 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 2752512 ]; then \
+ echo "Warning: $(KDIR)/root.$(1) is too big"; \
+ else if [ ! -f $(BIN_DIR)/$(IMG_PREFIX)-$(2)-u-boot.bin ]; then \
+ echo "Warning: $(IMG_PREFIX)-$(2)-u-boot.bin not found"; \
+ 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; \
+ $(STAGING_DIR_HOST)/bin/mkzynfw \
+ -B $(4) \
+ -b $(BIN_DIR)/$(IMG_PREFIX)-$(2)-u-boot.bin \
+ -r $(call imgname,$(1),$(2))-sysupgrade.bin:0x10000 \
+ -o $(call imgname,$(1),$(2))-factory.bin; \
+ fi; fi; fi
+ endef
+endif
+
+define Image/Build/Zcomax
+ $(call PatchKernelLzma,$(2),$(3))
+ $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(KDIR)/vmlinux-$(2).uImage.bin)
+ -$(STAGING_DIR_HOST)/bin/mkzcfw \
+ -B $(2) \
+ -k $(KDIR)/vmlinux-$(2).uImage.bin \
+ -r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \