Yocto Jetson Nano中PID=1 init启动psplash后psplash-write失效问题
自定义init脚本启动psplash时进度条无法通过后台进程更新的问题
实现背景
已将psplash集成到面向NVIDIA Jetson Nano的自定义Yocto层中,希望从首个init脚本(PID=1)启动psplash,覆盖systemd加载单元与服务文件的耗时。
已在Linux内核参数中添加init=/bin/newinit.sh,替换原/sbin/init,对应的/bin/newinit.sh内容如下:
#!/bin/sh /usr/bin/psplash & /bin/psplashanimator.sh & exec /sbin/init
配套的/bin/psplashanimator.sh脚本内容为:
#!/bin/sh /bin/sleep 0.1 && /usr/bin/psplash-write "PROGRESS 50"
异常表现
- 已禁用所有相关systemd守护进程(psplash-start、psplash-systemd),确认无其他进程调用
psplash-write - 实际运行时psplash可以正常启动显示,但进度条没有任何变化
- 对照测试:如果将
/bin/sleep 0.1 && /usr/bin/psplash-write "PROGRESS 50"移到/bin/newinit.sh中exec调用之前的位置,命令可以正常生效,但会阻塞init脚本的主执行流程
待解决问题
在自定义init脚本中启动psplash时,psplash-write仅能在exec调用前生效,无法定位问题成因,也没有可行的修复路径,需要对应的原理解释和可落地的解决方案。
已知参考信息
- 备注1:通过常规systemd服务(
psplash-systemd.service)更新psplash的方式可以正常工作,通过psplash-start.service启动psplash时,进度条更新功能完全正常 - 备注2:psplash使用帧缓冲驱动与FIFO机制实现进程间通信
- 备注3:相关参考源文件为
psplash.c、psplash-write.c - 备注4:附当前systemd执行流程截图,用于排查psplash运行前是否缺失必要的前置依赖:

内容的提问来源于stack exchange,提问作者mozcelikors
相关产品推荐
相关产品推荐

