bcm53xx: fix support for TP-Link Archer C5 v2 and C9 v1
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Tue, 4 Aug 2020 21:29:04 +0000 (23:29 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 25 Jan 2021 17:53:29 +0000 (18:53 +0100)
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 <john@phrozen.org>
Cc: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/bcm53xx/image/Makefile
target/linux/bcm53xx/patches-4.19/330-tplink-archer-increase-os-image.patch [new file with mode: 0644]
target/linux/bcm53xx/patches-5.4/330-tplink-archer-increase-os-image.patch [new file with mode: 0644]
tools/firmware-utils/src/tplink-safeloader.c

index 90343b1e8811a92717fb4de4d8b845a66d3d866f..88f9f926d5c5bb918d9cc8fd6ceeed29c6d736d3 100644 (file)
@@ -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 (file)
index 0000000..57650e0
--- /dev/null
@@ -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 (file)
index 0000000..5d53dc3
--- /dev/null
@@ -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 {
index 785ff396425ec8b8f03a787a4e86a0ece454f485..5f915cf299e3f83ca36790c95f69a84fbac53402 100644 (file)
@@ -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},