/*-----------------------------------------------------------------------------
*Cross compiler : arm-linux-gcc 4.3.2
*Build :Ubuntu 12.04
*Host : arm-linux
*Target : arm-linux(OK6410)
*Author : Rongzh
*Note : 如果sudo make install 不能安装可尝试先su root再 make install.
*/-----------------------------------------------------------------------------
1)./configure CC=arm-linux-gcc --host=arm-linux --disable-shared --disable-debugging --prefix=/usr/local/libmab/mad
2)vi Makefile,找到里面的“--fforce-mem”,然后删除保存退出即可
3)make && sudo make install
Alsa-lib Verision: alsa-lib-1.0.22 Download:ftp://ftp.alsa-project.org/pub/lib/
1)./configure --host=arm-none-linux-gnueabi --target=arm-linux --prefix=/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/usr --enable-static --enable-shared --disable-python --with-configdir=/usr/local/share --with-plugindir=/usr/local/lib/alsa_lib
2)make && sudo make install
3)将库文件、配置文件和插件文件转移到嵌入式文件系统的对应目录上(/usr/local/share和/usr/local/lib/alsa_lib)
Alsa-unit Verision : alsa-utils-1.0.23 Download:ftp://ftp.alsa-project.org/pub/tools/
1)./configure --host=arm-none-linux-gnueabi --prefix=/usr/share/arm-alsa --with-alsa-inc-prefix=/usr/share/arm-alsa/include --with-alsa-prefix=/usr/share/arm-alsa/lib --disable-alsamixer --disable-xmlto
2)make && sudo make install
Mplayer Verision :Mplayer-1.0rc4 Download:http://www.mplayerhq.hu/MPlayer/releases/
1)./configure --host-cc=gcc --cc=arm-none-linux-gnueabi-gcc --disable-armv5te --disable-armv6 --enable-fbdev --disable-dvdread --disable-gui --disable-dvdnav --target=arm-linux --disable-live --disable-mp3lib --enable-mad --disable-win32dll --disable-mencoder --disable-ivtv --enable-libavcodec_a --enable-cross-compile --disable-dvdread-internal --disable-libdvdcss-internal --enable-alsa --disable-ossaudio --prefix=/opt/Mplayer-with-alsa 2>&1 | tee logfile
2)拷贝/usr/local/libmad/mad/include/目录下所有文件到mplayer源码目录下
修改config.mak中在-lmad后面加入-L/usr/local/libmab/mad/lib
3)修改MPlayer-1.0rc4/libmpeg2/motion_comp_arm_s.S文件
vi /libmepg2/motion_comp_s.S
在最前加入:
#ifndef HAVE_PLD
.macro pld reg
.endm
#endif
4)make
5)vi Makefile,
在Makefile的install部分前面加入:
INSTALLSTRIP :=
6)sudo make install
如果仍然出现 strip: Unable to recognise the format of the input file
则不用理会,此时在源码目录下已经生成了mplayer可执行文件,可直接使用
Note:若想mplayer检测出alsa,mplayer编译时不能指定为静态,alsa-lib需编译为动态而且需要拷贝到开发板编译时指定的对应目录上。