openssl1.1.1m交叉编译

1、openssl1.1.1m交叉编译

  1. 将openssl 源代码的config文件放到设备里运行,执行 ./config -h

    /var/run/tmp3 # ./config -h
    ./config: line 17: dirname: not found
    Usage: config [options]
     -d     Build with debugging when possible.
     -t     Test mode, do not run the Configure perl script.
     -v     Verbose mode, show the exact Configure call that is being made.
     -h     This help.
    
    Any other text will be passed to the Configure perl script.
    See INSTALL for instructions.
    
    Operating system: armv7l-whatever-linux2
    You need Perl 5.
    
  2. 将得到的Operating system:的值在config中修改

    # read the output of the embedded GuessOS
    read GUESSOS
    # 添加下边这句
    GUESSOS="armv7l-whatever-linux2"
    echo Operating system: $GUESSOS
    

    这一步非常重要,切记!!!否则会握手失败,报解密错误

    在这里插入图片描述

    PS:改了config之后,Makefile不需要再动,直接编译即可!!! 有很多交叉编译blog,没有改config,让直接修改Makefile,如去掉-m64、-m32,修改PLATFORM=armv7l-whatever-linux2等,这些自测都没用,耽误了很长时间……

  3. ./config no-asm no-async no-shared --prefix=$(pwd)/build --cross-compile-prefix=arm-himix200-linux-

    no-asm: 在交叉编译过程中不使用汇编代码代码加速编译过程.
    shared: 生成动态连接库。
    no-async: 交叉编译工具链没有提供GNU C的ucontext库时,就需要加上
    –prefix=: 安装路径,编译完成install后将有bin,lib,include等文件夹
    –cross-compile-prefix=: 交叉编译工具

  4. make && make install

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值