From f6c26d33a4e15d966597bc9d66c1f33328a750af Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Fri, 7 Feb 2014 18:30:50 +0100 Subject: samsungypr0: Support or mounting the microsd A thread polls the appropriate GPIO pin for sd card presence and mounts using the mount system call. Change-Id: I31ab41c4120f4af64eb6998b7e7b6f9051585efb --- firmware/export/config/samsungypr0.h | 8 ++++++-- firmware/export/mv.h | 1 + firmware/export/rbpaths.h | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'firmware/export') diff --git a/firmware/export/config/samsungypr0.h b/firmware/export/config/samsungypr0.h index 361c9697c5..bed5a2f977 100644 --- a/firmware/export/config/samsungypr0.h +++ b/firmware/export/config/samsungypr0.h @@ -161,6 +161,10 @@ /* This folder resides in the ReadOnly CRAMFS. It is binded to /mnt/media0/.rockbox */ #define BOOTDIR "/.rockbox" -/* No special storage */ -#define CONFIG_STORAGE STORAGE_HOSTFS +/* External SD card can be mounted */ +#define CONFIG_STORAGE (STORAGE_HOSTFS|STORAGE_SD) +#define HAVE_MULTIDRIVE +#define NUM_DRIVES 2 +#define HAVE_HOTSWAP #define HAVE_STORAGE_FLUSH +#define MULTIDRIVE_DIR "/mnt/mmc" diff --git a/firmware/export/mv.h b/firmware/export/mv.h index 05c9c6349f..1d0a536663 100644 --- a/firmware/export/mv.h +++ b/firmware/export/mv.h @@ -22,6 +22,7 @@ #ifndef __MV_H__ #define __MV_H__ +#include #include "config.h" /* FixMe: These macros are a bit nasty and perhaps misplaced here. diff --git a/firmware/export/rbpaths.h b/firmware/export/rbpaths.h index 0a5b36c5ab..1f7e1a2643 100644 --- a/firmware/export/rbpaths.h +++ b/firmware/export/rbpaths.h @@ -60,7 +60,6 @@ #else /* APPLICATION */ #define HOME_DIR "" /* replaced at runtime */ -#define HOME_DIR_LEN (sizeof(HOME_DIR)-1) #define PLUGIN_DIR ROCKBOX_LIBRARY_PATH "/rockbox/rocks" #if (CONFIG_PLATFORM & PLATFORM_ANDROID) @@ -73,10 +72,13 @@ extern void paths_init(void); #endif /* !APPLICATION || SAMSUNG_YPR0 */ +#define HOME_DIR_LEN (sizeof(HOME_DIR)-1) + #ifdef APPLICATION #include #include +#include int app_open(const char *name, int o, ...); int app_creat(const char* name, mode_t mode); @@ -87,6 +89,7 @@ int app_closedir(DIR *dir); struct dirent* app_readdir(DIR* dir); int app_mkdir(const char* name); int app_rmdir(const char* name); +ssize_t app_readlink(const char *path, char *buf, size_t bufsiz); #endif -- cgit v1.2.3