arm linux ld unsafe,MPlayer在ARM2440开发板的移植

如果不取消,将会产生如下错误

arm-linux-gcc -I../libswscale -I../libavcodec  -DHAVE_AV_CONFIG_H -D_FILE_OFFSET                                              _BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I.. -I.. -I../libavutil -Wdisable                                              d-optimization -Wno-pointer-sign -Wdeclaration-after-statement -I. -I.. -I../lib                                              avutil -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4   -pipe -ffast-ma                                              th -fomit-frame-pointer -D_REENTRANT -DHAVE_CONFIG_H -I/home/workspace/MPlayer/M                                              Player-1.0rc2/../output/linux_arm/include -I/usr/X11R6/include  -c -o armv4l/dsp                                              util_arm_s.o armv4l/dsputil_arm_s.S

cc1: warning: include location "/usr/X11R6/include" is unsafe for cross-compilat                                              ion

armv4l/dsputil_arm_s.S: Assembler messages:

armv4l/dsputil_arm_s.S:79: Error: selected processor does not support `pld [r1]''

armv4l/dsputil_arm_s.S:90: Error: selected processor does not support `pld [r1]''

armv4l/dsputil_arm_s.S:100: Error: selected processor does not support `pld [r1]                                              ''

armv4l/dsputil_arm_s.S:111: Error: selected processor does not support `pld [r1]                                              ''

armv4l/dsputil_arm_s.S:122: Error: selected processor does not support `pld [r1]                                              ''

armv4l/dsputil_arm_s.S:141: Error: selected processor does not support `pld [r1]

make

修改make install的bug

执行make install时会提示

install -m 755 -s mplayer /home/hxy/MPlayer/

MPlayer-1.0rc2/../output/arm_linux/bin

strip: Unable to recognise the format of the input file

`/home/hxy/MPlayer/MPlayer-1.0rc2/../output/arm_linux/bin/mplayer'

查资料看install带-s 参数时会自动调用strip来strip应用程序。但是arm编译时要调用arm-linux-strip才有正确处理。解决办法是取消-s参数,查看Makefile可以发现-s是如下

$(INSTALL) -m 755 $(INSTALLSTRIP) mplayer$(EXESUF)     $(BINDIR)

的INSTALLSTRIP设置的,它默认是-s,因此只要简单在Makefile的前面(95行)加入

INSTALLSTRIP :=  #将其置为空即可惟

4.执行:

export LD_LIBRARY_PATH=${LIB};./mplayer -ac maddemo.mpg

其中$LIB是保存有Mplayer所需的库的路径 -ac mad 是必须,表示强制用libmad解码.

这是我的成功执行一段脚本:

export APP_ROOT=/mnt/nfs/MPlayer/output/arm_linux

export LD_LIBRARY_PATH=$APP_ROOT,OOT/lib;./mplayer -ac mad 2.mpg

测试mpg,avi,mp3,mp4均可播放,默认是按视频的原始分辨率播放的。如果想让MPlayer完整在LCD上显示,可以用video filter 参数 scale来设置

./mplayer -vf scale=240:320

另外有人测试发现在有一些开发板下.Mplayer播放后,输出会干扰后续shell的执行行.用下面比较长的参数一般没事

export APP_ROOT=/mnt/nfs/MPlayer/output/arm_linux

export LD_LIBRARY_PATH=$APP_ROOT,OOT/lib;./mplayer -ac mad 2.mpg -quiet \-vf scale=320:240 2>&1 1>/dev/null &&

如果搞不清自己分辩率的,可在MPlayer用 -fullscreen参数 .或者执行busybox shell命令fbset查看自n己板的分辩率0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值