How to compile openssl 1.0.2f on Beaglebone Black?

瘦欲@ 提交于 2019-12-02 04:50:52

How to compile openssl 1.0.2f on Beaglebone Black?

I believe you want the linux-armv4 target.

$ ./Configure LIST | grep -i arm
android-armeabi
linux-arm64ilp32
linux-armv4

Also see Compilation and Installation on the OpenSSL wiki.


Its probably easiest to follow Leśny's advice and run ./config. config tries to guess at the target. If the guess is wrong, then use ./Configure with the triplet:

$ wget https://www.openssl.org/source/openssl-1.0.2g.tar.gz
...
$ tar xzf openssl-1.0.2g.tar.gz
...
$ cd openssl-1.0.2g

And then (notice linux-armv4):

$ ./config shared no-ssl2 no-ssl3 no-comp -DOPENSSL_NO_HEARTBEATS                     
Operating system: armv7l-whatever-linux2
Configuring for linux-armv4
    no-comp         [option]   OPENSSL_NO_COMP (skip dir)
    no-ec_nistp_64_gcc_128 [default]  OPENSSL_NO_EC_NISTP_64_GCC_128 (skip dir)
    no-gmp          [default]  OPENSSL_NO_GMP (skip dir)
    no-jpake        [experimental] OPENSSL_NO_JPAKE (skip dir)
    no-krb5         [krb5-flavor not specified] OPENSSL_NO_KRB5
    no-libunbound   [experimental] OPENSSL_NO_LIBUNBOUND (skip dir)
    no-md2          [default]  OPENSSL_NO_MD2 (skip dir)
    no-rc5          [default]  OPENSSL_NO_RC5 (skip dir)
    no-rfc3779      [default]  OPENSSL_NO_RFC3779 (skip dir)
    no-sctp         [default]  OPENSSL_NO_SCTP (skip dir)
    no-ssl-trace    [default]  OPENSSL_NO_SSL_TRACE (skip dir)
    no-ssl2         [option]   OPENSSL_NO_SSL2 (skip dir)
    no-ssl3         [option]   OPENSSL_NO_SSL3 (skip dir)
    no-store        [experimental] OPENSSL_NO_STORE (skip dir)
    no-unit-test    [default]  OPENSSL_NO_UNIT_TEST (skip dir)
    no-weak-ssl-ciphers [default]  OPENSSL_NO_WEAK_SSL_CIPHERS (skip dir)
    no-zlib         [default] 
    no-zlib-dynamic [default] 
    ...

You may need to fallback to something like this:

$./Configure linux-armv4 shared no-ssl2 no-ssl3 no-comp -DOPENSSL_NO_HEARTBEATS
...
$ make depend
...
$ make clean
...
$ make

For completeness, I was working from a BeagleBone Black using a Debian console image from December, 2015 (I needed the small, 2GB footprint so storage was available for other things):

$ uname -a
Linux beaglebone 4.1.15-ti-rt-r40 #1 SMP PREEMPT RT Thu Jan 7 23:32:08 UTC 2016 armv7l GNU/Linux
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!