#
# Runtime provisioning script for Vagrant-based training lab setup
+# runtime type - arm32 (default) or arm64
+RUNTIME=$1
+if [ "$RUNTIME"x = ""x ]; then
+ RUNTIME=arm32
+fi
+
# Location of the runtime files. MANIFEST must exist there, and
# describes what else needs to be downloaded: in the format:
# <FILENAME>:<MODE>:<BYTES>:<SHA256>
# Apart from the MANIFEST itself, all files should be compressed with
# gzip. In each case, the script will download $FILENAME.gz,
# decompress it and then validate the checksum
-RUNTIME_DL=https://www.einval.com/arm/training-lab/arm64/
+RUNTIME_DL=https://www.einval.com/arm/training-lab/$RUNTIME/
# Abort on errors
set -e
# set -x
-# Make sure we have updates applied, and all our needed packages
+# Make sure we have updates applied, and all our needed packages. Kill
+# inattended-upgrades if it's running, as it will clash here
+killall unattended-upgrade unattended-upgrades
apt-get update
apt-get dist-upgrade -y
apt-get install -y qemu-system-arm gcc-aarch64-linux-gnu
done
echo "Starting emulated runtime VM next"
-./start_runtime
+MACH=$RUNTIME ./start_runtime