一、开发环境背景说明
SDK版本:Hi3519DV500R001C01SPC003
Linux版本:$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
二、第三方库alsa-lib-1.2.7编译报错问题处理Linux版本:$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
1.参考ReleaseDoc/zh/01.software/board/BSP下的《外围设备驱动 操作指南.pdf》的《1.2.3.8 内核下录像机操作示例》章节,参考mpp/sample/uvc_app目录下的alsa_readme.txt文件去下载并编译第三方库alsa-lib-1.2.7.tar.bz2
2.下载的alsa-lib-1.2.7.tar.bz2文件放到smp/a55_linux/mpp/sample/uvc_app/alsa/opensource目录里
3.进入smp/a55_linux/mpp/sample/uvc_app/alsa/opensource目录执行以下操作命令:
tar -xjvf alsa-lib-1.2.7.tar.bz2
cd ./alsa-lib-1.2.7/
mkdir -p /home/install/alsa-lib-1.2.7/
./configure —host=aarch64-v01c01-linux-musl —prefix=/home/install/alsa-lib-1.2.7/ —enable-static=no —enable-shared=yes —with-configdir=/home/audio/alsa/ —disable-python
4.执行configure配置步骤时报错信息如下:
checking build system type… x86_64-unknown-linux-gnu
checking host system type… Invalid configuration aarch64-v01c01-linux-musl’: machine aarch64-v01c01-linux’ not recognized
configure: error: /bin/sh ./config.sub aarch64-v01c01-linux-musl failed
5.原因是alsa-lib-1.2.7.tar.bz2包中带的config.sub跟config.guess太旧了,需要进行更新,更新命令如下:
wget -O config.guess ‘http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD‘
wget -O config.sub ‘http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD‘
6.更新后就可以继续按照alsa_readme.txt文件,编译出libasound.la libasound.so libasound.so.2 libasound.so.2.0.0 等库文件了
2.下载的alsa-lib-1.2.7.tar.bz2文件放到smp/a55_linux/mpp/sample/uvc_app/alsa/opensource目录里
3.进入smp/a55_linux/mpp/sample/uvc_app/alsa/opensource目录执行以下操作命令:
tar -xjvf alsa-lib-1.2.7.tar.bz2
cd ./alsa-lib-1.2.7/
mkdir -p /home/install/alsa-lib-1.2.7/
./configure —host=aarch64-v01c01-linux-musl —prefix=/home/install/alsa-lib-1.2.7/ —enable-static=no —enable-shared=yes —with-configdir=/home/audio/alsa/ —disable-python
4.执行configure配置步骤时报错信息如下:
checking build system type… x86_64-unknown-linux-gnu
checking host system type… Invalid configuration aarch64-v01c01-linux-musl’: machine aarch64-v01c01-linux’ not recognized
configure: error: /bin/sh ./config.sub aarch64-v01c01-linux-musl failed
5.原因是alsa-lib-1.2.7.tar.bz2包中带的config.sub跟config.guess太旧了,需要进行更新,更新命令如下:
wget -O config.guess ‘http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD‘
wget -O config.sub ‘http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD‘
6.更新后就可以继续按照alsa_readme.txt文件,编译出libasound.la libasound.so libasound.so.2 libasound.so.2.0.0 等库文件了