在海思hisiv100nptl平台上交叉编译并安装SRS

./configure --with-arm-ubuntu12 && make

需要安装:

apt-get installgcc-arm-linux-gnueabi     ,hi3516C是用的arm-hisiv100-nptl-gcc

需要替换gcc-arm-linux-gnueabi为arm-hisiv100-nptl-gcc

auto# gedit setup_variables.sh

# when arm specified, setup the cross buildvariables.

if [ $SRS_ARM_UBUNTU12 = YES ]; then

    __SrsArmCC="arm-hisiv100nptl-linux-gcc";

   __SrsArmGCC="arm-hisiv100nptl-linux-gcc";

   __SrsArmCXX="arm-hisiv100nptl-linux-g++";

   __SrsArmAR="arm-hisiv100nptl-linux-ar";

   __SrsArmLD="arm-hisiv100nptl-linux-ld";

   __SrsArmRANDLIB="arm-hisiv100nptl-linux-ranlib";

Fi

但编译build openssl-1.0.1f碰到问题,直接修改Makefile进行单独交叉编译就行。

Make&&makeinstall。

编译时出现链接问题:

/home/ossrs/srs-hisi/trunk/src/protocol/srs_rtmp_utility.cpp:85:undefined reference to `std::basic_string<char,std::char_traits<char>, std::allocator<char> >::~basic_string()'

/home/ossrs/srs-hisi/trunk/src/protocol/srs_raw_avc.cpp:538:undefined reference to `operator new[](unsigned int)'

dso_dlfcn.c:(.text+0x1c):undefined reference to `dlopen'

感觉应该是编译工具、链接库出了问题,可能是不兼容。

CPU: ARM926EJ-S[41069265] revision 5 (ARMv5TEJ), cr=00053177

CPU: VIVT datacache, VIVT instruction cache

Machine: hi3518

按下面的办法修改一下librtmp下面的Makefile中的gcc定义就可以。

Vi research/librtmp/Makefile

GCC= arm-hisiv100nptl-linux-gcc

 

# for arm.

ifeq ($(GCC),arm-hisiv100nptl-linux-gcc)

    EXTRA_CXX_FLAG = -g -O0 -ldl -static-lstdc++

Endif

编译生成

ls objs/srs -l

-rwxr-xr-x 1 rootroot 11307924 2016-01-20 22:59 objs/srs

大小居然有11M之多,明显没有strip。Strip后有3.6MB,勉强可以接受。

 

注意:

在x86上面编译,如果-without-ssl的话,可以发布rtmp url成功,但连上去没有流。所以,--with-http-callback –with-ssl必须包括在里面。

 

安装实施:

# ./srs -cconf/srs.conf 

[2016-01-0101:24:43.839][trace][754][0] config parse complete

[2016-01-0101:24:43.904][trace][754][0] write log to file ./objs/srs.log

[2016-01-0101:24:43.904][trace][754][0] you can: tailf ./objs/srs.log

[2016-01-0101:24:43.905][trace][754][0] @see:https://github.com/ossrs/srs/wiki/v1_CN_SrsLog

#

# ../RtxpServer&

# ../RtxpServerbuild time=20160120-2125, log is /tmp/tcpsvr.log.

 

http://winlinvip.github.io/srs.release/trunk/research/players/srs_player.html?server=192.168.3.1&app=live&stream=0&port=1935

播放rtmp://192.168.3.1:1935/live/0

一切正常!可以看到流,听到声音。


交流请加QQ群: 194257702。


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

草根大哥

进军大神程序员路上,谢谢支持!

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

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

打赏作者

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

抵扣说明:

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

余额充值