openwrtv3/target/linux/rb532/base-files/lib/upgrade/platform.sh
Matthias Schiffer 438dcbfe74
base-files: automatically handle paths and symlinks for RAMFS_COPY_BIN
Depending on busybox applet selection, paths of basic utiilties may differ,
and may not work as symlinks to busybox. Simply using whatever binary is
found in PATH and detecting symlinks automatically is more robust and
easier to maintain.

The list of binaries is also slightly cleaned up and duplicates are
removed.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-07-11 17:26:32 +02:00

26 lines
442 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_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"
}