Cross compiling openssl for linux arm-v5te-linux-gnueabi toolchain

cross-compiling openssl for the linux arm-v5te-linux-gnueabi toolbar. I have an openssl-0.9.8r version. I tried. / Configure --prefix = / usr --openssldir = / usr / sbin threads zlib shared no-asm linux-armv4 export CROSS_COMPILE = arm-v5te-linux-gnueabi -

but to no avail.

I really need the basic steps that need to be taken to cross-copy it to the openssl binary. I have already tried several suggestions for links, so it is imperative to open a new question.

Please, help

+4
source share
2 answers

It works:

./Configure linux-generic32 shared -DL_ENDIAN --prefix=/home --openssldir=/home make CC=arm-v4t-linux-gnueabi-gcc RANLIB=arm-v4t-linux-gnueabi-ranlib LD=arm-v4t-linux-gnueabi-ld MAKEDEPPROG=arm-v4t-linux-gnueabi-gcc PROCESSOR=ARM 
+4
source

I ran into the same problem and wrote a manual on cross compiling openssl for the hand. I hope this guide can give you some idea:

The process is quite simple. In this guide, we will give an example for cross-compiling OPENSSL for the ARM architecture on a Linux Ubuntu system.

  • Cross compiler

You will need the GNU C / C ++ compiler for the ARM architecture:

$ sudo apt-get install gcc-4.8-arm-linux-gnueabihf g ++ - 4.8-arm-linux-gnueabihf

  1. Openssl source code (version 1.1.1)

The generated openssl is available at https://github.com/openssl/openssl

$ git clone https://github.com/openssl/openssl.git

  1. Configuration

Go to the openssl folder and execute. / configure as follows:

$. / Configure linux-armv4 --prefix = / usr / local / openssl / - openssldir = / usr / local / openssl shared

In this configuration, the target linux-armv4 platform is installed, which is the only available ARM platform supported by this openssl. --prefix = / usr / local / openssl tells where to put the installation files. --openssldir = / usr / local / openssl defines the root directory of the openssl installation. shared makes a compiler to generate .so library files. The INSTALL document in the openssl folder contains options for. / Configure.

  1. Selection

$ make CC = arm-linux-gnueabihf-gcc-4.8

CC reports that use cross-compiler. The default compiler is gcc.

  1. Installation

$ make install

  1. Output

After installation, you will find the following files and folders in the / usr / local / openssl directory

$ ls / usr / local / openssl

bin

ct_log_list.cnf

turn on

misc

openssl.cnf.dist

share certificates

ct_log_list.cnf.dist

lib

openssl.cnf

private

  1. End

make sure binaries are created for ARM:

$ file / usr / local / openssl / bin / openssl

install-arm / bin / openssl: 32-bit executable file ELB, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter / lib / ld -linux-armhf.so.3, for GNU / Linux 3.2. 0, BuildID [sha1] = a23306c9c8bd553183fc20a37a60dcac8291da91, not stripping

If you see something similar to the one shown above, you have successfully compiled openssl for the ARM system.

+3
source

All Articles