mt7621.mk 5.2 KB

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