[coreboot] Re: DIY debug Dongle

2019-10-18 Thread Kyösti Mälkki
On Sun, Oct 13, 2019 at 1:28 AM  wrote:
>
> Hi
> I’ve seen an EHCI debug dongle in the old wiki. I’m trying to build one for 2 
> purposes: debug a homebrew os/Shell and make it a new UEFI bootloader. 
> However I don’t know where to find further documentation or comments about 
> this. I also dont’ know what is the current or most up to date schematic to 
> build the “sandwich” and what tracks cut and what not. I have bought those 
> blue cypress FX2LP boards and I don’t know how to check revisions. Also, 
> I’dont know exactly what software can be used to control it. It would be 
> desirable if one can send stop or install some breakpoints with Visual 
> studio’s debugger or WinDBG or GDB or something like that.
> thanks in advance for your advice.

Hi

I created the original FX2LP dongle sandwich, crafting together pieces
from different fx2lib sources back in 2013. I think my repository
regressed (no longer built) already in 2014-2015 after some sdcc
update and I never had interest to maintain that; coreboot devs had
switched to USB gadgets like BBB screwdriver and  dual-FT232H.

There was further work [1] linked in wiki that claims to work as a
compatible net20dc replacement with windows kernel debugger. I never
built or run that firmware. I may still have the hardware somewhere
but I
don't remember them having any distinct PCB revision silkscreens
printed, you just need to trace the pins. The FX2LP boards I had were
actually relabeled FX2, which might also may break net20dc
compatibility.

I would go with one of the other non-FX2LP approaches instead:

- use pre-built beaglebone black screwdriver image, route USB gadget
(g_dbpg) to TCP  (how to make it appear as virtual COM port for WinDBG
I have no clue of)
- some phone or devboard with USB OTG 2.0 operating in device mode,
otherwise same as above
- in case you develop with some TianoCore / EDK, which claims net20dc
support, make it compatible with FT232H, it should be just a matter of
sending couple different USB packets [2]

[1] https://github.com/night199uk/fx2lib/pull/2
[2] https://review.coreboot.org/c/coreboot/+/10063

Kyösti
___
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-le...@coreboot.org


[coreboot] Re: DIY debug Dongle

2019-10-14 Thread Insurgo
A not on EHCI debug, the screwdriver on Beaglebone black would need some
loving but works:

https://github.com/osresearch/heads/issues/541#issuecomment-481513900

On 10/14/19 10:53 AM, Nico Huber wrote:
> On 13.10.19 16:40, Tom Hiller wrote:
>> The wiki briefly mentions "usb_debug_io.c" with a link to an old trac
>> ticket.  Could a second device connected via usb only read the logs?  I
>> am curious on the feasibility of attaching an Android phone/tablet with
>> an app that could easily read coreboot debug information.
> For EHCI debug, the basic requirements are that it's a high-speed
> capable device and that you can configure and use it with <= 8 byte
> transfers.
>
> Usually this applies to Android devices and some have been used
> already for debugging. You need the `g_dbgp` gadget driver. This
> driver is reported to not always work, however... a workaround
> could be to use `g_serial` and add some support code to the debug
> target.
>
> Nico
> ___
> coreboot mailing list -- coreboot@coreboot.org
> To unsubscribe send an email to coreboot-le...@coreboot.org
___
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-le...@coreboot.org


[coreboot] Re: DIY debug Dongle

2019-10-14 Thread Nico Huber
On 13.10.19 16:40, Tom Hiller wrote:
> The wiki briefly mentions "usb_debug_io.c" with a link to an old trac
> ticket.  Could a second device connected via usb only read the logs?  I
> am curious on the feasibility of attaching an Android phone/tablet with
> an app that could easily read coreboot debug information.

For EHCI debug, the basic requirements are that it's a high-speed
capable device and that you can configure and use it with <= 8 byte
transfers.

Usually this applies to Android devices and some have been used
already for debugging. You need the `g_dbgp` gadget driver. This
driver is reported to not always work, however... a workaround
could be to use `g_serial` and add some support code to the debug
target.

Nico
___
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-le...@coreboot.org


[coreboot] Re: DIY debug Dongle

2019-10-13 Thread Evgeny Zinoviev via coreboot

On 13.10.2019 10:27, Mike Banon wrote:

With a couple of FT232H from china/aliexpress and two USB extension cables
for them
Actually, even just one FT232H plus one USB-UART (pl2303, for example) 
will work.

___
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-le...@coreboot.org


[coreboot] Re: DIY debug Dongle

2019-10-13 Thread Tom Hiller
I do not mean to hijack the question but is a hardware usb to serial 
device required?



The wiki briefly mentions "usb_debug_io.c" with a link to an old trac 
ticket.  Could a second device connected via usb only read the logs?  I 
am curious on the feasibility of attaching an Android phone/tablet with 
an app that could easily read coreboot debug information.


On 10/13/19 3:27 AM, Mike Banon wrote:

Know I'm a bit late, but for me it was much easier to use FT232H-based
USB board as a debug dongle. Initially I also wanted to build that
FX2LP sandwich, but some confusion regarding the revisions (it's a bit
tiresome to ask many sellers for a board revision in advance) and the
need for revision-dependent soldering have scared me off. With a
couple of FT232H from china/aliexpress and two USB extension cables
for them, I didn't need to solder anything except their pin headers,
so it was quite easy for me to get it working with coreboot - just by
enabling CONFIG_USBDEBUG_DONGLE_FTDI_FT232H at its' config. But I
haven't compared what is easier to use from a software side, for
coreboot : FX2LP (which seems to have its' own firmware) or FT232H. It
seems that you don't have a coreboot-supporting board, but maybe you
could still use the sources from /coreboot/src/drivers/usb/gadget.c
for your OS.

On Sun, Oct 13, 2019 at 1:28 AM  wrote:

Hi
I’ve seen an EHCI debug dongle in the old wiki. I’m trying to build one for 2 
purposes: debug a homebrew os/Shell and make it a new UEFI bootloader. However 
I don’t know where to find further documentation or comments about this. I also 
dont’ know what is the current or most up to date schematic to build the 
“sandwich” and what tracks cut and what not. I have bought those blue cypress 
FX2LP boards and I don’t know how to check revisions. Also, I’dont know exactly 
what software can be used to control it. It would be desirable if one can send 
stop or install some breakpoints with Visual studio’s debugger or WinDBG or GDB 
or something like that.
thanks in advance for your advice.

___
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-le...@coreboot.org

___
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-le...@coreboot.org

___
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-le...@coreboot.org


[coreboot] Re: DIY debug Dongle

2019-10-13 Thread Mike Banon
Know I'm a bit late, but for me it was much easier to use FT232H-based
USB board as a debug dongle. Initially I also wanted to build that
FX2LP sandwich, but some confusion regarding the revisions (it's a bit
tiresome to ask many sellers for a board revision in advance) and the
need for revision-dependent soldering have scared me off. With a
couple of FT232H from china/aliexpress and two USB extension cables
for them, I didn't need to solder anything except their pin headers,
so it was quite easy for me to get it working with coreboot - just by
enabling CONFIG_USBDEBUG_DONGLE_FTDI_FT232H at its' config. But I
haven't compared what is easier to use from a software side, for
coreboot : FX2LP (which seems to have its' own firmware) or FT232H. It
seems that you don't have a coreboot-supporting board, but maybe you
could still use the sources from /coreboot/src/drivers/usb/gadget.c
for your OS.

On Sun, Oct 13, 2019 at 1:28 AM  wrote:
>
> Hi
> I’ve seen an EHCI debug dongle in the old wiki. I’m trying to build one for 2 
> purposes: debug a homebrew os/Shell and make it a new UEFI bootloader. 
> However I don’t know where to find further documentation or comments about 
> this. I also dont’ know what is the current or most up to date schematic to 
> build the “sandwich” and what tracks cut and what not. I have bought those 
> blue cypress FX2LP boards and I don’t know how to check revisions. Also, 
> I’dont know exactly what software can be used to control it. It would be 
> desirable if one can send stop or install some breakpoints with Visual 
> studio’s debugger or WinDBG or GDB or something like that.
> thanks in advance for your advice.
>
> ___
> coreboot mailing list -- coreboot@coreboot.org
> To unsubscribe send an email to coreboot-le...@coreboot.org
___
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-le...@coreboot.org