i am trying to customize the bootanimation through plymouth i use a tool called plymouth-creator (git repo) which convert an mp4 into frames and generate a .script and a .plymouth :
this is the .script
Window.SetBackgroundTopColor (0, 0, 0);
Window.SetBackgroundBottomColor (0, 0, 0);
for(i = 1; i <= 241; i++)
{
image[i].image = Image("images/image-" + i + ".png");
image[i].sprite = Sprite(image[i].image);
image[i].sprite.SetOpacity(0);
image[i].x = Window.GetX() + Window.GetWidth() / 2 - image[i].image.GetWidth() / 2;
image[i].y = Window.GetY() + Window.GetHeight() / 2 - image[i].image.GetHeight() / 2;
image[i].sprite.SetPosition(image[i].x, image[i].y, 0);
}
index = 1;
fun boot_callback()
{
if(index >= 241 + 1)
{
image[241].sprite.SetOpacity(1);
}
else
{
for(i = 1; i <= 241; i++)
{
if(index != i)
{
image[i].sprite.SetOpacity(0);
}
else
{
image[i].sprite.SetOpacity(1);
}
}
index++;
}
}
Plymouth.SetRefreshFunction(boot_callback);
Plymouth.SetQuitFunction(boot_callback);
this is the .plymouth:
[Plymouth Theme]
Name=pixii
Description=pixii boot animation
ModuleName=script
[script]
ImageDir=/usr/share/plymouth/themes/pixii
ScriptFile=/usr/share/plymouth/themes/pixii/pixii.script
and this is the recipe :
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += " \
file://pixii.plymouth \
file://pixii.script \
file://images/ \
"
PREFERRED_THEME = "pixii"
PACKAGECONFIG = "pango drm"
EXTRA_OECONF += "--with-udev --with-runtimedir=/run"
# Install theme and related files
do_install:append() {
# Install the Pixii Plymouth theme files
install -d ${D}${datadir}/plymouth/themes/pixii
install -m 0644 ${WORKDIR}/pixii.plymouth ${D}${datadir}/plymouth/themes/pixii/pixii.plymouth
install -m 0755 ${WORKDIR}/pixii.script ${D}${datadir}/plymouth/themes/pixii/pixii.script
# Install the images for the theme
install -d ${D}${datadir}/plymouth/themes/pixii/images
install -m 0644 ${WORKDIR}/images/* ${D}${datadir}/plymouth/themes/pixii/images/
}
ROOTFS_POSTPROCESS_COMMAND += "set_plymouth_theme;"
set_plymouth_theme() {
plymouth-set-default-theme pixii --rebuild-initrd
}
i tried to test the plymouth on its own using plymouth --mode=boot /plymouth --show-splash
but it didnât work