Changeset 38129


Ignore:
Timestamp:
2013-09-23T11:01:06+02:00 (4 years ago)
Author:
juhosg
Message:

ar71xx: update the Image/Build/Cameo macro

  • append the root squashfs directly to the kernel,
  • use the 64kraw/64kraw-nojffs template instead of 64k/squashfs-only,
  • ensure, that the signature is placed at the correct offset in the *-factory images,
  • ensure that the generated images have enough erase blocks for JFFS2 garbage collection,

Tested on DIR-600-A1 and TEW-632BR devices only.

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

File:
1 edited

Legend:

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

    r38128 r38129  
    362362 
    363363define Image/Build/Cameo 
    364         $(call Sysupgrade/KRuImage,$(1),$(2),$(5),$(6)) 
    365         if [ -e "$(call sysupname,$(1),$(2))" ]; then \ 
     364        $(eval fwsize=$(call mtdpartsize,firmware,$(4))) 
     365        $(call Sysupgrade/KRuImage,$(1),$(2),0,$$$$(($(fwsize)-4*64*1024)),64) 
     366        if [ -e "$(call sysupname,$(1),$(2))" ]; then \ 
     367                factory_size=$$$$(($(fwsize) - $(6))); \ 
    366368                ( \ 
    367                         dd if=$(KDIR_TMP)/vmlinux-$(2).uImage bs=$(5) conv=sync; \ 
    368                         dd if=$(KDIR)/root.$(1) bs=$(6) conv=sync; \ 
    369                         echo -n $(7); \ 
     369                        dd if=$(call sysupname,$(1),$(2)) bs=$$$${factory_size} conv=sync; \ 
     370                        echo -n $(5); \ 
    370371                ) > $(call factoryname,$(1),$(2)); \ 
    371372        fi 
     
    373374 
    374375Image/Build/CameoAP81/buildkernel=$(call MkuImageLzma,$(2),$(3) $(cameo_ap81_mtdlayout)) 
    375 Image/Build/CameoAP81=$(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo_ap81_mtdlayout),65536,2883584,$(4)) 
     376Image/Build/CameoAP81=$(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo_ap81_mtdlayout),$(4),65536) 
    376377Image/Build/CameoAP81/initramfs=$(call MkuImageLzma/initramfs,$(2),$(3) $(cameo_ap81_mtdlayout)) 
    377378 
    378379Image/Build/CameoAP91/buildkernel=$(call MkuImageLzma,$(2),$(3) $(cameo_ap91_mtdlayout)) 
    379 Image/Build/CameoAP91=$(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo_ap91_mtdlayout),65536,2752512,$(4)) 
     380Image/Build/CameoAP91=$(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo_ap91_mtdlayout),$(4),65536) 
    380381Image/Build/CameoAP91/initramfs=$(call MkuImageLzma/initramfs,$(2),$(3) $(cameo_ap91_mtdlayout)) 
    381382 
    382383Image/Build/CameoAP99/buildkernel=$(call MkuImageLzma,$(2),$(3) $(cameo_ap99_mtdlayout)) 
    383 Image/Build/CameoAP99=$(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo_ap99_mtdlayout),65536,2555924,$(4)) 
     384Image/Build/CameoAP99=$(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo_ap99_mtdlayout),$(4),65536) 
    384385Image/Build/CameoAP99/initramfs=$(call MkuImageLzma/initramfs,$(2),$(3) $(cameo_ap99_mtdlayout)) 
    385386 
    386387Image/Build/CameoDB120/buildkernel=$(call MkuImageLzma,$(2),$(3) $(cameo_db120_mtdlayout)) 
    387 Image/Build/CameoDB120=$(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo_db120_mtdlayout),65536,15007718,$(4)) 
     388Image/Build/CameoDB120=$(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo_db120_mtdlayout),$(4),26) 
    388389Image/Build/CameoDB120/initramfs=$(call MkuImageLzma/initramfs,$(2),$(3) $(cameo_db120_mtdlayout)) 
    389390 
     
    824825$(eval $(call BuildTemplate,64k,-64k,64k)) 
    825826$(eval $(call BuildTemplate,64kraw,-raw,64k)) 
     827$(eval $(call BuildTemplate,64kraw-nojffs,-raw)) 
    826828$(eval $(call BuildTemplate,128k,,128k)) 
    827829$(eval $(call BuildTemplate,256k,,256k)) 
     
    854856$(eval $(call SingleProfile,AthLzma,64k,PB92,pb92,PB92,ttyS0,115200,$$(pb92_mtdlayout),917504,2818048,KRuImage)) 
    855857 
    856 $(eval $(call SingleProfile,CameoAP91,64k,DIR600A1,dir-600-a1,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-00")) 
    857 $(eval $(call SingleProfile,CameoAP91,64k,DIR601A1,dir-601-a1,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-02")) 
    858 $(eval $(call SingleProfile,CameoAP91,64k,FR54RTR,fr-54rtr,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-01")) 
    859  
    860 $(eval $(call SingleProfile,CameoAP99,64k,DIR615E4,dir-615-e4,DIR-615-E4,ttyS0,115200,"AP99-AR7240-RT-091105-05")) 
    861  
    862 $(eval $(call SingleProfile,CameoAP81,squashfs-only,A02RBW300N,a02-rb-w300n,TEW-632BRP,ttyS0,115200,"AP81-AR9130-RT-070614-03")) 
    863 $(eval $(call SingleProfile,CameoAP81,squashfs-only,DIR615C1,dir-615-c1,DIR-615-C1,ttyS0,115200,"AP81-AR9130-RT-070614-02")) 
    864 $(eval $(call SingleProfile,CameoAP81,squashfs-only,TEW632BRP,tew-632brp,TEW-632BRP,ttyS0,115200,"AP81-AR9130-RT-070614-00")) 
    865 $(eval $(call SingleProfile,CameoAP81,squashfs-only,TEW652BRP_FW,tew-652brp,TEW-632BRP,ttyS0,115200,"AP81-AR9130-RT-080609-05")) 
    866 $(eval $(call SingleProfile,CameoAP81,squashfs-only,TEW652BRP_RECOVERY,tew-652brp-recovery,TEW-632BRP,ttyS0,115200,"AP81-AR9130-RT-070614-02")) 
     858$(eval $(call SingleProfile,CameoAP91,64kraw,DIR600A1,dir-600-a1,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-00")) 
     859$(eval $(call SingleProfile,CameoAP91,64kraw,DIR601A1,dir-601-a1,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-02")) 
     860$(eval $(call SingleProfile,CameoAP91,64kraw,FR54RTR,fr-54rtr,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-01")) 
     861 
     862$(eval $(call SingleProfile,CameoAP99,64kraw,DIR615E4,dir-615-e4,DIR-615-E4,ttyS0,115200,"AP99-AR7240-RT-091105-05")) 
     863 
     864$(eval $(call SingleProfile,CameoAP81,64kraw-nojffs,A02RBW300N,a02-rb-w300n,TEW-632BRP,ttyS0,115200,"AP81-AR9130-RT-070614-03")) 
     865$(eval $(call SingleProfile,CameoAP81,64kraw-nojffs,DIR615C1,dir-615-c1,DIR-615-C1,ttyS0,115200,"AP81-AR9130-RT-070614-02")) 
     866$(eval $(call SingleProfile,CameoAP81,64kraw-nojffs,TEW632BRP,tew-632brp,TEW-632BRP,ttyS0,115200,"AP81-AR9130-RT-070614-00")) 
     867$(eval $(call SingleProfile,CameoAP81,64kraw-nojffs,TEW652BRP_FW,tew-652brp,TEW-632BRP,ttyS0,115200,"AP81-AR9130-RT-080609-05")) 
     868$(eval $(call SingleProfile,CameoAP81,64kraw-nojffs,TEW652BRP_RECOVERY,tew-652brp-recovery,TEW-632BRP,ttyS0,115200,"AP81-AR9130-RT-070614-02")) 
    867869 
    868870$(eval $(call SingleProfile,CameoAP121,squashfs-only,TEW712BR,tew-712br,TEW-712BR,ttyATH0,115200,"HORNET-RT-TEW712BR-3",1.99,"")) 
     
    870872$(eval $(call SingleProfile,CameoAP121_8M,squashfs-only,DIR505A1,dir-505-a1,DIR-505-A1,ttyATH0,115200,"HORNET-PACKET-DIR505A1-3",1.99.99,"")) 
    871873 
    872 $(eval $(call SingleProfile,CameoDB120,64k,DIR825C1,dir-825-c1,DIR-825-C1,ttyS0,115200,"00DB120AR9344-RT-101214-00")) 
    873 $(eval $(call SingleProfile,CameoDB120,64k,DIR835A1,dir-835-a1,DIR-835-A1,ttyS0,115200,"00DB120AR9344-RT-101214-00")) 
     874$(eval $(call SingleProfile,CameoDB120,64kraw,DIR825C1,dir-825-c1,DIR-825-C1,ttyS0,115200,"00DB120AR9344-RT-101214-00")) 
     875$(eval $(call SingleProfile,CameoDB120,64kraw,DIR835A1,dir-835-a1,DIR-835-A1,ttyS0,115200,"00DB120AR9344-RT-101214-00")) 
    874876 
    875877$(eval $(call SingleProfile,CyberTAN,64k,WRT160NL,wrt160nl,WRT160NL,ttyS0,115200,1.00.01)) 
Note: See TracChangeset for help on using the changeset viewer.