Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion feeds/ipq807x_v5.4/ipq50xx/base-files/etc/init.d/bootcount
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
44 changes: 38 additions & 6 deletions feeds/ipq807x_v5.4/ipq50xx/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
29 changes: 24 additions & 5 deletions feeds/ipq807x_v5.4/ipq60xx/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion feeds/ipq807x_v5.4/ipq807x/base-files/etc/init.d/bootcount
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ boot() {
hfcl,ion4xe|\
hfcl,ion4xi)
fw_setenv boot_count 0
;;
;;
edgecore,eap101|\
edgecore,eap102|\
edgecore,oap102|\
Expand Down
25 changes: 20 additions & 5 deletions feeds/ipq807x_v5.4/ipq807x/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
32 changes: 24 additions & 8 deletions feeds/qca-wifi-7/ipq53xx/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading