controlling the boot screen on Linux embedded app

2019-04-11 12:35发布

问题:

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!

回答1:

The solution usually goes along the lines of:

  1. Optionally, put a static image on the screen from the boot loader code (e.g. uboot, syslinux, redboot).

  2. Using the Linux kernel command line "quiet" directive to suppress normal kernel load output (and speed up boot time while you're at it).

  3. 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.