summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Harkin <ryan.harkin@linaro.org>2016-02-16 10:26:46 +0000
committerRyan Harkin <ryan.harkin@linaro.org>2016-02-16 10:26:46 +0000
commit89157abb9dd030c7d1cb7bc20df843b236358a33 (patch)
tree06a8cb8db93832226be1a8a87d9e27fa394e639c
parent0f83776a9c6b9db14425bca41938a7dec82007c9 (diff)
Add networking paramsarmlt-2016022216.02
If the users specifies NET=1 when launching the model, the networking params will be appended to the model launch commandline. When using the AEMv8 models, if the MAC address is not supplied, a MAC address will be generated. Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
-rwxr-xr-xrun_model.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/run_model.sh b/run_model.sh
index 00b0c6c..bb1476b 100755
--- a/run_model.sh
+++ b/run_model.sh
@@ -136,6 +136,7 @@ echo "DISK=$DISK"
echo "CLUSTER0_NUM_CORES=$CLUSTER0_NUM_CORES"
echo "CLUSTER1_NUM_CORES=$CLUSTER1_NUM_CORES"
echo "SECURE_MEMORY=$SECURE_MEMORY"
+echo "NET=$NET"
kern_addr=0x80080000
dtb_addr=0x83000000
@@ -145,6 +146,12 @@ if [ "$FOUNDATION" == "1" ]; then
GICV3=${GICV3:-1}
echo "GICV3=$GICV3"
+ if [ "$NET" == "1" ]; then
+ # The Foundation Model MAC address appears to be 00:02:F7:EF
+ # followed by the last two bytes of the host's MAC address.
+ net="--network bridged --network-bridge=ARM$USER"
+ fi
+
if [ "$DISK" != "" ]; then
disk_param=" --block-device=$DISK "
fi
@@ -182,11 +189,24 @@ if [ "$FOUNDATION" == "1" ]; then
$dtb_param \
$initrd_param \
$disk_param \
+ $net \
"
else
CACHE_STATE_MODELLED=${CACHE_STATE_MODELLED:=0}
echo "CACHE_STATE_MODELLED=$CACHE_STATE_MODELLED"
+ if [ "$NET" == "1" ]; then
+ if [ "$MACADDR" == "" ]; then
+ # if the user didn't supply a MAC address, generate one
+ MACADDR=`echo -n 00:02:F7; dd bs=1 count=3 if=/dev/random 2>/dev/null |hexdump -v -e '/1 ":%02X"'`
+ echo MACADDR=$MACADDR
+ fi
+
+ net="-C bp.hostbridge.interfaceName=ARM$USER \
+ -C bp.smsc_91c111.enabled=true \
+ -C bp.smsc_91c111.mac_address=${MACADDR}"
+ fi
+
if [ "$DISK" != "" ]; then
disk_param=" -C bp.virtioblockdevice.image_path=$DISK "
fi
@@ -216,6 +236,7 @@ else
-C bp.ve_sysregs.mmbSiteDefault=0 \
$disk_param \
$VARS \
+ $net \
"
fi