From db6f21e2954db63cd04de73ed472c48f63b80a89 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sun, 11 Oct 2020 08:26:53 -0400 Subject: hosted: sanitize handling of HOME_DIR * HOME_DIR is now either "/" or special "" * 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 --- firmware/export/config/agptekrocker.h | 1 + firmware/export/config/aigoerosq.h | 1 + firmware/export/config/fiiom3k.h | 1 + firmware/export/config/ibassodx50.h | 3 +++ firmware/export/config/ibassodx90.h | 3 +++ firmware/export/config/samsungypr0.h | 1 + firmware/export/config/samsungypr1.h | 1 + firmware/export/config/sonynwzlinux.h | 4 +--- firmware/export/config/xduoox20.h | 1 + firmware/export/config/xduoox3ii.h | 1 + 10 files changed, 14 insertions(+), 3 deletions(-) (limited to 'firmware/export/config') 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 @@ #ifndef SIMULATOR #define CONFIG_PLATFORM (PLATFORM_HOSTED) +#define PIVOT_ROOT "/mnt/sd_0" #endif #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 @@ #ifndef SIMULATOR #define CONFIG_PLATFORM (PLATFORM_HOSTED) +#define PIVOT_ROOT "/mnt/sd_0" #endif #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 @@ #ifndef SIMULATOR #define CONFIG_PLATFORM (PLATFORM_HOSTED) +#define PIVOT_ROOT "/mnt" #endif #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 @@ /* This config file is for Rockbox as an application on Android without JVM. */ /* We don't run on hardware directly */ +#ifndef SIMULATOR #define CONFIG_PLATFORM PLATFORM_HOSTED +#define PIVOT_ROOT "/mnt/sdcard" +#endif #define HAVE_FPU /* 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 @@ /* This config file is for Rockbox as an application on Android without JVM. */ /* We don't run on hardware directly */ +#ifndef SIMULATOR #define CONFIG_PLATFORM PLATFORM_HOSTED +#define PIVOT_ROOT "/mnt/sdcard" +#endif #define HAVE_FPU /* 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 @@ /* YP-R0 need it too of course */ #ifndef SIMULATOR #define CONFIG_PLATFORM (PLATFORM_HOSTED) +#define PIVOT_ROOT "/mnt/media0" #endif /* 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 @@ /* YP-R1 need it too of course */ #ifndef SIMULATOR #define CONFIG_PLATFORM (PLATFORM_HOSTED) +#define PIVOT_ROOT "/mnt/media0" #endif /* 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 @@ #ifndef SIMULATOR #define CONFIG_PLATFORM (PLATFORM_HOSTED) +#define PIVOT_ROOT "/contents" #endif - - - /* define this if you have a colour LCD */ #define HAVE_LCD_COLOR 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 @@ #ifndef SIMULATOR #define CONFIG_PLATFORM (PLATFORM_HOSTED) +#define PIVOT_ROOT "/mnt/sd_0" #endif #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 @@ #ifndef SIMULATOR #define CONFIG_PLATFORM (PLATFORM_HOSTED) +#define PIVOT_ROOT "/mnt/sd_0" #endif #define HIBY_LINUX -- cgit v1.2.3