[rdc] fix panic on boot due to invalid IORESOURCE for MFD cells, fix gpio value setting
[openwrt.git] / target / linux / ar71xx / image / Makefile
index cd066f7..942ef12 100644 (file)
@@ -81,27 +81,40 @@ define Image/Build/WRT400N
                        -d $(KDIR)/vmlinux-$(2).bin.lzma $(KDIR)/vmlinux-$(2).uImage; \
                ( \
                        dd if=$(KDIR)/vmlinux-$(2).uImage bs=1280k conv=sync; \
-                       dd if=$(KDIR)/root.$(1) bs=6336k conv=sync; \
-                       echo -n $(4); \
-               ) > $(call imgname,$(1),$(2)).bin; \
-               wrt400n $(KDIR)/vmlinux-$(2).uImage $(KDIR)/root.$(1) $(call imgname,$(1),$(2)).webui; \
+                       dd if=$(KDIR)/root.$(1) \
+               ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
+               wrt400n $(KDIR)/vmlinux-$(2).uImage $(KDIR)/root.$(1) $(call imgname,$(1),$(2))-factory.bin; \
        fi; fi
 endef
 
 dir825b1_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,1024k(kernel),5184k(rootfs),64k(caldata)ro,1600k(unknown)ro,6208k@0x50000(firmware)
 define Image/Build/DIR825B1
        $(call PatchKernelLzma,$(2),$(3) $(dir825b1_mtdlayout))
-       $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(call imgname,$(1),$(2)).bin)
-       if [ `stat -c%s "$(call imgname,$(1),$(2)).bin"` -gt 1048576 ]; then \
+       if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt 1048576 ]; then \
                echo "Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
-               rm -f $(call imgname,$(1),$(2)).bin; \
        else if [ `stat -c%s $(KDIR)/root.$(1)` -gt 5308416 ]; then \
                echo "Warning: $(KDIR)/root.$(1) is too big"; \
-               rm -f $(call imgname,$(1),$(2)).bin; \
        else \
-               dd if=$(KDIR)/root.$(1) of=$(call imgname,$(1),$(2)).bin bs=1k seek=1024; \
-               cp $(call imgname,$(1),$(2)).bin $(call imgname,$(1),$(2))-backup-loader.bin; \
-               echo -n "01AP94-AR7161-RT-080619-00" >> $(call imgname,$(1),$(2))-backup-loader.bin; \
+               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=1024k conv=sync; \
+                       dd if=$(KDIR)/root.$(1) \
+               ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
+               ( \
+                       dd if=$(call imgname,$(1),$(2))-sysupgrade.bin; \
+                       echo -n "01AP94-AR7161-RT-080619-00"; \
+               ) > $(call imgname,$(1),$(2))-backup-loader.bin; \
+               if [ `stat -c%s $(call imgname,$(1),$(2))-sysupgrade.bin` -gt 4194304 ]; then \
+                       echo "Warning: $(call imgname,$(1),$(2))-sysupgrade.bin is too big"; \
+               else \
+                       ( \
+                               dd if=$(call imgname,$(1),$(2))-sysupgrade.bin bs=4096k conv=sync; \
+                               echo -n "00AP94-AR7161-RT-080619-00"; \
+                       ) > $(call imgname,$(1),$(2))-factory.bin; \
+               fi; \
        fi; fi
 endef
 
@@ -199,14 +212,16 @@ define Image/Build/AP83
 endef
 
 define Image/Build/PB92
-       $(call PatchKernelGzip,$(2),$(3))
-       if [ `stat -c%s $(KDIR)/root.$(1)` -gt 2818048 ]; then \
+       $(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 gzip -e \
+               mkimage -A mips -O linux -T kernel -a 0x80060000 -C lzma -e \
                        0x80060000 \
                        -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
-                       -d $(KDIR)/vmlinux-$(2).bin.gz \
+                       -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; \
@@ -281,13 +296,13 @@ define Image/Build/Planex
                        -d $(KDIR)/vmlinux-$(2).bin.gz $(KDIR)/vmlinux-$(2).uImage; \
                ( \
                        dd if=$(KDIR)/vmlinux-$(2).uImage bs=1408k conv=sync; \
-                       dd if=$(KDIR)/root.$(1) bs=6208k conv=sync; \
-               ) > $(call imgname,$(1),$(2)).bin; \
+                       dd if=$(KDIR)/root.$(1); \
+               ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \
                $(STAGING_DIR_HOST)/bin/mkplanexfw \
                        -B $(2) \
                        -v 2.00.00 \
-                       -i $(call imgname,$(1),$(2)).bin \
-                       -o $(call imgname,$(1),$(2)).webui; \
+                       -i $(call imgname,$(1),$(2))-sysupgrade.bin \
+                       -o $(call imgname,$(1),$(2))-factory.bin; \
        fi; fi
 endef
 
@@ -320,7 +335,10 @@ define Image/Build/CyberTAN
                -x 32 -a 0x10000 -x -32 -f $(KDIR)/root.$(1)
        -$(STAGING_DIR_HOST)/bin/addpattern -B $(2) -v v$(4) \
                -i $(KDIR)/image.tmp \
-               -o $(call imgname,$(1),$(2)).bin
+               -o $(call imgname,$(1),$(2))-sysupgrade.bin
+       -$(STAGING_DIR_HOST)/bin/addpattern -B $(2) -v v$(4) -g \
+               -i $(KDIR)/image.tmp \
+               -o $(call imgname,$(1),$(2))-factory.bin
        rm $(KDIR)/image.tmp
 endef
 
@@ -515,6 +533,10 @@ define Image/Build/Profile/TLWR941NDV2
        $(call Image/Build/Template/$(fs_squash)/$(1),TPLINK,tl-wr941nd-v2,board=TL-WR941ND,TL-WR941NDv2)
 endef
 
+define Image/Build/Profile/TLWR941NDV3
+       $(call Image/Build/Template/$(fs_squash)/$(1),TPLINK,tl-wr941nd-v3,board=TL-WR941ND,TL-WR941NDv2)
+endef
+
 define Image/Build/Profile/TLWR941NDV4
        $(call Image/Build/Template/$(fs_4k)/$(1),TPLINK,tl-wr941nd-v4,board=TL-WR741ND,TL-WR941NDv4)
 endef
@@ -563,6 +585,7 @@ define Image/Build/Profile/Default
        $(call Image/Build/Profile/TLWR841NDV3,$(1))
        $(call Image/Build/Profile/TLWR841NDV5,$(1))
        $(call Image/Build/Profile/TLWR941NDV2,$(1))
+       $(call Image/Build/Profile/TLWR941NDV3,$(1))
        $(call Image/Build/Profile/TLWR941NDV4,$(1))
        $(call Image/Build/Profile/TLWR1043NDV1,$(1))
        $(call Image/Build/Profile/UBNT,$(1))
This page took 0.024164 seconds and 4 git commands to generate.