找回密码
 注册

QQ登录

只需一步,快速开始

查看: 38920|回复: 56

[HG8245千兆版救砖]TTL已经可以中断,求刷机指令及Flash的地址

[复制链接]
发表于 2016-1-7 17:49:25 | 显示全部楼层 |阅读模式
本帖最后由 dd2ka 于 2016-1-8 00:48 编辑 7 |  V* c# Y9 J) l1 o
  1. U-Boot 1.1.4 (Jun 21 2012 - 13:51:21)4 c5 B2 }* D: e/ f  K; U9 S; b' i
  2. U-Boot code: 90500000 -> 9051E974  BSS: -> 9055525C$ g& j& e7 J/ ?
  3. RAM Configuration:
    ) @/ c% ?6 n2 v9 h7 h& h
  4. Bank #0: 90000000 64 MB
    0 x& X8 v( y' U% T+ A- g: m
  5. Flash: 16 MB
复制代码
通过TTL进华为HG8245猫,已经可以中断系统引导了,方法是不停的按d,然后你会发现系统停在:
# _' h( N4 H) C  G( P  M
  1. Press d key to abort autoboot: 10 8 {' _  Y7 O& d
  2. hisilicon #
复制代码
输入help后有如下指令可供执行:
4 W# J  i0 ~9 j; k! m
  1. hisilicon # help! T4 Z; Z; F0 n" G
  2. ?       - alias for 'help'/ Z9 v$ O( ?  z3 [) R- s
  3. base    - print or set address offset# l; A, c/ v, Z, d) Q8 |
  4. bdinfo  - print Board Info structure
    : d0 F* s% c- [* k9 U' }
  5. bootm   - boot application image from memory
    1 H5 P6 ~2 N% C* N! t
  6. crc32   - checksum calculation; e9 J. K( g3 S
  7. dhcp    - invoke DHCP client to obtain IP/boot params/ f7 G3 l3 J# x9 y% U
  8. echo    - echo args to console
    8 t0 Z. W1 R$ O9 O# x
  9. erase   - erase FLASH memory7 \: V/ \( }; w1 s
  10. flinfo  - print FLASH memory information
    - U4 j& S2 x3 P8 `) G! h
  11. fsinfo  - print information about filesystems7 M$ R2 L9 I# w0 `% p
  12. fsload  - load binary file from a filesystem image% \4 F; {3 b! K% L* s& b
  13. help    - print online help- P# s3 f; z9 t: T5 {
  14. lastword- print last word& `4 ?' ?$ {# I. O% o+ r  V" H
  15. loadboardinfo- download file from tftp server8 L1 m) F. T: s7 R& `0 p3 g5 ?
  16. loadflashcfg- download file from tftp server
    # h: I1 \, {5 H& H# ?
  17. loadfs  - download file system from tftp server- z4 v7 a! q; p) i) a% F/ M! r, x
  18. loadjffs2- download file from tftp server8 C: j/ I! Y0 Q+ W& ^' j
  19. loadkernel- download file from tftp server
    % O5 |8 o) I2 o
  20. loadminisystem- download file from tftp server4 q; ]7 {3 b. ~4 v  V
  21. loadsystem- download file from tftp server
    ' ^% B/ H5 _! l5 |
  22. loaduboot- download file from tftp server
    ) H0 K1 m( u/ c/ D2 Y
  23. loop    - infinite loop on address range
    5 u& d# v4 T( j
  24. ls      - list files in a directory (default /)& L/ t4 Y8 F7 E
  25. md      - memory display
    3 W" \4 A8 C' v
  26. mtest   - simple RAM test
    3 G  M! a2 P. N
  27. mw      - memory write (fill)4 T: _1 A6 G+ i6 D; g- v
  28. ping    - send ICMP ECHO_REQUEST to network host  M, ?) F! u* ~2 @% }2 U
  29. printenv- print environment variables
    8 A% A0 t( F+ j: X
  30. protect - enable or disable FLASH write protection
    # ~8 c8 G: a& \& }, G
  31. rarpboot- boot image via network using RARP/TFTP protocol5 e  M. ^( I2 j) T# y% r
  32. reset   - Perform RESET of the CPU
    2 i2 q, `" ^* y6 \+ W
  33. saveenv - save environment variables to persistent storage' `# C$ d4 D! r: I7 U6 J7 s0 T  C) G
  34. setenv  - set environment variables0 J0 O/ K8 n9 W$ x& `' q% M2 \
  35. tftp    - download or upload image via network using TFTP protocol* q; n" K% M6 i& O7 `7 p" v
  36. update  - update board software
    & A! f9 `/ y# R3 A$ O
  37. vdecrest- vdecrest
      L4 D5 L  }) p  S3 {
  38. vencrest- vencrest
    1 n# `4 B" z/ H4 D' s; m6 d
  39. version - print monitor version
复制代码
输入printenv也能看到相关配置% M2 [# {  w/ J: q9 F
  1. hisilicon # printenv % s) _# S% L* d# E
  2. bootdelay=1
    4 f6 ?  L0 i0 c4 N# D0 [* b9 I% o
  3. baudrate=115200& O7 A6 m: M) `# J
  4. ethaddr=00:00:00:00:00:02
    * X+ v, h  ~; O$ j- R  _" `. C- J, r
  5. ipaddr=192.168.0.103 W  y6 L  d& D( g: A4 D
  6. serverip=192.168.0.1
    ; }6 n7 c! O+ ]3 v% M9 l
  7. netmask=255.255.255.0
    / a; u% h6 h) D5 E
  8. bootfile="Image"
    7 Y  @. r5 M. j1 K$ m+ a
  9. stdin=serial! T: R* P6 i3 b
  10. stdout=serial
    % x  @2 }4 F% ~( o. T) X
  11. stderr=serial
    $ g1 o' j: ]2 D6 |! O; h
  12. verify=n" n) v5 I% m5 e2 j1 G3 P
  13. filesize=23 s, C# h2 e9 d* ^0 w; n, y
  14. bootcmd=bootm 0x20060054 0x91000000
    7 I& r4 P8 B$ M6 E- l; ^
  15. bootargs=noalign mem=50M console=ttyAMA0,115200 root=/dev/ram0 rootfstype=squashfs mtdparts=hisilicon:0x40000(boot)ro,0x1000(flashcfg)ro,0x1f000(syspara)ro,0x180000(krnl)ro,0x8fffac@0x1e0054(rootfs)ro,0x248fd8@0xc17028(minisystem)ro,0x180000(jffs2cfg),-(reserved) user_debug=0x1f panic=1
复制代码
但是在此模式下,因为不知道flash偏移值,无法进行flash的擦除和重刷,另外,华为在U-boot模式下,也没有提供常规的cp.b拷贝内存文件到flash中等功能,仅有loadsystem,loaduboot等直接写入闪存的命令,这样就涉及到对各个版本的固件解包了,不知如何才能将bin固件拆分成uboot,system等单独的文件?求论坛各位大大拔冗相助。目前我的2个8245都是砖,进系统在加载无线网络模块的时候进入死循环,能ping通,无法telnet,无法web,ttl输入无响应。! K, o. i- X% `0 i) r
万分感谢!1 O9 g% g5 b  f) v6 ^8 E
! U4 Z6 n' y6 c/ f/ G5 J* R

, Q0 b8 u% O! R; L8 N3 a& f

点评

这个很简单!你看我给你回复的,本帖32楼,33楼。  发表于 2017-5-2 14:52
发表于 2017-5-2 14:51:29 | 显示全部楼层
既然在TTL有了 loadjffs2 loadkernel loadminisystem loadsystem 这些很方便的指令,那么你修复救砖也是非常简单的!
* C1 W) l: n" b0 k: [( O比较简单的办法是:  y0 N+ I! P. x% i  w
1、找一台正常能用的HG8245(跟你的电路板芯片一致的),进telnet,将它的 mtd1 mtd2 ... 等等的文件,复制到你电脑里。
$ e" ?, }4 H9 U+ c' f+ B2、然后在这个坏的HG8245,用 loadsystem 这类命令,把相对应的mtd 比如mtd5 刷入,就可以了!
& M" y8 E# ?$ h/ \(你在第一步的好的8245里面看MTD信息可以知道mtd1 mtd2 mtd3 等等 对应的是固件的哪个部分。)/ ?+ b; m8 O4 v$ i7 P
发表于 2017-5-2 14:45:00 | 显示全部楼层
HG8245,HG8240 的flash的分区地址信息是这样的:% Y  p2 s( c& s1 e7 S+ |

5 r9 P( _" f5 \2 B4 M  L$ S! ~" D# L<uboot rotate_flag="0" address0="0x00000000" length0="0x00040000"/>
  J2 m( p  d+ e* R5 W2 ]# T% Q<flash_config rotate_flag="0" address0="0x00040000" length0="0x00001000"/>
0 H5 {! T" F; z4 L% C2 V<system_param rotate_flag="0" address0="0x00041000" length0="0x0001f000"/>7 o8 M  D/ e9 y0 A$ a. u
<kernel rotate_flag="0" address0="0x00060000" length0="0x00180000"/>
1 ]1 r3 T/ l5 P. \0 ?8 x<rootfs rotate_flag="0" address0="0x001e0000" length0="0x00900000"/>! q0 o- x5 w2 Z6 _  _) i, Y
<minisys rotate_flag="0" address0="0x00ae0000" length0="0x00380000"/>3 j4 @5 p. ]- u' }+ w
<file_system rotate_flag="0" address0="0x00e60000" length0="0x00180000"/>$ B+ ~5 j" I, C% U! v
<reserved rotate_flag="0" address0="0x00fe0000" length0="0x00020000"/>
& q1 t: q2 D4 l2 {7 B5 A7 h, Q0 Q. g8 f1 z8 L( _
你参考,很简单。
* L( O1 v9 ?# E3 _9 X6 n/ t- e! f, }6 Y
发表于 2016-2-5 23:56:17 | 显示全部楼层
不明觉厉。这绝对是个技术活。帮顶
 楼主| 发表于 2016-1-31 20:23:41 | 显示全部楼层
回来看看,还是没戏,唉。
 楼主| 发表于 2016-1-8 00:22:16 | 显示全部楼层
另外参照其他uboot刷机的教程,发现华为HG8245这个猫在U-boot下,没有cp.b的命令,只能tftp下载到内存,erase擦除闪存。' X1 J! P9 b5 u+ h  R, Y+ ^
华为这个只有loadsystem,loaduboot等几个指令,是直接写入闪存的。
; S7 J9 w% \7 `6 ?: ~不知有无大神对华为这个猫有研究呢?
发表于 2016-2-4 00:51:53 | 显示全部楼层
弄好了么?话说开机的U-BOOT下面一行是不是就显示了偏移量?; l. V) P$ w. J4 }# h/ r
U-Boot code: 90500000 -> 9051E974  BSS: -> 9055525C
发表于 2016-2-26 11:36:13 | 显示全部楼层
我按d怎么停步下来呢,哎. D) m+ @, c0 S
我是c2刷英文版了。郁闷啦

点评

找到方法没有呢,我的也停不下来?  详情 回复 发表于 2016-4-8 21:30
发表于 2016-2-26 22:44:08 | 显示全部楼层
持续关注楼主, U+ u8 c( z4 C
先顶顶顶!
发表于 2016-2-27 10:04:35 | 显示全部楼层
楼主我的8245盖子打开了,是那种无针的TTL,求教如何接线。0 b5 c( a- D& z6 k; h. A
另外TTL接上了以后我该用什么软件呢?谢!
发表于 2016-4-8 21:30:19 | 显示全部楼层
fa8800 发表于 2016-2-26 11:36
7 m' r' D, Q4 H2 I/ h& E我按d怎么停步下来呢,哎7 }- M! i+ X8 j# C4 T. d3 v. f
我是c2刷英文版了。郁闷啦
; ?/ H4 C/ T; Z2 o$ b# G( ]
找到方法没有呢,我的也停不下来?
*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|宽带技术网 |网站地图

粤公网安备 44152102000001号

GMT+8, 2024-5-8 04:59 , Processed in 0.028732 second(s), 6 queries , Redis On.

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表