armhisiv100linux,在海思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, std::allocator >::~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。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值