From 910c8e61e24b17bfe0f75d7b4daa4d79d5850a4a Mon Sep 17 00:00:00 2001 From: Andreas Gnau Date: Thu, 1 Jun 2023 17:17:37 +0200 Subject: [PATCH] iop: genconfig: Lower priority of BCM target This is a hack to retain existing behaviour in case of ambiguities of device names between differen targets. For now, let Broadcom have the lowest priority. genconfig script is to be replaced soon and the existing code makes adding a proper check hard and we need some way to deal with the ambiguity quickly. Signed-off-by: Andreas Gnau --- iop/scripts/genconfig.sh | 18 +++++++++--------- iop/scripts/genconfig_min.sh | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/iop/scripts/genconfig.sh b/iop/scripts/genconfig.sh index ed4c792ce..47e109aa5 100755 --- a/iop/scripts/genconfig.sh +++ b/iop/scripts/genconfig.sh @@ -127,14 +127,6 @@ function genconfig { return fi - for p in $brcmbca; do - if [ $p == $profile ]; then - target="brcmbca" - target_config_path="$brcmbca_feed/config" - return - fi - done - for p in $airoha; do if [ $p == $profile ]; then target="airoha" @@ -182,6 +174,14 @@ function genconfig { return fi done + + for p in $brcmbca; do + if [ $p == $profile ]; then + target="brcmbca" + target_config_path="$brcmbca_feed/config" + return + fi + done } git remote -v | grep -qE '(git@|ssh://)' && { @@ -506,7 +506,7 @@ function genconfig { CUSTREPO="${CUSTREPO:-git@dev.iopsys.eu:consumer/iopsys.git}" setup_dirs - create_and_copy_files "$@" + create_and_copy_files "$@" || exit 1 fi } diff --git a/iop/scripts/genconfig_min.sh b/iop/scripts/genconfig_min.sh index 320bac966..145a3a459 100644 --- a/iop/scripts/genconfig_min.sh +++ b/iop/scripts/genconfig_min.sh @@ -126,14 +126,6 @@ function genconfig_min { return fi - for p in $brcmbca; do - if [ $p == $profile ]; then - target="brcmbca" - target_config_path="$brcmbca_feed/config" - return - fi - done - for p in $airoha; do if [ $p == $profile ]; then target="airoha" @@ -181,6 +173,14 @@ function genconfig_min { return fi done + + for p in $brcmbca; do + if [ $p == $profile ]; then + target="brcmbca" + target_config_path="$brcmbca_feed/config" + return + fi + done } git remote -v | grep -qE '(git@|ssh://)' && {