Changeset 38150


Ignore:
Timestamp:
2013-09-24T10:14:43+02:00 (4 years ago)
Author:
juhosg
Message:

ar71xx: image: use a common macro for Cameo AP94 based devices

The Image/Build/DIR825B1 and the Image/Build/DLRTDEV macros
are identical. Merge those into a new Image/Build/CameoAP94
macro, and update the device profiles to use the new macro.
Also rename the dir825b1_* mtdlayout macros to cameo_ap94_*.

Signed-off-by: Gabor Juhos <juhosg@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/image/Makefile

    r38149 r38150  
    183183cap4200ag_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),320k(custom)ro,1536k(kernel),12096k(rootfs),2048k(failsafe),64k(art),13632k@0xa0000(firmware) 
    184184db120_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) 
    185 dir825b1_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,6208k(firmware),64k(caldata)ro,1600k(unknown)ro,64k@0x7f0000(caldata_copy) 
    186 dir825b1_mtdlayout_fat=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,7808k(firmware),64k(caldata)ro,64k@0x660000(caldata_orig),6208k@0x50000(firmware_orig) 
     185cameo_ap94_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,6208k(firmware),64k(caldata)ro,1600k(unknown)ro,64k@0x7f0000(caldata_copy) 
     186cameo_ap94_mtdlayout_fat=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,7808k(firmware),64k(caldata)ro,64k@0x660000(caldata_orig),6208k@0x50000(firmware_orig) 
    187187ew-dorin_mtdlayout_4M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),3712k(firmware),64k(art) 
    188188dlrtdev_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,6208k(firmware),64k(caldata)ro,640k(certs),960k(unknown)ro,64k@0x7f0000(caldata_copy) 
     
    235235 
    236236 
    237 define Image/Build/DIR825B1/buildkernel 
    238         $(call MkuImageLzma,$(2),$(3) $(dir825b1_mtdlayout)) 
    239         $(call MkuImageLzma,$(2)-fat,$(3) $(dir825b1_mtdlayout_fat)) 
    240 endef 
    241  
    242 define Image/Build/DIR825B1 
     237define Image/Build/CameoAP94/buildkernel 
     238        $(call MkuImageLzma,$(2),$(3) $(4)) 
     239        $(call MkuImageLzma,$(2)-fat,$(3) $(5)) 
     240endef 
     241 
     242define Image/Build/CameoAP94 
    243243        $(call Sysupgrade/KRuImage,$(1),$(2),65536,5308416) 
    244244        if [ -e "$(call sysupname,$(1),$(2))" ]; then \ 
    245245                ( \ 
    246246                        dd if=$(call sysupname,$(1),$(2)); \ 
    247                         echo -n "$(4)"; \ 
     247                        echo -n "$(6)"; \ 
    248248                ) > $(call imgname,$(1),$(2))-backup-loader.bin; \ 
    249249                if [ `stat -c%s $(call sysupname,$(1),$(2))` -gt 4194304 ]; then \ 
     
    252252                        ( \ 
    253253                                dd if=$(call sysupname,$(1),$(2)) bs=4096k conv=sync; \ 
    254                                 echo -n "$(5)"; \ 
    255                         ) > $(call factoryname,$(1),$(2)); \ 
    256                 fi; \ 
    257         fi 
    258         $(call CatFiles,$(KDIR_TMP)/vmlinux-$(2)-fat.uImage,65536,$(KDIR)/root.$(1),6946816,$(KDIR_TMP)/$(2)-fat.bin) 
    259         if [ -e "$(KDIR_TMP)/$(2)-fat.bin" ]; then \ 
    260                 echo -n "" > $(KDIR_TMP)/$(2)-fat.dummy; \ 
    261                 sh $(TOPDIR)/scripts/combined-image.sh \ 
    262                         "$(KDIR_TMP)/$(2)-fat.bin" \ 
    263                         "$(KDIR_TMP)/$(2)-fat.dummy" \ 
    264                         $(call sysupname,$(1),$(2)-fat); \ 
    265         fi 
    266 endef 
    267  
    268  
    269 define Image/Build/DLRTDEV/buildkernel 
    270         $(call MkuImageLzma,$(2),$(3) $(dlrtdev_mtdlayout)) 
    271         $(call MkuImageLzma,$(2)-fat,$(3) $(dlrtdev_mtdlayout_fat)) 
    272 endef 
    273  
    274 define Image/Build/DLRTDEV 
    275         $(call Sysupgrade/KRuImage,$(1),$(2),65536,5308416) 
    276         if [ -e "$(call sysupname,$(1),$(2))" ]; then \ 
    277                 ( \ 
    278                         dd if=$(call sysupname,$(1),$(2)); \ 
    279                         echo -n "$(4)"; \ 
    280                 ) > $(call imgname,$(1),$(2))-backup-loader.bin; \ 
    281                 if [ `stat -c%s $(call sysupname,$(1),$(2))` -gt 4194304 ]; then \ 
    282                         echo "Warning: $(call sysupname,$(1),$(2)) is too big" >&2; \ 
    283                 else \ 
    284                         ( \ 
    285                                 dd if=$(call sysupname,$(1),$(2)) bs=4096k conv=sync; \ 
    286                                 echo -n "$(5)"; \ 
     254                                echo -n "$(7)"; \ 
    287255                        ) > $(call factoryname,$(1),$(2)); \ 
    288256                fi; \ 
     
    886854$(eval $(call SingleProfile,CyberTAN,64k,WRT160NL,wrt160nl,WRT160NL,ttyS0,115200,1.00.01)) 
    887855 
    888 $(eval $(call SingleProfile,DIR825B1,64k,DIR825B1,dir-825-b1,DIR-825-B1,ttyS0,115200,01AP94-AR7161-RT-080619-00,00AP94-AR7161-RT-080619-00)) 
    889 $(eval $(call SingleProfile,DIR825B1,64k,TEW673GRU,tew-673gru,TEW-673GRU,ttyS0,115200,01AP94-AR7161-RT-080619-01,00AP94-AR7161-RT-080619-01)) 
    890  
    891 $(eval $(call SingleProfile,DLRTDEV,64k,DLRTDEV01,dlrtdev01,DIR-825-B1,ttyS0,115200,01AP94-AR7161-RT-080619-00,00AP94-AR7161-RT-080619-00)) 
     856$(eval $(call SingleProfile,CameoAP94,64k,DIR825B1,dir-825-b1,DIR-825-B1,ttyS0,115200,$$(cameo_ap94_mtdlayout),$$(cameo_ap94_mtdlayout_fat),01AP94-AR7161-RT-080619-00,00AP94-AR7161-RT-080619-00)) 
     857$(eval $(call SingleProfile,CameoAP94,64k,TEW673GRU,tew-673gru,TEW-673GRU,ttyS0,115200,$$(cameo_ap94_mtdlayout),$$(cameo_ap94_mtdlayout_fat),01AP94-AR7161-RT-080619-01,00AP94-AR7161-RT-080619-01)) 
     858$(eval $(call SingleProfile,CameoAP94,64k,DLRTDEV01,dlrtdev01,DIR-825-B1,ttyS0,115200,$$(dlrtdev_mtdlayout),$$(dlrtdev_mtdlayout_fat),01AP94-AR7161-RT-080619-00,00AP94-AR7161-RT-080619-00)) 
    892859 
    893860$(eval $(call SingleProfile,MyLoader,64k,WP543_2M,wp543,,ttyS0,115200,0x200000,2M)) 
Note: See TracChangeset for help on using the changeset viewer.