All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Switching to /dev/ttyX
@ 2011-04-14  7:50 Thomas De Schampheleire
  2011-04-14  9:02 ` Baruch Siach
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Thomas De Schampheleire @ 2011-04-14  7:50 UTC (permalink / raw)
  To: buildroot

Hi,

In /etc/inittab, you have e.g.

tty1::respawn:/sbin/getty 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/usr/bin/tail -f /var/log/messages

By default I'm connected to the board on a serial line, e.g. /dev/ttyS0

My question is: how can I access the other /dev/tty's?
I tried the chvt command, but that does nothing: the command just
completes but nothing changes on the shell.

'tty' always shows /dev/ttyS0.

Thanks,
Thomas

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

* [Buildroot] Switching to /dev/ttyX
  2011-04-14  7:50 [Buildroot] Switching to /dev/ttyX Thomas De Schampheleire
@ 2011-04-14  9:02 ` Baruch Siach
  2011-04-14 22:40 ` Charles Krinke
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Baruch Siach @ 2011-04-14  9:02 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Thu, Apr 14, 2011 at 09:50:17AM +0200, Thomas De Schampheleire wrote:
> My question is: how can I access the other /dev/tty's?
> I tried the chvt command, but that does nothing: the command just
> completes but nothing changes on the shell.
> 
> 'tty' always shows /dev/ttyS0.

You may try conspy, http://www.stuart.id.au/russell/files/conspy/.

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] Switching to /dev/ttyX
  2011-04-14  7:50 [Buildroot] Switching to /dev/ttyX Thomas De Schampheleire
  2011-04-14  9:02 ` Baruch Siach
@ 2011-04-14 22:40 ` Charles Krinke
  2011-04-15  0:04 ` Michael J. Hammel
  2011-04-19 20:25 ` Thomas Petazzoni
  3 siblings, 0 replies; 7+ messages in thread
From: Charles Krinke @ 2011-04-14 22:40 UTC (permalink / raw)
  To: buildroot

What I am currently doing is commenting out the three tty's, tty1, tth2 &
tty3 and then uncommenting ttyS0 in /etc/inittab on the mounted root
filesystem.

I would appreciate some discussion from someone who is familiar with the
location of /etc/inittab in buildroot's build so we could modify it before
the rootfs is created.



On Thu, Apr 14, 2011 at 12:50 AM, Thomas De Schampheleire <
patrickdepinguin+buildroot@gmail.com> wrote:

> Hi,
>
> In /etc/inittab, you have e.g.
>
> tty1::respawn:/sbin/getty 38400 tty1
> tty2::respawn:/sbin/getty 38400 tty2
> tty3::respawn:/usr/bin/tail -f /var/log/messages
>
> By default I'm connected to the board on a serial line, e.g. /dev/ttyS0
>
> My question is: how can I access the other /dev/tty's?
> I tried the chvt command, but that does nothing: the command just
> completes but nothing changes on the shell.
>
> 'tty' always shows /dev/ttyS0.
>
> Thanks,
> Thomas
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>



-- 
Charles Krinke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110414/7f2f70d1/attachment.html>

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

* [Buildroot] Switching to /dev/ttyX
  2011-04-14  7:50 [Buildroot] Switching to /dev/ttyX Thomas De Schampheleire
  2011-04-14  9:02 ` Baruch Siach
  2011-04-14 22:40 ` Charles Krinke
@ 2011-04-15  0:04 ` Michael J. Hammel
  2011-04-18  8:34   ` Thomas De Schampheleire
  2011-04-19 20:25 ` Thomas Petazzoni
  3 siblings, 1 reply; 7+ messages in thread
From: Michael J. Hammel @ 2011-04-15  0:04 UTC (permalink / raw)
  To: buildroot

On Thu, 2011-04-14 at 09:50 +0200, Thomas De Schampheleire wrote:
> In /etc/inittab, you have e.g.
> tty1::respawn:/sbin/getty 38400 tty1
> tty2::respawn:/sbin/getty 38400 tty2
> tty3::respawn:/usr/bin/tail -f /var/log/messages
> By default I'm connected to the board on a serial line, e.g. /dev/ttyS0
> My question is: how can I access the other /dev/tty's?

tty's are controlling terminals for processes.  They need to be attached
to a vc (virtual console) to use chvt.  vc's require a display device,
like an LCD monitor.  Not positive 'bout that last part, but its
something like that.  You can read more about tty's and related devices
here: http://tldp.org/HOWTO/Text-Terminal-HOWTO-7.html

If you're just looking for multiple terminal sessions to work with you
can try running "screen" on your serial port connection.  That will give
you any number of extra terminal sessions.  I'm not a screen expert so
can't say if logins (getty's) are possible on those other screen
sessions.  But use of screen on serial port connections is very common
with embedded development.  I also use it on my desktop so that
cross-compiled builds I start at home can be viewed from work by
attaching the the running screen session.  Very handy.  And easy to use.

> 'tty' always shows /dev/ttyS0.

That command only shows the terminal connected to the standard input,
which would be the one you typed the command on.

-- 
Michael J. Hammel <buildroot@graphics-muse.org>

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

* [Buildroot] Switching to /dev/ttyX
  2011-04-15  0:04 ` Michael J. Hammel
@ 2011-04-18  8:34   ` Thomas De Schampheleire
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas De Schampheleire @ 2011-04-18  8:34 UTC (permalink / raw)
  To: buildroot

On Fri, Apr 15, 2011 at 2:04 AM, Michael J. Hammel
<buildroot@graphics-muse.org> wrote:
> On Thu, 2011-04-14 at 09:50 +0200, Thomas De Schampheleire wrote:
>> In /etc/inittab, you have e.g.
>> tty1::respawn:/sbin/getty 38400 tty1
>> tty2::respawn:/sbin/getty 38400 tty2
>> tty3::respawn:/usr/bin/tail -f /var/log/messages
>> By default I'm connected to the board on a serial line, e.g. /dev/ttyS0
>> My question is: how can I access the other /dev/tty's?
>
> tty's are controlling terminals for processes. ?They need to be attached
> to a vc (virtual console) to use chvt. ?vc's require a display device,
> like an LCD monitor. ?Not positive 'bout that last part, but its
> something like that. ?You can read more about tty's and related devices
> here: http://tldp.org/HOWTO/Text-Terminal-HOWTO-7.html

Then why are different tty's used? If you specify no tty, the default
/dev/console is used. Isn't that enough? Or maybe that's because these
processes should run in parallel?

Still, there must be some standard way to access tty1 or tty2,
otherwise it seems useless to start a getty there!
Conspy is interesting, but not included in buildroot, so I sense there
should be an easier way...

>
> If you're just looking for multiple terminal sessions to work with you
> can try running "screen" on your serial port connection. ?That will give
> you any number of extra terminal sessions. ?I'm not a screen expert so
> can't say if logins (getty's) are possible on those other screen
> sessions. ?But use of screen on serial port connections is very common
> with embedded development. ?I also use it on my desktop so that
> cross-compiled builds I start at home can be viewed from work by
> attaching the the running screen session. ?Very handy. ?And easy to use.
>
>> 'tty' always shows /dev/ttyS0.
>
> That command only shows the terminal connected to the standard input,
> which would be the one you typed the command on.

Thanks,
Thomas

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

* [Buildroot] Switching to /dev/ttyX
  2011-04-14  7:50 [Buildroot] Switching to /dev/ttyX Thomas De Schampheleire
                   ` (2 preceding siblings ...)
  2011-04-15  0:04 ` Michael J. Hammel
@ 2011-04-19 20:25 ` Thomas Petazzoni
  2011-04-20  1:48   ` Charles Krinke
  3 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2011-04-19 20:25 UTC (permalink / raw)
  To: buildroot

Hi,

On Thu, 14 Apr 2011 09:50:17 +0200
Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> wrote:

> tty1::respawn:/sbin/getty 38400 tty1
> tty2::respawn:/sbin/getty 38400 tty2
> tty3::respawn:/usr/bin/tail -f /var/log/messages
> 
> By default I'm connected to the board on a serial line, e.g. /dev/ttyS0
> 
> My question is: how can I access the other /dev/tty's?

I don't think you easily can. I'm not really a fan of those default
settings. Maybe we should just get rid of them, and keep a single getty
on the terminal port configured through menuconfig ?

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] Switching to /dev/ttyX
  2011-04-19 20:25 ` Thomas Petazzoni
@ 2011-04-20  1:48   ` Charles Krinke
  0 siblings, 0 replies; 7+ messages in thread
From: Charles Krinke @ 2011-04-20  1:48 UTC (permalink / raw)
  To: buildroot

That would seem reasonable to me. Currently I am commenting out tty1..3 and
uncommenting ttyS0 on both my glibc and uclibc roots to get things boting.
On Apr 19, 2011 1:25 PM, "Thomas Petazzoni" <
thomas.petazzoni@free-electrons.com> wrote:
> Hi,
>
> On Thu, 14 Apr 2011 09:50:17 +0200
> Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> wrote:
>
>> tty1::respawn:/sbin/getty 38400 tty1
>> tty2::respawn:/sbin/getty 38400 tty2
>> tty3::respawn:/usr/bin/tail -f /var/log/messages
>>
>> By default I'm connected to the board on a serial line, e.g. /dev/ttyS0
>>
>> My question is: how can I access the other /dev/tty's?
>
> I don't think you easily can. I'm not really a fan of those default
> settings. Maybe we should just get rid of them, and keep a single getty
> on the terminal port configured through menuconfig ?
>
> Regards,
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110419/f7c5e3d8/attachment.html>

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

end of thread, other threads:[~2011-04-20  1:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-14  7:50 [Buildroot] Switching to /dev/ttyX Thomas De Schampheleire
2011-04-14  9:02 ` Baruch Siach
2011-04-14 22:40 ` Charles Krinke
2011-04-15  0:04 ` Michael J. Hammel
2011-04-18  8:34   ` Thomas De Schampheleire
2011-04-19 20:25 ` Thomas Petazzoni
2011-04-20  1:48   ` Charles Krinke

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.