openwrt编译用于mt7688的mplayer

1.首先设置环境变量/etc/environment


2.把mplayer的源码拷贝于openwrt的package/mplayer/src下。

3.在openwrt 的package/mplayer/下新建一个Makefile

include $(TOPDIR)/rules.mk


# Name and release number of this package
PKG_NAME:=mplayer
PKG_RELEASE:=1


PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)


include $(INCLUDE_DIR)/package.mk


# Specify package information for this program.
# The variables defined here should be self explanatory.
# If you are running Kamikaze, delete the DESCRIPTION
# variable below and uncomment the Kamikaze define
# directive for the description below
define Package/mplayer
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=mplayer with wma fixed-point decoder
  DEPENDS:=+libmad +libasound +libncurses +liblzo +zlib +libjpeg +librt +libpthread
endef




# Uncomment portion below for Kamikaze and delete DESCRIPTION variable above
define Package/mplayer/description
endef


 


# Specify what needs to be done to prepare for building the package.
# In our case, we need to copy the source files to the build directory.
# This is NOT the default.  The default uses the PKG_SOURCE_URL and the
# PKG_SOURCE which is not defined here to download the source from the web.
# In order to just build a simple program that we have just written, it is
# much easier to do it this way.
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef




define Package/mplayer/install
$(INSTALL_DIR) $(1)/bin
$(CP) $(BUILD_DIR)/alsa-lib-1.0.28/ipkg-install/usr/lib/libasound.so* $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mplayer $(1)/bin/
endef




# This line executes the necessary commands to compile our program.
# The above define directives specify all the information needed, but this
# line calls BuildPackage which in turn actually uses this information to
# build a package.
$(eval $(call BuildPackage,mplayer))

4.在mplayer/src下新建配置文件build-alsa.sh,然后运行脚本

#!/bin/sh
./configure --host-cc=gcc \
--cc=mipsel-openwrt-linux-gcc \
--target=mips-linux \
--enable-linux-devfs \
--disable-dvdread \
--enable-fbdev \
--enable-libwma \
\
--enable-mad \
--enable-pthreads \
--enable-jpeg \
--enable-liblzo \
--disable-ladspa \
\
--ranlib=arm-linux-ranlib \
--disable-mencoder \
--disable-liba52 \
--disable-live \
--disable-mp3lib \
--enable-alsa \
--disable-ossaudio \
--disable-libavcodec_a \
--disable-libavformat_a \
--disable-libpostproc_a \
--disable-bitmap-font \
--disable-ivtv \
--disable-tv \
--disable-tga \
--disable-pnm \
--disable-md5sum \
--disable-libmpeg2 \
--disable-w32threads \
--disable-win32dll \
--disable-win32waveout \
--disable-qtx \
--disable-xanim \
--disable-libmpeg2 \
--disable-radio-v4l2 \
--disable-radio-bsdbt848 \
--disable-tv-v4l1 \
--disable-tv-v4l2 \
--disable-tv-bsdbt848 \
--disable-tv-teletext \
--disable-pvr \
--disable-mp3lib \
--disable-liba52 \
--disable-libmpeg2 \
--disable-decoder=DECODER \
--disable-encoder=ENCODER \
--disable-parser=PARSER   \
--disable-demuxer=DEMUXER  \
--disable-muxer=MUXER \
--with-extraincdir=/home/kevin/widora3/openwrt_widora/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/include \
--with-extralibdir=/home/kevin/widora3/openwrt_widora/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib

5.为了防止一会编译的时候再configure,所有打开configure在开头加:

return 0

6.完成,可以编译了,编译过程中缺少什么需要在openwrt中make menuconfig 添加库。


openwrt-RG100A-DB120 按钮 LED完美 网络收音机 网络摄像头 dreambox版: dreambox-RG100A_DB120.bin openwrt标准版: openwrt-RG100A_DB120-squashfs.bin 2012-2-5 添加按键脚本,控制mplayer换台 DB120在终端下运行mplayer,按wlan 0-1秒为 暂停,2-5秒为下一首或换台,按住6秒以上关闭mplayer DB120 WLAN键控制mplayer示例 /etc/config/system添加如下内容 config 'button' option 'button' 'BTN_1' option 'action' 'released' option 'handler' 'echo pause > /tmp/fifofile' option 'min' '0' option 'max' '1' config 'button' option 'button' 'BTN_1' option 'action' 'released' option 'handler' 'echo pt_step 1 > /tmp/fifofile' option 'min' '2' option 'max' '5' config 'button' option 'button' 'BTN_1' option 'action' 'released' option 'handler' 'echo quit > /tmp/fifofile' option 'min' '6' option 'max' '10' RG100A请修改/etc/config/system,把BTN_1改成BTN_2或BTN_3 BTN_0 RESET(DB120,RG100A均有效) BTN_1 DB120:WLAN BTN_2 WPS(DB120,RG100A均有效) BTN_3 RG100A:WLAN /usr/share/mplayer/playlist为网络电台地址或播放列表 好像比难懂,不清楚的请移步openwrt wiki 下周开始上班,不再折腾了,更新到此为止 http://115.com/file/dp2xpvc4# openwrt-RG100A_DB120-squashfs.bin 基于官方 OpenWrt Backfire 10.03.1 编译而成 刷了很多固件不是无线客户端不能用,就是N2N不能用,要不就是摄像头有问题 总是不能完美,只能自己动手,丰衣足食,所以集成的软件都是我自己要用的, 另外塞了个别人编译好的mplayer在/usr/bin 下面,因为mplayer有近3M,所以固件有点大 power和internet为双色LED,触发用time, 调整红色和绿色分量,可以显示绿色,橙色,红色等, 美中不足的是红灯太亮了,绿灯太弱,有条件的换下LED限流电阻 3个按钮定义 BTN_0 RESET 按住8秒后放开,系统复位 BTN_1 WLAN 无线开关 BTN_2 WPS umount 以后不要手贱,随便捅菊花了,你懂的 基本完美了,发挥你的想象吧 网盘附件 DB120-WG-squashfs.binhttp://115.com/file/be4t921t# 集成软件列表: 软件包名称 版本 alsa-lib 1.0.24.1-1 alsa-utils 1.0.24.2-1 base-files 43.32-r29685 block-mount 0.1.0-2.2 bridge 1.4-1 busybox 1.15.3-3.4 bzip2 1.0.6-1 crda 1.1.1-1 dnsmasq 2.55-6.1 dropbear 0.53.1-5 firewall 2-34.8 gpioctl 1.0-1 hd-idle 1.03-1 hotplug2 1.0-beta-3 iptables 1.4.6-3.1 iptables-mod-conntrack 1.4.6-3.1 iptables-mod-conntrack-extra 1.4.6-3.1 iptables-mod-filter 1.4.6-3.1 iptables-mod-imq 1.4.6-3.1 iptables-mod-ipopt 1.4.6-3.1 iptables-mod-nat 1.4.6-3.1 iw 0.9.22-2 kernel 2.6.32.27-1 kmod-b43 2.6.32.27+2011-12-01-1 kmod-button-hotplug 2.6.32.27-1 kmod-cfg80211 2.6.32.27+2011-12-01-1 kmod-crc-ccitt 2.6.32.27-1 kmod-crypto-aes 2.6.32.27-1 kmod-crypto-arc4 2.6.32.27-1 kmod-crypto-core 2.6.32.27-1 kmod-fs-ext2 2.6.32.27-1 kmod-fs-ext3 2.6.32.27-1 kmod-fuse 2.6.32.27-1 kmod-i2c-core 2.6.32.27-1 kmod-input-core 2.6.32.27-1 kmod-input-gpio-buttons 2.6.32.27-1 kmod-input-polldev 2.6.32.27-1 kmod-ipt-conntrack 2.6.32.27-1 kmod-ipt-conntrack-extra 2.6.32.27-1 kmod-ipt-core 2.6.32.27-1 kmod-ipt-filter 2.6.32.27-1 kmod-ipt-imq 2.6.32.27-1 kmod-ipt-ipopt 2.6.32.27-1 kmod-ipt-nat 2.6.32.27-1 kmod-mac80211 2.6.32.27+2011-12-01-1 kmod-nls-cp437 2.6.32.27-1 kmod-nls-iso8859-1 2.6.32.27-1 kmod-nls-utf8 2.6.32.27-1 kmod-ppp 2.6.32.27-1 kmod-sched 2.6.32.27-1 kmod-scsi-core 2.6.32.27-1 kmod-sound-core 2.6.32.27-1 kmod-switch 2.6.32.27-4 kmod-textsearch 2.6.32.27-1 kmod-tun 2.6.32.27-1 kmod-usb-audio 2.6.32.27-1 kmod-usb-core 2.6.32.27-1 kmod-usb-ohci 2.6.32.27-1 kmod-usb-printer 2.6.32.27-1 kmod-usb-storage 2.6.32.27-1 kmod-usb-uhci 2.6.32.27-1 kmod-usb2 2.6.32.27-1 kmod-video-core 2.6.32.27-1 kmod-video-uvc 2.6.32.27-1 kmod-zd1211rw 2.6.32.27+2011-12-01-1 lame-lib 398-2-3 libao 1.1.0-1 libc 0.9.30.1-43.32 libevent 1.4.14b-1 libfaad2 2.7-1 libffmpeg 0.5.4-2 libfuse 2.8.3-1 libgcc 4.3.3+cs-43.32 libgsm 1.0.13-1 libiconv 5 libiconv-full 1.11.1-1 libid3tag 0.15.1b-3 libip4tc 1.4.6-3.1 libiwinfo 18 libiwinfo-lua 18 libjpeg 6b-1 libltdl 2.4-1 liblua 5.1.4-7 liblzo 2.04-1 libmad 0.15.1b-3 libncurses 5.7-2 libnl-tiny 0.1-1 libogg 1.1.4-2 libopenssl 0.9.8s-1 libpthread 0.9.30.1-43.32 librrd1 1.0.50-1 librt 0.9.30.1-43.32 libsamplerate 0.1.7-1 libsndfile 1.0.21-1 libuci 12012009.7-4 libuci-lua 12012009.7-4 libusb-1.0 1.0.8-1 libv4l 0.6.1-1 libvorbis 1.2.3-1 libvorbisidec 1.0.2+svn14261-1 libxtables 1.4.6-3.1 lua 5.1.4-7 luci 0.10.0-1 luci-app-firewall 0.10.0-1 luci-app-hd-idle 0.10.0-1 luci-app-ntpc 0.10.0-1 luci-app-qos 0.10.0-1 luci-app-samba 0.10.0-1 luci-app-voice-core 0.10.0-1 luci-i18n-chinese 0.10.0-1 luci-i18n-english 0.10.0-1 luci-lib-core 0.10.0-1 luci-lib-ipkg 0.10.0-1 luci-lib-lmo 0.10.0-1 luci-lib-lucid 0.10.0-1 luci-lib-lucid-http 0.10.0-1 luci-lib-nixio 0.10.0-1 luci-lib-px5g 0.10.0-1 luci-lib-sys 0.10.0-1 luci-lib-web 0.10.0-1 luci-mod-admin-core 0.10.0-1 luci-mod-admin-full 0.10.0-1 luci-proto-core 0.10.0-1 luci-proto-ppp 0.10.0-1 luci-sgi-cgi 0.10.0-1 luci-theme-base 0.10.0-1 luci-theme-openwrt 0.10.0-1 mjpg-streamer r136-1 motion 3.2.11.1-1 mtd 13 mutt 1.5.21-1 n2n 3875-1 ntfs-3g 2011.4.12-1-fuseext ntpclient 2007_365-4 openssl-util 0.9.8s-1 opkg 576-2 qos-scripts 1.2.1-3.2 resolveip 1 samba3 3.0.24-8 screen 4.0.3-2 sox 14.0.1-3 ssmtp 2.64-3 tc 2.6.29-1-2 uci 12012009.7-4 udevtrigger 106-1 uhttpd 28 usbutils 003-1 wireless-tools 29-4 wpad-mini 20111103-2 zlib 1.2.3-5
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

鱼入大海_

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值