Add plymouth support
Add basic support for the use of plymouth in the new initrd world. Also includes a hack at the moment to install from a local plymouth tree to make testing easiermaster
parent
ca9f625917
commit
0c70846e5d
|
@ -46,6 +46,15 @@ mkdir -p $tmpdir/etc $tmpdir/proc $tmpdir/sys $tmpdir/sysroot
|
||||||
# FIXME: we don't install modules right now, but for the testing we're doing
|
# FIXME: we don't install modules right now, but for the testing we're doing
|
||||||
# everything is already built-in
|
# everything is already built-in
|
||||||
|
|
||||||
|
# plymouth
|
||||||
|
if [ -x /usr/libexec/plymouth/plymouth-populate-initrd ]; then
|
||||||
|
/usr/libexec/plymouth/plymouth-populate-initrd -t "$tmpdir" || :
|
||||||
|
# since we actually require a patched plymouth at the moment, this is useful
|
||||||
|
if [ -d plymouth ]; then
|
||||||
|
pushd plymouth >/dev/null ; make DESTDIR="$tmpdir" install ; popd >/dev/null
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
pushd $tmpdir >/dev/null
|
pushd $tmpdir >/dev/null
|
||||||
find . |cpio -H newc -o |gzip -9 > $INITRDOUT
|
find . |cpio -H newc -o |gzip -9 > $INITRDOUT
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
29
init
29
init
|
@ -7,10 +7,11 @@
|
||||||
|
|
||||||
emergency_shell()
|
emergency_shell()
|
||||||
{
|
{
|
||||||
|
[ -x /bin/plymouth ] && /bin/plymouth --hide-splash
|
||||||
echo ; echo
|
echo ; echo
|
||||||
echo "Bug in initramfs /init detected. Dropping to a shell. Good luck!"
|
echo "Bug in initramfs /init detected. Dropping to a shell. Good luck!"
|
||||||
echo
|
echo
|
||||||
bash
|
bash < /dev/console
|
||||||
}
|
}
|
||||||
trap "emergency_shell" 0 2
|
trap "emergency_shell" 0 2
|
||||||
|
|
||||||
|
@ -27,6 +28,30 @@ mount -t proc /proc /proc
|
||||||
mount -t sysfs /sys /sys
|
mount -t sysfs /sys /sys
|
||||||
mount -t tmpfs -omode=0755 udev /dev
|
mount -t tmpfs -omode=0755 udev /dev
|
||||||
|
|
||||||
|
# FIXME: what device nodes does plymouth really _need_ ?
|
||||||
|
mknod /dev/console c 5 1
|
||||||
|
mknod /dev/null c 1 3
|
||||||
|
mknod /dev/kmsg c 1 11
|
||||||
|
mknod /dev/ptmx c 5 2
|
||||||
|
mknod /dev/fb c 29 0
|
||||||
|
mkdir /dev/pts
|
||||||
|
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
|
||||||
|
mkdir -m 1777 /dev/shm
|
||||||
|
ln -s /proc/self/fd /dev/fd
|
||||||
|
ln -s fd/0 /dev/stdin
|
||||||
|
ln -s fd/1 /dev/stdout
|
||||||
|
ln -s fd/2 /dev/stderr
|
||||||
|
mknod /dev/systty c 4 0
|
||||||
|
mknod /dev/tty0 c 4 0
|
||||||
|
mknod /dev/tty1 c 4 1
|
||||||
|
mknod /dev/tty2 c 4 2
|
||||||
|
|
||||||
|
# start plymouth if it's available
|
||||||
|
# arguably we need some of udev run first for fbmods and above devnodes :/
|
||||||
|
[ -x /sbin/plymouthd ] && /sbin/plymouthd --attach-to-session
|
||||||
|
[ -x /bin/plymouth ] && /bin/plymouth --show-splash
|
||||||
|
|
||||||
|
|
||||||
# start up udev and trigger cold plugs
|
# start up udev and trigger cold plugs
|
||||||
/sbin/udevd --daemon
|
/sbin/udevd --daemon
|
||||||
/sbin/udevadm trigger
|
/sbin/udevadm trigger
|
||||||
|
@ -83,6 +108,8 @@ mount -t sysfs /sys $NEWROOT/sys
|
||||||
|
|
||||||
# kill off udev
|
# kill off udev
|
||||||
kill `pidof udevd`
|
kill `pidof udevd`
|
||||||
|
|
||||||
|
[ -x /bin/plymouth ] && /bin/plymouth --newroot=$NEWROOT
|
||||||
# FIXME: nash die die die
|
# FIXME: nash die die die
|
||||||
exec /sbin/switch_root
|
exec /sbin/switch_root
|
||||||
# davej doesn't like initrd bugs
|
# davej doesn't like initrd bugs
|
||||||
|
|
Loading…
Reference in New Issue