跳转到主要内容

【分享】独立编译VCU Ctrl-sw的办法

judy 提交于

<font color="#FF8000">作者:hankf,Xilinx Employee</font>

独立编译VCU Ctrl-sw的办法

1. 安装PetaLinux
2. 导入PetaLinux环境

<pre>
source /opt/Xilinx/peta/2018.2/settings.sh</pre>

创建和导出编译的环境变量
<pre>export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-</pre>

在mk 中,为“LINK_COMPAT:=” 添加“-pthread”,变成“LINK_COMPAT:= -pthread”。LINK_COMPAT:= -pthread

<pre>LINK_COMPAT:= -pthread</pre>

在vcu-ctrl-sw目录下执行make。为了加快速度,可以使用”make -j 32” 其中的数字,根据电脑CPU核数设置。
<pre>
hankf@servervcu-ctrl-sw$ make clean
/bin/sh: 1: svnversion: not found
CLEAN bin
hankf@servervcu-ctrl-sw$ make -j 32
/bin/sh: 1: svnversion: not found
CC lib_encode/IScheduler.c
CC lib_common_enc/EncRecBuffer.c
... ...
CXX exe_encoder/main.cpp
CXX bin/ctrlsw_encoder
Generate script bin/AL_Encoder.sh
hankf@servervcu-ctrl-sw$ ls bin/
AL_CfgParser.exe exe_encoder liballegro_encode.a lib_bitstream lib_decode
AL_Encoder.sh liballegro_decode.a liballegro_encode.so lib_common lib_encode
ctrlsw_decoder liballegro_decode.so liballegro_encode.so.0 lib_common_dec lib_fpga
ctrlsw_encoder liballegro_decode.so.0 liballegro_encode.so.0.9.0 lib_common_enc lib_parsing
exe_decoder liballegro_decode.so.0.9.0 lib_app lib_conv_yuv lib_rtos</pre>