Howto redirect serial console

Matthew Hiles matthew.hiles at gmail.com
Sat Jun 20 21:32:49 UTC 2009


Dach Miroslaw wrote:
> Hi Baruch,
>
> Thanks for your hint. Your solution refers to the change of the command line arguments 
> used at boot-up. I am however looking for a possibility to redirect console device at run time.
>
> Best Regards
>
> Mirek
>
>
>
>
> -----Original Message-----
> From: Baruch Siach [mailto:baruch at tkos.co.il]
> Sent: Sat 6/20/2009 8:30 PM
> To: Dach Miroslaw
> Cc: busybox at busybox.net
> Subject: Re: Howto redirect serial console
>  
> Hi Dach,
>
> On Sat, Jun 20, 2009 at 08:01:21PM +0200, Dach Miroslaw wrote:
>   
>> I have a ppc405 based board with one serial interface which I use as a console.
>> I would like to redirect or suppress, at run time, the console in order to use the
>> serial port to control external serial devices.
>>
>> I have tried (busybox) setconsole program to redirect the console to /dev/null
>> but it did not work. What would be the elegant way to redirect or suppress the serial console.
>>     
>
> I encountered a similar situation before. My solution was to pass console=tty1 
> to the kernel.
>
> baruch
>
>   
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.

~Matthew


More information about the busybox mailing list