问题分析
串口错误日志如下:
[ 4.913627] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 4.915681] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 4.915761] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 4.915771] cfg80211: failed to load regulatory.db
[ 4.916766] rockchip-pm rockchip-suspend: not set pwm-regulator-config
[ 4.918153] I : [File] : drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c; [Line] : 405; [Func] : mali_module_init(); svn_rev_string_from_arm of this mali_ko is '', rk_ko_ver is '5', built at '20:10:34', on 'Mar 13 2024'.
[ 4.918480] Mali:
[ 4.918483] Mali device driver loaded
[ 4.918496] ALSA device list:
[ 4.918503] #0: rockchip,es8388
[ 4.918509] #1: rockchip,hdmiin
[ 5.313201] JBD2: journal transaction 643485 on mmcblk0p6-8 is corrupt.
[ 5.313256] EXT4-fs (mmcblk0p6): error loading journal
[ 5.328513] VFS: Cannot open root device "PARTUUID=614e0000-0000" or unknown-block(179,6): error -117
[ 5.328585] Please append a correct "root=" boot option; here are the available partitions:
[ 5.328609] 0100 4096 ram0
[ 5.328613] (driver?)
[ 5.328643] b300 60416000 mmcblk0
[ 5.328648] driver: mmcblk
[ 5.328671] b301 4096 mmcblk0p1 bf420000-0000-435b-8000-10a0000075d6
[ 5.328675]
[ 5.328697] b302 4096 mmcblk0p2 a2290000-0000-4d2b-8000-49ef00000226
[ 5.328700]
[ 5.328721] b303 65536 mmcblk0p3 7a3f0000-0000-446a-8000-702f00006273
[ 5.328724]
[ 5.328742] b304 131072 mmcblk0p4 2f040000-0000-492c-8000-6b8000000659
[ 5.328744]
[ 5.328760] b305 32768 mmcblk0p5 a9590000-0000-4913-8000-6e9300000e0c
[ 5.328762]
[ 5.328777] b306 60170208 mmcblk0p6 614e0000-0000-4b53-8000-1d28000054a9
[ 5.328779]
[ 5.328798] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,6)
[ 5.336803] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.10.110 #10
[ 5.337349] Hardware name: Rockchip RK3588 NEARDI LPB3588 Board (DT)
......
[ 14.777403] CPU7 online:0
[ 14.777411] EL2(NS) PC: <0xffffffc010024f90> local_cpu_stop+0x34/0x40
[ 14.777538]
[ 14.777540] PMU:
[ 14.777552] 00000000: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 14.777563] 00000020: 00000000 00000000 00000000 00000000 000000c0 000000c0 000000c0 000000c0
[ 14.777573] 00000040: 000000c0 000000c0 000000c0 000000c0 00000008 00000008 00000000 00000000
[ 14.777584] 00000060: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 14.777595] 00000080: 0acff800 00000000 00000000 08080808 08080808 0000003c 000000ff 00000000
[ 14.777606] 000000a0: 00000000 00000000 00000000 00000000 000fffff 00005dc0 00005dc0 000fffff
[ 14.777617] 000000c0: 00005dc0 00005dc0 000fffff 00005dc0 00005dc0 000fffff 000fffff 000fffff
[ 14.777629] 000000e0: 000fffff 000fffff 000fffff 000fffff 000fffff 00000000 00000000 00000000
[ 14.777631] Kernel Offset: disabled
[ 14.777635] CPU features: 0x000,08040026,6a00aa18
[ 14.777638] Memory Limit: none
[ 14.777653] rockchip-thermal fec00000.tsadc: channal 0: temperature(38 C)
[ 14.777657] THERMAL REGS:
[ 14.777668] 00000000: 00000100 00000001 0000000c 0000007f 00000000 00000001 00000000 0000007f
[ 14.777680] 00000020: 00000000 0000007e 00000000 0000012b 0000012b 0000012b 0000012b 0000012b
[ 14.777690] 00000040: 0000012b 0000012b 00000000 00000000 00000000 00000000 00000000 00000000
[ 14.777701] 00000060: 00000000 00000000 00000000 00000153 00000000 00000000 00000000 00000000
[ 14.777706] 00000080: 00000000 00000000
[ 14.888898] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,6) ]---
从日志得知,EXT4 文件系统错误:
- “JBD2: journal transaction is corrupt” 说明 EXT4 文件系统的出了问题,导致无法正确加载文件系统的 journal。
- “VFS: Cannot open root device”说明内核无法挂载根文件系统。
需要修复EMMC后才能正常启动,目前串口无法输入且系统就算起来也是默认挂载到EMMC了(无法umount),所有要通过其他方式修复。
修复方法
方法一:重新烧录rootfs
若文件系统没有重要文件,可以选择重新烧录
下载烧录工具
方法二:制作 SD 启动卡
1、下载制作工具
下载制作SD启动卡工具
工具界面如下:
第一步:注意一定要选择的是SD卡的设备!否则会把电脑的其他设备给格式化
第二步:勾选SD启动
第三步:选择固件,固件在neardi.com找到对应固件,下载默认最新的Ubuntu固件
第四步:点击开始创建
,提示“是否继续”,点“是”继续
制作过程一般持续几分钟
点击确认,安全拔出SD卡。
2、使用 SD 启动 LPB3588
- 断电,插入制作好的 SD 启动卡。
- 上电启动,查看启动信息:
mmc@fe2c0000: 1 (SD), mmc@fe2e0000: 0
Bootdev(atags): mmc 1
MMC1: Legacy, 52Mhz
mmc 1 表示已经从SD卡启动
3、修复 EMMC 坏块
等待 SD 卡中的 Ubuntu 系统启动成功后,执行以下步骤:
使用 lsblk 查找 EMMC 坏块节点:
root@LPA3588:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0 179:0 0 115.2G 0 disk
├─mmcblk0p1 179:1 0 1M 0 part
├─mmcblk0p2 179:2 0 4M 0 part
├─mmcblk0p3 179:3 0 4M 0 part
├─mmcblk0p4 179:4 0 64M 0 part
├─mmcblk0p5 179:5 0 128M 0 part
└─mmcblk0p6 179:7 0 115G 0 part /media/neardi/rootfs5
mmcblk0boot0 179:32 0 4M 1 disk
mmcblk0boot1 179:64 0 4M 1 disk
mmcblk1 179:96 0 29.8G 0 disk
├─mmcblk1p1 179:97 0 1M 0 part
├─mmcblk1p2 179:98 0 4M 0 part
├─mmcblk1p3 179:99 0 4M 0 part
├─mmcblk1p4 179:100 0 64M 0 part
├─mmcblk1p5 179:101 0 128M 0 part
├─mmcblk1p6 179:102 0 32M 0 part
└─mmcblk1p7 179:103 0 29.5G 0 part /
其中/dev/mmcblk0p6
为EMMC中的文件系统,也就是需要修复的;/dev/mmcblk1p7
为SD卡的文件系统,当前加载的文件系统。
输入修复指令:
fsck /dev/mmcblk0p6
4、拔出 SD 卡并从 EMMC 启动
修复完成后,拔出 SD 卡,重启 LPB3588,确认系统能正常从 EMMC 启动。