Skip to content

Commit 62be9dd

Browse files
committed
ipq807x: xiaomi: set compat version for single rootfs
Xiaomi devices were migrated to a single rootfs layout, so we must set the major compat version to 2 in order to prevent sysupgrading which brick any devices that have not been migrated. Signed-off-by: Robert Marko <[email protected]>
1 parent 1124ad3 commit 62be9dd

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

target/linux/ipq807x/base-files/etc/board.d/05_compat-version

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
board_config_update
99

1010
case "$(board_name)" in
11+
redmi,ax6|\
12+
xiaomi,ax3600|\
13+
xiaomi,ax9000)
14+
ucidef_set_compat_version "2.0"
15+
;;
1116
*)
1217
ucidef_set_compat_version "1.1"
1318
;;

target/linux/ipq807x/image/generic.mk

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ define Device/IfnameMigration
2222
DEVICE_COMPAT_MESSAGE := Network interface names have changed
2323
endef
2424

25+
define Device/partition-layout-migration
26+
DEVICE_COMPAT_VERSION := 2.0
27+
DEVICE_COMPAT_MESSAGE := *** Partition layout has changed from earlier \
28+
versions. You need to reinstall the firmware from UART or a migration \
29+
initramfs image. Settings will be lost. ***
30+
endef
31+
2532
define Device/dynalink_dl-wrx36
2633
$(call Device/FitImage)
2734
$(call Device/UbiFit)
@@ -92,7 +99,7 @@ TARGET_DEVICES += redmi_ax6
9299
define Device/xiaomi_ax3600
93100
$(call Device/FitImage)
94101
$(call Device/UbiFit)
95-
$(call Device/IfnameMigration)
102+
$(call Device/partition-layout-migration)
96103
DEVICE_VENDOR := Xiaomi
97104
DEVICE_MODEL := AX3600
98105
BLOCKSIZE := 128k
@@ -111,7 +118,7 @@ TARGET_DEVICES += xiaomi_ax3600
111118
define Device/xiaomi_ax9000
112119
$(call Device/FitImage)
113120
$(call Device/UbiFit)
114-
$(call Device/IfnameMigration)
121+
$(call Device/partition-layout-migration)
115122
DEVICE_VENDOR := Xiaomi
116123
DEVICE_MODEL := AX9000
117124
BLOCKSIZE := 128k

0 commit comments

Comments
 (0)