diff options
author | Thomas Abraham <thomas.abraham@arm.com> | 2018-09-04 00:16:14 +0530 |
---|---|---|
committer | Arvind Chauhan <arvind.chauhan@arm.com> | 2018-10-12 10:29:05 +0100 |
commit | b80f0fc4c5cca545715615d9a1fcc9d0ef71d86f (patch) | |
tree | b154c8a955d491c1c7bbc6c06f1ceca54d07de3f /sgi | |
parent | b52916fec41874c910e1bb1739339b58b158d99a (diff) |
platforms/sgi575: allow auto-detection of tap interface
Use the function 'find_tap_interface' to determine a available tap
network interface.
Change-Id: Id5587122fb614ea05d61b2e8aff512c08716cefe
Signed-off-by: Thomas Abraham <thomas.abraham@arm.com>
Diffstat (limited to 'sgi')
-rwxr-xr-x | sgi/platforms/sgi575/run_model.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sgi/platforms/sgi575/run_model.sh b/sgi/platforms/sgi575/run_model.sh index fbb1055..bbe52b0 100755 --- a/sgi/platforms/sgi575/run_model.sh +++ b/sgi/platforms/sgi575/run_model.sh @@ -22,6 +22,9 @@ OUTDIR=${ROOTDIR}/sgi575 MODEL_TYPE="sgi575" MODEL_PARAMS="" FS_TYPE="" +TAP_INTERFACE="" + +source ../../sgi_common_util.sh # Check that a path to the model has been provided if [ ! -e "$MODEL" ]; then @@ -122,11 +125,14 @@ if [[ -z $NTW_ENABLE ]]; then fi if [ ${NTW_ENABLE,,} == "true" ]; then - echo -e "$YELLOW_FONT Please input a unique bridge interface name for network setup $NORMAL_FONT" >&2 - read INTERFACE_NAME - if [[ -z $INTERFACE_NAME ]]; then - echo -e "$RED_FONT network interface name is empty $NORMAL_FONT" >&2 - exit 1; + find_tap_interface + if [[ -z $TAP_INTERFACE ]]; then + echo -e "$YELLOW_FONT Please input a unique bridge interface name for network setup $NORMAL_FONT" >&2 + read TAP_INTERFACE + if [[ -z $TAP_INTERFACE ]]; then + echo -e "$RED_FONT network interface name is empty $NORMAL_FONT" >&2 + exit 1; + fi fi fi @@ -172,7 +178,7 @@ mkdir -p ./$MODEL_TYPE if [ ${NTW_ENABLE,,} == "true" ]; then MODEL_PARAMS="$MODEL_PARAMS \ - -C board.hostbridge.interfaceName="$INTERFACE_NAME" \ + -C board.hostbridge.interfaceName="$TAP_INTERFACE" \ -C board.smsc_91c111.enabled=1" fi |