printf, console and terminal
Hi,
I m porting to linux to a custom architecture. I have added a system console to get the printk from kernel. However, I am not able to get user space prints working. I have few questions on this area. 1. How console is related to tty? Do I need to write a new tty driver for my custom architecture. 2. I know printf get directed to stdin/stdout. But what is the relation between tty and these files. How would I know the printf data will call write method of my tty device. 3. In general can someone explain relation between printf->stdin/out->tty->console to me. |
Have you tried writing to /dev/console?
|
I did not write to /dev/console explicitly. I want printf to work as it is. I found stdout/stdin are directed to /dev/pty. Who does this redirection?
|
Quote:
|
Is there a way to find out which tty will be linked to printf by default? I want to check it before compiling the kernel.
|
The definition of /dev/tty is the current terminal a process is running in.
Code:
5 char Alternate TTY devices |
All times are GMT -5. The time now is 01:20 AM. |