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