lede/target/linux
Shiji Yang 63af18b5a9 ramips: add support for H3C TX180x series devices
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

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>
2024-05-25 22:25:15 +08:00
..
airoha kernel: bump 5.15 to 5.15.138 (#11658) 2023-11-13 17:47:28 +08:00
amlogic kernel: bump 5.15 to 5.15.159 (#12166) 2024-05-18 06:30:07 +08:00
apm821xx kernel: bump 5.10 to 5.10.213 (#12006) 2024-03-17 15:25:09 +08:00
arc770 x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
archs38 x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
armvirt kernel: bump 5.15 to 5.15.142 (#11709) 2023-12-16 12:02:58 +08:00
at91 x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
ath25 kernel: bump 5.4 to 5.4.252 (#11436) 2023-08-09 16:25:17 +08:00
ath79 kernel: bump 5.4 to 5.4.272 (#12007) 2024-03-17 15:30:06 +08:00
bcm27xx kernel: bump 6.1 to 6.1.91 (#12165) 2024-05-18 15:50:13 +08:00
bcm47xx kernel: bump 5.4 to 5.4.275 2024-05-07 09:44:13 +08:00
bcm53xx kernel: bump 5.10 to 5.10.213 (#12006) 2024-03-17 15:25:09 +08:00
bcm63xx kernel: bump 5.10 to 5.10.209 (#11833) 2024-01-27 08:00:35 +08:00
bcm4908 kernel: bump 5.4 to 5.4.272 (#12007) 2024-03-17 15:30:06 +08:00
bmips kernel: bump 5.15 to 5.15.148 (#11832) 2024-01-27 08:01:24 +08:00
gemini kernel: bump 5.10 to 5.10.208 (#11815) 2024-01-23 00:20:07 +08:00
generic generic: 5.15: rename patches to match correct version 2024-05-23 23:36:12 +08:00
imx target: imx6 rename to imx 2022-01-05 19:08:23 +08:00
ipq40xx kernel: refresh 5.10 patches (#11719) 2023-12-18 10:25:13 +08:00
ipq95xx kernel: bump 6.1 to 6.1.83 (#12036) 2024-03-29 10:21:13 +08:00
ipq806x kernel: bump 5.10 to 5.10.216 2024-05-07 10:00:13 +08:00
kirkwood kernel: remove hack patch, move kirkwood specific kmods to target modules.mk 2022-09-30 21:35:47 +08:00
lantiq kernel: bump 5.10 to 5.10.215 (#12095) 2024-04-25 00:10:11 +08:00
layerscape kernel: refresh 5.10 patches (#11719) 2023-12-18 10:25:13 +08:00
loongarch64 kernel: bump 6.6 to 6.6.13 (#11817) 2024-01-23 00:30:12 +08:00
malta x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
mediatek mediatek: fix broken PCIe caused by kernel update 2024-05-24 23:10:05 +08:00
mpc85xx kernel: bump 5.10 to 5.10.204 (#11721) 2023-12-19 10:30:35 +08:00
mvebu kernel: bump 5.10 to 5.10.216 2024-05-07 10:00:13 +08:00
mxs x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
octeon kernel: Set CONFIG_FRAME_WARN depending on target 2023-06-03 21:50:27 +08:00
octeontx kernel: bump 5.4 to 5.4.273 (#12050) 2024-04-04 12:00:39 +08:00
omap x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
oxnas kernel: bump 5.10 to 5.10.216 2024-05-07 10:00:13 +08:00
phytium kernel: bump 5.10 to 5.10.216 2024-05-07 10:00:13 +08:00
pistachio kernel: bump to 5.4.229, 5.10.164, 5.15.89, 6.1.7 (#10785) 2023-01-19 14:03:33 +08:00
qualcommax ipq-wifi: update to version 2024-04-16 2024-04-21 22:35:21 +08:00
ramips ramips: add support for H3C TX180x series devices 2024-05-25 22:25:15 +08:00
realtek kernel: bump 5.4 to 5.4.252 (#11436) 2023-08-09 16:25:17 +08:00
rockchip kernel: bump 5.15 to 5.15.159 (#12166) 2024-05-18 06:30:07 +08:00
sifiveu kernel: bump 5.15 to 5.15.153 (#12048) 2024-04-04 15:00:40 +08:00
silicon silicon: fix kernel target 2022-12-14 18:35:35 +08:00
sunxi target: add some missing patches 2024-04-30 20:19:35 +08:00
tegra kernel: bump 5.10 to 5.10.133 (#9845) 2022-07-27 23:51:57 +08:00
uml kernel: bump 5.4 to 5.4.260 (#11657) 2023-11-13 17:34:53 +08:00
x86 kernel: bump 6.1 to 6.1.91 (#12165) 2024-05-18 15:50:13 +08:00
zynq x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
Makefile treewide: sync with upstream (#10750) 2023-01-25 15:30:35 +08:00