1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/native: add mount point for host fs

This commit is contained in:
Benjamin Valentin 2023-02-24 22:02:09 +01:00 committed by Benjamin Valentin
parent c438c80548
commit f4e9da51fa
3 changed files with 14 additions and 1 deletions

View File

@ -14,7 +14,7 @@ endif
# default to using littlefs2 on the virtual flash if no other fs was selected
ifneq (,$(filter vfs_default,$(USEMODULE)))
ifeq (,$(filter lwext%_vfs spiffs littlefs fatfs_vfs,$(USEMODULE)))
ifeq (,$(filter lwext%_vfs spiffs littlefs fs_native fatfs_vfs,$(USEMODULE)))
USEMODULE += littlefs2
endif
USEMODULE += mtd

View File

@ -66,6 +66,10 @@ VFS_AUTO_MOUNT(fatfs, VFS_MTD(mtd0_dev), VFS_DEFAULT_NVM(0), 0);
#elif defined(MODULE_LWEXT4)
VFS_AUTO_MOUNT(lwext4, VFS_MTD(mtd0_dev), VFS_DEFAULT_NVM(0), 0);
/* host fs pass-through */
#elif defined(MODULE_FS_NATIVE)
VFS_AUTO_MOUNT(native, { .hostpath = FS_NATIVE_DIR }, VFS_DEFAULT_NVM(0), 0);
#endif
#endif /* MODULE_VFS_DEFAULT */

View File

@ -97,6 +97,15 @@ void _native_LED_RED_TOGGLE(void);
extern mtd_dev_t *mtd0;
#endif
/**
* @name Host FS access configuration
* @{
*/
#ifndef FS_NATIVE_DIR
#define FS_NATIVE_DIR "native" /**< Folder on the host fs exported to RIOT */
#endif
/** @} */
#if defined(MODULE_SPIFFS) || DOXYGEN
/**
* @name SPIFFS default configuration