mvebu: limit image builds to profile selection
[openwrt/staging/mkresin.git] / target / linux / mvebu / image / Makefile
1 #
2 # Copyright (C) 2012-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 JFFS2_BLOCKSIZE = 128k
9
10 include $(TOPDIR)/rules.mk
11 include $(INCLUDE_DIR)/image.mk
12
13 KERNEL_LOADADDR := 0x00008000
14
15 DEVICE_VARS += KERNEL_SIZE
16
17 define Device/Default
18 PROFILES := Default
19 DEVICE_DTS := $(1)
20 BOARD_NAME = $$(DEVICE_DTS)
21 KERNEL_NAME := zImage
22 KERNEL := kernel-bin | append-dtb | uImage none
23 endef
24
25 define Device/UBI
26 IMAGES := sysupgrade.bin
27 IMAGE/sysupgrade.bin := sysupgrade-nand
28 endef
29
30 define Device/UBI-factory
31 $(Device/UBI)
32 IMAGES += factory.img
33 IMAGE/factory.img := append-kernel $$$$(KERNEL_SIZE) | append-ubi | pad-to $$$$(PAGESIZE)
34 endef
35
36 define Device/NAND-128K
37 $(Device/UBI)
38 BLOCKSIZE := 128KiB
39 PAGESIZE := 2048
40 SUBPAGESIZE := 512
41 VID_HDR_OFFSET := 2048
42 endef
43
44 define Device/NAND-256K
45 $(Device/UBI)
46 BLOCKSIZE := 256KiB
47 PAGESIZE := 4096
48 endef
49
50 define Device/NAND-512K
51 $(Device/UBI)
52 BLOCKSIZE := 512KiB
53 PAGESIZE := 4096
54 endef
55
56 define Device/linksys
57 DEVICE_TITLE := Linksys $(1)
58 DEVICE_PACKAGES := kmod-mwlwifi wpad-mini swconfig
59 endef
60
61 define Device/armada-385-linksys
62 $(Device/NAND-128K)
63 $(Device/UBI-factory)
64 KERNEL_SIZE := 6144k
65 endef
66
67 define Device/linksys-wrt1200ac
68 $(call Device/linksys,WRT1200AC (Caiman))
69 $(Device/armada-385-linksys)
70 DEVICE_DTS := armada-385-linksys-caiman
71 endef
72 TARGET_DEVICES += linksys-wrt1200ac
73
74 define Device/linksys-wrt1900acv2
75 $(call Device/linksys,WRT1900ACv2 (Cobra))
76 $(Device/armada-385-linksys)
77 DEVICE_DTS := armada-385-linksys-cobra
78 endef
79 TARGET_DEVICES += linksys-wrt1900acv2
80
81 define Device/linksys-wrt1900acs
82 $(call Device/linksys,WRT1900ACS (Shelby))
83 $(Device/armada-385-linksys)
84 DEVICE_DTS := armada-385-linksys-shelby
85 endef
86 TARGET_DEVICES += linksys-wrt1900acs
87
88 define Device/linksys-wrt1900ac
89 $(call Device/linksys,WRT1900AC (Mamba))
90 DEVICE_DTS := armada-xp-linksys-mamba
91 $(Device/NAND-128K)
92 $(Device/UBI-factory)
93 KERNEL_SIZE := 3072k
94 endef
95 TARGET_DEVICES += linksys-wrt1900ac
96
97 define Device/openblocks-ax3
98 $(Device/UBI-factory)
99 DEVICE_DTS := armada-xp-openblocks-ax3-4
100 BLOCKSIZE := 128KiB
101 PAGESIZE := 1
102 IMAGE/factory.img := append-kernel $$$$(KERNEL_SIZE) | append-ubi
103 DEVICE_TITLE := Plat'Home OpenBlocks AX3
104 endef
105 TARGET_DEVICES += openblocks-ax3
106
107 define Device/armada-385-db-ap
108 $(Device/NAND-256K)
109 $(Device/UBI-factory)
110 KERNEL_SIZE := 8192k
111 DEVICE_TITLE := Marvell Armada 385 DB AP (DB-88F6820-AP)
112 endef
113 TARGET_DEVICES += armada-385-db-ap
114
115 define Device/marvell-nand
116 $(Device/NAND-512K)
117 DEVICE_TITLE := Marvell Armada $(1)
118 endef
119
120 Device/armada-370-db = $(call Device/marvell-nand,370 DB (DB-88F6710-BP-DDR3))
121 Device/armada-370-rd = $(call Device/marvell-nand,370 RD (RD-88F6710-A1))
122 Device/armada-xp-db = $(call Device/marvell-nand,XP DB (DB-78460-BP))
123 Device/armada-xp-gp = $(call Device/marvell-nand,XP GP (DB-MV784MP-GP))
124 TARGET_DEVICES += armada-370-db armada-370-rd armada-xp-db armada-xp-gp
125
126 define Device/armada-388-rd
127 DEVICE_TITLE := Marvell Armada 388 RD (RD-88F6820-AP)
128 IMAGES := firmware.bin
129 IMAGE/firmware.bin := append-kernel 256k | append-rootfs | pad-rootfs
130 endef
131 TARGET_DEVICES += armada-388-rd
132
133 define Device/armada-388-clearfog
134 KERNEL_INSTALL := 1
135 DEVICE_TITLE := SolidRun ClearFog
136 endef
137 TARGET_DEVICES += armada-388-clearfog
138
139 define Device/globalscale-mirabox
140 $(Device/NAND-512K)
141 DEVICE_DTS := armada-370-mirabox
142 DEVICE_TITLE := Globalscale Mirabox
143 endef
144 TARGET_DEVICES += globalscale-mirabox
145
146 $(eval $(call BuildImage))