From 3373d2bd800d2890f3101002fa5f67f7a79545f2 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 12 Dec 2015 07:37:45 +0000 Subject: procd: add 'platform_nand_pre_upgrade' Add 'platform_nand_pre_upgrade' callback to allow platform specific preparation right before flashinng, when already in ramdisk. Example uses might be setting correct values for CI_{KERNPART,UBIPART}. Signed-off-by: Nikolay Martynov git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47879 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/system/procd/files/nand.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'package') diff --git a/package/system/procd/files/nand.sh b/package/system/procd/files/nand.sh index 0c179cbb03..8b0564dca2 100644 --- a/package/system/procd/files/nand.sh +++ b/package/system/procd/files/nand.sh @@ -275,6 +275,10 @@ nand_upgrade_tar() { nand_do_upgrade_stage2() { local file_type=$(identify $1) + if type 'platform_nand_pre_upgrade' >/dev/null 2>/dev/null; then + platform_nand_pre_upgrade "$1" + fi + [ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART="rootfs" case "$file_type" in -- cgit v1.2.3