# FIXME: we don't install modules right now, but for the testing we're doing
# 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
find . |cpio -H newc -o |gzip -9 > $INITRDOUT
popd >/dev/null
emergency_shell()
{
+ [ -x /bin/plymouth ] && /bin/plymouth --hide-splash
echo ; echo
echo "Bug in initramfs /init detected. Dropping to a shell. Good luck!"
echo
- bash
+ bash < /dev/console
}
trap "emergency_shell" 0 2
mount -t sysfs /sys /sys
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
/sbin/udevd --daemon
/sbin/udevadm trigger
# kill off udev
kill `pidof udevd`
+
+[ -x /bin/plymouth ] && /bin/plymouth --newroot=$NEWROOT
# FIXME: nash die die die
exec /sbin/switch_root
# davej doesn't like initrd bugs