Re: USBDMSC emulated device does not work on FreeBSD
Date: Fri, 12 Nov 2021 11:07:14 UTC
On Fri, 12 Nov 2021 11:54:24 +0100 Hans Petter Selasky <hps@selasky.org> wrote: > On 11/12/21 09:59, Milan Obuch wrote: > > Hi, > > > > recently I got PolarFire SoC FPGA based board I am working on > > FreeBSD support for. As a non volatile storage, it has eNVM used > > for HSS and eMMC as disk device. > > > > After reset, first thing run is HSS, which loads U-Boot from eMMC > > and usual boot process continues. It is possible, however, break the > > process and issue 'usbdmsc' command on HSS prompt. eMMC is then > > presented as USB disk. > > > > This works on Windows, and one or more (depends on partition table > > used on eMMC) disk drives are presented to system. It is possible > > to use balenaEtcher software to put some image there and do > > something with it. > > > > This does not work on FreeBSD. I see device being attached after > > starting 'usbdmsc' command, but no USB drive is being created. Could > > someone help me to diagnose this? Which command output (maybe > > 'usbconfig <something>') could offer some hint? > > > > Regards, > > Milan > > > > Hi, > > Can you share what is printed in dmesg? > > This command may also be useful. It will show which kernel drivers > are attached to your device. > > usbconfig show_ifdrv > > --HPS > After issuing command 'usbdmsc' on HSS prompt, I see just kernel: ugen1.3: <Microchip Inc PolarFireSoc-FlashDrive> at usbus1 line in console (and later in dmesg). Relevant line in output of 'usbconfig show_ifdrv' command is ugen1.3: <Microchip Inc PolarFireSoc-FlashDrive> at usbus1, cfg=255 md=HOST spd=HIGH (480Mbps) pwr=ON (100mA) which does not tell much, I think. Anything else I can try to get something meaningfull? Note, my FreeBSD box is rather old, 11.4-STABLE, test done on 12.2-STABLE was basically the same. Regards, Milan