mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 01:39:44 +08:00
risc-v/esp32: Fixed File-system mount point
This commit is contained in:
@@ -58,7 +58,7 @@ endchoice # ESP32C3_SPIFLASH_FS
|
||||
|
||||
config ESP32C3_SPIFLASH_FS_MOUNT_PT
|
||||
string "File-system Mount Point"
|
||||
depends on ESP32C3_SPIFLASH_LITTLEFS
|
||||
depends on ESP32C3_SPIFLASH_SMARTFS || ESP32C3_SPIFLASH_NXFFS || ESP32C3_SPIFLASH_SPIFFS || ESP32C3_SPIFLASH_LITTLEFS
|
||||
default "/data"
|
||||
|
||||
if LCD_ST7735 || LCD_ST7789 || LCD_GC9A01
|
||||
|
||||
@@ -394,7 +394,7 @@ static int init_storage_partition(void)
|
||||
|
||||
#if defined (CONFIG_ESP32C3_SPIFLASH_SMARTFS)
|
||||
|
||||
ret = setup_smartfs(0, mtd, "/data");
|
||||
ret = setup_smartfs(0, mtd, CONFIG_ESP32C3_SPIFLASH_FS_MOUNT_PT);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to setup smartfs\n");
|
||||
@@ -403,7 +403,7 @@ static int init_storage_partition(void)
|
||||
|
||||
#elif defined (CONFIG_ESP32C3_SPIFLASH_NXFFS)
|
||||
|
||||
ret = setup_nxffs(mtd, "/data");
|
||||
ret = setup_nxffs(mtd, CONFIG_ESP32C3_SPIFLASH_FS_MOUNT_PT);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to setup nxffs\n");
|
||||
@@ -413,7 +413,7 @@ static int init_storage_partition(void)
|
||||
#elif defined (CONFIG_ESP32C3_SPIFLASH_LITTLEFS)
|
||||
|
||||
const char *path = "/dev/esp32c3flash";
|
||||
ret = setup_littlefs(path, mtd, "/data", 0755);
|
||||
ret = setup_littlefs(path, mtd, CONFIG_ESP32C3_SPIFLASH_FS_MOUNT_PT, 0755);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to setup littlefs\n");
|
||||
@@ -423,7 +423,7 @@ static int init_storage_partition(void)
|
||||
#elif defined (CONFIG_ESP32C3_SPIFLASH_SPIFFS)
|
||||
|
||||
const char *path = "/dev/esp32c3flash";
|
||||
ret = setup_spiffs(path, mtd, "/data", 0755);
|
||||
ret = setup_spiffs(path, mtd, CONFIG_ESP32C3_SPIFLASH_FS_MOUNT_PT, 0755);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to setup spiffs\n");
|
||||
|
||||
@@ -46,5 +46,5 @@ endchoice # ESPRESSIF_SPIFLASH_FS
|
||||
|
||||
config ESPRESSIF_SPIFLASH_FS_MOUNT_PT
|
||||
string "File-system Mount Point"
|
||||
depends on ESPRESSIF_SPIFLASH_LITTLEFS
|
||||
depends on ESPRESSIF_SPIFLASH_SMARTFS || ESPRESSIF_SPIFLASH_NXFFS || ESPRESSIF_SPIFLASH_SPIFFS || ESPRESSIF_SPIFLASH_LITTLEFS
|
||||
default "/data"
|
||||
|
||||
@@ -301,7 +301,7 @@ static int init_storage_partition(void)
|
||||
|
||||
#if defined (CONFIG_ESPRESSIF_SPIFLASH_SMARTFS)
|
||||
|
||||
ret = setup_smartfs(0, mtd, "/data");
|
||||
ret = setup_smartfs(0, mtd, CONFIG_ESPRESSIF_SPIFLASH_FS_MOUNT_PT);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to setup smartfs\n");
|
||||
@@ -310,7 +310,7 @@ static int init_storage_partition(void)
|
||||
|
||||
#elif defined (CONFIG_ESPRESSIF_SPIFLASH_NXFFS)
|
||||
|
||||
ret = setup_nxffs(mtd, "/data");
|
||||
ret = setup_nxffs(mtd, CONFIG_ESPRESSIF_SPIFLASH_FS_MOUNT_PT);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to setup nxffs\n");
|
||||
@@ -320,7 +320,8 @@ static int init_storage_partition(void)
|
||||
#elif defined (CONFIG_ESPRESSIF_SPIFLASH_LITTLEFS)
|
||||
|
||||
const char *path = "/dev/espflash";
|
||||
ret = setup_littlefs(path, mtd, "/data", 0755);
|
||||
ret = setup_littlefs(path, mtd, CONFIG_ESPRESSIF_SPIFLASH_FS_MOUNT_PT,
|
||||
0755);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to setup littlefs\n");
|
||||
@@ -330,7 +331,7 @@ static int init_storage_partition(void)
|
||||
#elif defined (CONFIG_ESPRESSIF_SPIFLASH_SPIFFS)
|
||||
|
||||
const char *path = "/dev/espflash";
|
||||
ret = setup_spiffs(path, mtd, "/data", 0755);
|
||||
ret = setup_spiffs(path, mtd, CONFIG_ESPRESSIF_SPIFLASH_FS_MOUNT_PT, 0755);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to setup spiffs\n");
|
||||
|
||||
@@ -46,5 +46,5 @@ endchoice # ESPRESSIF_SPIFLASH_FS
|
||||
|
||||
config ESPRESSIF_SPIFLASH_FS_MOUNT_PT
|
||||
string "File-system Mount Point"
|
||||
depends on ESPRESSIF_SPIFLASH_LITTLEFS
|
||||
depends on ESPRESSIF_SPIFLASH_SMARTFS || ESPRESSIF_SPIFLASH_NXFFS || ESPRESSIF_SPIFLASH_SPIFFS || ESPRESSIF_SPIFLASH_LITTLEFS
|
||||
default "/data"
|
||||
|
||||
@@ -387,7 +387,7 @@ static int init_storage_partition(void)
|
||||
|
||||
#if defined (CONFIG_ESPRESSIF_SPIFLASH_SMARTFS)
|
||||
|
||||
ret = setup_smartfs(0, mtd, "/data");
|
||||
ret = setup_smartfs(0, mtd, CONFIG_ESPRESSIF_SPIFLASH_FS_MOUNT_PT);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to setup smartfs\n");
|
||||
@@ -396,7 +396,7 @@ static int init_storage_partition(void)
|
||||
|
||||
#elif defined (CONFIG_ESPRESSIF_SPIFLASH_NXFFS)
|
||||
|
||||
ret = setup_nxffs(mtd, "/data");
|
||||
ret = setup_nxffs(mtd, CONFIG_ESPRESSIF_SPIFLASH_FS_MOUNT_PT);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to setup nxffs\n");
|
||||
@@ -406,7 +406,8 @@ static int init_storage_partition(void)
|
||||
#elif defined (CONFIG_ESPRESSIF_SPIFLASH_LITTLEFS)
|
||||
|
||||
const char *path = "/dev/espflash";
|
||||
ret = setup_littlefs(path, mtd, "/data", 0755);
|
||||
ret = setup_littlefs(path, mtd, CONFIG_ESPRESSIF_SPIFLASH_FS_MOUNT_PT,
|
||||
0755);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to setup littlefs\n");
|
||||
@@ -416,7 +417,7 @@ static int init_storage_partition(void)
|
||||
#elif defined (CONFIG_ESPRESSIF_SPIFLASH_SPIFFS)
|
||||
|
||||
const char *path = "/dev/espflash";
|
||||
ret = setup_spiffs(path, mtd, "/data", 0755);
|
||||
ret = setup_spiffs(path, mtd, CONFIG_ESPRESSIF_SPIFLASH_FS_MOUNT_PT, 0755);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to setup spiffs\n");
|
||||
|
||||
@@ -46,5 +46,5 @@ endchoice # ESPRESSIF_SPIFLASH_FS
|
||||
|
||||
config ESPRESSIF_SPIFLASH_FS_MOUNT_PT
|
||||
string "File-system Mount Point"
|
||||
depends on ESPRESSIF_SPIFLASH_LITTLEFS
|
||||
depends on ESPRESSIF_SPIFLASH_SMARTFS || ESPRESSIF_SPIFLASH_NXFFS || ESPRESSIF_SPIFLASH_SPIFFS || ESPRESSIF_SPIFLASH_LITTLEFS
|
||||
default "/data"
|
||||
|
||||
@@ -301,7 +301,7 @@ static int init_storage_partition(void)
|
||||
|
||||
#if defined (CONFIG_ESPRESSIF_SPIFLASH_SMARTFS)
|
||||
|
||||
ret = setup_smartfs(0, mtd, "/data");
|
||||
ret = setup_smartfs(0, mtd, CONFIG_ESPRESSIF_SPIFLASH_FS_MOUNT_PT);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to setup smartfs\n");
|
||||
@@ -310,7 +310,7 @@ static int init_storage_partition(void)
|
||||
|
||||
#elif defined (CONFIG_ESPRESSIF_SPIFLASH_NXFFS)
|
||||
|
||||
ret = setup_nxffs(mtd, "/data");
|
||||
ret = setup_nxffs(mtd, CONFIG_ESPRESSIF_SPIFLASH_FS_MOUNT_PT);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to setup nxffs\n");
|
||||
@@ -320,7 +320,8 @@ static int init_storage_partition(void)
|
||||
#elif defined (CONFIG_ESPRESSIF_SPIFLASH_LITTLEFS)
|
||||
|
||||
const char *path = "/dev/espflash";
|
||||
ret = setup_littlefs(path, mtd, "/data", 0755);
|
||||
ret = setup_littlefs(path, mtd, CONFIG_ESPRESSIF_SPIFLASH_FS_MOUNT_PT,
|
||||
0755);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to setup littlefs\n");
|
||||
@@ -330,7 +331,7 @@ static int init_storage_partition(void)
|
||||
#elif defined (CONFIG_ESPRESSIF_SPIFLASH_SPIFFS)
|
||||
|
||||
const char *path = "/dev/espflash";
|
||||
ret = setup_spiffs(path, mtd, "/data", 0755);
|
||||
ret = setup_spiffs(path, mtd, CONFIG_ESPRESSIF_SPIFLASH_FS_MOUNT_PT, 0755);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to setup spiffs\n");
|
||||
|
||||
Reference in New Issue
Block a user