相关配置
CONFIG_CMD_FAT=y
相关文件
fs/fat/fat.c
fs/fs_internal.c
fs/fs.c
cmd/fat.c
命令及命令的使用
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls - list files in a directory (default /)
fatsize - determine a file's size
=> fatinfo mmc 0:1
Interface: MMC
Device 0: Vendor: Man 0000fe Snr 00023d01 Rev: 0.0 Prod: SD16G
Type: Removable Hard Disk
Capacity: 30474.0 MB = 29.7 GB (62410752 x 512)
Filesystem: FAT16 "NO NAME
=> fatload mmc 0:1 0x50008000 uImage
1828792 bytes read in 277 ms (6.3 MiB/s)
=> fatls mmc 0:1
1828792 uImage
1 file(s), 0 dir(s)
=> fatsize mmc 0:1 uImage
// 没有任何打印
命令解析
可以从命令解析的角度了解 fat fs
fatinfo
do_fat_fsinfo cmd/fat.c
blk_get_device_part_str disk/part.c
fat_set_blk_dev fs/fat/fat.c
file_fat_detectfs fs/fat/fat.c
printf("n Device %d: ", cur_dev->devnum);
dev_print(cur_dev); disk/part.c
read_bootsectandvi(&bs, &volinfo, &fatsize) fs/fat/fat.c
memcpy(vol_label, volinfo.volume_label, 11)
vol_label[11] = '