mvebu: cortexa9: fix Linksys upgrade, restore config step
authorMichael Trinidad <trinidude4@hotmail.com>
Fri, 7 Apr 2023 13:02:37 +0000 (09:02 -0400)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 11 Apr 2023 10:22:09 +0000 (12:22 +0200)
It appears that the refactor of the upgrade process for NAND devices                                                                                                                            resulted in the nand_do_upgrade_success step not being called for
devices using the linksys.sh script. As a result, configuration was
not preserved over sysupgrade steps.

This restores the preservation of configs for mvebu/cortexa9 devices using the
linksys.sh script.

Fixes: e25e6d8e5407 ("base-files: fix and clean up nand sysupgrade code")
Signed-off-by: Michael Trinidad <trinidude4@hotmail.com>
target/linux/mvebu/cortexa9/base-files/lib/upgrade/linksys.sh

index 1a23a9bbc256c7e517e255504fb3c73c6ee0e24f..d4222a3f31b3f309620ae4cd89cb7a5c9611806d 100644 (file)
@@ -68,7 +68,12 @@ platform_do_upgrade_linksys() {
                        CI_UBIPART="rootfs2"
                fi
 
-               nand_upgrade_tar "$1"
+               if nand_upgrade_tar "$1" ; then
+                       nand_do_upgrade_success
+               else
+                       nand_do_upgrade_failed
+               fi
+
        }
        [ "$magic_long" = "27051956" -o "$magic_long" = "0000a0e1" ] && {
                get_image "$1" | mtd write - $part_label