treewide: sysupgrade: get rid of platform_nand_pre_upgrade()
[openwrt/openwrt.git] / target / linux / rb532 / base-files / lib / upgrade / platform.sh
1 REQUIRE_IMAGE_METADATA=1
2 RAMFS_COPY_BIN='nandwrite'
3 CI_KERNPART=none
4
5 platform_check_image() {
6 [ -e /dev/ubi0 ] || {
7 ubiattach -m 1
8 sleep 1
9 }
10 return 0;
11 }
12
13 platform_do_upgrade() {
14 mtd erase kernel
15 tar xf "$1" "sysupgrade-$(board_name)/kernel" -O | nandwrite -o /dev/mtd0 -
16 nand_do_upgrade "$1"
17 }