Andy Fingerhut 6c82635445
Update protobuf mininet p4testgen (#518)
* Support negative-valued action parameters
by converting them in the Python helper code into a positive value
whose bit pattern is the 2's complement representation of the negative
value.

* Update versions of protobuf and grpc installed, install p4testgen
Update protobuf from v3.6.1 to v3.18.1
Update grpc from v1.17.2 to v1.43.2

Both of those versions have been long tested in the p4-guide repo
install scripts.

Update BMv2, PI, p4c, and ptf to latest versions as of 2023-Jun-24

Enable compilation of p4testgen

* Change method to install ptf
I found that the former way that I am replacing did not seem to install
it correctly.

* Make clean.sh remove sources for protobuf and grpc
Saves disk space for the image.  protobuf and grpc source code is easily
obtainable from public sources if the user wishes.
2023-06-24 21:21:43 -04:00

47 lines
1.1 KiB
Bash
Executable File

#! /bin/bash
# To reduce disk space used by the virtual machine, delete many build
# files created during execution of root-bootstrap.sh and
# user-bootstrap.sh scripts.
# This script is _not_ automatically run during creation of the VM, so
# that if anything goes wrong during the build, all of the resulting
# files are left behind for examination.
DF1_BEFORE=`df -h .`
DF2_BEFORE=`df -BM .`
# Remove protobuf and grpc sources completely, since they are large
# and easily downloadable.
/bin/rm -fr protobuf grpc
cd behavioral-model
make clean
cd ..
cd p4c
/bin/rm -fr build
cd ..
/bin/rm usr-local-*.txt pip3-list-2b-*.txt
sudo apt autoremove
sudo apt clean
# Zero out unused disk blocks. Results in significantly smaller VM
# image files.
echo "Writing zeros to unused disk blocks (be patient) ..."
FNAME=`mktemp --tmpdir big-empty-zero-file-XXXXXXXX`
dd if=/dev/zero of=${FNAME} bs=4096k
/bin/rm -f ${FNAME}
echo "Disk usage before running this script:"
echo "$DF1_BEFORE"
echo "$DF2_BEFORE"
echo ""
echo "Disk usage after running this script:"
df -h .
df -BM .