ANSI C UA Server SDK  1.6.0.341
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
Cross Compiling OpenSSL

The following sections descibe how to cross compile OpenSSL for Linux on ARM.

Requirements

You need a toolchain to cross compile for your target system.

Add Cross Compiler to Path Variable

As the libraries have to be compiled with the cross compiler, we need to set the path variable accordingly:

export PATH=/usr/local/angstrom/arm/bin:$PATH

Download and Unpack OpenSSL

Download the most recent version of OpenSSL from http://www.openssl.org/source/ and unpack it:

tar –xvzf openssl-<version>.tar.gz

Configure

We configure the makefiles with the following options. “linux-armv4” specifies our target platform, “–cross-compile-prefix=arm-angstrom-linux-gnueabi-” ensures that the compiler from our toolchain is found (arm-angstrom-linux-gnueabi-gcc), and “–prefix=<openssl-install-path>” sets the installation path of your choice. You can omit the option “shared” if you don’t need shared libraries. The rest disables algorithms that are patented or no longer regarded as secure.

./Configure linux-armv4 --cross-compile-prefix=arm-angstrom-linux-gnueabi- [shared] no-idea no-mdc2 no-rc5 no-ssl2 no-ssl3 --prefix=<openssl-install-path>

Then we have to run

make depend

because we have disabled a few algorithms.

Build and Install

Now we are ready to build and install OpenSSL:

make
make install