ExFAT

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

ExFAT

Post by Candy »

Hi all,

I've done some ExFAT research in the past and didn't get too far - I created the ExFAT page on the wiki, but didn't put too much detail on it. It was later expanded to 3x the then-resulting state, but without enough to implement it, let alone test the implementation.

Given that:

- Microsoft released an actual official spec now (although it's missing a few fundamental details)
- Linux supports it (so the hornet's nest isn't too big?)
- SDXC requires it (so you can implement it with only interoperability as target)

and that I've been actually writing some OS level code again, I've taken up the task of fixing both my drivers to support ExFAT and to update the ExFAT wiki page. My current driver works fine (*) for reading files from ExFAT and handles read-only files. I've documented all that I need to implement this, extracted from my driver, onto the wiki. Please, somebody review this & see if you can implement your own ExFAT driver.

https://wiki.osdev.org/FAT#ExFAT

I propose to drop the separate ExFAT page, as it meshes well enough with the existing FAT32 documentation to be part of the main FAT article.

Related topics:

viewtopic.php?f=1&t=32786&hilit=exfat -> Pype.Clicker and Brendan (both used to be mods) discuss the state in 2018

viewtopic.php?f=1&t=30992&hilit=exfat -> Mike Gonta discusses some quirks for Windows' implementation of ExFAT (which is irrelevant to me)

viewtopic.php?f=15&t=42461&p=320986&hilit=exfat#p320986 -> Discussion on ExFAT as it relates to data exchange (SDXC) and booting (EFI/UEFI and ARM standardized boot).
User avatar
zaval
Member
Member
Posts: 656
Joined: Fri Feb 17, 2017 4:01 pm
Location: Ukraine, Bachmut
Contact:

Re: ExFAT

Post by zaval »

Discussion on ExFAT as it relates to data exchange (SDXC) and booting (EFI/UEFI and ARM standardized boot).
1) exFAT isn't mandated by the UEFI specification to be supported by a compliant implementation. Only FAT12/16/32 are.
2) exFAT is required by SDA to be used as the only FS for SDXC cards.
3) as result of the 2 above, on machines, where an SD card is the only secondary storage to install your OS onto (which is rare even in a low budget ARM SBC space, with the prominent exception of RPi... and definitely is not what SD cards and exFAT were intended for), you cannot you cannot use an SDXC card as your OS's installation target on such machines. formatting the card into something else is against 2), trying to use it with exFAT won't work, unless:
1) you provide a UEFI driver, that will materialize SFSP (Simple File System Protocol) for the exFAT volume of the card, which is possible or
2) implement RO exFAT functionality in your loader that will use the UEFI's underlying Block/Disk IO protocols for accessing the medium. this, it seems, is the best (easiest) option for those, willing to use these huge cards and stay compliant. besides, you probably would need to implement similar RO functionality for your fancy FS, which you would want to use on a Boot Volume (where OS lives) and which, of course also wouldn't be supported by UEFI. for example on eMMC modules, HDDs, or even NVMe SSDs, that aren't impossible to be connected to these tiny boards. so, exFAT in this case isn't any different from all those. UEFI unconditionally supports only classical FAT. And ESP is only FAT32. Personally, since I do my lame osdev attempts on the very same cheap ARM SBC landscape, I use cards <32 GB. :mrgreen:

This is my comment, related to the last link, because what was there, is anything, but discussion, let alone "useful". I cannot get this bold to ask to remove it from the post, but I can warn, that if someone would want to listen to any line in the 1st post on that link, he/she instantly would get themselves far away from the truth. it's hard to make so many false statements on a squared centimeter as bzt did there. :D
ANT - NT-like OS for x64 and arm64.
efify - UEFI for a couple of boards (mips and arm). suspended due to lost of all the target park boards (russians destroyed our town).
Post Reply