summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-12-24 23:13:27 +0000
committerThomas Martitz <kugel@rockbox.org>2011-12-24 23:13:27 +0000
commitbf021e3ded2dcfe82493c88094a76d9a82e85994 (patch)
treeec8bc19376e01f25e6b0fc00f77fb5228cf544e8
parent1a0bc64e027d56101ce0791b2bcff4565e562bb6 (diff)
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
-rwxr-xr-xutils/ypr0tools/files/etc/profile6
-rwxr-xr-xutils/ypr0tools/rockbox.sh2
2 files changed, 7 insertions, 1 deletions
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'