找回密码
 立即注册
查看: 11709|回复: 41

[教程] 猫盘故障机的自我救赎

[复制链接]

5

主题

79

回帖

424

积分

中级渣柚V1

积分
424
发表于 2019-10-9 15:22:10 | 显示全部楼层 |阅读模式
本帖最后由 tymfl 于 2019-10-11 23:47 编辑
; V6 N8 Z5 h! j5 B: g2 p3 U/ C5 w/ V! [# z% x& L! n
入手一台伊拉克成色猫盘故障机,连好ttl上电以后
3 y( X0 H- c1 |/ L% {; p0 M1 F7 m. U
  1. TIM-1.0
    6 D. x( }/ [$ _" F# D. p
  2. WTMI-armada-17.10.1-! d# G* m5 y% W7 Z% @/ d
  3. .........
    2 i  ^, d: w+ A5 C
  4. SF: Detected GD25LQ64C with page size 256 Bytes, erase size 4 KiB, total 8 MiB# y5 U" {2 R1 p# n
  5. *** Warning - bad CRC, using default environment2 X" e. r( U2 }; }6 f
  6. ; Y- z: j- a9 V5 i" Z
  7. MMC:   for ssg ledsdhci@d8000: 02 H$ x6 K4 m, l  X. x: y
  8. ** File not found boot/armada-3720-customer0.dtb **
    + H4 u1 P% D' {2 K( c: u2 c
  9. ** File not found boot/armada-3720-customer0-minifs.dtb **
    & X1 W% A3 N* W3 s" A" f' C" B
  10. test_mmc_ext4_exist ==1+ P5 ~5 D. W7 M3 c' B8 U
  11. Comphy-0: UNCONNECTED  
    6 T8 r8 u$ @. y* P
  12. Comphy-1: UNCONNECTED  4 K% b! z- u7 G# X+ [( F" S- z
  13. Comphy-2: UNCONNECTED  
    # I3 [% f9 y7 F) m
  14. gpio: pin GPIO23 (gpio 39) value is 1
    $ X# i/ Z* n- N' h& k: H" `
  15. ** File not found boot/armada-3720-customer0.dtb **& p& v* E" M: d6 B/ T  H* k
  16. ** File not found boot/armada-3720-customer0-minifs.dtb **
    8 }' T5 U  K) I, A! y0 P- b
  17. Enter Recovery mode
    ) k- J, R9 q% w7 m
  18. SCSI:  Hit any key to stop autoboot:  0
复制代码
发现无法找到dtd文件,进入了恢复模式,直接启动或按住reset启动均启动失败,启动信息如下:
0 w0 X: b/ _6 r7 X2 v' G  B
  1. Marvell>> boot
    ; t; d5 Y+ Z  x& Y- Q$ l- @% n
  2. SF: Detected GD25LQ64C with page size 256 Bytes, erase size 4 KiB, total 8 MiB
    0 L" l$ q9 u* \
  3. device 0 offset 0xcc000, size 0x434000
    ; H- r+ v3 }6 D7 P# z' \/ b5 {
  4. SF: 4407296 bytes @ 0xcc000 Read: OK
    4 ]! w/ y: r$ z* p) \" _( I/ a" U
  5. gpio: pin GPIO21 (gpio 37) value is 1
    $ d$ q6 n1 ~4 B, @7 {9 `2 T  o
  6. gpio: pin GPIO22 (gpio 38) value is 19 ^. ^( [) D7 Y5 J
  7. Uncompressed size: 8992256 = 0x893600
    ! L1 f0 z. X" G0 y5 B8 c+ S: S( M* j
  8. device 0 offset 0xc8000, size 0x4000
    2 P& r2 G) A) x) n( ~7 m7 m9 t3 o+ C
  9. SF: 16384 bytes @ 0xc8000 Read: OK
    7 x# i; h( q0 Z5 |9 V% a# V
  10. ## Flattened Device Tree blob at 04f00000/ |  H4 G( d  h! G" P" k7 D
  11.    Booting using the fdt blob at 0x4f00000$ ?8 F. S- O& E/ I) t* x7 a1 U
  12.    Using Device Tree in place at 0000000004f00000, end 0000000004f05df87 A/ P. ?' _" M) C# K# t3 c5 p
  13. ! o8 c5 t1 l! S. d$ q
  14. Starting kernel ...+ J" \2 C, a5 ]$ a

  15. + H, Z3 B8 Q/ `- ~% o( c& Q
  16. .........% ]. ]4 n# Q; B% Q5 P' M7 q/ S
  17. [    2.786623]  mmcblk0: p1 p2 p3
    " {; C* j( Z4 F2 M+ p
  18. [    2.801201] Starting init: /sbin/init exists but couldn't execute it (error -5)2 ]0 y  W- y% Y8 ^4 L
  19. [    2.813804] cramfs: bad compressed blocksize 4294298135
    % s4 l$ O1 ?4 {1 K
  20. [    2.819206] Starting init: /bin/sh exists but couldn't execute it (error -5)
    1 e1 T, C$ i) P( U# ^, C
  21. [    2.826452] Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
    $ f  _0 e0 \$ }$ t5 `/ K( G+ J: r
  22. [    2.840101] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.4.52-armada-17.10.1 #21
    + _, F9 n; G5 H" h4 K/ ?% s
  23. [    2.847399] Hardware name: Marvell Armada 3720 for Eli-Cat DB-88F3720-DDR3 (DT)
    8 K8 t; T: @7 r6 e8 A1 Q4 o0 Z
  24. [    2.854957] Call trace:
    " r% x. `8 C7 x2 t  B8 h
  25. [    2.857401] [<ffffffc000089b10>] dump_backtrace+0x0/0x108% F* K% w9 p# _. ~, A; G/ e
  26. [    2.863150] [<ffffffc000089c2c>] show_stack+0x14/0x20
    " D4 t8 ~+ @4 u! y, @
  27. [    2.868371] [<ffffffc00029f280>] dump_stack+0x98/0xb8
    9 Q. x( D# w* D) W
  28. [    2.873592] [<ffffffc00012b32c>] panic+0xd4/0x218
    + W5 F# ~3 |. N
  29. [    2.878454] [<ffffffc000621d0c>] kernel_init+0xdc/0xe0' {0 V8 A; V7 x( O: a, u4 f4 _
  30. [    2.883761] [<ffffffc000085dd0>] ret_from_fork+0x10/0x40
    - j4 u7 v& H) \, y2 S+ }
  31. [    2.888890] CPU0: stopping
    8 p* _$ [; E& [+ a3 ]
  32. [    2.891949] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.52-armada-17.10.1 #21; b+ |6 P- ]) j1 v% p0 l; X' l
  33. [    2.899505] Hardware name: Marvell Armada 3720 for Eli-Cat DB-88F3720-DDR3 (DT)
    ( c+ @) v5 u3 I. O
  34. [    2.907154] Call trace:
    / f4 z3 S8 y  T8 S% X
  35. [    2.909861] [<ffffffc000089b10>] dump_backtrace+0x0/0x1086 j0 I' Z7 D' w7 ?+ l! v
  36. [    2.915269] [<ffffffc000089c2c>] show_stack+0x14/0x20# c8 f: p7 E" n; L8 O- A7 H- h
  37. [    2.920580] [<ffffffc00029f280>] dump_stack+0x98/0xb8
    + A' }( y3 F5 ]! \/ y3 c0 z9 F" _
  38. [    2.925892] [<ffffffc00008efc0>] handle_IPI+0x190/0x1a0
    7 Y7 B( `, _& N6 R" ^" d
  39. [    2.931030] [<ffffffc000082598>] gic_handle_irq+0x78/0x168: H, N$ H, f2 s, }/ j$ h3 |2 S
  40. [    2.936969] Exception stack(0xffffffc0008abda0 to 0xffffffc0008abed0)
    1 w- a4 L( }6 p- b7 ~
  41. [    2.943547] bda0: ffffffc0008ae000 0000008000000000 ffffffc0008abf00 ffffffc000086840
    " }4 {8 H. ~! E8 N( @; S6 H
  42. [    2.951467] bdc0: 0000000000000145 ffffffc000890000 0000000000000000 0000000000000000
      s7 \) u2 \( R
  43. [    2.959567] bde0: 0000000000000001 0000000000000000 00000000000001c0 0100000000000000  ~  Y4 R- k2 X# F/ y; M
  44. [    2.967757] be00: 0000000000000001 ffffffc01bfcddc0 00000000fffeddda ffffffc0008abe80( f7 X  S4 l& d0 j( f3 m/ Z+ Y
  45. [    2.975676] be20: 00000000000006d0 0000000000000000 0000000000000000 00000000058e8eff4 n  b4 c2 ]4 F9 s7 u1 `8 N5 W! M
  46. [    2.983954] be40: ffffffc00426c260 00000000000075af 00000000000ba7a2 0000000000000000
      B  F, W1 w0 l; a
  47. [    2.991876] be60: ffffff8000058548 ffffffc0008ae000 ffffffc0008ae8d8 ffffffc00088cad8
    3 J, ]$ h5 P# n6 G# M
  48. [    2.999886] be80: ffffffc0008abf20 ffffffc000631000 ffffffc000890000 ffffffc0008ae000" r$ ]! ?' d5 F
  49. [    3.007986] bea0: ffffffc0008a8000 0000000000000000 0000000000000000 ffffffc0008abf00
    3 d& V4 w' n1 W$ T, a; f" Y
  50. [    3.016353] bec0: ffffffc00008683c ffffffc0008abf002 `  J# k6 ]6 S% u' F, T. F
  51. [    3.021215] [<ffffffc000085700>] el1_irq+0x80/0xf8/ p8 u( E6 I0 i  i- G; Q4 k: ^7 F; F) K
  52. [    3.026168] [<ffffffc0000d8164>] default_idle_call+0x1c/0x38
      k0 j* q+ y. v! P
  53. [    3.032373] [<ffffffc0000d8398>] cpu_startup_entry+0x1c8/0x218
    % y) b3 i6 D( k0 Y" {0 G0 [5 y
  54. [    3.038411] [<ffffffc000621c20>] rest_init+0x88/0x98
    ) f7 i( W. Z5 p3 i1 p7 b
  55. [    3.043192] [<ffffffc00084d950>] start_kernel+0x384/0x398
    5 N6 b* i( d  P0 V& u8 V% Y3 g
  56. [    3.048948] [<0000000000627000>] 0x6270008 {: z% a# S2 {, U5 ?3 p
  57. [    3.053272] ---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
复制代码
uboot 下获取的一些信息
) d9 {" X( {' v" b5 K4 }
  1. # 查看文件夹 发现boot为空( |5 h& r) H3 _5 ~0 i' P
  2. Marvell>> ext4ls mmc 0:1 /boot2 M1 c; `8 o  t  m5 A
  3. <DIR>       4096 .* ?# l$ ~( b/ _. M4 h: i
  4. <DIR>       4096 ..
    ' \. M" J8 Y* Z; u

  5. 6 p+ Y- o# ~* @# G4 k. D$ u& `. K
  6. # 无法启动usb
    3 M) z3 q* m% [2 z7 y
  7. Marvell>> usb start8 ~5 T8 @# ~$ e' F- C+ W  }9 j
  8. starting USB...
    : N2 N8 w# p  L8 ?5 @+ D; g' A. A
  9. No controllers found
复制代码
猜测可能是误删了/boot下的文件导致的,无法通过U盘启动
6 |; ~: m0 L3 o7 ?/ i. i

  h$ y3 K5 K: P  s                               
登录/注册后可看大图

5 z  w% q$ E, E; ]2 x1 x3 g# N0 v1 {启动进入uboot输入如下命令
5 ~# P& ?2 j  P  T
  1. setenv bootcmd "sf probe 0;sf read 0x8000000 0x0CC000 0x434000;gpio set GPIO21;gpio set GPIO22;unzip 0x8000000 0x5000000;sf read 0x4f00000 0x0c8000 4000;"- k+ F3 z7 c" y  [- U
  2. setenv bootargs "console=ttyMV0,115200 root=/dev/mmcblk0p1 rootwait rw init=/bin/sh"' v# l9 a) v: x1 `9 g
  3. boot
    ' p$ T+ F/ I. d9 k  ~- v7 d% H
  4. booti 0x5000000 - 0x4f00000
复制代码
即可进入linux shell8 I( v, P# H3 Y' p
  1. # 查看存储设备8 c# q7 K9 T0 t! J& ~& l" j
  2. ls -l /dev/sd
    : ], X8 K8 ^; |3 z/ U
  3.   A% B: O  _! L7 S
  4. # 挂载) _$ v' w% ?# j" i
  5. mount -t proc /proc5 w) k+ y, }% p
  6. mount /dev/sda4 /mnt
    - S5 B+ C( m0 J& d
  7. 9 T# d. ]3 E8 B! W
  8. # 拷贝文件! Q* k# w* ?) S2 T
  9. cd /mnt0 E- v6 H6 Q% f; B6 X6 A# q5 q
  10. cp armada-3720-customer0.dtb /boot/
    / \2 W9 b0 ^" L8 d
  11. cp Image /boot/
      b  a, n' \: `" e2 S
  12. 5 `  \  N) F/ F+ d! t( w/ i
  13. # 退出( q! [: B, H6 [% p! O- q6 q
  14. exit
复制代码
重新插拔电源后恢复正常,uboot信息如下:
! R5 V. x6 R. T+ V6 Q/ Y$ _
  1. TIM-1.0
    / ], X4 r  R1 q4 d5 t0 Q8 e( U
  2. WTMI-armada-17.10.1-
    6 ~* K/ ?3 z: Z: k2 W
  3. ENTER init_ddrgen/ m3 h2 `4 ~. M2 z: O+ S" `
  4. DDR_TOPOLOGY is 0 :        DDR3, 1CS 512M
    # m0 ?0 A6 y- p) @
  5. WTMI_CLOCK=2
    ' a) A2 l$ \! _2 U7 M
  6. 5 @- ~" V3 p/ }( y+ Q5 j# I
  7. Fill memory before self refresh...done
    8 Q. J( ?5 q' v% o) c5 S
  8. : D' T$ l) U) D7 b* m, d$ s# T
  9. Now in Self-refresh Mode
    $ {7 _" s( }4 T, O
  10. Restore CAS Read and Write Latency8 z! O! \7 E" u( N7 j& B; y7 V
  11. Restore termination values to original values
    5 j# {: H" r3 D! y! N
  12. Exited self-refresh ...
    % a6 J0 g$ j6 e+ f) A5 E  ]. r6 K
  13. " r& e! X0 N% [, L. ~
  14. DLL TUNING1 e/ q+ A: v1 z  U) O  m8 B9 W
  15. ==============
    ( g4 R0 I, e4 @0 a8 J5 j
  16.    DLL 0xc0001050[21:16]: [0,31,18]
    ' `; K* c7 S0 f. o; I9 N
  17.    DLL 0xc0001050[29:24]: [0,2b,15]6 V1 v* }) I: x+ T- w' {
  18.    DLL 0xc0001054[21:16]: [0,32,19]& s2 W- H& r2 O: d
  19.    DLL 0xc0001054[29:24]: [0,2d,16]! R$ i( c3 H7 I: p7 }
  20.    DLL 0xc0001074[21:16]: [0,3f,1f]
    ) W+ w6 D  {8 b" R9 X; Z( T
  21.    DLL 0xc0001074; ^0 ?- C( A2 n+ `- L0 x
  22. & c$ `3 D' H! t
  23. U-Boot 2017.03-armada-17.10.1 (Mar 07 2018 - 17:11:33 +0800), f' l% x% Q* q5 U1 e4 c
  24.   c4 |. [% `3 A( \
  25. Model: Marvell Armada 3720 for Eli Cat6 D3 q0 W4 X4 ^6 E( Z% M$ H! i
  26.        CPU    @ 1000 [MHz]
    & A/ n0 W$ |% i, Y$ f
  27.        L2     @ 800 [MHz]* |; f; y. j( n  z7 X: S
  28.        TClock @ 200 [MHz]
    - k' }: s; b6 r3 l3 s" n& [2 J& f/ D
  29.        DDR    @ 800 [MHz]  ^0 X* {7 c2 Y- b! K4 ]
  30. I2C:   ready
    8 L9 p% A' _2 `8 w  n! O
  31. DRAM:  512 MiB: f" o* Q$ g) D
  32. U-Boot DT blob at : 000000001f73a520
    + {' s/ Q6 g6 e4 a6 G* G. f
  33. SF: Detected GD25LQ64C with page size 256 Bytes, erase size 4 KiB, total 8 MiB
    4 D: A, S5 ^+ \
  34. *** Warning - bad CRC, using default environment2 {( e; l' H+ x# y$ e2 q6 I
  35. 8 t) J4 @2 O/ r$ z0 f
  36. MMC:   for ssg ledsdhci@d8000: 0
    . L6 n! D" J. D+ h+ Y
  37. 12931 bytes read in 16 ms (789.1 KiB/s)' }1 ]  c/ d7 G+ \7 t
  38. gpio: pin GPIO23 (gpio 39) value is 1) o4 y6 ~+ Z- M+ U
  39. gpio: pin GPIO23 (gpio 39) value is 19 R/ z! Q0 K3 f; a
  40. gpio: pin GPIO23 (gpio 39) value is 17 s4 l0 @6 d5 m! c
  41. Comphy-0: USB3_HOST0    5 Gbps   
    ; ?" l; f: V9 i9 E/ x. q! E2 X$ L. s' ?
  42. Comphy-1: SGMII0        1.25 Gbps 4 K& S- P' y8 x8 @3 f
  43. Comphy-2: SATA0         6 Gbps    5 B4 J& V: U9 d
  44. gpio: pin GPIO23 (gpio 39) value is 1
    - v% [1 A, K- ]4 J4 w" y0 K9 u
  45. 12931 bytes read in 4 ms (3.1 MiB/s)
    3 M0 ~5 b  h% F  y1 u0 Q9 S
  46. Enter Normal mode7 ]; P3 \+ ^; G/ ^4 j
  47. SCSI:  Hit any key to stop autoboot:  0
复制代码
* s" i0 K9 Q; K, n4 C' c5 L# k
补充下:这样修改后,只能一次有效请删除mmc 0:3 分区的rootfs.tar.bz2和upgrade_eli_38.img文件。% [/ O  K& d3 c3 c7 u4 G5 G6 V8 y
或者直接在linux shell里面刷写新uboot
$ s5 I7 _6 Q( Z* `- I9 n& |4 p5 _3 K- x7 r% Q+ O7 n
$ l  A$ C7 q: c* @9 ^+ q

0 Z. Y6 Y) V7 j4 P$ p& O: _0 i

评分

参与人数 2渣金 +4 收起 理由
zxjwwwh + 1 很给力!
断章 + 3 很给力!

查看全部评分

5

主题

57

回帖

491

积分

中级渣柚V1

积分
491
发表于 2019-10-9 15:50:15 | 显示全部楼层
本帖最后由 xingjiwoniu 于 2019-10-9 16:00 编辑
' y" [8 V$ r, N& t
" K/ v3 a0 e( r2 d8 d& W3 i) d感谢分享

4

主题

78

回帖

706

积分

中级渣柚V2

积分
706
发表于 2019-10-9 16:07:37 | 显示全部楼层
谢谢分享

7

主题

450

回帖

706

积分

中级渣柚V2

积分
706

热心会员

发表于 2019-10-9 17:09:08 | 显示全部楼层
感谢分享, g) P& H  o5 }; |# ?

1

主题

20

回帖

204

积分

中级渣柚V1

积分
204
发表于 2019-10-9 17:10:58 | 显示全部楼层
收藏 感谢!

4

主题

114

回帖

323

积分

中级渣柚V1

积分
323
发表于 2019-10-9 20:25:44 | 显示全部楼层
按照你这个执行不成功啊

5

主题

79

回帖

424

积分

中级渣柚V1

积分
424
 楼主| 发表于 2019-10-9 20:36:10 | 显示全部楼层
GokuSun 发表于 2019-10-9 20:253 F$ C" D# T  O& u3 n& I  O: k
按照你这个执行不成功啊
3 q+ K4 l3 o4 N% a. Z$ d
还是提示找不到?

0

主题

12

回帖

40

积分

初级渣柚V1

积分
40
发表于 2019-10-9 20:45:54 | 显示全部楼层
顶一下顶一下1 H6 ~8 W" z1 l# ^

4

主题

114

回帖

323

积分

中级渣柚V1

积分
323
发表于 2019-10-9 20:48:03 | 显示全部楼层
tymfl 发表于 2019-10-9 20:36# G; B- F4 O3 o3 M, c
还是提示找不到?

( d/ u7 v: [9 J. A8 J2 d) R# [是还是原样子,启动还是end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
4 u" k, `! k8 g: A完全按照您的步骤做的
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|矿渣社区 ( 黔ICP备2024020525号-1 )

GMT+8, 2024-12-22 17:39 , Processed in 0.052362 second(s), 4 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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