20220310在MT6739的android8.1下增加VT设备tty1
20220310在MT6739的android8.1下增加VT设备tty1
2022/3/10 10:21
需求:鸿蒙(Openharmony3.1 beta)下需要使用MT6739的设备节点:/dev/tty1。
于是先在MT6739的android8.1下验证了。
OS:android8.1
内核:linux-4.4(SDK里面同时有linx-3.18)
1、你在X:\mt6739_android8.1\kernel-4.4
这个目录下是找不到编译成成的.config文件的!
好奇怪!我以前做的Rockchip的RK3399/RK3568,全志的A64等等平台都会在内核下面有.config文件的。
rootroot@rootroot-desktop:/home/rootroot/mt6739_android8.1$
rootroot@rootroot-desktop:/home/rootroot/mt6739_android8.1$ find . -name .config
./external/toybox/.config
./out/target/product/k39tv1_bsp_1g/obj/KERNEL_OBJ/.config
rootroot@rootroot-desktop:/home/rootroot/mt6739_android8.1$
rootroot@rootroot-desktop:/home/rootroot/mt6739_android8.1$
很容易发现CONFIG_VT没有打开:
(搜索:TTY)
#
# Character devices
#
CONFIG_TTY=y
# CONFIG_VT is not set
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=16
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_N_GSM is not set
# CONFIG_TRACE_SINK is not set
# CONFIG_DEVMEM is not set
# CONFIG_DEVKMEM is not set
2、很容易/很不容易(根据您的熟练程序)定位到:
X:\mt6739_android8.1\kernel-4.4\arch\arm\configs\k39tv1_bsp_1g_debug_defconfig
根据你对MTK的平台(MT6739)和操作系统(Android8.1)的熟练程度绝对你花费时间的多少。
在# CONFIG_VT is not set 这一行下面增加:
CONFIG_GTP_CREATE_WR_NODE=y
CONFIG_GTP_POWER_CTRL_SLEEP=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_UINPUT=y
# CONFIG_VT is not set
CONFIG_TTY=y
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_VT_CONSOLE_SLEEP=y
CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y
CONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_LDISC_AUTOLOAD=y
CONFIG_LEGACY_PTY_COUNT=16
# CONFIG_DEVMEM is not set
# CONFIG_DEVKMEM is not set
# CONFIG_HW_RANDOM is not set
CONFIG_SPI=y
CONFIG_SPI_MT65XX=y
patch的内容:
2208 CONFIG_TTY=y
2209 CONFIG_VT=y
2210 CONFIG_CONSOLE_TRANSLATIONS=y
2211 CONFIG_VT_CONSOLE=y
2212 CONFIG_VT_CONSOLE_SLEEP=y
2213 CONFIG_HW_CONSOLE=y
2214 CONFIG_VT_HW_CONSOLE_BINDING=y
2215 CONFIG_UNIX98_PTYS=y
2216 # CONFIG_LEGACY_PTYS is not set
2217 CONFIG_LDISC_AUTOLOAD=y
3、悄悄滴告诉你,我找到k39tv1_bsp_1g_debug_defconfig是很不容易的。
我使用的是grep查找的:
rootroot@rootroot-desktop:/home/rootroot/mt6739_android8.1$ grep CONFIG_VT . -R
D:\39_O1\kernel-4.4\drivers\tty\Kconfig
Y:\mt6739_android8.1\kernel-4.4\drivers\tty\Kconfig
config VT
bool "Virtual terminal" if EXPERT
depends on !S390 && !UML
select INPUT
default y
---help---
If you say Y here, you will get support for terminal devices with
display and keyboard devices. These are called "virtual" because you
can run several virtual terminals (also called virtual consoles) on
one physical terminal. This is rather useful, for example one
virtual terminal can collect system messages and warnings, another
one can be used for a text-mode user session, and a third could run
an X session, all in parallel. Switching between virtual terminals
is done with certain key combinations, usually Alt-<function key>.
The setterm command ("man setterm") can be used to change the
properties (such as colors or beeping) of a virtual terminal. The
man page console_codes(4) ("man console_codes") contains the special
character sequences that can be used to change those properties
directly. The fonts used on virtual terminals can be changed with
the setfont ("man setfont") command and the key bindings are defined
with the loadkeys ("man loadkeys") command.
You need at least one virtual terminal device in order to make use
of your keyboard and monitor. Therefore, only people configuring an
embedded system would want to say N here in order to save some
memory; the only way to log into such a system is then via a serial
or network connection.
If unsure, say Y, or else you won't be able to do much with your new
shiny Linux system :-)
想办法修改Kconfig打开config VT。没用!
最后是偶然的机会找到:k39tv1_bsp_1g_debug_defconfig了。
4、确认:
D:\39_O1\out\target\product\k39tv1_bsp_1g\obj\KERNEL_OBJ\.config
(编译进去了!)
# CONFIG_SERIO_ARC_PS2 is not set
# CONFIG_SERIO_APBPS2 is not set
# CONFIG_USERIO is not set
# CONFIG_GAMEPORT is not set
#
# Character devices
#
CONFIG_TTY=y
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_VT_CONSOLE_SLEEP=y
CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
# CONFIG_LEGACY_PTYS is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_N_GSM is not set
# CONFIG_TRACE_SINK is not set
# CONFIG_DEVMEM is not set
# CONFIG_DEVKMEM is not set
#
# Serial drivers
#
# CONFIG_SERIAL_8250 is not set
串口:
k39tv1_bsp_1g:/ $ su
k39tv1_bsp_1g:/ # echo "0 0 0 0" > /proc/sys/kernel/printk
k39tv1_bsp_1g:/ #
k39tv1_bsp_1g:/ # cd /dev
k39tv1_bsp_1g:/dev # ls -l tty*
crw-rw-rw- 1 root root 5, 0 2022-03-04 09:37 tty
crw-rw---- 1 root system 4, 0 2022-03-04 09:37 tty0
crw------- 1 root root 4, 1 2022-03-04 09:37 tty1
crw------- 1 root root 4, 10 2022-03-04 09:37 tty10
crw------- 1 root root 4, 11 2022-03-04 09:37 tty11
crw------- 1 root root 4, 12 2022-03-04 09:37 tty12
crw------- 1 root root 4, 13 2022-03-04 09:37 tty13
crw------- 1 root root 4, 14 2022-03-04 09:37 tty14
crw------- 1 root root 4, 15 2022-03-04 09:37 tty15
crw------- 1 root root 4, 16 2022-03-04 09:37 tty16
crw------- 1 root root 4, 17 2022-03-04 09:37 tty17
crw------- 1 root root 4, 18 2022-03-04 09:37 tty18
crw------- 1 root root 4, 19 2022-03-04 09:37 tty19
crw------- 1 root root 4, 2 2022-03-04 09:37 tty2
crw------- 1 root root 4, 20 2022-03-04 09:37 tty20
crw------- 1 root root 4, 21 2022-03-04 09:37 tty21
crw------- 1 root root 4, 22 2022-03-04 09:37 tty22
crw------- 1 root root 4, 23 2022-03-04 09:37 tty23
crw------- 1 root root 4, 24 2022-03-04 09:37 tty24
crw------- 1 root root 4, 25 2022-03-04 09:37 tty25
crw------- 1 root root 4, 26 2022-03-04 09:37 tty26
crw------- 1 root root 4, 27 2022-03-04 09:37 tty27
crw------- 1 root root 4, 28 2022-03-04 09:37 tty28
crw------- 1 root root 4, 29 2022-03-04 09:37 tty29
crw------- 1 root root 4, 3 2022-03-04 09:37 tty3
crw------- 1 root root 4, 30 2022-03-04 09:37 tty30
crw------- 1 root root 4, 31 2022-03-04 09:37 tty31
crw------- 1 root root 4, 32 2022-03-04 09:37 tty32
crw------- 1 root root 4, 33 2022-03-04 09:37 tty33
crw------- 1 root root 4, 34 2022-03-04 09:37 tty34
crw------- 1 root root 4, 35 2022-03-04 09:37 tty35
crw------- 1 root root 4, 36 2022-03-04 09:37 tty36
crw------- 1 root root 4, 37 2022-03-04 09:37 tty37
crw------- 1 root root 4, 38 2022-03-04 09:37 tty38
crw------- 1 root root 4, 39 2022-03-04 09:37 tty39
crw------- 1 root root 4, 4 2022-03-04 09:37 tty4
crw------- 1 root root 4, 40 2022-03-04 09:37 tty40
crw------- 1 root root 4, 41 2022-03-04 09:37 tty41
crw------- 1 root root 4, 42 2022-03-04 09:37 tty42
crw------- 1 root root 4, 43 2022-03-04 09:37 tty43
crw------- 1 root root 4, 44 2022-03-04 09:37 tty44
crw------- 1 root root 4, 45 2022-03-04 09:37 tty45
crw------- 1 root root 4, 46 2022-03-04 09:37 tty46
crw------- 1 root root 4, 47 2022-03-04 09:37 tty47
crw------- 1 root root 4, 48 2022-03-04 09:37 tty48
crw------- 1 root root 4, 49 2022-03-04 09:37 tty49
crw------- 1 root root 4, 5 2022-03-04 09:37 tty5
crw------- 1 root root 4, 50 2022-03-04 09:37 tty50
crw------- 1 root root 4, 51 2022-03-04 09:37 tty51
crw------- 1 root root 4, 52 2022-03-04 09:37 tty52
crw------- 1 root root 4, 53 2022-03-04 09:37 tty53
crw------- 1 root root 4, 54 2022-03-04 09:37 tty54
crw------- 1 root root 4, 55 2022-03-04 09:37 tty55
crw------- 1 root root 4, 56 2022-03-04 09:37 tty56
crw------- 1 root root 4, 57 2022-03-04 09:37 tty57
crw------- 1 root root 4, 58 2022-03-04 09:37 tty58
crw------- 1 root root 4, 59 2022-03-04 09:37 tty59
crw------- 1 root root 4, 6 2022-03-04 09:37 tty6
crw------- 1 root root 4, 60 2022-03-04 09:37 tty60
crw------- 1 root root 4, 61 2022-03-04 09:37 tty61
crw------- 1 root root 4, 62 2022-03-04 09:37 tty62
crw------- 1 root root 4, 63 2022-03-04 09:37 tty63
crw------- 1 root root 4, 7 2022-03-04 09:37 tty7
crw------- 1 root root 4, 8 2022-03-04 09:37 tty8
crw------- 1 root root 4, 9 2022-03-04 09:37 tty9
crw-rw---- 1 system radio 236, 0 2022-03-04 09:37 ttyGS0
crw-rw---- 1 system radio 236, 1 2022-03-04 09:37 ttyGS1
crw-rw---- 1 bluetooth bluetooth 236, 2 2022-03-04 09:37 ttyGS2
crw-rw---- 1 system radio 236, 3 2022-03-04 09:37 ttyGS3
crw------- 1 root root 204, 209 2022-03-04 09:37 ttyMT0
crw-rw---- 1 system system 204, 210 2022-03-04 09:37 ttyMT1
k39tv1_bsp_1g:/dev #
20220310在MT6739的android8.1下增加VT设备tty1相关推荐
- 20220316在MT6739的android10下增加VT设备tty1
20220316在MT6739的android10下增加VT设备tty1 2022/3/16 16:08 1.完整编译MT6739的android10: time(./oneCmdMake 9186T ...
- 20220322在MT6739的android8.1下增加ll命令
20220322在MT6739的android8.1下增加ll命令 2022/3/22 17:11 1.增加: X:\mt6739_android8.1\external\mksh\mkshrc # ...
- 20220314在MT6739的android8.1下打开gpio节点
20220314在MT6739的android8.1下打开gpio节点 2022/3/14 10:16 1.完整编译MT6739的android8.1的SDK: rootroot@rootroot-d ...
- 20220321在MT6739的android8.1下调试GPIO引脚
20220321在MT6739的android8.1下调试GPIO引脚 2022/3/21 18:40 1.完整编译MT6739的android8.1的SDK: rootroot@rootroot-d ...
- 20220311在MT6739的android8.1下测试modetest
20220311在MT6739的android8.1下测试modetest 需求:鸿蒙(Openharmony3.1 beta)下LCD屏幕显示需要MT6739支持DRM显示. 于是先在MT6739的 ...
- Linux下增加swap分区
Linux 下增加swap分区 环境:Linux EL4 + Oracle 10g 1.检查当前的分区情况 (使用free -m或cat /proc/swaps ): [root@db2 root] ...
- Ubuntu下增加Python的PATH环境变量
Ubuntu下增加Python的PATH环境变量 1. Ubuntu专有方式 编辑 /etc/ld.so.conf 文件,如果以下语句不存在,则加入: include /etc/ld.so.conf. ...
- 如何在计算机中增加硬盘分区,win10系统电脑下增加新磁盘分区的操作方法
有关win10系统电脑下增加新磁盘分区的操作方法想必大家有所耳闻.但是能够对win10系统电脑下增加新磁盘分区进行实际操作的人却不多.其实解决win10系统电脑下增加新磁盘分区的问题也不是难事,小编这 ...
- 20220414在MT6739的Android10系统下开启导航栏NavigationBar(虚拟按键)
20220414在MT6739的Android10系统下开启导航栏NavigationBar(虚拟按键) 2022/4/14 18:00 导航栏NavigationBar 1.源码部分: framew ...
最新文章
- poj2516 最小费用最大流
- HttpClient 使用
- UVA - 11882Biggest Number dfs+期望剪枝
- 高级数据结构与算法 | LFU缓存机制(Least Frequently Used)
- 访问Access数据库需要注意的问题
- Network-Monitor项目中观察者模式解析
- 无盘服务器缓存,深入研究无盘服务器缓存
- 【引用】各种软件视频教学
- 龙之谷手游微信连接授权服务器失败,龙之谷手游ios微信授权失败怎么办_龙之谷手游ios微信授权失败解决办法-66街机网...
- 把菜单栏变成万能工具箱,让你的 Mac 更酷炫
- SAP中销售项目开票的初步分析
- JPEG文件格式介绍
- 杭电计算机考研经验交流
- 企业微信SCRM的设计理念是什么?和CRM有什么不同?
- trim()函数的用法
- 剑指offer: 二叉树中和为某一值的路径
- kindle 电子书
- 10月英语,美好的开始
- 05——驾校科目一考试系统——验证账号密码
- 卡兹莫机器人报价_第三次超级机器人大战Z:时狱篇 部分隐藏机体获得条件
热门文章
- 网络监控软件百络网警 v6.6b 企业版 bt
- Redhat 与 Debian 系介绍(Linux各种发行版本概述)
- Ardunio开发实例-使用继电器模块控制家用灯泡
- R语言|数据预处理方法
- 【建议收藏】刷完这9套Java面试题,2021金三银四跳槽面试30K没问题
- VS code配置Python开发环境
- Ignored attempt to cancel a touchmove event with cancelable=false问题
- 方寸中式家居,尊享你的诗意之家
- python验证码生成器_Python captcha模块生成验证码
- 高胜寒聊架构-LVS集群的介绍