Skip to content

Commit

Permalink
ipq807x: xiaomi: set compat version for single rootfs
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
robimarko committed Jan 8, 2023
1 parent 1f6f189 commit ef42fc4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions target/linux/ipq807x/base-files/etc/board.d/05_compat-version
Original file line number Diff line number Diff line change
Expand Up @@ -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"
;;
Expand Down
11 changes: 9 additions & 2 deletions target/linux/ipq807x/image/generic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

12 comments on commit ef42fc4

@zxlhhyccc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AX6 device cannot be started with this update

@robimarko
Copy link
Owner Author

@robimarko robimarko commented on ef42fc4 Jan 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just repeating the same thing on multiple commits does nothing, especially since there are users that confirmed it works.

Without logs and knowing what exactly you did this is not going anywhere.

@zxlhhyccc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just repeating the same thing on multiple commits does nothing, especially since there are users that confirmed it works.

Without logs and knowing what exactly you did this is not going anywhere.

After firmware is flushed, the route will restart, but the route will not start! I don't know which users say it works, then I will compile the test!

@robimarko
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, without any logs you are just repeating the same, I dont have a crystal ball.

@javykhan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked smoothly for me on AX6. I flashed today

@zxlhhyccc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked smoothly for me on AX6. I flashed today

Do you want to upgrade the firmware on the luci page or on the command line?

@javykhan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used CLI for flashing and sysupgrade

@zxlhhyccc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was very strange, my luci upgrades would work, but they wouldn't launch...

@zxlhhyccc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After testing, 2.0 version AX6 does not boot, maybe I brush other uboot problem...

@javykhan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question, do i need to set compat version? I see its not anywhere in uci show

@zxlhhyccc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question, do i need to set compat version? I see its not anywhere in uci show

Currently I am using version 1.1 and it is OK, but version 2.0 will not boot, I really can't find the reason...

@javykhan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While upgrading to latest release i got warning of compat version (1.0 < 2.0). I set it to 2.0 and did sysupgrade successfully to latest release.

OpenWrt SNAPSHOT, r0-a38982e

root@OpenWrt:~# uci show system | grep compat
system.@System[0].compat_version='2.0'

Please sign in to comment.