I have integrated psplash to a custom Yocto layer for NVIDIA Jetson Nano. I want to run psplash from the very first init script (PID=1). The reason is to cover the time spent by systemd to load unit and service files. I have added init=/bin/newinit.sh
to the Linux kernel parameters. Here is the content of the /bin/newinit.sh
that replaces my /sbin/init
.
#!/bin/sh
/usr/bin/psplash &
/bin/psplashanimator.sh &
exec /sbin/init
Here is the content of the /bin/psplashanimator.sh
#!/bin/sh
/bin/sleep 0.1 && /usr/bin/psplash-write "PROGRESS 50"
I made sure that psplash-write
is not called by any other process by disabling the systemd daemons (psplash-start, psplash-systemd). Yet, I can't update the progress bar by using these scripts. Psplash is displayed nicely, but nothing on the progress bar.
If I move /bin/sleep 0.1 && /usr/bin/psplash-write "PROGRESS 50"
into the /bin/newinit.sh
before exec
, it works fine; but it blocks the main execution of the init script.
All in all, if I start the psplash in a custom init script, psplash-write only works before the exec is called. I can't figure out why that is and how to fix that.
If there is a simple solution or rationale as to why this wouldn't work, I would kindly appreciate your guidance.
NOTE1: Note that conventional way of updating psplash with systemd services (psplash-systemd.service
) work fine when psplash is started using psplash-start.service
, I get progress bar updates.
NOTE2: Psplash uses framebuffer driver and FIFO.
NOTE3: Related source files: psplash.c psplash-write.c
NOTE4: Current systemd execution (to let you see if I am missing something that must be ready before running psplash)
I'm not 100% sure about psplash and systemd, but it might be the case you need to have something like this in your environment to control psplash:
export TMPDIR=/mnt/.psplash