Linux
Dumtux Allwinner-H616
如何设置Console文字大小
apt install console-setup
vim /etc/default/console-setup
然后找到 FONTSIZE="8X16",将其改成想要的大小,前提是要有相应的字体(在/usr/share/consolefonts/
下)
参考文献(原理):how-does-etc-default-console-setup-work
如何使用mpg123播放音乐
首先先查找alsa设备
首先切换root用户
root@debian:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndahub [sndahub], device 0: Media Stream sunxi-ahub-aif1-0 [Media Stream sunxi-ahub-aif1-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sndahub [sndahub], device 1: System Stream sunxi-ahub-aif2-1 [System Stream sunxi-ahub-aif2-1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sndahub [sndahub], device 2: Accompany Stream sunxi-ahub-aif2-2 [Accompany Stream sunxi-ahub-aif2-2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: allwinnerhdmi [allwinner-hdmi], device 0: hdmi i2s-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: Codec [H616 Audio Codec], device 0: CDC PCM Codec-0 [CDC PCM Codec-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
root@debian:~#
可以看到3.5mm耳机口连的是Card 2, device 0.
然后播放mican.mp3
mpg123 -o alsa:hw:2,0 mican.mp3
2,0 代表Card2, Device 0
成功
root@debian:~# mpg123 -o alsa:hw:2,0 mican.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.26.4; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
Terminal control enabled, press 'h' for listing of keys and functions.
Playing MPEG stream 1 of 1: mican.mp3 ...
MPEG 1.0 L III vbr 44100 j-s
Title: Deadline Artist: mican*
Comment: 163 key(Don't modify):L64FU3W4YxX3ZFTmbZ+8/YbXbFhceJfzVBcDqtugbk+kjqrhPKzfIVXa/qOBTlTyUkB81ivVgOouMvwSprx4wiWVJDEkDSz8AHrw5PtgpdcoOeaTCLZKXqueuaq6kTRm16Gy6C3zAo00T8hBCzf38skn1M26qkQXFKxe+Cux7CcYNd+rNNeGoGi2/WiC8/6OhLMLfBie/YkMEeqjk0oG23dWFrC6SBBb3iXid97/Zjv7JkBpCa+RwKTllMoHEaZNeZTWLwSSXCdEXwaH0nuz+G+O6A68Twby0OUIONHkpb75jwe+t6vaxuUcVOxxwwTI2L12na0AeVuxkhHpKAIYo0/eOOrDfcOqh+d2xkdrWENfZw38xFmEcqORro+xpLPolp45gdPzKor0Zw63F6qeIXxd7nxCWF/DS/ZR9N30Dgz/r7Hv0EmoWYSLSUh7Ey4AlDcZcuTF5iQzYgSGlB9Fe7ICCZh/xkiYjwI6kxM75TagVYnN6znZeoRQ/EU5JV5Ydc3u0CEqriImf00W9wEomaPS9iEKJDEHeCHGWKZELGrIT7eDmAiTOz/zeG7Z/IK/
Album: ENGAGED DANCEHALL
Year: Genre: Unknown
tmux在tty下调整窗口大小
因为Ctrl-B 再加方向键会直接切换窗口,
vim ~/.tmux.conf
bind -n C-H resize-pane -L 1
bind -n C-L resize-pane -R 1
bind -n C-K resize-pane -U 1
bind -n C-J resize-pane -D 1
这样就可以通过Ctrl+HJKL来调整窗口大小,就像用vim一样
参考
How do I resize tmux pane by holding down prefix and arrow key for a while?
How to adjust the Tmux pane size
查询framebuffer子系统设备的大小
root@debian:~# cat /sys/class/graphics/fb0/virtual_size
2560,1440
设置fbcon的旋转
root@debian:~# ls /sys/class/graphics/fbcon
cursor_blink power rotate rotate_all subsystem uevent
root@debian:~# echo 1 > /sys/class/graphics/fb
fb0/ fbcon/
root@debian:~# echo 1 > /sys/class/graphics/fbcon/
cursor_blink power/ rotate rotate_all subsystem/ uevent
root@debian:~# echo 1 > /sys/class/graphics/fbcon/rotate_all
root@debian:~# echo 1 > /sys/class/graphics/fbcon/rotate_all
root@debian:~# echo 0 > /sys/class/graphics/fbcon/rotate_all
root@debian:~#
向rotate_all
或rotate
文件写入0,1,2,3来控制旋转方向,cursor_blink来控制光标是否闪烁。
参考Querying framebuffer resolution in Linux
如何设置fbcon显示在哪个fbdev上
来源The Framebuffer Console
在boot.cmd中添加bootargs fbcon=map:1 (表示在/dev/fb1上显示)
然后记得不能直接修改boot.scr
,因为其包含校验码,得用从u-boot/tools里的mkImage来生产boot.scr
来源
全志v3s学习笔记(4)——u-boot传参(boot.scr)和参数配置(script.bin)文件
linux - Beagleboard-Xm Rev. C1 修改 boot.scr 后无法启动
mkimage -A arm -O linux -T script -C none -n "My Boot" -d boot.cmd boot.scr