From 93cc44c433fed754bd76f8016a1660a6b932361e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 18 Jun 2018 13:46:04 +0200 Subject: [PATCH] bcm53xx: exit if writing kernel during sysupgrade fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki --- target/linux/bcm53xx/base-files/lib/upgrade/platform.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh index 06451f17fd..fbd1036eb1 100644 --- a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh @@ -206,7 +206,7 @@ platform_pre_upgrade_trx() { } # Flash - mtd write /tmp/kernel.trx firmware + mtd write /tmp/kernel.trx firmware || exit 1 nand_do_upgrade /tmp/root.ubi } @@ -252,7 +252,7 @@ platform_pre_upgrade_seama() { # Flash local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"\(kernel\|linux\)".*/\1/p' /proc/mtd) - mtd write $dir/kernel.seama firmware + mtd write $dir/kernel.seama firmware || exit 1 mtd ${kernel_size:+-c 0x$kernel_size} fixseama firmware nand_do_upgrade $dir/root.ubi } -- 2.25.1