Hi Matthew,
>Could you not setup different run levels? The default run level could
>use the serial port for console (which runs getty on it). You could have
>another init level setup that doesn't have getty running on the serial
>port. Switch between the run levels via init #. Or you could not have
>init handle starting getty on the serial port. Instead, you could have a
>boot script start getty but then you kill it when you want to use it for
>something else.
Thanks for your suggestion.
I use standard busybox init which does not use runlevels. getty is not started
on the
serial console. When I type ps I get the following:
PID USER VSZ STAT COMMAND
1 root 1812 S init
2 root 0 SW [keventd]
3 root 0 SWN [ksoftirqd_CPU0]
4 root 0 SW [kswapd]
5 root 0 SW [bdflush]
6 root 0 SW [kupdated]
7 root 0 SW [mtdblockd]
14 root 1804 S klogd
70 root 0 SW [rpciod]
73 root 1832 S udhcpc -i eth1 -p /etc/udhcpc/udhcpc-eth1.pid -s /usr
76 root 1808 S /usr/sbin/inetd
77 root 1816 S /bin/sh
79 root 1808 R ps
When I type cat /proc/tty/drivers I get as following:
serial /dev/cua 5 64-65 serial:callout
serial /dev/ttyS 4 64-65 serial
pty_slave /dev/pts 136 0-255 pty:slave
pty_master /dev/ptm 128 0-255 pty:master
pty_slave /dev/ttyp 3 0-255 pty:slave
pty_master /dev/pty 2 0-255 pty:master
/dev/ptmx /dev/ptmx 5 2 system
/dev/console /dev/console 5 1 system:console
/dev/tty /dev/tty 5 0 system:/dev/tty
It is somehow interesting to see:
/dev/console /dev/console 5 1 system:console
My /dev/console has however major and minor numbers the same
as /dev/ttyS0:
/dev/ttyS0 4 64
When I use the command setconsole:
setconsole /dev/ttyS0 #I get no error first time
setconsole /dev/ttyS0 #when I type it 2nd .... times I get
-> setconsole: ioctl 0x80047478 failed: Device or
resource busy
I have spent some time to search on the net for the solution and still without
any success.
Any suggestion?
Best Regards
Mirek
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox