Skip to content

Commit

Permalink
meta-opentrons: add plymouth for boot splash
Browse files Browse the repository at this point in the history
Adds
- plymouth
- a theme for plymouth that shows a simple image
  • Loading branch information
sfoster1 committed Jan 18, 2024
1 parent 2a5bd2d commit c0a41f5
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Plymouth Theme]
Name=Opentrons Boot Splash
Description=Display a static image as a boot splash
ModuleName=script

[script]
ImageDir=/usr/share/plymouth/themes/logo-splash
ScriptFile=/usr/share/plymouth/themes/logo-splash/logo-splash.script
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
image = Image("logo-splash.png");

pos_x = Window.GetWidth()/2 - image.GetWidth()/2;
pos_y = Window.GetHeight()/2 - image.GetHeight()/2;

sprite = Sprite(image);
sprite.SetX(pos_x);
sprite.SetY(pos_y);

fun refresh_callback () {
sprite.SetOpacity(1);
spr.SetZ(15);
}

Plymouth.SetRefreshFunction (refresh_callback);
22 changes: 22 additions & 0 deletions layers/meta-opentrons/recipes-core/plymouth/plymouth_%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += " \
file://logo-splash.png \
file://logo-splash.plymouth \
"

PACKAGECONFIG = "pango drm"

EXTRA_OECONF += "--with-udev --with-runtimedir=/run"

do_install:append () {
install -d 0644 ${D}${datadir}/plymouth/themes/logo-splash
install -m 0644 ${WORKDIR}/torizonlogo-white.png ${D}${datadir}/plymouth/themes/logo-splash/logo-splash.png
install -m 0644 ${WORKDIR}/logo-splash.plymouth ${D}${datadir}/plymouth/themes/logo-splash/logo-splash.plymouth
}

FILES:${PN}:append := "\
${datadir}/plymouth/themes/logo-splash \
${datadir}/plymouth/themes/logo-splash/logo-splash.png \
${datadir}/plymouth/themes/logo-splash/logo-splash.script \
"
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ IMAGE_INSTALL += " \
opentrons-systemd-units opentrons-ssh-keys \
python3 python3-misc python3-modules python3-jupyter \
python3-pip \
plymouth \
"

# We do NOT want the toradex libusbgx packages that autoconfigure the OTG USB
Expand Down

0 comments on commit c0a41f5

Please sign in to comment.