bcm53xx: exit if writing kernel during sysupgrade fails
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
parent
7271eacb72
commit
93cc44c433
1 changed files with 2 additions and 2 deletions
|
@ -206,7 +206,7 @@ platform_pre_upgrade_trx() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Flash
|
# Flash
|
||||||
mtd write /tmp/kernel.trx firmware
|
mtd write /tmp/kernel.trx firmware || exit 1
|
||||||
nand_do_upgrade /tmp/root.ubi
|
nand_do_upgrade /tmp/root.ubi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ platform_pre_upgrade_seama() {
|
||||||
|
|
||||||
# Flash
|
# Flash
|
||||||
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"\(kernel\|linux\)".*/\1/p' /proc/mtd)
|
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
|
mtd ${kernel_size:+-c 0x$kernel_size} fixseama firmware
|
||||||
nand_do_upgrade $dir/root.ubi
|
nand_do_upgrade $dir/root.ubi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue