aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivek Unune <npcomplete13@gmail.com>2020-11-13 08:43:00 -0500
committerRafał Miłecki <rafal@milecki.pl>2021-04-08 12:49:01 +0200
commit9aaa20d8ba2290165abc2cbc6fcee00e9c0259d1 (patch)
treeb5d4be09c462443307c2d893c5415bdb624be6a6
parentca6a1d0dc8eb103e424212f47dd859a8b8454e4b (diff)
downloadupstream-9aaa20d8ba2290165abc2cbc6fcee00e9c0259d1.tar.gz
upstream-9aaa20d8ba2290165abc2cbc6fcee00e9c0259d1.tar.bz2
upstream-9aaa20d8ba2290165abc2cbc6fcee00e9c0259d1.zip
bcm53xx: enhance support for Linksys EA9500
1. Add leds and configs 2. Add network configs 3. Add script to clear partial boot flag 4. Hack to use port 5 as cpu port as port 8 connected to eth2 wont pass any frames 5. Enable EA9500 image generation Hardware Info: - Processor - Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz - Switch - BCM53012 in BCM4709C0KFEBG & external BCM53125 - DDR3 RAM - 256 MB - Flash - 128 MB (Toshiba TC58BVG0S3HTA00) - 2.4GHz - BCM4366 4×4 2.4/5G single chip 802.11ac SoC - Power Amp - Skyworks SE2623L 2.4 GHz power amp (x4) - 5GHz x 2 - BCM4366 4×4 2.4/5G single chip 802.11ac SoC - Power Amp - PLX Technology PEX8603 3-lane, 3-port PCIe switch - Ports - 8 Ports, 1 WAN Ports - Antennas - 8 Antennas - Serial Port - @j6 [GND,TX,RX] (VCC NC) 115200 8n1 Flashing Instructions: 1. Connect a USB-TTL table to J6 on the router as well as a ethernet cable to a lan port and your PC. 2. Power-on the router. 3. Use putty or a serial port program to view the terminal. Hit Ctrl+C and interrupt the CFE terminal terminal. 4. Setup a TFTP server on your local machine at setup you local IP to 192.168.1.2 5. Start the TFTP Server 6. Run following commands at the CFE terminal flash -noheader 192.168.1.2:/openwrt.trx nflash0.trx flash -noheader 192.168.1.2:/openwrt.trx nflash0.trx2 nvram set bootpartition=0 && nvram set partialboots=0 && nvram commit 7. Reboot router to be presented by OpenWrt Note: Only installation method via serial cable is supported at the moment. The trx firmware has to be flashed to both the partitions using following commands from CFE prompt. This will cover US and Non-US variants. Signed-off-by: Vivek Unune <npcomplete13@gmail.com> Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 209c5918b511d9e406a094ba246a985b640e519f)
-rwxr-xr-xtarget/linux/bcm53xx/base-files/etc/board.d/02_network6
-rwxr-xr-xtarget/linux/bcm53xx/base-files/etc/init.d/clear_partialboot13
-rw-r--r--target/linux/bcm53xx/image/Makefile1
-rw-r--r--target/linux/bcm53xx/patches-5.4/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch5
4 files changed, 22 insertions, 3 deletions
diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network
index 231566cfa0..7b039beabe 100755
--- a/target/linux/bcm53xx/base-files/etc/board.d/02_network
+++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network
@@ -31,6 +31,10 @@ bcm53xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@eth0"
;;
+ linksys,panamera)
+ ucidef_add_switch "switch1" \
+ "0:lan" "1:lan:7" "2:lan:4" "3:lan:8" "4:wan" "5t@eth0"
+ ;;
luxul,abr-4500-v1|\
luxul,xbr-4500-v1)
ucidef_add_switch "switch0" \
@@ -84,6 +88,7 @@ bcm53xx_setup_macs()
case "$board" in
dlink,dir-885l | \
+ linksys,panamera | \
netgear,r7900 | \
netgear,r8000 | \
netgear,r8500)
@@ -105,6 +110,7 @@ bcm53xx_setup_macs()
offset=1
;;
dlink,dir-885l | \
+ linksys,panamera | \
netgear,r7900 | \
netgear,r8000 | \
netgear,r8500)
diff --git a/target/linux/bcm53xx/base-files/etc/init.d/clear_partialboot b/target/linux/bcm53xx/base-files/etc/init.d/clear_partialboot
new file mode 100755
index 0000000000..b3eddf4af0
--- /dev/null
+++ b/target/linux/bcm53xx/base-files/etc/init.d/clear_partialboot
@@ -0,0 +1,13 @@
+#!/bin/sh /etc/rc.common
+
+START=97
+boot() {
+ . /lib/functions.sh
+
+ case $(board_name) in
+ linksys,panamera)
+ # clear partialboots
+ nvram set partialboots=0 && nvram commit
+ ;;
+ esac
+}
diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile
index 0ba067d364..9580723273 100644
--- a/target/linux/bcm53xx/image/Makefile
+++ b/target/linux/bcm53xx/image/Makefile
@@ -274,7 +274,6 @@ define Device/linksys_ea9500
DEVICE_MODEL := EA9500
DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES)
DEVICE_DTS := bcm47094-linksys-panamera
- BROKEN := y
endef
TARGET_DEVICES += linksys_ea9500
diff --git a/target/linux/bcm53xx/patches-5.4/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch b/target/linux/bcm53xx/patches-5.4/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch
index a5f13afe02..a6d0f119ec 100644
--- a/target/linux/bcm53xx/patches-5.4/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch
+++ b/target/linux/bcm53xx/patches-5.4/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch
@@ -21,7 +21,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
#include "b53_regs.h"
#include "b53_priv.h"
-@@ -1587,6 +1588,28 @@ static int b53_switch_init(struct b53_de
+@@ -1587,6 +1588,29 @@ static int b53_switch_init(struct b53_de
return ret;
}
@@ -44,7 +44,8 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
+ * For some reason it doesn't work (no packets on eth2).
+ */
+ if (of_machine_is_compatible("netgear,r7900") ||
-+ of_machine_is_compatible("netgear,r8000"))
++ of_machine_is_compatible("netgear,r8000") ||
++ (of_machine_is_compatible("linksys,panamera") && dev->chip_id == BCM53012_DEVICE_ID))
+ sw_dev->cpu_port = 5;
+
dev->enabled_ports |= BIT(sw_dev->cpu_port);