-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
v4_EN_SrsLinuxArm
winlin edited this page Jun 27, 2020
·
24 revisions
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.
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).
Please read and follow steps here.
For other crossbuild toolchains, please read here.
We can directly build and run SRS on RespberryPI, without crossbuild.
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!
Please select your language:
Please select your language:
Please select your language:
Please select your language:
Please select your language: