如果在打印kmsg log时发现log被覆盖,log 的buf不够大可以使用默认配置调buf:
defconfig
CONFIG_LOG_BUF_SHIFT=20 (默认是17 2的17次方)
或者:kernel/init/Kconfig:
config LOG_BUF_SHIFT
int "Kernel log buffer size (16 => 64KB, 17 => 128KB)"
range 12 21
default 17 ----------->将default值调大
help
Select kernel log buffer size as a power of 2.
Examples:
17 => 128 KB
16 => 64 KB
15 => 32 KB
14 => 16 KB
13 => 8 KB
12 => 4 KB
时间: 2024-11-11 02:36:44