Generate leaner P4 VM

Dev: 1.5 GB instead of 3.5 GB
Tutorial: 2.3 GB instead of 5.5 GB

Change-Id: Ib63d47578a2c9e16a97827bfba463f90cfe1187d
diff --git a/tools/dev/p4vm/bm-commands.sh b/tools/dev/p4vm/bm-commands.sh
index ee96f22..3081de4 100644
--- a/tools/dev/p4vm/bm-commands.sh
+++ b/tools/dev/p4vm/bm-commands.sh
@@ -1,10 +1,5 @@
 #!/usr/bin/env bash
 
-BUILD_DIR=~/p4tools
-
-export BMV2_PATH=${BUILD_DIR}/bmv2
-export P4RUNTIME_PATH=${BUILD_DIR}/p4runtime
-
 bm-cli () {
     if [ -z "$1" ]; then
         echo "No argument supplied. Usage: bm-cli <BMV2 DEVICE ID>"
@@ -12,7 +7,7 @@
     fi
     tport=$(head -n 1 /tmp/bmv2-$1-thrift-port)
     echo "Starting CLI for BMv2 instance $1 (Thrift port $tport)..."
-    sudo ${BMV2_PATH}/tools/runtime_CLI.py --thrift-port ${tport} ${@:2}
+    sudo bm_CLI --thrift-port ${tport} ${@:2}
 }
 
 bm-dbg () {
@@ -22,7 +17,7 @@
     fi
     tport=$(head -n 1 /tmp/bmv2-$1-thrift-port)
     echo "Starting debugger for BMv2 instance $1 (Thrift port $tport)..."
-    sudo ${BMV2_PATH}/tools/p4dbg.py --thrift-port ${tport} ${@:2}
+    sudo bm_p4dbg --thrift-port ${tport} ${@:2}
 }
 
 bm-nmsg () {
@@ -32,7 +27,7 @@
     fi
     tport=$(head -n 1 /tmp/bmv2-$1-thrift-port)
     echo "Starting nanomsg event listener for BMv2 instance $1 (Thrift port $tport)..."
-    sudo ${BMV2_PATH}/tools/nanomsg_client.py --thrift-port ${tport} ${@:2}
+    sudo bm_nanomsg_events --thrift-port ${tport} ${@:2}
 }
 
 bm-log () {
@@ -44,9 +39,3 @@
     echo "---"
     tail -f /tmp/bmv2-$1-log
 }
-
-bm-sysrepo-reset () {
-    echo "Resetting sysrepo data store..."
-    sudo rm -rf /etc/sysrepo/data/*
-    sudo ${P4RUNTIME_PATH}/proto/sysrepo/install_yangs.sh
-}