Skip to content

v4_EN_SrsLinuxArm

winlin edited this page Jun 27, 2020 · 24 revisions

HOME > EN > ARM

SRS for linux-arm

How to run SRS on ARM pcu?

  • Application on ARM to publish stream to SRS, use srs-librtmp.
  • Run SRS on ARM: Client can play stream from ARM server.

Why run SRS on ARM?

The use scenario:

  • There are lots of ARM device, and the center server cannot accept so many streams.
  • User can directly play stream on ARM when ARM running SRS server.
  • SRS can output RTMP and HLS, for both PC and mobile(Android+IOS).

Ubuntu Cross Build SRS

Please read and follow steps here.

Use Other Cross build tools

For other crossbuild toolchains, please read here.

RaspberryPi

We can directly build and run SRS on RespberryPI, without crossbuild.

Armel and Armhf

The error Illegal instruction is the cpu not compatible, the cross build target cpu too high, read http://stackoverflow.com/questions/14253626/arm-cross-compiling

The bellow is a simple test program:

/*
 arm-linux-gnueabi-g++ -o test test.cpp -static
 arm-linux-gnueabi-strip test
*/
#include <stdio.h>

int main(int argc, char** argv) {
    printf("hello, arm!\n");
    return 0;
}

To get the target cpu:

arm-linux-gnueabi-readelf --file-header --arch-specific test
Result:
  Machine:                           ARM
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7

So, the ubuntu12 cross build target cpu is cpuv7(debian armhf).

The debian armel, cpu is armv5:

root@debian-armel:~# cat /proc/cpuinfo 
Processor	: ARM926EJ-S rev 5 (v5l)
CPU revision	: 5

While the debian armhf, cpu is armv7:

root@debian-armhf:~# cat /proc/cpuinfo 
Processor	: ARMv7 Processor rev 0 (v7l)
CPU architecture: 7

Run test program on armhf:

root@debian-armhf:~# ./test 
hello, arm!

Winlin 2014.11

Welcome to SRS wiki!

SRS 5.0 wiki

Please select your language:

SRS 4.0 wiki

Please select your language:

SRS 3.0 wiki

Please select your language:

SRS 2.0 wiki

Please select your language:

SRS 1.0 wiki

Please select your language:

Clone this wiki locally