获取madplay源码:
wget http://nchc.dl.sourceforge.net/project/mad/madplay/0.15.2b/madplay-0.15.2b.tar.gz
解压
tar xvf madplay-0.15.2b.tar.gz
获取alsa补丁:
wget https://raw.githubusercontent.com/openwrt/packages/master/sound/madplay/patches/0001-switch-to-new-alsa-api.patch
打补丁:
patch -p0 < 0001-switch-to-new-alsa-api.patch
设置环境变量:
export PATH=/opt/OpenWrt-SDK-ramips-mt7688_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/:$PATH export STAGING_DIR=/opt/OpenWrt-SDK-ramips-mt7688_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/:$STAGING_DIR
configure:
STAGING_DIR=/opt/OpenWrt-SDK-ramips-mt7688_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/:$STAGING_DIR \ PATH=/opt/OpenWrt-SDK-ramips-mt7688_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/:$PATH \ CFLAGS="-I/opt/OpenWrt-SDK-ramips-mt7688_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/include" \ LDFLAGS="-L/opt/OpenWrt-SDK-ramips-mt7688_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib -lasound" \ ./configure --host=mipsel-openwrt-linux \ --disable-alsamixer \ --with-alsa \ --prefix=/opt/OpenWrt-SDK-ramips-mt7688_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/ \ make
|