ramips: move seama build recipe to Makefile
[openwrt/openwrt.git] / target / linux / ramips / image / mt7620.mk
1 #
2 # MT7620A Profiles
3 #
4
5 define Build/tplink-header
6 $(STAGING_DIR_HOST)/bin/mktplinkfw2 -a 0x4 -V "ver. 2.0" -B $(1) \
7 -o $@.new -k $@ && mv $@.new $@
8 endef
9
10 define Build/pad-kernel-ex2700
11 cp $@ $@.tmp && dd if=/dev/zero bs=64 count=1 >> $@.tmp \
12 && dd if=$@.tmp of=$@.new bs=64k conv=sync && truncate -s -64 $@.new \
13 && cat ex2700-fakeroot.uImage >> $@.new && rm $@.tmp && mv $@.new $@
14 endef
15
16 define Build/netgear-header
17 $(STAGING_DIR_HOST)/bin/mkdniimg \
18 $(1) -v OpenWrt -i $@ \
19 -o $@.new && mv $@.new $@
20 endef
21
22 define Build/poray-header
23 mkporayfw $(1) \
24 -f $@ \
25 -o $@.new; \
26 mv $@.new $@
27 endef
28
29 define Build/elecom-header
30 cp $@ $(KDIR)/v_0.0.0.bin
31 ( \
32 $(STAGING_DIR_HOST)/bin/md5sum $(KDIR)/v_0.0.0.bin | \
33 sed 's/ .*//' && \
34 echo 458 \
35 ) | $(STAGING_DIR_HOST)/bin/md5sum | \
36 sed 's/ .*//' > $(KDIR)/v_0.0.0.md5
37 $(STAGING_DIR_HOST)/bin/tar -cf $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5
38 endef
39
40 define Device/ArcherC20i
41 DTS := ArcherC20i
42 KERNEL := $(KERNEL_DTB)
43 KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC20i -c
44 IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC20i -j -r $(KDIR)/root.squashfs
45 DEVICE_TITLE := TP-Link ArcherC20i
46 endef
47 TARGET_DEVICES += ArcherC20i
48
49 define Device/ArcherC50
50 DTS := ArcherC50
51 KERNEL := $(KERNEL_DTB)
52 KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC50 -c
53 IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC50 -j -r $(KDIR)/root.squashfs
54 DEVICE_TITLE := TP-Link ArcherC50
55 endef
56 TARGET_DEVICES += ArcherC50
57
58 define Device/ex2700
59 DTS := EX2700
60 BLOCKSIZE := 4k
61 IMAGE_SIZE := $(ralink_default_fw_size_4M)
62 IMAGES += factory.bin
63 KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700
64 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | netgear-header -B EX2700 -H 29764623+4+0+32+2x2+0
65 DEVICE_TITLE := Netgear EX2700
66 endef
67 TARGET_DEVICES += ex2700
68
69 define Device/wt3020-4M
70 DTS := WT3020-4M
71 BLOCKSIZE := 4k
72 IMAGE_SIZE := $(ralink_default_fw_size_4M)
73 IMAGES += factory.bin
74 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | poray-header -B WT3020 -F 4M
75 DEVICE_TITLE := Nexx WT3020 (4MB)
76 endef
77 TARGET_DEVICES += wt3020-4M
78
79 define Device/wt3020-8M
80 DTS := WT3020-8M
81 IMAGES += factory.bin
82 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | poray-header -B WT3020 -F 8M
83 DEVICE_TITLE := Nexx WT3020 (8MB)
84 endef
85 TARGET_DEVICES += wt3020-8M
86
87 define Device/wrh-300cr
88 DTS := WRH-300CR
89 IMAGE_SIZE := $(ralink_default_fw_size_16M)
90 IMAGES += factory.bin
91 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | elecom-header
92 DEVICE_TITLE := Elecom WRH-300CR
93 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
94 endef
95 TARGET_DEVICES += wrh-300cr
96
97 define Device/e1700
98 DTS := E1700
99 IMAGES += factory.bin
100 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | umedia-header 0x013326
101 DEVICE_TITLE := Linksys E1700
102 endef
103 TARGET_DEVICES += e1700
104
105 define Device/ai-br100
106 DTS := AI-BR100
107 IMAGE_SIZE := 7936k
108 DEVICE_TITLE := Aigale Ai-BR100
109 DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci
110 endef
111 TARGET_DEVICES += ai-br100
112
113 define Device/whr-300hp2
114 DTS := WHR-300HP2
115 IMAGE_SIZE := 6848k
116 DEVICE_TITLE := Buffalo WHR-300HP2
117 endef
118 TARGET_DEVICES += whr-300hp2
119
120 define Device/whr-600d
121 DTS := WHR-600D
122 IMAGE_SIZE := 6848k
123 DEVICE_TITLE := Buffalo WHR-600D
124 endef
125 TARGET_DEVICES += whr-600d
126
127 define Device/whr-1166d
128 DTS := WHR-1166D
129 IMAGE_SIZE := 15040k
130 DEVICE_TITLE := Buffalo WHR-1166D
131 endef
132 TARGET_DEVICES += whr-1166d
133
134 define Device/dir-810l
135 DTS := DIR-810L
136 IMAGE_SIZE := 6720k
137 DEVICE_TITLE := D-Link DIR-810L
138 endef
139 TARGET_DEVICES += dir-810l
140
141 define Device/na930
142 DTS := NA930
143 IMAGE_SIZE := 20m
144 DEVICE_TITLE := Sercomm NA930
145 endef
146 TARGET_DEVICES += na930
147
148 define Device/microwrt
149 DTS := MicroWRT
150 IMAGE_SIZE := 16128k
151 DEVICE_TITLE := Microduino MicroWRT
152 endef
153 TARGET_DEVICES += microwrt
154
155 define Device/mt7620a
156 DTS := MT7620a
157 DEVICE_TITLE := MediaTek MT7620a EVB
158 endef
159 TARGET_DEVICES += mt7620a
160
161 define Device/mt7620a_mt7610e
162 DTS := MT7620a_MT7610e
163 DEVICE_TITLE := MediaTek MT7620a + MT7610e EVB
164 endef
165 TARGET_DEVICES += mt7620a_mt7610e
166
167 define Device/mt7620a_mt7530
168 DTS := MT7620a_MT7530
169 DEVICE_TITLE := MediaTek MT7620a + MT7530 EVB
170 endef
171 TARGET_DEVICES += mt7620a_mt7530
172
173 define Device/mt7620a_v22sg
174 DTS := MT7620a_V22SG
175 DEVICE_TITLE := MediaTek MT7620a V22SG
176 endef
177 TARGET_DEVICES += mt7620a_v22sg
178
179 define Device/rp-n53
180 DTS := RP-N53
181 DEVICE_TITLE := Asus RP-N53
182 endef
183 TARGET_DEVICES += rp-n53
184
185 define Device/cf-wr800n
186 DTS := CF-WR800N
187 DEVICE_TITLE := Comfast CF-WR800N
188 endef
189 TARGET_DEVICES += cf-wr800n
190
191 define Device/cs-qr10
192 DTS := CS-QR10
193 DEVICE_TITLE := Planex CS-QR10
194 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-i2c-core kmod-i2c-ralink kmod-sound-core kmod-sound-mtk kmod-sdhci-mt7620
195 endef
196 TARGET_DEVICES += cs-qr10
197
198 define Device/db-wrt01
199 DTS := DB-WRT01
200 DEVICE_TITLE := Planex DB-WRT01
201 endef
202 TARGET_DEVICES += db-wrt01
203
204 define Device/mzk-750dhp
205 DTS := MZK-750DHP
206 DEVICE_TITLE := Planex MZK-750DHP
207 DEVICE_PACKAGES := kmod-mt76
208 endef
209 TARGET_DEVICES += mzk-750dhp
210
211 define Device/mzk-ex300np
212 DTS := MZK-EX300NP
213 DEVICE_TITLE := Planex MZK-EX300NP
214 endef
215 TARGET_DEVICES += mzk-ex300np
216
217 define Device/mzk-ex750np
218 DTS := MZK-EX750NP
219 DEVICE_TITLE := Planex MZK-EX750NP
220 DEVICE_PACKAGES := kmod-mt76
221 endef
222 TARGET_DEVICES += mzk-ex750np
223
224 define Device/hc5661
225 DTS := HC5661
226 IMAGE_SIZE := $(ralink_default_fw_size_16M)
227 DEVICE_TITLE := HiWiFi HC5661
228 DEVICE_PACKAGES := kmod-usb2 kmod-sdhci kmod-sdhci-mt7620 kmod-ledtrig-usbdev
229 endef
230 TARGET_DEVICES += hc5661
231
232 define Device/hc5761
233 DTS := HC5761
234 IMAGE_SIZE := $(ralink_default_fw_size_16M)
235 DEVICE_TITLE := HiWiFi HC5761
236 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci kmod-sdhci-mt7620 kmod-ledtrig-usbdev
237 endef
238 TARGET_DEVICES += hc5761
239
240 define Device/hc5861
241 DTS := HC5861
242 IMAGE_SIZE := $(ralink_default_fw_size_16M)
243 DEVICE_TITLE := HiWiFi HC5861
244 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci kmod-sdhci-mt7620 kmod-ledtrig-usbdev
245 endef
246 TARGET_DEVICES += hc5861
247
248 define Device/oy-0001
249 DTS := OY-0001
250 IMAGE_SIZE := $(ralink_default_fw_size_16M)
251 DEVICE_TITLE := Oh Yeah OY-0001
252 endef
253 TARGET_DEVICES += oy-0001
254
255 define Device/psg1208
256 DTS := PSG1208
257 DEVICE_TITLE := Phicomm PSG1208
258 DEVICE_PACKAGES := kmod-mt76
259 endef
260 TARGET_DEVICES += psg1208
261
262 define Device/y1
263 DTS := Y1
264 IMAGE_SIZE := $(ralink_default_fw_size_16M)
265 DEVICE_TITLE := Lenovo Y1
266 endef
267 TARGET_DEVICES += y1
268
269 define Device/y1s
270 DTS := Y1S
271 IMAGE_SIZE := $(ralink_default_fw_size_16M)
272 DEVICE_TITLE := Lenovo Y1S
273 endef
274 TARGET_DEVICES += y1s
275
276 define Device/mlw221
277 DTS := MLW221
278 IMAGE_SIZE := $(ralink_default_fw_size_16M)
279 DEVICE_TITLE := Kingston MLW221
280 endef
281 TARGET_DEVICES += mlw221
282
283 define Device/mlwg2
284 DTS := MLWG2
285 IMAGE_SIZE := $(ralink_default_fw_size_16M)
286 DEVICE_TITLE := Kingston MLWG2
287 endef
288 TARGET_DEVICES += mlwg2
289
290 define Device/wmr-300
291 DTS := WMR-300
292 DEVICE_TITLE := Buffalo WMR-300
293 endef
294 TARGET_DEVICES += wmr-300
295
296 define Device/rt-n14u
297 DTS := RT-N14U
298 DEVICE_TITLE := Asus RT-N14u
299 endef
300 TARGET_DEVICES += rt-n14u
301
302 define Device/wrtnode
303 DTS := WRTNODE
304 IMAGE_SIZE := $(ralink_default_fw_size_16M)
305 DEVICE_TITLE := WRTNode
306 endef
307 TARGET_DEVICES += wrtnode
308
309 define Device/miwifi-mini
310 DTS := MIWIFI-MINI
311 IMAGE_SIZE := $(ralink_default_fw_size_16M)
312 DEVICE_TITLE := Xiaomi MiWiFi Mini
313 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
314 endef
315 TARGET_DEVICES += miwifi-mini
316
317 define Device/gl-mt300a
318 DTS := GL-MT300A
319 IMAGE_SIZE := $(ralink_default_fw_size_16M)
320 DEVICE_TITLE := GL-Inet GL-MT300A
321 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
322 endef
323 TARGET_DEVICES += gl-mt300a
324
325 define Device/gl-mt300n
326 DTS := GL-MT300N
327 IMAGE_SIZE := $(ralink_default_fw_size_16M)
328 DEVICE_TITLE := GL-Inet GL-MT300N
329 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
330 endef
331 TARGET_DEVICES += gl-mt300n
332
333 define Device/gl-mt750
334 DTS := GL-MT750
335 IMAGE_SIZE := $(ralink_default_fw_size_16M)
336 DEVICE_TITLE := GL-Inet GL-MT750
337 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76
338 endef
339 TARGET_DEVICES += gl-mt750
340
341 define Device/zte-q7
342 DTS := ZTE-Q7
343 DEVICE_TITLE := ZTE Q7
344 endef
345 TARGET_DEVICES += zte-q7
346
347 define Device/youku-yk1
348 DTS := YOUKU-YK1
349 IMAGE_SIZE := $(ralink_default_fw_size_16M)
350 DEVICE_TITLE := YOUKU YK1
351 endef
352 TARGET_DEVICES += youku-yk1
353
354 define Device/zbt-ape522ii
355 DTS := ZBT-APE522II
356 DEVICE_TITLE := Zbtlink ZBT-APE522II
357 DEVICE_PACKAGES := kmod-mt76
358 endef
359 TARGET_DEVICES += zbt-ape522ii
360
361 define Device/zbt-wa05
362 DTS := ZBT-WA05
363 DEVICE_TITLE := Zbtlink ZBT-WA05
364 endef
365 TARGET_DEVICES += zbt-wa05
366
367 define Device/zbt-we826
368 DTS := ZBT-WE826
369 IMAGE_SIZE := $(ralink_default_fw_size_16M)
370 DEVICE_TITLE := Zbtlink ZBT-WE826
371 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 kmod-sdhci-mt7620
372 endef
373 TARGET_DEVICES += zbt-we826
374
375 define Device/zbt-wr8305rt
376 DTS := ZBT-WR8305RT
377 DEVICE_TITLE := Zbtlink ZBT-WR8305RT
378 endef
379 TARGET_DEVICES += zbt-wr8305rt
380
381 define Device/tiny-ac
382 DTS := TINY-AC
383 DEVICE_TITLE := Dovado Tiny AC
384 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
385 endef
386 TARGET_DEVICES += tiny-ac
387
388 define Device/dch-m225
389 DTS := DCH-M225
390 BLOCKSIZE := 4k
391 IMAGES += factory.bin
392 IMAGE_SIZE := 6848k
393 IMAGE/sysupgrade.bin := \
394 append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \
395 seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
396 pad-rootfs | check-size $$$$(IMAGE_SIZE)
397 IMAGE/factory.bin := \
398 append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
399 append-rootfs | pad-rootfs -x 64 | \
400 seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
401 seama-seal -m "signature=wapn22_dlink.2013gui_dap1320b" | \
402 check-size $$$$(IMAGE_SIZE)
403 DEVICE_TITLE := D-Link DCH-M225
404 DEVICE_PACKAGES := kmod-mt76
405 endef
406 TARGET_DEVICES += dch-m225