mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 01:11:14 +00:00
1cbe0d659c
1) nand_do_upgrade() is always called by a target code 2) nand_do_upgrade() starts with calling platform_nand_pre_upgrade() It means there is no need for the platform_nand_pre_upgrade() callback at all. All code that was present there could bo moved & simplly called by a target right before the nand_do_upgrade(). Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
18 lines
305 B
Bash
18 lines
305 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_do_upgrade() {
|
|
mtd erase kernel
|
|
tar xf "$1" "sysupgrade-$(board_name)/kernel" -O | nandwrite -o /dev/mtd0 -
|
|
nand_do_upgrade "$1"
|
|
}
|