- ) > $(call imgname,$(1),$(2))-sysupgrade.bin
- $(STAGING_DIR_HOST)/bin/mkdniimg \
- -B WNDR3700 -v OpenWrt.$(REVISION) \
- -i $(call imgname,$(1),$(2))-sysupgrade.bin \
- -o $(call imgname,$(1),$(2))-factory.img
-endef
-
-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 \
- 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
-endef
-
-define Image/Build/WNDR3700/initramfs
- $(call PatchKernelLzma,$(2),$(3) $(wndr3700_mtdlayout))
- $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(KDIR)/vmlinux-$(2).uImage)
+ ) > $(call sysupname,$(1),$(2))
+ 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 sysupname,$(1),$(2)) \
+ -o $(call imgname,$(1),$(2))-factory$$$$dashr.img; \
+ done
+endef
+
+define Image/Build/Netgear/initramfs
+ $(call MkuImageLzma,$(2),$(3) $($(4)))