forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-02-17 557c24d082b6ecb9bfe5407b77ae43fa7650a5dc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh 
### BEGIN INIT INFO
# Provides:             psplash
# Required-Start:
# Required-Stop:
# Default-Start:        S
# Default-Stop:
### END INIT INFO
 
. /etc/default/rcS
export PSPLASH_FIFO_DIR
 
if [ ! -e /dev/fb0 ]; then
    echo "Framebuffer /dev/fb0 not detected"
    echo "Boot splashscreen disabled"
    exit 0;
fi
 
read CMDLINE < /proc/cmdline
for x in $CMDLINE; do
        case $x in
        psplash=false)
       echo "Boot splashscreen disabled" 
       exit 0;
                ;;
        esac
done
 
[ -d $PSPLASH_FIFO_DIR ] || mkdir -p $PSPLASH_FIFO_DIR
if ! mountpoint -q $PSPLASH_FIFO_DIR; then
   mount tmpfs -t tmpfs $PSPLASH_FIFO_DIR -o,size=40k
fi
 
rotation=0
if [ -e /etc/rotation ]; then
   read rotation < /etc/rotation
fi
 
/usr/bin/psplash --angle $rotation &