ypr0: Add variables to provide a argv and stdout/err redirection for running Rockbox to the loader script.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31426 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2011-12-24 23:13:27 +00:00
parent 1a0bc64e02
commit bf021e3ded
2 changed files with 7 additions and 1 deletions

View file

@ -46,6 +46,9 @@ else
MAINFILE="/usr/local/bin/r0" MAINFILE="/usr/local/bin/r0"
fi fi
# Parameters for r0
MAINFILE_ARGV="Application AppMain"
# source the rockbox loader script # source the rockbox loader script
SOURCE="/mnt/media0/.rockbox/rockbox.sh" SOURCE="/mnt/media0/.rockbox/rockbox.sh"
[ -f $SOURCE ] && . $SOURCE [ -f $SOURCE ] && . $SOURCE
@ -55,10 +58,11 @@ SOURCE="/mnt/media0/rc.user"
[ -f $SOURCE ] && . $SOURCE [ -f $SOURCE ] && . $SOURCE
# finally call the entry point # finally call the entry point
# $MAINFILE_REDIRECT can be specified to do e.g. > /dev/null
if [ -e $MAINFILE ] if [ -e $MAINFILE ]
then then
chmod 777 $MAINFILE chmod 777 $MAINFILE
$MAINFILE Application AppMain sh -c "$MAINFILE $MAINFILE_ARGV $MAINFILE_REDIRECT"
rm -f /mnt/media1/r0_media0 rm -f /mnt/media1/r0_media0
sync sync
# sleep 5 # sleep 5

View file

@ -45,3 +45,5 @@ mount --bind /mnt/media0/.rockbox /.rockbox
mount --bind /mnt/media0/Playlists /Playlists mount --bind /mnt/media0/Playlists /Playlists
MAINFILE="/mnt/media0/.rockbox/rockbox" MAINFILE="/mnt/media0/.rockbox/rockbox"
MAINFILE_ARGV=''
MAINFILE_REDIRECT='>/dev/null 2>&1'