STM32MP OSD32MP1-BRK板Linux 5.4.31启动Logo无法显示求助
问题背景
使用STM32MP octavo系列OSD32MP1-BRK开发板,运行Linux 5.4.31内核,搭载基于FB driver for the ST7789V LCD Controller驱动的自定义LCD屏。当前开机后屏幕黑屏约25秒,直到rc-local.service启动Qt应用才显示画面;已通过menuconfig配置内核Logo但开机不显示,dmesg显示Psplash已启动,但启动时机早于帧缓冲(FB)加载,添加udev规则无效。
已尝试操作
- 内核menuconfig启用
Frame Buffer Support及Framebuffer Console support - 内核命令行传入
splash、framebuffer_depth等参数 - 尝试通过initramfs显示启动画面,但initramfs未加载
具体解决步骤
1. 将ST7789V帧缓冲驱动编译进内核(而非动态模块)
若当前FB驱动以动态模块形式加载,会导致初始化时机滞后。修改内核配置:
Device Drivers -----> Graphics Support -----> Frame Buffer Support -----> <*> FB driver for the ST7789V LCD Controller
编译烧写新内核后,FB驱动会在系统启动早期初始化,确保/dev/fb0尽早就绪。
2. 调整Psplash服务的启动依赖
编辑Psplash的systemd服务文件(通常为/lib/systemd/system/psplash.service),添加启动条件和依赖,确保其在FB设备就绪后启动:
[Unit] Description=Starts Psplash Boot screen ConditionPathExists=/dev/fb0 After=sys-devices-platform-fb_st7789v.0.device Requires=sys-devices-platform-fb_st7789v.0.device [Service] Type=simple ExecStart=/usr/bin/psplash Restart=never [Install] WantedBy=multi-user.target
替换fb_st7789v.0为实际FB设备节点名称(可通过udevadm info /dev/fb0查看)。修改后重新加载systemd配置:
systemctl daemon-reload systemctl enable psplash
3. 确认内核Logo的显示配置
确保内核Logo相关配置已正确启用:
Device Drivers -----> Graphics Support -----> <*> Frame Buffer Support [*] Console display driver support <*> Framebuffer Console support [*] Bootup logo <*> Standard black and white Linux logo <*> Standard 16-color Linux logo <*> Standard 224-color Linux logo
同时检查内核命令行是否添加logo.nologo=0(确保不屏蔽Logo显示),并确认framebuffer_depth设置与ST7789V匹配(通常为16或24)。
4. 验证FB初始化时机
查看dmesg日志,确认FB驱动初始化时间早于Psplash启动:
dmesg | grep -E "fb_st7789v|psplash"
若FB驱动初始化日志(如fb_st7789v: probed)出现在Psplash启动日志之前,说明配置生效。
5. 备选方案:直接使用内核Logo替代Psplash(简化流程)
若无需动态进度条,可仅依赖内核Logo显示:
- 确保FB驱动编译进内核、内核Logo配置正确
- 禁用Psplash服务:
systemctl disable psplash
此时内核启动后会立即显示Logo,直到Qt应用启动覆盖画面。
内容的提问来源于stack exchange,提问作者Hamza Khalid

