rb532: switch to UBI, drop yaffs2 support, use sysupgrade for NAND

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau
2017-01-05 17:22:16 +01:00
parent 5b6b0aa267
commit ad76fdfc8a
9 changed files with 105 additions and 162 deletions

View File

@@ -0,0 +1,26 @@
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"
}