让NanoPi2支持USB声卡
首先必须修改内核,因为目前官方默认的内核是不带USB声卡驱动的。修改内核就必须先编译uboot中的mkimage。所以先编译mkimage:
1
2
3
4
5
6
7sudo apt-get install git
git clone https://github.com/friendlyarm/uboot_nanopi2.git
cd uboot_nanopi2
git checkout nanopi2-lollipop-mr1
make CROSS_COMPILE=arm-linux- tools
sudo mkdir -p /usr/local/sbin && sudo cp -v tools/mkimage /usr/local/sbin
然后下载内核源码并开始配置: 1
2
3
4
5git clone https://github.com/friendlyarm/linux-3.4.y.git
cd linux-3.4.y
git checkout nanopi2-lollipop-mr1
make nanopi2_linux_defconfig
make menuconfig1
2
3
4Device Drivers -->
Sound card support -->
Advanced Linux Sound Architecture -->
USB sound devices
然后保存配置,编译uImage: 1
2touch .scmversion
make uImage1
scp /home/ypw/Desktop/linux-3.4.y/arch/arm/boot/uImage root@192.168.2.22:/media/fa/boot2/uImage.hdmi
注意:此处由于我并没有接LCD,所以我直接覆盖的hdmi内核,需要接LCD的话,还需要这样修改内核:
1
2
3
4
5
6make menuconfig
Device Drivers -->
Graphics support -->
Nexell Graphics -->
[*] LCD
[ ] HDMI1
2
3scp /Users/ypw/Desktop/周杰伦\ -\ 青花瓷.mp3 root@192.168.2.22:/home/fa/Desktop/qinghuaci.mp3
ssh root@192.168.2.22
mplayer /home/fa/Desktop/qinghuaci.mp3
当然,也可以在vnc中播放音乐