From 3a7d8b1c5174447d4ef2b8b4e2372e8649dbc982 Mon Sep 17 00:00:00 2001 From: Andreas Gnau Date: Wed, 20 Jul 2022 18:12:14 +0200 Subject: [PATCH] iop: ssh_upgrade: Don't hardcode subtarget to generic Signed-off-by: Andreas Gnau --- iop/scripts/iopupgrade.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/iop/scripts/iopupgrade.sh b/iop/scripts/iopupgrade.sh index 3fd68cfec..f9ad5030b 100644 --- a/iop/scripts/iopupgrade.sh +++ b/iop/scripts/iopupgrade.sh @@ -51,9 +51,8 @@ function upd_ask_ok { } function upd_select_file { - dialog --keep-tite --title "To select file use TAB/ARROW to hilight then press SPACEBAR -> RETURN" \ - --fselect "bin/targets/$CONFIG_TARGET_BOARD/generic/" \ + --fselect "${upd_fw:-bin/targets/$CONFIG_TARGET_BOARD/$CONFIG_TARGET_SUBTARGET/}" \ $((lines - 10)) $((cols - 5)) \ 2>$tempfile @@ -247,15 +246,16 @@ function ssh_upgrade { upd_fw_base=$(basename $upd_fw) else set_config_string CONFIG_TARGET_BOARD + set_config_string CONFIG_TARGET_SUBTARGET firmwares=$( - cd bin/targets/$CONFIG_TARGET_BOARD/generic/ + cd "bin/targets/$CONFIG_TARGET_BOARD/$CONFIG_TARGET_SUBTARGET/" ls -t *[0-9].y[3] ) # if target uses pkgtb if [ -z "$firmwares"]; then firmwares=$( - cd bin/targets/$CONFIG_TARGET_BOARD/generic/ + cd bin/targets/$CONFIG_TARGET_BOARD/$CONFIG_TARGET_SUBTARGET/ ls -t last.pkgtb ) fi @@ -264,7 +264,7 @@ function ssh_upgrade { #echo "firmware $upd_fw" break done - upd_fw="bin/targets/$CONFIG_TARGET_BOARD/generic/$upd_fw_base" + upd_fw="bin/targets/$CONFIG_TARGET_BOARD/$CONFIG_TARGET_SUBTARGET/$upd_fw_base" fi [ $do_dialog -eq 1 ] && upd_select_start