| # install prerequisites for stratum/bmv2 build |
| USE_STRATUM=true DEBUG_FLAGS=false FAST_BUILD=true CLEAN_UP=true bash /tmp/install-p4-tools.sh |
| curl -L -o bazel.sh -s https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh |
| export PATH=/home/sdn/bin:$PATH |
| # unroll the stratum tar ball from the build machine |
| tar xf /tmp/stratum-sources.tar |
| export BMV2_INSTALL=/usr/local |
| export PI_INSTALL=/usr/local |
| bazel build --curses=no --color=no //stratum/hal/bin/bmv2:stratum_bmv2 |
| # deploy stratum binaries to where mininet will look for them |
| mkdir -p /home/sdn/stratum/bazel-bin/stratum/hal/bin/bmv2 |
| cp bazel-bin/stratum/hal/bin/bmv2/stratum_bmv2 /home/sdn/stratum/bazel-bin/stratum/hal/bin/bmv2/stratum_bmv2 |
| mkdir -p /home/sdn/stratum/stratum/hal/bin/bmv2 |
| cp bazel-bin/stratum/hal/bin/bmv2/stratum_bmv2.runfiles/com_github_stratum_stratum/stratum/hal/bin/bmv2/dummy.json /home/sdn/stratum/stratum/hal/bin/bmv2 |