mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 00:11:13 +00:00
ad76fdfc8a
Signed-off-by: Felix Fietkau <nbd@nbd.name>
27 lines
450 B
Bash
27 lines
450 B
Bash
REQUIRE_IMAGE_METADATA=1
|
|
RAMFS_COPY_BIN=/usr/sbin/nandwrite
|
|
CI_KERNPART=none
|
|
|
|
platform_check_image() {
|
|
[ -e /dev/ubi0 ] || {
|
|
ubiattach -m 1
|
|
sleep 1
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
platform_pre_upgrade() {
|
|
nand_do_upgrade "$1"
|
|
}
|
|
|
|
platform_nand_pre_upgrade() {
|
|
local board_name="$(cat /tmp/sysinfo/board_name)"
|
|
|
|
mtd erase kernel
|
|
tar xf "$1" sysupgrade-$board_name/kernel -O | nandwrite -o /dev/mtd0 -
|
|
}
|
|
|
|
platform_do_upgrade() {
|
|
default_do_upgrade "$ARGV"
|
|
}
|