[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Info-mtools] [BUG] mcopy unable to copy to small FAT32 image starti
From: |
Alexander Bazarov |
Subject: |
Re: [Info-mtools] [BUG] mcopy unable to copy to small FAT32 image starting v4.0.32 |
Date: |
Sat, 17 Sep 2022 01:24:03 -0400 |
Hi Alain,
Thank you for your detailed response!
> Would it be possible to have more details about this embedded device?
> Which make, maybe "official" example images, etc.
It is a part of a proprietary SDK provided with multi-core ARM based
SoCs for digital cameras. The SDK generates an embedded Linux image
with sample applications.
(the fat32 image is used inside a proprietary bootloader for storing
configs before mounting other non-fat partitions and booting Linux)
As follows from Ubuntu's package manager, it installs the following
versions of mtools https://packages.ubuntu.com/search?keywords=mtools
:
focal (20.04LTS): 4.0.24-1
jammy (22.04LTS): 4.0.33-1
So it was pointed out that they will be required to fix the SDK
somehow to add support development on Ubuntu 22.04 (the problem starts
with mtools v4.0.32).
> Actually, according to Microsoft's specification, number of FAT bits of
> an existing filesystem is SOLELY determined by the number of clusters.
> This applies to all *three* bit numbers: 12/16/32
[...]
> I'm hesitant in bringing back this override (due to its incompatibility
> with the intended target, namely windows and MS-DOS), and astonished
> that there exist embedded devices which seem to require it.
But, as we see, `mkfs.vfat` does support creating non-standard
partitions, and there is a way to mount them, so it is useful to have
mtools to fill them with files after creation ;-)
For example, in this case, the partition has nothing to do with MS-DOS
or Windows.
> However, *other* aspects of FAT32 (FAT size, location of root directory,
> info block) are determined by whether the 16 bit fatlen boot sector
> variable (offset 22) is 0 or not.
[...]
> Maybe the device would understand a FAT16 with a freely plaçable root
> directory? (i.e. boot.fatlen is 0, but boot.ext.fat32.bigFat is not).
Thank you for pointing out possible directions to check and sorry for
not being able to share more details.
Best Regards,
Alex