[PATCH v1 0/2] fs: fat: calculate FAT type based on cluster count

christian.taedcke-oss at weidmueller.com christian.taedcke-oss at weidmueller.com
Wed Nov 8 13:12:37 CET 2023


From: Christian Taedcke <christian.taedcke at weidmueller.com>


This series fixes an issue where the FAT type (FAT12, FAT16) is not
correctly detected, e.g. when the BPB field BS_FilSysType contains the
valid value "FAT     ".

This issue occures, for example, if a partition is formatted by
swupdate using its diskformat handler. swupdate uses the FAT library
from http://elm-chan.org/fsw/ff/ internally.

See https://groups.google.com/g/swupdate/c/7Yc3NupjXx8 for a
discussion in the swupdate mailing list.

Please refer to the commit messages for more details.



Christian Taedcke (2):
  fs: fat: add macro to convert u8[2] to u16
  fs: fat: calculate FAT type based on cluster count

 fs/fat/fat.c             | 67 +++++++++++++++++++++++-----------------
 include/fat.h            |  6 ----
 test/image/spl_load_fs.c |  2 +-
 3 files changed, 40 insertions(+), 35 deletions(-)

-- 
2.34.1



More information about the U-Boot mailing list