[PATCH 33/38] fs: fat: Support reading from a larger block size
Simon Glass
sjg at chromium.org
Thu Apr 20 18:30:08 CEST 2023
Hi Heinrich,
On Fri, 31 Mar 2023 at 04:28, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> On 3/31/23 00:55, Heinrich Schuchardt wrote:
> >
> >
> > Am 30. März 2023 23:32:22 MESZ schrieb Simon Glass <sjg at chromium.org>:
> >> At present it is not possible to read from some CDROM drives since the
> >> FAT sector size does not match the media's block size. Add a conversion
> >> option for this, so that reading is possible.
> >>
> >> This does increase SPL size for read-only FAT support by 25 bytes but
> >> all but 6 are covered by the previous patch. We could reduce the
> >> overhead of this feature to 0 bytes by making the code uglier (using
> >> a static variable).
> >
> > 512 and 2048 are not the only physical sector sizes. Some hard drives use 4096.
>
> To complete the logic you have first to take into account the size of a
> FAT sector (BPB_BytsPerSec) defined in the FAT boot sector which can
> take values 512, 1024, 2048, or 4096.
>
> Cf. https://academy.cba.mit.edu/classes/networking_communications/SD/FAT.pdf
>
> Best regards
>
> Heinrich
>
> >
> > This change deserves a test case.
If we keep this I should be able to add something simple.
Regards,
Simon
More information about the U-Boot
mailing list