All of lore.kernel.org
 help / color / mirror / Atom feed
* Switching among serial consoles
@ 2020-03-18  8:48 Michal Simek
  2020-03-20 18:26 ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Simek @ 2020-03-18  8:48 UTC (permalink / raw)
  To: u-boot

Hi,

long time ago I was playing with switching among consoles.
I have two IPs with the same driver where main console is probed and
used which is visible via dm tree.

 serial        1  [ + ]   serial_zynq           |   |-- serial at ff000000
 serial        2  [   ]   serial_zynq           |   |-- serial at ff010000

then I have also dcc which can be also used as a console

 serial        0  [   ]   arm_dcc               |-- dcc

Lastly I have enabled netconsole feature.

I have no problem to switch between serial at ff000000 and nc but I can't
switch it to dcc or second instance.

dhcp
setenv ncip 192.168.0.105
setenv nc 'setenv stdout nc;setenv stdin nc'
setenv dcc 'setenv stdout dcc;setenv stdin dcc'
setenv serial0 'setenv stdout serial at ff000000;setenv stdin serial at ff000000'
setenv serial1 'setenv stdout serial at ff010000;setenv stdin serial at ff010000'
run nc

and then via netconsole

run serial0

works to get back.


Console info is showing only available and registered instances.

ZynqMP> con
List of available devices:
serial at ff000000 00000007 IO
serial   00000003 IO stdin stdout stderr
nulldev  00000003 IO
nc       00000003 IO

It means the question is how to probe second instance of serial_zynq
serial at ff010000 and dcc. I expect when probe is done it will show up in
console list and switch is possible.

I found SERIAL_SEARCH_ALL symbol but it is just search not probe.

I am quite sure that it was working in past but not sure if this was
before DM but I would like to know how you are doing it/testing it today.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Switching among serial consoles
  2020-03-18  8:48 Switching among serial consoles Michal Simek
@ 2020-03-20 18:26 ` Tom Rini
  2020-03-23 15:36   ` Simon Glass
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Rini @ 2020-03-20 18:26 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 18, 2020 at 09:48:36AM +0100, Michal Simek wrote:
> Hi,
> 
> long time ago I was playing with switching among consoles.
> I have two IPs with the same driver where main console is probed and
> used which is visible via dm tree.
> 
>  serial        1  [ + ]   serial_zynq           |   |-- serial at ff000000
>  serial        2  [   ]   serial_zynq           |   |-- serial at ff010000
> 
> then I have also dcc which can be also used as a console
> 
>  serial        0  [   ]   arm_dcc               |-- dcc
> 
> Lastly I have enabled netconsole feature.
> 
> I have no problem to switch between serial at ff000000 and nc but I can't
> switch it to dcc or second instance.
> 
> dhcp
> setenv ncip 192.168.0.105
> setenv nc 'setenv stdout nc;setenv stdin nc'
> setenv dcc 'setenv stdout dcc;setenv stdin dcc'
> setenv serial0 'setenv stdout serial at ff000000;setenv stdin serial at ff000000'
> setenv serial1 'setenv stdout serial at ff010000;setenv stdin serial at ff010000'
> run nc
> 
> and then via netconsole
> 
> run serial0
> 
> works to get back.
> 
> 
> Console info is showing only available and registered instances.
> 
> ZynqMP> con
> List of available devices:
> serial at ff000000 00000007 IO
> serial   00000003 IO stdin stdout stderr
> nulldev  00000003 IO
> nc       00000003 IO
> 
> It means the question is how to probe second instance of serial_zynq
> serial at ff010000 and dcc. I expect when probe is done it will show up in
> console list and switch is possible.
> 
> I found SERIAL_SEARCH_ALL symbol but it is just search not probe.
> 
> I am quite sure that it was working in past but not sure if this was
> before DM but I would like to know how you are doing it/testing it today.

I think the answer is we don't have any tests for multiple consoles to
start with, so it's not tested.  I'd start by grabbing an old platform
and bisect'ing back the years to see when it did last work as the first
thing.  Sorry!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200320/b5ba9701/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Switching among serial consoles
  2020-03-20 18:26 ` Tom Rini
@ 2020-03-23 15:36   ` Simon Glass
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Glass @ 2020-03-23 15:36 UTC (permalink / raw)
  To: u-boot

Hi,

On Fri, 20 Mar 2020 at 12:26, Tom Rini <trini@konsulko.com> wrote:
>
> On Wed, Mar 18, 2020 at 09:48:36AM +0100, Michal Simek wrote:
> > Hi,
> >
> > long time ago I was playing with switching among consoles.
> > I have two IPs with the same driver where main console is probed and
> > used which is visible via dm tree.
> >
> >  serial        1  [ + ]   serial_zynq           |   |-- serial at ff000000
> >  serial        2  [   ]   serial_zynq           |   |-- serial at ff010000
> >
> > then I have also dcc which can be also used as a console
> >
> >  serial        0  [   ]   arm_dcc               |-- dcc
> >
> > Lastly I have enabled netconsole feature.
> >
> > I have no problem to switch between serial at ff000000 and nc but I can't
> > switch it to dcc or second instance.
> >
> > dhcp
> > setenv ncip 192.168.0.105
> > setenv nc 'setenv stdout nc;setenv stdin nc'
> > setenv dcc 'setenv stdout dcc;setenv stdin dcc'
> > setenv serial0 'setenv stdout serial at ff000000;setenv stdin serial at ff000000'
> > setenv serial1 'setenv stdout serial at ff010000;setenv stdin serial at ff010000'
> > run nc
> >
> > and then via netconsole
> >
> > run serial0
> >
> > works to get back.
> >
> >
> > Console info is showing only available and registered instances.
> >
> > ZynqMP> con
> > List of available devices:
> > serial at ff000000 00000007 IO
> > serial   00000003 IO stdin stdout stderr
> > nulldev  00000003 IO
> > nc       00000003 IO
> >
> > It means the question is how to probe second instance of serial_zynq
> > serial at ff010000 and dcc. I expect when probe is done it will show up in
> > console list and switch is possible.
> >
> > I found SERIAL_SEARCH_ALL symbol but it is just search not probe.
> >
> > I am quite sure that it was working in past but not sure if this was
> > before DM but I would like to know how you are doing it/testing it today.
>
> I think the answer is we don't have any tests for multiple consoles to
> start with, so it's not tested.  I'd start by grabbing an old platform
> and bisect'ing back the years to see when it did last work as the first
> thing.  Sorry!

Note there is special logic in stdio_get_by_name() for vidconsole (so
when you say 'setenv stdout vidconsole' it probes the video). It might
need another look, or need to be generalised.

Regards,
Simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-23 15:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-18  8:48 Switching among serial consoles Michal Simek
2020-03-20 18:26 ` Tom Rini
2020-03-23 15:36   ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.