[PATCH 3/3] cmd: add acmconsole command

Pali Rohár pali at kernel.org
Mon Sep 27 22:04:10 CEST 2021


On Thursday 19 August 2021 13:13:06 Loic Poulain wrote:
> This command allows to start CDC ACM function and redirect console
> (stdin, stdout, stderr) to USB (acmconsole start). The console can
> then be accessed through the USB host for debugging purpose. The
> host can stop the session (acmconsole stop) to revert back console
> to serial and unregister CDC ACM USB function.

Hello!

Could you rather implement this CDC ACM gadget in a way that calling
'setenv stdout cdc_acm' (or 'setenv stdout usbtty') would do this
console redirect? Like it is supported for current usbtty or vga output
code.

Then this acmconsole command would not be needed at all.

Nokia N900 uses usbtty and has in its default env defined:

   "stdin=usbtty,serial,vga\0"
   "stdout=usbtty,serial,vga\0"
   "stderr=usbtty,serial,vga\0"

With this configuration, U-Boot console is automatically activated on
usbtty, serial console and also on vga display. And no additional
command is needed. U-Boot console works on all "outputs" at the same
time.


More information about the U-Boot mailing list