mirror of https://github.com/hak5/openwrt.git
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 <mar.kolya@gmail.com> SVN-Revision: 47879lede-17.01
parent
abc84551c0
commit
f99c61a94a
|
@ -275,6 +275,10 @@ nand_upgrade_tar() {
|
||||||
nand_do_upgrade_stage2() {
|
nand_do_upgrade_stage2() {
|
||||||
local file_type=$(identify $1)
|
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"
|
[ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART="rootfs"
|
||||||
|
|
||||||
case "$file_type" in
|
case "$file_type" in
|
||||||
|
|
Loading…
Reference in New Issue