5 define Build/ubnt-erx-factory-image
6 if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \
7 echo '21001:6' > $(1).compat; \
8 $(TAR) -cf $(1) --transform='s/^.*/compat/' $(1).compat; \
10 $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \
11 md5sum --binary $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) | awk '{print $$1}'> $(1).md5; \
12 $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp.md5/' $(1).md5; \
14 echo "dummy" > $(1).rootfs; \
15 $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp/' $(1).rootfs; \
17 md5sum --binary $(1).rootfs | awk '{print $$1}'> $(1).md5; \
18 $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp.md5/' $(1).md5; \
20 echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version; \
21 $(TAR) -rf $(1) --transform='s/^.*/version.tmp/' $(1).version; \
23 $(CP) $(1) $(BIN_DIR)/; \
25 echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
32 IMAGE_SIZE := $(ralink_default_fw_size_4M)
33 DEVICE_TITLE := MediaTek MT7621 EVB
35 TARGET_DEVICES += mt7621
39 IMAGE_SIZE := $(ralink_default_fw_size_16M)
40 DEVICE_TITLE := Buffalo WSR-600
42 TARGET_DEVICES += wsr-600
46 DEVICE_TITLE := Linksys RE6500
48 TARGET_DEVICES += re6500
50 define Device/wsr-1166
52 IMAGE/sysupgrade.bin := trx | pad-rootfs
53 IMAGE_SIZE := $(ralink_default_fw_size_16M)
54 DEVICE_TITLE := Buffalo WSR-1166
56 TARGET_DEVICES += wsr-1166
58 define Device/dir-860l-b1
62 KERNEL := kernel-bin | patch-dtb | relocate-kernel | lzma | uImage lzma
63 IMAGE_SIZE := $(ralink_default_fw_size_16M)
64 IMAGE/sysupgrade.bin := \
65 append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \
66 seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
67 pad-rootfs | check-size $$$$(IMAGE_SIZE)
68 IMAGE/factory.bin := \
69 append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
70 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 DEVICE_TITLE := D-Link DIR-860L B1
75 DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport
77 TARGET_DEVICES += dir-860l-b1
81 IMAGE_SIZE := $(ralink_default_fw_size_16M)
82 DEVICE_TITLE := Firefly FireWRT
83 DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport
85 TARGET_DEVICES += firewrt
87 define Device/newifi-d1
89 IMAGE_SIZE := $(ralink_default_fw_size_16M)
90 DEVICE_TITLE := Newifi D1
91 DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-i2c-mt7621
93 TARGET_DEVICES += newifi-d1
97 IMAGE_SIZE := $(ralink_default_fw_size_16M)
98 DEVICE_TITLE := PBR-M1
99 DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci \
102 TARGET_DEVICES += pbr-m1
104 define Device/sap-g3200u3
106 DEVICE_TITLE := STORYLiNK SAP-G3200U3
107 DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport
109 TARGET_DEVICES += sap-g3200u3
111 define Device/timecloud
113 DEVICE_TITLE := Thunder Timecloud
114 DEVICE_PACKAGES := kmod-usb3
116 TARGET_DEVICES += timecloud
120 IMAGE_SIZE := $(ralink_default_fw_size_16M)
121 DEVICE_TITLE := MQmaker WiTi
122 DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci \
125 TARGET_DEVICES += witi
127 define Device/wndr3700v5
129 IMAGE_SIZE := $(ralink_default_fw_size_16M)
130 DEVICE_TITLE := Netgear WNDR3700v5
131 DEVICE_PACKAGES := kmod-usb3
133 TARGET_DEVICES += wndr3700v5
135 define Device/zbt-wg2626
137 IMAGE_SIZE := $(ralink_default_fw_size_16M)
138 DEVICE_TITLE := ZBT WG2626
139 DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
141 TARGET_DEVICES += zbt-wg2626
143 define Device/zbt-wg3526
145 IMAGE_SIZE := $(ralink_default_fw_size_16M)
146 DEVICE_TITLE := ZBT WG3526
147 DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
149 TARGET_DEVICES += zbt-wg3526
151 define Device/wf-2881
155 FILESYSTEMS := squashfs
156 IMAGE_SIZE := 129280k
157 KERNEL := $(KERNEL_DTB) | pad-offset $$(BLOCKSIZE) 64 | uImage lzma
159 IMAGE/sysupgrade.bin := append-kernel | append-ubi | check-size $$$$(IMAGE_SIZE)
160 DEVICE_TITLE := NETIS WF-2881
161 DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport
163 TARGET_DEVICES += wf-2881
165 define Device/ubnt-erx
167 FILESYSTEMS := squashfs
168 KERNEL_SIZE := 3145728
169 KERNEL := $(KERNEL_DTB) | uImage lzma
170 IMAGES := sysupgrade.tar
171 KERNEL_INITRAMFS := $$(KERNEL) | ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar
172 IMAGE/sysupgrade.tar := sysupgrade-tar
173 DEVICE_TITLE := Ubiquiti EdgeRouter X
174 DEVICE_PACKAGES := -kmod-mt76 -kmod-rt2x00-lib -kmod-mac80211 -kmod-cfg80211 -wpad-mini -iwinfo
176 TARGET_DEVICES += ubnt-erx
180 IMAGE_SIZE := $(ralink_default_fw_size_16M)
181 DEVICE_TITLE := SamKnows Whitebox 8
182 DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport uboot-envtools
184 TARGET_DEVICES += sk-wb8
188 IMAGE_SIZE := 66453504
189 DEVICE_TITLE := Planex VR500
190 DEVICE_PACKAGES := kmod-usb3
192 TARGET_DEVICES += vr500
194 define Device/rb750gr3
196 IMAGE_SIZE := $(ralink_default_fw_size_16M)
197 DEVICE_TITLE := MikroTik RB750Gr3
198 DEVICE_PACKAGES := kmod-usb3 kmod-ledtrig-usbdev uboot-envtools -kmod-mt76 -kmod-rt2x00-lib -kmod-mac80211 -kmod-cfg80211 -wpad-mini -iwinfo
200 TARGET_DEVICES += rb750gr3
202 # FIXME: is this still needed?
204 #define Build/Compile
205 rm -rf $(KDIR)/relocate
206 $(CP) ../../generic/image/relocate $(KDIR)
207 $(MAKE) -C $(KDIR)/relocate KERNEL_ADDR=$(KERNEL_LOADADDR) CROSS_COMPILE=$(TARGET_CROSS)
208 $(CP) $(KDIR)/relocate/loader.bin $(KDIR)/loader.bin