Jaunty Plymouth PPA Plugin Development Tutorial (so far)

Ray Strode halfline at gmail.com
Mon Mar 16 07:19:32 PDT 2009


Hi again,

(I hit send to a little too soon before)

> 4) What about sounds?
That's a good question.  It might make sense to have sounds, but there
are some complications:

1) No pulseaudio is running
2) No way to change volume

It would definitely be annoying if you're in a library with your
laptop and you turn it on and then during boot up it played loud
noises with no way to stop them.
Anyway, this still needs more thought.

> [b]11)[/b] Now go to the newly created plymouth directory and it will have a
> file called autogen.sh in it. In the terminal type:
> [code]
> ./autogen.sh --prefix=/usr --with-logo=/usr/share/plymouth/bizcom.png
> [/code]
> replacing bizcom.png with something a little nicer if you like.
Probably should have a few more things passed to autogen.sh

In particular, we want localstatedir going to /var  which would need a
--localstatedir=/var and plymouth itself
should go to /sbin (daemon) and /bin (client) since /usr might not be
mounted until late in boot up.    I added
--with-system-root-install to force that.

> [SIZE="5"][b]How to change the default plugin for bootup[/b][/SIZE]
> [code]
> sudo /usr/sbin/plymouth-set-default-plugin spinfinity
> [/code]
> replace spinfinity with whatever plugin name you want to use. For instance,
> replace spinfinity with solar.
So we need to rebuild the initrd before it will actually show up in
boot up.  Right now, plymouth only adds a hook
to the fedora mkinitrd for this to happen (see
plymouth-populate-initrd).  I'd really appreciate an ubuntu equivalent
that we could add to the repo.

> [SIZE="5"][b]The proper way to install a plugin from source[/b][/SIZE]
> In the "/yourplymouthgitdirectory/plymouth/src/plugins/splash/plugin-name"
> directory type:
> [code]
> make
> sudo make install
> sudo /usr/sbin/plymouth-set-default-plugin the-name-of-the-plugin
> sudo /usr/libexec/plymouth/plymouth-update-initrd
> [/code]
There's a --rebuild-initrd flag to set-default-plugin

> [SIZE="5"][b]How to make a single plugin[/b][/SIZE]
> On Jaunty, with the PPA packages and git source installed, you can copy one
> of the plugin directories to somewhere else on your drive and work on it
> from there.
> [code]
> pkg-config --cflags plymouth-1
> [/code]
> returns "-I/usr/include/plymouth-1", so you will need to add the extra ply/
> or plybootsplash/ in your #include lines. Otherwise you can simply specify
> them manually at the terminal as such:
We should probably fix the in-tree plugins to do ply/ too, or fix the
pkg-config file to include the ply/.
There's no reason their should be an inconsistency here.

> You will need to remove the include "config.h" from your plugin. Since
> you're working separate of the git source, it isn't really needed, but it's
> still good to take a look at config.h to familiarize yourself with whats in
> there.
Maybe we should wrap the #include "config.h" with

#ifdef HAVE_CONFIG_H / #endif bits . . .

> You will also need to add several #defines with the headers at the top of
> the plugin and manually specify the paths to the required files there. If
> you are wondering what these #defines originally were, then look at the
> Makefile
> that was generated for the splash in the git source.
So for this, we should probably move the #defines to a header file we ship,
so plugins can just #include it.  Or make them functions instead of defines.
Or we could make them pkg-config variables.

--Ray


More information about the plymouth mailing list