iop: genconfig: Fix for targets with hyphens

A recent change broke genconfig for targets with hyphens. Fix this.

Fixes: a22898c92b ("iop: genconfig: Get subtarget using data from OpenWrt")
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
This commit is contained in:
Andreas Gnau 2023-03-30 08:32:31 +02:00
parent 54402f6602
commit e58207edf0
2 changed files with 2 additions and 2 deletions

View file

@ -363,7 +363,7 @@ function genconfig {
airoha | iopsys_mediatek | brcmbca | ipq95xx) airoha | iopsys_mediatek | brcmbca | ipq95xx)
# This assumes the device name to be unique within one target, # This assumes the device name to be unique within one target,
# which is a fair assumption to make. # 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 if [ -z "$subtarget" ]; then
echo "Error determining subtarget for $target / ${BOARDTYPE}" echo "Error determining subtarget for $target / ${BOARDTYPE}"
return 1 return 1

View file

@ -337,7 +337,7 @@ function genconfig_min {
airoha | iopsys_mediatek | brcmbca | ipq95xx) airoha | iopsys_mediatek | brcmbca | ipq95xx)
# This assumes the device name to be unique within one target, # This assumes the device name to be unique within one target,
# which is a fair assumption to make. # 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 if [ -z "$subtarget" ]; then
echo "Error determining subtarget for $target / ${BOARDTYPE}" echo "Error determining subtarget for $target / ${BOARDTYPE}"
return 1 return 1