Does register_chrdev function make device file under /dev ?

Kim Chan ckim at etri.re.kr
Wed Mar 12 09:24:58 EDT 2014


Hi, Valdis,
Yes, I understand shell is a user program.
I just added some uart print to see what's happening. (while trying to open a shell on LCD using USB keyboard..)
When I see it n fbcon_scroll function(one of console switch functions which connect to bit blit functions)(in drivers/video/console/fbcon.c) while some printks are scrolled up on the LCD, the vc_data is using tty null (vc->port.tty->name is null) then at some point changes to tty1. This is even when I set "console=tty0 " in the boot argument. When I set "console=tty1 ", it's the same. This is when I remvoed /etc/inittab file so that defulat inittab is put in place by busybox... I understand busybox init starts shells on tty2,tty3,and tty4. So the output is using tty1.
In input side, when I use print (to uart) on kbd_keycoad function(drivers/tty/vt/keyboard.c), and press any key, I can see the vc->port.tty->name is tty1. (vc is of type vc_data). So the input is connected to tty1 (same as output). But I don't see any change on the LCD at that state (as I press the keyboard).
Any idea? any suggestion will be appreciated. I don't know how to assign tty and how to make the fbconsole(or vc on it) to appear on the LCD so to speak.
regards,
Chan

_______________________________________________

Kernelnewbies mailing list

Kernelnewbies at kernelnewbies.org<mailto:Kernelnewbies at kernelnewbies.org>

http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

________________________________
From : "Valdis.Kletnieks at vt.edu" <Valdis.Kletnieks at vt.edu>
Sent : 2014-03-12 21:14:49 ( +09:00 )
To : Kim Chan <ckim at etri.re.kr>
Cc : Kernel <bu.kernel at gmail.com>, kernelnewbies at kernelnewbies.org <kernelnewbies at kernelnewbies.org>
Subject : Re: Does register_chrdev function make device file under /dev ?

On Tue, 11 Mar 2014 08:01:26 -0000, Kim Chan said:

> To my understanding, device file is needed when a user program wants to
> access the device and we don't need to generate the device file for us to use
> the device in kernel. Is my understanding correct?

Right. You don't need to generate the device file because you shouldn't be
accessing the device in a file-like manner from inside the kernel.

> I am trying to open a shell on my LCD (is it going to be tty2

That's userspace, not kernel access.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140312/dd681ea9/attachment-0001.html 


More information about the Kernelnewbies mailing list