5 DEVICE_VARS
+= TPLINK_BOARD_ID TPLINK_HEADER_VERSION TPLINK_HWID TPLINK_HWREV
7 define Build
/ubnt-erx-factory-image
8 if
[ -e
$(KDIR
)/tmp
/$(KERNEL_INITRAMFS_IMAGE
) -a
"$$(stat -c%s $@)" -lt
"$(KERNEL_SIZE)" ]; then \
9 echo
'21001:6' > $(1).compat
; \
10 $(TAR
) -cf
$(1) --transform
='s/^.*/compat/' $(1).compat
; \
12 $(TAR
) -rf
$(1) --transform
='s/^.*/vmlinux.tmp/' $(KDIR
)/tmp
/$(KERNEL_INITRAMFS_IMAGE
); \
13 mkhash md5
$(KDIR
)/tmp
/$(KERNEL_INITRAMFS_IMAGE
) > $(1).md5
; \
14 $(TAR
) -rf
$(1) --transform
='s/^.*/vmlinux.tmp.md5/' $(1).md5
; \
16 echo
"dummy" > $(1).rootfs
; \
17 $(TAR
) -rf
$(1) --transform
='s/^.*/squashfs.tmp/' $(1).rootfs
; \
19 mkhash md5
$(1).rootfs
> $(1).md5
; \
20 $(TAR
) -rf
$(1) --transform
='s/^.*/squashfs.tmp.md5/' $(1).md5
; \
22 echo
'$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version
; \
23 $(TAR
) -rf
$(1) --transform
='s/^.*/version.tmp/' $(1).version
; \
25 $(CP
) $(1) $(BIN_DIR
)/; \
27 echo
"WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
33 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
34 DEVICE_TITLE
:= WeVO
11AC NAS Router
35 DEVICE_PACKAGES
:= kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
37 TARGET_DEVICES
+= 11acnas
39 define Device
/dir-860l-b1
43 KERNEL
:= kernel-bin | patch-dtb | relocate-kernel | lzma | uImage lzma
44 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
45 IMAGE
/sysupgrade.bin
:= \
46 append-kernel | pad-offset
$$$$(BLOCKSIZE
) 64 | append-rootfs | \
47 seama
-m
"dev=/dev/mtdblock/2" -m
"type=firmware" | \
48 pad-rootfs | append-metadata | check-size
$$$$(IMAGE_SIZE
)
49 IMAGE
/factory.bin
:= \
50 append-kernel | pad-offset
$$$$(BLOCKSIZE
) 64 | \
51 append-rootfs | pad-rootfs
-x
64 | \
52 seama
-m
"dev=/dev/mtdblock/2" -m
"type=firmware" | \
53 seama-seal
-m
"signature=wrgac13_dlink.2013gui_dir860lb" | \
54 check-size
$$$$(IMAGE_SIZE
)
55 DEVICE_TITLE
:= D-Link DIR-860L B1
56 DEVICE_PACKAGES
:= kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
58 TARGET_DEVICES
+= dir-860l-b1
62 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
63 DEVICE_TITLE
:= AFOUNDRY EW1200
65 kmod-ata-core kmod-ata-ahci kmod-mt76x2 kmod-mt7603 kmod-usb3 \
66 kmod-usb-ledtrig-usbport wpad-mini
68 TARGET_DEVICES
+= ew1200
72 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
73 DEVICE_TITLE
:= Firefly FireWRT
74 DEVICE_PACKAGES
:= kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
76 TARGET_DEVICES
+= firewrt
80 DEVICE_TITLE
:= GnuBee Personal Cloud One
81 DEVICE_PACKAGES
:= kmod-ata-core kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
82 IMAGE_SIZE
:= $(ralink_default_fw_size_32M
)
84 TARGET_DEVICES
+= gb-pc1
90 KERNEL_SIZE
:= 2097152
92 IMAGE_SIZE
:= $(ralink_default_fw_size_32M
)
94 IMAGE
/sysupgrade.bin
:= sysupgrade-tar | append-metadata
95 IMAGE
/factory.bin
:= append-kernel | pad-to
$$(KERNEL_SIZE
) | append-ubi | check-size
$$$$(IMAGE_SIZE
)
96 DEVICE_TITLE
:= HiWiFi HC5962
97 DEVICE_PACKAGES
:= kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-mini
99 TARGET_DEVICES
+= hc5962
103 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
104 DEVICE_TITLE
:= Phicomm K2P
106 TARGET_DEVICES
+= k2p
111 IMAGE_SIZE
:= $(ralink_default_fw_size_4M
)
112 DEVICE_TITLE
:= MediaTek MT7621 EVB
114 TARGET_DEVICES
+= mt7621
116 define Device
/newifi-d1
118 IMAGE_SIZE
:= $(ralink_default_fw_size_32M
)
119 DEVICE_TITLE
:= Newifi D1
121 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
123 TARGET_DEVICES
+= newifi-d1
127 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
128 DEVICE_TITLE
:= PBR-M1
130 kmod-ata-core kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
131 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
133 TARGET_DEVICES
+= pbr-m1
140 KERNEL
:= $(KERNEL_DTB
) | uImage lzma
143 IMAGES
:= sysupgrade.
tar kernel.bin rootfs.bin
144 IMAGE
/sysupgrade.
tar := sysupgrade-tar | append-metadata
145 IMAGE
/kernel.bin
:= append-kernel
146 IMAGE
/rootfs.bin
:= append-ubi | check-size
$$$$(IMAGE_SIZE
)
147 DEVICE_TITLE
:= Netgear R6220
149 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
151 TARGET_DEVICES
+= r6220
153 define Device
/rb750gr3
155 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
156 DEVICE_TITLE
:= MikroTik RB750Gr3
157 DEVICE_PACKAGES
:= kmod-usb3 uboot-envtools
159 TARGET_DEVICES
+= rb750gr3
161 define Device
/re350-v1
163 DEVICE_TITLE
:= TP-LINK RE350 v1
164 DEVICE_PACKAGES
:= kmod-mt7603 kmod-mt76x2 wpad-mini
165 TPLINK_BOARD_ID
:= RE350-V1
168 TPLINK_HEADER_VERSION
:= 1
170 KERNEL
:= $(KERNEL_DTB
) | tplink-v1-header
-e
171 IMAGES
:= sysupgrade.bin factory.bin
172 IMAGE
/sysupgrade.bin
:= append-rootfs | tplink-safeloader sysupgrade | append-metadata | check-size
$$$$(IMAGE_SIZE
)
173 IMAGE
/factory.bin
:= append-rootfs | tplink-safeloader factory
175 TARGET_DEVICES
+= re350-v1
179 DEVICE_TITLE
:= Linksys RE6500
180 DEVICE_PACKAGES
:= kmod-mt76x2 wpad-mini
182 TARGET_DEVICES
+= re6500
184 define Device
/sap-g3200u3
186 DEVICE_TITLE
:= STORYLiNK SAP-G3200U3
187 DEVICE_PACKAGES
:= kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
189 TARGET_DEVICES
+= sap-g3200u3
193 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
194 DEVICE_TITLE
:= SamKnows Whitebox
8
196 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport \
197 uboot-envtools wpad-mini
199 TARGET_DEVICES
+= sk-wb8
201 define Device
/timecloud
203 DEVICE_TITLE
:= Thunder Timecloud
204 DEVICE_PACKAGES
:= kmod-usb3
206 TARGET_DEVICES
+= timecloud
208 define Device
/ubnt-erx
210 FILESYSTEMS
:= squashfs
211 KERNEL_SIZE
:= 3145728
212 KERNEL
:= $(KERNEL_DTB
) | uImage lzma
213 IMAGES
:= sysupgrade.
tar
214 KERNEL_INITRAMFS
:= $$(KERNEL
) | ubnt-erx-factory-image
$(KDIR
)/tmp
/$$(KERNEL_INITRAMFS_PREFIX
)-factory.
tar
215 IMAGE
/sysupgrade.
tar := sysupgrade-tar | append-metadata
216 DEVICE_TITLE
:= Ubiquiti EdgeRouter X
218 TARGET_DEVICES
+= ubnt-erx
220 define Device
/ubnt-erx-sfp
223 DEVICE_TITLE
:= Ubiquiti EdgeRouter X-SFP
224 DEVICE_PACKAGES
+= kmod-i2c-algo-pca kmod-gpio-pca953x kmod-i2c-gpio-custom
226 TARGET_DEVICES
+= ubnt-erx-sfp
230 IMAGE_SIZE
:= 66453504
231 DEVICE_TITLE
:= Planex VR500
232 DEVICE_PACKAGES
:= kmod-usb3
234 TARGET_DEVICES
+= vr500
236 define Device
/w2914nsv2
238 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
239 DEVICE_TITLE
:= WeVO W2914NS v2
241 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport kmod-mt76 \
244 TARGET_DEVICES
+= w2914nsv2
246 define Device
/wf-2881
250 FILESYSTEMS
:= squashfs
251 IMAGE_SIZE
:= 129280k
252 KERNEL
:= $(KERNEL_DTB
) | pad-offset
$$(BLOCKSIZE
) 64 | uImage lzma
254 IMAGE
/sysupgrade.bin
:= append-kernel | append-ubi | append-metadata | check-size
$$$$(IMAGE_SIZE
)
255 DEVICE_TITLE
:= NETIS WF-2881
256 DEVICE_PACKAGES
:= kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
258 TARGET_DEVICES
+= wf-2881
262 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
263 DEVICE_TITLE
:= MQmaker WiTi
265 kmod-ata-core kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \
266 kmod-usb-ledtrig-usbport wpad-mini
268 TARGET_DEVICES
+= witi
270 define Device
/wndr3700v5
272 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
273 DEVICE_TITLE
:= Netgear WNDR3700v5
274 DEVICE_PACKAGES
:= kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-mini
276 TARGET_DEVICES
+= wndr3700v5
278 define Device
/wsr-1166
280 IMAGE
/sysupgrade.bin
:= trx | pad-rootfs | append-metadata
281 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
282 DEVICE_TITLE
:= Buffalo WSR-1166
283 DEVICE_PACKAGES
:= kmod-mt7603 kmod-mt76x2 wpad-mini
285 TARGET_DEVICES
+= wsr-1166
287 define Device
/wsr-600
289 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
290 DEVICE_TITLE
:= Buffalo WSR-600
291 DEVICE_PACKAGES
:= kmod-mt7603 kmod-rt2800-pci wpad-mini
293 TARGET_DEVICES
+= wsr-600
295 define Device
/zbt-we1326
297 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
298 DEVICE_TITLE
:= ZBT WE1326
300 kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 wpad-mini
302 TARGET_DEVICES
+= zbt-we1326
304 define Device
/zbt-wg2626
306 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
307 DEVICE_TITLE
:= ZBT WG2626
309 kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
310 kmod-usb-ledtrig-usbport wpad-mini
312 TARGET_DEVICES
+= zbt-wg2626
314 define Device
/zbt-wg3526-16M
315 DTS
:= ZBT-WG3526-16M
316 IMAGE_SIZE
:= $(ralink_default_fw_size_16M
)
317 SUPPORTED_DEVICES
+= zbt-wg3526
318 DEVICE_TITLE
:= ZBT WG3526
(16MB flash
)
320 kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
321 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
323 TARGET_DEVICES
+= zbt-wg3526-16M
325 define Device
/zbt-wg3526-32M
326 DTS
:= ZBT-WG3526-32M
327 IMAGE_SIZE
:= $(ralink_default_fw_size_32M
)
328 SUPPORTED_DEVICES
+= ac1200pro
329 DEVICE_TITLE
:= ZBT WG3526
(32MB flash
)
331 kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
332 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
334 TARGET_DEVICES
+= zbt-wg3526-32M
336 # FIXME: is this still needed?
338 #define Build/Compile
339 rm -rf
$(KDIR
)/relocate
340 $(CP
) ..
/..
/generic
/image
/relocate
$(KDIR
)
341 $(MAKE
) -C
$(KDIR
)/relocate KERNEL_ADDR
=$(KERNEL_LOADADDR
) CROSS_COMPILE
=$(TARGET_CROSS
)
342 $(CP
) $(KDIR
)/relocate
/loader.bin
$(KDIR
)/loader.bin