diff options
author | Yichen Wang <yicwang@cisco.com> | 2017-08-04 17:06:18 -0700 |
---|---|---|
committer | Yichen Wang <yicwang@cisco.com> | 2017-08-04 17:07:25 -0700 |
commit | 0036098e46e16c9ae5b795b108a5b9566c02906b (patch) | |
tree | 005463f0fa4f7a37dead0fa0c0f35c212a551ae7 /nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/02-testpmd-script | |
parent | ba423e2c7f322871507835341d8265074d747781 (diff) |
Add the scipts to build NFVbench VM
Change-Id: I9632333777260468d6f07cf0149c789626f20145
Signed-off-by: Yichen Wang <yicwang@cisco.com>
Diffstat (limited to 'nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/02-testpmd-script')
-rwxr-xr-x | nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/02-testpmd-script | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/02-testpmd-script b/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/02-testpmd-script new file mode 100755 index 0000000..b1cffc5 --- /dev/null +++ b/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/02-testpmd-script @@ -0,0 +1,25 @@ +#!/bin/bash + +DPDK=dpdk-17.05 +DPDK_UNTAR=dpdk-17.05 + +# pick up the kernel version for the target image +kernel_version=`ls -t /lib/modules | awk 'NR==1 {print}'` + +mkdir dpdk +wget http://fast.dpdk.org/rel/$DPDK.tar.xz +tar xfJ $DPDK.tar.xz +cd $DPDK_UNTAR + +export RTE_KERNELDIR=/lib/modules/$kernel_version/build +export ARCH=x86 +make -j4 install T=x86_64-native-linuxapp-gcc + +cp usertools/dpdk-devbind.py ../dpdk +# cp tools/dpdk_nic_bind.py ../dpdk/dpdk-devbind.py +cp x86_64-native-linuxapp-gcc/app/testpmd ../dpdk +cp x86_64-native-linuxapp-gcc/kmod/igb_uio.ko ../dpdk + +cd .. +rm -f $DPDK.tar.xz +rm -rf $DPDK_UNTAR |