MetaRTC arm32 CMake交叉编译

scp -o HostKeyAlgorithms=+ssh-dss srsclient root@192.168.100.232:/usr/app

ssh -o HostKeyAlgorithms=+ssh-dss root@192.168.100.232

telnet 192.168.100.232
root
hotdog

cat /proc/asound/cards

set(CMAKE_SYSTEM_NAME Linux)#系统设置
set(CMAKE_SYSTEM_PROCESSOR arm)//平台设置
set(CMAKE_C_COMPILER “/home/yqw/MetaRTC/BC/stbgcc-6.3-1.1/bin/arm-linux-gcc”)//c编译器
set(CMAKE_CXX_COMPILER “/home/yqw/MetaRTC/BC/stbgcc-6.3-1.1/bin/arm-linux-g++”)//c++编译器

//编写cmakelist.txt
gedit arm32.cmake
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_C_COMPILER /home/yqw/MetaRTC/BC/stbgcc-6.3-1.1/bin/arm-linux-gcc)
SET(CMAKE_CXX_COMPILER /home/yqw/MetaRTC/BC/stbgcc-6.3-1.1/bin/arm-linux-g++)

//编写执行脚本
gedit cmake_arm32.sh
rm -rf build
mkdir build
cd build
ARCH=arm32.cmake
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=…/$ARCH -DCMAKE_INSTALL_PREFIX=./ …
make -j8

git clone https://chromium.googlesource.com/libyuv/libyuv
git reset --hard ec6f15079ff373b7651698a68bba7244b3556981
./cmake_arm32.sh

git clone https://github.com/xiph/speexdsp.git
git reset --hard 9b2846a4472c38660d6aec7a180daa5dc77ab2d3
./autogen.sh
./configure --prefix=“/home/yqw/MetaRTC/meta-rtc-push-BC/thirdSRC/speexdsp/build” --host=“arm-linux” --enable-static --enable-shared CC=/home/yqw/MetaRTC/BC/stbgcc-6.3-1.1/bin/arm-linux-gcc
make
make install
如果加上–enable-sse会报错 configure: error: No 16 bit type found on this platform!

https://www.opus-codec.org/
libopus 1.5.2
./configure --prefix=“/home/yqw/MetaRTC/meta-rtc-push-BC/thirdSRC/opus-1.5.2/build” --host=“arm-linux” --enable-static --enable-shared CC=/home/yqw/MetaRTC/BC/stbgcc-6.3-1.1/bin/arm-linux-gcc
make
make install

git clone https://gitee.com/yzyonly/yangh264decoder.git
git reset --hard dcbcce29661253bd44db2b2e4098c5c6e9533f16
./cmake_arm32.sh

//文末附有另外一种编译方式
//用的3.3
//libcrypto2.a libssl2.a
https://www.openssl.org/source/
openssl-3.3.0
./config no-asm shared no-async --prefix=$(pwd)/install --cross-compile-prefix=/home/yqw/MetaRTC/BC/stbgcc-6.3-1.1/bin/arm-linux-
make -j20

官方地址:Release v5.0-b1
csdn地址
如果最终运行报错,很可能是openssl版本或者配置参数的问题,作者有编译好的版本,有多个平台,rv1126,mstar336,js_tc,编译好的库有crypto.a,libopus.a,libsrtp2.a,libssl.a,libusrsctp.a。
官方地址:Release v5.0-b1
这些库+Release v7.0-b0在rk1126下正常运行。

libsrtp2.a
wget https://github.com/cisco/libsrtp/archive/v2.2.0.tar.gz
./configure --prefix=“/home/yqw/MetaRTC/meta-rtc-push-BC/thirdSRC/libsrtp-2.2.0/build” --host=“arm-linux” --enable-static --enable-shared CC=/home/yqw/MetaRTC/BC/stbgcc-6.3-1.1/bin/arm-linux-gcc
make -j20

libasound.a
https://github.com/alsa-project/alsa-lib/releases/tag/v1.2.11
libtoolize --force --copy --automake
aclocal
autoheader
automake --foreign --copy --add-missing
autoconf
./configure --prefix=“/home/yqw/MetaRTC/meta-rtc-push-BC/thirdSRC/alsa-lib-1.2.11/build” --host=“arm-linux” --enable-static=yes --enable-shared=no CC=/home/yqw/MetaRTC/BC/stbgcc-6.3-1.1/bin/arm-linux-gcc
make -j20
make install

openh264
https://github.com/cisco/openh264/releases //官网有交叉编译指南
openh264-2.4.1.zip
make OS=linux CC=/home/yqw/MetaRTC/BC/stbgcc-6.3-1.1/bin/arm-linux-gcc CXX=/home/yqw/MetaRTC/BC/stbgcc-6.3-1.1/bin/arm-linux-g++ ARCH=arm

参考:metaRTC(ARM linux64)编译指南

RK https://github.com/metartc/metaRTC/releases/tag/v5.0-b1

./config no-asm shared --prefix=$(pwd)/ install
修改 Makefile 文件里面的“CC,AR,RANLIB,MM,SHARED_LDFLAGS“这几个变量,这几个变量分别改成
CC= arm-linux-gnueabihf-gcc
删除 CFLAGS=中的 m64
AR= arm-linux-gnueabihf-ar $(ARFLAGS) r
RANLIB= arm-linux-gnueabihf-ranlib
NM= arm-linux-gnueabihf-nm
SHARED_LDFLAGS=

在这里插入图片描述

  • 20
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

、、、、南山小雨、、、、

分享对你有帮助,打赏一下吧!

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

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

打赏作者

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

抵扣说明:

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

余额充值