46ab81e405
UniElec U7621-06 is a router platform board based on MediaTek MT7621AT. The device has the following specifications: - MT7621AT (880 MHz) - 256/512 MB of RAM (DDR3) - 8/16/32/64 MB of FLASH (SPI NOR) - 5x 1 Gbps Ethernet (MT7621 built-in switch) - 1x ASMedia ASM1061 (for mSATA and SATA) - 2x miniPCIe slots (PCIe bus only) - 1x mSATA slot (with USB 2.0 bus for modem) - 1x SATA - 1x miniSIM slot - 1x microSD slot - 1x USB 3.0 - 12x LEDs (3 GPIO-controlled) - 1x reset button - 1x UART header (4-pins) - 1x GPIO header (30-pins) - 1x FPC connector for LEDs (20-pin, 0.5 mm pitch) - 1x DC jack for main power (12 V) The following has been tested and is working: - Ethernet switch - miniPCIe slots (tested with Wi-Fi cards) - mSATA slot (tested with modem and mSATA drive) - miniSIM slot - sysupgrade - reset button - microSD slot Installation: This board might come with a different firmware versions (MediaTek SDK, PandoraBox, Padavan, etc.). If your board comes with PandoraBox, you can install LEDE using sysupgrade. Just SSH to the router and perform forced sysupgrade (due to a board name mismatch). The default IP of this board should be: 192.168.1.1 and username/password: root/admin. In case of a different firmware, you can use web based recovery described below. Use the following command to perform the sysupgrade (for the 256MB RAM/16MB flash version): sysupgrade -n -F lede-ramips-mt7621-u7621-06-256M-16M-squashfs-sysupgrade.bin Recovery: This board contains a Chinese, closed-source bootloader called Breed (Boot and Recovery Environment for Embedded Devices). Breed supports web recovery and to enter it, you keep the reset button pressed for around 5 seconds during boot. Your machine will be assigned an IP through DHCP and the router will use IP address 192.168.1.1. The recovery website is in Chinese, but is easy to use. Click on the second item in the list to access the recovery page, then the second item on the next page is where you select the firmware. In order to start the recovery, you click the button at the bottom. LEDs list (top row, left to right): - LED_WWAN# (connected with pin 42 in LTE/mSATA slot) - Power (connected directly to 3V3) - CTS2_N (GPIO10, configured as "status" LED) - TXD2 (GPIO11, configured as "led4", without default trigger) - RXD2 (GPIO12, configured as "led5", without default trigger) - LED_WLAN# (connected with pin 44 in wifi0 slot) LEDs list (bottom row, left to right): - ESW_P0_LED_0 - ESW_P1_LED_0 - ESW_P2_LED_0 - ESW_P3_LED_0 - ESW_P4_LED_0 - LED_WLAN# (connected with pin 44 in wifi1 slot) Other notes: 1. The board is available with different amounts of RAM and flash. We have only added support for the 256/16 MB configuration, as that seems to be the default. However, all the required infrastructure is in place for making support for the other configurations easy. 2. The manufacturer offers five different wireless cards with MediaTek chipsets, based on MT76x2, MT7603 and MT7615. Images of the board all show that the miniPCIe slots are dedicated to specific Wi-Fi cards. However, the slots are generic. 3. All boards we got access to had the same EEPROM content. The default firmware reads the Ethernet MAC from offset 0xe000 in factory partition. This offset only contains 0xffs, so a random MAC will be generated on every boot of the router. There is a valid MAC stored at offset 0xe006 and this MAC is shown as the WAN MAC in the bootloader. However, it is the same on all boards we have checked. Based on information provided by the vendor, all boards sold in small quantities are considered more as samples for development purposes. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com> Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
371 lines
11 KiB
Makefile
371 lines
11 KiB
Makefile
#
|
|
# MT7621 Profiles
|
|
#
|
|
|
|
DEVICE_VARS += TPLINK_BOARD_ID TPLINK_HEADER_VERSION TPLINK_HWID TPLINK_HWREV
|
|
|
|
define Build/ubnt-erx-factory-image
|
|
if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \
|
|
echo '21001:6' > $(1).compat; \
|
|
$(TAR) -cf $(1) --transform='s/^.*/compat/' $(1).compat; \
|
|
\
|
|
$(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \
|
|
mkhash md5 $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) > $(1).md5; \
|
|
$(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp.md5/' $(1).md5; \
|
|
\
|
|
echo "dummy" > $(1).rootfs; \
|
|
$(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp/' $(1).rootfs; \
|
|
\
|
|
mkhash md5 $(1).rootfs > $(1).md5; \
|
|
$(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp.md5/' $(1).md5; \
|
|
\
|
|
echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version; \
|
|
$(TAR) -rf $(1) --transform='s/^.*/version.tmp/' $(1).version; \
|
|
\
|
|
$(CP) $(1) $(BIN_DIR)/; \
|
|
else \
|
|
echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
|
|
fi
|
|
endef
|
|
|
|
define Device/11acnas
|
|
DTS := 11ACNAS
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
DEVICE_TITLE := WeVO 11AC NAS Router
|
|
DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
|
|
endef
|
|
TARGET_DEVICES += 11acnas
|
|
|
|
define Device/dir-860l-b1
|
|
DTS := DIR-860L-B1
|
|
BLOCKSIZE := 64k
|
|
IMAGES += factory.bin
|
|
KERNEL := kernel-bin | patch-dtb | relocate-kernel | lzma | uImage lzma
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
IMAGE/sysupgrade.bin := \
|
|
append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \
|
|
seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
|
|
pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
|
|
IMAGE/factory.bin := \
|
|
append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
|
|
append-rootfs | pad-rootfs -x 64 | \
|
|
seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
|
|
seama-seal -m "signature=wrgac13_dlink.2013gui_dir860lb" | \
|
|
check-size $$$$(IMAGE_SIZE)
|
|
DEVICE_TITLE := D-Link DIR-860L B1
|
|
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
|
|
endef
|
|
TARGET_DEVICES += dir-860l-b1
|
|
|
|
define Device/ew1200
|
|
DTS := EW1200
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
DEVICE_TITLE := AFOUNDRY EW1200
|
|
DEVICE_PACKAGES := \
|
|
kmod-ata-core kmod-ata-ahci kmod-mt76x2 kmod-mt7603 kmod-usb3 \
|
|
kmod-usb-ledtrig-usbport wpad-mini
|
|
endef
|
|
TARGET_DEVICES += ew1200
|
|
|
|
define Device/firewrt
|
|
DTS := FIREWRT
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
DEVICE_TITLE := Firefly FireWRT
|
|
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
|
|
endef
|
|
TARGET_DEVICES += firewrt
|
|
|
|
define Device/gb-pc1
|
|
DTS := GB-PC1
|
|
DEVICE_TITLE := GnuBee Personal Cloud One
|
|
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
|
|
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
|
endef
|
|
TARGET_DEVICES += gb-pc1
|
|
|
|
define Device/hc5962
|
|
DTS := HC5962
|
|
BLOCKSIZE := 128k
|
|
PAGESIZE := 2048
|
|
KERNEL_SIZE := 2097152
|
|
UBINIZE_OPTS := -E 5
|
|
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
|
IMAGES += factory.bin
|
|
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
|
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
|
|
DEVICE_TITLE := HiWiFi HC5962
|
|
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-mini
|
|
endef
|
|
TARGET_DEVICES += hc5962
|
|
|
|
define Device/k2p
|
|
DTS := K2P
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
DEVICE_TITLE := Phicomm K2P
|
|
endef
|
|
TARGET_DEVICES += k2p
|
|
|
|
define Device/mir3g
|
|
DTS := MIR3G
|
|
BLOCKSIZE := 128k
|
|
PAGESIZE := 2048
|
|
KERNEL_SIZE := 4096k
|
|
KERNEL := $(KERNEL_DTB) | uImage lzma
|
|
IMAGE_SIZE := 32768k
|
|
UBINIZE_OPTS := -E 5
|
|
IMAGES := sysupgrade.tar kernel1.bin rootfs0.bin
|
|
IMAGE/kernel1.bin := append-kernel
|
|
IMAGE/rootfs0.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
|
|
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
|
DEVICE_TITLE := Xiaomi Mi Router 3G
|
|
SUPPORTED_DEVICES += R3G
|
|
DEVICE_PACKAGES := \
|
|
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini \
|
|
uboot-envtools
|
|
endef
|
|
TARGET_DEVICES += mir3g
|
|
|
|
define Device/mt7621
|
|
DTS := MT7621
|
|
BLOCKSIZE := 64k
|
|
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
|
DEVICE_TITLE := MediaTek MT7621 EVB
|
|
endef
|
|
TARGET_DEVICES += mt7621
|
|
|
|
define Device/newifi-d1
|
|
DTS := Newifi-D1
|
|
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
|
DEVICE_TITLE := Newifi D1
|
|
DEVICE_PACKAGES := \
|
|
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
|
|
endef
|
|
TARGET_DEVICES += newifi-d1
|
|
|
|
define Device/pbr-m1
|
|
DTS := PBR-M1
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
DEVICE_TITLE := PBR-M1
|
|
DEVICE_PACKAGES := \
|
|
kmod-ata-core kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
|
|
kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
|
|
endef
|
|
TARGET_DEVICES += pbr-m1
|
|
|
|
define Device/r6220
|
|
DTS := R6220
|
|
BLOCKSIZE := 128k
|
|
PAGESIZE := 2048
|
|
KERNEL_SIZE := 4096k
|
|
KERNEL := $(KERNEL_DTB) | uImage lzma
|
|
IMAGE_SIZE := 28672k
|
|
UBINIZE_OPTS := -E 5
|
|
IMAGES := sysupgrade.tar kernel.bin rootfs.bin
|
|
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
|
IMAGE/kernel.bin := append-kernel
|
|
IMAGE/rootfs.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
|
|
DEVICE_TITLE := Netgear R6220
|
|
DEVICE_PACKAGES := \
|
|
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
|
|
endef
|
|
TARGET_DEVICES += r6220
|
|
|
|
define Device/rb750gr3
|
|
DTS := RB750Gr3
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
DEVICE_TITLE := MikroTik RB750Gr3
|
|
DEVICE_PACKAGES := kmod-usb3 uboot-envtools
|
|
endef
|
|
TARGET_DEVICES += rb750gr3
|
|
|
|
define Device/re350-v1
|
|
DTS := RE350
|
|
DEVICE_TITLE := TP-LINK RE350 v1
|
|
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-mini
|
|
TPLINK_BOARD_ID := RE350-V1
|
|
TPLINK_HWID := 0x0
|
|
TPLINK_HWREV := 0
|
|
TPLINK_HEADER_VERSION := 1
|
|
IMAGE_SIZE := 6016k
|
|
KERNEL := $(KERNEL_DTB) | tplink-v1-header -e
|
|
IMAGES := sysupgrade.bin factory.bin
|
|
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | append-metadata | check-size $$$$(IMAGE_SIZE)
|
|
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
|
|
endef
|
|
TARGET_DEVICES += re350-v1
|
|
|
|
define Device/re6500
|
|
DTS := RE6500
|
|
DEVICE_TITLE := Linksys RE6500
|
|
DEVICE_PACKAGES := kmod-mt76x2 wpad-mini
|
|
endef
|
|
TARGET_DEVICES += re6500
|
|
|
|
define Device/sap-g3200u3
|
|
DTS := SAP-G3200U3
|
|
DEVICE_TITLE := STORYLiNK SAP-G3200U3
|
|
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
|
|
endef
|
|
TARGET_DEVICES += sap-g3200u3
|
|
|
|
define Device/sk-wb8
|
|
DTS := SK-WB8
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
DEVICE_TITLE := SamKnows Whitebox 8
|
|
DEVICE_PACKAGES := \
|
|
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport \
|
|
uboot-envtools wpad-mini
|
|
endef
|
|
TARGET_DEVICES += sk-wb8
|
|
|
|
define Device/timecloud
|
|
DTS := Timecloud
|
|
DEVICE_TITLE := Thunder Timecloud
|
|
DEVICE_PACKAGES := kmod-usb3
|
|
endef
|
|
TARGET_DEVICES += timecloud
|
|
|
|
define Device/u7621-06-256M-16M
|
|
DTS := U7621-06-256M-16M
|
|
IMAGE_SIZE := 16064k
|
|
DEVICE_TITLE := UniElec U7621-06 (256M RAM/16M flash)
|
|
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
|
|
endef
|
|
TARGET_DEVICES += u7621-06-256M-16M
|
|
|
|
define Device/ubnt-erx
|
|
DTS := UBNT-ERX
|
|
FILESYSTEMS := squashfs
|
|
KERNEL_SIZE := 3145728
|
|
KERNEL := $(KERNEL_DTB) | uImage lzma
|
|
IMAGES := sysupgrade.tar
|
|
KERNEL_INITRAMFS := $$(KERNEL) | ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar
|
|
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
|
DEVICE_TITLE := Ubiquiti EdgeRouter X
|
|
endef
|
|
TARGET_DEVICES += ubnt-erx
|
|
|
|
define Device/ubnt-erx-sfp
|
|
$(Device/ubnt-erx)
|
|
DTS := UBNT-ERX-SFP
|
|
DEVICE_TITLE := Ubiquiti EdgeRouter X-SFP
|
|
DEVICE_PACKAGES += kmod-i2c-algo-pca kmod-gpio-pca953x kmod-i2c-gpio-custom
|
|
endef
|
|
TARGET_DEVICES += ubnt-erx-sfp
|
|
|
|
define Device/vr500
|
|
DTS := VR500
|
|
IMAGE_SIZE := 66453504
|
|
DEVICE_TITLE := Planex VR500
|
|
DEVICE_PACKAGES := kmod-usb3
|
|
endef
|
|
TARGET_DEVICES += vr500
|
|
|
|
define Device/w2914nsv2
|
|
DTS := W2914NSV2
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
DEVICE_TITLE := WeVO W2914NS v2
|
|
DEVICE_PACKAGES := \
|
|
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport kmod-mt76 \
|
|
wpad-mini
|
|
endef
|
|
TARGET_DEVICES += w2914nsv2
|
|
|
|
define Device/wf-2881
|
|
DTS := WF-2881
|
|
BLOCKSIZE := 128k
|
|
PAGESIZE := 2048
|
|
FILESYSTEMS := squashfs
|
|
IMAGE_SIZE := 129280k
|
|
KERNEL := $(KERNEL_DTB) | pad-offset $$(BLOCKSIZE) 64 | uImage lzma
|
|
UBINIZE_OPTS := -E 5
|
|
IMAGE/sysupgrade.bin := append-kernel | append-ubi | append-metadata | check-size $$$$(IMAGE_SIZE)
|
|
DEVICE_TITLE := NETIS WF-2881
|
|
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
|
|
endef
|
|
TARGET_DEVICES += wf-2881
|
|
|
|
define Device/witi
|
|
DTS := WITI
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
DEVICE_TITLE := MQmaker WiTi
|
|
DEVICE_PACKAGES := \
|
|
kmod-ata-core kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \
|
|
kmod-usb-ledtrig-usbport wpad-mini
|
|
endef
|
|
TARGET_DEVICES += witi
|
|
|
|
define Device/wndr3700v5
|
|
DTS := WNDR3700V5
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
DEVICE_TITLE := Netgear WNDR3700v5
|
|
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-mini
|
|
endef
|
|
TARGET_DEVICES += wndr3700v5
|
|
|
|
define Device/wsr-1166
|
|
DTS := WSR-1166
|
|
IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
DEVICE_TITLE := Buffalo WSR-1166
|
|
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-mini
|
|
endef
|
|
TARGET_DEVICES += wsr-1166
|
|
|
|
define Device/wsr-600
|
|
DTS := WSR-600
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
DEVICE_TITLE := Buffalo WSR-600
|
|
DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci wpad-mini
|
|
endef
|
|
TARGET_DEVICES += wsr-600
|
|
|
|
define Device/zbt-we1326
|
|
DTS := ZBT-WE1326
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
DEVICE_TITLE := ZBT WE1326
|
|
DEVICE_PACKAGES := \
|
|
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 wpad-mini
|
|
endef
|
|
TARGET_DEVICES += zbt-we1326
|
|
|
|
define Device/zbt-wg2626
|
|
DTS := ZBT-WG2626
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
DEVICE_TITLE := ZBT WG2626
|
|
DEVICE_PACKAGES := \
|
|
kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
|
|
kmod-usb-ledtrig-usbport wpad-mini
|
|
endef
|
|
TARGET_DEVICES += zbt-wg2626
|
|
|
|
define Device/zbt-wg3526-16M
|
|
DTS := ZBT-WG3526-16M
|
|
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
|
SUPPORTED_DEVICES += zbt-wg3526
|
|
DEVICE_TITLE := ZBT WG3526 (16MB flash)
|
|
DEVICE_PACKAGES := \
|
|
kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
|
|
kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
|
|
endef
|
|
TARGET_DEVICES += zbt-wg3526-16M
|
|
|
|
define Device/zbt-wg3526-32M
|
|
DTS := ZBT-WG3526-32M
|
|
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
|
SUPPORTED_DEVICES += ac1200pro
|
|
DEVICE_TITLE := ZBT WG3526 (32MB flash)
|
|
DEVICE_PACKAGES := \
|
|
kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
|
|
kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini
|
|
endef
|
|
TARGET_DEVICES += zbt-wg3526-32M
|
|
|
|
# FIXME: is this still needed?
|
|
define Image/Prepare
|
|
#define Build/Compile
|
|
rm -rf $(KDIR)/relocate
|
|
$(CP) ../../generic/image/relocate $(KDIR)
|
|
$(MAKE) -C $(KDIR)/relocate KERNEL_ADDR=$(KERNEL_LOADADDR) CROSS_COMPILE=$(TARGET_CROSS)
|
|
$(CP) $(KDIR)/relocate/loader.bin $(KDIR)/loader.bin
|
|
endef
|