-define Image/Build/Template/Compex
- $(call Image/Build/MyLoader,$(1),$(2))
-endef
-
-define Image/Build/Template/Compex/squashfs
- $(call Image/Build/Template/Compex,squashfs,$(1))
-endef
-
-define Image/Build/Template/WRT400N
- $(call Image/Build/WRT400N,$(1),$(2),$(3),$(4))
-endef
-
-define Image/Build/Template/WRT400N/squashfs
- $(call Image/Build/Template/WRT400N,squashfs,$(1),$(2),$(3))
-endef
-
-define Image/Build/Template/WRT400N/jffs2-64k
- $(call Image/Build/Template/WRT400N,jffs2-64k,$(1),$(2),$(3))
-endef
-
-define Image/Build/Template/DIR825B1
- $(call Image/Build/DIR825B1,$(1),$(2),$(3),$(4))
-endef
-
-define Image/Build/Template/DIR825B1/squashfs
- $(call Image/Build/Template/DIR825B1,squashfs,$(1),$(2),$(3))
-endef
-
-define Image/Build/Template/DIR825B1/jffs2-64k
- $(call Image/Build/Template/DIR825B1,jffs2-64k,$(1),$(2),$(3))
-endef
-
-define Image/Build/Template/CyberTAN
- $(call Image/Build/CyberTAN,$(1),$(2),$(3),$(4))
-endef
-
-define Image/Build/Template/CyberTAN/squashfs
- $(call Image/Build/Template/CyberTAN,squashfs,$(1),$(2),$(3))
-endef
-
-define Image/Build/Template/CyberTAN/jffs2-64k
- $(call Image/Build/Template/CyberTAN,jffs2-64k,$(1),$(2),$(3))
-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 \
+ 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
+endif