OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Utility script that automates the process of fetching a stable dpdk release, | 3 # Utility script that automates the process of fetching a stable dpdk release, |
4 # configuring its compilation options, and building the dpdk libraries. | 4 # configuring its compilation options, and building the dpdk libraries. |
5 | 5 |
6 DPDK_VER="1.8.0" | 6 DPDK_VER="1.8.0" |
7 | 7 |
8 if [ ! -d ./deps ]; then mkdir deps; fi | 8 if [ ! -d ./deps ]; then mkdir deps; fi |
9 | 9 |
10 if [ ! -d ./deps/dpdk-${DPDK_VER} ]; | 10 if [ ! -d ./deps/dpdk-${DPDK_VER} ]; |
11 then | 11 then |
12 cd deps; | 12 cd deps; |
13 wget http://dpdk.org/browse/dpdk/snapshot/dpdk-${DPDK_VER}.tar.gz | 13 wget http://dpdk.org/browse/dpdk/snapshot/dpdk-${DPDK_VER}.tar.gz |
14 tar zxvf dpdk-${DPDK_VER}.tar.gz | 14 tar zxvf dpdk-${DPDK_VER}.tar.gz |
15 cd .. | 15 cd .. |
16 ln -s deps/dpdk-${DPDK_VER} dpdk | 16 ln -s deps/dpdk-${DPDK_VER} dpdk |
17 fi | 17 fi |
18 | 18 |
19 # Configure the build process to produce a unified object archive file. | 19 # Configure the build process to produce a unified object archive file. |
20 sed -i s/CONFIG_RTE_BUILD_COMBINE_LIBS=n/CONFIG_RTE_BUILD_COMBINE_LIBS=y/ dpdk/c
onfig/common_linuxapp | 20 sed -i s/CONFIG_RTE_BUILD_COMBINE_LIBS=n/CONFIG_RTE_BUILD_COMBINE_LIBS=y/ dpdk/c
onfig/common_linuxapp |
| 21 sed -i s/CONFIG_RTE_BUILD_SHARED_LIB=n/CONFIG_RTE_BUILD_SHARED_LIB=y/ dpdk/confi
g/common_linuxapp |
21 | 22 |
22 # Build the libraries, assuming an x86_64 linux target, and a gcc-based | 23 # Build the libraries, assuming an x86_64 linux target, and a gcc-based |
23 # toolchain. Compile position-indepedent code, which will be linked by | 24 # toolchain. Compile position-indepedent code, which will be linked by |
24 # RAMCloud code. | 25 # RAMCloud code. |
25 cd dpdk && make config T=x86_64-native-linuxapp-gcc && CPU_CFLAGS="-fPIC" make | 26 cd dpdk && CPU_FLAGS="-fPIC" make install T=x86_64-native-linuxapp-gcc |
OLD | NEW |