那就制作一个img出来🤭
我小白,不太会弄...我传dtb和zImage文件吧....
我用的是ili9341屏幕,串口输出测试就好了
[ 56.707180] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 56.723018] usb usb1-port1: unable to enumerate USB device
插入USB扩展坞,再将移动硬盘插入USB扩展坞。这时候就能成功识别移动硬盘了
其实不排除是内核配置问题。有兴趣的小伙伴可以修改一下
能发布个完整的固件上来吗❓
我是SD卡的,没有固件...
]]>一: 如果你编译的时候就是冲着播放器来的,第一次的时候就要勾选asla相关配置,注意:以下操作是你配置好
buildroot的时候再配置
1 Toolchain ---> Enable WCHAR support
2 Target packages ---> Audio and video applications ---> alsa-utils --->全部勾选
2.5 Target packages ---> Audio and video applications ---> mpg123 安装播放器 ,根据自己喜好
3 Target packages --->Audio/Sound ---> alsa-lib --->全部勾选
全部完成再等待漫长的make就行了
二:buildroot文件系统tar到SD卡后
1编辑SD卡里的文件系统
vi /etc/asound.state 加入以下代码
state.Loopback {
control.1 {
iface PCM
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.2 {
iface PCM
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.3 {
iface PCM
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.4 {
iface PCM
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.5 {
iface PCM
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.6 {
iface PCM
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.7 {
iface PCM
subdevice 1
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.8 {
iface PCM
subdevice 1
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.9 {
iface PCM
subdevice 1
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.10 {
iface PCM
subdevice 1
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.11 {
iface PCM
subdevice 1
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.12 {
iface PCM
subdevice 1
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.13 {
iface PCM
subdevice 2
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.14 {
iface PCM
subdevice 2
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.15 {
iface PCM
subdevice 2
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.16 {
iface PCM
subdevice 2
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.17 {
iface PCM
subdevice 2
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.18 {
iface PCM
subdevice 2
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.19 {
iface PCM
subdevice 3
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.20 {
iface PCM
subdevice 3
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.21 {
iface PCM
subdevice 3
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.22 {
iface PCM
subdevice 3
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.23 {
iface PCM
subdevice 3
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.24 {
iface PCM
subdevice 3
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.25 {
iface PCM
subdevice 4
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.26 {
iface PCM
subdevice 4
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.27 {
iface PCM
subdevice 4
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.28 {
iface PCM
subdevice 4
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.29 {
iface PCM
subdevice 4
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.30 {
iface PCM
subdevice 4
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.31 {
iface PCM
subdevice 5
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.32 {
iface PCM
subdevice 5
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.33 {
iface PCM
subdevice 5
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.34 {
iface PCM
subdevice 5
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.35 {
iface PCM
subdevice 5
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.36 {
iface PCM
subdevice 5
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.37 {
iface PCM
subdevice 6
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.38 {
iface PCM
subdevice 6
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.39 {
iface PCM
subdevice 6
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.40 {
iface PCM
subdevice 6
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.41 {
iface PCM
subdevice 6
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.42 {
iface PCM
subdevice 6
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.43 {
iface PCM
subdevice 7
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.44 {
iface PCM
subdevice 7
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.45 {
iface PCM
subdevice 7
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.46 {
iface PCM
subdevice 7
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.47 {
iface PCM
subdevice 7
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.48 {
iface PCM
subdevice 7
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.49 {
iface PCM
device 1
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.50 {
iface PCM
device 1
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.51 {
iface PCM
device 1
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.52 {
iface PCM
device 1
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.53 {
iface PCM
device 1
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.54 {
iface PCM
device 1
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.55 {
iface PCM
device 1
subdevice 1
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.56 {
iface PCM
device 1
subdevice 1
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.57 {
iface PCM
device 1
subdevice 1
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.58 {
iface PCM
device 1
subdevice 1
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.59 {
iface PCM
device 1
subdevice 1
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.60 {
iface PCM
device 1
subdevice 1
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.61 {
iface PCM
device 1
subdevice 2
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.62 {
iface PCM
device 1
subdevice 2
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.63 {
iface PCM
device 1
subdevice 2
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.64 {
iface PCM
device 1
subdevice 2
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.65 {
iface PCM
device 1
subdevice 2
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.66 {
iface PCM
device 1
subdevice 2
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.67 {
iface PCM
device 1
subdevice 3
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.68 {
iface PCM
device 1
subdevice 3
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.69 {
iface PCM
device 1
subdevice 3
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.70 {
iface PCM
device 1
subdevice 3
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.71 {
iface PCM
device 1
subdevice 3
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.72 {
iface PCM
device 1
subdevice 3
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.73 {
iface PCM
device 1
subdevice 4
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.74 {
iface PCM
device 1
subdevice 4
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.75 {
iface PCM
device 1
subdevice 4
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.76 {
iface PCM
device 1
subdevice 4
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.77 {
iface PCM
device 1
subdevice 4
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.78 {
iface PCM
device 1
subdevice 4
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.79 {
iface PCM
device 1
subdevice 5
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.80 {
iface PCM
device 1
subdevice 5
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.81 {
iface PCM
device 1
subdevice 5
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.82 {
iface PCM
device 1
subdevice 5
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.83 {
iface PCM
device 1
subdevice 5
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.84 {
iface PCM
device 1
subdevice 5
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.85 {
iface PCM
device 1
subdevice 6
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.86 {
iface PCM
device 1
subdevice 6
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.87 {
iface PCM
device 1
subdevice 6
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.88 {
iface PCM
device 1
subdevice 6
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.89 {
iface PCM
device 1
subdevice 6
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.90 {
iface PCM
device 1
subdevice 6
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
control.91 {
iface PCM
device 1
subdevice 7
name 'PCM Rate Shift 100000'
value 100000
comment {
access 'read write'
type INTEGER
count 1
range '80000 - 120000 (step 1)'
}
}
control.92 {
iface PCM
device 1
subdevice 7
name 'PCM Notify'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.93 {
iface PCM
device 1
subdevice 7
name 'PCM Slave Active'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.94 {
iface PCM
device 1
subdevice 7
name 'PCM Slave Format'
value 2
comment {
access read
type INTEGER
count 1
range '0 - 52 (step 1)'
}
}
control.95 {
iface PCM
device 1
subdevice 7
name 'PCM Slave Rate'
value 48000
comment {
access read
type INTEGER
count 1
range '0 - 192000 (step 1)'
}
}
control.96 {
iface PCM
device 1
subdevice 7
name 'PCM Slave Channels'
value 2
comment {
access read
type INTEGER
count 1
range '1 - 1024 (step 1)'
}
}
}
state.Codec {
control.1 {
iface MIXER
name 'DAC Playback Volume'
value 55
comment {
access 'read write'
type INTEGER
count 1
range '0 - 63'
dbmin -7308
dbmax 0
dbvalue.0 -928
}
}
control.2 {
iface MIXER
name 'Headphone Playback Volume'
value 54
comment {
access 'read write'
type INTEGER
count 1
range '0 - 63'
dbmin -9999999
dbmax 0
dbvalue.0 -900
}
}
control.3 {
iface MIXER
name 'Headphone Playback Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.4 {
iface MIXER
name 'Line In Playback Volume'
value 0
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 -450
}
}
control.5 {
iface MIXER
name 'FM In Playback Volume'
value 0
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 -450
}
}
control.6 {
iface MIXER
name 'Mic In Playback Volume'
value 7
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 600
}
}
control.7 {
iface MIXER
name 'Mic Boost Volume'
value 7
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin 0
dbmax 4200
dbvalue.0 4200
}
}
control.8 {
iface MIXER
name 'ADC Capture Volume'
value 3
comment {
access 'read write'
type INTEGER
count 1
range '0 - 7'
dbmin -450
dbmax 600
dbvalue.0 0
}
}
control.9 {
iface MIXER
name 'ADC Mixer Right Out Capture Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.10 {
iface MIXER
name 'ADC Mixer Left Out Capture Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.11 {
iface MIXER
name 'ADC Mixer Line In Capture Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.12 {
iface MIXER
name 'ADC Mixer Right FM In Capture Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.13 {
iface MIXER
name 'ADC Mixer Left FM In Capture Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.14 {
iface MIXER
name 'ADC Mixer Mic Capture Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.15 {
iface MIXER
name 'Left Mixer Right DAC Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.16 {
iface MIXER
name 'Left Mixer Left DAC Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.17 {
iface MIXER
name 'Left Mixer FM In Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.18 {
iface MIXER
name 'Left Mixer Line In Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.19 {
iface MIXER
name 'Left Mixer Mic In Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.20 {
iface MIXER
name 'Right Mixer Left DAC Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.21 {
iface MIXER
name 'Right Mixer Right DAC Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.22 {
iface MIXER
name 'Right Mixer FM In Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.23 {
iface MIXER
name 'Right Mixer Line In Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.24 {
iface MIXER
name 'Right Mixer Mic In Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.25 {
iface MIXER
name 'Headphone Source Playback Route'
value.0 Mixer
value.1 Mixer
comment {
access 'read write'
type ENUMERATED
count 2
item.0 DAC
item.1 Mixer
}
}
}
保存退出,输入
alsamixer 将第二条HeadPhone Source从Mixer改为ADC 原因是ADC是双通道的,左右耳机
除了第一个HeadPone和最后一个ADC,只要没有麦克风都可以关掉
如果发现没有HeadPhone怎么办?
vi /etc/asound.conf
defaults.ctl.card 1
defaults.pcm.card 1
defaults.timer.card 1
保存退出再尝试以下,有声音后。输入
alsactl store
保存配置,需要恢复的时候
alsactl restore
每次开机播放音乐都没有声音怎么办?
尝试打开alsamixer,再退出。播放音乐,还是没声音
alsactl restore
alsamixer
应该就有了
2在 ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL前面加#注释掉
#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL
添加,这段意思是循环执行
ttyS0::respawn:~/bin/sh
如果你有什么自启动的程序可以写个.sh脚本,我这里有个start.sh里面是加载esp8266并且连上wifi,修改时间的脚本。
如果没有,可以不写以下代码 once的意思是执行一次
ttyS0::once:/opt/start.sh
注意原先开头是ttyS0,就填。根据自己的系统修改
保存重启,搞定!
再探💪
再写一些新手教程就差不多完成我的目标了
网盘,音乐播放器
🐂🐂
愿学屠龙技,很多whycan的朋友需要这个分享
播放音乐没声音,在buildroot里配置alsa-utils了,但是在nano运行的时候找不到alsamixer,明明已经勾选了
]]>这是老坑,号称天坑,可以先翻翻论坛里的帖子
论坛找不到,不过我在百度找到一些线索。现在解决了
]]>