init: Enable oem native resolution support, and debug info

This commit is contained in:
MilhouseVH 2016-06-03 09:20:04 +01:00
parent 4809df9715
commit c2ed75d138

View File

@ -167,6 +167,10 @@
fi
}
debug_msg() {
echo "$1" >&$SILENT_OUT
}
debug_shell() {
echo "### Starting debugging shell... type exit to quit ###"
@ -434,23 +438,37 @@
fi
# load splash
if [ -f /flash/oemsplash.png ]; then
SPLASHIMAGE="/flash/oemsplash.png"
elif [ -f /splash/splash.conf ]; then
if [ -f /splash/splash.conf ]; then
. /splash/splash.conf
fi
# Select splash image based on current native resolution
if [ -z "$SPLASHIMAGE" ]; then
vres="$(fbset | awk '/geometry/ { print $3 }')"
if [ -n "$vres" -a -f /splash/splash-$vres.png ]; then
SPLASHIMAGE="/splash/splash-$vres.png"
vres="$(fbset 2>/dev/null | awk '/geometry/ { print $3 }')"
if [ -f /flash/oemsplash.png -o -f /flash/oemsplash-1080.png ]; then
if [ -n "$vres" -a -f /flash/oemsplash-$vres.png ]; then
SPLASHIMAGE="/flash/oemsplash-$vres.png"
elif [ -f /flash/oemsplash-1080.png ]; then
SPLASHIMAGE="/flash/oemsplash-1080.png"
else
SPLASHIMAGE="/flash/oemsplash.png"
fi
else
SPLASHIMAGE="/splash/splash-1080.png"
if [ -n "$vres" -a -f /splash/splash-$vres.png ]; then
SPLASHIMAGE="/splash/splash-$vres.png"
else
SPLASHIMAGE="/splash/splash-1080.png"
fi
fi
fi
ply-image $SPLASHIMAGE > /dev/null 2>&1
if [ -n "$SPLASHIMAGE" -a -f "$SPLASHIMAGE" ]; then
ply-image $SPLASHIMAGE > /dev/null 2>&1
fi
debug_msg "Framebuffer vertical res: $vres"
debug_msg "Framebuffer splash image: $SPLASHIMAGE"
fi
fi
}