fat: handle Windows formatted partition (thru USB Mass Storage)

Heinrich Schuchardt xypron.glpk at gmx.de
Mon Jan 13 18:55:33 CET 2020


On 1/13/20 5:34 PM, Tom Rini wrote:
> On Mon, Jan 13, 2020 at 12:52:48PM +0200, Andy Shevchenko wrote:
>> Hi!
>>
>> I recently stumble over FAT partitioning issue. I have a device with
>> MMC, one partition of which has been exported as disk via USB Mass
>> Storage to the host. When Windows 10 sees that disk it can't handle it
>> till I format it there.

This I could reproduce.

So far so good. However, the same partition
>> can't be used under U-Boot due to Windows flow, i.e. it makes a
>> partitioning on top of the actual partition while U-Boot expects that
>> we only have one MBR (or partitioning) on the dist. So, the commands
>> such fatls, fatload do not recognise any file there.

But for me the U-Boot's load command loaded a file created on Windows
without problems. The size of my FAT partition was 50 MiB.

Please, provide a more detailed instruction how to create an image that
is recognized by Windows but not by U-Boot.

Please, provide a gzipped test image for download.

Best regards

Heinrich

>>
>> In Linux it's easy to use: mount -o loop,offset=65536 /dev/mmcblk0p9 /mnt
>> (offset can be different)
>>
>> But I would like to use it in U-Boot.
>>
>> Any thoughts on this?
>
> I'm not sure.  If you didn't have to use offset+loop to re-expose things
> as a new disk and show the partition I'd say we need to support that
> case.  But here, hmmm.  We don't have "loopback".  So, I'm not sure.
> Can't you just tell Windows to use the whole device as FAT and so
> mmcblk0p9 would directly be FAT and work as expected in both Linux and
> U-Boot?
>


More information about the U-Boot mailing list