Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:boot_splash [2013/01/03 15:04] andyjwiki:boot_splash [2014/12/09 02:24] (current) – Added a workaround for systems without KMS drivers kalu
Line 1: Line 1:
-====== Under construction!!! Incomplete code segments ahead! ======  
- 
 ====== Plymouth boot splash Background and Assumptions ======  ====== Plymouth boot splash Background and Assumptions ====== 
  
Line 8: Line 6:
  
 Plymouth has several ways that it can display graphics. One of these, using the frame buffer, is easiest for TinyCore as it is compilied into the kernel. These instructions will target this method, as it requires the least effort. For systems running in virtual machines or without kernel supported graphics, this should work fine. If you have Intel or Radeon graphics that is supported using DRM, additional steps are required. If you are using the frame buffer mode and kernel graphics modules load during the boot process, the graphics may become distorted. This is the case with Intel i915 graphics; others have not been tested. Plymouth has several ways that it can display graphics. One of these, using the frame buffer, is easiest for TinyCore as it is compilied into the kernel. These instructions will target this method, as it requires the least effort. For systems running in virtual machines or without kernel supported graphics, this should work fine. If you have Intel or Radeon graphics that is supported using DRM, additional steps are required. If you are using the frame buffer mode and kernel graphics modules load during the boot process, the graphics may become distorted. This is the case with Intel i915 graphics; others have not been tested.
 +
 +The following steps are meant to be informative so as to explain and describe what is in the plymouth-initrd.gz file, and to be a basis for further work and experimentation. It should be possible to copy/paste the following code segments to build the plymouth-initrd.gz in a few minutes (not including required extension load time). Alternatively, if you have TinyCore version 4.7.2 or later you can download the 32-bit version of {{:wiki:splash:plymouth-initrd.gz|plymouth-initrd.gz}} and skip to the installation step at the end. 64-bit has not been tested.
  
 ====== Adding a Boot Splash ======  ====== Adding a Boot Splash ====== 
Line 37: Line 37:
 Change to the root of your development directory, which should be persistent. Create a directory to use as the plymouth initrd source directory: Change to the root of your development directory, which should be persistent. Create a directory to use as the plymouth initrd source directory:
 <code> <code>
-PLYROOT=$(pwd) 
 mkdir plymouth-initrd mkdir plymouth-initrd
 </code> </code>
Line 123: Line 122:
 EOF EOF
 </code> </code>
-Unpack the plymouth source code and cd into the new directory (plymouth-0.8.8). Execute the above script from within the source code directory:+Unpack the plymouth source code and cd into the new directory (plymouth-0.8.8). Execute the above script from within the source code directory. From this point on, most of the commands will require su capability, so it will be easier if we go ahead and do it now. The rest of this wiki will assume that this is the case. If not, you will need to insert a sudo in most of the command steps:
 <code> <code>
 tar xfz plymouth-0.8.8.tar.gz tar xfz plymouth-0.8.8.tar.gz
 +sudo sh
 +export PLYROOT=$(pwd)
 cd plymouth-0.8.8 cd plymouth-0.8.8
 ../compile-plymouth.sh ../compile-plymouth.sh
 </code> </code>
-If there are no errors, make and install plymouth. From this point on, most of the commands will require su capability, so it will be easier if we go ahead and do it now. The rest of this wiki will assume that this is the case. If not, you will need to insert a sudo in most of the command steps:+If there are no errors, make and install plymouth:
 <code> <code>
-sudo sh 
 make install make install
 </code> </code>
Line 139: Line 139:
 Cd into the plymouth-initrd directory and copy the new files into it: Cd into the plymouth-initrd directory and copy the new files into it:
 <code> <code>
-cd $PLYROOT+cd $PLYROOT/plymouth-initrd
 cat ../plymouth-initrd-files.lst | cpio -o -H newc | cpio -i -H newc -d cat ../plymouth-initrd-files.lst | cpio -o -H newc | cpio -i -H newc -d
 </code> </code>
Line 149: Line 149:
 The following step depends on your current version of TinyCore. For versions 4.7.2 and later: The following step depends on your current version of TinyCore. For versions 4.7.2 and later:
 <code> <code>
-cd etc/init.d+cd $PLYROOT/plymouth-initrd/etc/init.d
 vi rcS vi rcS
 </code> </code>
 Add the following two lines to rcS between the mount commands and the tc-config script: Add the following two lines to rcS between the mount commands and the tc-config script:
 <code> <code>
-/sbin/plymouthd --mode=boot --attach-to-session --pid-file=/var/log/plymouth/plymouth.pid >/dev/null 2>&1+/sbin/plymouthd --mode=boot --attach-to-session --pid-file=/var/log/plymouth/plymouthd.pid >/dev/null 2>&1
 /bin/plymouth --show-splash >/dev/null 2>&1 /bin/plymouth --show-splash >/dev/null 2>&1
 </code> </code>
 For versions prior to 4.7.2: For versions prior to 4.7.2:
 <code> <code>
-cd etc/init.d+cd $PLYROOT/plymouth-initrd/etc/init.d
 cp /etc/init.d/tc-config . cp /etc/init.d/tc-config .
 vi tc-config vi tc-config
Line 169: Line 169:
 To support graphics, plymouth assumes that libpng12 will be available, so we will have to add it to the initrd. Normally this is supplied by Xlibs, but it won't be available at boot so we'll have to copy it into the initrd. Cd to the base plymouth initrd source directory, the execute the following: To support graphics, plymouth assumes that libpng12 will be available, so we will have to add it to the initrd. Normally this is supplied by Xlibs, but it won't be available at boot so we'll have to copy it into the initrd. Cd to the base plymouth initrd source directory, the execute the following:
 <code> <code>
-cd usr/lib+cd $PLYROOT/plymouth-initrd/usr/lib
 cp /tmp/tcloop/Xlibs/usr/lib/libpng12.so.0.46.0 . cp /tmp/tcloop/Xlibs/usr/lib/libpng12.so.0.46.0 .
 ln -s libpng12.so.0.46.0 libpng12.so.0 ln -s libpng12.so.0.46.0 libpng12.so.0
Line 179: Line 179:
 To create a default theme we will use the TinyCore desktop logo, and create a set of spinner graphics for the startup progress. From the base plymouth initrd source directory: To create a default theme we will use the TinyCore desktop logo, and create a set of spinner graphics for the startup progress. From the base plymouth initrd source directory:
 <code> <code>
-mkdir -p usr/share/plymouth/themes/TinyCore +mkdir -p $PLYROOT/plymouth-initrd/usr/share/plymouth/themes/TinyCore 
-cd usr/share/plymouth/themes/TinyCore +cd $PLYROOT/plymouth-initrd/usr/share/plymouth/themes/TinyCore 
-cp /tmp/tcloop/Xlibs/usr/local/share/pixmaps/core.png header-image.png+cp /tmp/tcloop/Xlibs/usr/local/share/pixmaps/logo.png header-image.png
 # adjust the following values to change the size and thickness of the spinner graphics # adjust the following values to change the size and thickness of the spinner graphics
 OD=51 OD=51
Line 192: Line 192:
   -gravity center -compose src_out -composite +repage -crop ${OD}x${OD}+0+0 animation-00$a.png   -gravity center -compose src_out -composite +repage -crop ${OD}x${OD}+0+0 animation-00$a.png
 done done
 +# create links so the throbber graphics will be the same as the animation graphics
 for a in $(seq -w 1 36) for a in $(seq -w 1 36)
   do ln -s animation-00$a.png throbber-00$a.png   do ln -s animation-00$a.png throbber-00$a.png
 done done
-for a in box.png bullet.png entry.png lock.png +# create empty png files for the other required pieces that we won't use 
-  do convert -size 1x1 xc:none $a+for a in box bullet entry lock 
 +  do convert -size 1x1 xc:none $a.png
 done done
 +# create a theme configuration file
 cat >TinyCore.plymouth <<EOF cat >TinyCore.plymouth <<EOF
 [Plymouth Theme] [Plymouth Theme]
Line 216: Line 219:
 Finally, we need to tell plymouth about the default theme. Return to the base plymouth initrd source directory: Finally, we need to tell plymouth about the default theme. Return to the base plymouth initrd source directory:
 <code> <code>
-cd etc/plymouth+cd $PLYROOT/plymouth-initrd/etc/plymouth
 cat >plymouthd.conf <<EOF cat >plymouthd.conf <<EOF
-Administrator customizations go in this file+plymouth theme
 [Daemon] [Daemon]
 Theme=TinyCore Theme=TinyCore
Line 224: Line 227:
 </code> </code>
  
-===== Create and install the plymouth initrd ===== +===== Create the plymouth initrd ===== 
  
 To create the plymouth initrd archive, from the base of the plymouth initrd source directory: To create the plymouth initrd archive, from the base of the plymouth initrd source directory:
 <code> <code>
 +cd $PLYROOT/plymouth-initrd
 find | cpio -o -H newc | gzip -c >../plymouth-initrd.gz find | cpio -o -H newc | gzip -c >../plymouth-initrd.gz
 </code> </code>
-Copy the new plymouth-initrd.gz file to the same directory as core.gz on your system. Edit the boot configuration file for your system, adding plymouth-initrd.gz after core.gz in the APPEND (or INITRD), separated by a comma and no spaces. Also add the keywords ''splash'' and ''logo.nologo'' in the APPEND line.+ 
 +===== Install the plymouth initrd =====  
 + 
 +Copy the new plymouth-initrd.gz file to the same directory as core.gz on your system. Edit the boot configuration file for your system, adding plymouth-initrd.gz after core.gz in the APPEND (or INITRD), separated by a comma and no spaces. Also add the keywords ''splash'' and ''logo.nologo'' in the APPEND line. If not already done, set the vga parameter to one of the VESA (non-text) modes. The VGA being set to a VESA mode is especially needed for systems which do not have Kernel Mode Setting (KMS) drivers available and are still using legacy Framebuffer (fb) drivers instead, with vga=0x318 (which translates to 1024x768x32bit) being a commonly used parameter for systems without KMS drivers. (To find out if KMS is loaded, check your Xorg log for 'modesetting' and to find out the VESA modes available in your system use 'vga=askme' in your boot configuration.)
  
 After bootup, the plymouthd daemon will continue to run in the background. If desired, it can be forced to exit with the following command: After bootup, the plymouthd daemon will continue to run in the background. If desired, it can be forced to exit with the following command:
Line 242: Line 249:
 Reboot and enjoy! Reboot and enjoy!
  
-If the splash does not work as expected, add ''plymouth.debug=file:/var/log/plymouthd-debug.log'' to the APPEND line in the boot configuration file. This may provide some help as to where the problem lies.+If the splash does not work as expected, add ''plymouth.debug=file:/var/log/plymouthd-debug.log'' to the APPEND line in the boot configuration file. This may provide some help as to where the problem lies. If the graphics "break" part way through the boot process, reread the first section on this page. 
Print/export
QR Code
QR Code wiki:boot_splash (generated for current page)