prk_firmware: Corrupt FAT on FreeBSD / Linux
I just copied the most recent UF2 of prk_firmware to my RP2040 (from Rasperry Pi Foundation). On FreeBSD, it comes up like this:
ugen0.4: <PRK Firmware developers Default VID/PID> at usbus0
umodem0 on uhub0
umodem0: <PRK CDC> on usbus0
umodem0: data interface 1, has no CM over data, has no break
umass0 on uhub0
umass0: <PRK MSC> on usbus0
umass0: SCSI over Bulk-Only; quirks = 0x0000
umass0:1:0: Attached to scbus1
uhid0 on uhub0
uhid0: <PRK Firmware developers Default VID/PID, class 239/2, rev 2.00/1.00, addr 4> on usbus0
da0 at umass-sim0 bus 0 scbus1 target 0 lun 0
da0: <TinyUSB Mass Storage 1.0> Removable Direct Access SCSI-2 device
da0: Serial Number 0.9.20 (20221226 revision ac046
da0: 1.000MB/s transfers
da0: 0MB (128 4096 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
uhid1 on uhub0
uhid1: <PRK Firmware developers Default VID/PID, class 239/2, rev 2.00/1.00, addr 4> on usbus0
I can dd if=/dev/da0 of=/tmp/prk.img bs=4096 count=128. But I cannot mount it via mount -t msdos /dev/da0 /mnt. Is FreeBSD expecting a partition table?
On Ubuntu Linux (22.04), the FAT file system comes up, but it shows corrupted file names.
- Is it likely that during the transfer of the UF2 to the RP2040, corruption did take place?
prk_firmwareis quite “large”… so maybe chances for corruption is higher. - Or is it more likely that the FAT implementation of
prk_firmwareis just missing some functionality?
Connecting against the serial port works: picocom /dev/cuaU0 shows Please make keymap.rb in PRKFirmware drive repeatedly.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 17 (9 by maintainers)
Yes, solved! Thanks!
This works! With the new firmware, I can mount
da0s1. Thanks a lot!This works! So using
bs=4kis the trick here.Still fails.
After
dd if=FAT512K.img of=/dev/da0(and unplugging USB and plugging it in again):And mounting it with
mount -t msdos /dev/da0 /mntfails:Are you sure, you are not messing with 512-bytes vs. 4096-bytes sector sizes? Or is TinyUSB Mass Storage library always using 4096-bytes sized disk sectors?