+define Image/Build/PB92
+ $(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"; \
+ elif [ `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 \
+ of=$(call imgname,kernel,$(2)).bin bs=64k conv=sync; \
+ dd if=$(KDIR)/root.$(1) \
+ of=$(call imgname,$(1),$(2)-rootfs).bin bs=128k conv=sync; \
+ ( \
+ dd if=$(KDIR)/vmlinux-$(2).uImage bs=896k conv=sync; \
+ dd if=$(KDIR)/root.$(1); \
+ ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
+ fi
+endef
+
+define Image/Build/PB4X
+ $(call PatchKernelLzma,$(2),$(3))
+ dd if=$(KDIR)/vmlinux-$(2).bin.lzma \
+ of=$(call imgname,kernel,$(2)).bin bs=64k conv=sync
+ dd if=$(KDIR)/root.$(1) \
+ of=$(call imgname,$(1),$(2)-rootfs).bin bs=128k conv=sync
+ -sh $(TOPDIR)/scripts/combined-image.sh \
+ "$(call imgname,kernel,$(2)).bin" \
+ "$(call imgname,$(1),$(2)-rootfs).bin" \
+ $(call imgname,$(1),$(2))-sysupgrade.bin
+endef
+
+define Image/Build/DB120
+ $(call PatchKernelLzma,$(2),$(3))
+ if [ `stat -c%s $(KDIR)/vmlinux-$(2).bin.lzma` -gt 1441792 ]; then \
+ echo "Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
+ elif [ `stat -c%s $(KDIR)/root.$(1)` -gt 6488064 ]; 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 \
+ of=$(call imgname,kernel,$(2)).bin bs=64k conv=sync; \
+ dd if=$(KDIR)/root.$(1) \
+ of=$(call imgname,$(1),$(2)-rootfs).bin bs=128k conv=sync; \
+ ( \
+ dd if=$(KDIR)/root.$(1); \
+ dd if=$(KDIR)/vmlinux-$(2).uImage bs=1408k conv=sync; \
+ ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
+ fi
+endef
+
+define Image/Build/AP121
+ $(call PatchKernelLzma,$(2),$(3) $($(4)))
+ $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(KDIR)/vmlinux-$(2).uImage)
+ if [ `stat -c%s $(KDIR)/vmlinux-$(2).uImage` -gt $(5) ]; then \
+ echo "Warning: $(KDIR)/vmlinux-$(2).uImage is too big"; \
+ elif [ `stat -c%s $(BIN_DIR)/$(IMG_PREFIX)-root.$(1)` -gt $(6) ]; then \
+ echo "Warning: $(KDIR)/root.$(1) is too big"; \
+ else \
+ cp $(KDIR)/vmlinux-$(2).uImage $(call imgname,kernel,$(2)).bin; \
+ cp $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) $(call imgname,$(1),$(2)-rootfs).bin; \
+ ( \
+ dd if=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=$(6) conv=sync; \
+ dd if=$(KDIR)/vmlinux-$(2).uImage; \
+ ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
+ fi
+endef
+
+define Image/Build/AP121/initramfs
+ $(call PatchKernelLzma,$(2),$(3) $($(4)))
+ $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(call imgname,$(1),$(2))-uImage.bin)
+endef
+