文件系统作为操作系统的一个模块,需要对内核进行配置才能使用;内核提供对文件系统功能选项的配置功能
内核配置
make ARCH=arm menuconfig
文件系统选项的配置
File Systems --->
构建方式:
内置构建:[*] <*> ---> 增加内核镜像文件大小
模块构建: < > <M> ---> 提供动态加载移除的灵活性
嵌入式配置原则:
1. 文件系统主要进行内置构建
2. 一般不选择EXPERIMENTAL的模块或者特性(产品应用)
3. 对于不确定的选项使用默认配置
4.按照业务要求选择合适的文件系统
文件系统选项说明:
一、文件系统公共选项: fs/Kconfig
CONFIG_FS_POSIX_ACL (ACL控制)
CONFIG_FILE_LOCKING (NFS网络文件系统, flock系统调用)
[Notify]
CONFIG_FSNOTIFY
CONFIG_DNOTIFY (基于目录的文件变化的通知机制)
CONFIG_INOTIFY_USER (替代Dnotify)
CONFIG_FANOTIFY
CONFIG_FANOTIFY_ACCESS_PERMISSIONS
[Quota: ext2,ext3,reiserfs]
CONFIG_QUOTA
CONFIG_QUOTA_NETLINK_INTERFACE
CONFIG_PRINT_QUOTA_WARNING
CONFIG_QUOTA_DEBUG
CONFIG_QUOTA_TREE
CONFIG_QFMT_V1
CONFIG_QFMT_V2
CONFIG_QUOTACTL
CONFIG_QUOTACTL_COMPAT
[Autofs4: 类似Windows上的网络驱动器]
CONFIG_AUTOFS4_FS
[FUSE]
CONFIG_FUSE_FS
CONFIG_CUSE (FUSE extension)
[Caches]
CONFIG_FSCACHE
CONFIG_FSCACHE_XXX
CONFIG_CACHEFILES
CONFIG_CACHEFILES_XXX
[Partition Types]
CONFIG_PARTITION_ADVANCED (hard disks)
[NLS: Native Language Support]
CONFIG_NLS
CONFIG_NLS_DEFAULT
CONFIG_NLS_CODEPAGE_XXX (CP936,GB2312)
CONFIG_NLS_ISO8859_XXX
[DLM: Distributed Lock Manager]
CONFIG_DLM (为各种分布式文件系统提供通用的锁定支持)
二、具体文件系统特性选项:
CONFIG_EXT2_XXX
CONFIG_EXT3_XXX
CONFIG_EXT4_XXX
CONFIG_REISERFS_XXX
CONFIG_BTRFS_XXX
CONFIG_JFS_XXX
......
CONFIG_UDF_XXX
[Windows FS]
CONFIG_FAT_FS (base functions to support MS-DOS/VFAT)
CONFIG_VFAT_FS (windows 95,fat32)
CONFIG_MSDOS_FS
CONFIG_FAT_DEFAULT_CODEPAGE
CONFIG_FAT_DEFAULT_IOCHARSET (vfat use, "utf8" not recommened here)
CONFIG_NTFS_XXX
CONFIG_PROC_XXX
CONFIG_TMPFS_XXX
CONFIG_SYSFS
.......
[Misc FS]
CONFIG_YAFFS2_XXX
YAFFS_YAFFS1: 512B/page
YAFFS_DOES_ECC: fs ECC or MTD-NAND ECC
YAFFS_YAFFS2: >=2K bytes/page
YAFFS_AUTO_YAFFS2
YAFFS_ALWAYS_CHECK_CHUNK_ERASED
YAFFS_EMPTY_LOST_AND_FOUND
YAFFS_DISABLE_BLOCK_REFRESHING (useful for MLC)
YAFFS_DISABLE_BACKGROUND
YAFFS_XATTR
CONFIG_JFFS2_XXX
JFFS2_FS_DEBUG
JFFS2_FS_WRITEBUFFER
JFFS2_FS_WBUF_VERIFY
JFFS2_SUMMARY (EXPERIMENTAL:sumtool,for faster mount)
JFFS2_FS_XATTR(EXPERIMENTAL)
JFFS2_FS_POSIX_ACL (xattr)
JFFS2_FS_SECURITY (xattr)
JFFS2_COMPRESSION_OPTIONS: ZLIB,LZO,RTIME,RUBIN
JFFS2_CMODE_NONE
JFFS2_CMODE_PRIORITY (first successful one)
JFFS2_CMODE_SIZE (smallest size one)
JFFS2_CMODE_FAVOURLZO (smallest, but lzo favour)
CONFIG_CRAMFS
CONFIG_SQUASHFS_XXX
SQUASHFS_XATTR
SQUASHFS_LZO (aimed at embedded systems with slower CPUs)
SQUASHFS_XZ
SQUASHFS_EMBEDDED
SQUASHFS_FRAGMENT_CACHE_SIZE (default: the last 3 fragments)
CONFIG_UBIFS_XXX
CONFIG_LOGFS_XXX
......
[Network FS]
CONFIG_NFS_XXX (client)
NFS_COMMON
NFS_ACL_SUPPORT
Version: V3 V4
ROOT_NFS
NFS_FSCACHE
NFS_USE_LEGACY_DNS / NFS_USE_KERNEL_DNS
CONFIG_NFSD_XXX
CONFIG_SUNRPC_XXX
CONFIG_CIFS_XXX(samba)