mplayer移植到mini2440,报错问题解答
2011-04-19 22:29
246 查看
主机操作系统:fedora 12 i686
开发板: 友善之臂 mini2440 (内核版本为2.6.32)
交叉编译器:arm-linux-gcc(版本号:4.4.3)
mplayer版本:mPlayer-1.0rc2.tar.bz2
移植过程:
1.因为需要mad库播放音频,所以首先交叉编译libmad(不然会报错Can’t find –lmad)
libmad的版本为 libmad-0.15.1b.tar.bz2
步骤为configure,make ,make install
configure的配置参数为:
./configure --enable-fpm=arm --host=arm-linux --disable-shared /
--disable-debugging --prefix=/usr/local/arm-linux/4.4.3/lib /
CC=arm-linux-gcc
其中--prefix为你安装arm-linux-gcc的目录
在安装libmad是出现过如下错误
arm-linux-ranlib command not found
在终端检查,发现arm-linux-ranlib可以在系统的PATH中找到。
那为什么还提示说找不到arm-linux-ranlib呢?
原因如下:
1)我添加arm交叉编译器目录到PATH中是放在~/.bash_profile里的,这是用户的配置文件,我的用户为wmm。
2)执行make install时,加了sudo前缀,变成了root的工作环境和root的权限。
根据以上两点,make install是在root下做的,而arm-linux-ranlib在wmm用户的工作环境中才能找到。所以产生了这里的错误。
那既要取得root权限,又要具有当前用户wmm的工作环境,改怎办呢?
解决如下:
执行make install之前,先用下su命令取得root权限。然后再执行make install。
2.安装mplayer
步骤为configure,make ,make install
configure的配置参数为:
./configure --host-cc=gcc --cc=arm-linux-gcc --target=arm-linux --enable-static --disable-win32dll --disable-dvdread --disable-dvdread-internal --disable-dvdnav --disable-libdvdcss-internal --enable-fbdev --disable-mencoder --disable-live --disable-mp3lib --enable-mad --enable-libavcodec_a --disable-live --prefix=/opt
--with-extraincdir=/usr/local/arm-linux/4.4.3/lib/include /
--with-extralibdir=/usr/local/arm-linux/4.4.3/lib/lib
之后make,make install。
其中可能会遇到如下问题:
1.Error:motion_comp_arm_s.S
在libmpeg2/motion_comp_arm_s.S文件的最前面加上如下的内容:
#ifndef HAVE_PLD
.macro pld reg
.endm
#endif
2.vo_ivtv.c:79: error: storage size of ’sd’ isn’t known
vo_ivtv.c:80: error: storage size of ’sd1′ isn’t known
添加--disable-ivtv
3. undefined reference to `video_out_ivtv'
在文件 file libvo/video_out.c, 找到
#ifdef HAVE_DXR2
extern vo_functions_t video_out_dxr2;
#endif
extern vo_functions_t video_out_dxr3; // ошибка сделана тут
#ifdef HAVE_IVTV
extern vo_functions_t video_out_ivtv;
#endif
edit it like this:
#ifdef HAVE_DXR2
extern vo_functions_t video_out_dxr2;
#endif
#ifdef HAVE_DXR3 //这一句是要添加的
extern vo_functions_t video_out_dxr3;
#endif //这句是要添加的
#ifdef HAVE_IVTV
extern vo_functions_t video_out_ivtv;
#endif
4.strip: Unable to recognise the format of the input file
查资料看install带-s 参数时会自动调用strip来strip应用程序。但是arm编译时要调用arm-linux-strip才有正确处理。解决办法是取消-s参数,查看Makefile可以发现-s是如下
$(INSTALL) -m 755 $(INSTALLSTRIP) mplayer$(EXESUF) $(BINDIR)
的INSTALLSTRIP设置的,它默认是-s,因此只要简单去掉即可。
$(INSTALL) -m 755 mplayer$(EXESUF) $(BINDIR)
以上几步都完成之后将生成的 /opt/bin/mplayer下载到开发板上,输入参数:
mplayer test.avi -framedrop -quiet -vf rotate -flip -x 240 -y 320
完成
开发板: 友善之臂 mini2440 (内核版本为2.6.32)
交叉编译器:arm-linux-gcc(版本号:4.4.3)
mplayer版本:mPlayer-1.0rc2.tar.bz2
移植过程:
1.因为需要mad库播放音频,所以首先交叉编译libmad(不然会报错Can’t find –lmad)
libmad的版本为 libmad-0.15.1b.tar.bz2
步骤为configure,make ,make install
configure的配置参数为:
./configure --enable-fpm=arm --host=arm-linux --disable-shared /
--disable-debugging --prefix=/usr/local/arm-linux/4.4.3/lib /
CC=arm-linux-gcc
其中--prefix为你安装arm-linux-gcc的目录
在安装libmad是出现过如下错误
arm-linux-ranlib command not found
在终端检查,发现arm-linux-ranlib可以在系统的PATH中找到。
那为什么还提示说找不到arm-linux-ranlib呢?
原因如下:
1)我添加arm交叉编译器目录到PATH中是放在~/.bash_profile里的,这是用户的配置文件,我的用户为wmm。
2)执行make install时,加了sudo前缀,变成了root的工作环境和root的权限。
根据以上两点,make install是在root下做的,而arm-linux-ranlib在wmm用户的工作环境中才能找到。所以产生了这里的错误。
那既要取得root权限,又要具有当前用户wmm的工作环境,改怎办呢?
解决如下:
执行make install之前,先用下su命令取得root权限。然后再执行make install。
2.安装mplayer
步骤为configure,make ,make install
configure的配置参数为:
./configure --host-cc=gcc --cc=arm-linux-gcc --target=arm-linux --enable-static --disable-win32dll --disable-dvdread --disable-dvdread-internal --disable-dvdnav --disable-libdvdcss-internal --enable-fbdev --disable-mencoder --disable-live --disable-mp3lib --enable-mad --enable-libavcodec_a --disable-live --prefix=/opt
--with-extraincdir=/usr/local/arm-linux/4.4.3/lib/include /
--with-extralibdir=/usr/local/arm-linux/4.4.3/lib/lib
之后make,make install。
其中可能会遇到如下问题:
1.Error:motion_comp_arm_s.S
在libmpeg2/motion_comp_arm_s.S文件的最前面加上如下的内容:
#ifndef HAVE_PLD
.macro pld reg
.endm
#endif
2.vo_ivtv.c:79: error: storage size of ’sd’ isn’t known
vo_ivtv.c:80: error: storage size of ’sd1′ isn’t known
添加--disable-ivtv
3. undefined reference to `video_out_ivtv'
在文件 file libvo/video_out.c, 找到
#ifdef HAVE_DXR2
extern vo_functions_t video_out_dxr2;
#endif
extern vo_functions_t video_out_dxr3; // ошибка сделана тут
#ifdef HAVE_IVTV
extern vo_functions_t video_out_ivtv;
#endif
edit it like this:
#ifdef HAVE_DXR2
extern vo_functions_t video_out_dxr2;
#endif
#ifdef HAVE_DXR3 //这一句是要添加的
extern vo_functions_t video_out_dxr3;
#endif //这句是要添加的
#ifdef HAVE_IVTV
extern vo_functions_t video_out_ivtv;
#endif
4.strip: Unable to recognise the format of the input file
查资料看install带-s 参数时会自动调用strip来strip应用程序。但是arm编译时要调用arm-linux-strip才有正确处理。解决办法是取消-s参数,查看Makefile可以发现-s是如下
$(INSTALL) -m 755 $(INSTALLSTRIP) mplayer$(EXESUF) $(BINDIR)
的INSTALLSTRIP设置的,它默认是-s,因此只要简单去掉即可。
$(INSTALL) -m 755 mplayer$(EXESUF) $(BINDIR)
以上几步都完成之后将生成的 /opt/bin/mplayer下载到开发板上,输入参数:
mplayer test.avi -framedrop -quiet -vf rotate -flip -x 240 -y 320
完成
相关文章推荐
- 编译移植Mplayer到mini2440开发板的过程及问题解决办法
- 友善官方<<Mini2440 Linux移植开发实战指南>>问题总结
- mplayer移植到mini2440
- 移植iptables到mini2440的问题
- 在Ubuntu上移植MPlayer到mini2440
- 友善官方<<Mini2440 Linux移植开发实战指南>>问题勘误录
- RTLinux 和 Xenomai 系统在mini2440的移植——usb无线网卡死机问题
- mini2440 移植 mplayer Mp4播放器
- Mplayer移植到mini2440(s3c2440)
- 移植mplayer到mini2440
- Linux-2.6.32.2在mini2440移植时常见问题
- mini2440 madplay移植出现问题
- 移植mplayer到mini2440的全过程
- 在mini2440上移植QtEmbedded遇到的问题
- 移植 mplayer 到 mini2440 全流程的小窍门
- s5pv210 音频播放问题 MPlayer移植
- QT_MPlayer移植到mini2440
- MPlayer移植到mini2440开发板
- mini2440内核移植机器码问题
- mini2440 nand flash驱动移植--问题解决记录