1、参考

​https://www.jianshu.com/p/a9df7fe9f819​

2、下载编译

wget  http://www.live555.com/liveMedia/public/live555-latest.tar.gz
tar xzf live555-latest.tar.gz
cd live
./genMakefiles armlinux #注意后面这个参数是根据当前文件夹下config.<后缀>获取得到的
make

 

修改config.armlinux中内容

主要修改CROSS_COMPILE,COMPILE_OPTS和LINK

CROSS_COMPILE?=   aarch64-poky-linux-
COMPILE_OPTS = $(INCLUDES) -I/opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux/usr/include/ -I. -O2 -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 --sysroot=/opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
C = c
C_COMPILER = $(CROSS_COMPILE)gcc
C_FLAGS = $(COMPILE_OPTS)
CPP = cpp
CPLUSPLUS_COMPILER = $(CROSS_COMPILE)g++
CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1
OBJ = o
LINK = $(CROSS_COMPILE)g++ --sysroot=/opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux -o
LINK_OPTS =
CONSOLE_LINK_OPTS = $(LINK_OPTS)
LIBRARY_LINK = $(CROSS_COMPILE)ar cr
LIBRARY_LINK_OPTS = $(LINK_OPTS)
LIB_SUFFIX = a
LIBS_FOR_CONSOLE_APPLICATION = -lssl -lcrypto
LIBS_FOR_GUI_APPLICATION =
EXE =

 编译过程

make[1]: Entering directory '/live555/live/proxyServer'
aarch64-poky-linux-g++ -c -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include -I/opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux/usr/include/ -I. -O2 -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 --sysroot=/opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -Wall -DBSD=1 live555ProxyServer.cpp
aarch64-poky-linux-g++ --sysroot=/opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux -olive555ProxyServer live555ProxyServer.o ../liveMedia/libliveMedia.a ../groupsock/libgroupsock.a ../BasicUsageEnvironment/libBasicUsageEnvironment.a ../UsageEnvironment/libUsageEnvironment.a -lssl -lcrypto
make[1]: Leaving directory '/work/code/mx8mp/up-ver/test/imx8-linux/patch/mkrootfs/live555/live/proxyServer'
cd hlsProxy ; make
make[1]: Entering directory 'live555/live/hlsProxy'
aarch64-poky-linux-g++ -c -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include -I/opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux/usr/include/ -I. -O2 -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 --sysroot=/opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -Wall -DBSD=1 live555HLSProxy.cpp
aarch64-poky-linux-g++ --sysroot=/opt/fsl-imx-xwayland/5.4-zeus/sysroots/aarch64-poky-linux -olive555HLSProxy live555HLSProxy.o ../liveMedia/libliveMedia.a ../groupsock/libgroupsock.a ../BasicUsageEnvironment/libBasicUsageEnvironment.a ../UsageEnvironment/libUsageEnvironment.a -lssl -lcrypto
make[1]: Leaving directory '/work/code/mx8mp/up-ver/test/imx8-linux/patch/mkrootfs/live555/live/hlsProxy'

For more information about this source code (including your obligations under the LGPL), please see our FAQ at http://live555.com/liveMedia/faq.html

 

root@yocto:/live555/live# ls
BasicUsageEnvironment config.cris-axis-linux-gnu config.linux config.macosx-no-openssl configure groupsock proxyServer
config.armeb-uclibc config.cygwin config.linux-64bit config.mingw COPYING hlsProxy README
config.armlinux config.cygwin-for-vlc config.linux-gdb config.openbsd COPYING.LESSER liveMedia testProgs
config.avr32-linux config.freebsd config.linux-no-openssl config.qnx4 fix-makefile Makefile UsageEnvironment
config.bfin-linux-uclibc config.freebsd-no-openssl config.linux-with-shared-libraries config.solaris-32bit genMakefiles Makefile.head win32config
config.bfin-uclinux config.iphoneos config.macosx-bigsur config.solaris-64bit genWindowsMakefiles Makefile.tail win32config.Borland
config.bsplinux config.iphone-simulator config.macosx-catalina config.uClinux genWindowsMakefiles.cmd mediaServer WindowsAudioInputDevice

file mediaServer/live555MediaServer

file mediaServer/live555MediaServer
mediaServer/live555MediaServer: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=e645eb62fdb40f244cee0db34489957627d15408, for GNU/Linux 3.14.0, with debug_info, not stripped