[Bug 269072] fstyp(8) does not recognize rpi2040 chip in update mode as fat16-drive

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 20 Jan 2023 14:55:29 UTC

            Bug ID: 269072
           Summary: fstyp(8) does not recognize rpi2040 chip in update
                    mode as fat16-drive
           Product: Base System
           Version: 13.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: nkoch@demig.de

The rpi2040 chip's usb interface either works as serial device or as disk
device for installing firmware updates.

I've configured autofs=YES and verified that it works with some usb stick

When switching the rpi2040 to firmware update mode the kernel's dmesg output
correctly reports a new mass storage device which I can manually mount as
e.g. mount -t msdosfs /dev/da0s1 /mnt.

But automounting does not work because fstyp /dev/da0s1 reports an unknown file
system type.

Here is the output of file /dev/da0s1 for the rpi2040 and /dev/da1s1 for the
working usb stick:

/dev/da0s1: DOS/MBR boot sector, code offset 0x3c+2, OEM-ID "MSWIN4.1",
sectors/cluster 8, root entries 512, Media descriptor 0xf8, sectors/FAT 129,
sectors/track 1, heads 1, hidden sectors 1, sectors 262143 (volumes > 32 MB),
serial number 0x0, label: "RPI-RP2    ", FAT (16 bit)

/dev/da1s1: DOS/MBR boot sector, code offset 0x58+2, OEM-ID "SYSLINUX",
sectors/cluster 16, reserved sectors 2800, Media descriptor 0xf8, sectors/track
63, heads 255, hidden sectors 2048, sectors 30717952 (volumes > 32 MB), FAT (32
bit), sectors/FAT 14984, reserved 0x1, serial number 0x7cc17ec6, unlabeled

Does the combination of FAT16 and (volume>32MB) confuse fstyp?

You are receiving this mail because:
You are the assignee for the bug.