cederom commented on PR #18697:
URL: https://github.com/apache/nuttx/pull/18697#issuecomment-4219145297
* Hmm, I was not able to replicate this problem with `raspberrypi-4b:sd` on
FreeBSD 14.4 nor macOS 26 with current nuttx master and your branch
@michallenc. Thus it looks like Linux specific problem?
* I also tried your patch and was not able to repeat the problem and all
seemed to work okay. If you make this behavior not possible at all then the fix
is good :-)
* Regarding FAT support from my experience it is very very important on how
the memory is formatted:
* What exact FAT is used, sometimes FAT12, sometimes FAT16.
* What is the partition table if there is any or none.
* Fresh pendrives / sd cards tend to have strange initial format and it
caused many problems many times over the years. Thus I always format all new
memories by hand anyway as a rule :-)
* You may try to recall if you used fresh card that you did not format, or
you are sure you did format it yourself? You may want to dump the first 512
bytes of the memory to verify MBR. If fat is not FAT32 and there are no
partitions then Linux may do some magic on its own behind the scenes thus the
problem encountered. If so you may report a Linux bug :-)
* Below is the MBR dump of my memory card:
```
% xxd -l 512 /dev/da0s1
00000000: eb58 906d 6b66 732e 6661 7400 0204 2000 .X.mkfs.fat... .
00000010: 0200 0000 00f8 0000 3f00 ff00 0040 0000 ........?....@..
00000020: fcff 0f00 f807 0000 0000 0000 0200 0000 ................
00000030: 0100 0600 0000 0000 0000 0000 0000 0000 ................
00000040: 8001 2990 b80b 3a62 6f6f 7466 7320 2020 ..)...:bootfs
00000050: 2020 4641 5433 3220 2020 0e1f be77 7cac FAT32 ...w|.
00000060: 22c0 740b 56b4 0ebb 0700 cd10 5eeb f032 ".t.V.......^..2
00000070: e4cd 16cd 19eb fe54 6869 7320 6973 206e .......This is n
00000080: 6f74 2061 2062 6f6f 7461 626c 6520 6469 ot a bootable di
00000090: 736b 2e20 2050 6c65 6173 6520 696e 7365 sk. Please inse
000000a0: 7274 2061 2062 6f6f 7461 626c 6520 666c rt a bootable fl
000000b0: 6f70 7079 2061 6e64 0d0a 7072 6573 7320 oppy and..press
000000c0: 616e 7920 6b65 7920 746f 2074 7279 2061 any key to try a
000000d0: 6761 696e 202e 2e2e 200d 0a00 0000 0000 gain ... .......
000000e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000000f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000100: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000110: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000120: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000130: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000140: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000150: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000160: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000170: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000180: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000190: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000001a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000001b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000001c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000001d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000001e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000001f0: 0000 0000 0000 0000 0000 0000 0000 55aa ..............U.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]