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

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

[复制链接]

5

主题

79

回帖

424

积分

中级渣柚V1

积分
424
发表于 2019-10-9 15:22:10 | 显示全部楼层 |阅读模式
本帖最后由 tymfl 于 2019-10-11 23:47 编辑 " |% M/ i) B9 c) g4 {2 R% }8 A- O
0 d. `0 M' c+ z! B  W; K
入手一台伊拉克成色猫盘故障机,连好ttl上电以后
& C8 l) P& L9 T  X! B+ U9 m% m  w& r& e
  1. TIM-1.07 {* h7 x  f, `0 F
  2. WTMI-armada-17.10.1-0 e) K5 _: H. Y' A% S  s
  3. .........2 K; e6 ]7 T( q2 G2 N9 v
  4. SF: Detected GD25LQ64C with page size 256 Bytes, erase size 4 KiB, total 8 MiB
    / F- v9 C3 p& v. g, m7 A" M$ ]" @
  5. *** Warning - bad CRC, using default environment" M, V5 x& N0 i) o0 |' @& C

  6. , g# m0 p7 {3 X( h: J
  7. MMC:   for ssg ledsdhci@d8000: 0
    # q! o* P; P5 f' c/ ~
  8. ** File not found boot/armada-3720-customer0.dtb **% y  I& H" R* c: O3 f6 Z1 i
  9. ** File not found boot/armada-3720-customer0-minifs.dtb **7 ?: V1 y/ u3 m/ q6 D
  10. test_mmc_ext4_exist ==1
    ; q( O2 }0 E! E
  11. Comphy-0: UNCONNECTED  4 f5 C* F( X/ O$ \
  12. Comphy-1: UNCONNECTED  6 \$ }) C' H8 G; {; _. K: p0 [) m& M
  13. Comphy-2: UNCONNECTED  
    0 d! H- P. Y/ A, c9 G
  14. gpio: pin GPIO23 (gpio 39) value is 1
    , D: b/ a5 m5 o( n# T% d6 [( H
  15. ** File not found boot/armada-3720-customer0.dtb **
    ; Q8 w/ x0 R/ J( J4 f
  16. ** File not found boot/armada-3720-customer0-minifs.dtb **
    . }4 g! U/ d) x% f$ e$ \, p4 ^
  17. Enter Recovery mode1 X; x0 e+ M/ o: N1 a1 s% W
  18. SCSI:  Hit any key to stop autoboot:  0
复制代码
发现无法找到dtd文件,进入了恢复模式,直接启动或按住reset启动均启动失败,启动信息如下:( N0 {2 a  t2 |& A
  1. Marvell>> boot* l+ Y/ x4 j: u6 ^! X
  2. SF: Detected GD25LQ64C with page size 256 Bytes, erase size 4 KiB, total 8 MiB3 l% T/ y* ]6 v( Y
  3. device 0 offset 0xcc000, size 0x4340004 _7 G9 \9 K& g% i. X
  4. SF: 4407296 bytes @ 0xcc000 Read: OK
    , i& d* U; T$ h0 j' R
  5. gpio: pin GPIO21 (gpio 37) value is 1
    : ]! V2 t2 [2 L
  6. gpio: pin GPIO22 (gpio 38) value is 1
    * ^5 L: q, B) H/ @
  7. Uncompressed size: 8992256 = 0x893600
    2 n2 \7 P1 Z. c  h! a# t2 o
  8. device 0 offset 0xc8000, size 0x40009 D* A0 u+ h6 E1 @# Z
  9. SF: 16384 bytes @ 0xc8000 Read: OK
    5 ]$ Q% w* }* U; |) c8 {
  10. ## Flattened Device Tree blob at 04f000003 l6 _0 a5 S8 ?4 i/ L
  11.    Booting using the fdt blob at 0x4f00000
    3 s- m4 c) k" I7 R+ O# g/ m1 Y
  12.    Using Device Tree in place at 0000000004f00000, end 0000000004f05df8
    / v' \1 k/ Q3 X

  13. 1 M- y, x) _2 v! ]& y3 t/ c
  14. Starting kernel .../ a# ?0 D# P) J1 [
  15. $ z5 D3 G; w( x
  16. .........
    ; ~7 [" T- ~" e* Y, W
  17. [    2.786623]  mmcblk0: p1 p2 p3$ T# P6 X# c  y
  18. [    2.801201] Starting init: /sbin/init exists but couldn't execute it (error -5)
      N4 i' t, Y& @( N1 G' ^
  19. [    2.813804] cramfs: bad compressed blocksize 4294298135+ S! `! j5 ?6 I" n4 a
  20. [    2.819206] Starting init: /bin/sh exists but couldn't execute it (error -5)
    & o* T8 `3 H* ^3 [: D  S8 A: S
  21. [    2.826452] Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
    ( h8 B( F* |  I& S+ N7 {
  22. [    2.840101] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.4.52-armada-17.10.1 #21
    * H3 P' h5 a8 [6 `% S! D: U9 l
  23. [    2.847399] Hardware name: Marvell Armada 3720 for Eli-Cat DB-88F3720-DDR3 (DT); E4 b1 O0 @1 i# f4 ?8 N
  24. [    2.854957] Call trace:
    * J: V$ [7 a6 ]8 S0 i- X7 }
  25. [    2.857401] [<ffffffc000089b10>] dump_backtrace+0x0/0x108) y; P2 ]/ d* }- Z- t( c) q- L" [
  26. [    2.863150] [<ffffffc000089c2c>] show_stack+0x14/0x207 b" U" \1 g0 {  C
  27. [    2.868371] [<ffffffc00029f280>] dump_stack+0x98/0xb8$ B3 r) s$ g2 [. M# ~! F3 q, f
  28. [    2.873592] [<ffffffc00012b32c>] panic+0xd4/0x2185 l2 H$ x; f! x/ R1 M6 g
  29. [    2.878454] [<ffffffc000621d0c>] kernel_init+0xdc/0xe0& L/ Q7 }7 S$ V1 {/ F. B
  30. [    2.883761] [<ffffffc000085dd0>] ret_from_fork+0x10/0x408 v9 o' L+ k0 L1 @4 s/ M1 b
  31. [    2.888890] CPU0: stopping
    " v; B, B" ?; u9 L6 g, L
  32. [    2.891949] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.52-armada-17.10.1 #21
    % }: P: \. a/ \; m" V# u9 }/ M
  33. [    2.899505] Hardware name: Marvell Armada 3720 for Eli-Cat DB-88F3720-DDR3 (DT)! @/ {. r/ D' P" [' ?3 Y
  34. [    2.907154] Call trace:3 @% E& E, c& `
  35. [    2.909861] [<ffffffc000089b10>] dump_backtrace+0x0/0x108
    9 [' R$ j% k6 J( F/ n( o3 N
  36. [    2.915269] [<ffffffc000089c2c>] show_stack+0x14/0x20
    1 f  t  N9 j5 p2 p' }) q. s3 F
  37. [    2.920580] [<ffffffc00029f280>] dump_stack+0x98/0xb8
    1 u2 j. c- E3 l
  38. [    2.925892] [<ffffffc00008efc0>] handle_IPI+0x190/0x1a0; z) ]# N0 M( G0 l
  39. [    2.931030] [<ffffffc000082598>] gic_handle_irq+0x78/0x168
    1 V) `0 {) M- q
  40. [    2.936969] Exception stack(0xffffffc0008abda0 to 0xffffffc0008abed0)
    $ l/ W5 }# i- s* m
  41. [    2.943547] bda0: ffffffc0008ae000 0000008000000000 ffffffc0008abf00 ffffffc000086840
    % _1 ~7 q, k9 K5 F. T$ z
  42. [    2.951467] bdc0: 0000000000000145 ffffffc000890000 0000000000000000 0000000000000000
    + C) h1 g1 T$ j- I: B
  43. [    2.959567] bde0: 0000000000000001 0000000000000000 00000000000001c0 0100000000000000; j5 m9 j0 |# N7 ]9 Y
  44. [    2.967757] be00: 0000000000000001 ffffffc01bfcddc0 00000000fffeddda ffffffc0008abe80
    ( v: b& u: d5 c) q: Q' b
  45. [    2.975676] be20: 00000000000006d0 0000000000000000 0000000000000000 00000000058e8eff
    % A; M+ y8 g/ l  A# i1 P" v) f; C
  46. [    2.983954] be40: ffffffc00426c260 00000000000075af 00000000000ba7a2 0000000000000000; O7 ?* k4 y, S5 o
  47. [    2.991876] be60: ffffff8000058548 ffffffc0008ae000 ffffffc0008ae8d8 ffffffc00088cad88 R7 K' v" B$ `# o5 x
  48. [    2.999886] be80: ffffffc0008abf20 ffffffc000631000 ffffffc000890000 ffffffc0008ae000: b" w( H) A6 s2 r
  49. [    3.007986] bea0: ffffffc0008a8000 0000000000000000 0000000000000000 ffffffc0008abf00
    9 t. e! b  A; P& r! G' {2 i& Z: B
  50. [    3.016353] bec0: ffffffc00008683c ffffffc0008abf00
      u+ F7 O- b  }' l, M: ]) o
  51. [    3.021215] [<ffffffc000085700>] el1_irq+0x80/0xf8
    0 \4 j( B( {* G! f
  52. [    3.026168] [<ffffffc0000d8164>] default_idle_call+0x1c/0x38+ b0 J" U* _" @
  53. [    3.032373] [<ffffffc0000d8398>] cpu_startup_entry+0x1c8/0x218
    5 w6 S+ \2 U& n# [
  54. [    3.038411] [<ffffffc000621c20>] rest_init+0x88/0x98. `# u, x0 L3 G8 x
  55. [    3.043192] [<ffffffc00084d950>] start_kernel+0x384/0x398
    0 d' b3 j- R) a7 p7 b  U& U3 K
  56. [    3.048948] [<0000000000627000>] 0x627000" ~" l0 X5 j; u( w/ {) G/ I  X
  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 下获取的一些信息2 W1 Q. i8 N1 g1 f+ x! D* @/ {
  1. # 查看文件夹 发现boot为空
    ; Z. n0 ?8 j8 |) z. x
  2. Marvell>> ext4ls mmc 0:1 /boot
    . ^" T+ u; ]- M5 o2 q
  3. <DIR>       4096 .
      ~+ E( \& C% K. s" c( ?
  4. <DIR>       4096 ..3 d; P" N( U3 X8 u# \, t+ t4 U% z
  5. * T( `6 n* u. E
  6. # 无法启动usb- @$ p/ ?  G, j* ^5 Z
  7. Marvell>> usb start
    ( f  K$ E& U7 E
  8. starting USB...2 W9 a( b5 }. R) y0 Z1 ?$ q8 |0 e5 E& j
  9. No controllers found
复制代码
猜测可能是误删了/boot下的文件导致的,无法通过U盘启动
8 d( k, A2 y+ ~% [5 r2 q( B

3 W3 c! ~5 X  n! I5 a                               
登录/注册后可看大图
, g" K/ R" D; ^( Y
启动进入uboot输入如下命令& i, ~8 v' H$ H: b( o
  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;"
    & j6 Q; @# Y0 P
  2. setenv bootargs "console=ttyMV0,115200 root=/dev/mmcblk0p1 rootwait rw init=/bin/sh"
    0 U/ ^4 @! G  x. Y' ~- K
  3. boot# m% d" J# M  D# Y$ V* I* w2 J& U
  4. booti 0x5000000 - 0x4f00000
复制代码
即可进入linux shell. \6 d& s1 H% K+ O
  1. # 查看存储设备
    . N5 M# _: x$ d  Y5 c- X+ ~) {
  2. ls -l /dev/sd
    ! l9 D- M; O, b/ A
  3. 5 ?8 X8 s7 i% l7 [" x/ X" R0 x
  4. # 挂载
    - F1 a" u" }1 l% i3 a+ h3 Q
  5. mount -t proc /proc
    7 J) Q6 M1 F& v
  6. mount /dev/sda4 /mnt
    0 Y, J- l3 P; u, T3 V8 i! i+ g* B

  7. 7 ^8 S7 Z7 Y9 M# n
  8. # 拷贝文件6 [" G: Q$ R: D0 _$ J# j  ?
  9. cd /mnt
    0 P8 N3 f6 p( L
  10. cp armada-3720-customer0.dtb /boot/
    1 i- k5 J4 X6 v! p7 d1 @
  11. cp Image /boot/
    7 W) [  O+ G$ p: q3 g9 ~7 ^

  12. 2 i3 ^" y. S# [. `
  13. # 退出
    ! F* U  ^2 K% v# ~) H/ Q3 j" E6 R
  14. exit
复制代码
重新插拔电源后恢复正常,uboot信息如下:+ V5 I& [" a- ~  _
  1. TIM-1.0' l5 y: b% J% J9 l+ X
  2. WTMI-armada-17.10.1-2 z2 v/ h* J7 U
  3. ENTER init_ddrgen
    3 K& @- \4 K7 {( \5 m1 Y; z  P$ t
  4. DDR_TOPOLOGY is 0 :        DDR3, 1CS 512M
    $ v$ A9 g2 m* T: J/ P& I" i6 ~
  5. WTMI_CLOCK=2- H& P5 ^* O/ h' U! b

  6. 0 O4 z) ?' ?0 b0 `3 F7 |4 h
  7. Fill memory before self refresh...done+ l' e5 F6 k5 q9 @! s6 w; N; m
  8.   y+ D* X; t, x& A) E5 V1 U
  9. Now in Self-refresh Mode$ Z$ C2 s) A1 r" O8 [
  10. Restore CAS Read and Write Latency
    4 J! Z$ N6 K: L3 t, d. I- r
  11. Restore termination values to original values4 [2 e# ]: f8 u+ D0 p# e
  12. Exited self-refresh ...
    ; L! d6 _# d: O

  13. , d; v' _, I9 s4 O
  14. DLL TUNING" e0 B. l; {2 x2 i8 |
  15. ==============. [: B; k3 Z6 a0 C( N, k3 w
  16.    DLL 0xc0001050[21:16]: [0,31,18]
    2 w+ Q/ W8 b: ]8 T* z7 ~
  17.    DLL 0xc0001050[29:24]: [0,2b,15]! O9 ~% X: H/ s1 h0 O3 X
  18.    DLL 0xc0001054[21:16]: [0,32,19]
    ' W/ }$ ?: ~/ d. b1 b
  19.    DLL 0xc0001054[29:24]: [0,2d,16], X% `; P- L7 v& L* w/ i
  20.    DLL 0xc0001074[21:16]: [0,3f,1f]5 U* v! p# `  f: ?6 |
  21.    DLL 0xc0001074
    / J6 G: u6 ]' |
  22. . i0 E" |  }$ u1 p3 y
  23. U-Boot 2017.03-armada-17.10.1 (Mar 07 2018 - 17:11:33 +0800)5 {4 I  k" @; b
  24. 7 r' V0 l# F& P
  25. Model: Marvell Armada 3720 for Eli Cat
    % p; |, Q# ?' J4 ]4 [0 |' q
  26.        CPU    @ 1000 [MHz]
    ) b$ J5 K& p8 a
  27.        L2     @ 800 [MHz]
    ' R" o3 U, m1 x* w" l5 I
  28.        TClock @ 200 [MHz]* }  D  k- ]; ~, B3 k) j6 ]
  29.        DDR    @ 800 [MHz]
    / t% M3 D- @9 C8 G9 a$ E4 v" K
  30. I2C:   ready
    ( T3 N3 f" U/ B8 e1 V. q' V
  31. DRAM:  512 MiB
    8 B' a* p1 d# r
  32. U-Boot DT blob at : 000000001f73a520
    2 l% b, W9 z- T, J
  33. SF: Detected GD25LQ64C with page size 256 Bytes, erase size 4 KiB, total 8 MiB
    & H6 ^) J/ \+ s2 `; i
  34. *** Warning - bad CRC, using default environment4 W& i8 o* a0 ?4 J  \  A
  35. 1 `( Y1 t% z5 y  V+ F+ V3 {
  36. MMC:   for ssg ledsdhci@d8000: 04 [5 }( h5 O/ ]
  37. 12931 bytes read in 16 ms (789.1 KiB/s)9 g3 X. a. A* H5 z' f; P
  38. gpio: pin GPIO23 (gpio 39) value is 1% y' l. P( R  E# J, M* p
  39. gpio: pin GPIO23 (gpio 39) value is 1
    - I/ e% s# i) d
  40. gpio: pin GPIO23 (gpio 39) value is 11 g' X6 a0 h9 u, |
  41. Comphy-0: USB3_HOST0    5 Gbps    8 T( m; x, N# U5 i' K
  42. Comphy-1: SGMII0        1.25 Gbps & T9 d2 I( m! H/ _: A
  43. Comphy-2: SATA0         6 Gbps   
    2 P4 y* w! ~* l: S8 L
  44. gpio: pin GPIO23 (gpio 39) value is 1. B/ t  c0 @9 C  Y
  45. 12931 bytes read in 4 ms (3.1 MiB/s)
    " Y* o* u7 q+ |1 y( ]' e' i
  46. Enter Normal mode9 Y! i- H% C% K8 M0 J! u
  47. SCSI:  Hit any key to stop autoboot:  0
复制代码
( z- h/ c  ?& \
补充下:这样修改后,只能一次有效请删除mmc 0:3 分区的rootfs.tar.bz2和upgrade_eli_38.img文件。
: n3 g  ?% ]7 p+ q% T3 ]6 i" `或者直接在linux shell里面刷写新uboot
# R) Y! _# x. U- }8 y) \1 f8 J( E6 n: h0 Y8 {5 ~4 r8 W1 D

4 d! j( N9 ]1 g: B
  n% ?% X) r8 u5 {( B

评分

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

查看全部评分

5

主题

57

回帖

491

积分

中级渣柚V1

积分
491
发表于 2019-10-9 15:50:15 | 显示全部楼层
本帖最后由 xingjiwoniu 于 2019-10-9 16:00 编辑
! s6 g- J- b1 y: @' }/ x$ H+ s* {5 K$ z) }9 q2 I. d3 g# t
感谢分享

4

主题

78

回帖

706

积分

中级渣柚V2

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

7

主题

450

回帖

706

积分

中级渣柚V2

积分
706

热心会员

发表于 2019-10-9 17:09:08 | 显示全部楼层
感谢分享
. ~  Q# |7 l* m$ _% M* `

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:25+ Z, E* W/ }" q* z1 F6 j
按照你这个执行不成功啊

3 z1 D6 H4 k% U( {. c7 w还是提示找不到?

0

主题

12

回帖

40

积分

初级渣柚V1

积分
40
发表于 2019-10-9 20:45:54 | 显示全部楼层
顶一下顶一下
2 ?$ T1 W1 A. G6 L6 O

4

主题

114

回帖

323

积分

中级渣柚V1

积分
323
发表于 2019-10-9 20:48:03 | 显示全部楼层
tymfl 发表于 2019-10-9 20:36
6 W8 Y. O: T2 O; b3 }! ]" w1 R" C还是提示找不到?
) `% U7 _# n' L
是还是原样子,启动还是end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
) ^! n' }( S) a6 L$ h完全按照您的步骤做的
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-12-22 11:33 , Processed in 0.053193 second(s), 6 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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