realtek: fix Zyxel XMG1915-10E partition layout
When support for this device was added, the partition layout was defined
in a way that doesn't use space as intended and wastes quite a lot of
it.
(1) firmware partition starts at offset 0x1260000. This is the second
partition/B partition in the A/B scheme used by Zyxel. While the
commit mentions the image is written to A, the firmware partition
is defined in the B space.
(2) firmware partition only ~16MB in size. The device has a total of
32MB of flash. The vendor uses an A/B scheme but OpenWrt doesn't use
it. Thus, OpenWrt can make use of the full available space.
(3) loader partition too big. Other devices using rt-loader explicitly
in a partition use a size of 0x10000. This is more than enough
already. The device here uses 0x30000 which is mostly wasted.
Those issues are fixed accordingly. While at it, move partitions 'loader'
and 'firmware' into a parent partition 'factory'. This is a preparation
for adding web upgrade support for this device.
Fixes: 94607d6285 ("realtek: add support for Zyxel XMG1915-10E")
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23218
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
9bca272330
commit
f9bdfcb553
@ -161,19 +161,27 @@
|
||||
|
||||
partition@80000 {
|
||||
label = "reserved";
|
||||
reg = <0x80000 0xf80000>;
|
||||
reg = <0x80000 0x1e0000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1260000 {
|
||||
label = "loader";
|
||||
reg = <0x1260000 0x30000>;
|
||||
};
|
||||
partition@260000 {
|
||||
label = "factory";
|
||||
reg = <0x260000 0x1da0000>;
|
||||
|
||||
partition@1290000 {
|
||||
label = "firmware";
|
||||
reg = <0x1290000 0xd70000>;
|
||||
compatible = "openwrt,uimage", "denx,uimage";
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "loader";
|
||||
reg = <0x0 0x10000>;
|
||||
};
|
||||
partition@10000 {
|
||||
label = "firmware";
|
||||
reg = <0x10000 0x1d90000>;
|
||||
compatible = "openwrt,uimage", "denx,uimage";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -231,7 +231,7 @@ define Device/zyxel_xmg1915-10e
|
||||
ZYXEL_VERS := ABWE
|
||||
DEVICE_VENDOR := Zyxel
|
||||
DEVICE_MODEL := XMG1915-10E
|
||||
FLASH_ADDR := 0xb5290000
|
||||
FLASH_ADDR := 0xb4270000
|
||||
ifeq ($(IB),)
|
||||
ARTIFACTS := loader.bin
|
||||
ARTIFACT/loader.bin := \
|
||||
@ -239,6 +239,6 @@ ifeq ($(IB),)
|
||||
zynsig
|
||||
endif
|
||||
$(Device/rt-loader-bootbase)
|
||||
IMAGE_SIZE := 13760k
|
||||
IMAGE_SIZE := 30336k
|
||||
endef
|
||||
TARGET_DEVICES += zyxel_xmg1915-10e
|
||||
|
||||
Loading…
Reference in New Issue
Block a user