mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-02-18 18:21:23 +01:00
iop: ssh_upgrade: Adapt to new image filenames
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
This commit is contained in:
parent
9a9bef4935
commit
63a2edb417
1 changed files with 6 additions and 20 deletions
|
|
@ -242,30 +242,16 @@ function ssh_upgrade {
|
|||
esac
|
||||
done
|
||||
|
||||
if [ -n "$upd_fw" ]; then
|
||||
upd_fw_base=$(basename $upd_fw)
|
||||
else
|
||||
if [ -z "$upd_fw" ]; then
|
||||
set_config_string CONFIG_TARGET_BOARD
|
||||
set_config_string CONFIG_TARGET_SUBTARGET
|
||||
firmwares=$(
|
||||
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/$CONFIG_TARGET_SUBTARGET/
|
||||
ls -t last.pkgtb
|
||||
)
|
||||
upd_fw="$(realpath -q --canonicalize-existing --relative-to=. "bin/targets/$CONFIG_TARGET_BOARD/$CONFIG_TARGET_SUBTARGET/"last.{pkgtb,itb})"
|
||||
if [ -z "$upd_fw" ] && [ $do_dialog -eq 0 ]; then
|
||||
echo "Could not find image. Check that last.{itb,pkgtb} exists or specify an image using -f <image> or -i (interactive)." >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
for upd_fw_base in $firmwares; do
|
||||
#echo "firmware $upd_fw"
|
||||
break
|
||||
done
|
||||
upd_fw="bin/targets/$CONFIG_TARGET_BOARD/$CONFIG_TARGET_SUBTARGET/$upd_fw_base"
|
||||
fi
|
||||
upd_fw_base="$(basename "$upd_fw")"
|
||||
|
||||
[ $do_dialog -eq 1 ] && upd_select_start
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue