8 function install_kernel()
10 wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.2.tar.gz
11 tar xzvf linux-3.16.2.tar.gz > /dev/null
16 echo "Installed kernel source in $(pwd)"
20 function install_dpdk()
22 wget http://www.dpdk.org/browse/dpdk/snapshot/dpdk-1.7.1.tar.gz
23 tar xzvf dpdk-1.7.1.tar.gz > /dev/null
25 find ./ -type f | xargs sed -i 's/max-inline-insns-single=100/max-inline-insns-single=400/'
26 sed -ri 's,(CONFIG_RTE_BUILD_COMBINE_LIBS=).*,\1y,' config/common_linuxapp
27 sed -ri '/CONFIG_RTE_LIBNAME/a CONFIG_RTE_BUILD_FPIC=y' config/common_linuxapp
28 sed -ri '/EXECENV_CFLAGS = -pthread -fPIC/{s/$/\nelse ifeq ($(CONFIG_RTE_BUILD_FPIC),y)/;s/$/\nEXECENV_CFLAGS = -pthread -fPIC/}' mk/exec-env/linuxapp/rte.vars.mk
29 make config CC=gcc T=x86_64-native-linuxapp-gcc
30 make CC=gcc RTE_KERNELDIR=$KERNELSRC
31 echo "Installed DPDK source in $(pwd)"
35 function configure_ovs()
37 ./boot.sh && ./configure $*
40 if [ "$KERNEL" ] || [ "$DPDK" ]; then
46 # Disregard bad function cassts until DPDK is fixed
47 CFLAGS="$CFLAGS -Wno-error=bad-function-cast -Wno-error=cast-align"
48 elif [ $CC != "clang" ]; then
49 # DPDK headers currently trigger sparse errors
50 CFLAGS="$CFLAGS -Wsparse-error"
56 if [ $CC = "clang" ]; then
57 make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
59 make CFLAGS="$CFLAGS" C=1
62 if [ $TESTSUITE ]; then
63 if ! make distcheck; then
64 # testsuite.log is necessary for debugging.
65 cat */_build/tests/testsuite.log