X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/3ea7ce520057866773484edb1d6928f98665378e..8fcb797999bd696e94cc498d5c0632e680d823c4:/target/linux/ar71xx/image/Makefile?ds=sidebyside diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index dc433e051..02eb9b76b 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -88,10 +88,14 @@ define CatFiles endef define Sysupgrade/KR + $(call CatFiles,$(2),$(3),$(KDIR)/root.$(1),$(4),$(call sysupname,$(1),$(5))) +endef + +define Sysupgrade/KRuImage $(call CatFiles,$(KDIR_TMP)/vmlinux-$(2).uImage,$(3),$(KDIR)/root.$(1),$(4),$(call sysupname,$(1),$(2))) endef -define Sysupgrade/RK +define Sysupgrade/RKuImage $(call CatFiles,$(KDIR)/root.$(1),$(4),$(KDIR_TMP)/vmlinux-$(2).uImage,$(3),$(call sysupname,$(1),$(2))) endef @@ -124,13 +128,13 @@ define Image/BuildKernel dd if=$(KDIR)/vmlinux.bin.gz of=$(VMLINUX).gz bs=65536 conv=sync $(call MkuImage,gzip,,$(KDIR)/vmlinux.bin.gz,$(UIMAGE)-gzip.bin) $(call MkuImage,lzma,,$(KDIR)/vmlinux.bin.lzma,$(UIMAGE)-lzma.bin) - $(call Image/Build/Initramfs) -mkdir -p $(KDIR_TMP) + $(call Image/Build/Initramfs) endef define Image/Build/WRT400N $(call MkuImageLzma,$(2),$(3)) - $(call Sysupgrade/KR,$(1),$(2),1310720,6488064) + $(call Sysupgrade/KRuImage,$(1),$(2),1310720,6488064) if [ -e "$(call sysupname,$(1),$(2))" ]; then \ wrt400n $(KDIR_TMP)/vmlinux-$(2).uImage $(KDIR)/root.$(1) $(call factoryname,$(1),$(2)); \ fi @@ -139,7 +143,7 @@ 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 MkuImageLzma,$(2),$(3) $(dir825b1_mtdlayout)) - $(call Sysupgrade/KR,$(1),$(2),1048576,5308416) + $(call Sysupgrade/KRuImage,$(1),$(2),1048576,5308416) if [ -e "$(call sysupname,$(1),$(2))" ]; then \ ( \ dd if=$(call sysupname,$(1),$(2)); \ @@ -158,7 +162,7 @@ endef define Image/Build/WZRHPG30XNH $(call MkuImageLzma,$(2),$(3)) - $(call Sysupgrade/KR,$(1),$(2),1048576,31850496) + $(call Sysupgrade/KRuImage,$(1),$(2),1048576,31850496) if [ -e "$(call sysupname,$(1),$(2))" ]; then \ ( \ echo -n -e "# Airstation Public Fmt1\x00\x00\x00\x00\x00\x00\x00\x00"; \ @@ -176,7 +180,7 @@ endef define Image/Build/WHRHPG300N $(call MkuImageLzma,$(2),$(3) $($(4))) - $(call Sysupgrade/KR,$(1),$(2),917504,2883584) + $(call Sysupgrade/KRuImage,$(1),$(2),917504,2883584) if [ -e "$(call sysupname,$(1),$(2))" ]; then \ ( \ echo -n -e "# Airstation Public Fmt1\x00\x00\x00\x00\x00\x00\x00\x00"; \ @@ -194,7 +198,7 @@ endef define Image/Build/Cameo $(call MkuImageLzma,$(2),$(3) $($(4))) - $(call Sysupgrade/KR,$(1),$(2),$(5),$(6)) + $(call Sysupgrade/KRuImage,$(1),$(2),$(5),$(6)) if [ -e "$(call sysupname,$(1),$(2))" ]; then \ ( \ dd if=$(KDIR_TMP)/vmlinux-$(2).uImage bs=$(5) conv=sync; \ @@ -268,7 +272,7 @@ endef ubntxm_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1024k(kernel),6528k(rootfs),256k(cfg)ro,64k(EEPROM)ro,7552k@0x50000(firmware) define Image/Build/UBNTXM $(call MkuImageLzma,$(2),$(3) $(ubntxm_mtdlayout)) - $(call Sysupgrade/KR,$(1),$(2),1048576,6684672) + $(call Sysupgrade/KRuImage,$(1),$(2),1048576,6684672) dd if=$(KDIR_TMP)/vmlinux-$(2).uImage of=$(KDIR_TMP)/vmlinux-$(2).uImage.bin bs=1024k conv=sync -$(STAGING_DIR_HOST)/bin/mkfwimage \ -B $(4) -v $(5).$(6).OpenWrt.$(REVISION) \ @@ -291,9 +295,19 @@ define Image/Build/UBNT $(call sysupname,$(1),$(2)) endef +planex_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,960k(kernel),6784k(rootfs),128k(art)ro,7744k@0x50000(firmware) +define Image/Build/Planex/loader + $(call Image/BuildLoaderAlone,$(1),gz,$(2) $(planex_mtdlayout),0x52000,0) +endef + define Image/Build/Planex - $(call MkuImageGzip,$(2),$(3)) - $(call Sysupgrade/KR,$(1),$(2),1441792,6356992) + $(call MkuImage,gzip,,$(KDIR)/loader-$(2).gz,$(KDIR_TMP)/vmlinux-$(2).uImage) + $(call MkuImageOKLI,$(2)) + ( \ + dd if=$(KDIR_TMP)/vmlinux-$(2).uImage bs=8k count=1 conv=sync; \ + dd if=$(KDIR_TMP)/vmlinux-$(2).okli; \ + ) > $(KDIR_TMP)/kernel-$(2).bin + $(call Sysupgrade/KR,$(1),$(KDIR_TMP)/kernel-$(2).bin,983040,6815744,$(2)) if [ -e "$(call sysupname,$(1),$(2))" ]; then \ $(STAGING_DIR_HOST)/bin/mkplanexfw \ -B $(2) \ @@ -306,7 +320,7 @@ endef alfa_mtdlayout_8M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6144k(rootfs),1600k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware) define Image/Build/ALFA $(call MkuImageLzma,$(2),$(3)) - $(call Sysupgrade/RK,$(1),$(2),$(4),$(5)) + $(call Sysupgrade/RKuImage,$(1),$(2),$(4),$(5)) if [ -e "$(call sysupname,$(1),$(2))" ]; then \ rm -rf $(KDIR)/$(1); \ mkdir -p $(KDIR)/$(1); \ @@ -506,7 +520,7 @@ endef ifdef CONFIG_PACKAGE_uboot-ar71xx-nbg460n_550n_550nh define Image/Build/ZyXEL $(call MkuImageLzma,$(2),$(3)) - $(call Sysupgrade/KR,$(1),$(2),917504,2752512) + $(call Sysupgrade/KRuImage,$(1),$(2),917504,2752512) if [ -e "$(call sysupname,$(1),$(2))" ]; then \ if [ ! -f $(BIN_DIR)/$(IMG_PREFIX)-$(2)-u-boot.bin ]; then \ echo "Warning: $(IMG_PREFIX)-$(2)-u-boot.bin not found"; \ @@ -535,7 +549,7 @@ endef define Image/Build/Zcomax $(call MkuImageLzma,$(2),$(3)) - $(call Sysupgrade/RK,$(1),$(2),1507328,6356992) + $(call Sysupgrade/RKuImage,$(1),$(2),1507328,6356992) if [ -e "$(call sysupname,$(1),$(2))" ]; then \ $(STAGING_DIR_HOST)/bin/mkzcfw \ -B $(2) \ @@ -569,6 +583,10 @@ define Image/Build/Template/squashfs-only/squashfs $(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8)) endef +define Image/Build/Template/64k/loader + $(call Image/Build/$(1)/loader,$(2),$(3),$(4),$(5),$(6),$(7),$(8)) +endef + define Image/Build/Template/64k/squashfs $(call Image/Build/$(1),squashfs-64k,$(2),$(3),$(4),$(5),$(6),$(7),$(8)) endef @@ -605,7 +623,7 @@ endef alfa_ap96_cmdline=board=ALFA-AP96 console=ttyS0,115200 alfa_ap96_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13312k(rootfs),2048k(kernel),512k(caldata)ro,15360k@0x80000(firmware) define Image/Build/Profile/ALFAAP96 - $(call Image/Build/Template/$(fs_128k)/$(1),AthLzma,alfa-ap96,$(alfa_ap96_cmdline),alfa_ap96_mtdlayout,2097152,13631488,RK) + $(call Image/Build/Template/$(fs_128k)/$(1),AthLzma,alfa-ap96,$(alfa_ap96_cmdline),alfa_ap96_mtdlayout,2097152,13631488,RKuImage) endef ap121_mtdlayout_2M=mtdparts=spi0.0:64k(u-boot)ro,1216k(rootfs),704k(kernel),64k(art)ro,1920k@0x10000(firmware) @@ -613,34 +631,34 @@ ap121_mtdlayout_4M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,2752k(rootfs ap121_cmdline=board=AP121 console=ttyATH0,115200 define Image/Build/Profile/AP121 - $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,ap121-2M,$(ap121_cmdline),ap121_mtdlayout_2M,720896,1245184,RK) - $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,ap121-4M,$(ap121_cmdline),ap121_mtdlayout_4M,917504,2818048,RK) + $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,ap121-2M,$(ap121_cmdline),ap121_mtdlayout_2M,720896,1245184,RKuImage) + $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,ap121-4M,$(ap121_cmdline),ap121_mtdlayout_4M,917504,2818048,RKuImage) endef ap121_mini_cmdline=board=AP121-MINI console=ttyATH0,115200 define Image/Build/Profile/AP121MINI - $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,ap121-mini,$(ap121_mini_cmdline),ap121_mtdlayout_4M,917504,2818048,RK) + $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,ap121-mini,$(ap121_mini_cmdline),ap121_mtdlayout_4M,917504,2818048,RKuImage) endef ap81_cmdline=board=AP81 console=ttyS0,115200 define Image/Build/Profile/AP81 - $(call Image/Build/Template/$(fs_64k)/$(1),AthGzip,ap81,$(ap81_cmdline),,1310720,6619136,KR) + $(call Image/Build/Template/$(fs_64k)/$(1),AthGzip,ap81,$(ap81_cmdline),,1310720,6619136,KRuImage) endef ap83_cmdline=board=AP83 console=ttyS0,115200 define Image/Build/Profile/AP83 - $(call Image/Build/Template/$(fs_64k)/$(1),AthGzip,ap83,$(ap83_cmdline),,1310720,6619136,KR) + $(call Image/Build/Template/$(fs_64k)/$(1),AthGzip,ap83,$(ap83_cmdline),,1310720,6619136,KRuImage) endef ap96_cmdline=board=AP96 console=ttyS0,115200 define Image/Build/Profile/AP96 - $(call Image/Build/Template/$(fs_64k)/$(1),AthGzip,ap96,$(ap96_cmdline),ap96_mtdlayout,1769472,6291456,RK) + $(call Image/Build/Template/$(fs_64k)/$(1),AthGzip,ap96,$(ap96_cmdline),ap96_mtdlayout,1769472,6291456,RKuImage) endef db120_cmdline=board=DB120 console=ttyS0,115200 db120_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware) define Image/Build/Profile/DB120 - $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,db120,$(db120_cmdline),db120_mtdlayout,1441792,6488064,RK) + $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,db120,$(db120_cmdline),db120_mtdlayout,1441792,6488064,RKuImage) endef pb42_cmdline=board=PB42 console=ttyS0,115200 @@ -655,7 +673,7 @@ endef pb92_cmdline=board=PB92 console=ttyS0,115200 define Image/Build/Profile/PB92 - $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,pb92,$(pb92_cmdline),,917504,2818048,KR) + $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,pb92,$(pb92_cmdline),,917504,2818048,KRuImage) endef wp543_cmdline=console=ttyS0,115200 @@ -666,6 +684,11 @@ define Image/Build/Profile/WP543 $(call Image/Build/Template/$(fs_64k)/$(1),MyLoader,wp543,$(wp543_cmdline),0x1000000,16M) endef +wpe72_cmdline=console=ttyS0,115200 +define Image/Build/Profile/WPE72 + $(call Image/Build/Template/$(fs_64k)/$(1),MyLoader,wpe72,$(wpe72_cmdline),0x800000,8M) +endef + dir600a1_cmdline=board=DIR-600-A1 console=ttyS0,115200 define Image/Build/Profile/DIR600A1 $(call Image/Build/Template/$(fs_64k)/$(1),Cameo7240,dir-600-a1,$(dir600a1_cmdline),"AP91-AR7240-RT-090223-00") @@ -927,7 +950,7 @@ endef wzrhpag300h_cmdline=board=WZR-HP-AG300H console=ttyS0,115200 define Image/Build/Profile/WZRHPAG300H - $(call Image/Build/Template/$(fs_128k)/$(1),WZRHPG30XNH,wzr-hp-ag300h,$(wzrhpag300h_cmdline),WZR-HP-AG300H) + $(call Image/Build/Template/$(fs_64k)/$(1),WZRHPG30XNH,wzr-hp-ag300h,$(wzrhpag300h_cmdline),WZR-HP-AG300H) endef wzrhpg450h_cmdline=board=WZR-HP-G450H console=ttyS0,115200 @@ -947,7 +970,7 @@ endef all0258n_cmdline=board=ALL0258N console=ttyS0,115200 define Image/Build/Profile/ALL0258N - $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,all0258n,$(all0258n_cmdline),,917504,5505024,KR) + $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,all0258n,$(all0258n_cmdline),,917504,5505024,KRuImage) endef define Image/Build/Profile/Default @@ -993,6 +1016,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/TLWR2543,$(1)) $(call Image/Build/Profile/UBNT,$(1)) $(call Image/Build/Profile/WP543,$(1)) + $(call Image/Build/Profile/WPE72,$(1)) $(call Image/Build/Profile/WNDR3700,$(1)) $(call Image/Build/Profile/AP96,$(1)) $(call Image/Build/Profile/WRT400N,$(1))