[source] bcm53xx: add support for TP-LINK Archer C5 V2

LEDE Commits lede-commits at lists.infradead.org
Sun May 21 09:33:14 PDT 2017


rmilecki pushed a commit to source.git, branch master:
https://git.lede-project.org/0a05fbd1356631a1f903adcd63ffb05550537667

commit 0a05fbd1356631a1f903adcd63ffb05550537667
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Sun May 21 17:41:41 2017 +0200

    bcm53xx: add support for TP-LINK Archer C5 V2
    
    This model also contains few partitions non-discoverable partitions we
    need to "protect". Othen than that it uses non-deprecated serial entry
    in DTS that doesn't work with LEDE so we need to workaround it as well.
    
    Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 target/linux/bcm53xx/image/Makefile                |  2 +-
 ...M-dts-BCM5301X-Add-serial-to-the-bootargs.patch | 26 ++++++++++++++++++++++
 ...m47xxpart-add-device-specific-workarounds.patch | 10 ++++++++-
 ...M-dts-BCM5301X-Add-serial-to-the-bootargs.patch | 26 ++++++++++++++++++++++
 ...m47xxpart-add-device-specific-workarounds.patch | 10 ++++++++-
 5 files changed, 71 insertions(+), 3 deletions(-)

diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile
index d5dfe22..d3be634 100644
--- a/target/linux/bcm53xx/image/Makefile
+++ b/target/linux/bcm53xx/image/Makefile
@@ -323,7 +323,7 @@ define Device/tplink-archer-c5-v2
   IMAGE/bin := append-rootfs | bcm53xx-tplink-safeloader
   TPLINK_BOARD := ARCHER-C5-V2
 endef
-# TARGET_DEVICES += tplink-archer-c5-v2
+TARGET_DEVICES += tplink-archer-c5-v2
 
 define Device/tplink-archer-c9-v1
   DEVICE_TITLE := TP-LINK Archer C9 V1
diff --git a/target/linux/bcm53xx/patches-4.4/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch b/target/linux/bcm53xx/patches-4.4/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch
new file mode 100644
index 0000000..171e6b3
--- /dev/null
+++ b/target/linux/bcm53xx/patches-4.4/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch
@@ -0,0 +1,26 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Subject: [PATCH] ARM: dts: BCM5301X: Add serial= to the bootargs
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It's enough to have proper stdout-path for getting serial working but
+for some reason LEDE doesn't offer "Please press Enter to activate this
+console." unless ttyS0 is specified.
+
+This is a workaround to get serial working in LEDE.
+
+Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
+---
+
+--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
++++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
+@@ -13,7 +13,7 @@
+ 	model = "TP-LINK Archer C5 V2";
+ 
+ 	chosen {
+-		bootargs = "earlycon";
++		bootargs = "console=ttyS0,115200 earlycon";
+ 	};
+ 
+ 	memory {
diff --git a/target/linux/bcm53xx/patches-4.4/901-mtd-bcm47xxpart-add-device-specific-workarounds.patch b/target/linux/bcm53xx/patches-4.4/901-mtd-bcm47xxpart-add-device-specific-workarounds.patch
index 0ffa82f..0223ab4 100644
--- a/target/linux/bcm53xx/patches-4.4/901-mtd-bcm47xxpart-add-device-specific-workarounds.patch
+++ b/target/linux/bcm53xx/patches-4.4/901-mtd-bcm47xxpart-add-device-specific-workarounds.patch
@@ -17,7 +17,7 @@ Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
  
  #include <uapi/linux/magic.h>
  
-@@ -249,6 +250,28 @@ static int bcm47xxpart_parse(struct mtd_
+@@ -249,6 +250,36 @@ static int bcm47xxpart_parse(struct mtd_
  			break;
  		}
  
@@ -33,6 +33,14 @@ Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
 +			 */
 +			bcm47xxpart_add_part(&parts[curr_part++], "asus", offset, MTD_WRITEABLE);
 +			continue;
++		} else  if (of_machine_is_compatible("tplink,archer-c5-v2") && offset == 0xe40000) {
++			/*
++			 * There is a whole set of partitions (not even listed
++			 * by original firmware): "default-mac", "pin",
++			 * "partition-table", etc.
++			 */
++			bcm47xxpart_add_part(&parts[curr_part++], "tplink", offset, MTD_WRITEABLE);
++			continue;
 +		} else  if (of_machine_is_compatible("tplink,archer-c9-v1") && offset == 0xe40000) {
 +			/*
 +			 * There is a whole set of partitions (not even listed
diff --git a/target/linux/bcm53xx/patches-4.9/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch b/target/linux/bcm53xx/patches-4.9/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch
new file mode 100644
index 0000000..171e6b3
--- /dev/null
+++ b/target/linux/bcm53xx/patches-4.9/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch
@@ -0,0 +1,26 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Subject: [PATCH] ARM: dts: BCM5301X: Add serial= to the bootargs
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It's enough to have proper stdout-path for getting serial working but
+for some reason LEDE doesn't offer "Please press Enter to activate this
+console." unless ttyS0 is specified.
+
+This is a workaround to get serial working in LEDE.
+
+Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
+---
+
+--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
++++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
+@@ -13,7 +13,7 @@
+ 	model = "TP-LINK Archer C5 V2";
+ 
+ 	chosen {
+-		bootargs = "earlycon";
++		bootargs = "console=ttyS0,115200 earlycon";
+ 	};
+ 
+ 	memory {
diff --git a/target/linux/bcm53xx/patches-4.9/900-mtd-bcm47xxpart-add-device-specific-workarounds.patch b/target/linux/bcm53xx/patches-4.9/900-mtd-bcm47xxpart-add-device-specific-workarounds.patch
index 0ffa82f..0223ab4 100644
--- a/target/linux/bcm53xx/patches-4.9/900-mtd-bcm47xxpart-add-device-specific-workarounds.patch
+++ b/target/linux/bcm53xx/patches-4.9/900-mtd-bcm47xxpart-add-device-specific-workarounds.patch
@@ -17,7 +17,7 @@ Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
  
  #include <uapi/linux/magic.h>
  
-@@ -249,6 +250,28 @@ static int bcm47xxpart_parse(struct mtd_
+@@ -249,6 +250,36 @@ static int bcm47xxpart_parse(struct mtd_
  			break;
  		}
  
@@ -33,6 +33,14 @@ Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
 +			 */
 +			bcm47xxpart_add_part(&parts[curr_part++], "asus", offset, MTD_WRITEABLE);
 +			continue;
++		} else  if (of_machine_is_compatible("tplink,archer-c5-v2") && offset == 0xe40000) {
++			/*
++			 * There is a whole set of partitions (not even listed
++			 * by original firmware): "default-mac", "pin",
++			 * "partition-table", etc.
++			 */
++			bcm47xxpart_add_part(&parts[curr_part++], "tplink", offset, MTD_WRITEABLE);
++			continue;
 +		} else  if (of_machine_is_compatible("tplink,archer-c9-v1") && offset == 0xe40000) {
 +			/*
 +			 * There is a whole set of partitions (not even listed



More information about the lede-commits mailing list