简体   繁体   中英

no VT driver in linux /proc/tty/drivers

I was trying to access a VT (eg /dev/tty1) on my android phone (Xiaomi Mi MIX, Lithium) when i noticed that the device file wasn't there, so i created it with mknod /dev/tty1 c 4 1 and then tried to access it with both of busybox's chvt and openvt which gave me and error saying No such device or address

This made me feel like VTs were disabled in the kernel, and i ran cat /proc/tty/drivers and noticed that there was no driver for major 4 minor 1-63. So, being pretty inexperienced with the kernel i'm wondering how i can add a tty drivers. Do i have to recompile the kernel and set som flag to enable ttys? Or can i enable it permanently or temporarily after booting the system?

tl;dr How can i enable VT drivers? Do i have to recompile kernel?

After going through the source code and double checking with documentation references i'm sure that i have to recompile the kernel. The flags CONFIG_VT and CONFIG_TTY have to be set, which they are not in most modern android kernels. When doing this, i found that version 3.18 doesn't really play nice with gcc>4.9 and that there were multiple include path errors which had to be resolved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM