
On Wed, Oct 31, 2018 at 09:54:14PM +0100, Heinrich Schuchardt wrote:
On 10/31/2018 01:22 PM, Alexander Graf wrote:
On 10/31/2018 11:00 AM, Clément Péron wrote:
Hi,
Trying to rebuild my SoCFPGA Cyclone V board and got this error :
fs/built-in.o: In function `set_contents': /home/cperon/u-boot/fs/fat/fat_write.c:831: undefined reference to `__aeabi_ldivmod' make: *** [Makefile:1381: u-boot] Error 1
seems to be introduced with this operation : assert(!(cur_pos % bytesperclust));
Could we maybe just use a bitmask for bytesperclust?
Alex
According to the FAT specification the cluster size is a power of two. So we can write
I found: "Count of bytes per sector. This value may take on only the following values: 512, 1024, 2048 or 4096."
assert(!(cur_pos & (bytesperclust -1)));
It seems reasonably good.
Thanks, -Takahiro Akashi
Cf. patch https://lists.denx.de/pipermail/u-boot/2018-October/346178.html fs: fat: validate sector and cluster size.
Best regards
Heinrich