控制 Linux 嵌入式应用程序的启动屏幕
在嵌入式编程中,通常需要用一些自定义的“加载”动画或从开机到启动并运行的启动屏幕来替换默认的 Linux 启动输出。
达到这个目的的方法是什么?
有没有办法在整个启动序列中使用相同的“进程”?
如何解决这个问题?我猜我们需要一个自制内核吗?
谢谢!
In embedded programming, it's often needed to replace the default Linux boot output by some custom 'loading' animation or splash screen from power-on to up-and-running.
What is the way to achieve this?
Is there a way to use the same 'process' throughout the whole boot sequence for that?
How can this be solved? I'm guessing we need a home-brew kernel for that?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决方案通常遵循以下原则:
可以选择将引导加载程序代码(例如 uboot、syslinux、redboot)中的静态图像放置在屏幕上。
使用 Linux 内核命令行“quiet”指令来抑制正常的内核加载输出(并加快启动时间)。
作为从 init 启动的第一个程序,在整个启动 init 序列中绘制启动动画,直到完成。
例如,Android手机通常会在启动加载程序中放入一些静态图像,然后从启动init脚本中运行surfaceflinger程序来绘制动画Android徽标,直到启动完成。
The solution usually goes along the lines of:
Optionally, put a static image on the screen from the boot loader code (e.g. uboot, syslinux, redboot).
Using the Linux kernel command line "quiet" directive to suppress normal kernel load output (and speed up boot time while you're at it).
As one of the very first programs started from init, draw your splash animation throughout the boot init sequence until it is finished.
For example, Android phones usually put some static image in the boot loader and then run the surfaceflinger program from the startup init scripts to draw the animated Android logo until the boot is finished.