Below are the scripts I am currently using which allowed for:
- boot to Alpine login
- ts_calibrate init script runs and automatically runs the ts_calibrate application if there's no /etc/pointercal file, it also creates an /etc/ts.dev file with the touchscreen device path in it.
- jivelite init script runs to start jivelite
So basically boot all the way to jivelite with the only interaction being the first time through the touchscreen calibration, after that it's all the way to jivelite. I have these packaged up for easier installation but it's really not ready to post quite yet. But you should just be able to put jivelite and ts_calibrate into /etc/init.d/ and jivelite-sp into /usr/bin/ and then:
// I guess I should note that I modified the ts_calibrate script from here:
- boot to Alpine login
- ts_calibrate init script runs and automatically runs the ts_calibrate application if there's no /etc/pointercal file, it also creates an /etc/ts.dev file with the touchscreen device path in it.
- jivelite init script runs to start jivelite
So basically boot all the way to jivelite with the only interaction being the first time through the touchscreen calibration, after that it's all the way to jivelite. I have these packaged up for easier installation but it's really not ready to post quite yet. But you should just be able to put jivelite and ts_calibrate into /etc/init.d/ and jivelite-sp into /usr/bin/ and then:
Code:
rc-update add ts_calibrate rc-update add squeezelite rc-update add jivelite rc-update add alsa
Code:
cbox01:~/repo/alps$ cat jivelite #!/sbin/openrc-run # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 depend() { after squeezelite sshd } start() { ebegin "Starting Jivelite" if [ -e /etc/ts.dev ]; then export SDL_MOUSEDEV=$(head -n1 /etc/ts.dev) export SDL_MOUSEDRV=TSLIB export JIVE_NOCURSOR=1 fi start-stop-daemon \ --start \ --background \ --exec /usr/bin/jivelite-sp \ --pidfile /run/jivelite.pid \ --make-pidfile eend $? } stop() { ebegin "Stopping Jivelite" start-stop-daemon \ --stop \ --exec /usr/bin/jivelite-sp \ --pidfile /run/jivelite.pid eend $? }
Code:
cbox01:~/repo/alps$ cat ts_calibrate #!/sbin/openrc-run export HOME=/root TSDEFAULT=/etc/ts.default TSDEV= depend() { after bootmisc hwdrivers modules before jivelite } # Given an event name, find it in the /dev tree. # This accounts for differences between mdev and udev scan_dev () { SHORTDEV=$1 if [ -z "$SHORTDEV" ]; then TSDEV= return 1 elif [ -e /dev/$SHORTDEV ]; then TSDEV=/dev/$SHORTDEV elif [ -e /dev/input/$SHORTDEV ]; then TSDEV=/dev/input/$SHORTDEV else TSDEV= return 1 fi return 0 } default_ts () { # Gets the filename from the first line of the config file. SHORTDEV=`head -1 $TSDEFAULT` # If the specified file exists, use it with no questions asked. if [ -e $SHORTDEV ]; then TSDEV=$SHORTDEV else return 1 fi return 0 } find_ts_legacy () { # Legacy method - fallback if capabilities are broken SHORTDEV=`dmesg | grep -i "ts \|input: ts\|tsc\| touch[ ]*screen" | grep -o input[0-9] \ | sed s/input/event/` scan_dev $SHORTDEV return $? } find_device () { if [ -e $TSDEFAULT ]; then default_ts fi if [ -z $TSDEV ]; then find_ts_legacy fi if [ $TSDEV ]; then echo $TSDEV > /etc/ts.dev else rm -f /etc/ts.dev exit 1 fi } run_calibration () { if [ ! -s /etc/pointercal ]; then ts_calibrate > /tmp/`basename $0`.log 2>&1 fi } start() { ebegin "Configuring touchscreen" find_device run_calibration eend $? } stop() { return 0 }
Code:
cbox01:~/repo/alps$ cat jivelite-sp #!/bin/sh export LOG=/var/log/jivelite.log if [ ! -z ${JL_FRAME_BUFFER} ]; then export SDL_FBDEV=$JL_FRAME_BUFFER echo "Using $SDL_FBDEV as frame buffer device." >> $LOG fi if [ -z ${JL_FRAME_RATE} ]; then JL_FRAME_RATE=22 fi export JIVE_FRAMERATE=$JL_FRAME_RATE echo "Frame rate set to $JIVE_FRAMERATE frames per second." >> $LOG if [ -z ${JL_FRAME_DEPTH} ]; then JL_FRAME_DEPTH=32 fi /usr/sbin/fbset -depth $JL_FRAME_DEPTH >> $LOG echo "Frame buffer color bit depth set to $JL_FRAME_DEPTH." >> $LOG #while true; do # sleep 3 /usr/bin/jivelite >> $LOG 2>&1 #done
Comment