FS#14808 - [udev] Please add some static devices needed for fbsplash
Attached to Project:
Arch Linux
Opened by kujub (kujub) - Saturday, 23 May 2009, 17:44 GMT
Last edited by Thomas Bächler (brain0) - Tuesday, 26 January 2010, 21:40 GMT
Opened by kujub (kujub) - Saturday, 23 May 2009, 17:44 GMT
Last edited by Thomas Bächler (brain0) - Tuesday, 26 January 2010, 21:40 GMT
|
Details
Description:
I rewrote the scripts needed to hook fbsplash into initscripts. http://aur.archlinux.org/packages.php?ID=26039 Tough i encountered one problem. To be able to start the daemon early (instead of after "Loading UDev uevents" which means no progress is shown for several seconds) i needed to implement this hack: /bin/mkdir /dev/fb /bin/mknod -m 660 /dev/fb/0 c 29 0 /bin/chgrp video /dev/fb/0 /bin/ln -s fb/0 /dev/fb0 /bin/mkdir /dev/vc for i in 0 1 ${SPLASH_TTY} ; do /bin/mknod -m 620 /dev/vc/$i c 4 $i /bin/chgrp tty /dev/vc/$i /bin/ln -s vc/$i /dev/tty$i done /bin/mknod -m 666 /dev/tty c 5 0 /bin/chgrp tty /dev/tty Where ${SPLASH_TTY} defaults to 16, but can be configured to any other value. I would appreciate if those nodes could be added as static ones into /lib/udev/devices/ so we could have a clean way to do this. Additional info: * package version(s) udev 141-1 Steps to reproduce: Get initscripts-extras-fbsplash from the AUR. Remove the call to spash_mknods in splash-functions-arch.sh. Install. In /etc/conf.d/fbsplash set SPLASH_START_EARLY="yes" Result: Splash daemon fails to start. |
This task depends upon
Splash daemon fails to start early. (It is started at the later point as if set SPLASH_START_EARLY="no".)
I remember if i didn't chgrp in the hack the groups where wrong after boot. That's why it's a dirty hack and I'm not satisfied with this approach. :/
[quote]fb devices ... are not present on each machine[/quote]
Good point. Is there any way to detect this ?
if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then
splash_real_stat_busy "Loading UDev uevents for starting fbsplash early "
udevstart="$(/bin/date +%s%0N)"
/sbin/udevadm trigger --subsystem-match=tty --subsystem-match=graphics
/sbin/udevadm settle
splash_real_stat_done
udevend="$(/bin/date +%s%0N)"
printhl " UDev uevent processing time: $((($udevend-$udevstart)/1000000))ms"
fi
And hooked it into initscripts at stat_done "Starting UDev Daemon" starting the splash there. Seems to work good and takes only about 110 ms here.
Any concerns ?
How do you hook this up in the initscripts? Does it work with unpatched Arch initscripts? If not, we need to provide more hooks where you can plug in your functions (I _really_ always hated that there were separate initscripts for splash in the past and I really want all this to work with unpatched initscripts, so splash users will always be on the same page as non-splash users).
If you want, you can look at the hook script here: http://aur.archlinux.org/packages/initscripts-extras-fbsplash/initscripts-extras-fbsplash/fbsplash.inithooks . It's installed as /etc/rc.d/functions.d/fbsplash.sh and only does the calls to the main scripts. The 'splash rc_init sysinit is for setting up an tmpfs an for starting the daemon early the 'splash rc_init boot' is used for setting the event device which the daemon needs to watch the keyboard (and for starting the daemon if early start isn't possible).
However dedicated hook points instead of grabbing the stat_busy messages would be more clean for sure. :)
FS#14569)