Hi my customer want to using exFAT FS on nand/SD. The platform is DM8127 + IPNCRDK3.5
Is it possible to support exFAT FS on current kernel?
BR,
Eason
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi my customer want to using exFAT FS on nand/SD. The platform is DM8127 + IPNCRDK3.5
Is it possible to support exFAT FS on current kernel?
BR,
Eason
Hi Eason,
I think, you can use extFS support in SD/USB etc., not through NAND flash.
You have to cross compile the "fuse-exfat" (mount support) and "extfs-utils" packages to support "extFS".
Try the below link to enable extFS support in kernel.
https://github.com/dorimanx/exfat-nofuse
Hi Thanks for reply!
Could you let me know why exFAT on NAND is not supported?
BR,
Eason
Hi Eason,
EXT filesystem doesn't support journaling fs and "power loss safe".
JFFS2,YAFFS2,UBIFS are the filesystems used in flash memory devices such as NAND, NOR, etc.,
EXT fs is used in eMMC/SD/MMC/HDD etc., which is doesn't care about power loss. ex: Desktop based
Refer to the below link.
Chapter "Sector-Based Read/Write File Systems" and "Power Loss Tolerance"
Hi Eason,
I'm able to enable "extFS" support in liunux kernel and able to mount (pendrive) too.
Steps:
1) Download the "exFAT" moudule linux driver from the below link.
https://github.com/dorimanx/exfat-nofuse
2) Modify the "Makefile" as per your kernel source.
3) Build with your tollchain
4) Install the "exFAT" driver in linux.
Build Log:
titus@Titus:~/workdir/ti-e2e/exfat-nofuse-master$ make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-
make -C /opt/ti/mcsdk_1_01_00_01/board-support/linux-3.3-psp03.22.00.06.sdk M=/home/titus/workdir/ti-e2e/exfat-nofuse-master modules
make[1]: Entering directory `/opt/ti/mcsdk_1_01_00_01/board-support/linux-3.3-psp03.22.00.06.sdk'
CC [M] /home/titus/workdir/ti-e2e/exfat-nofuse-master/exfat_core.o
CC [M] /home/titus/workdir/ti-e2e/exfat-nofuse-master/exfat_super.o
CC [M] /home/titus/workdir/ti-e2e/exfat-nofuse-master/exfat_api.o
CC [M] /home/titus/workdir/ti-e2e/exfat-nofuse-master/exfat_blkdev.o
CC [M] /home/titus/workdir/ti-e2e/exfat-nofuse-master/exfat_cache.o
CC [M] /home/titus/workdir/ti-e2e/exfat-nofuse-master/exfat_data.o
CC [M] /home/titus/workdir/ti-e2e/exfat-nofuse-master/exfat_bitmap.o
CC [M] /home/titus/workdir/ti-e2e/exfat-nofuse-master/exfat_nls.o
CC [M] /home/titus/workdir/ti-e2e/exfat-nofuse-master/exfat_oal.o
CC [M] /home/titus/workdir/ti-e2e/exfat-nofuse-master/exfat_upcase.o
LD [M] /home/titus/workdir/ti-e2e/exfat-nofuse-master/exfat.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/titus/workdir/ti-e2e/exfat-nofuse-master/exfat.mod.o
LD [M] /home/titus/workdir/ti-e2e/exfat-nofuse-master/exfat.ko
make[1]: Leaving directory `/opt/ti/mcsdk_1_01_00_01/board-support/linux-3.3-psp03.22.00.06.sdk'
titus@Titus:~/workdir/ti-e2e/exfat-nofuse-master$
Makefile:
# # Makefile for Linux FAT12/FAT16/FAT32(VFAT)/FAT64(ExFAT) filesystem driver. # ifneq ($(KERNELRELEASE),) # call from kernel build system obj-$(CONFIG_EXFAT_FS) += exfat.o exfat-objs := exfat_core.o exfat_super.o exfat_api.o exfat_blkdev.o exfat_cache.o \ exfat_data.o exfat_bitmap.o exfat_nls.o exfat_oal.o exfat_upcase.o else # external module build EXTRA_FLAGS += -I$(PWD) # # KDIR is a path to a directory containing kernel source. # It can be specified on the command line passed to make to enable the module to # be built and installed for a kernel other than the one currently running. # By default it is the path to the symbolic link created when # the current kernel's modules were installed, but # any valid path to the directory in which the target kernel's source is located # can be provided on the command line. # #KDIR := /lib/modules/$(shell uname -r)/build KDIR := /opt/ti/mcsdk_1_01_00_01/board-support/linux-3.3-psp03.22.00.06.sdk MDIR := /usr/local/filesystem_omapl138/lib/modules/$(shell uname -r) PWD := $(shell pwd) KREL := $(shell cd ${KDIR} && make -s kernelrelease) MDIR := /usr/local/filesystem_omapl138/lib/modules/${KREL} PWD := $(shell pwd) export CONFIG_EXFAT_FS := m all: $(MAKE) -C $(KDIR) M=$(PWD) modules clean: $(MAKE) -C $(KDIR) M=$(PWD) clean help: $(MAKE) -C $(KDIR) M=$(PWD) help install: exfat.ko rm -f ${MDIR}/kernel/fs/exfat/exfat.ko install -m644 -b -D exfat.ko ${MDIR}/kernel/fs/exfat/exfat.ko depmod -aq uninstall: rm -rf ${MDIR}/kernel/fs/exfat depmod -aq endif .PHONY : all clean install uninstall
Log:
root@omapl138-lcdk:/# cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev cgroup
nodev tmpfs
nodev debugfs
nodev sockfs
nodev pipefs
nodev anon_inodefs
nodev rpc_pipefs
nodev devpts
ext3
ext2
cramfs
nodev ramfs
vfat
msdos
iso9660
nodev nfs
ufs
nodev jffs2
nodev mqueue
nodev mtd_inodefs
nodev ubifs
root@omapl138-lcdk:/#
root@omapl138-lcdk:/#
root@omapl138-lcdk:/#
root@omapl138-lcdk:/# insmod exfat.ko
exFAT: Version 1.2.9
root@omapl138-lcdk:/#
root@omapl138-lcdk:/# cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev cgroup
nodev tmpfs
nodev debugfs
nodev sockfs
nodev pipefs
nodev anon_inodefs
nodev rpc_pipefs
nodev devpts
ext3
ext2
cramfs
nodev ramfs
vfat
msdos
iso9660
nodev nfs
ufs
nodev jffs2
nodev mqueue
nodev mtd_inodefs
nodev ubifs
exfat
root@omapl138-lcdk:/# usb 1-1: new full-speed USB device number 2 using ohci
usb 1-1: not running at top speed; connect to a high speed hub
scsi1 : usb-storage 1-1:1.0
scsi 1:0:0:0: Direct-Access Generic Mass Storage 1.00 PQ: 0 ANSI: 2
sd 1:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: [sda] 16179200 512-byte logical blocks: (8.28 GB/7.71 GiB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Asking for cache data failed
sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] Asking for cache data failed
sd 1:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 1:0:0:0: [sda] Asking for cache data failed
sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] Attached SCSI removable disk
root@omapl138-lcdk:/#
root@omapl138-lcdk:/#
root@omapl138-lcdk:/# mountFAT-fs (sda): bogus number of reserved sectors
FAT-fs (sda): Can't find a valid FAT filesystem
[EXFAT] trying to mount...
[EXFAT] FsMountVol failed
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw,relatime,errors=continue,user_xattr,barrier=1,data=writeback)
proc on /proc type proc (rw,relatime)
tmpfs on /mnt/.splash type tmpfs (rw,relatime,size=40k)
sysfs on /sys type sysfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,size=1024k,nr_inodes=8192,mode=755)
/dev/mmcblk0p2 on /media/mmcblk0p2 type ext3 (rw,relatime,errors=continue,user_xattr,barrier=1,data=writeback)
/dev/mmcblk0p1 on /media/mmcblk0p1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,e)
/dev/mmcblk0p3 on /media/mmcblk0p3 type ext3 (rw,relatime,errors=continue,user_xattr,barrier=1,data=writeback)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /var/volatile type tmpfs (rw,relatime,size=16384k)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /media/ram type tmpfs (rw,relatime,size=16384k)
root@omapl138-lcdk:/# FAT-fs (sda1): bogus number of reserved sectors
FAT-fs (sda1): Can't find a valid FAT filesystem
[EXFAT] trying to mount...
[EXFAT] mounted successfully
nls_utf8: disagrees about version of symbol module_layout
root@omapl138-lcdk:/#
root@omapl138-lcdk:/#
root@omapl138-lcdk:/# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw,relatime,errors=continue,user_xattr,barrier=1,data=writeback)
proc on /proc type proc (rw,relatime)
tmpfs on /mnt/.splash type tmpfs (rw,relatime,size=40k)
sysfs on /sys type sysfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,size=1024k,nr_inodes=8192,mode=755)
/dev/mmcblk0p2 on /media/mmcblk0p2 type ext3 (rw,relatime,errors=continue,user_xattr,barrier=1,data=writeback)
/dev/mmcblk0p1 on /media/mmcblk0p1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,e)
/dev/mmcblk0p3 on /media/mmcblk0p3 type ext3 (rw,relatime,errors=continue,user_xattr,barrier=1,data=writeback)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /var/volatile type tmpfs (rw,relatime,size=16384k)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /media/ram type tmpfs (rw,relatime,size=16384k)
/dev/sda1 on /media/sda1 type exfat (rw,relatime,fmask=0022,dmask=0022,namecase=1,errors=remount-ro)
root@omapl138-lcdk:/# ls /media/sda1/
exfat_test.txt
root@omapl138-lcdk:/#
root@omapl138-lcdk:/# uname -a
Linux omapl138-lcdk 3.3.0 #13 PREEMPT Thu Aug 28 17:49:04 IST 2014 armv5tejl unknown
root@omapl138-lcdk:/#
root@omapl138-lcdk:/#
root@omapl138-lcdk:/#
Hi Many many thanks!
Because the kernel in IPNCRDK is 2.6.37, the kerenl you mentioned is 3.x, I have suggested my ctm to find kind of patch over linux 2.6.37, and they will try on that first.
BR,
Eason