Commit ae315f0a authored by Florent Revest's avatar Florent Revest

Move psplash launch from rootfs to initramdisk. Fixes the infinite reboot...

Move psplash launch from rootfs to initramdisk. Fixes the infinite reboot time, removes a dirty recipe hack and makes the booting experience slightly smoother
parent 7fb1f988
......@@ -2,7 +2,7 @@ inherit core-image
inherit extrausers
LICENSE = "GPL-2.0"
IMAGE_FEATURES += "splash package-management"
IMAGE_FEATURES += "package-management"
IMAGE_INSTALL += " \
base-files base-passwd systemd busybox iproute2 connman pam-plugin-loginuid bluez5 pulseaudio-server openssh-sshd openssh-sftp-server openssh-scp statefs dsme mce ngfd timed sensorfw android-init mapplauncherd-booster-qtcomponents usb-moded \
......
......@@ -59,6 +59,13 @@ if [ $? -ne 1 ] ; then
/usr/bin/adbd
fi
rotation=0
if [ -e /etc/rotation ]; then
read rotation < /etc/rotation
fi
/usr/bin/psplash --angle $rotation --no-console-switch &
# The sdcard partition may be the rootfs itself or contain a loop file
info "Mounting sdcard..."
mkdir -m 0777 /sdcard /loop
......
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
S = "${WORKDIR}"
RDEPENDS_${PN} += "e2fsprogs-e2fsck"
RDEPENDS_${PN} += "e2fsprogs-e2fsck psplash"
[Unit]
SourcePath=/etc/init.d/psplash.sh
Description=Lightweight splashscreen
DefaultDependencies=no
Before=sysinit.target shutdown.target
Conflicts=shutdown.target
[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/etc/init.d/psplash.sh start
ExecStop=/etc/init.d/psplash.sh stop
#!/bin/sh
### BEGIN INIT INFO
# Provides: psplash
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
### END INIT INFO
read CMDLINE < /proc/cmdline
for x in $CMDLINE; do
case $x in
psplash=false)
echo "Boot splashscreen disabled"
exit 0;
;;
esac
done
export TMPDIR=/mnt/.psplash
mount tmpfs -t tmpfs $TMPDIR -o,size=40k
rotation=0
if [ -e /etc/rotation ]; then
read rotation < /etc/rotation
fi
/usr/bin/psplash --angle $rotation --no-console-switch &
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
DEPENDS += "gdk-pixbuf-native"
SRC_URI += "file://psplash-colors.h \
file://psplash-bar-img.png \
file://psplash-config.h \
file://0001-Don-t-draw-progress-and-message-bar.patch \
file://psplash.service \
file://psplash-img-280.png \
file://psplash-img-320.png \
file://psplash.sh \
"
file://psplash-bar-img.png \
file://psplash-config.h \
file://0001-Don-t-draw-progress-and-message-bar.patch \
file://psplash-img-280.png \
file://psplash-img-320.png"
SPLASH_IMAGES = "file://psplash-img-320.png;outsuffix=default"
PACKAGE_ARCH = "${MACHINE_ARCH}"
......@@ -21,17 +18,4 @@ do_configure_append () {
./make-image-header.sh ./psplash-bar.png BAR
}
do_install_append () {
install -d ${D}/lib/systemd/system/multi-user.target.wants/
cp ../psplash.service ${D}/lib/systemd/system/
ln -s ../psplash.service ${D}/lib/systemd/system/multi-user.target.wants/psplash.service
cp ../psplash.sh ${D}/etc/init.d/psplash.sh
}
# Erase psplash's pkg_postinst which masks psplash from systemd
pkg_postinst_${PN} () {
}
FILES_${PN} += "/lib/systemd/system/"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment