Ignore:
Timestamp:
2011-06-01T00:53:47+02:00 (6 years ago)
Author:
juhosg
Message:

ar71xx: build images for the AP121 boards

File:
1 edited

Legend:

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

    r27053 r27070  
    275275                ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \ 
    276276        fi 
     277endef 
     278 
     279define Image/Build/AP121 
     280        $(call PatchKernelLzma,$(2),$(3) $($(4))) 
     281        $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(KDIR)/vmlinux-$(2).uImage) 
     282        if [ `stat -c%s $(KDIR)/vmlinux-$(2).uImage` -gt $(5) ]; then \ 
     283                echo "Warning: $(KDIR)/vmlinux-$(2).uImage is too big"; \ 
     284        elif [ `stat -c%s $(BIN_DIR)/$(IMG_PREFIX)-root.$(1)` -gt $(6) ]; then \ 
     285                echo "Warning: $(KDIR)/root.$(1) is too big"; \ 
     286        else \ 
     287                cp $(KDIR)/vmlinux-$(2).uImage $(call imgname,kernel,$(2)).bin; \ 
     288                cp $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) $(call imgname,$(1),$(2)-rootfs).bin; \ 
     289                ( \ 
     290                        dd if=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=$(6) conv=sync; \ 
     291                        dd if=$(KDIR)/vmlinux-$(2).uImage; \ 
     292                ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \ 
     293        fi 
     294endef 
     295 
     296define Image/Build/AP121/initramfs 
     297        $(call PatchKernelLzma,$(2),$(3) $($(4))) 
     298        $(call MkImageLzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(call imgname,$(1),$(2))-uImage.bin) 
    277299endef 
    278300 
     
    498520endef 
    499521 
     522ap121_cmdline=board=AP121 console=ttyATH0,115200 
     523ap121_mtdlayout=mtdparts=spi0.0:64k(u-boot)ro,1216k(rootfs),704k(kernel),64k(art)ro,1920k@0x10000(firmware) 
     524define Image/Build/Profile/AP121 
     525        $(call Image/Build/Template/$(fs_4k)/$(1),AP121,ap121,$(ap121_cmdline),ap121_mtdlayout,720896,1245184) 
     526endef 
     527 
     528ap121_mini_cmdline=board=AP121-MINI console=ttyATH0,115200 
     529ap121_mini_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,2752k(rootfs),896k(kernel),64k(nvram),64k(art)ro,3648k@0x50000(firmware) 
     530define Image/Build/Profile/AP121MINI 
     531        $(call Image/Build/Template/$(fs_4k)/$(1),AP121,ap121-mini,$(ap121_mini_cmdline),ap121_mini_mtdlayout,917504,2818048) 
     532endef 
     533 
    500534ap81_cmdline=board=AP81 console=ttyS0,115200 
    501535define Image/Build/Profile/AP81 
     
    758792 
    759793define Image/Build/Profile/Default 
     794        $(call Image/Build/Profile/AP121,$(1)) 
     795        $(call Image/Build/Profile/AP121MINI,$(1)) 
    760796        $(call Image/Build/Profile/AP81,$(1)) 
    761797        $(call Image/Build/Profile/AP83,$(1)) 
Note: See TracChangeset for help on using the changeset viewer.