mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-24 15:56:49 +00:00
188328111b
Calling nand_do_upgrade() from platform_pre_upgrade() was deprecated
with 30f61a34b4
("base-files: always use staged sysupgrade").
Update the platform upgrade code to use platform_do_upgrade() for NAND
images as well.
Signed-off-by: Mathias Kresin <dev@kresin.me>
21 lines
338 B
Bash
21 lines
338 B
Bash
REQUIRE_IMAGE_METADATA=1
|
|
RAMFS_COPY_BIN='nandwrite'
|
|
CI_KERNPART=none
|
|
|
|
platform_check_image() {
|
|
[ -e /dev/ubi0 ] || {
|
|
ubiattach -m 1
|
|
sleep 1
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
platform_nand_pre_upgrade() {
|
|
mtd erase kernel
|
|
tar xf "$1" "sysupgrade-$(board_name)/kernel" -O | nandwrite -o /dev/mtd0 -
|
|
}
|
|
|
|
platform_do_upgrade() {
|
|
nand_do_upgrade "$1"
|
|
}
|