lede/package/boot
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
..
arm-trusted-firmware-mediatek arm-trusted-firmware-mediatek: add mt7981 ddr4 builds 2024-05-22 23:36:15 +08:00
arm-trusted-firmware-mvebu trusted-firmware-a.mk: pass DTC path similar to u-boot.mk 2022-08-29 11:20:19 +08:00
arm-trusted-firmware-rockchip uboot-rockchip: revert to vendor atf 2023-04-14 23:45:12 +08:00
arm-trusted-firmware-rockchip-vendor atf-rockchip-vendor: add rk3528 support 2024-04-27 23:18:04 +08:00
arm-trusted-firmware-sunxi uboot-sunxi: bump to version 2024.01 2024-03-09 20:57:39 +08:00
arm-trusted-firmware-tools arm-trusted-firmware-tools: update to version 2.9 2024-04-29 21:25:10 +08:00
at91bootstrap x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
fconfig add kernel 5.10 support and sync with upstream 2021-06-14 18:30:08 +08:00
grub2 grub2: fix EFI support for armvirt 2024-02-20 00:18:02 +08:00
imx-bootlets add kernel 5.10 support and sync with upstream 2021-06-14 18:30:08 +08:00
kexec-tools x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
kobs-ng kobs-ng: update dependencies after 'imx6' -> 'imx' rename 2022-01-06 09:58:02 +08:00
mt7623n-preloader x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
opensbi opensbi: add package for RISC-V 2023-06-08 23:45:08 +08:00
tfa-layerscape x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
uboot-amlogic amlogic: add mesongx Phicomm N1 support 2024-05-06 05:53:58 +08:00
uboot-at91 treewide: use AUTORELEASE on all uboot-* packages (#7988) 2021-10-07 11:58:12 +08:00
uboot-envtools ramips: add support for H3C TX180x series devices 2024-05-25 22:25:15 +08:00
uboot-fritz4040 treewide: use AUTORELEASE on all uboot-* packages (#7988) 2021-10-07 11:58:12 +08:00
uboot-imx uboot-imx: set BUILD_SUBTARGET to 'cortexa9' 2022-01-06 10:00:25 +08:00
uboot-kirkwood add kernel 5.10 support and sync with upstream 2021-06-14 18:30:08 +08:00
uboot-lantiq treewide: use AUTORELEASE on all uboot-* packages (#7988) 2021-10-07 11:58:12 +08:00
uboot-layerscape x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
uboot-mediatek uboot-mediatek: update to version 2023.07.02 2024-03-16 20:39:45 +08:00
uboot-mvebu add kernel 5.10 support and sync with upstream 2021-06-14 18:30:08 +08:00
uboot-mxs treewide: use AUTORELEASE on all uboot-* packages (#7988) 2021-10-07 11:58:12 +08:00
uboot-omap treewide: use AUTORELEASE on all uboot-* packages (#7988) 2021-10-07 11:58:12 +08:00
uboot-oxnas treewide: use AUTORELEASE on all uboot-* packages (#7988) 2021-10-07 11:58:12 +08:00
uboot-ramips treewide: use AUTORELEASE on all uboot-* packages (#7988) 2021-10-07 11:58:12 +08:00
uboot-rockchip arm-trusted-firmware-rockchip-vendor: revert version 2024-04-24 23:57:06 +08:00
uboot-sifiveu uboot-sifiveu: add bootloader package for SiFive Ux40 boards 2023-06-08 23:51:32 +08:00
uboot-sunxi uboot-sunxi: drop broken patches 2024-04-30 20:21:23 +08:00
uboot-tegra treewide: use AUTORELEASE on all uboot-* packages (#7988) 2021-10-07 11:58:12 +08:00
uboot-zynq kernel: bump 5.4 to 5.4.83 (#6040) 2020-12-17 23:29:07 +08:00