From 21eb7bf2ae55f03965f870ce9f2a741ff24bf7f1 Mon Sep 17 00:00:00 2001 From: Oleg S Date: Sat, 2 Mar 2024 11:18:13 +0300 Subject: [PATCH] mediatek: expand kernel size to 6MiB for Xiaomi AX6S Expand kernel partition size on Xiaomi AX6S for the kernel larger than 4 MiB. Manual upgrade from OpenWRT to new OpenWRT: cd /tmp dd if=factory.bin bs=1M count=4 | mtd write - kernel dd if=factory.bin bs=1M skip=4 count=2 | mtd write - ubi dd if=factory.bin bs=1M skip=6 | mtd -p 2097152 write - ubi Signed-off-by: Oleg S --- .../linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts | 6 +++--- target/linux/mediatek/image/mt7622.mk | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts b/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts index fccf8348c..035393e28 100644 --- a/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts +++ b/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts @@ -298,7 +298,7 @@ */ partition@2c0000 { label = "kernel"; - reg = <0x2c0000 0x400000>; + reg = <0x2c0000 0x600000>; }; /* ubi partition is the result of squashing @@ -308,9 +308,9 @@ * - overlay * - obr */ - partition@6c0000 { + partition@8c0000 { label = "ubi"; - reg = <0x6C0000 0x6f00000>; + reg = <0x8c0000 0x6d00000>; }; }; }; diff --git a/target/linux/mediatek/image/mt7622.mk b/target/linux/mediatek/image/mt7622.mk index 3bd8bcb15..2196f5743 100644 --- a/target/linux/mediatek/image/mt7622.mk +++ b/target/linux/mediatek/image/mt7622.mk @@ -345,7 +345,7 @@ 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