From 8faba0567e3336b94e31b6d75ee1e4a059b708ed Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Thu, 5 Jan 2023 22:12:34 +0100 Subject: [PATCH] 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 --- .../ipq807x/base-files/etc/board.d/05_compat-version | 5 +++++ target/linux/ipq807x/image/generic.mk | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/target/linux/ipq807x/base-files/etc/board.d/05_compat-version b/target/linux/ipq807x/base-files/etc/board.d/05_compat-version index 70272f99ed5d8..b1f1460b1102d 100644 --- a/target/linux/ipq807x/base-files/etc/board.d/05_compat-version +++ b/target/linux/ipq807x/base-files/etc/board.d/05_compat-version @@ -8,6 +8,11 @@ board_config_update case "$(board_name)" in + redmi,ax6|\ + xiaomi,ax3600|\ + xiaomi,ax9000) + ucidef_set_compat_version "2.0" + ;; *) ucidef_set_compat_version "1.1" ;; diff --git a/target/linux/ipq807x/image/generic.mk b/target/linux/ipq807x/image/generic.mk index 30e6f14cae371..394ef0ab30d20 100644 --- a/target/linux/ipq807x/image/generic.mk +++ b/target/linux/ipq807x/image/generic.mk @@ -22,6 +22,13 @@ define Device/IfnameMigration DEVICE_COMPAT_MESSAGE := Network interface names have changed endef +define Device/partition-layout-migration + DEVICE_COMPAT_VERSION := 2.0 + DEVICE_COMPAT_MESSAGE := *** Partition layout has changed from earlier \ + versions. You need to reinstall the firmware from UART or a migration \ + initramfs image. Settings will be lost. *** +endef + define Device/dynalink_dl-wrx36 $(call Device/FitImage) $(call Device/UbiFit) @@ -92,7 +99,7 @@ TARGET_DEVICES += redmi_ax6 define Device/xiaomi_ax3600 $(call Device/FitImage) $(call Device/UbiFit) - $(call Device/IfnameMigration) + $(call Device/partition-layout-migration) DEVICE_VENDOR := Xiaomi DEVICE_MODEL := AX3600 BLOCKSIZE := 128k @@ -111,7 +118,7 @@ TARGET_DEVICES += xiaomi_ax3600 define Device/xiaomi_ax9000 $(call Device/FitImage) $(call Device/UbiFit) - $(call Device/IfnameMigration) + $(call Device/partition-layout-migration) DEVICE_VENDOR := Xiaomi DEVICE_MODEL := AX9000 BLOCKSIZE := 128k