[PATCH 1/1] cmd: improve coninfo output formatting

Simon Glass sjg at chromium.org
Tue Jan 31 15:16:25 CET 2023


Hi Heinrich,

On Sun, 29 Jan 2023 at 13:58, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
>
>
> On 1/28/23 23:01, Simon Glass wrote:
> > On Fri, 27 Jan 2023 at 17:12, Heinrich Schuchardt
> > <heinrich.schuchardt at canonical.com> wrote:
> >>
> >> Device name are typically longer than 8 characters. This leads to ragged
> >> output.
> >> Only the I and O bit of the device flags are of interest for the user.
> >> Writing a hexadecimal number is just confusing.
> >>
> >> Before the patch the output looked like this:
> >>
> >>      => coninfo
> >>      List of available devices:
> >>      pl011 at 9000000 00000007 IO stdin stdout stderr
> >>      serial   00000003 IO
> >>      usbkbd   00000001 I.
> >>
> >> With the patch the output looks like this:
> >>
> >>      => coninfo
> >>      List of available devices
> >>      |-- pl011 at 9000000 (IO)
> >>      |   |-- stdin
> >>      |   |-- stdout
> >>      |   |-- stderr
> >>      |-- serial (IO)
> >>      |-- usbkbd (I)
> >>
> >> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> >> ---
> >>   cmd/console.c | 14 ++++++--------
> >>   1 file changed, 6 insertions(+), 8 deletions(-)
> >
> > Reviewed-by: Simon Glass <sjg at chromium.org>
> >
> > Is there a help update for this?
>
> The online help does not need a change.
>
> But a man-page in the HTML documentation with an example showing
> reassignment of stdios would be helpful.
>
> In drv_system_init() we create a stdio device called "serial". Do we
> need this dummy device if CONFIG_$(SPL_TPL_)DM_SERIAL=y? I find this
> device duplicating the default serial device confusing.

I believe this is the console device for serial and that it is needed.
But please take a look as I may be out of date on that.

Regards,
Simon


More information about the U-Boot mailing list