mt7621.mk 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. #
  2. # MT7621 Profiles
  3. #
  4. define Build/ubnt-erx-factory-image
  5. if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \
  6. echo '21001:6' > $(1).compat; \
  7. $(TAR) -cf $(1) --transform='s/^.*/compat/' $(1).compat; \
  8. \
  9. $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \
  10. mkhash md5 $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) > $(1).md5; \
  11. $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp.md5/' $(1).md5; \
  12. \
  13. echo "dummy" > $(1).rootfs; \
  14. $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp/' $(1).rootfs; \
  15. \
  16. mkhash md5 $(1).rootfs > $(1).md5; \
  17. $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp.md5/' $(1).md5; \
  18. \
  19. echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version; \
  20. $(TAR) -rf $(1) --transform='s/^.*/version.tmp/' $(1).version; \
  21. \
  22. $(CP) $(1) $(BIN_DIR)/; \
  23. else \
  24. echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
  25. fi
  26. endef
  27. define Device/11acnas
  28. DTS := 11ACNAS
  29. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  30. DEVICE_TITLE := WeVO 11AC NAS Router
  31. DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-mt76
  32. endef
  33. TARGET_DEVICES += 11acnas
  34. define Device/ac1200pro
  35. DTS := AC1200pro
  36. IMAGE_SIZE := $(ralink_default_fw_size_32M)
  37. DEVICE_TITLE := Digineo AC1200 Pro
  38. DEVICE_PACKAGES := kmod-usb3 kmod-ata-core kmod-ata-ahci
  39. endef
  40. TARGET_DEVICES += ac1200pro
  41. define Device/dir-860l-b1
  42. DTS := DIR-860L-B1
  43. BLOCKSIZE := 64k
  44. IMAGES += factory.bin
  45. KERNEL := kernel-bin | patch-dtb | relocate-kernel | lzma | uImage lzma
  46. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  47. IMAGE/sysupgrade.bin := \
  48. append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \
  49. seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
  50. pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
  51. IMAGE/factory.bin := \
  52. append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
  53. append-rootfs | pad-rootfs -x 64 | \
  54. seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
  55. seama-seal -m "signature=wrgac13_dlink.2013gui_dir860lb" | \
  56. check-size $$$$(IMAGE_SIZE)
  57. DEVICE_TITLE := D-Link DIR-860L B1
  58. DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport
  59. endef
  60. TARGET_DEVICES += dir-860l-b1
  61. define Device/firewrt
  62. DTS := FIREWRT
  63. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  64. DEVICE_TITLE := Firefly FireWRT
  65. DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport
  66. endef
  67. TARGET_DEVICES += firewrt
  68. define Device/mt7621
  69. DTS := MT7621
  70. BLOCKSIZE := 64k
  71. IMAGE_SIZE := $(ralink_default_fw_size_4M)
  72. DEVICE_TITLE := MediaTek MT7621 EVB
  73. endef
  74. TARGET_DEVICES += mt7621
  75. define Device/newifi-d1
  76. DTS := Newifi-D1
  77. IMAGE_SIZE := $(ralink_default_fw_size_32M)
  78. DEVICE_TITLE := Newifi D1
  79. DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport
  80. endef
  81. TARGET_DEVICES += newifi-d1
  82. define Device/pbr-m1
  83. DTS := PBR-M1
  84. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  85. DEVICE_TITLE := PBR-M1
  86. DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
  87. endef
  88. TARGET_DEVICES += pbr-m1
  89. define Device/rb750gr3
  90. DTS := RB750Gr3
  91. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  92. DEVICE_TITLE := MikroTik RB750Gr3
  93. DEVICE_PACKAGES := kmod-usb3 uboot-envtools -kmod-mt76 -kmod-rt2x00-lib -kmod-mac80211 -kmod-cfg80211 -wpad-mini -iwinfo
  94. endef
  95. TARGET_DEVICES += rb750gr3
  96. define Device/re6500
  97. DTS := RE6500
  98. DEVICE_TITLE := Linksys RE6500
  99. endef
  100. TARGET_DEVICES += re6500
  101. define Device/sap-g3200u3
  102. DTS := SAP-G3200U3
  103. DEVICE_TITLE := STORYLiNK SAP-G3200U3
  104. DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport
  105. endef
  106. TARGET_DEVICES += sap-g3200u3
  107. define Device/sk-wb8
  108. DTS := SK-WB8
  109. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  110. DEVICE_TITLE := SamKnows Whitebox 8
  111. DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport uboot-envtools
  112. endef
  113. TARGET_DEVICES += sk-wb8
  114. define Device/timecloud
  115. DTS := Timecloud
  116. DEVICE_TITLE := Thunder Timecloud
  117. DEVICE_PACKAGES := kmod-usb3
  118. endef
  119. TARGET_DEVICES += timecloud
  120. define Device/ubnt-erx
  121. DTS := UBNT-ERX
  122. FILESYSTEMS := squashfs
  123. KERNEL_SIZE := 3145728
  124. KERNEL := $(KERNEL_DTB) | uImage lzma
  125. IMAGES := sysupgrade.tar
  126. KERNEL_INITRAMFS := $$(KERNEL) | ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar
  127. IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
  128. DEVICE_TITLE := Ubiquiti EdgeRouter X
  129. DEVICE_PACKAGES := -kmod-mt76 -kmod-mt7603 -kmod-mt76x2 -kmod-mt76-core -kmod-mac80211 -kmod-cfg80211 -wpad-mini -iwinfo
  130. endef
  131. TARGET_DEVICES += ubnt-erx
  132. define Device/vr500
  133. DTS := VR500
  134. IMAGE_SIZE := 66453504
  135. DEVICE_TITLE := Planex VR500
  136. DEVICE_PACKAGES := kmod-usb3
  137. endef
  138. TARGET_DEVICES += vr500
  139. define Device/w2914nsv2
  140. DTS := W2914NSV2
  141. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  142. DEVICE_TITLE := WeVO W2914NS v2
  143. DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-mt76
  144. endef
  145. TARGET_DEVICES += w2914nsv2
  146. define Device/wf-2881
  147. DTS := WF-2881
  148. BLOCKSIZE := 128k
  149. PAGESIZE := 2048
  150. FILESYSTEMS := squashfs
  151. IMAGE_SIZE := 129280k
  152. KERNEL := $(KERNEL_DTB) | pad-offset $$(BLOCKSIZE) 64 | uImage lzma
  153. UBINIZE_OPTS := -E 5
  154. IMAGE/sysupgrade.bin := append-kernel | append-ubi | append-metadata | check-size $$$$(IMAGE_SIZE)
  155. DEVICE_TITLE := NETIS WF-2881
  156. DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport
  157. endef
  158. TARGET_DEVICES += wf-2881
  159. define Device/witi
  160. DTS := WITI
  161. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  162. DEVICE_TITLE := MQmaker WiTi
  163. DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
  164. endef
  165. TARGET_DEVICES += witi
  166. define Device/wndr3700v5
  167. DTS := WNDR3700V5
  168. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  169. DEVICE_TITLE := Netgear WNDR3700v5
  170. DEVICE_PACKAGES := kmod-usb3
  171. endef
  172. TARGET_DEVICES += wndr3700v5
  173. define Device/wsr-1166
  174. DTS := WSR-1166
  175. IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
  176. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  177. DEVICE_TITLE := Buffalo WSR-1166
  178. endef
  179. TARGET_DEVICES += wsr-1166
  180. define Device/wsr-600
  181. DTS := WSR-600
  182. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  183. DEVICE_TITLE := Buffalo WSR-600
  184. endef
  185. TARGET_DEVICES += wsr-600
  186. define Device/zbt-wg2626
  187. DTS := ZBT-WG2626
  188. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  189. DEVICE_TITLE := ZBT WG2626
  190. DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
  191. endef
  192. TARGET_DEVICES += zbt-wg2626
  193. define Device/zbt-wg3526
  194. DTS := ZBT-WG3526
  195. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  196. DEVICE_TITLE := ZBT WG3526
  197. DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci
  198. endef
  199. TARGET_DEVICES += zbt-wg3526
  200. # FIXME: is this still needed?
  201. define Image/Prepare
  202. #define Build/Compile
  203. rm -rf $(KDIR)/relocate
  204. $(CP) ../../generic/image/relocate $(KDIR)
  205. $(MAKE) -C $(KDIR)/relocate KERNEL_ADDR=$(KERNEL_LOADADDR) CROSS_COMPILE=$(TARGET_CROSS)
  206. $(CP) $(KDIR)/relocate/loader.bin $(KDIR)/loader.bin
  207. endef