brcm47xx: reorder older entries in image Makefile
[openwrt/openwrt.git] / target / linux / brcm47xx / image / Makefile
1 #
2 # Copyright (C) 2006-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/image.mk
9
10 define Build/Clean
11 $(MAKE) -C lzma-loader clean
12 endef
13
14 define Image/Prepare
15 # Optimized LZMA compression (with dictionary), handled by lzma-loader.
16 cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
17
18 # Less optimal LZMA compression (no dictionary), handled by CFE.
19 $(STAGING_DIR_HOST)/bin/lzma e -so -d16 $(KDIR)/vmlinux > $(KDIR)/vmlinux-nodictionary.lzma
20
21 gzip -nc9 $(KDIR)/vmlinux > $(KDIR)/vmlinux.gz
22 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
23 cat $(KDIR)/vmlinux-initramfs | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux-initramfs.lzma
24 $(STAGING_DIR_HOST)/bin/lzma e -so -d16 $(KDIR)/vmlinux-initramfs > $(KDIR)/vmlinux-initramfs-nodictionary.lzma
25 endif
26 rm -f $(KDIR)/loader.gz
27 $(MAKE) -C lzma-loader \
28 BUILD_DIR="$(KDIR)" \
29 TARGET="$(KDIR)" \
30 clean install
31 echo -ne "\\x00" >> $(KDIR)/loader.gz
32 rm -f $(KDIR)/fs_mark
33 echo -ne '\xde\xad\xc0\xde' > $(KDIR)/fs_mark
34 $(call prepare_generic_squashfs,$(KDIR)/fs_mark)
35 endef
36
37 define trxalign/jffs2-128k
38 -a 0x20000 -f $(KDIR)/root.$(1)
39 endef
40 define trxalign/jffs2-64k
41 -a 0x10000 -f $(KDIR)/root.$(1)
42 endef
43 define trxalign/squashfs
44 -a 1024 -f $(KDIR)/root.$(1) $(if $(2),-f $(2)) -a 0x10000 -A $(KDIR)/fs_mark
45 endef
46
47 #################################################
48 # Images
49 #################################################
50
51 define Build/trx-with-loader
52 $(STAGING_DIR_HOST)/bin/trx \
53 -m 33554432 \
54 -o $@ \
55 -f $(KDIR)/loader.gz \
56 -f $(IMAGE_KERNEL) \
57 $(call trxalign/$(FILESYSTEM),$(FILESYSTEM))
58 endef
59
60 define Build/trx-v2-with-loader
61 $(STAGING_DIR_HOST)/bin/trx \
62 -2 \
63 -m 33554432 \
64 -o $@.new \
65 -f $(KDIR)/loader.gz \
66 -f $(KDIR)/vmlinux.lzma \
67 $(call trxalign/$(FILESYSTEM),$(FILESYSTEM),$@)
68 mv $@.new $@
69 endef
70
71 define Build/trx-without-loader
72 $(STAGING_DIR_HOST)/bin/trx \
73 -m 33554432 \
74 -o $@ \
75 -f $(IMAGE_KERNEL) \
76 $(call trxalign/$(FILESYSTEM),$(FILESYSTEM))
77 endef
78
79 define Build/asus-trx
80 $(STAGING_DIR_HOST)/bin/asustrx -p $(PRODUCTID) -i $@ -o $@.new
81 mv $@.new $@
82 endef
83
84 define Build/edimax-bin
85 $(STAGING_DIR_HOST)/bin/trx2edips $@ $@.new
86 mv $@.new $@
87 endef
88
89 define Build/huawei-bin
90 dd if=/dev/zero of=$@.new bs=92 count=1
91 echo -ne 'HDR0\x08\x00\x00\x00' >> $@.new
92 cat $@ >> $@.new
93 mv $@.new $@
94 endef
95
96 define Build/linksys-bin
97 $(STAGING_DIR_HOST)/bin/addpattern -4 -p $(DEVICE_ID) -v v$(VERSION) $(if $(SERIAL),-s $(SERIAL)) -i $@ -o $@.new
98 mv $@.new $@
99 endef
100
101 define Build/linksys-pattern-partition
102 $(STAGING_DIR_HOST)/bin/addpattern -5 -p $(DEVICE_ID) -v v$(VERSION) $(if $(SERIAL),-s $(SERIAL)) -i /dev/null -o $@
103 endef
104
105 define Build/motorola-bin
106 $(STAGING_DIR_HOST)/bin/motorola-bin -$(MOTOROLA_DEVICE) $@ $@.new
107 mv $@.new $@
108 endef
109
110 define Build/prepend-with-elf
111 mv $@ $@.old
112 dd if=$(KDIR)/loader.elf of=$@ bs=131072 conv=sync
113 cat $@.old >> $@
114 endef
115
116 define Build/tailed-bin
117 echo $(BIN_TAIL) >> $@
118 endef
119
120 define Build/usrobotics-bin
121 $(STAGING_DIR_HOST)/bin/trx2usr $@ $@.new
122 mv $@.new $@
123 endef
124
125 #################################################
126 # Devices
127 #################################################
128
129 DEVICE_VARS += PRODUCTID
130 DEVICE_VARS += DEVICE_ID VERSION SERIAL
131 DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_REGION
132 DEVICE_VARS += MOTOROLA_DEVICE
133 DEVICE_VARS += BIN_TAIL
134
135 define Device/Default
136 KERNEL := kernel-bin
137 IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1).$$(2)
138 KERNEL_NAME = vmlinux.lzma
139 FILESYSTEMS := $(FS_64K)
140 IMAGES := trx
141 IMAGE/trx := trx-with-loader
142 endef
143
144 define Device/standard
145 endef
146
147 define Device/standard-noloader-gz
148 KERNEL_NAME = vmlinux.gz
149 IMAGE/trx := trx-without-loader
150 endef
151
152 define Device/standard-noloader-nodictionarylzma
153 KERNEL_NAME = vmlinux-nodictionary.lzma
154 IMAGE/trx := trx-without-loader
155 endef
156
157 define Device/asus
158 IMAGES := trx
159 IMAGE/trx := trx-with-loader | asus-trx
160 endef
161
162 define Device/linksys
163 IMAGES := bin
164 IMAGE/bin := trx-with-loader | linksys-bin
165 endef
166
167 define Device/motorola
168 IMAGES := bin
169 IMAGE/bin := trx-with-loader | motorola-bin
170 endef
171
172 define Device/netgear
173 IMAGES := chk
174 IMAGE/chk := trx-with-loader | netgear-chk
175 endef
176
177 #################################################
178 # Subtarget generic
179 #################################################
180
181 ifeq ($(SUBTARGET),generic)
182 # BCM4705 with tg3
183 define Device/linksys-wrt300n-v1.1
184 $(Device/linksys)
185 DEVICE_ID := EWC2
186 VERSION := 1.51.2
187 endef
188 TARGET_DEVICES += linksys-wrt300n-v1.1
189
190 define Device/linksys-wrt310n-v1
191 $(Device/linksys)
192 DEVICE_ID := 310N
193 VERSION := 1.0.10
194 endef
195 TARGET_DEVICES += linksys-wrt310n-v1
196
197 define Device/linksys-wrt350n-v1
198 $(Device/linksys)
199 DEVICE_ID := EWCG
200 VERSION := 1.04.1
201 endef
202 TARGET_DEVICES += linksys-wrt350n-v1
203
204 define Device/linksys-wrt610n-v1
205 $(Device/linksys)
206 DEVICE_ID := 610N
207 VERSION := 1.0.1
208 endef
209 TARGET_DEVICES += linksys-wrt610n-v1
210
211 # BCMA SoC with SSB WiFi
212 define Device/linksys-wrt610n-v2
213 $(Device/linksys)
214 DEVICE_ID := 610N
215 VERSION := 2.0.0
216 endef
217 TARGET_DEVICES += linksys-wrt610n-v2
218
219 define Device/linksys-e3000-v1
220 $(Device/linksys)
221 DEVICE_ID := 61XN
222 VERSION := 1.0.3
223 endef
224 TARGET_DEVICES += linksys-e3000-v1
225
226 TARGET_DEVICES += standard
227 endif
228
229 #################################################
230 # Subtarget legacy
231 #################################################
232
233 ifeq ($(SUBTARGET),legacy)
234
235 define Device/asus-wl-300g
236 $(Device/asus)
237 PRODUCTID := "WL300g "
238 endef
239 TARGET_DEVICES += asus-wl-300g
240
241 define Device/asus-wl-320gp
242 $(Device/asus)
243 PRODUCTID := "WL320gP "
244 endef
245 TARGET_DEVICES += asus-wl-320gp
246
247 define Device/asus-wl-330ge
248 $(Device/asus)
249 PRODUCTID := "WL-330gE "
250 endef
251 TARGET_DEVICES += asus-wl-330ge
252
253 define Device/asus-wl-500gp-v1
254 $(Device/asus)
255 PRODUCTID := "WL500gp "
256 endef
257 TARGET_DEVICES += asus-wl-500gp-v1
258
259 define Device/asus-wl-500gp-v2
260 $(Device/asus)
261 PRODUCTID := "WL500gpv2 "
262 endef
263 TARGET_DEVICES += asus-wl-500gp-v2
264
265 define Device/asus-wl-500w
266 $(Device/asus)
267 PRODUCTID := "WL500W "
268 endef
269 TARGET_DEVICES += asus-wl-500w
270
271 define Device/asus-wl-520gu
272 $(Device/asus)
273 PRODUCTID := "WL520gu "
274 endef
275 TARGET_DEVICES += asus-wl-520gu
276
277 define Device/asus-wl-550ge
278 $(Device/asus)
279 PRODUCTID := "WL550gE "
280 endef
281 TARGET_DEVICES += asus-wl-550ge
282
283 define Device/asus-wl-hdd25
284 $(Device/asus)
285 PRODUCTID := "WLHDD "
286 endef
287 TARGET_DEVICES += asus-wl-hdd25
288
289 define Device/dlink-dwl-3150
290 IMAGES := bin
291 IMAGE/bin := trx-with-loader | tailed-bin
292 BIN_TAIL := BCM-5352-2050-0000000-01
293 endef
294 TARGET_DEVICES += dlink-dwl-3150
295
296 define Device/edimax-ps1208-mfg
297 IMAGES := bin
298 IMAGE/bin := trx-with-loader | edimax-bin
299 endef
300 TARGET_DEVICES += edimax-ps1208-mfg
301
302 define Device/huawei-e970
303 KERNEL_NAME = vmlinux.gz
304 IMAGES := bin
305 IMAGE/bin := trx-without-loader | huawei-bin
306 endef
307 TARGET_DEVICES += huawei-e970
308
309 define Device/linksys-wrt54g3g
310 $(Device/linksys)
311 DEVICE_ID := W54F
312 VERSION := 2.20.1
313 endef
314 TARGET_DEVICES += linksys-wrt54g3g
315
316 define Device/linksys-wrt54g3g-em
317 $(Device/linksys)
318 DEVICE_ID := W3GN
319 VERSION := 2.20.1
320 endef
321 TARGET_DEVICES += linksys-wrt54g3g-em
322
323 define Device/linksys-wrt54g3gv2-vf
324 FILESYSTEMS := $(FS_128K)
325 IMAGES := noheader.bin bin
326 IMAGE/noheader.bin := linksys-pattern-partition | trx-v2-with-loader
327 IMAGE/bin := linksys-pattern-partition | trx-v2-with-loader | linksys-bin
328 DEVICE_ID := 3G2V
329 VERSION := 3.00.24
330 SERIAL := 6
331 endef
332 TARGET_DEVICES += linksys-wrt54g3gv2-vf
333
334 define Device/linksys-wrt54g
335 $(Device/linksys)
336 DEVICE_ID := W54G
337 VERSION := 4.71.1
338 endef
339 TARGET_DEVICES += linksys-wrt54g
340
341 define Device/linksys-wrt54gs
342 $(Device/linksys)
343 FILESYSTEMS := $(FS_128K)
344 DEVICE_ID := W54S
345 VERSION := 4.80.1
346 endef
347 TARGET_DEVICES += linksys-wrt54gs
348
349 define Device/linksys-wrt54gs-v4
350 $(Device/linksys)
351 DEVICE_ID := W54s
352 VERSION := 1.09.1
353 endef
354 TARGET_DEVICES += linksys-wrt54gs-v4
355
356 define Device/linksys-wrtsl54gs
357 $(Device/linksys)
358 FILESYSTEMS := $(FS_128K)
359 DEVICE_ID := W54U
360 VERSION := 2.08.1
361 endef
362 TARGET_DEVICES += linksys-wrtsl54gs
363
364 define Device/linksys-wrt150n
365 $(Device/linksys)
366 DEVICE_ID := N150
367 VERSION := 1.51.3
368 endef
369 TARGET_DEVICES += linksys-wrt150n
370
371 define Device/linksys-wrt160n-v1
372 $(Device/linksys)
373 DEVICE_ID := N150
374 VERSION := 1.50.1
375 endef
376 TARGET_DEVICES += linksys-wrt160n-v1
377
378 define Device/linksys-wrt300n-v1
379 $(Device/linksys)
380 IMAGES := bin trx
381 DEVICE_ID := EWCB
382 VERSION := 1.03.6
383 endef
384 TARGET_DEVICES += linksys-wrt300n-v1
385
386 define Device/motorola-wa840g
387 $(Device/motorola)
388 MOTOROLA_DEVICE := 2
389 endef
390 TARGET_DEVICES += motorola-wa840g
391
392 define Device/motorola-we800g
393 $(Device/motorola)
394 MOTOROLA_DEVICE := 3
395 endef
396 TARGET_DEVICES += motorola-we800g
397
398 define Device/motorola-wr850g
399 $(Device/motorola)
400 MOTOROLA_DEVICE := 1
401 endef
402 TARGET_DEVICES += motorola-wr850g
403
404 define Device/netgear-wgr614-v8
405 $(Device/netgear)
406 NETGEAR_BOARD_ID := U12H072T00_NETGEAR
407 NETGEAR_REGION := 2
408 endef
409 TARGET_DEVICES += netgear-wgr614-v8
410
411 define Device/netgear-wgt634u
412 FILESYSTEMS := $(FS_128K)
413 IMAGES := bin
414 IMAGE/bin := trx-with-loader | prepend-with-elf
415 endef
416 TARGET_DEVICES += netgear-wgt634u
417
418 define Device/netgear-wndr3300-v1
419 $(Device/netgear)
420 NETGEAR_BOARD_ID := U12H093T00_NETGEAR
421 NETGEAR_REGION := 2
422 endef
423 TARGET_DEVICES += netgear-wndr3300-v1
424
425 define Device/netgear-wnr834b-v2
426 $(Device/netgear)
427 NETGEAR_BOARD_ID := U12H081T00_NETGEAR
428 NETGEAR_REGION := 2
429 endef
430 TARGET_DEVICES += netgear-wnr834b-v2
431
432 define Device/usrobotics-usr5461
433 IMAGES := bin
434 IMAGE/bin := trx-with-loader | usrobotics-bin
435 endef
436 TARGET_DEVICES += usrobotics-usr5461
437
438 TARGET_DEVICES += standard standard-noloader-gz
439 endif
440
441 #################################################
442 # Subtarget mips74k
443 #################################################
444
445 ifeq ($(SUBTARGET),mips74k)
446 define Device/asus-rt-ac53u
447 $(Device/asus)
448 PRODUCTID := RT-AC53U
449 endef
450 TARGET_DEVICES += asus-rt-ac53u
451
452 define Device/asus-rt-ac66u
453 $(Device/asus)
454 PRODUCTID := RT-AC66U
455 endef
456 # TARGET_DEVICES += asus-rt-ac66u
457
458 define Device/asus-rt-n10
459 $(Device/asus)
460 PRODUCTID := "RT-N10 "
461 endef
462 TARGET_DEVICES += asus-rt-n10
463
464 define Device/asus-rt-n10p
465 $(Device/asus)
466 PRODUCTID := RT-N10P
467 endef
468 TARGET_DEVICES += asus-rt-n10p
469
470 define Device/asus-rt-n10p-v2
471 $(Device/asus)
472 PRODUCTID := RT-N10PV2
473 endef
474 TARGET_DEVICES += asus-rt-n10p-v2
475
476 define Device/asus-rt-n10u
477 $(Device/asus)
478 PRODUCTID := RT-N10U
479 endef
480 TARGET_DEVICES += asus-rt-n10u
481
482 define Device/asus-rt-n10u-b
483 $(Device/asus)
484 PRODUCTID := RT-N10U
485 endef
486 TARGET_DEVICES += asus-rt-n10u-b
487
488 define Device/asus-rt-n12
489 $(Device/asus)
490 PRODUCTID := "RT-N12 "
491 endef
492 TARGET_DEVICES += asus-rt-n12
493
494 define Device/asus-rt-n12-b1
495 $(Device/asus)
496 PRODUCTID := RT-N12B1
497 endef
498 TARGET_DEVICES += asus-rt-n12-b1
499
500 define Device/asus-rt-n12-c1
501 $(Device/asus)
502 PRODUCTID := RT-N12C1
503 endef
504 TARGET_DEVICES += asus-rt-n12-c1
505
506 define Device/asus-rt-n12-d1
507 $(Device/asus)
508 PRODUCTID := RT-N12D1
509 endef
510 TARGET_DEVICES += asus-rt-n12-d1
511
512 define Device/asus-rt-n12hp
513 $(Device/asus)
514 PRODUCTID := RT-N12HP
515 endef
516 TARGET_DEVICES += asus-rt-n12hp
517
518 define Device/asus-rt-n14uhp
519 $(Device/asus)
520 PRODUCTID := RT-N14UHP
521 endef
522 TARGET_DEVICES += asus-rt-n14uhp
523
524 define Device/asus-rt-n15u
525 $(Device/asus)
526 PRODUCTID := RT-N15U
527 endef
528 TARGET_DEVICES += asus-rt-n15u
529
530 define Device/asus-rt-n16
531 $(Device/asus)
532 PRODUCTID := RT-N16
533 endef
534 TARGET_DEVICES += asus-rt-n16
535
536 define Device/asus-rt-n53
537 $(Device/asus)
538 PRODUCTID := RT-N53
539 endef
540 TARGET_DEVICES += asus-rt-n53
541
542 define Device/asus-rt-n66u
543 $(Device/asus)
544 PRODUCTID := RT-N66U
545 endef
546 TARGET_DEVICES += asus-rt-n66u
547
548 define Device/asus-rt-n66w
549 $(Device/asus)
550 PRODUCTID := RT-N66U
551 endef
552 TARGET_DEVICES += asus-rt-n66w
553
554 define Device/linksys-wrt160n-v3
555 $(Device/linksys)
556 DEVICE_ID := N150
557 VERSION := 3.0.3
558 endef
559 TARGET_DEVICES += linksys-wrt160n-v3
560
561 define Device/linksys-wrt310n-v2
562 $(Device/linksys)
563 DEVICE_ID := 310N
564 VERSION := 2.0.1
565 endef
566 TARGET_DEVICES += linksys-wrt310n-v2
567
568 define Device/linksys-wrt320n-v1
569 $(Device/linksys)
570 DEVICE_ID := 320N
571 VERSION := 1.0.5
572 endef
573 TARGET_DEVICES += linksys-wrt320n-v1
574
575 define Device/linksys-e900-v1
576 $(Device/linksys)
577 DEVICE_ID := E900
578 VERSION := 1.0.4
579 endef
580 TARGET_DEVICES += linksys-e900-v1
581
582 define Device/linksys-e1000-v1-v2-v2.1
583 $(Device/linksys)
584 DEVICE_ID := E100
585 VERSION := 1.1.3
586 endef
587 TARGET_DEVICES += linksys-e1000-v1-v2-v2.1
588
589 define Device/linksys-e1200-v1
590 $(Device/linksys)
591 DEVICE_ID := E120
592 VERSION := 1.0.3
593 endef
594 TARGET_DEVICES += linksys-e1200-v1
595
596 define Device/linksys-e1200-v2
597 $(Device/linksys)
598 DEVICE_ID := E122
599 VERSION := 1.0.4
600 endef
601 TARGET_DEVICES += linksys-e1200-v2
602
603 define Device/linksys-e1500-v1
604 $(Device/linksys)
605 DEVICE_ID := E150
606 VERSION := 1.0.5
607 endef
608 TARGET_DEVICES += linksys-e1500-v1
609
610 define Device/linksys-e1550-v1
611 $(Device/linksys)
612 DEVICE_ID := 1550
613 VERSION := 1.0.3
614 endef
615 TARGET_DEVICES += linksys-e1550-v1
616
617 define Device/linksys-e2000-v1
618 $(Device/linksys)
619 DEVICE_ID := 32XN
620 VERSION := 1.0.4
621 endef
622 TARGET_DEVICES += linksys-e2000-v1
623
624 define Device/linksys-e2500-v1
625 $(Device/linksys)
626 DEVICE_ID := E25X
627 VERSION := 1.0.7
628 endef
629 TARGET_DEVICES += linksys-e2500-v1
630
631 define Device/linksys-e2500-v2
632 $(Device/linksys)
633 DEVICE_ID := E25X
634 VERSION := 2.0.0
635 endef
636 TARGET_DEVICES += linksys-e2500-v2
637
638 define Device/linksys-e2500-v2.1
639 $(Device/linksys)
640 DEVICE_ID := 25RU
641 VERSION := 2.1.0
642 endef
643 TARGET_DEVICES += linksys-e2500-v2.1
644
645 define Device/linksys-e2500-v3
646 $(Device/linksys)
647 DEVICE_ID := 25V3
648 VERSION := 3.0.0
649 endef
650 TARGET_DEVICES += linksys-e2500-v3
651
652 define Device/linksys-e3200-v1
653 $(Device/linksys)
654 DEVICE_ID := 3200
655 VERSION := 1.0.1
656 endef
657 TARGET_DEVICES += linksys-e3200-v1
658
659 define Device/linksys-e4200-v1
660 $(Device/linksys)
661 DEVICE_ID := 4200
662 VERSION := 1.0.5
663 endef
664 TARGET_DEVICES += linksys-e4200-v1
665
666 define Device/netgear-wgr614-v10_north-america
667 $(Device/netgear)
668 NETGEAR_BOARD_ID := U12H139T01_NETGEAR
669 NETGEAR_REGION := 2
670 endef
671 TARGET_DEVICES += netgear-wgr614-v10_north-america
672
673 define Device/netgear-wgr614-v10_other-regions
674 $(Device/netgear)
675 NETGEAR_BOARD_ID := U12H139T01_NETGEAR
676 NETGEAR_REGION := 1
677 endef
678 TARGET_DEVICES += netgear-wgr614-v10_other-regions
679
680 define Device/netgear-wn2500rp-v1
681 $(Device/netgear)
682 NETGEAR_BOARD_ID := U12H197T00_NETGEAR
683 NETGEAR_REGION := 1
684 endef
685 TARGET_DEVICES += netgear-wn2500rp-v1
686
687 define Device/netgear-wndr3400-v1
688 $(Device/netgear)
689 NETGEAR_BOARD_ID := U12H155T00_NETGEAR
690 NETGEAR_REGION := 2
691 endef
692 TARGET_DEVICES += netgear-wndr3400-v1
693
694 define Device/netgear-wndr3400-v2
695 $(Device/netgear)
696 NETGEAR_BOARD_ID := U12H187T00_NETGEAR
697 NETGEAR_REGION := 2
698 endef
699 TARGET_DEVICES += netgear-wndr3400-v2
700
701 define Device/netgear-wndr3400-v3
702 $(Device/netgear)
703 NETGEAR_BOARD_ID := U12H208T00_NETGEAR
704 NETGEAR_REGION := 1
705 endef
706 TARGET_DEVICES += netgear-wndr3400-v3
707
708 define Device/netgear-wndr3700-v3
709 $(Device/netgear)
710 NETGEAR_BOARD_ID := U12H194T00_NETGEAR
711 NETGEAR_REGION := 2
712 endef
713 TARGET_DEVICES += netgear-wndr3700-v3
714
715 define Device/netgear-wndr3400-vcna
716 $(Device/netgear)
717 NETGEAR_BOARD_ID := U12H155T01_NETGEAR
718 NETGEAR_REGION := 2
719 endef
720 # TARGET_DEVICES += netgear-wndr3400-vcna
721
722 define Device/netgear-wndr4000
723 $(Device/netgear)
724 NETGEAR_BOARD_ID := U12H181T00_NETGEAR
725 NETGEAR_REGION := 2
726 endef
727 TARGET_DEVICES += netgear-wndr4000
728
729 define Device/netgear-wnr1000-v3
730 $(Device/netgear)
731 NETGEAR_BOARD_ID := U12H139T00_NETGEAR
732 NETGEAR_REGION := 2
733 endef
734 TARGET_DEVICES += netgear-wnr1000-v3
735
736 define Device/netgear-wnr2000v2
737 $(Device/netgear)
738 NETGEAR_BOARD_ID := U12H114T00_NETGEAR
739 NETGEAR_REGION := 2
740 endef
741 TARGET_DEVICES += netgear-wnr2000v2
742
743 define Device/netgear-wnr3000rp
744 $(Device/netgear)
745 NETGEAR_BOARD_ID := U12H163T01_NETGEAR
746 NETGEAR_REGION := 1
747 endef
748 TARGET_DEVICES += netgear-wnr3000rp
749
750 define Device/netgear-wnr3500l-v1-north-america
751 $(Device/netgear)
752 NETGEAR_BOARD_ID := U12H136T99_NETGEAR
753 NETGEAR_REGION := 2
754 endef
755 TARGET_DEVICES += netgear-wnr3500l-v1-north-america
756
757 define Device/netgear-wnr3500l-v1-other-regions
758 $(Device/netgear)
759 NETGEAR_BOARD_ID := U12H136T99_NETGEAR
760 NETGEAR_REGION := 1
761 endef
762 TARGET_DEVICES += netgear-wnr3500l-v1-other-regions
763
764 define Device/netgear-wnr3500l-v2
765 $(Device/netgear)
766 NETGEAR_BOARD_ID := U12H172T00_NETGEAR
767 NETGEAR_REGION := 1
768 endef
769 TARGET_DEVICES += netgear-wnr3500l-v2
770
771 define Device/netgear-wnr3500u
772 $(Device/netgear)
773 NETGEAR_BOARD_ID := U12H136T00_NETGEAR
774 NETGEAR_REGION := 2
775 endef
776 # TARGET_DEVICES += netgear-wnr3500u
777
778 define Device/netgear-wnr3500-v2
779 $(Device/netgear)
780 NETGEAR_BOARD_ID := U12H127T00_NETGEAR
781 NETGEAR_REGION := 2
782 endef
783 TARGET_DEVICES += netgear-wnr3500-v2
784
785 define Device/netgear-wnr3500-v2-vc
786 $(Device/netgear)
787 NETGEAR_BOARD_ID := U12H127T70_NETGEAR
788 NETGEAR_REGION := 2
789 endef
790 # TARGET_DEVICES += netgear-wnr3500-v2-vc
791
792 TARGET_DEVICES += standard standard-noloader-nodictionarylzma
793 endif
794
795 #################################################
796 # Shared BuildImage defines
797 #################################################
798
799 define Image/Build/Initramfs
800 $(STAGING_DIR_HOST)/bin/trx \
801 -m 33554432 \
802 -o $(BIN_DIR)/$(IMG_PREFIX)-initramfs.trx \
803 -f $(KDIR)/loader.gz \
804 -f $(KDIR)/vmlinux-initramfs.lzma
805 $(STAGING_DIR_HOST)/bin/trx \
806 -m 33554432 \
807 -o $(BIN_DIR)/$(IMG_PREFIX)-initramfs-noloader-nodictionary.trx \
808 -f $(KDIR)/vmlinux-initramfs-nodictionary.lzma
809 endef
810
811 # $(1): filesystem type.
812 define Image/Build
813 # TODO: Move it to Device/*
814 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
815 $(call Image/Build/Initramfs)
816 endif
817 endef
818
819 $(eval $(call BuildImage))