From bf021e3ded2dcfe82493c88094a76d9a82e85994 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sat, 24 Dec 2011 23:13:27 +0000 Subject: [PATCH] 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 --- utils/ypr0tools/files/etc/profile | 6 +++++- utils/ypr0tools/rockbox.sh | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/utils/ypr0tools/files/etc/profile b/utils/ypr0tools/files/etc/profile index 4ba61d7535..9fa1505544 100755 --- a/utils/ypr0tools/files/etc/profile +++ b/utils/ypr0tools/files/etc/profile @@ -46,6 +46,9 @@ else MAINFILE="/usr/local/bin/r0" fi +# Parameters for r0 +MAINFILE_ARGV="Application AppMain" + # source the rockbox loader script SOURCE="/mnt/media0/.rockbox/rockbox.sh" [ -f $SOURCE ] && . $SOURCE @@ -55,10 +58,11 @@ SOURCE="/mnt/media0/rc.user" [ -f $SOURCE ] && . $SOURCE # finally call the entry point +# $MAINFILE_REDIRECT can be specified to do e.g. > /dev/null if [ -e $MAINFILE ] then chmod 777 $MAINFILE - $MAINFILE Application AppMain + sh -c "$MAINFILE $MAINFILE_ARGV $MAINFILE_REDIRECT" rm -f /mnt/media1/r0_media0 sync # sleep 5 diff --git a/utils/ypr0tools/rockbox.sh b/utils/ypr0tools/rockbox.sh index cbe54fd223..665ee9f97c 100755 --- a/utils/ypr0tools/rockbox.sh +++ b/utils/ypr0tools/rockbox.sh @@ -45,3 +45,5 @@ mount --bind /mnt/media0/.rockbox /.rockbox mount --bind /mnt/media0/Playlists /Playlists MAINFILE="/mnt/media0/.rockbox/rockbox" +MAINFILE_ARGV='' +MAINFILE_REDIRECT='>/dev/null 2>&1'