diff --git a/Kconfig b/Kconfig index 1ba5c3c1..e0151421 100755 --- a/Kconfig +++ b/Kconfig @@ -96,6 +96,7 @@ source "../../kernel/liteos_a/fs/jffs2/Kconfig" config ENABLE_READ_BUFFER bool "Enable read buffer Option" default n + depends on FS_VFS help Answer Y to add enable read buffer Option. diff --git a/fs/fat/Kconfig b/fs/fat/Kconfig index f2fb077c..4ee52bde 100755 --- a/fs/fat/Kconfig +++ b/fs/fat/Kconfig @@ -39,5 +39,5 @@ config FS_FAT_VOLUMES config FS_FAT_DISK bool "Enable partinfo for storage device" - depends on FS_FAT || DRIVERS_MMC || DRIVERS_USB + depends on FS_VFS && (FS_FAT || DRIVERS_MMC || DRIVERS_USB) default y diff --git a/fs/include/disk.h b/fs/include/disk.h index 6e6c9321..d4362be4 100644 --- a/fs/include/disk.h +++ b/fs/include/disk.h @@ -37,7 +37,9 @@ #ifndef _DISK_H #define _DISK_H +#include "fs/fs.h" #include "los_base.h" +#include "pthread.h" #ifdef LOSCFG_FS_FAT_CACHE #include "bcache.h" diff --git a/kernel/common/los_rootfs.c b/kernel/common/los_rootfs.c index dd50cb06..7c279735 100644 --- a/kernel/common/los_rootfs.c +++ b/kernel/common/los_rootfs.c @@ -37,7 +37,6 @@ #ifdef LOSCFG_DRIVERS_MMC #include "mmc/block.h" #include "disk.h" -#include "ff.h" #endif #include "sys/mount.h" #ifdef LOSCFG_PLATFORM_ROOTFS @@ -58,17 +57,18 @@ #define STORAGE_SIZE 0xa00000 #endif +#ifdef LOSCFG_STORAGE_EMMC +#include "ff.h" +#define STORAGE_SIZE 0x3200000 +STATIC los_disk *g_emmcDisk = NULL; +#endif + #ifdef __cplusplus #if __cplusplus extern "C" { #endif /* __cplusplus */ #endif /* __cplusplus */ -#ifdef LOSCFG_STORAGE_EMMC -#define STORAGE_SIZE 0x3200000 -STATIC los_disk *g_emmcDisk = NULL; -#endif - #ifndef LOSCFG_SECURITY_BOOT STATIC INT32 g_alignSize = 0; #endif