immortalwrt/target/linux
Shiji Yang 836b03aa23
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>
(cherry picked from commit 1330816178)
2023-01-09 14:43:31 +08:00
..
apm821xx Merge Official Source 2022-11-13 13:52:38 +08:00
arc770 target: use wpad-basic-openssl by default 2022-05-25 22:38:44 +08:00
archs38 target: use wpad-basic-openssl by default 2022-05-25 22:38:44 +08:00
armvirt kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
at91 treewide: make AddDepends/usb-serial selective 2021-06-08 22:50:32 +02:00
ath25 Merge Official Source 2022-09-05 13:20:57 +08:00
ath79 Merge Official Source 2022-11-13 13:52:38 +08:00
bcm27xx Merge Official Source 2022-12-01 02:27:14 +08:00
bcm47xx target: use wpad-basic-openssl by default 2022-05-25 22:38:44 +08:00
bcm53xx bcm53xx: add compat version for dsa migration 2023-01-03 10:20:30 +08:00
bcm63xx Merge Official Source 2022-09-05 13:20:57 +08:00
bcm4908 kernel: Deactivate B53 symbols in generic configuration 2023-01-02 19:17:49 +08:00
gemini kernel: bump 5.4 to 5.4.150 2021-10-02 16:05:34 +02:00
generic Merge Official Source 2023-01-07 16:35:05 +08:00
imx6 kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
ipq40xx Merge Official Source 2022-12-24 09:55:33 +08:00
ipq806x Merge Official Source 2022-11-05 16:56:57 +08:00
kirkwood target: use wpad-basic-openssl by default 2022-05-25 22:38:44 +08:00
lantiq Merge Official Source 2022-12-01 02:27:14 +08:00
layerscape Merge Official Source 2023-01-07 16:35:05 +08:00
malta target: use wpad-basic-openssl by default 2022-05-25 22:38:44 +08:00
mediatek Merge Official Source 2022-12-24 09:55:33 +08:00
mpc85xx Merge Official Source 2022-11-13 13:52:38 +08:00
mvebu mvebu: use schedutil gov by default 2022-10-21 16:45:40 +08:00
mxs target: use SPDX license identifiers on scripts 2021-02-10 15:47:23 +01:00
octeon kernel: bump 5.4 to 5.4.211 2022-09-04 15:32:22 +02:00
octeontx Merge Official Source 2022-09-05 13:20:57 +08:00
omap target: use wpad-basic-openssl by default 2022-05-25 22:38:44 +08:00
oxnas Merge Official Source 2022-11-13 13:52:38 +08:00
pistachio generic: 5.4: refresh kernel patches 2022-12-17 02:45:43 +01:00
ramips ramips: add support for H3C TX1800 Plus / TX1801 Plus / TX1806 2023-01-09 14:43:31 +08:00
realtek Merge Official Source 2023-01-07 16:35:05 +08:00
rockchip Merge Official Source 2022-11-13 13:52:38 +08:00
sunxi include: mv luci-app-cpufreq to target profiles 2022-09-05 13:15:39 +08:00
tegra target: use wpad-basic-openssl by default 2022-05-25 22:38:44 +08:00
uml target: use wpad-basic-openssl by default 2022-05-25 22:38:44 +08:00
x86 x86: bypassing the HH3K up to 2.5Gbps using a BCM578xx 2022-12-05 03:57:38 +08:00
zynq kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
Makefile target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00