mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
boards/native: add support for lwEXT4
This commit is contained in:
parent
e798d21b3b
commit
c1a8a5cc9e
@ -14,7 +14,7 @@ endif
|
|||||||
|
|
||||||
# default to using littlefs2 on the virtual flash if no other fs was selected
|
# default to using littlefs2 on the virtual flash if no other fs was selected
|
||||||
ifneq (,$(filter vfs_default,$(USEMODULE)))
|
ifneq (,$(filter vfs_default,$(USEMODULE)))
|
||||||
ifeq (,$(filter spiffs littlefs fatfs_vfs,$(USEMODULE)))
|
ifeq (,$(filter lwext%_vfs spiffs littlefs fatfs_vfs,$(USEMODULE)))
|
||||||
USEMODULE += littlefs2
|
USEMODULE += littlefs2
|
||||||
endif
|
endif
|
||||||
USEMODULE += mtd
|
USEMODULE += mtd
|
||||||
|
@ -35,7 +35,7 @@ mtd_native_dev_t mtd0_dev = {
|
|||||||
mtd_dev_t *mtd0 = &mtd0_dev.base;
|
mtd_dev_t *mtd0 = &mtd0_dev.base;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MODULE_VFS
|
#ifdef MODULE_VFS_DEFAULT
|
||||||
#include "vfs_default.h"
|
#include "vfs_default.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -62,8 +62,12 @@ VFS_AUTO_MOUNT(spiffs, VFS_MTD(mtd0_dev), VFS_DEFAULT_NVM(0), 0);
|
|||||||
#elif defined(MODULE_FATFS_VFS)
|
#elif defined(MODULE_FATFS_VFS)
|
||||||
VFS_AUTO_MOUNT(fatfs, VFS_MTD(mtd0_dev), VFS_DEFAULT_NVM(0), 0);
|
VFS_AUTO_MOUNT(fatfs, VFS_MTD(mtd0_dev), VFS_DEFAULT_NVM(0), 0);
|
||||||
|
|
||||||
|
/* ext2/3/4 support */
|
||||||
|
#elif defined(MODULE_LWEXT4)
|
||||||
|
VFS_AUTO_MOUNT(lwext4, VFS_MTD(mtd0_dev), VFS_DEFAULT_NVM(0), 0);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif /* MODULE_VFS */
|
#endif /* MODULE_VFS_DEFAULT */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nothing to initialize at the moment.
|
* Nothing to initialize at the moment.
|
||||||
|
@ -60,22 +60,26 @@ void _native_LED_RED_TOGGLE(void);
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#ifndef MTD_PAGE_SIZE
|
#ifndef MTD_PAGE_SIZE
|
||||||
#ifdef MODULE_FATFS
|
#if defined(MODULE_FATFS) || defined(MODULE_LWEXT4)
|
||||||
#define MTD_PAGE_SIZE (512)
|
#define MTD_PAGE_SIZE (512)
|
||||||
#else
|
#else
|
||||||
#define MTD_PAGE_SIZE (256)
|
#define MTD_PAGE_SIZE (256)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef MTD_SECTOR_SIZE
|
#ifndef MTD_SECTOR_SIZE
|
||||||
#ifdef MODULE_FATFS
|
#if defined(MODULE_FATFS) || defined(MODULE_LWEXT4)
|
||||||
#define MTD_SECTOR_SIZE (512)
|
#define MTD_SECTOR_SIZE (512)
|
||||||
#else
|
#else
|
||||||
#define MTD_SECTOR_SIZE (4096)
|
#define MTD_SECTOR_SIZE (4096)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef MTD_SECTOR_NUM
|
#ifndef MTD_SECTOR_NUM
|
||||||
|
#if defined(MODULE_FATFS) || defined(MODULE_LWEXT4)
|
||||||
|
#define MTD_SECTOR_NUM (32768)
|
||||||
|
#else
|
||||||
#define MTD_SECTOR_NUM (2048)
|
#define MTD_SECTOR_NUM (2048)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
/** Advertised write size. While the file system backend supports single byte
|
/** Advertised write size. While the file system backend supports single byte
|
||||||
* granularity, this can be increased to mimic other media. */
|
* granularity, this can be increased to mimic other media. */
|
||||||
#ifndef MTD_WRITE_SIZE
|
#ifndef MTD_WRITE_SIZE
|
||||||
|
Loading…
Reference in New Issue
Block a user