Skip to content

Commit 9fa8e7e

Browse files
1715173329robimarko
authored andcommitted
mediatek: fix ubi size for zbtlink zbt z8102ax v2
According to the factory uboot and firmware[1], the ubi size is set to 512 MiB (0x20000000) and it exceeds the size of the flash, after that the uboot and kernel resizes it to 114.5 MiB (0x7280000) instead of 114.125 MiB (0x7220000). The mismatch of the ubi size causes kernel fails to read ubi volumes and throws panic. Trim whitespaces while at it. 1. immortalwrt/immortalwrt#2123 (comment) Fixes: c908fc7 ("mediatek: add support for Zbtlink ZBT-Z8102AX v2") Signed-off-by: Tianling Shen <[email protected]> Link: openwrt/openwrt#20769 Signed-off-by: Hauke Mehrtens <[email protected]> (cherry picked from commit d2fa070) [rebased upon 24.10 branch] Signed-off-by: Tianling Shen <[email protected]> Link: openwrt/openwrt#21085 Signed-off-by: Robert Marko <[email protected]>
1 parent 0ed5909 commit 9fa8e7e

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
linux,code = <KEY_WPS_BUTTON>;
3939
gpios = <&pio 0 GPIO_ACTIVE_LOW>;
4040
};
41-
41+
4242
};
4343

4444
leds {
@@ -55,20 +55,20 @@
5555
color = <LED_COLOR_ID_GREEN>;
5656
function = LED_FUNCTION_STATUS;
5757
};
58-
58+
5959
led_status_blue: blue {
6060
gpios = <&pio 11 GPIO_ACTIVE_LOW>;
6161
color = <LED_COLOR_ID_BLUE>;
6262
function = LED_FUNCTION_STATUS;
6363
};
64-
64+
6565
led_status_5g1: 5g1 {
6666
gpios = <&pio 8 GPIO_ACTIVE_LOW>;
6767
color = <LED_COLOR_ID_BLUE>;
6868
function = LED_FUNCTION_USB;
6969
function-enumerator = <0>;
7070
};
71-
71+
7272
led_status_5g2: 5g2 {
7373
gpios = <&pio 13 GPIO_ACTIVE_LOW>;
7474
color = <LED_COLOR_ID_BLUE>;
@@ -135,7 +135,7 @@
135135
pause;
136136
};
137137
};
138-
138+
139139
gmac1: mac@1 {
140140
compatible = "mediatek,eth-mac";
141141
reg = <1>;
@@ -207,7 +207,7 @@
207207

208208
nand_rootfs: partition@580000 {
209209
label = "ubi";
210-
reg = <0x0580000 0x7220000>;
210+
reg = <0x0580000 0x7280000>;
211211
};
212212
};
213213
};

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ case "$(board_name)" in
88
bananapi,bpi-r3)
99
ucidef_set_compat_version "1.2"
1010
;;
11-
routerich,ax3000)
11+
routerich,ax3000|\
12+
zbtlink,zbt-z8102ax-v2)
1213
ucidef_set_compat_version "1.1"
1314
;;
1415
esac

target/linux/mediatek/image/filogic.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2096,6 +2096,8 @@ define Device/zbtlink_zbt-z8102ax-v2
20962096
IMAGES += factory.bin
20972097
IMAGE/factory.bin := append-ubi | check-size $$(IMAGE_SIZE)
20982098
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
2099+
DEVICE_COMPAT_VERSION := 1.1
2100+
DEVICE_COMPAT_MESSAGE := Partition layout has been changed to fit the bootloader
20992101
endef
21002102
TARGET_DEVICES += zbtlink_zbt-z8102ax-v2
21012103

0 commit comments

Comments
 (0)