diff options
Diffstat (limited to 'target/linux/ramips/mt7621/base-files/lib')
-rwxr-xr-x | target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index f8aa0373a0..d74aba3bfe 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -5,6 +5,9 @@ PART_NAME=firmware REQUIRE_IMAGE_METADATA=1 +RAMFS_COPY_BIN='fw_printenv fw_setenv' +RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock' + platform_check_image() { return 0 } @@ -13,6 +16,17 @@ platform_do_upgrade() { local board=$(board_name) case "$board" in + alfa-network,quad-e4g) + [ "$(fw_printenv -n dual_image 2>/dev/null)" = "1" ] &&\ + [ -n "$(find_mtd_part backup)" ] && { + PART_NAME=backup + if [ "$(fw_printenv -n bootactive 2>/dev/null)" = "1" ]; then + fw_setenv bootactive 2 || exit 1 + else + fw_setenv bootactive 1 || exit 1 + fi + } + ;; mikrotik,rb750gr3|\ mikrotik,rbm11g|\ mikrotik,rbm33g) |