From 1cbe0d659c4438cc6348093385a24e969aeadac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Wed, 17 Jul 2019 11:32:54 +0200 Subject: treewide: sysupgrade: get rid of platform_nand_pre_upgrade() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1) nand_do_upgrade() is always called by a target code 2) nand_do_upgrade() starts with calling platform_nand_pre_upgrade() It means there is no need for the platform_nand_pre_upgrade() callback at all. All code that was present there could bo moved & simplly called by a target right before the nand_do_upgrade(). Signed-off-by: Rafał Miłecki --- target/linux/ipq806x/base-files/lib/upgrade/platform.sh | 14 ++++---------- target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh | 2 ++ 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'target/linux/ipq806x') diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index 5919613cb9..b61047ff70 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -21,10 +21,12 @@ platform_do_upgrade() { netgear,r7500v2 |\ netgear,r7800 |\ qcom,ipq8064-ap148 |\ - qcom,ipq8064-ap161 |\ - zyxel,nbg6817) + qcom,ipq8064-ap161) nand_do_upgrade "$1" ;; + zyxel,nbg6817) + zyxel_do_upgrade "$1" + ;; linksys,ea8500) platform_do_upgrade_linksys "$1" ;; @@ -44,11 +46,3 @@ platform_do_upgrade() { ;; esac } - -platform_nand_pre_upgrade() { - case "$(board_name)" in - zyxel,nbg6817) - zyxel_do_upgrade "$1" - ;; - esac -} diff --git a/target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh b/target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh index ba8e825956..33cd98339c 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh @@ -118,5 +118,7 @@ zyxel_do_upgrade() { zyxel_do_flash $tar_file $kernel $rootfs $dualflagmtd + nand_do_upgrade "$1" + return 0 } -- cgit v1.2.3