openwrtv4/target/linux/rb532/base-files/lib/upgrade/platform.sh
Mathias Kresin e4e984f2a0 treewide: use only board_name function to get name
Do not parse /tmp/sysinfo/board_name, /proc/cpuinfo or the device tree
compatible string directly. Always use the board_name function to get
the board name.

The admswconfig package still reads /proc/cpuinfo directly. The code
looks somehow broken and the whole adm5120 which uses this package
looks unmaintained. Leave it as it is for now.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-07-15 23:13:34 +02:00

24 lines
394 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() {
mtd erase kernel
tar xf "$1" "sysupgrade-$(board_name)/kernel" -O | nandwrite -o /dev/mtd0 -
}
platform_do_upgrade() {
default_do_upgrade "$ARGV"
}