4000-520-616
欢迎来到免疫在线!(蚂蚁淘生物旗下平台)  请登录 |  免费注册 |  询价篮
主营:原厂直采,平行进口,授权代理(蚂蚁淘为您服务)
咨询热线电话
4000-520-616
当前位置: 首页 > 新闻动态 >
新闻详情
plymouth_Hacker_Albert的博客-CSDN博客
来自 : CSDN技术社区 发布时间:2021-03-24

了解plymouth.

1.概述

Linux distributions:

Bootsplash – the first and original implementation of a Linux kernel bootsplash, superseded by Splashy[2]fbsplash – Gentoo implementation as bootsplash program[3]Plymouth – uses Direct Rendering Manager (DRM) and KMS driverSplashy – a graphical boot process designed to replace the aging Bootsplash programusplash – former bootsplash program used by UbuntuXSplash – new splash program used by Ubuntu starting from 9.10bootanimation - a simple splash for Android OS just showing some decompressed images.

  Plymouth is an application that runs very early in the boot process (even before the root filesystem is mounted) that provides a graphical boot animation while the boot process happens in the background.

  Plymouth is a bootsplash for Linux supporting animations using Direct Rendering Manager (DRM) and KMS driver. It gets packed into the initrd.

  Besides eye-candy, Plymouth also handles user interaction during boot.

  Plymouth was first included in Fedora 10 “Cambridge” shipped on November 25, 2008 where it replaced Red Hat Graphical Boot (RHGB). Ubuntu includes it in the Ubuntu 10.04 LTS “Lucid Lynx” release shipped on April 29, 2010.

2.Bootup logo

  It is highly advised to disable the Linux bootup logo. On some systems having the bootup logo displayed seems to cause problems.

  KERNEL This example shows the correct way to disable the bootup logo:

Device Drivers --- Graphics Support --- [ ] Bootup logo --- 

  Be sure to enable kernel modesetting (KMS) for the system’s respective graphics card.

KMS for Intel cards

KERNEL Intel onboard GPUs set to use modesetting:Device Drivers --- Graphics Support --- * Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --- * Intel 8xx/9xx/G3x/G4x/HD Graphics [*] Enable modesetting on intel by default

3.Quick Facts

Plymouth:
Uses KMS (Kernel Mode Setting) (where possible) and the framebuffer to set the screen resolution.

Comprises 3 components:

A daemon (server) process called plymouthd
The daemon is responsible for the graphical display, animation and logging.A client application called plymouth
The client sends commands to the daemonA library libply.so to allow applications to be written to talk to the daemon
(The plymouth command is linked to libply.so for this reason).

Supports themes.

Runs at system startup and system shutdown:

Boot
plymouthd is generally started in the initramfs
(see file /usr/share/initramfs-tools/scripts/init-top/plymouth)

plymouthd is stopped at the point the Display Manager is starting

Shutdown

plymouthd is started by Upstart
(see Upstart job configuration file file /etc/init/plymouth.conf).

Writes a log to /var/log/boot.log.

4.Startup

  The plymouthd daemon attempts to read the following files at startup (the first file it finds takes precedence over any other):

General configuration
/etc/plymouth/plymouthd.conf
/usr/share/plymouth/plymouthd.defaults

4.1.Show delay

  Plymouth has a configuration option to delay the splash screen:

/etc/plymouth/plymouthd.conf[Daemon]Theme spinnerShowDelay 5

  On systems that boot quickly, you may only see a flicker of your splash theme before your DM or login prompt is ready. You can set ShowDelay to an interval (in seconds) longer than your boot time to prevent this flicker and only show a blank screen. The default is 5 seconds, but you may wish to change this to a lower value to see your splash earlier during boot.

5.To customize its boot animation, Plymouth has support to define a set of splash themes.

“Plymouth supports various “splash” themes which are analogous to screensavers, but happen at boot time. There are several sample themes shipped with plymouth, but most distributions that use plymouth ship something customized for their distribution.”

  You can list the available themes on your system by executing:

$ sudo plymouth-set-default-theme --listAnd can change the default theme with:$ sudo plymouth-set-default-theme theme where theme is your selected theme (i.e: spinner)After changing the default theme the initial ram filsystems has to be regenerated to add this information:$ sudo update-initramfs -u

6.Plymouth sample splash themes

  The list of samples themes includes 2 text based themes and 7 graphical ones:

Text: “Text mode theme with tricolor progress bar”Details: “Verbose fallback theme”Fade-in: “Simple theme that fades in and out with shimmering stars”Glow: “Corporate theme with pie chart boot progress followed by a glowing emerging logo”Script: “Script example plugin”Solar: “Space theme with violent flaring blue star”Spinfinity: “Simple theme that shows a rotating infinity sign in the center of the screen”Spinner: “Simple theme with a loading spinner”
/usr/share/plymouth/themes/text/text.plymouth/usr/share/plymouth/themes/details/details.plymouth

Specifying which Plymouth theme to use on boot

  There are two ways to specify which theme will be used by Plymouth:

1.Adding plymouth.theme ${THEME} as a parameter to the kernel command line
2.Specifying Theme ${THEME} in the /etc/plymouth/plymouthd.conf Plymouth configuration file.

Debug

1.查找plymouth

~$ lsinitramfs /boot/initrd.img-4.19.0-6-amd64 | grep plymouthetc/plymouthetc/plymouth/plymouthd.confscripts/init-bottom/plymouthscripts/init-premount/plymouthscripts/panic/plymouthusr/bin/plymouthusr/lib/x86_64-linux-gnu/plymouthusr/lib/x86_64-linux-gnu/plymouth/details.sousr/lib/x86_64-linux-gnu/plymouth/renderersusr/lib/x86_64-linux-gnu/plymouth/renderers/drm.sousr/lib/x86_64-linux-gnu/plymouth/renderers/frame-buffer.sousr/lib/x86_64-linux-gnu/plymouth/script.sousr/lib/x86_64-linux-gnu/plymouth/text.sousr/sbin/plymouthdusr/share/plymouthusr/share/plymouth/debian-logo.pngusr/share/plymouth/plymouthd.defaultsusr/share/plymouth/themesusr/share/plymouth/themes/deepin-ssd-logousr/share/plymouth/themes/deepin-ssd-logo/boot.pngusr/share/plymouth/themes/deepin-ssd-logo/box.pngusr/share/plymouth/themes/deepin-ssd-logo/bullet.pngusr/share/plymouth/themes/deepin-ssd-logo/deepin-ssd-logo.grubusr/share/plymouth/themes/deepin-ssd-logo/deepin-ssd-logo.plymouthusr/share/plymouth/themes/deepin-ssd-logo/deepin-ssd-logo.scriptusr/share/plymouth/themes/deepin-ssd-logo/entry.pngusr/share/plymouth/themes/deepin-ssd-logo/lock.pngusr/share/plymouth/themes/deepin-ssd-logo/logo.pngusr/share/plymouth/themes/detailsusr/share/plymouth/themes/details/details.plymouthusr/share/plymouth/themes/textusr/share/plymouth/themes/text/text.plymouth

2.And if you want more debug log, you can add plymouth:debug to the kernel command line.

Edit the file /etc/default/grub and search for LINUX_DEFAULT line:GRUB_CMDLINE_LINUX_DEFAULT quiet splash vt.handoff 7 kaslr and change it to this:GRUB_CMDLINE_LINUX_DEFAULT plymouth:debug splash vt.handoff 7 kaslr 

Note:/var/log/plymouth-debug.log

3.Testing your theme without reboot and adding debug info

  The splash that will be displayed by Plymouth can be tested on X by installing the plymouth-x11 package:

$ sudo apt-get install plymouth-x11$ sudo plymouthd plymouth.splash ${THEME} ; sudo plymouth show-splash; sleep 5; sudo killall plymouthd

4.脚本

/etc/init.d/plymouth/etc/init.d/plymouth-log

refer to

https://launchpad.net/plymouthhttps://www.freedesktop.org/wiki/Software/Plymouth/https://en.wikipedia.org/wiki/Bootsplashhttps://wiki.gentoo.org/wiki/Plymouthhttps://wiki.ubuntu.com/Plymouthhttps://www.apertis.org/guides/video-animation-on-boot/ \"\" \"\" \"\" 点赞 \"\" \"\" 评论

本文链接: http://plymouth.immuno-online.com/view-701020.html

发布于 : 2021-03-24 阅读(0)