H3C Magic NX30 TTL线刷机
准备材料
硬件
Usb转TTL,焊笔,锡丝,杜邦线(公头焊接到电阻上)/PCB夹子(方便,整的时候不知道有这个东西)
软件
mobaxterm,tftp64,对应固件
https://github.com/PJO2/tftpd64
https://mobaxterm.mobatek.net/
https://firmware-selector.immortalwrt.org/
https://firmware-selector.openwrt.org/
连接TTL
接好ttl线后使用mobaxterm创建serial连接,选择对应的Serial port,Speed(bps)设置为115200
可以正常输入输出,进入了<H3C_NX30>
终端


进入UBOOT
输入reboot,开机时按Enter进入uboot
1 2 3 4 5 6 7
| *************************************************************************** * * * H3C NX30 Boot, Version 100 * * * ***************************************************************************
Hit Enter to stop autoboot: 0
|
在上述页面出来的一小段时间里按回车(建议提前按,按快点),失败了输入reboot重来
进入<H3C>
终端即为成功
u-boot命令
1 2 3 4 5
| printenv mtd list mtdparts smeminfo cat /proc/mtd
|
1 2 3 4
| erase <flash地址> +<擦除大小> sf erase <flash地址> +<擦除大小> sf write <源地址> <目的地址> <长度> cp.b <源地址> <目的地址> <长度>
|
配置TFTP
将电脑网口与路由器WAN口连接
1 2 3 4 5 6 7
| setenv serverip 192.168.x.x setenv ipaddr 192.168.x.x 电脑ip与uboot中serverip保持一致,电脑网关和DNS与uboot中ipaddr保持一致
我这里是 ipaddr=192.168.10.10 serverip=192.168.10.19
|
将所需固件放入tftp目录下

刷固件
方法一 刷入带有ssh的固件(找不到固件)
方法二 刷入factory固件(失败了)
1 2 3
| tftpboot factory.bin flash rootfs reset/reboot
|
1 2 3 4 5 6 7
| tftpboot factory.bin flash rootfs_1 setenv flag_try_sys2_failed 0 setenv flag_boot_rootfs 1 setenv flag_last_success 1 saveenv reset/reboot
|
参考https://www.right.com.cn/forum/thread-8274491-1-1.html
方法三 刷入救砖包(MIBIB和APPSBL)
需要特定固件包(自己编译),不到H3C的,所以混刷了AX3000的不死界面WEB**(会车门焊死用不了TTL,慎重)**,终端从<H3C>变为了IPQ5018#
1 2 3 4 5
| 刷大分区 tftpboot MIBIB.bin && flash 0:MIBIB 刷UBOOT tftpboot APPSBL.bin && flash 0:APPSBL tftpboot APPSBL1.bin && flash 0:APPSBL_1
|
刷完断电,用网线连接 LAN 口和电脑,按着 reset 插电 5~10 秒后进入 Uboot
选好CR8808固件包后无法成功刷固件(其他固件传上去说用不了),断电重启会回到web页面,不断电可以使用TTL(可能是因为固件不对刷不成功)
方法四 烧录器烧录固件
用烧录器烧录低版本固件到闪存,然后用常规方法刷。(烧录夹、编程器、热风枪等)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| smeminfo ubi0: detaching mtd1 ubi0: mtd1 is detached ubi0: attaching mtd1 ubi0: scanning is finished ubi0: attached mtd1 (name "mtd=0", size 116 MiB) ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048 ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096 ubi0: good PEBs: 932, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128 ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1678472241 ubi0: available PEBs: 0, total reserved PEBs: 932, PEBs reserved for bad PEB handling: 20 flash_type: 0xb flash_index: 0x0 flash_chip_select: 0x0 flash_block_size: 0x20000 flash_density: 0x80000 partition table offset 0x0 No.: Name Attributes Start Size 0: 0:SBL1 0x0000ffff 0x0 0x80000 1: 0:MIBIB 0x0000ffff 0x80000 0x80000 2: 0:BOOTCONFIG 0x0000ffff 0x100000 0x40000 3: 0:BOOTCONFIG1 0x0000ffff 0x140000 0x40000 4: 0:QSEE 0x0000ffff 0x280000 0x100000 5: 0:QSEE_1 0x0000ffff 0x180000 0x100000 6: 0:DEVCFG 0x0000ffff 0x3c0000 0x40000 7: 0:DEVCFG_1 0x0000ffff 0x380000 0x40000 8: 0:CDT 0x0000ffff 0x440000 0x40000 9: 0:CDT_1 0x0000ffff 0x400000 0x40000 10: 0:APPSBLENV 0x0000ffff 0x480000 0x80000 11: 0:APPSBL 0x0000ffff 0x640000 0x140000 12: 0:APPSBL_1 0x0000ffff 0x500000 0x140000 13: 0:ART 0x0000ffff 0x780000 0x100000 14: 0:TRAINING 0x0000ffff 0x880000 0x80000 15: bdata 0x0000ffff 0x900000 0x80000 16: crash 0x0000ffff 0x980000 0x80000 17: crash_log 0x0000ffff 0xa00000 0x80000 18: rootfs 0x0000ffff 0xa80000 0x7480000 ubi vol 0 kernel ubi vol 1 rootfs ubi vol 2 rootfs_data
|
参考链接
https://www.right.com.cn/forum/thread-8356975-1-1.html
https://www.bilibili.com/video/BV1r64y157yz
https://www.right.com.cn/FORUM/thread-4041386-1-1.html
https://www.right.com.cn/forum/thread-154561-1-1.html
http://www.elelab.net/use-tftpd32-ttl-write-u-boot.html
https://www.right.com.cn/FORUM/thread-8383273-1-1.html
https://www.right.com.cn/forum/thread-8299605-1-1.html
https://www.right.com.cn/forum/thread-8274491-1-1.html
https://www.right.com.cn/FORUM/thread-8255773-1-1.html