X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/6b17f453aaa8a583e9a78daa90b556624fa0a69d..7bd72d46a137a00ae4ce56982ce1b93603f9ade8:/target/linux/ar71xx/image/Makefile diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 1eafa09bd..942ef1208 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -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 @@ -127,7 +140,7 @@ define Image/Build/WZRHPG300NH fi; fi endef -cameo_mtdlayout=mtdparts=spi0.0:128k(u-boot)ro,64k(config)ro,896k(kernel),2880k(rootfs),64k(art)ro,3776k@0x30000(firmware) +cameo_mtdlayout=mtdparts=spi0.0:128k(u-boot)ro,64k(config)ro,896k(kernel),2944k(rootfs),64k(art)ro,3840k@0x30000(firmware) define Image/Build/Cameo $(call PatchKernelLzma,$(2),$(3) $(cameo_mtdlayout)) if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt 917504 ]; then \ @@ -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))