merge from srs2 for pi and cubie.

pull/556/head
winlin 10 years ago
commit d94a88a797

@ -1099,6 +1099,7 @@ Winlin
[bug #380]: https://github.com/simple-rtmp-server/srs/issues/380 [bug #380]: https://github.com/simple-rtmp-server/srs/issues/380
[bug #474]: https://github.com/simple-rtmp-server/srs/issues/474 [bug #474]: https://github.com/simple-rtmp-server/srs/issues/474
[bug #484]: https://github.com/simple-rtmp-server/srs/issues/484 [bug #484]: https://github.com/simple-rtmp-server/srs/issues/484
[bug #485]: https://github.com/simple-rtmp-server/srs/issues/485
[bug #475]: https://github.com/simple-rtmp-server/srs/issues/475 [bug #475]: https://github.com/simple-rtmp-server/srs/issues/475
[bug #458]: https://github.com/simple-rtmp-server/srs/issues/458 [bug #458]: https://github.com/simple-rtmp-server/srs/issues/458
[bug #454]: https://github.com/simple-rtmp-server/srs/issues/454 [bug #454]: https://github.com/simple-rtmp-server/srs/issues/454

@ -42,7 +42,7 @@ function Ubuntu_prepare()
fi fi
fi fi
# for arm, install the cross build tool chain. # cross build for arm, install the cross build tool chain.
if [ $SRS_ARM_UBUNTU12 = YES ]; then if [ $SRS_ARM_UBUNTU12 = YES ]; then
$SrsArmCC --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then $SrsArmCC --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi" echo "install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi"
@ -52,7 +52,7 @@ function Ubuntu_prepare()
fi fi
fi fi
# for mips, user must installed the tool chain. # cross build for mips, user must installed the tool chain.
if [ $SRS_MIPS_UBUNTU12 = YES ]; then if [ $SRS_MIPS_UBUNTU12 = YES ]; then
$SrsArmCC --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then $SrsArmCC --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "user must install the tool chain: $SrsArmCC" echo "user must install the tool chain: $SrsArmCC"
@ -147,7 +147,7 @@ function Centos_prepare()
return 0; return 0;
fi fi
# for arm, install the cross build tool chain. # cross build for arm, install the cross build tool chain.
if [ $SRS_CROSS_BUILD = YES ]; then if [ $SRS_CROSS_BUILD = YES ]; then
echo "embeded(arm/mips) is invalid for CentOS" echo "embeded(arm/mips) is invalid for CentOS"
return 1 return 1
@ -252,7 +252,7 @@ function OSX_prepare()
return 0; return 0;
fi fi
# for arm, install the cross build tool chain. # cross build for arm, install the cross build tool chain.
if [ $SRS_CROSS_BUILD = YES ]; then if [ $SRS_CROSS_BUILD = YES ]; then
echo "embeded(arm/mips) is invalid for OSX" echo "embeded(arm/mips) is invalid for OSX"
return 1 return 1
@ -377,7 +377,7 @@ fi
# st-1.9 # st-1.9
##################################################################################### #####################################################################################
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
# check the arm flag file, if flag changed, need to rebuild the st. # check the cross build flag file, if flag changed, need to rebuild the st.
_ST_MAKE=linux-debug && _ST_EXTRA_CFLAGS="EXTRA_CFLAGS=-DMD_HAVE_EPOLL" _ST_MAKE=linux-debug && _ST_EXTRA_CFLAGS="EXTRA_CFLAGS=-DMD_HAVE_EPOLL"
# for osx, use darwin for st, donot use epoll. # for osx, use darwin for st, donot use epoll.
if [ $OS_IS_OSX = YES ]; then if [ $OS_IS_OSX = YES ]; then
@ -387,7 +387,7 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
# @see: https://github.com/simple-rtmp-server/srs/issues/197 # @see: https://github.com/simple-rtmp-server/srs/issues/197
if [ $SRS_CROSS_BUILD = YES ]; then if [ $SRS_CROSS_BUILD = YES ]; then
# ok, arm specified, if the flag filed does not exists, need to rebuild. # ok, arm specified, if the flag filed does not exists, need to rebuild.
if [[ -f ${SRS_OBJS}/_flag.st.arm.tmp && -f ${SRS_OBJS}/st/libst.a ]]; then if [[ -f ${SRS_OBJS}/_flag.st.cross.build.tmp && -f ${SRS_OBJS}/st/libst.a ]]; then
echo "st-1.9t for arm is ok."; echo "st-1.9t for arm is ok.";
else else
# TODO: FIXME: patch the bug. # TODO: FIXME: patch the bug.
@ -401,13 +401,14 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
patch -p0 < ../../3rdparty/patches/4.st.disable.examples.patch && patch -p0 < ../../3rdparty/patches/4.st.disable.examples.patch &&
make ${_ST_MAKE} CC=${SrsArmCC} AR=${SrsArmAR} LD=${SrsArmLD} RANDLIB=${SrsArmRANDLIB} ${_ST_EXTRA_CFLAGS} && make ${_ST_MAKE} CC=${SrsArmCC} AR=${SrsArmAR} LD=${SrsArmLD} RANDLIB=${SrsArmRANDLIB} ${_ST_EXTRA_CFLAGS} &&
cd .. && rm -rf st && ln -sf st-1.9/obj st && cd .. && rm -rf st && ln -sf st-1.9/obj st &&
cd .. && touch ${SRS_OBJS}/_flag.st.arm.tmp cd .. && touch ${SRS_OBJS}/_flag.st.cross.build.tmp
) )
fi fi
else else
if [[ ! -f ${SRS_OBJS}/_flag.st.arm.tmp && -f ${SRS_OBJS}/st/libst.a ]]; then if [[ ! -f ${SRS_OBJS}/_flag.st.cross.build.tmp && -f ${SRS_OBJS}/st/libst.a ]]; then
echo "st-1.9t is ok."; echo "st-1.9t is ok.";
else else
# patch st for arm, @see: https://github.com/simple-rtmp-server/srs/wiki/v1_CN_SrsLinuxArm#st-arm-bug-fix
echo "build st-1.9t"; echo "build st-1.9t";
( (
rm -rf ${SRS_OBJS}/st-1.9 && cd ${SRS_OBJS} && rm -rf ${SRS_OBJS}/st-1.9 && cd ${SRS_OBJS} &&
@ -417,7 +418,7 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
patch -p0 < ../../3rdparty/patches/4.st.disable.examples.patch && patch -p0 < ../../3rdparty/patches/4.st.disable.examples.patch &&
make ${_ST_MAKE} ${_ST_EXTRA_CFLAGS} && make ${_ST_MAKE} ${_ST_EXTRA_CFLAGS} &&
cd .. && rm -rf st && ln -sf st-1.9/obj st && cd .. && rm -rf st && ln -sf st-1.9/obj st &&
cd .. && rm -f ${SRS_OBJS}/_flag.st.arm.tmp cd .. && rm -f ${SRS_OBJS}/_flag.st.cross.build.tmp
) )
fi fi
fi fi
@ -429,7 +430,7 @@ fi
##################################################################################### #####################################################################################
# http-parser-2.1 # http-parser-2.1
##################################################################################### #####################################################################################
# check the arm flag file, if flag changed, need to rebuild the st. # check the cross build flag file, if flag changed, need to rebuild the st.
if [ $SRS_HTTP_CORE = YES ]; then if [ $SRS_HTTP_CORE = YES ]; then
# ok, arm specified, if the flag filed does not exists, need to rebuild. # ok, arm specified, if the flag filed does not exists, need to rebuild.
if [ $SRS_CROSS_BUILD = YES ]; then if [ $SRS_CROSS_BUILD = YES ]; then
@ -447,7 +448,7 @@ if [ $SRS_HTTP_CORE = YES ]; then
) )
fi fi
else else
# arm not specified, if exists flag, need to rebuild for no-arm platform. # cross build not specified, if exists flag, need to rebuild for no-arm platform.
if [[ ! -f ${SRS_OBJS}/_flag.st.hp.tmp && -f ${SRS_OBJS}/hp/http_parser.h && -f ${SRS_OBJS}/hp/libhttp_parser.a ]]; then if [[ ! -f ${SRS_OBJS}/_flag.st.hp.tmp && -f ${SRS_OBJS}/hp/http_parser.h && -f ${SRS_OBJS}/hp/libhttp_parser.a ]]; then
echo "http-parser-2.1 is ok."; echo "http-parser-2.1 is ok.";
else else
@ -613,10 +614,10 @@ if [ $SRS_SSL = YES ]; then
if [ $SRS_USE_SYS_SSL = YES ]; then if [ $SRS_USE_SYS_SSL = YES ]; then
echo "warning: donot compile ssl, use system ssl" echo "warning: donot compile ssl, use system ssl"
else else
# check the arm flag file, if flag changed, need to rebuild the st. # check the cross build flag file, if flag changed, need to rebuild the st.
if [ $SRS_CROSS_BUILD = YES ]; then if [ $SRS_CROSS_BUILD = YES ]; then
# ok, arm specified, if the flag filed does not exists, need to rebuild. # ok, arm specified, if the flag filed does not exists, need to rebuild.
if [[ -f ${SRS_OBJS}/_flag.ssl.arm.tmp && -f ${SRS_OBJS}/openssl/lib/libssl.a ]]; then if [[ -f ${SRS_OBJS}/_flag.ssl.cross.build.tmp && -f ${SRS_OBJS}/openssl/lib/libssl.a ]]; then
echo "openssl-1.0.1f for arm is ok."; echo "openssl-1.0.1f for arm is ok.";
else else
echo "build openssl-1.0.1f for arm"; echo "build openssl-1.0.1f for arm";
@ -628,12 +629,12 @@ if [ $SRS_SSL = YES ]; then
LD=${SrsArmLD} LINK=${SrsArmGCC} RANDLIB=${SrsArmRANDLIB} && LD=${SrsArmLD} LINK=${SrsArmGCC} RANDLIB=${SrsArmRANDLIB} &&
make install_sw && make install_sw &&
cd .. && rm -rf openssl && ln -sf openssl-1.0.1f/_release openssl && cd .. && rm -rf openssl && ln -sf openssl-1.0.1f/_release openssl &&
cd .. && touch ${SRS_OBJS}/_flag.ssl.arm.tmp cd .. && touch ${SRS_OBJS}/_flag.ssl.cross.build.tmp
) )
fi fi
else else
# arm not specified, if exists flag, need to rebuild for no-arm platform. # cross build not specified, if exists flag, need to rebuild for no-arm platform.
if [[ ! -f ${SRS_OBJS}/_flag.ssl.arm.tmp && -f ${SRS_OBJS}/openssl/lib/libssl.a ]]; then if [[ ! -f ${SRS_OBJS}/_flag.ssl.cross.build.tmp && -f ${SRS_OBJS}/openssl/lib/libssl.a ]]; then
echo "openssl-1.0.1f is ok."; echo "openssl-1.0.1f is ok.";
else else
echo "build openssl-1.0.1f"; echo "build openssl-1.0.1f";
@ -643,7 +644,7 @@ if [ $SRS_SSL = YES ]; then
$CONFIGURE_TOOL --prefix=`pwd`/_release -no-shared $OPENSSL_HOTFIX && $CONFIGURE_TOOL --prefix=`pwd`/_release -no-shared $OPENSSL_HOTFIX &&
make && make install_sw && make && make install_sw &&
cd .. && rm -rf openssl && ln -sf openssl-1.0.1f/_release openssl && cd .. && rm -rf openssl && ln -sf openssl-1.0.1f/_release openssl &&
cd .. && rm -f ${SRS_OBJS}/_flag.ssl.arm.tmp cd .. && rm -f ${SRS_OBJS}/_flag.ssl.cross.build.tmp
) )
fi fi
fi fi

@ -135,8 +135,8 @@ Options:
--with-gmp build memory profile for SRS with gperf tools. --with-gmp build memory profile for SRS with gperf tools.
--with-gcp build cpu profile for SRS with gperf tools. --with-gcp build cpu profile for SRS with gperf tools.
--with-gprof build SRS with gprof(GNU profile tool). --with-gprof build SRS with gprof(GNU profile tool).
--with-arm-ubuntu12 build SRS on ubuntu12 for armhf(v7cpu). --with-arm-ubuntu12 cross build SRS on ubuntu12 for armhf(v7cpu).
--with-mips-ubuntu12 build SRS on ubuntu12 for mips. --with-mips-ubuntu12 cross build SRS on ubuntu12 for mips.
--without-ssl disable rtmp complex handshake. --without-ssl disable rtmp complex handshake.
--without-hls disable hls, the apple http live streaming. --without-hls disable hls, the apple http live streaming.
@ -160,8 +160,8 @@ Options:
--without-gmp do not build memory profile for SRS with gperf tools. --without-gmp do not build memory profile for SRS with gperf tools.
--without-gcp do not build cpu profile for SRS with gperf tools. --without-gcp do not build cpu profile for SRS with gperf tools.
--without-gprof do not build srs with gprof(GNU profile tool). --without-gprof do not build srs with gprof(GNU profile tool).
--without-arm-ubuntu12 do not build srs on ubuntu12 for armhf(v7cpu). --without-arm-ubuntu12 do not cross build srs on ubuntu12 for armhf(v7cpu).
--without-mips-ubuntu12 do not build srs on ubuntu12 for mips. --without-mips-ubuntu12 do not cross build srs on ubuntu12 for mips.
--prefix=<path> the absolute install path for srs. --prefix=<path> the absolute install path for srs.
--static whether add '-static' to link options. --static whether add '-static' to link options.

Loading…
Cancel
Save