mirror of
https://github.com/FunKey-Project/FunKey-OS.git
synced 2025-12-12 15:48:51 +01:00
use new Instant Play system
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
parent
504ff1b66a
commit
7cc4acff1a
@ -53,7 +53,7 @@
|
|||||||
7+13, SHELL_COMMAND, quick_action_volume_down, Fn+A, Volume--
|
7+13, SHELL_COMMAND, quick_action_volume_down, Fn+A, Volume--
|
||||||
7+11, SHELL_COMMAND, quick_action_bright_up, Fn+B, Brightness++
|
7+11, SHELL_COMMAND, quick_action_bright_up, Fn+B, Brightness++
|
||||||
7+14, SHELL_COMMAND, quick_action_bright_down, Fn+X, Brightness--
|
7+14, SHELL_COMMAND, quick_action_bright_down, Fn+X, Brightness--
|
||||||
10, SHELL_COMMAND, sched_shutdown 1 & signal_usr1_to_emulators, N_OE, Quick save and Poweroff because of N_OE
|
10, SHELL_COMMAND, sched_shutdown 1, N_OE, Instant Play save and Poweroff because of N_OE
|
||||||
7+15+2, SHELL_COMMAND, display_notif_system_stats, Fn+L1+L2, display system cpu and ram usage
|
7+15+2, SHELL_COMMAND, display_notif_system_stats, Fn+L1+L2, display system cpu and ram usage
|
||||||
|
|
||||||
#7+12, KEYBOARD, KEY_G, KEY_G, Brightness++
|
#7+12, KEYBOARD, KEY_G, KEY_G, Brightness++
|
||||||
|
|||||||
@ -38,7 +38,7 @@ null::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr
|
|||||||
#::ctrlaltdel:/sbin/reboot
|
#::ctrlaltdel:/sbin/reboot
|
||||||
|
|
||||||
# Stuff to do before rebooting
|
# Stuff to do before rebooting
|
||||||
::shutdown:/etc/init.d/rcK
|
#::shutdown:/etc/init.d/rcK
|
||||||
::shutdown:/sbin/swapoff -a
|
#::shutdown:/sbin/swapoff -a
|
||||||
::shutdown:/bin/umount -r /
|
#::shutdown:/bin/umount -r /
|
||||||
::shutdown:/bin/umount -r /mnt
|
#::shutdown:/bin/umount -r /mnt
|
||||||
|
|||||||
@ -56,4 +56,5 @@ assembly_tests >/dev/null 2>&1
|
|||||||
|
|
||||||
# Start launcher
|
# Start launcher
|
||||||
echo "Start launcher"
|
echo "Start launcher"
|
||||||
start_launcher >/dev/null 2>&1 &
|
#start_launcher >/dev/null 2>&1 &
|
||||||
|
start_launcher &
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Security
|
|
||||||
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
||||||
export HOME=/tmp/funkey
|
export HOME=/tmp/funkey
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
mednafen -fs 1 -gg.stretch full "$1"
|
|
||||||
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
|
mednafen -fs 1 -gg.stretch full "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|||||||
@ -3,4 +3,10 @@
|
|||||||
export HOME=/tmp/funkey
|
export HOME=/tmp/funkey
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
sdlgnuboy --syncrtc "$1"
|
|
||||||
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
|
sdlgnuboy --syncrtc "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|||||||
@ -2,5 +2,12 @@
|
|||||||
|
|
||||||
export HOME=/tmp/funkey
|
export HOME=/tmp/funkey
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
|
|
||||||
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
gpsp "$1"
|
gpsp "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|
||||||
|
|||||||
@ -3,4 +3,10 @@
|
|||||||
export HOME=/tmp/funkey
|
export HOME=/tmp/funkey
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
gpsp "$1"
|
|
||||||
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
|
gpsp "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Security
|
|
||||||
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
||||||
export HOME=/tmp/funkey
|
export HOME=/tmp/funkey
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
mednafen -fs 1 -lynx.stretch full "$1"
|
|
||||||
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
|
mednafen -fs 1 -lynx.stretch full "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Security
|
|
||||||
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
||||||
export HOME=/tmp/funkey
|
export HOME=/tmp/funkey
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
mednafen -sound 1 -soundrate 22050 -soundbufsize 100 -vdriver sdl -frameskip 1 -fs 0 "$1"
|
|
||||||
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
|
mednafen -sound 1 -soundrate 22050 -soundbufsize 100 -vdriver sdl -frameskip 1 -fs 0 "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|||||||
@ -3,4 +3,10 @@
|
|||||||
export HOME=/tmp/funkey
|
export HOME=/tmp/funkey
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
PicoDrive "$1"
|
|
||||||
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
|
PicoDrive "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|||||||
@ -3,5 +3,10 @@
|
|||||||
export HOME=/tmp/funkey
|
export HOME=/tmp/funkey
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
fceux "$1"
|
|
||||||
|
|
||||||
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
|
fceux "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Security
|
|
||||||
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
||||||
export HOME=/tmp/funkey
|
export HOME=/tmp/funkey
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
mednafen -fs 1 -ngp.stretch full "$1"
|
|
||||||
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
|
mednafen -fs 1 -ngp.stretch full "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Security
|
|
||||||
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
||||||
export HOME=/tmp/funkey
|
export HOME=/tmp/funkey
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
mednafen -fs 1 -force_module pce_fast -pce_fast.stretch full "$1"
|
|
||||||
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
|
mednafen -fs 1 -force_module pce_fast -pce_fast.stretch full "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
export HOME=/tmp/funkey
|
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
pcsx -frameskip -cdfile "$1"
|
|
||||||
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
|
pcsx -frameskip -cdfile "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|||||||
@ -3,5 +3,10 @@
|
|||||||
export HOME=/tmp/funkey
|
export HOME=/tmp/funkey
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
#pcsx -frameskip -cdfile "$1"
|
|
||||||
pcsx -cdfile "$1"
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
|
pcsx -cdfile "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|||||||
@ -3,4 +3,10 @@
|
|||||||
export HOME=/tmp/funkey
|
export HOME=/tmp/funkey
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
PicoDrive "$1"
|
|
||||||
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
|
PicoDrive "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|||||||
@ -3,4 +3,10 @@
|
|||||||
export HOME=/tmp/funkey
|
export HOME=/tmp/funkey
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
psnes "$1"
|
|
||||||
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
|
psnes "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|||||||
@ -3,4 +3,10 @@
|
|||||||
export HOME=/tmp/funkey
|
export HOME=/tmp/funkey
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
psnes "$1"
|
|
||||||
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
|
psnes "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Security
|
|
||||||
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
||||||
export HOME=/tmp/funkey
|
export HOME=/tmp/funkey
|
||||||
mkdir -p ${HOME}
|
mkdir -p ${HOME}
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
mednafen -fs 1 -wswan.stretch full "$1"
|
|
||||||
|
# Launch the process in background, record the PID into a file, wait
|
||||||
|
# for the process to terminate and erase the recorded PID
|
||||||
|
mednafen -fs 1 -wswan.stretch full "$1"&
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
## Register ourself as the running FunKey task for receiving USR1
|
||||||
|
## signal for shutting down
|
||||||
|
echo $$ > "/var/run/funkey.pid"
|
||||||
|
|
||||||
## Check if tests must be run
|
## Check if tests must be run
|
||||||
RUN_ENV_VAR=$(fw_printenv -n assembly_tests 2>/dev/null)
|
RUN_ENV_VAR=$(fw_printenv -n assembly_tests 2>/dev/null)
|
||||||
if [ "x${RUN_ENV_VAR}" != "x1" ]; then
|
if [ "x${RUN_ENV_VAR}" != "x1" ]; then
|
||||||
@ -40,6 +44,9 @@ function function_magnet_detected_ok {
|
|||||||
## Kill scheduled shutdown
|
## Kill scheduled shutdown
|
||||||
pkill sched_shutdown
|
pkill sched_shutdown
|
||||||
|
|
||||||
|
## Kill the funkey_prod_screen binary
|
||||||
|
killall -s USR1 "${PROD_SCREEN_BIN} > /dev/null 2>&1
|
||||||
|
|
||||||
## Write magnet_detected file
|
## Write magnet_detected file
|
||||||
if $test_failed; then
|
if $test_failed; then
|
||||||
echo "1" > $MAGNET_DETECTED_FILE
|
echo "1" > $MAGNET_DETECTED_FILE
|
||||||
@ -58,6 +65,9 @@ function function_magnet_detected_ok {
|
|||||||
## Function called when SIGUSR1 is caught while NOT waiting for it
|
## Function called when SIGUSR1 is caught while NOT waiting for it
|
||||||
function function_magnet_detected_ko {
|
function function_magnet_detected_ko {
|
||||||
echo "ERROR: Caught SIGUSR1 signal (magnet detected!)"
|
echo "ERROR: Caught SIGUSR1 signal (magnet detected!)"
|
||||||
|
|
||||||
|
## Kill the funkey_prod_screen binary
|
||||||
|
killall -s USR1 "${PROD_SCREEN_BIN} > /dev/null 2>&1
|
||||||
sync
|
sync
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
11
FunKey/board/funkey/rootfs-overlay/usr/local/sbin/cancel_sched_powerdown
Executable file
11
FunKey/board/funkey/rootfs-overlay/usr/local/sbin/cancel_sched_powerdown
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Uncomment the following line to get debug info
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
if [ ${#} != 0 ]; then
|
||||||
|
echo "Usage: $(basename ${0})"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
pkill sched_powerdown
|
||||||
|
exit 0
|
||||||
12
FunKey/board/funkey/rootfs-overlay/usr/local/sbin/erase_pid
Executable file
12
FunKey/board/funkey/rootfs-overlay/usr/local/sbin/erase_pid
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Uncomment the following line to get debug info
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
# Check args
|
||||||
|
if [ ${#} -ne 0 ]; then
|
||||||
|
echo "Usage: $(basename ${0})"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
rm -f /var/run/funkey.pid
|
||||||
|
exit 0
|
||||||
37
FunKey/board/funkey/rootfs-overlay/usr/local/sbin/instant_play
Executable file
37
FunKey/board/funkey/rootfs-overlay/usr/local/sbin/instant_play
Executable file
@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Uncomment the following line to get debug info
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
# Check args
|
||||||
|
if [ ${#} -eq 0 ]; then
|
||||||
|
echo "Usage: $(basename ${0}) args..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
INSTANT_PLAY_FILE="/mnt/instant_play"
|
||||||
|
|
||||||
|
# Write quick load file args
|
||||||
|
echo -n "" > "${INSTANT_PLAY_FILE}"
|
||||||
|
for arg in "$@"; do
|
||||||
|
if $(echo "${arg}" | egrep -q '[[:space:]]'); then
|
||||||
|
|
||||||
|
# Add quotes around arguments containing spaces
|
||||||
|
echo -n "\"${arg}\" " >> "${INSTANT_PLAY_FILE}"
|
||||||
|
else
|
||||||
|
echo -n "${arg} " >> "${INSTANT_PLAY_FILE}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Add the magic sauce to launch the process in background, record the
|
||||||
|
# PID into a file, wait for the process to terminate and erase the
|
||||||
|
# recorded PID
|
||||||
|
cat << EOF >> "${INSTANT_PLAY_FILE}"
|
||||||
|
&
|
||||||
|
record_pid \$!
|
||||||
|
wait \$!
|
||||||
|
erase_pid
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Now terminate gracefully
|
||||||
|
exec shutdown_funkey
|
||||||
@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
killall mednafen gpsp psnes pcsx sdlgnuboy PicoDriveBin
|
|
||||||
exit 0
|
|
||||||
12
FunKey/board/funkey/rootfs-overlay/usr/local/sbin/record_pid
Executable file
12
FunKey/board/funkey/rootfs-overlay/usr/local/sbin/record_pid
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Uncomment the following line to get debug info
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
# Check args
|
||||||
|
if [ ${#} -ne 1 ]; then
|
||||||
|
echo "Usage: $(basename ${0}) pid"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo ${1} > /var/run/funkey.pid
|
||||||
|
exit 0
|
||||||
@ -1,15 +1,21 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ ${#} != 1 ]; then
|
# Uncomment the following line to get debug info
|
||||||
echo "Usage: $0 seconds_before_shutdown"
|
#set -x
|
||||||
|
|
||||||
|
if [ ${#} != 1 -o "${1}" -eq 0 ]; then
|
||||||
|
echo "Usage: $(basename ${0}) grace_delay"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
nb_secs_to_wait=$1
|
# Send USR1 signal to the running FunKey process to warn about
|
||||||
|
# impending shutdown
|
||||||
|
pkill -USR1 -F /var/run/funkey.pid > /dev/null 2>&1
|
||||||
|
|
||||||
# Wait $nb_secs_to_wait seconds to catch signal USR2
|
# Delay for the given grace period seconds to catch signal USR2.
|
||||||
# If the signal is caught, then it means a process canceled this shutdown
|
# If the signal is caught, then it means the running FunKey process
|
||||||
sleep ${nb_secs_to_wait}
|
# canceled this shutdown and will handle it by itself.
|
||||||
|
sleep ${1}
|
||||||
|
|
||||||
# Too late to cancel: init shutdown
|
# Delay expired, initiate shutdown
|
||||||
shutdown_funkey
|
shutdown_funkey
|
||||||
|
|||||||
@ -9,5 +9,7 @@ start_audio_amp 0 >/dev/null 2>&1
|
|||||||
# Force Read Only
|
# Force Read Only
|
||||||
ro
|
ro
|
||||||
|
|
||||||
|
umount -r /mnt
|
||||||
|
|
||||||
# Poweroff
|
# Poweroff
|
||||||
poweroff
|
poweroff
|
||||||
|
|||||||
@ -1,23 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# This should replaced by storing the correct PID before
|
|
||||||
# launching an emulator and signaling only this one.
|
|
||||||
|
|
||||||
RUN_ENV_VAR=$(fw_printenv -n assembly_tests 2>/dev/null)
|
|
||||||
if [ "x${RUN_ENV_VAR}" == "x1" ]; then
|
|
||||||
# First this one
|
|
||||||
killall -s USR1 assembly_tests > /dev/null 2>&1
|
|
||||||
|
|
||||||
# Then this one
|
|
||||||
killall -s USR1 funkey_prod_screens > /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Send signal to all PCSX first (time critical)
|
|
||||||
killall -s USR1 pcsx > /dev/null 2>&1
|
|
||||||
|
|
||||||
# Send signal to all other emulators
|
|
||||||
killall -s USR1 gpsp psnes sdlgnuboy PicoDrive mednafen fceux > /dev/null 2>&1
|
|
||||||
|
|
||||||
# Send signal to launchers
|
|
||||||
killall -s USR1 retrofe gmenu2x > /dev/null 2>&1
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@ -1,58 +1,60 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
LOCK_FILE=/var/lock/launcher.lock
|
# Uncomment the following line to get debug info
|
||||||
PREVENT_LAUNCHER_FILE=/mnt/prevent_launcher
|
#set -x
|
||||||
PREVENT_LAUNCHER_FILE2=/boot/prevent_launcher
|
|
||||||
QUICK_LOAD_FILE=/mnt/quick_load_cmd
|
|
||||||
GMENU2X_FILE=/mnt/gmenu2x
|
|
||||||
GMENU2X_HOME=/mnt/funkey/.gmenu2x
|
|
||||||
|
|
||||||
if [ -f ${LOCK_FILE} ]; then
|
LOCK_FILE="/var/lock/launcher.lock"
|
||||||
|
INSTANT_PLAY_FILE="/mnt/instant_play"
|
||||||
|
GMENU2X_FILE="/mnt/gmenu2x"
|
||||||
|
GMENU2X_HOME="/mnt/funkey/.gmenu2x"
|
||||||
|
|
||||||
|
if [ -f "${LOCK_FILE}" ]; then
|
||||||
echo "${LOCK_FILE} already exists"
|
echo "${LOCK_FILE} already exists"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
touch ${LOCK_FILE}
|
touch "${LOCK_FILE}"
|
||||||
|
|
||||||
mkdir -p ${MEDNAFEN_HOME}
|
mkdir -p "${MEDNAFEN_HOME}"
|
||||||
cp /usr/games/lynxboot.img /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
cp "/usr/games/lynxboot.img" "/usr/games/mednafen-09x.cfg" "${MEDNAFEN_HOME}/"
|
||||||
|
|
||||||
mkdir -p ${GMENU2X_HOME}
|
mkdir -p "${GMENU2X_HOME}"
|
||||||
mkdir -p /mnt/apps
|
mkdir -p "/mnt/apps"
|
||||||
|
|
||||||
# Launch Previous Game
|
# Launch Previous Game if any
|
||||||
if [ -f ${QUICK_LOAD_FILE} ]; then
|
if [ -f "${INSTANT_PLAY_FILE}" ]; then
|
||||||
command=$(cat ${QUICK_LOAD_FILE})
|
echo "Found Instant Play file, restarting previous game with command: "$(head -n 1 "${INSTANT_PLAY_FILE}")
|
||||||
echo "Found quick load file, restarting previous game with command:"
|
source "${INSTANT_PLAY_FILE}"
|
||||||
echo ${command}
|
rm -f "${INSTANT_PLAY_FILE}"
|
||||||
rm ${QUICK_LOAD_FILE}
|
|
||||||
eval ${command}
|
|
||||||
termfix_all
|
termfix_all
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Loop to launch launcher indefinitely
|
# Then loop to launch the launcher indefinitely
|
||||||
while true; do
|
while true; do
|
||||||
|
|
||||||
# Check if prevent launcher file present
|
# Check if prevent launcher file present
|
||||||
if [ -f ${PREVENT_LAUNCHER_FILE} ]; then
|
if [ -f "${PREVENT_LAUNCHER_FILE}" ]; then
|
||||||
echo "Found file: ${PREVENT_LAUNCHER_FILE}, not launching launcher"
|
echo "${PREVENT_LAUNCHER_FILE} file found, not starting launcher"
|
||||||
sleep 5
|
|
||||||
elif [ -f ${PREVENT_LAUNCHER_FILE2} ]; then
|
|
||||||
echo "Found file: ${PREVENT_LAUNCHER_FILE2}, not launching launcher"
|
|
||||||
sleep 5
|
sleep 5
|
||||||
else
|
else
|
||||||
if [ -f ${GMENU2X_FILE} ]; then
|
if [ -f "${GMENU2X_FILE}" ]; then
|
||||||
|
|
||||||
# Launch gmenu2x
|
# Launch gmenu2x
|
||||||
gmenu2x
|
gmenu2x&
|
||||||
else
|
else
|
||||||
|
|
||||||
# Launch Retrofe
|
# Launch Retrofe
|
||||||
retrofe
|
retrofe&
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Record the PID into a file, wait for the
|
||||||
|
# process to terminate and erase the recorded PID
|
||||||
|
record_pid $!
|
||||||
|
wait $!
|
||||||
|
erase_pid
|
||||||
|
|
||||||
# In case retrofe quits with errors, clear graphic VT
|
# In case retrofe quits with errors, clear graphic VT
|
||||||
termfix_all
|
termfix_all
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
rm ${LOCK_FILE}
|
rm "${LOCK_FILE}"
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
FCEUX_VERSION = 12a0245
|
FCEUX_VERSION = addf9a3
|
||||||
FCEUX_SITE_METHOD = git
|
FCEUX_SITE_METHOD = git
|
||||||
FCEUX_SITE = https://github.com/FunKey-Project/fceux.git
|
FCEUX_SITE = https://github.com/FunKey-Project/fceux.git
|
||||||
FCEUX_LICENSE = GPL-2.0
|
FCEUX_LICENSE = GPL-2.0
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PCSX_REARMED_VERSION = dd50647
|
PCSX_REARMED_VERSION = d048e75a
|
||||||
PCSX_REARMED_SITE_METHOD = git
|
PCSX_REARMED_SITE_METHOD = git
|
||||||
PCSX_REARMED_SITE = https://github.com/FunKey-Project/pcsx_rearmed.git
|
PCSX_REARMED_SITE = https://github.com/FunKey-Project/pcsx_rearmed.git
|
||||||
PCSX_REARMED_LICENSE = GPL-2.0
|
PCSX_REARMED_LICENSE = GPL-2.0
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
POCKETSNES_VERSION = PocketSNES-FunKey-1.00
|
POCKETSNES_VERSION = 2d5e38d
|
||||||
POCKETSNES_SITE_METHOD = git
|
POCKETSNES_SITE_METHOD = git
|
||||||
POCKETSNES_SITE = https://github.com/FunKey-Project/PocketSNES.git
|
POCKETSNES_SITE = https://github.com/FunKey-Project/PocketSNES.git
|
||||||
POCKETSNES_LICENSE = GPL-2.0
|
POCKETSNES_LICENSE = GPL-2.0
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
GNUBOY_VERSION = gnuboy-FunKey-1.00
|
GNUBOY_VERSION = 63fcd82
|
||||||
GNUBOY_SITE_METHOD = git
|
GNUBOY_SITE_METHOD = git
|
||||||
GNUBOY_SITE = https://github.com/FunKey-Project/gnuboy.git
|
GNUBOY_SITE = https://github.com/FunKey-Project/gnuboy.git
|
||||||
GNUBOY_LICENSE = GPL-2.0
|
GNUBOY_LICENSE = GPL-2.0
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
GPSP_VERSION = gpsp-FunKey-1.00
|
GPSP_VERSION = fd81d8a
|
||||||
GPSP_SITE_METHOD = git
|
GPSP_SITE_METHOD = git
|
||||||
GPSP_SITE = https://github.com/FunKey-Project/gpsp.git
|
GPSP_SITE = https://github.com/FunKey-Project/gpsp.git
|
||||||
GPSP_LICENSE = GPL-2.0
|
GPSP_LICENSE = GPL-2.0
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
MEDNAFEN_VERSION = 6016b5f
|
MEDNAFEN_VERSION = 6f4755e3
|
||||||
MEDNAFEN_SITE_METHOD = git
|
MEDNAFEN_SITE_METHOD = git
|
||||||
MEDNAFEN_SITE = https://github.com/FunKey-Project/mednafen-git.git
|
MEDNAFEN_SITE = https://github.com/FunKey-Project/mednafen-git.git
|
||||||
MEDNAFEN_LICENSE = GPL-2.0+
|
MEDNAFEN_LICENSE = GPL-2.0+
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PICODRIVE_VERSION = picodrive-FunKey-1.00
|
PICODRIVE_VERSION = e37c0fa
|
||||||
PICODRIVE_SITE_METHOD = git
|
PICODRIVE_SITE_METHOD = git
|
||||||
PICODRIVE_SITE = https://github.com/FunKey-Project/picodrive.git
|
PICODRIVE_SITE = https://github.com/FunKey-Project/picodrive.git
|
||||||
PICODRIVE_LICENSE = MAME
|
PICODRIVE_LICENSE = MAME
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user