summaryrefslogtreecommitdiff
path: root/firmware/common
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 /firmware/common
parent567e0ad93ef3048f2266932b10dcdb309b1a77c9 (diff)
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 'firmware/common')
-rw-r--r--firmware/common/rbpaths.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/firmware/common/rbpaths.c b/firmware/common/rbpaths.c
index ed413eb03e..95bff3341f 100644
--- a/firmware/common/rbpaths.c
+++ b/firmware/common/rbpaths.c
@@ -23,6 +23,7 @@
#include <stdio.h> /* snprintf */
#include <stdlib.h>
#include <stdarg.h>
+#include "config.h"
#include "rbpaths.h"
#include "file.h" /* MAX_PATH */
#include "logf.h"
@@ -38,11 +39,17 @@
#undef mkdir
#undef rmdir
+
#if (CONFIG_PLATFORM & PLATFORM_ANDROID)
#include "dir-target.h"
#define opendir opendir_android
#define mkdir mkdir_android
#define rmdir rmdir_android
+#elif defined(SAMSUNG_YPR0)
+#include "dir-target.h"
+#define opendir opendir_ypr0
+#define mkdir mkdir_ypr0
+#define rmdir rmdir_ypr0
#elif (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA))
#define open sim_open
#define remove sim_remove
@@ -59,6 +66,8 @@ extern int sim_rmdir(const char* name);
const char *rbhome;
#endif
+#if !defined(SAMSUNG_YPR0)
+
/* flags for get_user_file_path() */
/* whether you need write access to that file/dir, especially true
* for runtime generated files (config.cfg) */
@@ -238,3 +247,28 @@ int app_rmdir(const char* name)
}
return rmdir(fname);
}
+
+#else
+
+int app_open(const char *name, int o, ...)
+{
+ if (o & O_CREAT)
+ {
+ int ret;
+ va_list ap;
+ va_start(ap, o);
+ ret = open(name, o, va_arg(ap, mode_t));
+ va_end(ap);
+ return ret;
+ }
+ return open(name, o);
+}
+
+int app_creat(const char* name, mode_t mode) { return creat(name, mode); }
+int app_remove(const char *name) { return remove(name); }
+int app_rename(const char *old, const char *new) { return rename(old,new); }
+DIR *app_opendir(const char *name) { return opendir(name); }
+int app_mkdir(const char* name) { return mkdir(name); }
+int app_rmdir(const char* name) { return rmdir(name); }
+
+#endif