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/rb532/base-files/lib/upgrade/platform.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'target/linux/rb532') diff --git a/target/linux/rb532/base-files/lib/upgrade/platform.sh b/target/linux/rb532/base-files/lib/upgrade/platform.sh index a6a6e9b8d3..334d6e2ff6 100644 --- a/target/linux/rb532/base-files/lib/upgrade/platform.sh +++ b/target/linux/rb532/base-files/lib/upgrade/platform.sh @@ -10,11 +10,8 @@ platform_check_image() { return 0; } -platform_nand_pre_upgrade() { +platform_do_upgrade() { mtd erase kernel tar xf "$1" "sysupgrade-$(board_name)/kernel" -O | nandwrite -o /dev/mtd0 - -} - -platform_do_upgrade() { nand_do_upgrade "$1" } -- cgit v1.2.3