aboutsummaryrefslogtreecommitdiff
path: root/DEPENDENCIES
blob: 2654ae001fa2f8b1df7e24c432289f761d4ca0bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Prerequisites for building the OpenDataPlane (ODP) API

1. Linux kernel >= 3.0

   Version 3.0+ needed for the sendmmsg() interface

2. autotools

   automake
   autoconf
   autoconf-archive
   libtool

   On Debian/Ubuntu systems:
   $ sudo apt-get install automake autoconf autoconf-archive libtool

   On CentOS/RedHat/Fedora systems:
   $ sudo yum install automake autoconf autoconf-archive libtool libtoolize

3. required libraries

   Libraries currently required to link: openssl

3.1 native compile

   For native compilation, simply load the necessary libraries using the appropriate
   tool set.

   On Debian/Ubuntu systems:
   $ sudo apt-get install libssl-dev

   On CentOS/RedHat/Fedora systems:
   $ sudo yum install openssl-devel

3.2 cross compilation

   Cross compilation requires cross compiling the individual libraries.  In order for
   a cross compiled executable to run on a target system, one must build the same
   version as that which is installed on the target rootfs.

   For example, to build openssl for both 32 and 64 bit compilation:

   # Clone openssl repository
   $ git clone git://git.openssl.org/openssl.git
   $ cd openssl

   # The command "git tag" will list all tags available in the repo.
   $ git tag

   # Checkout the specific tag to match openssl library in your target rootfs
   $ git checkout <tag name>

   # Build and install 32 bit version of openssl
   $ ./Configure linux-generic32 --cross-compile-prefix=arm-linux-gnueabihf- \
     --prefix=/home/user/src/install-openssl shared
   $ make
   $ make install

   # Build and install 64 bit version of openssl
   $ ./Configure linux-aarch64 --cross-compile-prefix=aarch64-linux-gnu- \
     --prefix=/home/user/src/install-openssl-aarch64 shared
   $ make
   $ make install

   # You may now build either 32 or 64 bit ODP
   $ git clone git://git.linaro.org/lng/odp.git odp
   $ cd odp
   $ ./bootstrap

   # Build 32 bit version of ODP
   $ ./configure --host=arm-linux-gnueabihf \
     --with-openssl-path=/home/user/src/install-openssl
   $ make

   # Or build 64 bit version of ODP
   $ ./configure --host=aarch64-linux-gnu \
     --with-openssl-path=/home/user/src/install-openssl-aarch64
   $ make