aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/image/mt7620.mk
diff options
context:
space:
mode:
authorAndreas Böhler <dev@aboehler.at>2019-12-19 10:29:14 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-12-31 13:23:55 +0100
commita3010a7f8dbe04972efef16ed7d81b5fd72e9a94 (patch)
tree24ac0051d53093a17d474e79cc3e215fa1134e3c /target/linux/ramips/image/mt7620.mk
parent7a3c9e557a61d6687aaea42ba82d249db166fb4e (diff)
downloadupstream-a3010a7f8dbe04972efef16ed7d81b5fd72e9a94.tar.gz
upstream-a3010a7f8dbe04972efef16ed7d81b5fd72e9a94.tar.bz2
upstream-a3010a7f8dbe04972efef16ed7d81b5fd72e9a94.zip
ramips: add support for TP-Link RE200 v1
TP-Link RE200 v1 is a wireless range extender with Ethernet and 2.4G and 5G WiFi with internal antennas. It's based on MediaTek MT7620A+MT7610EN. Specifications -------------- - MediaTek MT7620A (580 Mhz) - 64 MB of RAM - 8 MB of FLASH - 2T2R 2.4 GHz and 1T1R 5 GHz - 1x 10/100 Mbps Ethernet - UART header on PCB (57600 8n1) - 8x LED (GPIO-controlled; only 6 supported), 2x button There are 2.4G and 5G LEDs in red and green which are controlled separately. The 5G LED is currently not supported, since the GPIOs couldn't be determined. Installation ------------ Web Interface ------------- It is possible to upgrade to OpenWrt via the web interface. However, the OEM firmware upgrade file is required and a tool to fix the MD5 sum of the header. This procedure overwrites U-Boot and there is not failsafe / recovery mode present! To prepare an image, you need to take the header and U-Boot (i.e. 0x200 + 0x20000 bytes) from an OEM firmware file and attach the factory image to it. Then fix the header MD5Sum1. Serial console -------------- Opening the case is quite hard, since it is welded together. Rename the OpenWrt factory image to "test.bin", then plug in the device and quickly press "2" to enter flash mode (no line feed). Follow the prompts until OpenWrt is installed. Unfortunately, this devices does not offer a recovery mode or a tftp installation method. If the web interface upgrade fails, you have to open your device and attach serial console. Since the web upgrade overwrites the boot loader, you might also brick your device. Additional notes ---------------- MAC address assignment is based on stock-firmware. For me, the device assigns the MAC on the label to Ethernet and the 2.4G WiFi, while the 5G WiFi has a separate MAC with +2. *:88 Ethernet/2.4G label, uboot 0x1fc00, userconfig 0x0158 *:89 unused userconfig 0x0160 *:8A 5G not present in flash This seems to be the first ramips device with a TP-Link v1 header. The original firmware has the string "EU" embedded, there might be some region- checking going on during the firmware upgrade process. The original firmware also contains U-Boot and thus overwrites the boot loader during upgrade. In order to flash back to stock, the first header and U-Boot need to be stripped from the original firmware. Signed-off-by: Andreas Böhler <dev@aboehler.at>
Diffstat (limited to 'target/linux/ramips/image/mt7620.mk')
-rw-r--r--target/linux/ramips/image/mt7620.mk36
1 files changed, 36 insertions, 0 deletions
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index 291495ec0d..cbf35f804a 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -16,6 +16,23 @@ define Build/elecom-header
--owner=0 --group=0 -f $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5
endef
+# combine kernel and rootfs into one image
+# mktplinkfw <type> <optional extra arguments to mktplinkfw binary>
+# <type> is "sysupgrade" or "factory"
+#
+# -a align the rootfs start on an <align> bytes boundary
+# -j add jffs2 end-of-filesystem markers
+# -s strip padding from end of the image
+# -X reserve <size> bytes in the firmware image (hexval prefixed with 0x)
+define Build/mktplinkfw
+ -$(STAGING_DIR_HOST)/bin/mktplinkfw \
+ -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) \
+ -N OpenWrt -V $(REVISION) -m $(TPLINK_HEADER_VERSION) \
+ -k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) -o $@.new -j -X 0x40000 -a 0x4 \
+ $(wordlist 2,$(words $(1)),$(1)) \
+ $(if $(findstring sysupgrade,$(word 1,$(1))),-s) && mv $@.new $@ || rm -f $@
+endef
+
define Device/aigale_ai-br100
SOC := mt7620a
IMAGE_SIZE := 7936k
@@ -938,6 +955,25 @@ define Device/tplink_archer-mr200
endef
TARGET_DEVICES += tplink_archer-mr200
+define Device/tplink_re200-v1
+ SOC := mt7620a
+ DEVICE_VENDOR := TP-Link
+ DEVICE_MODEL := RE200
+ DEVICE_VARIANT := v1
+ DEVICE_PACKAGES := kmod-mt76x0e
+ IMAGES += factory.bin
+ IMAGE/sysupgrade.bin := mktplinkfw sysupgrade -e -O
+ IMAGE/factory.bin := mktplinkfw factory -e -O
+ IMAGE_SIZE := 7936k
+ KERNEL := $(KERNEL_DTB)
+ KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v1-header -e -O
+ TPLINK_HWID := 0x02000001
+ TPLINK_HWREV := 0x1
+ TPLINK_HEADER_VERSION := 1
+ TPLINK_FLASHLAYOUT := 8Mmtk
+endef
+TARGET_DEVICES += tplink_re200-v1
+
define Device/vonets_var11n-300
SOC := mt7620n
IMAGE_SIZE := 3776k