From: Adrian Schmutzler Date: Tue, 4 Aug 2020 21:29:04 +0000 (+0200) Subject: bcm53xx: fix support for TP-Link Archer C5 v2 and C9 v1 X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=f8ed857dabaa449d84a51a2942dfee2d5e8d58ea;p=openwrt%2Fstaging%2Fadrian.git bcm53xx: fix support for TP-Link Archer C5 v2 and C9 v1 As it appears, these devices just needed a resize of their os-image partition. Increase it to 0x300000, so we have some extra space left for future kernels. Note that this only adjusts the partioning scheme, but since I do not own the device I cannot say whether the bootloader will actually cope with os-image > 2 MiB. Cc: John Crispin Cc: Rafał Miłecki Signed-off-by: Adrian Schmutzler --- diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index 90343b1e88..88f9f926d5 100644 --- a/target/linux/bcm53xx/image/Makefile +++ b/target/linux/bcm53xx/image/Makefile @@ -438,7 +438,6 @@ define Device/tplink_archer-c5-v2 IMAGES := bin IMAGE/bin := append-rootfs | bcm53xx-tplink-safeloader TPLINK_BOARD := ARCHER-C5-V2 - BROKEN := y endef TARGET_DEVICES += tplink_archer-c5-v2 @@ -450,7 +449,6 @@ define Device/tplink_archer-c9-v1 IMAGES := bin IMAGE/bin := append-rootfs | bcm53xx-tplink-safeloader TPLINK_BOARD := ARCHERC9 - BROKEN := y endef TARGET_DEVICES += tplink_archer-c9-v1 diff --git a/target/linux/bcm53xx/patches-4.19/330-tplink-archer-increase-os-image.patch b/target/linux/bcm53xx/patches-4.19/330-tplink-archer-increase-os-image.patch new file mode 100644 index 0000000000..57650e09a0 --- /dev/null +++ b/target/linux/bcm53xx/patches-4.19/330-tplink-archer-increase-os-image.patch @@ -0,0 +1,44 @@ +--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts ++++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts +@@ -106,15 +106,15 @@ + read-only; + }; + +- os-image@100000 { ++ os-image@40000 { + label = "os-image"; +- reg = <0x040000 0x200000>; ++ reg = <0x040000 0x300000>; + compatible = "brcm,trx"; + }; + +- rootfs@240000 { ++ rootfs@340000 { + label = "rootfs"; +- reg = <0x240000 0xc00000>; ++ reg = <0x340000 0xb00000>; + }; + + nvram@ff0000 { +--- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts ++++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts +@@ -115,15 +115,15 @@ + read-only; + }; + +- os-image@100000 { ++ os-image@40000 { + label = "os-image"; +- reg = <0x040000 0x200000>; ++ reg = <0x040000 0x300000>; + compatible = "brcm,trx"; + }; + +- rootfs@240000 { ++ rootfs@340000 { + label = "rootfs"; +- reg = <0x240000 0xc00000>; ++ reg = <0x340000 0xb00000>; + }; + + nvram@ff0000 { diff --git a/target/linux/bcm53xx/patches-5.4/330-tplink-archer-increase-os-image.patch b/target/linux/bcm53xx/patches-5.4/330-tplink-archer-increase-os-image.patch new file mode 100644 index 0000000000..5d53dc34ab --- /dev/null +++ b/target/linux/bcm53xx/patches-5.4/330-tplink-archer-increase-os-image.patch @@ -0,0 +1,44 @@ +--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts ++++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts +@@ -105,15 +105,15 @@ + read-only; + }; + +- os-image@100000 { ++ os-image@40000 { + label = "os-image"; +- reg = <0x040000 0x200000>; ++ reg = <0x040000 0x300000>; + compatible = "brcm,trx"; + }; + +- rootfs@240000 { ++ rootfs@340000 { + label = "rootfs"; +- reg = <0x240000 0xc00000>; ++ reg = <0x340000 0xb00000>; + }; + + nvram@ff0000 { +--- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts ++++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts +@@ -116,15 +116,15 @@ + read-only; + }; + +- os-image@100000 { ++ os-image@40000 { + label = "os-image"; +- reg = <0x040000 0x200000>; ++ reg = <0x040000 0x300000>; + compatible = "brcm,trx"; + }; + +- rootfs@240000 { ++ rootfs@340000 { + label = "rootfs"; +- reg = <0x240000 0xc00000>; ++ reg = <0x340000 0xb00000>; + }; + + nvram@ff0000 { diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 785ff39642..5f915cf299 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -1179,8 +1179,8 @@ static struct device_info boards[] = { .partitions = { {"fs-uboot", 0x00000, 0x40000}, - {"os-image", 0x40000, 0x200000}, - {"file-system", 0x240000, 0xc00000}, + {"os-image", 0x40000, 0x300000}, + {"file-system", 0x340000, 0xb00000}, {"default-mac", 0xe40000, 0x00200}, {"pin", 0xe40200, 0x00200}, {"product-info", 0xe40400, 0x00200}, @@ -1308,8 +1308,8 @@ static struct device_info boards[] = { .partitions = { {"fs-uboot", 0x00000, 0x40000}, - {"os-image", 0x40000, 0x200000}, - {"file-system", 0x240000, 0xc00000}, + {"os-image", 0x40000, 0x300000}, + {"file-system", 0x340000, 0xb00000}, {"default-mac", 0xe40000, 0x00200}, {"pin", 0xe40200, 0x00200}, {"product-info", 0xe40400, 0x00200},