猫盘故障机的自我救赎
本帖最后由 tymfl 于 2019-10-11 23:47 编辑入手一台伊拉克成色猫盘故障机,连好ttl上电以后
TIM-1.0
WTMI-armada-17.10.1-
.........
SF: Detected GD25LQ64C with page size 256 Bytes, erase size 4 KiB, total 8 MiB
*** Warning - bad CRC, using default environment
MMC: for ssg ledsdhci@d8000: 0
** File not found boot/armada-3720-customer0.dtb **
** File not found boot/armada-3720-customer0-minifs.dtb **
test_mmc_ext4_exist ==1
Comphy-0: UNCONNECTED
Comphy-1: UNCONNECTED
Comphy-2: UNCONNECTED
gpio: pin GPIO23 (gpio 39) value is 1
** File not found boot/armada-3720-customer0.dtb **
** File not found boot/armada-3720-customer0-minifs.dtb **
Enter Recovery mode
SCSI:Hit any key to stop autoboot:0 发现无法找到dtd文件,进入了恢复模式,直接启动或按住reset启动均启动失败,启动信息如下:
Marvell>> boot
SF: Detected GD25LQ64C with page size 256 Bytes, erase size 4 KiB, total 8 MiB
device 0 offset 0xcc000, size 0x434000
SF: 4407296 bytes @ 0xcc000 Read: OK
gpio: pin GPIO21 (gpio 37) value is 1
gpio: pin GPIO22 (gpio 38) value is 1
Uncompressed size: 8992256 = 0x893600
device 0 offset 0xc8000, size 0x4000
SF: 16384 bytes @ 0xc8000 Read: OK
## Flattened Device Tree blob at 04f00000
Booting using the fdt blob at 0x4f00000
Using Device Tree in place at 0000000004f00000, end 0000000004f05df8
Starting kernel ...
.........
[ 2.786623]mmcblk0: p1 p2 p3
[ 2.801201] Starting init: /sbin/init exists but couldn't execute it (error -5)
[ 2.813804] cramfs: bad compressed blocksize 4294298135
[ 2.819206] Starting init: /bin/sh exists but couldn't execute it (error -5)
[ 2.826452] Kernel panic - not syncing: No working init found.Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[ 2.840101] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.4.52-armada-17.10.1 #21
[ 2.847399] Hardware name: Marvell Armada 3720 for Eli-Cat DB-88F3720-DDR3 (DT)
[ 2.854957] Call trace:
[ 2.857401] [<ffffffc000089b10>] dump_backtrace+0x0/0x108
[ 2.863150] [<ffffffc000089c2c>] show_stack+0x14/0x20
[ 2.868371] [<ffffffc00029f280>] dump_stack+0x98/0xb8
[ 2.873592] [<ffffffc00012b32c>] panic+0xd4/0x218
[ 2.878454] [<ffffffc000621d0c>] kernel_init+0xdc/0xe0
[ 2.883761] [<ffffffc000085dd0>] ret_from_fork+0x10/0x40
[ 2.888890] CPU0: stopping
[ 2.891949] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.52-armada-17.10.1 #21
[ 2.899505] Hardware name: Marvell Armada 3720 for Eli-Cat DB-88F3720-DDR3 (DT)
[ 2.907154] Call trace:
[ 2.909861] [<ffffffc000089b10>] dump_backtrace+0x0/0x108
[ 2.915269] [<ffffffc000089c2c>] show_stack+0x14/0x20
[ 2.920580] [<ffffffc00029f280>] dump_stack+0x98/0xb8
[ 2.925892] [<ffffffc00008efc0>] handle_IPI+0x190/0x1a0
[ 2.931030] [<ffffffc000082598>] gic_handle_irq+0x78/0x168
[ 2.936969] Exception stack(0xffffffc0008abda0 to 0xffffffc0008abed0)
[ 2.943547] bda0: ffffffc0008ae000 0000008000000000 ffffffc0008abf00 ffffffc000086840
[ 2.951467] bdc0: 0000000000000145 ffffffc000890000 0000000000000000 0000000000000000
[ 2.959567] bde0: 0000000000000001 0000000000000000 00000000000001c0 0100000000000000
[ 2.967757] be00: 0000000000000001 ffffffc01bfcddc0 00000000fffeddda ffffffc0008abe80
[ 2.975676] be20: 00000000000006d0 0000000000000000 0000000000000000 00000000058e8eff
[ 2.983954] be40: ffffffc00426c260 00000000000075af 00000000000ba7a2 0000000000000000
[ 2.991876] be60: ffffff8000058548 ffffffc0008ae000 ffffffc0008ae8d8 ffffffc00088cad8
[ 2.999886] be80: ffffffc0008abf20 ffffffc000631000 ffffffc000890000 ffffffc0008ae000
[ 3.007986] bea0: ffffffc0008a8000 0000000000000000 0000000000000000 ffffffc0008abf00
[ 3.016353] bec0: ffffffc00008683c ffffffc0008abf00
[ 3.021215] [<ffffffc000085700>] el1_irq+0x80/0xf8
[ 3.026168] [<ffffffc0000d8164>] default_idle_call+0x1c/0x38
[ 3.032373] [<ffffffc0000d8398>] cpu_startup_entry+0x1c8/0x218
[ 3.038411] [<ffffffc000621c20>] rest_init+0x88/0x98
[ 3.043192] [<ffffffc00084d950>] start_kernel+0x384/0x398
[ 3.048948] [<0000000000627000>] 0x627000
[ 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 下获取的一些信息
# 查看文件夹 发现boot为空
Marvell>> ext4ls mmc 0:1 /boot
<DIR> 4096 .
<DIR> 4096 ..
# 无法启动usb
Marvell>> usb start
starting USB...
No controllers found猜测可能是误删了/boot下的文件导致的,无法通过U盘启动
static/image/hrline/5.gif
启动进入uboot输入如下命令
setenv bootcmd "sf probe 0;sf read 0x8000000 0x0CC000 0x434000;gpio set GPIO21;gpio set GPIO22;unzip 0x8000000 0x5000000;sf read 0x4f00000 0x0c8000 4000;"
setenv bootargs "console=ttyMV0,115200 root=/dev/mmcblk0p1 rootwait rw init=/bin/sh"
boot
booti 0x5000000 - 0x4f00000即可进入linux shell
# 查看存储设备
ls -l /dev/sd
# 挂载
mount -t proc /proc
mount /dev/sda4 /mnt
# 拷贝文件
cd /mnt
cp armada-3720-customer0.dtb /boot/
cp Image /boot/
# 退出
exit重新插拔电源后恢复正常,uboot信息如下:
TIM-1.0
WTMI-armada-17.10.1-
ENTER init_ddrgen
DDR_TOPOLOGY is 0 : DDR3, 1CS 512M
WTMI_CLOCK=2
Fill memory before self refresh...done
Now in Self-refresh Mode
Restore CAS Read and Write Latency
Restore termination values to original values
Exited self-refresh ...
DLL TUNING
==============
DLL 0xc0001050:
DLL 0xc0001050:
DLL 0xc0001054:
DLL 0xc0001054:
DLL 0xc0001074:
DLL 0xc0001074
U-Boot 2017.03-armada-17.10.1 (Mar 07 2018 - 17:11:33 +0800)
Model: Marvell Armada 3720 for Eli Cat
CPU @ 1000
L2 @ 800
TClock @ 200
DDR @ 800
I2C: ready
DRAM:512 MiB
U-Boot DT blob at : 000000001f73a520
SF: Detected GD25LQ64C with page size 256 Bytes, erase size 4 KiB, total 8 MiB
*** Warning - bad CRC, using default environment
MMC: for ssg ledsdhci@d8000: 0
12931 bytes read in 16 ms (789.1 KiB/s)
gpio: pin GPIO23 (gpio 39) value is 1
gpio: pin GPIO23 (gpio 39) value is 1
gpio: pin GPIO23 (gpio 39) value is 1
Comphy-0: USB3_HOST0 5 Gbps
Comphy-1: SGMII0 1.25 Gbps
Comphy-2: SATA0 6 Gbps
gpio: pin GPIO23 (gpio 39) value is 1
12931 bytes read in 4 ms (3.1 MiB/s)
Enter Normal mode
SCSI:Hit any key to stop autoboot:0
补充下:这样修改后,只能一次有效请删除mmc 0:3 分区的rootfs.tar.bz2和upgrade_eli_38.img文件。
或者直接在linux shell里面刷写新uboot
本帖最后由 xingjiwoniu 于 2019-10-9 16:00 编辑
感谢分享 谢谢分享 感谢分享
收藏 感谢! 按照你这个执行不成功啊 GokuSun 发表于 2019-10-9 20:25
按照你这个执行不成功啊
还是提示找不到? 顶一下顶一下
tymfl 发表于 2019-10-9 20:36
还是提示找不到?
是还是原样子,启动还是end Kernel panic - not syncing: No working init found.Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
完全按照您的步骤做的