diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-06-18 13:46:04 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-12-18 10:09:11 +0100 |
commit | 81541d9159c988c068d7ba42bde75dcde5775312 (patch) | |
tree | 9b8f8898a780b1341ab4fda0d2e1a3eebfbf09c4 /target/linux/bcm53xx | |
parent | 8dd91b56bef0ffb469ae0f156d3dbd2c95afd4e2 (diff) | |
download | upstream-81541d9159c988c068d7ba42bde75dcde5775312.tar.gz upstream-81541d9159c988c068d7ba42bde75dcde5775312.tar.bz2 upstream-81541d9159c988c068d7ba42bde75dcde5775312.zip |
bcm53xx: exit if writing kernel during sysupgrade fails
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(backported from 93cc44c433fed754bd76f8016a1660a6b932361e)
Diffstat (limited to 'target/linux/bcm53xx')
-rw-r--r-- | target/linux/bcm53xx/base-files/lib/upgrade/platform.sh | 4 |
1 files 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 16285aaa08..5a42a36ae4 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 } |