From e7ec222e30dc56d7c295ca0f68bb6d6b6afa148b Mon Sep 17 00:00:00 2001
From: Erik Kooistra <kooistra@astron.nl>
Date: Fri, 3 Nov 2017 14:04:40 +0000
Subject: [PATCH] Support --opt noflash option to overrule automatic flash
 detection.

---
 applications/apertif/commissioning/dish_commands.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/applications/apertif/commissioning/dish_commands.sh b/applications/apertif/commissioning/dish_commands.sh
index c2b03aac03..af5f112802 100755
--- a/applications/apertif/commissioning/dish_commands.sh
+++ b/applications/apertif/commissioning/dish_commands.sh
@@ -114,7 +114,10 @@ python $UPE/peripherals/util_system_info.py --unb $UNBS --fn 0:3 --bn 0:3 -n 2
 ACT_IMAGE_FB=$(python $UPE/peripherals/util_system_info.py --unb $UNBS --bn 0:3 -n 2 | grep -c $IMAGE_FB_RBFNAME)
 echo -n "BN image $IMAGE_FB_RBFNAME found running on $ACT_IMAGE_FB back nodes: "
 
-if [ "$ACT_IMAGE_FB" == "32" ] || [ "$ACT_IMAGE_FB" == "16" ]; then
+if [ "$OPTIONS" == "noflash" ]; then
+    echo Continuing without BN reflash due to noflash option
+    FLASH_BN=FALSE
+elif [ "$ACT_IMAGE_FB" == "32" ] || [ "$ACT_IMAGE_FB" == "16" ]; then
     echo Continuing without BN reflash
     FLASH_BN=FALSE
 else
@@ -126,7 +129,10 @@ fi
 ACT_IMAGE_BF=$(python $UPE/peripherals/util_system_info.py --unb $UNBS --fn 0:3 -n 2 | grep -c $IMAGE_BF_RBFNAME)
 echo -n "FN image $IMAGE_BF_RBFNAME found running on $ACT_IMAGE_BF front nodes: "
 
-if [ "$ACT_IMAGE_BF" == "32" ] || [ "$ACT_IMAGE_BF" == "16" ]; then
+if [ "$OPTIONS" == "noflash" ]; then
+    echo Continuing without FN reflash due to noflash option
+    FLASH_FN=FALSE
+elif [ "$ACT_IMAGE_BF" == "32" ] || [ "$ACT_IMAGE_BF" == "16" ]; then
     echo Continuing without FN reflash
     FLASH_FN=FALSE
 else
-- 
GitLab