您的位置:首页 > 运维架构 > Linux

在s5pv210开发板linux平台上移植mplayer--基于x210开发板

2011-10-03 20:26 633 查看
x210开发板的linux和android共用一套内核,只不过编译时选择不同的 config,真是太绝了!

而且linux内核和android内核全部打包到xboot.bin中,用户只需要开机时通过按键在LCD交互

界面选择linux或者android就可以了。

在调试时,我们可以进入linux系统,而且linux的文件系统也一并打包到xboot中了,这个xboot

简直无敌了!

废话少说,下面在基于xboot的linux内核上移植mplayer:

安装源文件[见光盘]:

MPlayer-1.0rc2.tar.bz2

libmad-0.15.1b.tar.gz

第一步:解压libmad-0.15.1b并安装:

./configure --enable-fpm=arm --host=arm-none-linux-gnueabi --disable-shared --disable-debugging --prefix=/usr/local/arm/arm-none-linux-gnueabi-2010-09-50/lib CC=/usr/local/arm/arm-none-linux-gnueabi-2010-09-50/bin/arm-none-linux-gnueabi-gcc

make

如下错误:

cc1: error: unrecognized command line option "-fforce-mem"

修改Makefile

在Makefile中找到包含"fforce-mem"字符串,将其删除即可;原因:gcc3.4或更高版本中,已将将该选项去除了。

再make

make install

第二步:解压MPlayer-1.0rc2并安装:

./configure --cc=/usr/local/arm/arm-none-linux-gnueabi-2010-09-50/bin/arm-none-linux-gnueabi-gcc --target=arm-none-linux-gnueabi --enable-static --prefix=/tmp/mplayer-rc2 --disable-win32dll --disable-dvdread --enable-fbdev --disable-mencoder --disable-live
--disable-mp3lib --enable-mad --enable-libavcodec_a --language=zh_CN --disable-armv5te --disable-armv6 --with-extraincdir=/usr/local/arm/arm-none-linux-gnueabi-2010-09-50/lib/include --with-extralibdir=/usr/local/arm/arm-none-linux-gnueabi-2010-09-50/lib/lib
--host-cc=gcc --enable-ossaudio

提示如下错误:

vo_ivtv.c: In function 'ivtv_reset':

vo_ivtv.c:79:31: error: storage size of 'sd' isn't known

vo_ivtv.c:80:32: error: storage size of 'sd1' isn't known

vo_ivtv.c:84:14: error: 'IVTV_STOP_FL_HIDE_FRAME' undeclared (first use in this function)

vo_ivtv.c:84:14: note: each undeclared identifier is reported only once for each function it appears in

vo_ivtv.c:87:23: error: 'IVTV_IOC_STOP_DECODE' undeclared (first use in this function)

vo_ivtv.c:97:23: error: 'IVTV_IOC_START_DECODE' undeclared (first use in this function)

vo_ivtv.c:80:32: warning: unused variable 'sd1'

vo_ivtv.c:79:31: warning: unused variable 'sd'

make[1]: *** [vo_ivtv.o] Error 1

解决方法,在 安装 MPlayer时: ./configure --disable-ivtv

即:

sudo ./configure --cc=/usr/local/arm/arm-none-linux-gnueabi-2010-09-50/bin/arm-none-linux-gnueabi-gcc --target=arm-none-linux-gnueabi --enable-static --prefix=/tmp/mplayer-rc2 --disable-win32dll --disable-dvdread --enable-fbdev --disable-mencoder --disable-live
--disable-mp3lib --enable-mad --enable-libavcodec_a --language=zh_CN --disable-armv5te --disable-armv6 --with-extraincdir=/usr/local/arm/arm-none-linux-gnueabi-2010-09-50/lib/include --with-extralibdir=/usr/local/arm/arm-none-linux-gnueabi-2010-09-50/lib/lib
--host-cc=gcc --enable-ossaudio --disable-ivtv --disable-tv

注意配置之前先make clean一下。

再make,提示如下错误:

ioctl.c: In function 'ioctl_ReadCopyright':

ioctl.c:273:5: error: #error "DVD ioctls are unavailable on this system"

ioctl.c: In function 'ioctl_ReadDiscKey':

ioctl.c:446:5: error: #error "DVD ioctls are unavailable on this system"

ioctl.c: In function 'ioctl_ReadTitleKey':

ioctl.c:610:5: error: #error "DVD ioctls are unavailable on this system"

ioctl.c: In function 'ioctl_ReportAgid':

ioctl.c:734:5: error: #error "DVD ioctls are unavailable on this system"

ioctl.c: In function 'ioctl_ReportChallenge':

ioctl.c:868:5: error: #error "DVD ioctls are unavailable on this system"

ioctl.c: In function 'ioctl_ReportASF':

ioctl.c:1001:5: error: #error "DVD ioctls are unavailable on this system"

ioctl.c: In function 'ioctl_ReportKey1':

ioctl.c:1130:5: error: #error "DVD ioctls are unavailable on this system"

ioctl.c: In function 'ioctl_InvalidateAgid':

ioctl.c:1241:5: error: #error "DVD ioctls are unavailable on this system"

ioctl.c: In function 'ioctl_SendChallenge':

ioctl.c:1378:5: error: #error "DVD ioctls are unavailable on this system"

ioctl.c: In function 'ioctl_SendKey2':

ioctl.c:1515:5: error: #error "DVD ioctls are unavailable on this system"

ioctl.c: In function 'ioctl_ReportRPC':

ioctl.c:1670:5: error: #error "DVD ioctls are unavailable on this system"

ioctl.c: In function 'ioctl_SendRPC':

ioctl.c:1797:5: error: #error "DVD ioctls are unavailable on this system"

make[1]: *** [ioctl.o] Error 1

make[1]: Leaving directory `/home/lqm/tools/mplayer/MPlayer-1.0rc2/libdvdcss'

make: *** [libdvdcss/libdvdcss.a] 错误 2

找到ioctl.c的相应行,全部屏掉,再编译,编译成功。

第三步:将生成的mplayer拷贝到外置的SD卡中,同时拷贝要播放的mp3或者视频文件,再将SD卡插到

x210开发板右边的SD卡卡槽中。

第四步:挂载SD卡并播放音视频文件:

mount /dev/mmcblk1p1 /tmp

cd /tmp

./mplayer *.mp3

/mplayer *.mp4

如果不想自己编译,可以直接在光盘中拷贝已经编译好的mplayer。

来一张x210开发板的图:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: