On 2022/01/26 20:19, rgc wrote:
> On Tue, Jan 25, 2022 at 09:49:05PM +0900, rgc wrote:
> > misc@
> > 
> > got a CH341A SPI programmer.
> > works on Linux. 
> > anybody got it to work with 70-current? or previous? 
> > 
> > 
> > caveat from /usr/local/share/doc/pkg-readmes/flashrom:
> > -----
> > flashrom also supports some external programming devices via USB; in
> > those cases it can be run from a normal boot.
> > 
> > so flashrom should just work (tm) right!?
> 
> i just found the time to try flashrom in single user mode ("boot -s") and
> i get the same error ... still timeout.

Single user mode for flashrom is to provide raw system access for direct
programming of the motherboard that you are running on, it won't help
USB.

> > glitch# flashrom -p ch341a_spi -r top.rom
> > flashrom v1.2 on OpenBSD 7.0 (amd64)
> > flashrom is free software, get the source code at https://flashrom.org
> > 
> > Using clock_gettime for delay loops (clk_id: 3, resolution: 1ns).
> > Found Winbond flash chip "W25Q32.V" (4096 kB, SPI) on ch341a_spi.
> > Reading flash... ch341a_spi_spi_send_command: failed to submit OUT 
> > transfer: LIBUSB_ERROR_TIMEOUT
> > ch341a_spi_spi_send_command: Failed to write 4265 bytes
> > Read operation failed!
> > FAILED.

Looking at the ch341a_spi code in flashrom, it looks like it uses bulk
async transfers; these are known *not* to work on OpenBSD with libusb.

(In general USB support, especially to programs running in userland, is
not brilliant on OpenBSD; you're probably better off with a little Linux
box for those.)

Reply via email to