交叉编译:zlib,openSSL,openSSH

1. 编译zlib

wget https://www.zlib.net/zlib-1.2.12.tar.gz
# 编译命令
export CC=arm-fullhanv3-linux-uclibcgnueabi- ./configure --prefix=/home/hxf0223/tmp/ssh/target
make -j && make install

2. 编译openSSL

wget https://github.com/openssl/openssl/archive/refs/tags/openssl-3.0.2.tar.gz
# 编译命令
./Configure linux-generic32 no-asm shared no-async --prefix=/home/hxf0223/tmp/ssh/target/ CROSS_COMPILE=arm-fullhanv3-linux-uclibcgnueabi- CC=gcc

3. 编译openSSH

wget https://mirrors.aliyun.com/pub/OpenBSD/OpenSSH/portable/openssh-9.0p1.tar.gz
# 编译命令
./configure --host=arm-fullhanv3-linux-uclibcgnueabi --enable-static LIBS="pthread" --with-libs --with-zlib=/home/hxf0223/tmp/ssh/target --with-ssl-dir=/home/hxf0223/tmp/ssh/target --disable-etc-default-login CC=arm-fullhanv3-linux-uclibcgnueabi-gcc AR=arm-fullhanv3-linux-uclibcgnueabi-ar
make -j # 不执行install

4. 打包

grep -rIL .  # 找出bin档,并复制到target/bin目录

参考

posted @   山岚2013  阅读(732)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
点击右上角即可分享
微信分享提示