mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2026-01-27 10:22:23 +00:00
ipq807x_v5.4, qca-wifi-7: enable/disable boot bank switch based on upgrade_available value during fw upgrade for Edgecore APs
Fixes: WIFI-15304 Signed-off-by: Tanya Singh <tanya_singh@accton.com>
This commit is contained in:
committed by
John Crispin
parent
6765ca15d0
commit
1d4cbc46d1
@@ -6,8 +6,9 @@ boot() {
|
||||
case "$(board_name)" in
|
||||
hfcl,ion4xi_w)
|
||||
fw_setenv boot_count 0
|
||||
;;
|
||||
;;
|
||||
edgecore,oap101|\
|
||||
edgecore,oap101e|\
|
||||
edgecore,eap104)
|
||||
avail=$(fw_printenv -n upgrade_available)
|
||||
[ "${avail}" -eq 0 ] && fw_setenv upgrade_available 1
|
||||
|
||||
@@ -114,12 +114,7 @@ platform_do_upgrade() {
|
||||
indio,um-325ax-v2|\
|
||||
indio,um-335ax|\
|
||||
indio,um-525axp|\
|
||||
indio,um-525axm|\
|
||||
edgecore,oap101|\
|
||||
edgecore,oap101-6e|\
|
||||
edgecore,oap101e|\
|
||||
edgecore,oap101e-6e|\
|
||||
edgecore,eap104)
|
||||
indio,um-525axm)
|
||||
if [ "$(find_mtd_chardev rootfs)" ]; then
|
||||
CI_UBIPART="rootfs"
|
||||
else
|
||||
@@ -133,6 +128,43 @@ platform_do_upgrade() {
|
||||
fi
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
edgecore,oap101|\
|
||||
edgecore,oap101-6e|\
|
||||
edgecore,oap101e|\
|
||||
edgecore,oap101e-6e|\
|
||||
edgecore,eap104)
|
||||
if [ "$(find_mtd_chardev rootfs)" ]; then
|
||||
CI_UBIPART="rootfs"
|
||||
else
|
||||
if [ -e /tmp/downgrade ]; then
|
||||
CI_UBIPART="rootfs1"
|
||||
{ echo 'active 1'; echo 'upgrade_available 0'; } > /tmp/fw_setenv.txt || exit 1
|
||||
CI_FWSETENV="-s /tmp/fw_setenv.txt"
|
||||
else
|
||||
local CI_UBIPART_B=""
|
||||
if grep -q rootfs1 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs2"
|
||||
CI_UBIPART_B="rootfs1"
|
||||
CI_FWSETENV="active 2"
|
||||
elif grep -q rootfs2 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs1"
|
||||
CI_UBIPART_B="rootfs2"
|
||||
CI_FWSETENV="active 1"
|
||||
else
|
||||
CI_UBIPART="rootfs1"
|
||||
CI_UBIPART_B=""
|
||||
CI_FWSETENV="active 1"
|
||||
fi
|
||||
if [ "$(fw_printenv -n upgrade_available 2>/dev/null)" = "0" ]; then
|
||||
if [ -n "$CI_UBIPART_B" ]; then
|
||||
CI_UBIPART="$CI_UBIPART_B"
|
||||
CI_FWSETENV=""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
glinet,b3000)
|
||||
CI_UBIPART="rootfs1"
|
||||
[ "$(find_mtd_chardev rootfs)" ] && CI_UBIPART="rootfs"
|
||||
|
||||
@@ -182,12 +182,31 @@ platform_do_upgrade() {
|
||||
if [ "$(find_mtd_chardev rootfs)" ]; then
|
||||
CI_UBIPART="rootfs"
|
||||
else
|
||||
if grep -q rootfs1 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs2"
|
||||
CI_FWSETENV="active 2"
|
||||
else
|
||||
if [ -e /tmp/downgrade ]; then
|
||||
CI_UBIPART="rootfs1"
|
||||
CI_FWSETENV="active 1"
|
||||
{ echo 'active 1'; echo 'upgrade_available 0'; } > /tmp/fw_setenv.txt || exit 1
|
||||
CI_FWSETENV="-s /tmp/fw_setenv.txt"
|
||||
else
|
||||
local CI_UBIPART_B=""
|
||||
if grep -q rootfs1 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs2"
|
||||
CI_UBIPART_B="rootfs1"
|
||||
CI_FWSETENV="active 2"
|
||||
elif grep -q rootfs2 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs1"
|
||||
CI_UBIPART_B="rootfs2"
|
||||
CI_FWSETENV="active 1"
|
||||
else
|
||||
CI_UBIPART="rootfs1"
|
||||
CI_UBIPART_B=""
|
||||
CI_FWSETENV="active 1"
|
||||
fi
|
||||
if [ "$(fw_printenv -n upgrade_available 2>/dev/null)" = "0" ]; then
|
||||
if [ -n "$CI_UBIPART_B" ]; then
|
||||
CI_UBIPART="$CI_UBIPART_B"
|
||||
CI_FWSETENV=""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
nand_upgrade_tar "$1"
|
||||
|
||||
@@ -7,7 +7,7 @@ boot() {
|
||||
hfcl,ion4xe|\
|
||||
hfcl,ion4xi)
|
||||
fw_setenv boot_count 0
|
||||
;;
|
||||
;;
|
||||
edgecore,eap101|\
|
||||
edgecore,eap102|\
|
||||
edgecore,oap102|\
|
||||
|
||||
@@ -78,12 +78,27 @@ platform_do_upgrade() {
|
||||
CI_UBIPART="rootfs1"
|
||||
{ echo 'active 1'; echo 'upgrade_available 0'; } > /tmp/fw_setenv.txt || exit 1
|
||||
CI_FWSETENV="-s /tmp/fw_setenv.txt"
|
||||
elif grep -q rootfs1 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs2"
|
||||
CI_FWSETENV="active 2"
|
||||
else
|
||||
CI_UBIPART="rootfs1"
|
||||
CI_FWSETENV="active 1"
|
||||
local CI_UBIPART_B=""
|
||||
if grep -q rootfs1 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs2"
|
||||
CI_UBIPART_B="rootfs1"
|
||||
CI_FWSETENV="active 2"
|
||||
elif grep -q rootfs2 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs1"
|
||||
CI_UBIPART_B="rootfs2"
|
||||
CI_FWSETENV="active 1"
|
||||
else
|
||||
CI_UBIPART="rootfs1"
|
||||
CI_UBIPART_B=""
|
||||
CI_FWSETENV="active 1"
|
||||
fi
|
||||
if [ "$(fw_printenv -n upgrade_available 2>/dev/null)" = "0" ]; then
|
||||
if [ -n "$CI_UBIPART_B" ]; then
|
||||
CI_UBIPART="$CI_UBIPART_B"
|
||||
CI_FWSETENV=""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
nand_upgrade_tar "$1"
|
||||
|
||||
@@ -151,15 +151,31 @@ platform_do_upgrade() {
|
||||
spi_nor_emmc_do_upgrade_bootconfig $1
|
||||
;;
|
||||
edgecore,eap105)
|
||||
if [ "$(find_mtd_chardev rootfs)" ]; then
|
||||
CI_UBIPART="rootfs"
|
||||
else
|
||||
if grep -q rootfs1 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs2"
|
||||
CI_FWSETENV="active 2"
|
||||
else
|
||||
if [ -e /tmp/downgrade ]; then
|
||||
CI_UBIPART="rootfs1"
|
||||
CI_FWSETENV="active 1"
|
||||
{ echo 'active 1'; echo 'upgrade_available 0'; } > /tmp/fw_setenv.txt || exit 1
|
||||
CI_FWSETENV="-s /tmp/fw_setenv.txt"
|
||||
else
|
||||
local CI_UBIPART_B=""
|
||||
if grep -q rootfs1 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs2"
|
||||
CI_UBIPART_B="rootfs1"
|
||||
CI_FWSETENV="active 2"
|
||||
elif grep -q rootfs2 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs1"
|
||||
CI_UBIPART_B="rootfs2"
|
||||
CI_FWSETENV="active 1"
|
||||
else
|
||||
CI_UBIPART="rootfs1"
|
||||
CI_UBIPART_B=""
|
||||
CI_FWSETENV="active 1"
|
||||
fi
|
||||
if [ "$(fw_printenv -n upgrade_available 2>/dev/null)" = "0" ]; then
|
||||
if [ -n "$CI_UBIPART_B" ]; then
|
||||
CI_UBIPART="$CI_UBIPART_B"
|
||||
CI_FWSETENV=""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
nand_upgrade_tar "$1"
|
||||
|
||||
Reference in New Issue
Block a user