diff --git a/iop/scripts/genconfig.sh b/iop/scripts/genconfig.sh index 6d21bb468..7a320118e 100755 --- a/iop/scripts/genconfig.sh +++ b/iop/scripts/genconfig.sh @@ -363,7 +363,7 @@ function genconfig { airoha | iopsys_mediatek | brcmbca | ipq95xx) # This assumes the device name to be unique within one target, # which is a fair assumption to make. - local subtarget="$(get_subtarget_for_device "$target" "$BOARDTYPE")" + local subtarget="$(get_subtarget_for_device "${target/_/-}" "$BOARDTYPE")" if [ -z "$subtarget" ]; then echo "Error determining subtarget for $target / ${BOARDTYPE}" return 1 diff --git a/iop/scripts/genconfig_min.sh b/iop/scripts/genconfig_min.sh index ffc3ab6ba..6856974df 100644 --- a/iop/scripts/genconfig_min.sh +++ b/iop/scripts/genconfig_min.sh @@ -337,7 +337,7 @@ function genconfig_min { airoha | iopsys_mediatek | brcmbca | ipq95xx) # This assumes the device name to be unique within one target, # which is a fair assumption to make. - local subtarget="$(get_subtarget_for_device "$target" "$BOARDTYPE")" + local subtarget="$(get_subtarget_for_device "${target/_/-}" "$BOARDTYPE")" if [ -z "$subtarget" ]; then echo "Error determining subtarget for $target / ${BOARDTYPE}" return 1