问题:Linux可以通过echo disk > /sys/power/state
成功休眠以交换分区(/ dev / mmcblk0p11),但不能从该分区恢复。
console=ttyS0 root=/dev/mmcblk0p10 rw rootfstype=ext4 rootwait init=/linuxrc resume=/dev/mmcblk0p11 no_console_suspend
/ dev / mmcblk0p9:UUID =“ b744d4f3-df1c-4b90-a0da-919f4396d529” TYPE =“ ext4” / dev / mmcblk0p10:UUID =“ cf79a362-220f-42fc-8078-01d7777fda99” TYPE =“ ext4” / dev / mmcblk0p11:UUID =“ 5686ee03-1120-4454-9c52-fa603adfeee5” TYPE =“ swap” / dev / mmcblk0p12:UUID =“ a435d0a3-7ec3-4b83-b4c1-6468399eda6d” TYPE =“ ext4” / dev / mmcblk0p13:UUID =“ 52d53a11-af79-49c3-a2bf-1161f242f858” TYPE =“ ext4” / dev / mmcblk0p14:UUID =“ 00a957a1-4463-4723-98a8-9e075611c670” TYPE =“ ext4”
原因似乎是系统引导时PM无法找到/dev/mmcblk0p11
。
引导日志:
- [0.899349] ==>下午:software_resume
- [0.902921] ==> PM:检查休眠图像分区/ dev / mmcblk0p11
- [0.909827] ==> DM:/ home / tekdev / tsdk- s5l / s5l_linux_sdk / ambarella / kernel / linux-4.9 / init / do_mounts.c 217,/ dev / mmcblk0p11
- [0.921074] ==> DM:找不到mmcblk0p11
- [0.925472] ==>下午:software_resume 853,/ dev / mmcblk0p11
- [0.930939] ==> DM:kernel / linux-4.9 / init / do_mounts.c 217,/ dev / mmcblk0p11
- [0.942177] ==> DM:找不到mmcblk0p11
- [0.946558] ==>下午:software_resume 869
- [0.950487] PM:休眠图像不存在或无法加载。
- [0.957535] ==> DM:kernel / linux-4.9 / init / do_mounts.c 217,/ dev / mmcblk0p10
- [0.968795] ==> DM:找不到mmcblk0p10
- [0.973188]-> kernel / linux-4.9 / init / do_mounts_initrd.c initrd_load 121
- [0.984341]-> kernel / linux-4.9 / init / do_mounts_initrd.c initrd_load 123
- [0.995556]等待根设备/ dev / mmcblk0p10 ...
- [1.000971] ==> DM:kernel / linux-4.9 / init / do_mounts.c 217,/ dev / mmcblk0p10
- [1.012220] ==> DM:找不到mmcblk0p10
- [1.016610] ==>等待root开发人员...
- [1.033183]随机:快速初始化完成
- [1.125418] ==> DM:kernel / linux-4.9 / init / do_mounts.c 217,/ dev / mmcblk0p10
- [1.136657] ==> DM:找不到mmcblk0p10
- [1.141038] ==>等待root开发人员...
- [1.195807] mmc0:地址为0001的新HS200 MMC卡
- [1.202359] mmcblk0:mmc0:0001 H8G1e 7.28 GiB
- [1.208214] mmcblk0boot0:mmc0:0001 H8G1e分区1 4.00 MiB
- [1.215503] mmcblk0boot1:mmc0:0001 H8G1e分区2 4.00 MiB
- [1.222778] mmcblk0rpmb:mmc0:0001 H8G1e分区3 4.00 MiB
- [1.231753] mmcblk0:bst bld ptb atf pba pri sec bak rom lnx swp添加adc原始
- [1.245428] ==> DM:kernel / linux-4.9 / init / do_mounts.c 217,/ dev / mmcblk0p10
- [1.256644] ==> DM:成功找到mmcblk0p10
我发现,当PM尝试恢复时,mmc尚未准备就绪。 PM尝试在第2行继续,但mmc在第22行开始init。
我为修复它所做的事情。
1.向内核CMD行添加resumewait,结果是内核将无休止地等待mmcblk0p11准备好。