diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-10-11 08:26:53 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-10-11 17:47:34 -0400 |
commit | db6f21e2954db63cd04de73ed472c48f63b80a89 (patch) | |
tree | 252e2fccaef788141630ceeb67a03b69bd1654d1 /firmware/export | |
parent | a5add3982bff6907d30942f614d5a471f75c018b (diff) | |
download | rockbox-db6f21e2954db63cd04de73ed472c48f63b80a89.tar.gz rockbox-db6f21e2954db63cd04de73ed472c48f63b80a89.zip |
hosted: sanitize handling of HOME_DIR
* HOME_DIR is now either "/" or special "<HOME>"
* target-specific "home dir path" is defined solely by PIVOT_ROOT
* PIVOT_ROOT path is now defined in toplevel config files
* Make Samsung YP-R0/R1 and SONY_NWZ use PIVOT_ROOT too
* Do not prepend PIVOT_ROOT path if the path already has it!
* Do not play these games for __PCTOOL__ builds
Change-Id: I3d51ad902a5f9cafe45ba15ba654f30f1ec6113a
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/config/agptekrocker.h | 1 | ||||
-rw-r--r-- | firmware/export/config/aigoerosq.h | 1 | ||||
-rw-r--r-- | firmware/export/config/fiiom3k.h | 1 | ||||
-rw-r--r-- | firmware/export/config/ibassodx50.h | 3 | ||||
-rw-r--r-- | firmware/export/config/ibassodx90.h | 3 | ||||
-rw-r--r-- | firmware/export/config/samsungypr0.h | 1 | ||||
-rw-r--r-- | firmware/export/config/samsungypr1.h | 1 | ||||
-rw-r--r-- | firmware/export/config/sonynwzlinux.h | 4 | ||||
-rw-r--r-- | firmware/export/config/xduoox20.h | 1 | ||||
-rw-r--r-- | firmware/export/config/xduoox3ii.h | 1 | ||||
-rw-r--r-- | firmware/export/rbpaths.h | 27 |
11 files changed, 22 insertions, 22 deletions
diff --git a/firmware/export/config/agptekrocker.h b/firmware/export/config/agptekrocker.h index 230dc6cac4..f0e98d4db2 100644 --- a/firmware/export/config/agptekrocker.h +++ b/firmware/export/config/agptekrocker.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #ifndef SIMULATOR | 16 | #ifndef SIMULATOR |
17 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) | 17 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) |
18 | #define PIVOT_ROOT "/mnt/sd_0" | ||
18 | #endif | 19 | #endif |
19 | 20 | ||
20 | #define HIBY_LINUX | 21 | #define HIBY_LINUX |
diff --git a/firmware/export/config/aigoerosq.h b/firmware/export/config/aigoerosq.h index 9207b5548f..6129557726 100644 --- a/firmware/export/config/aigoerosq.h +++ b/firmware/export/config/aigoerosq.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #ifndef SIMULATOR | 16 | #ifndef SIMULATOR |
17 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) | 17 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) |
18 | #define PIVOT_ROOT "/mnt/sd_0" | ||
18 | #endif | 19 | #endif |
19 | 20 | ||
20 | #define HIBY_LINUX | 21 | #define HIBY_LINUX |
diff --git a/firmware/export/config/fiiom3k.h b/firmware/export/config/fiiom3k.h index 88652b633f..933e85dab9 100644 --- a/firmware/export/config/fiiom3k.h +++ b/firmware/export/config/fiiom3k.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #ifndef SIMULATOR | 16 | #ifndef SIMULATOR |
17 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) | 17 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) |
18 | #define PIVOT_ROOT "/mnt" | ||
18 | #endif | 19 | #endif |
19 | 20 | ||
20 | #define HAVE_FPU | 21 | #define HAVE_FPU |
diff --git a/firmware/export/config/ibassodx50.h b/firmware/export/config/ibassodx50.h index 4107fd496f..22215ef9e4 100644 --- a/firmware/export/config/ibassodx50.h +++ b/firmware/export/config/ibassodx50.h | |||
@@ -24,7 +24,10 @@ | |||
24 | /* This config file is for Rockbox as an application on Android without JVM. */ | 24 | /* This config file is for Rockbox as an application on Android without JVM. */ |
25 | 25 | ||
26 | /* We don't run on hardware directly */ | 26 | /* We don't run on hardware directly */ |
27 | #ifndef SIMULATOR | ||
27 | #define CONFIG_PLATFORM PLATFORM_HOSTED | 28 | #define CONFIG_PLATFORM PLATFORM_HOSTED |
29 | #define PIVOT_ROOT "/mnt/sdcard" | ||
30 | #endif | ||
28 | #define HAVE_FPU | 31 | #define HAVE_FPU |
29 | 32 | ||
30 | /* For Rolo and boot loader */ | 33 | /* For Rolo and boot loader */ |
diff --git a/firmware/export/config/ibassodx90.h b/firmware/export/config/ibassodx90.h index ae5a446aa3..b0cff1a8d0 100644 --- a/firmware/export/config/ibassodx90.h +++ b/firmware/export/config/ibassodx90.h | |||
@@ -24,7 +24,10 @@ | |||
24 | /* This config file is for Rockbox as an application on Android without JVM. */ | 24 | /* This config file is for Rockbox as an application on Android without JVM. */ |
25 | 25 | ||
26 | /* We don't run on hardware directly */ | 26 | /* We don't run on hardware directly */ |
27 | #ifndef SIMULATOR | ||
27 | #define CONFIG_PLATFORM PLATFORM_HOSTED | 28 | #define CONFIG_PLATFORM PLATFORM_HOSTED |
29 | #define PIVOT_ROOT "/mnt/sdcard" | ||
30 | #endif | ||
28 | #define HAVE_FPU | 31 | #define HAVE_FPU |
29 | 32 | ||
30 | /* For Rolo and boot loader */ | 33 | /* For Rolo and boot loader */ |
diff --git a/firmware/export/config/samsungypr0.h b/firmware/export/config/samsungypr0.h index 414ba39517..655ed811b7 100644 --- a/firmware/export/config/samsungypr0.h +++ b/firmware/export/config/samsungypr0.h | |||
@@ -7,6 +7,7 @@ | |||
7 | /* YP-R0 need it too of course */ | 7 | /* YP-R0 need it too of course */ |
8 | #ifndef SIMULATOR | 8 | #ifndef SIMULATOR |
9 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) | 9 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) |
10 | #define PIVOT_ROOT "/mnt/media0" | ||
10 | #endif | 11 | #endif |
11 | 12 | ||
12 | /* For Rolo and boot loader */ | 13 | /* For Rolo and boot loader */ |
diff --git a/firmware/export/config/samsungypr1.h b/firmware/export/config/samsungypr1.h index 4d5c4a88f9..6f9904614c 100644 --- a/firmware/export/config/samsungypr1.h +++ b/firmware/export/config/samsungypr1.h | |||
@@ -7,6 +7,7 @@ | |||
7 | /* YP-R1 need it too of course */ | 7 | /* YP-R1 need it too of course */ |
8 | #ifndef SIMULATOR | 8 | #ifndef SIMULATOR |
9 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) | 9 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) |
10 | #define PIVOT_ROOT "/mnt/media0" | ||
10 | #endif | 11 | #endif |
11 | 12 | ||
12 | /* For Rolo and boot loader */ | 13 | /* For Rolo and boot loader */ |
diff --git a/firmware/export/config/sonynwzlinux.h b/firmware/export/config/sonynwzlinux.h index 66f18724db..074ad1c417 100644 --- a/firmware/export/config/sonynwzlinux.h +++ b/firmware/export/config/sonynwzlinux.h | |||
@@ -4,11 +4,9 @@ | |||
4 | 4 | ||
5 | #ifndef SIMULATOR | 5 | #ifndef SIMULATOR |
6 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) | 6 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) |
7 | #define PIVOT_ROOT "/contents" | ||
7 | #endif | 8 | #endif |
8 | 9 | ||
9 | |||
10 | |||
11 | |||
12 | /* define this if you have a colour LCD */ | 10 | /* define this if you have a colour LCD */ |
13 | #define HAVE_LCD_COLOR | 11 | #define HAVE_LCD_COLOR |
14 | 12 | ||
diff --git a/firmware/export/config/xduoox20.h b/firmware/export/config/xduoox20.h index 70e6131cb7..e12346e1bc 100644 --- a/firmware/export/config/xduoox20.h +++ b/firmware/export/config/xduoox20.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #ifndef SIMULATOR | 16 | #ifndef SIMULATOR |
17 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) | 17 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) |
18 | #define PIVOT_ROOT "/mnt/sd_0" | ||
18 | #endif | 19 | #endif |
19 | 20 | ||
20 | #define HIBY_LINUX | 21 | #define HIBY_LINUX |
diff --git a/firmware/export/config/xduoox3ii.h b/firmware/export/config/xduoox3ii.h index d19165114a..0b886e3af9 100644 --- a/firmware/export/config/xduoox3ii.h +++ b/firmware/export/config/xduoox3ii.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #ifndef SIMULATOR | 16 | #ifndef SIMULATOR |
17 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) | 17 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) |
18 | #define PIVOT_ROOT "/mnt/sd_0" | ||
18 | #endif | 19 | #endif |
19 | 20 | ||
20 | #define HIBY_LINUX | 21 | #define HIBY_LINUX |
diff --git a/firmware/export/rbpaths.h b/firmware/export/rbpaths.h index 215b4c0c4b..da5a2fb71c 100644 --- a/firmware/export/rbpaths.h +++ b/firmware/export/rbpaths.h | |||
@@ -40,24 +40,12 @@ | |||
40 | #define ROCKBOX_DIR_LEN (sizeof(ROCKBOX_DIR)-1) | 40 | #define ROCKBOX_DIR_LEN (sizeof(ROCKBOX_DIR)-1) |
41 | #endif /* def __PCTOOL__ */ | 41 | #endif /* def __PCTOOL__ */ |
42 | 42 | ||
43 | /* NOTE: target-specific hosted HOME_DIR resides in filesystem-app.c */ | ||
43 | #if !defined(APPLICATION) || defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1) || \ | 44 | #if !defined(APPLICATION) || defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1) || \ |
44 | defined(DX50) || defined(DX90) || defined(SONY_NWZ_LINUX) || \ | 45 | defined(DX50) || defined(DX90) || defined(SONY_NWZ_LINUX) || \ |
45 | defined(HIBY_LINUX) || defined(FIIO_M3K) | 46 | defined(HIBY_LINUX) || defined(FIIO_M3K) |
46 | 47 | ||
47 | #if defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1) | ||
48 | #define HOME_DIR "/mnt/media0" | ||
49 | #elif defined(SONY_NWZ_LINUX) | ||
50 | #define HOME_DIR "/contents" | ||
51 | #elif defined(DX50) || defined(DX90) | ||
52 | /* Where to put save files like recordings, playlists, screen dumps ...*/ | ||
53 | #define HOME_DIR "/mnt/sdcard" | ||
54 | #elif defined(HIBY_LINUX) | ||
55 | #define HOME_DIR "/mnt/sd_0" | ||
56 | #elif defined(FIIO_M3K) | ||
57 | #define HOME_DIR "/mnt" | ||
58 | #else | ||
59 | #define HOME_DIR "/" | 48 | #define HOME_DIR "/" |
60 | #endif | ||
61 | 49 | ||
62 | /* make sure both are the same for native builds */ | 50 | /* make sure both are the same for native builds */ |
63 | #undef ROCKBOX_LIBRARY_PATH | 51 | #undef ROCKBOX_LIBRARY_PATH |
@@ -69,6 +57,7 @@ | |||
69 | #else /* APPLICATION */ | 57 | #else /* APPLICATION */ |
70 | 58 | ||
71 | #define HOME_DIR "<HOME>" /* replaced at runtime */ | 59 | #define HOME_DIR "<HOME>" /* replaced at runtime */ |
60 | #define HAVE_SPECIAL_DIRS | ||
72 | 61 | ||
73 | #define PLUGIN_DIR ROCKBOX_LIBRARY_PATH "/rockbox/rocks" | 62 | #define PLUGIN_DIR ROCKBOX_LIBRARY_PATH "/rockbox/rocks" |
74 | #if (CONFIG_PLATFORM & PLATFORM_ANDROID) | 63 | #if (CONFIG_PLATFORM & PLATFORM_ANDROID) |
@@ -79,10 +68,8 @@ | |||
79 | 68 | ||
80 | #endif /* !APPLICATION || SAMSUNG_YPR0 */ | 69 | #endif /* !APPLICATION || SAMSUNG_YPR0 */ |
81 | 70 | ||
82 | #define HOME_DIR_LEN (sizeof(HOME_DIR)-1) | 71 | #define REC_BASE_DIR HOME_DIR "/Recordings" |
83 | 72 | #define PLAYLIST_CATALOG_DEFAULT_DIR HOME_DIR "/Playlists" | |
84 | #define REC_BASE_DIR "/Recordings" | ||
85 | #define PLAYLIST_CATALOG_DEFAULT_DIR "/Playlists" | ||
86 | 73 | ||
87 | #define LANG_DIR ROCKBOX_DIR "/langs" | 74 | #define LANG_DIR ROCKBOX_DIR "/langs" |
88 | 75 | ||
@@ -91,8 +78,10 @@ | |||
91 | #define PLUGIN_DEMOS_DIR PLUGIN_DIR "/demos" | 78 | #define PLUGIN_DEMOS_DIR PLUGIN_DIR "/demos" |
92 | #define VIEWERS_DIR PLUGIN_DIR "/viewers" | 79 | #define VIEWERS_DIR PLUGIN_DIR "/viewers" |
93 | 80 | ||
94 | #if defined(APPLICATION) && !(defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1) || \ | 81 | #if defined(APPLICATION) && \ |
95 | defined(DX50) || defined(DX90) || defined(SONY_NWZ_LINUX) || defined(HIBY_LINUX)) | 82 | !(defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1) || \ |
83 | defined(DX50) || defined(DX90) || defined(SONY_NWZ_LINUX) || defined(HIBY_LINUX) || defined(FIIO_M3K)) | ||
84 | |||
96 | #define PLUGIN_DATA_DIR ROCKBOX_DIR "/rocks.data" | 85 | #define PLUGIN_DATA_DIR ROCKBOX_DIR "/rocks.data" |
97 | #define PLUGIN_GAMES_DATA_DIR PLUGIN_DATA_DIR | 86 | #define PLUGIN_GAMES_DATA_DIR PLUGIN_DATA_DIR |
98 | #define PLUGIN_APPS_DATA_DIR PLUGIN_DATA_DIR | 87 | #define PLUGIN_APPS_DATA_DIR PLUGIN_DATA_DIR |