- 下载
Index of /files
- 编译zlib
嵌入式交叉编译:zlib_zlib嵌入式-CSDN博客
- 编译openssl
注意ssh需要指定的版本。比如我编译libssh-0.11.1,需要的版本是openssl-1.1.1。
交叉编译嵌入式openssl:关键是在config中指定编译器前缀_嵌入式编译openssl-CSDN博客
- 编译
CROSS_NAME=aarch64-mix210-linuxINSTALL_DIR=${HOME}/testZLIB_DIR=${INSTALL_DIR}/zlib
OPENSSL_DIR=${INSTALL_DIR}/opensslBUILD_DIR=build
if [ -d ${BUILD_DIR} ]; thenrm -rf ${BUILD_DIR}/*
elsemkdir ${BUILD_DIR}
ficd ${BUILD_DIR}resetcmake .. \-DCMAKE_SYSTEM_NAME=Linux \-DCMAKE_SYSTEM_PROCESSOR=arm \-DCMAKE_C_COMPILER=${CROSS_NAME}-gcc \-DCMAKE_CXX_COMPILER=${CROSS_NAME}-g++ \-DZLIB_INCLUDE_DIR=${ZLIB_DIR}/include \-DZLIB_LIBRARY=${ZLIB_DIR}/lib/libz.so \-DOPENSSL_ROOT_DIR=${OPENSSL_DIR} \-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}/ssh \-DWITH_EXAMPLES=OFFmakemake install
- 检查
$ file /home/weiyu/test/ssh/lib/libssh.so.4.10.1
ssh/lib/libssh.so.4.10.1: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, not stripped