Hi,
Currently I am running fsl-image-core on T1040RDB board using NFS boot. I was trying to mount the SD card (which I have put in on board SD slot). The file system is FAT32 on that card. So I am not able to find how to mount that SD card in the OS. Do I need to re-compile the kernel to support for FAT32 and also SD card.
Please suggest on the same.
-Abhinav
Hello Abhinav Bipnesh,
eSDHC driver and FAT32 filesystem support have already been enabled in the default Kernel configuration file.
After the system boot up, you only need to mount the specific partition, I supposed there is a FAT32 partition /dev/mmcblk0p1 on your SD card.
# mkdir /mnt/sd
# mount -t vfat /dev/mmcblk0p1 /mnt/sd
# ls /mnt/sd/
# cp /bin/busybox /mnt/sd
# ls /mnt/sd
busybox vim
Do you encounter any problem?
The following is Kernel configuration
Device Drivers --->
<*> MMC/SD/SDIO card support ---
>
<*> MMC block device
driver
(8) Number of minors per block device
[*] Use bounce buffer for simple hosts
Enables SD/MMC block device driver support
*** MMC/SD/SDIO Host Controller Drivers
***
<*> Secure Digital Host Controller
Interface support
<*> SDHCI support on OpenFirmware
platforms
[*] SDHCI OF support
FAT32 filesystem suppot
File systems --->
DOS/FAT/NT Filesystems --->
<*> VFAT (Windows-95) fs support
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
SHi,
I have already tried to mount SD card with FAT32 but getting below error while trying to mount it.
root@t1040rdb:~# mount /dev/mmcblk0p1
mount: wrong fs type, bad option, bad superblock on /dev/mmcblk0p1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
dmesg logs
[ 53.505361] FAT-fs (mmcblk0p1): codepage cp437 not found
Even I have verified all the Kernel options which you have suggested and find all the options by default. I have made the module to be present as part of the kernel but still same error I am getting.
Later I have format the card as NTFS and then tried to mount it. We was able to do but getting error while trying to write on it. Below is the output for the same
root@t1040rdb:/media/card# mount
. . .
/dev/mmcblk0p1 on /media/card type ntfs (rw,relatime,sync,uid=0,gid=0,fmask=0177,dmask=077,nls=iso8859-1,errors=continue,mft_zone_multiplier=1)
root@t1040rdb:/media/card# mkdir temp
mkdir: cannot create directory 'temp': Operation not permitted
So any thoughts to fix this issue.
-Abhinav
I able to solve the error for codepage cp437 for the vfat mount using below option in Kernel config
File Systems --> Native language support
and selecting CP437.
After that rebuild the kernel and boot back and mount the card and it work.
But still not able to get why the default kernel module was not able to detect it (
Along with it how to resolve the issue for NTFS read/write through native drivers or we have to use another one.
Thanks,
Abhinav
Hello Abhinav,
I verified the default Kernel on T1040RDB, and could reproduce the codepage problem, the Kernel configuration which your mentioned is necessary.
NTFS file system is also configured in the default Kernel, what problem did you encounter for NTFS?
Thanks,
Yiping
Hi Yiping,
When tried to mount NTFS based SD card it get mounted out of box. But when I tried to create an directory or try to write some on thing on the device I get an Permission denied error. Same is given below
root@t1040rdb:/media/card# mount
. . .
/dev/mmcblk0p1 on /media/card type ntfs (rw,relatime,sync,uid=0,gid=0,fmask=0177,dmask=077,nls=iso8859-1,errors=continue,mft_zone_multiplier=1)
root@t1040rdb:/media/card# mkdir temp
mkdir: cannot create directory 'temp': Operation not permitted
I have re-configured kernel to have NTFS write support but still same error is being reported. So is we need to have NTFS-3G driver for doing. But I am looking for something from default kernel.
So any thoughts on the same.
-Abhinav
Hello Abhinav Bipnesh,
Mounting NTFS file system with read write access permissions, you need to install additional packages such as fuse and ntfs-3g, these packages have been integrated into SDK 1.7.
Please add "ntfs-3g" into the variable "IMAGE_INSTALL" in meta-fsl-networking/images/fsl-image-core.bb, and rebuild the rootfs filesystem.
Then you could use “ntfs-3g /dev/mmcblk0p1 /mnt/<mount point>”
If further assistance is needed, please feel free to let me know.
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Yiping,
So we don't have to re-compile the kernel for any additional support? Or even after adding these packages we need to re-configure the kernel for the same.
Thanks,
Abhinav
Hello Abhinav Bipnesh,
No need to recompile Kernel, according to your previous description, you have already enabled NTFS_FS and NTFS_RW in Kernel, please add the package "ntfs-3g " and rebuild the filesystem with command "bitbake fsl-image-core".
For any problem, please feel free to let me know.
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------