ipq807x: enable dual boot on HFCL ION4X*

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2022-04-21 11:49:20 +02:00
parent cff778d8ca
commit 73f42e3c6f
3 changed files with 23 additions and 2 deletions

View File

@@ -4,6 +4,10 @@ START=99
boot() {
case "$(board_name)" in
hfcl,ion4xe|\
hfcl,ion4xi)
fw_setenv boot_count 0
;;
edgecore,eap101|\
edgecore,eap102)
avail=$(fw_printenv -n upgrade_available)

View File

@@ -70,8 +70,6 @@ platform_do_upgrade() {
edgecore,eap104|\
glinet,ax1800|\
glinet,axt1800|\
hfcl,ion4xi|\
hfcl,ion4xe|\
qcom,ipq6018-cp01|\
qcom,ipq807x-hk01|\
qcom,ipq807x-hk14|\
@@ -83,6 +81,17 @@ platform_do_upgrade() {
tplink,ex227)
nand_upgrade_tar "$1"
;;
hfcl,ion4xi|\
hfcl,ion4xe)
if grep -q rootfs_1 /proc/cmdline; then
CI_UBIPART="rootfs"
fw_setenv primary 0 || exit 1
else
CI_UBIPART="rootfs_1"
fw_setenv primary 1 || exit 1
fi
nand_upgrade_tar "$1"
;;
edgecore,eap106)
CI_UBIPART="rootfs1"
[ "$(find_mtd_chardev rootfs)" ] && CI_UBIPART="rootfs"

View File

@@ -53,6 +53,14 @@ boot() {
PART_NAME=rootfs1
fi
;;
hfcl,ion4xi|\
hfcl,ion4xe)
if grep -q rootfs_1 /proc/cmdline; then
PART_NAME=rootfs
else
PART_NAME=rootfs_1
fi
;;
*)
return 1
;;