lubing521

lubing521

0个粉丝

20

问答

0

专栏

11

资料

lubing521  发布于  2015-02-01 23:41:24
采纳率 0%
20个问答
12159

ar9331在openwrt下sn9c292使用rtsp 看流

   
        今天发力,把以前在rt5350 基于sdk的sn9c291的rtsp 移植到了ar9331的openwrt
驱动的完成前面已经发过帖子。
        在这里不得不吐槽下openwrt,或许不习惯吧。以前调试添加个应用程序自己创建个工程
make做出来app后拷贝到rootfs即可,而openwrt则较麻烦。即使拷贝到rootfs下,执行make后
发现没了。
        不得不按照其套路来做package。
在package目录下创建自己的app应用文件夹



仿照制作个makefile,这个makefile和我们以往不太一样,我理解为制作打包工具用的

#
# Copyright (C) 2009-2010 Jo-Philipp Wich <[email]xm@subsignal.org[/email]>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=SRServer
PKG_RELEASE:=9

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

include $(INCLUDE_DIR)/package.mk

define Package/SRServer
  SECTION:=utils
  CATEGORY:=Base system
  TITLE:=Userspace rtsp server for the sn9c292 SRServer
  MAINTAINER:=gary <[email]lb2421428@126.com[/email]>
#DEPENDS:=@TARGET_brcm47xx||@TARGET_ar71xx
  DEPENDS:=+librt +libpthread
endef

define Package/SRServer/description
This package contains an utility to manipulate SRServer on ar9331 based devices.
endef

define Build/Prepare
        mkdir -p $(PKG_BUILD_DIR)
        $(CP) ./src/* $(PKG_BUILD_DIR)/
endef

define Build/Configure
endef

define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                CC="$(TARGET_CC)" \
                CFLAGS="$(TARGET_CFLAGS) -Wall" \
                LDFLAGS="$(TARGET_LDFLAGS)"
endef

define Package/SRServer/install
#        $(INSTALL_DIR) $(1)/etc/init.d
#        $(INSTALL_BIN) ./files/SRServer.init $(1)/etc/init.d/SRServer
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/SRServer $(1)/usr/sbin/
#        $(INSTALL_DIR) $(1)/usr/lib
endef

$(eval $(call BuildPackage,SRServer))





执行make menuconfig 将看到makefile中给出的选项  DEPENDS:=+librt +libpthread




这个提一下,因为程序使用到了pthread 及rt库,所以必须加上依赖库
否则make后发现提示缺少程序所依赖的库

  DEPENDS:=+librt +libpthread

最终生成我所期待的安装包了



然后将
openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin

烧写到wr703n运行



我来回答
回答2个
时间排序
认可量排序

fox-cool

0个粉丝

9

问答

0

专栏

0

资料

fox-cool 2015-11-26 14:04:27
认可0
搂主  MTK7620A这个芯片怎么样?

lubing521

0个粉丝

20

问答

0

专栏

11

资料

lubing521 2015-12-01 12:36:00
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=22653&ptid=5329]fox-cool 发表于 2015-11-26 14:04[/url]
搂主  MTK7620A这个芯片怎么样?[/quote]

这个IC好多公司在用,应该不错。
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区