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
2011-12-24 11:56:46 +00:00
|
|
|
######################################################################
|
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
#
|
|
|
|
# * Samsung YP-R0 Rockbox as an application loader *
|
|
|
|
# Lorenzo Miori (C) 2011
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
# This is expected to be sourced by the shell, which is then
|
|
|
|
# expected to run $MAINFILE
|
|
|
|
|
|
|
|
# Check for menu button being pressed. Return immediately to launch the OF
|
2013-09-10 20:48:34 +00:00
|
|
|
if [ -e "/dev/r1Button" ]
|
|
|
|
then
|
|
|
|
# running on YP-R1 model (volume up button)
|
2017-04-26 20:32:02 +00:00
|
|
|
BTN=$(echo -e -n "\x03")
|
2013-09-10 20:48:34 +00:00
|
|
|
VAL=$(dd if=/dev/r1Button bs=4 count=1)
|
|
|
|
else
|
|
|
|
# running on YP-R0 model (menu button)
|
|
|
|
BTN=$(echo -e -n "\x07")
|
|
|
|
VAL=$(dd if=/dev/r0Btn bs=4 count=1)
|
|
|
|
fi
|
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
2011-12-24 11:56:46 +00:00
|
|
|
|
2013-09-10 20:48:34 +00:00
|
|
|
if [[ "$VAL" = "$BTN" ]]
|
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
2011-12-24 11:56:46 +00:00
|
|
|
then
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Blank-Unblank video to get rid of Samsung BootLogo, but turn off backlight before to hide these things :)
|
|
|
|
echo -n "0" > /sys/devices/platform/afe.0/bli
|
|
|
|
echo -n "1" > /sys/class/graphics/fb0/blank
|
|
|
|
echo -n "0" >> /sys/class/graphics/fb0/blank
|
|
|
|
|
|
|
|
amixer sset 'Soft Mute' 0
|
|
|
|
amixer sset 'Master' 85%
|
2014-03-09 22:25:50 +00:00
|
|
|
# These are needed only for the R1. TODO: Move all of this into the firmware
|
|
|
|
if [ -e "/usr/local/bin/r1" ]
|
|
|
|
then
|
|
|
|
amixer cset numid=7,iface=MIXER,name='Master Power witch' 2
|
|
|
|
amixer cset numid=6,iface=MIXER,name='Master Handfree Switch' 0
|
|
|
|
amixer cset numid=5,iface=MIXER,name='Master Mute' 0
|
|
|
|
amixer cset numid=9,iface=MIXER,name='Master samplerate' 44100
|
|
|
|
amixer cset numid=2,iface=MIXER,name='Master Volume' 28
|
|
|
|
amixer cset numid=1,iface=MIXER,name='PCM PlayBack Switch' 2
|
|
|
|
amixer cset numid=8,iface=MIXER,name='FM Mute' 0
|
|
|
|
amixer cset numid=4,iface=MIXER,name='Capture FM Switch' 0
|
|
|
|
amixer cset numid=3,iface=MIXER,name='Capture Mic Switch' 0
|
|
|
|
fi
|
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
2011-12-24 11:56:46 +00:00
|
|
|
|
|
|
|
# We set-up various settings for the cpu governor: default are
|
|
|
|
# Every 1,5 s the kernel evaluates if it's the case to down/up clocking the cpu
|
|
|
|
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
|
|
|
echo "1" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load
|
|
|
|
echo "150000" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
|
|
|
|
echo "95" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
|
|
|
|
|
|
|
|
# bind these two to the root so that they're writable
|
|
|
|
mount --bind /mnt/media0/.rockbox /.rockbox
|
|
|
|
mount --bind /mnt/media0/Playlists /Playlists
|
|
|
|
|
|
|
|
MAINFILE="/mnt/media0/.rockbox/rockbox"
|
2014-12-31 11:04:44 +00:00
|
|
|
# Attempt to copy the executable in the /tmp directory
|
|
|
|
# This allows an easier USB Mass Storage Mode to be achieved (file handles)
|
|
|
|
cp $MAINFILE /tmp/rockbox
|
|
|
|
if [ $? -eq 0 ]
|
|
|
|
then
|
|
|
|
MAINFILE="/tmp/rockbox"
|
|
|
|
fi
|
2011-12-24 23:13:27 +00:00
|
|
|
MAINFILE_ARGV=''
|
|
|
|
MAINFILE_REDIRECT='>/dev/null 2>&1'
|