Fuel plugin to deploy OVS with NSH and DPDK
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build-ovs-dpdk.sh 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #!/bin/bash
  2. set -eux
  3. OVS_COMMIT=92043ab8ffd449dfd50c3e716d6db06d04af70d7
  4. OVS_VER=${OVS_VER:-2.6.90}
  5. BUILD_DEST=${BUILD_DEST:-/deb}
  6. BUILD_SRC="$(dirname `readlink -f $0`)"
  7. BUILD_HOME=${BUILD_HOME:-/tmp/ovs-dpdk}
  8. DEB_ARCH="$(dpkg --print-architecture)"
  9. export DEB_BUILD_OPTIONS='parallel=8 nocheck'
  10. sudo apt-get update
  11. sudo apt-get -y --force-yes install devscripts dpkg-dev git wget dkms
  12. rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME}/deb
  13. cd ${BUILD_HOME}
  14. wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz
  15. xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar
  16. cd dpdk-16.07
  17. cp -r ${BUILD_SRC}/dpdk_16.07.fuel/debian .
  18. cat << EOF > debian/changelog
  19. dpdk (16.07-0ubuntu5~u1604+fuel10) xenial; urgency=low
  20. * Rebuild debian package
  21. * update librte-eal2.symbols
  22. -- Ruijing Guo <ruijing.guo@intel.com> $(date --rfc-2822)
  23. EOF
  24. # copy from debian/control
  25. sudo apt-get install -y --force-yes debhelper \
  26. dh-python \
  27. dh-systemd \
  28. doxygen \
  29. graphviz \
  30. inkscape \
  31. libcap-dev \
  32. libpcap-dev \
  33. libxen-dev \
  34. libxenstore3.0 \
  35. python \
  36. python-sphinx \
  37. texlive-fonts-recommended \
  38. texlive-latex-extra
  39. debian/rules build; fakeroot debian/rules binary
  40. cd ${BUILD_HOME}
  41. sudo apt-get install -y --force-yes hwdata
  42. sudo dpkg -i *.deb
  43. mv *.deb ${BUILD_DEST}
  44. # copy from debian/control
  45. sudo apt-get install -y --force-yes autoconf \
  46. automake \
  47. bzip2 \
  48. debhelper \
  49. dh-autoreconf \
  50. dh-systemd \
  51. graphviz \
  52. libdpdk-dev \
  53. libfuse-dev \
  54. libssl-dev \
  55. libtool \
  56. openssl \
  57. procps \
  58. python-all \
  59. python-qt4 \
  60. python-twisted-conch \
  61. python-zopeinterface \
  62. python-six
  63. git clone https://github.com/openvswitch/ovs.git
  64. cd ovs; git checkout ${OVS_COMMIT}; rm -rf .git
  65. cd ${BUILD_HOME}; cp -r ovs ovs-dpdk
  66. cd ovs-dpdk
  67. cp -r ${BUILD_SRC}/openvswitch_2.6-dpdk_16.07/debian .
  68. cat << EOF > debian/changelog
  69. openvswitch-dpdk (${OVS_VER}-1) unstable; urgency=low
  70. [ Open vSwitch team ]
  71. * support OVS with DPDK 16.07
  72. -- Open vSwitch team <dev@openvswitch.org> $(date --rfc-2822)
  73. EOF
  74. debian/rules build; fakeroot debian/rules binary
  75. cd ${BUILD_HOME}/ovs
  76. debian/rules build; fakeroot debian/rules binary
  77. cp -r ${BUILD_HOME}/*.deb ${BUILD_HOME}/deb
  78. cd ${BUILD_HOME}/deb
  79. tar czvf ${BUILD_DEST}/ovs-dpdk_${DEB_ARCH}.tar.gz .;