Sample Header Ad - 728x90

Grub2 serial terminal over USB ACM

1 vote
1 answer
89 views
I am trying to use a usb cable from a Raspberry (in peripheral mode, serial CDC ACM) to a PC to access GRUB2 serial console (on the PC). I succeeded with a pl2303 usb ttl adapter, the usbserial_pl2303 module in grub works ok. But what I want is instead to use directly a usb cable in what is called "usb gadget". I correctly configured the Raspberry to act like a peripheral, both with the g_serial module and the libcomposite module. After the PC starts it sees the Raspberry as a "CDC Abstract Control Model" and I can use the "serial" connection on /dev/ttyACM0. It works with both g_serial and libcomposite. But only AFTER the PC starts. It does not work in GRUB. I tried to enable all the 3 grub usbserial modules (usbserial_pl2303, usbserial_ftdi, usbserial_usbdebug) but terminfo and terminal_output do not show any new terminal. The grub command "usb" shows the connected usb "device" (i.e. the Raspberry) as a "CDC Abstract Control Model" but clearly it is not able to use it as a serial terminal. Again, if I connect the usb pl2303 adapter to the PC, grub sees it and I can connect to grub serial console. So my question is: how can I convince GRUB2 to see the CDC ACM "serial" port and use it as a terminal?
Asked by Kzar (111 rep)
Mar 2, 2025, 08:47 PM
Last activity: Mar 3, 2025, 06:19 AM