Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

12
  • Should be created nodes for both mtdblockX and mtdX devices? Also, not clear about TTY devices. Commented Dec 4, 2017 at 13:00
  • @triwo tty is only a character device, in its functionality is it essentially a socket, extended with some terminal-controlling ioctl()-s. There is a "tty driver" in the kernel, it registers the ttys with a register_char_device(4) (or similar, check the source) call. From that point, the open/close/read/write/ioctl and similar calls to character device files with major number 4 will be implemented by the tty driver. The tty driver handles the character console of the Linux kernel. There is also a pts driver, its major number is 136, it is mainly for the daemons, like sshd. Commented Dec 4, 2017 at 13:08
  • @triwo From the ttys I wrote more here. | mtd & mtdblock: I don't know the details. But: It is quite possible that a driver registers multiple block major numbers. Typically they mean different functionality: for example, in kernels until ca. 2.2, /dev/sr0 (block major 11) meaned an scsi cdrom, while /dev/sg0(block major 21) was a generic scsi device. The scsi cdrom driver used both. I think some similar could happen also in the mtd / mtdblock line. Commented Dec 4, 2017 at 13:14
  • @triwo The kernel core doesn't know anything about the path/filename of the device files, it see only block/char and major/minor numbers. The device files below /dev are normally created by the userspace tool named udev, but from the view of the kernel, it is not a requirement. The kernel can see a table of major numbers and that which driver belongs to them. Commented Dec 4, 2017 at 13:19
  • I added mtd & mtdblock commands to the topic. Which version for mtd chars should I use? Commented Dec 5, 2017 at 11:12