找回密码
 注册

QQ登录

只需一步,快速开始

查看: 47394|回复: 56

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

[复制链接]
发表于 2016-1-7 17:49:25 | 显示全部楼层 |阅读模式
本帖最后由 dd2ka 于 2016-1-8 00:48 编辑
* C' g" P5 ]4 S) \. n( q
  1. U-Boot 1.1.4 (Jun 21 2012 - 13:51:21)6 R( T' C; \' H  h3 B0 l  R
  2. U-Boot code: 90500000 -> 9051E974  BSS: -> 9055525C7 b  {! D5 S# l0 F
  3. RAM Configuration:* H, O7 Y8 A* B. C) ?5 {* L
  4. Bank #0: 90000000 64 MB
    # f) j6 \  O7 n
  5. Flash: 16 MB
复制代码
通过TTL进华为HG8245猫,已经可以中断系统引导了,方法是不停的按d,然后你会发现系统停在:
. U$ J4 h: F. W  q7 H8 F
  1. Press d key to abort autoboot: 10 " V& m$ c  c6 m; Z
  2. hisilicon #
复制代码
输入help后有如下指令可供执行:
+ U4 U1 R1 Q$ ^# p, B5 @6 V. X
  1. hisilicon # help, K1 H4 b. b% t' F/ S5 ~
  2. ?       - alias for 'help'2 N' `) z$ X4 h# W9 V
  3. base    - print or set address offset" x$ k1 U# a* l) z
  4. bdinfo  - print Board Info structure
    & ]* `9 @/ b) ?  Z
  5. bootm   - boot application image from memory1 o1 j8 e2 K+ ]9 H
  6. crc32   - checksum calculation. M( x# ^: E0 Y1 z6 [6 ?: L) L2 \
  7. dhcp    - invoke DHCP client to obtain IP/boot params
    , a" l* ~4 c4 I* m+ _
  8. echo    - echo args to console5 @/ f% b1 N( s& X+ X8 w
  9. erase   - erase FLASH memory7 o- f# ?, `* F: B
  10. flinfo  - print FLASH memory information1 w1 j. F: J7 x% A7 U/ f9 o- k
  11. fsinfo  - print information about filesystems
    $ A5 m% @" ~2 W# z" j, i0 i# ]/ q
  12. fsload  - load binary file from a filesystem image
    / d$ s  s3 M  _( b" `
  13. help    - print online help
    / W9 e/ |9 `3 r+ Z$ T
  14. lastword- print last word$ G+ u2 @" O8 A, A6 }; U1 \
  15. loadboardinfo- download file from tftp server
    : r. x2 ^- H& ~8 J5 t6 S3 L
  16. loadflashcfg- download file from tftp server
    2 x, [1 T( y  _4 H: k
  17. loadfs  - download file system from tftp server$ s  W5 Y6 T# i) r" `
  18. loadjffs2- download file from tftp server: k" z2 D% l* B  f! n/ n% F; ^8 w
  19. loadkernel- download file from tftp server
    " u# r4 Y" A2 @; g- x
  20. loadminisystem- download file from tftp server  {4 E* }/ c+ ]9 ?
  21. loadsystem- download file from tftp server- p) N, E' C9 C" N  ?
  22. loaduboot- download file from tftp server
    - [: i2 z7 t# K% Z# N3 J
  23. loop    - infinite loop on address range
    . \" K3 \3 d, ?1 V5 B7 _
  24. ls      - list files in a directory (default /)5 N; n$ }% f1 k1 N' \) _1 w
  25. md      - memory display
    ! z+ ?6 m; N+ c; t$ i
  26. mtest   - simple RAM test) i8 L( B+ ~* `: V1 G5 [
  27. mw      - memory write (fill)
    ! c+ k9 k5 ~. U& s1 m
  28. ping    - send ICMP ECHO_REQUEST to network host
    7 t" s1 `+ E$ G! o9 B5 X' x$ F& n/ [
  29. printenv- print environment variables
    ! c! m; f$ X, C. j
  30. protect - enable or disable FLASH write protection
    * C) y0 Q9 e( {% q+ @5 {. @
  31. rarpboot- boot image via network using RARP/TFTP protocol
    3 O/ u+ U$ E# I5 y, w: r5 m8 M
  32. reset   - Perform RESET of the CPU
    3 `1 e7 d0 p6 c  n- v4 W: F
  33. saveenv - save environment variables to persistent storage  R* x1 V" g9 t4 Q. S5 l
  34. setenv  - set environment variables2 z3 K2 z. S2 n- d! L
  35. tftp    - download or upload image via network using TFTP protocol
    ; b3 C- v% W6 B4 f& D& j
  36. update  - update board software
    4 [/ |. U- T6 P2 W
  37. vdecrest- vdecrest + I4 E* G& Y$ L5 q  I
  38. vencrest- vencrest
    0 ~0 ~4 F# |! j+ y' n# I7 I
  39. version - print monitor version
复制代码
输入printenv也能看到相关配置
5 v3 g, q$ C8 t4 s
  1. hisilicon # printenv
    9 ]1 l0 C% t% l& n. V
  2. bootdelay=1
    5 V' M! ?3 ~% w: o3 Z
  3. baudrate=115200" T2 ?; @! s) P) _+ c
  4. ethaddr=00:00:00:00:00:02) Z& N! T4 ?/ s
  5. ipaddr=192.168.0.10  t6 u/ n: G0 S: n4 ]
  6. serverip=192.168.0.1) u* R! H, J! A* s) c( L  k
  7. netmask=255.255.255.0
    ' A# i/ Q) C7 R+ ~7 i" c
  8. bootfile="Image", E5 j. x/ f# v; x) c& O% m' ^
  9. stdin=serial5 Q8 m! T; c5 l) K; t7 S
  10. stdout=serial2 p; B  @" |# Y, x
  11. stderr=serial
    4 X( c4 ]. S' V3 O( Y
  12. verify=n
    & T1 Y4 @$ Y# W- D4 g: @' e; O
  13. filesize=2
    4 o* F* g+ |$ M* l. I) V1 c# ^
  14. bootcmd=bootm 0x20060054 0x910000004 e6 R3 g) b, y$ S; W9 K. T2 Q9 z
  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输入无响应。
; G& O0 w/ s' a9 W万分感谢!) k. B' T) G  g- I/ c; a/ c( O

$ q( @0 `4 t: Z# P* z, x' S5 Z1 h; Y6 w( J' r
发表于 2017-5-2 14:51:29 | 显示全部楼层
既然在TTL有了 loadjffs2 loadkernel loadminisystem loadsystem 这些很方便的指令,那么你修复救砖也是非常简单的!' a  C( [) y1 I- G7 b4 s
比较简单的办法是:
# Z. m% O) u9 o! ]5 I  ?1、找一台正常能用的HG8245(跟你的电路板芯片一致的),进telnet,将它的 mtd1 mtd2 ... 等等的文件,复制到你电脑里。6 d% L7 ?+ `6 x4 H
2、然后在这个坏的HG8245,用 loadsystem 这类命令,把相对应的mtd 比如mtd5 刷入,就可以了!$ M; y3 M, T+ G! }7 w& |
(你在第一步的好的8245里面看MTD信息可以知道mtd1 mtd2 mtd3 等等 对应的是固件的哪个部分。)
' O; b9 W* ~7 i4 S) Z  ~( z1 z0 P
发表于 2017-5-2 14:45:00 | 显示全部楼层
HG8245,HG8240 的flash的分区地址信息是这样的:3 S. n$ O& p; @: Z
  \! T/ H( a" n" ~
<uboot rotate_flag="0" address0="0x00000000" length0="0x00040000"/>+ t2 E' Q# L( N" i" v* H1 O6 Z3 ~* u
<flash_config rotate_flag="0" address0="0x00040000" length0="0x00001000"/>+ N1 [6 G3 L$ x- L- \. }
<system_param rotate_flag="0" address0="0x00041000" length0="0x0001f000"/>: {4 o/ o. q& p5 M3 T
<kernel rotate_flag="0" address0="0x00060000" length0="0x00180000"/>
' d9 w. M8 u" g. A<rootfs rotate_flag="0" address0="0x001e0000" length0="0x00900000"/>
0 P# a+ |, C% ~* F" |% ]<minisys rotate_flag="0" address0="0x00ae0000" length0="0x00380000"/>2 L$ \# Z* m: ^* g3 O4 M# I
<file_system rotate_flag="0" address0="0x00e60000" length0="0x00180000"/>' g: R1 U- K0 g3 \6 w5 A& i
<reserved rotate_flag="0" address0="0x00fe0000" length0="0x00020000"/>% f. J9 U+ S3 f/ v) R2 @' Q2 D4 \
6 W7 D1 n% |7 q, a0 \2 t. f
你参考,很简单。
$ h$ u' k- c& z! T+ U3 l7 J6 v
发表于 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擦除闪存。2 i6 h* ^, y) b
华为这个只有loadsystem,loaduboot等几个指令,是直接写入闪存的。
) G% X& Z5 j" P# i8 x$ r% G不知有无大神对华为这个猫有研究呢?
发表于 2016-2-4 00:51:53 | 显示全部楼层
弄好了么?话说开机的U-BOOT下面一行是不是就显示了偏移量?7 p% e* L; K. u( \, E* g+ A: f
U-Boot code: 90500000 -> 9051E974  BSS: -> 9055525C
发表于 2016-2-26 11:36:13 | 显示全部楼层
我按d怎么停步下来呢,哎
0 S- m+ W  W% K& b% r我是c2刷英文版了。郁闷啦
发表于 2016-2-26 22:44:08 | 显示全部楼层
持续关注楼主( q0 ~/ b' ]8 {- W7 c# ^
先顶顶顶!
发表于 2016-2-27 10:04:35 | 显示全部楼层
楼主我的8245盖子打开了,是那种无针的TTL,求教如何接线。
% `( |  F" i) K* c1 X) l  u; g另外TTL接上了以后我该用什么软件呢?谢!
发表于 2016-4-8 21:30:19 | 显示全部楼层
fa8800 发表于 2016-2-26 11:36# X% B/ v) h# L
我按d怎么停步下来呢,哎+ ]* }  Y8 }: y! C: S
我是c2刷英文版了。郁闷啦
1 v- P5 l6 T( w! _
找到方法没有呢,我的也停不下来?
*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|宽带技术网 |网站地图 粤公网安备44152102000001号

GMT+8, 2025-6-18 02:29 , Processed in 0.028605 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2020, Tencent Cloud.

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