Redirecting stdout, stderr to pty0?
Hello!
I'm really not a Linux expert and I'm not using it on day to day basic. At work I'm working on embedded device running Linux.
Platform:
MIPS32, 4MB Flash, 16MB Ram
bootloader: uBoot
OS: Linux 2.4.31
BusyBox 1.1.3
We are connecting to the box via serial port RS-232 cable. I was assigned to write driver for the add-on module which also connects to the embedded device via serial port. Problem is we don't have 2 serial ports on the embedded device, but just one. It's not a problem because I installed telnet daemon and now I'm connecting to the device from the PC by telnet and port is free to be used by add-on module. Problem is that while developing device driver I use a lot of printk function and these printouts go to the serial console!
Can somebody tell me or direct me on how to redirect kernel printouts to the /pts device? I know that pts device is created until new telnet client connects, but would it be possible to compile Linux kernel in such a way that while /dev/pts/0 device is not present all printouts should go to the /dev/null device and if /dev/pts/0 is present, printouts are redirected to the /dev/pts/0 device.
As a matter of fact where do I select where do Linux kernel default stdout, stderr streams go?
Thanks a lot for all the help you can give me.
Best regards,