summaryrefslogtreecommitdiff
path: root/utils/ypr0tools/rockbox.sh
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-12-24 11:56:46 +0000
committerThomas Martitz <kugel@rockbox.org>2011-12-24 11:56:46 +0000
commit249bba03f1051f4984538f66b9e7d36674c61e5c (patch)
treeb9a0d78e05269ed2043521ab0dfdad83aeaf2aff /utils/ypr0tools/rockbox.sh
parent567e0ad93ef3048f2266932b10dcdb309b1a77c9 (diff)
downloadrockbox-249bba03f1051f4984538f66b9e7d36674c61e5c.tar.gz
rockbox-249bba03f1051f4984538f66b9e7d36674c61e5c.zip
Initial commit of the Samsung YP-R0 port.
This port is a hybrid native/RaaA port. It runs on a embedded linux system, but is the only application. It therefore can implement lots of stuff that native targets also implement, while leveraging the underlying linux kernel. The port is quite advanced. User interface, audio playback, plugins work mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page). Included in utils/ypr0tools are scripts and programs required to generate a patched firmware. The patched firmware has the rootfs modified to load Rockbox. It includes a early/safe USB mode. This port needs a new toolchain, one that includes glibc headers and libraries. rockboxdev.sh can generate it, but e.g. codesourcey and distro packages may also work. Most of the initial effort is done by Lorenzo Miori and others (on ABI), including reverse engineering and patching of the original firmware, initial drivers, and more. Big thanks to you. Flyspray: FS#12348 Author: Lorenzo Miori, myself Merry christmas to ypr0 owners! :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31415 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/ypr0tools/rockbox.sh')
-rwxr-xr-xutils/ypr0tools/rockbox.sh47
1 files changed, 47 insertions, 0 deletions
diff --git a/utils/ypr0tools/rockbox.sh b/utils/ypr0tools/rockbox.sh
new file mode 100755
index 0000000000..cbe54fd223
--- /dev/null
+++ b/utils/ypr0tools/rockbox.sh
@@ -0,0 +1,47 @@
1#!/bin/sh
2######################################################################
3# __________ __ ___.
4# Open \______ \ ____ ____ | | _\_ |__ _______ ___
5# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
6# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
7# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
8# \/ \/ \/ \/ \/
9#
10# * Samsung YP-R0 Rockbox as an application loader *
11# Lorenzo Miori (C) 2011
12######################################################################
13
14# This is expected to be sourced by the shell, which is then
15# expected to run $MAINFILE
16
17# Check for menu button being pressed. Return immediately to launch the OF
18var=$(dd if=/dev/r0Btn bs=4 count=1)
19# Here a workaround to detect the byte
20var2=$(echo -e -n "\x07")
21
22if [[ "$var" = "$var2" ]]
23then
24 return
25fi
26
27
28# Blank-Unblank video to get rid of Samsung BootLogo, but turn off backlight before to hide these things :)
29echo -n "0" > /sys/devices/platform/afe.0/bli
30echo -n "1" > /sys/class/graphics/fb0/blank
31echo -n "0" >> /sys/class/graphics/fb0/blank
32
33amixer sset 'Soft Mute' 0
34amixer sset 'Master' 85%
35
36# We set-up various settings for the cpu governor: default are
37# Every 1,5 s the kernel evaluates if it's the case to down/up clocking the cpu
38echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
39echo "1" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load
40echo "150000" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
41echo "95" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
42
43# bind these two to the root so that they're writable
44mount --bind /mnt/media0/.rockbox /.rockbox
45mount --bind /mnt/media0/Playlists /Playlists
46
47MAINFILE="/mnt/media0/.rockbox/rockbox"