My work often requires booting AArch64 fast models. As there are two of them and each has different arguments I decided to write simple script to handle that.
Script takes three arguments:
- kernel
- rootfs (can be skipped)
- model type (foundation/rtsm — first one as default)
This is work in progress — for example there is no network configured for RTSM yet. But I hope that it will be useful for other users.
#!/bin/bash
model=foundation
kernel=
rootfs=
if [ ! -z $3 ]; then
model=full
fi
if [ -z $1 ]; then
echo "Usage: boot-armv8 KERNEL ROOTFS"
else
kernel=`realpath $1`
fi
if [ ! -z $2 ]; then
rootfs=`realpath $2`
fi
case $model in
foundation)
if [ ! -z $rootfs ];then
rootfs=" --block-device $rootfs"
fi
sudo ip tuntap add tap0 mode tap
sudo ifconfig tap0 192.168.168.1
~/devel/canonical/aarch64/FastModels/Foundation_v8pkg/Foundation_v8
--image $kernel
--network bridged --network-bridge=tap0
$rootfs
;;
rtsm)
if [ ! -z $rootfs ];then
rootfs=" -C motherboard.mmc.p_mmc_file=$rootfs "
fi
export ARMLMD_LICENSE_FILE=8224@flexlm.linaro.org
~/devel/canonical/aarch64/FastModels/VE/AEMv8_0.8.4407/ModelDebugger_7.1/bin/model_shell64
-a $kernel
$rootfs
~/devel/canonical/aarch64/FastModels/VE/AEMv8_0.8.4407/lib/Linux64/RTSM_VE_AEMv8A.so
;;
esac