rpcd: iwinfo plugin fixes
[openwrt/svn-archive/archive.git] / target / linux / ramips / image / mt7621.mk
1 #
2 # MT7621 Profiles
3 #
4
5 define Build/seama
6 $(STAGING_DIR_HOST)/bin/seama -i $@ $(1)
7 mv $@.seama $@
8 endef
9
10 define Build/seama-seal
11 $(call Build/seama,-s $@.seama $(1))
12 endef
13
14 define Build/ubnt-erx-factory-image
15 if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) ]; then \
16 echo '21001:6' > $(1).compat; \
17 $(TAR) -cf $(1) --transform='s/^.*/compat/' $(1).compat; \
18 \
19 $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \
20 md5sum --binary $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) | awk '{print $$1}'> $(1).md5; \
21 $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp.md5/' $(1).md5; \
22 \
23 echo "dummy" > $(1).rootfs; \
24 $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp/' $(1).rootfs; \
25 \
26 md5sum --binary $(1).rootfs | awk '{print $$1}'> $(1).md5; \
27 $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp.md5/' $(1).md5; \
28 \
29 echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version; \
30 $(TAR) -rf $(1) --transform='s/^.*/version.tmp/' $(1).version; \
31 \
32 $(CP) $(1) $(BIN_DIR)/; \
33 fi
34 endef
35
36 define Device/mt7621
37 DTS := MT7621
38 IMAGE_SIZE := $(ralink_default_fw_size_4M)
39 endef
40 TARGET_DEVICES += mt7621
41
42 define Device/wsr-600
43 DTS := WSR-600
44 IMAGE_SIZE := $(ralink_default_fw_size_16M)
45 endef
46 TARGET_DEVICES += wsr-600
47
48 define Device/re6500
49 DTS := RE6500
50 endef
51 TARGET_DEVICES += re6500
52
53 define Device/wsr-1166
54 DTS := WSR-1166
55 IMAGE/sysupgrade.bin := trx | pad-rootfs
56 IMAGE_SIZE := $(ralink_default_fw_size_16M)
57 endef
58 TARGET_DEVICES += wsr-1166
59
60 define Device/dir-860l-b1
61 DTS := DIR-860L-B1
62 IMAGES += factory.bin
63 KERNEL := kernel-bin | patch-dtb | relocate-kernel | lzma | uImage lzma
64 IMAGE_SIZE := $(ralink_default_fw_size_16M)
65 IMAGE/sysupgrade.bin := \
66 append-kernel | pad-offset 65536 64 | append-rootfs | \
67 seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
68 pad-rootfs | check-size $$$$(IMAGE_SIZE)
69 IMAGE/factory.bin := \
70 append-kernel | pad-offset 65536 64 | append-rootfs | pad-rootfs -x 64 | \
71 seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
72 seama-seal -m "signature=wrgac13_dlink.2013gui_dir860lb" | \
73 check-size $$$$(IMAGE_SIZE)
74 endef
75 TARGET_DEVICES += dir-860l-b1
76
77 define Device/firewrt
78 DTS := FIREWRT
79 IMAGE_SIZE := $(ralink_default_fw_size_16M)
80 endef
81 TARGET_DEVICES += firewrt
82
83 define Device/pbr-m1
84 DTS := PBR-M1
85 IMAGE_SIZE := $(ralink_default_fw_size_16M)
86 endef
87 TARGET_DEVICES += pbr-m1
88
89 define Device/sap-g3200u3
90 DTS := SAP-G3200U3
91 endef
92 TARGET_DEVICES += sap-g3200u3
93
94 define Device/witi
95 DTS := WITI
96 IMAGE_SIZE := $(ralink_default_fw_size_16M)
97 endef
98 TARGET_DEVICES += witi
99
100 define Device/wndr3700v5
101 DTS := WNDR3700V5
102 IMAGE_SIZE := $(ralink_default_fw_size_16M)
103 endef
104 TARGET_DEVICES += wndr3700v5
105
106 define Device/zbt-wg2626
107 DTS := ZBT-WG2626
108 IMAGE_SIZE := $(ralink_default_fw_size_16M)
109 endef
110 TARGET_DEVICES += zbt-wg2626
111
112 define Device/zbt-wg3526
113 DTS := ZBT-WG3526
114 IMAGE_SIZE := $(ralink_default_fw_size_16M)
115 endef
116 TARGET_DEVICES += zbt-wg3526
117
118 define Device/wf-2881
119 DTS := WF-2881
120 BLOCKSIZE := 128KiB
121 PAGESIZE := 2048
122 FILESYSTEMS := squashfs
123 IMAGE_SIZE := 132382720
124 KERNEL := $(KERNEL_DTB) | pad-offset 131072 64 | uImage lzma
125 IMAGE/sysupgrade.bin := append-kernel | append-ubi | check-size $$$$(IMAGE_SIZE)
126 endef
127 TARGET_DEVICES += wf-2881
128
129 define Device/ubnt-erx
130 DTS := UBNT-ERX
131 FILESYSTEMS := squashfs
132 KERNEL_SIZE := 3145728
133 KERNEL := $(KERNEL_DTB) | uImage lzma
134 IMAGES := sysupgrade.tar
135 KERNEL_INITRAMFS := $$(KERNEL) | check-size $$(KERNEL_SIZE) | \
136 ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar
137 IMAGE/sysupgrade.tar := sysupgrade-nand
138 endef
139 TARGET_DEVICES += ubnt-erx
140
141 # FIXME: is this still needed?
142 define Image/Prepare
143 #define Build/Compile
144 rm -rf $(KDIR)/relocate
145 $(CP) ../../generic/image/relocate $(KDIR)
146 $(MAKE) -C $(KDIR)/relocate KERNEL_ADDR=$(KERNEL_LOADADDR) CROSS_COMPILE=$(TARGET_CROSS)
147 $(CP) $(KDIR)/relocate/loader.bin $(KDIR)/loader.bin
148 endef