From 249bba03f1051f4984538f66b9e7d36674c61e5c Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sat, 24 Dec 2011 11:56:46 +0000 Subject: 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 --- tools/buildzip.pl | 7 ++++++- tools/configure | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- tools/root.make | 4 ++++ 3 files changed, 56 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/buildzip.pl b/tools/buildzip.pl index ed937d42e4..e17c2f0712 100755 --- a/tools/buildzip.pl +++ b/tools/buildzip.pl @@ -201,7 +201,7 @@ sub make_install { @files = readdir(DIR); closedir(DIR); - foreach my $file (grep (/[a-zA-Z]+\.(txt|config|ignnore)/,@files)) { + foreach my $file (grep (/[a-zA-Z]+\.(txt|config|ignore|sh)/,@files)) { glob_install("$src/$file", "$userdir/"); } return 1; @@ -423,6 +423,11 @@ sub buildzip { # create the file so the database does not try indexing a folder open(IGNORE, ">$temp_dir/database.ignore") || die "can't open database.ignore"; close(IGNORE); + + # the samsung ypr0 has a loader script that's needed in the zip + if ($modelname =~ /samsungypr0/) { + glob_copy("$ROOT/utils/ypr0tools/rockbox.sh", "$temp_dir/"); + } glob_mkdir("$temp_dir/langs"); glob_mkdir("$temp_dir/rocks"); diff --git a/tools/configure b/tools/configure index 895aca8025..1cb4c5b240 100755 --- a/tools/configure +++ b/tools/configure @@ -647,6 +647,26 @@ pandoracc () { GCCOPTS="$GCCOPTS -ffast-math -fsingle-precision-constant" } +ypr0cc () { + + GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib//` + GCCOPTIMIZE='' + LDOPTS="-lasound -lpthread -lm -ldl -lrt $LDOPTS" + GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs" + SHARED_LDFLAG="-shared" + SHARED_CFLAGS='' + endian="little" + thread_support="HAVE_SIGALTSTACK_THREADS" + app_type="ypr0" + + # Include path + GCCOPTS="$GCCOPTS -D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_REENTRANT" + + # Set up compiler + gccchoice="4.4.6" + prefixtools "arm-ypr0-linux-gnueabi-" +} + androidcc () { if [ -z "$ANDROID_SDK_PATH" ]; then echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH" @@ -1290,7 +1310,7 @@ cat <&1 | sed -e 's/[^0-9.-]//g'` else - ldver=`$LD --version | head -n 1 | sed -e 's/[^0-9.]//g'` + ldver=`$LD --version | head -n 1 | sed -e 's/\ /\n/g' | tail -n 1` fi if [ -z "$gccver" ]; then diff --git a/tools/root.make b/tools/root.make index f97588f158..dd827d6d3f 100644 --- a/tools/root.make +++ b/tools/root.make @@ -102,6 +102,10 @@ else include $(ROOTDIR)/uisimulator/uisimulator.make endif + ifneq (,$(findstring ypr0,$(APP_TYPE))) + include $(ROOTDIR)/firmware/target/hosted/ypr0/ypr0.make + endif + ifneq (,$(findstring android, $(APP_TYPE))) include $(ROOTDIR)/android/android.make endif -- cgit v1.2.3