Skip to content

Commit

Permalink
Fixed sleep crash issues on newer 3.3.0 kobo devices
Browse files Browse the repository at this point in the history
  • Loading branch information
chandravadans committed Jun 25, 2014
1 parent 3433241 commit 877a1d2
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 23 deletions.
8 changes: 8 additions & 0 deletions kobo/crashfix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
i = 0
while :
do
echo $i > test.log
sleep 1
done
echo "Done" >> test.log
69 changes: 46 additions & 23 deletions kobo/koreader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,54 @@ export TESSDATA_PREFIX="data"
# export dict directory
export STARDICT_DATA_DIR="data/dict"

# exit from nickel
killall nickel
killall hindenburg

# finally call the launcher
./reader.lua /mnt/onboard 2> crash.log
# stop Nickel
killall -STOP nickel

# store the content of the framebuffer
#dd if=/dev/fb0 of=.last_screen_content

# back to nickel again :)
( usleep 400000; /etc/init.d/on-animator.sh ) &
(
/usr/local/Kobo/pickel disable.rtc.alarm
if [ ! -e /etc/wpa_supplicant/wpa_supplicant.conf ]; then
cp /etc/wpa_supplicant/wpa_supplicant.conf.template /etc/wpa_supplicant/wpa_supplicant.conf
fi
# finally call reader

echo 1 > /sys/devices/platform/mxc_dvfs_core.0/enable
/sbin/hwclock -s -u
) &
# chandravadan's fix START
#Before calling the reader, run a script in background that would prevent the device from sleep crashing
sh ./crashfix.sh &

export QWS_MOUSE_PROTO="tslib_nocal:/dev/input/event1"
export QWS_KEYBOARD=imx508kbd:/dev/input/event0
export QWS_DISPLAY=Transformed:imx508:Rot90
export NICKEL_HOME=/mnt/onboard/.kobo
export LD_LIBRARY_PATH=/usr/local/Kobo
#record pid of the process that runs, so it can be killed later
echo $!> waiter.pid
# chandravadan's fix END

/usr/local/Kobo/hindenburg &
/usr/local/Kobo/nickel -qws -skipFontLoad

./reader.lua /mnt/onboard 2> crash.log
#./reader.lua -d /mnt/onboard > ./koreader_debug.log 2>&1

# continue with nickel

# chandravadan's fix START
#kill the waiter process
kill `cat waiter.pid`
echo "killed waiter" >>test.log
# chandravadan's fix END


killall -CONT nickel

# return to home screen
case `/bin/kobo_config.sh * 2>/dev/null` in
dragon) #DEVICE=AURAHD
#no binary file available
;;
phoenix) #DEVICE=AURA
cat ./KoboAuraTapHomeIcon.bin > /dev/input/event1
cat ./KoboAuraTapHomeIcon.bin > /dev/input/event1
;;
kraken) #DEVICE=GLO
#no binary file available
;;
pixie) #DEVICE=MINI
cat ./KoboMiniTapHomeIcon.bin > /dev/input/event1
cat ./KoboMiniTapHomeIcon.bin > /dev/input/event1
;;
trilogy|*) #DEVICE=TOUCH
cat ./KoboTouchHomeButton.bin > /dev/input/event0
;;
esac

0 comments on commit 877a1d2

Please sign in to comment.