aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
diff options
context:
space:
mode:
authorShiji Yang <yangshiji66@qq.com>2022-03-20 23:42:37 +0800
committerHauke Mehrtens <hauke@hauke-m.de>2022-07-31 19:23:24 +0200
commit13308161788c98ae6cd48c22b13339fdb8c77130 (patch)
treec2558f900a8bed76a4b3e0dfb7f202f07a0bc365 /target/linux/ramips/mt7621/base-files/etc/board.d/02_network
parent364575e3a31e2e4e775a802fc8453b2d5a520e04 (diff)
downloadupstream-13308161788c98ae6cd48c22b13339fdb8c77130.tar.gz
upstream-13308161788c98ae6cd48c22b13339fdb8c77130.tar.bz2
upstream-13308161788c98ae6cd48c22b13339fdb8c77130.zip
ramips: add support for H3C TX1800 Plus / TX1801 Plus / TX1806
H3C TX180x series WiFi6 routers are customized by different carrier. While these three devices look different, they use the same motherboard inside. Another minor difference comes from the model name definition in the u-boot environment variable. Specifications: SOC: MT7621 + MT7915 ROM: 128 MiB RAM: 256 MiB LED: status *2 Button: reset *1 + wps/mesh *1 Ethernet: lan *3 + wan *1 (10/100/1000Mbps) TTL Baudrate: 115200 TFTP server IP: 192.168.124.99 MAC Address: use address(sample 1) address(sample 2) source label 88:xx:xx:98:xx:12 88:xx:xx:a2:xx:a5 u-boot-env@ethaddr lan 88:xx:xx:98:xx:13 88:xx:xx:a2:xx:a6 $label +1 wan 88:xx:xx:98:xx:12 88:xx:xx:a2:xx:a5 $label WiFi4_2G 8a:xx:xx:58:xx:14 8a:xx:xx:52:xx:a7 (Compatibility mode) WiFi5_5G 8a:xx:xx:b8:xx:14 8a:xx:xx:b2:xx:a7 (Compatibility mode) WiFi6_2G 8a:xx:xx:18:xx:14 8a:xx:xx:12:xx:a7 WiFi6_5G 8a:xx:xx:78:xx:14 8a:xx:xx:72:xx:a7 Compatibility mode is used to guarantee the connection of old devices that only support WiFi4 or WiFi5. TFTP + TTL Installation: Although a TTL connection is required for installation, we do not need to tear down it. We can find the TTL port from the cooling hole at the bottom. It is located below LAN3 and the pins are defined as follows: |LAN1|LAN2|LAN3|----|WAN| -------------------- |GND|TX|RX|VCC| 1. Set tftp server IP to 192.168.124.99 and put initramfs firmware in server's root directory, rename it to a simple name "initramfs.bin". 2. Plug in the power supply and wait for power on, connect the TTL cable and open a TTL session, enter "reboot", then enter "Y" to confirm. Finally push "0" to interruput boot while booting. 3. Execute command to install a initramfs system: # tftp 0x80010000 192.168.124.99:initramfs.bin # bootm 0x80010000 4. Backup nand flash by OpenWrt LuCI or dd instruction. We need those partitions if we want to back to stock firmwre due to official website does not provide download link. # dd if=/dev/mtd1 of=/tmp/u-boot-env.bin # dd if=/dev/mtd4 of=/tmp/firmware.bin 5. Edit u-boot env to ensure use default bootargs and first image slot: # fw_setenv bootargs # fw_setenv bootflag 0 6. Upgrade sysupgrade firmware. 7. About restore stock firmware: flash the "firmware" and "u-boot-env" partitions that we backed up in step 4. # mtd write /tmp/u-boot-env.bin u-boot-env # mtd write /tmp/firmware.bin firmware Additional Info: The H3C stock firmware has a 160-byte firmware header that appears to use a non-standard CRC32 verification algorithm. For this part of the data, the u-boot does not check it so we can just directly replace it with a placeholder. Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Diffstat (limited to 'target/linux/ramips/mt7621/base-files/etc/board.d/02_network')
-rw-r--r--target/linux/ramips/mt7621/base-files/etc/board.d/02_network10
1 files changed, 10 insertions, 0 deletions
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index 320325f487..400b03133e 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -28,6 +28,9 @@ ramips_setup_interfaces()
;;
ampedwireless,ally-r1900k|\
gehua,ghl-r-001|\
+ h3c,tx1800-plus|\
+ h3c,tx1801-plus|\
+ h3c,tx1806|\
hiwifi,hc5962|\
netgear,wax202|\
xiaomi,mi-router-3-pro|\
@@ -158,6 +161,13 @@ ramips_setup_macs()
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
label_mac=$wan_mac
;;
+ h3c,tx1800-plus|\
+ h3c,tx1801-plus|\
+ h3c,tx1806)
+ label_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
+ lan_mac=$(macaddr_add "$label_mac" 1)
+ wan_mac=$label_mac
+ ;;
hiwifi,hc5962)
lan_mac=$(mtd_get_mac_ascii bdinfo "Vfac_mac ")
label_mac=$lan_mac