Skip to content

Commit

Permalink
mediatek: mt7622: expand kernel size to 6MiB for Xiaomi AX6S (RB03/RB01)
Browse files Browse the repository at this point in the history
Expand kernel partition size on Xiaomi AX6S for the kernel larger than
4 MiB.
To prevent upgrading from old firmware before this commit, bump the
compat version to 1.1

Signed-off-by: Oleg S <[email protected]>
  • Loading branch information
remittor committed Mar 2, 2024
1 parent 7f13b9f commit 10efb97
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
*/
partition@2c0000 {
label = "kernel";
reg = <0x2c0000 0x400000>;
reg = <0x2c0000 0x600000>;
};

/* ubi partition is the result of squashing
Expand All @@ -312,7 +312,7 @@
*/
partition@6c0000 {
label = "ubi";
reg = <0x6C0000 0x6f00000>;
reg = <0x8c0000 0x6d00000>;
};
};
};
Expand Down
8 changes: 6 additions & 2 deletions target/linux/mediatek/image/mt7622.mk
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,13 @@ define Device/xiaomi_redmi-router-ax6s
IMAGES += factory.bin
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 4096k
KERNEL_SIZE := 6144k
KERNEL_INITRAMFS_SUFFIX := -recovery.itb
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
DEVICE_COMPAT_VERSION := 1.1
DEVICE_COMPAT_MESSAGE := Partition table has been changed due to kernel size restrictions. \
Please upgrade firmware manually using factory.bin image! \
(Warning: your configurations will be erased!)
endef
# TARGET_DEVICES += xiaomi_redmi-router-ax6s
TARGET_DEVICES += xiaomi_redmi-router-ax6s
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ case "$(board_name)" in
uci set system.@system[0].compat_version="2.0"
uci commit system
;;
xiaomi,redmi-router-ax6s)
uci set system.@system[0].compat_version="1.1"
uci commit system
;;
esac

exit 0

0 comments on commit 10efb97

Please sign in to comment.