Mplayer 在Linux - S3C6410 下的编译
转载地址:http://blog.csdn.net/willand1981/article/details/5784307
mplayer交叉编译过程:
GCC版本:Sourcery G++ 4.2.1目标机:S3C6410 ARM内核为arm1176jzf-s(GCC有-mcpu=arm1176jzf-s)
主机:Ubuntu 8.04
提示:mplayer有自动configure,无需手动写Make~注意区分GCC的参数和configure的参数。
参考文章:
ARM MPlayer移植过程 http://www.usr.cc/html/54/n-654.html
mplayer在arm 2410上的移植 http://www.hzlitai.com.cn/article/ARM9-article/example/1483.html
- ./configure --host-cc=gcc --cc=arm-none-linux-gnueabi-gcc--target=arm-armv6-linux --enable-armv6 --enable-armvfp --enable-static--prefix=/home/mplayer --disable-dvdread --enable-fbdev--disable-mencoder --disable-live 2>&1 | tee logfile
- mpcommon.c: In function 'update_subtitles':
- mpcommon.c:129: warning: dereferencing type-punned pointer will break strict-aliasing rules
- {standard input}: Assembler messages:
- {standard input}:482: Error: selected processor does not support `rev16 r3,r3'
- make: *** [mpcommon.o] 错误 1
- ./configure --host-cc=gcc--cc=arm-none-linux-gnueabi-gcc --enable-armv6 --enable-armvfp--enable-static --prefix=/home/mplayer --disable-dvdread--enable-fbdev --disable-mencoder --disable-live 2>&1 | teelogfile
- vidix/vidix.c: In function 'vdlConfigPlayback':
- ./libavutil/x86/bswap.h:44: error: invalid 'asm': invalid operand for code 'w'
- ./libavutil/x86/bswap.h:44: error: invalid 'asm': invalid operand for code 'w'
- {standard input}: Assembler messages:
- {standard input}:40: Error: bad instruction `rorw $8,'
- {standard input}:41: Error: bad instruction `rorl $16,ip'
- {standard input}:42: Error: bad instruction `rorw $8,'
- make: *** [vidix/vidix.o] 错误 1
- ./configure --host-cc=gcc --cc=arm-none-linux-gnueabi-gcc--target=arm-linux --enable-armv6 --enable-armvfp --enable-static--prefix=/home/mplayer --disable-dvdread --enable-fbdev--disable-mencoder --disable-live 2>&1 | tee logfile
- mpcommon.c: In function 'update_subtitles':
- mpcommon.c:129: warning: dereferencing type-punned pointer will break strict-aliasing rules
- {standard input}: Assembler messages:
- {standard input}:482: Error: selected processor does not support `rev16 r3,r3'
- make: *** [mpcommon.o] 错误 1
- ./configure --host-cc=gcc --cc=arm-none-linux-gnueabi-gcc--enable-armv6 --enable-static --prefix=/home/mplayer --disable-dvdread--enable-fbdev --disable-mencoder --disable-live
其实,configure脚本是为了根据配置参数和系统环境自动生成config.mak,而config.mak又是包含在Makefile当中的。在config.mak中,发现./configure用到的参数都原封不动地搬进去了。
通过阅读gcc -help 和 gcc --platform-help 找到的-mcpu=arm1176jzf-s 这个参数希望用上。
- ./configure --host-cc=gcc --cc=arm-none-linux-gnueabi-gcc-mcpu=arm1176jzf-s --enable-armv6 --enable-armvfp --enable-static--prefix=/home/mplayer --disable-dvdread --enable-fbdev--disable-mencoder --disable-live 2>&1 | tee logfile
但是gcc应该是认识的。于是,首先使用
- ./configure --host-cc=gcc --cc=arm-none-linux-gnueabi-gcc--enable-armv6 --enable-armvfp --enable-static --prefix=/home/mplayer--disable-dvdread --enable-fbdev --disable-mencoder --disable-live
应该说这次编译应该是比较顺利的,关键是采用了与源代码版本相适应的编译工具环境,才能相对顺利。