[v3] Add support for Archer C2600

Submitted by Fabian Blaese on March 22, 2020, 6:19 p.m.

Details

Message ID 20200322181932.268613-1-fabian@blaese.de
State Superseded
Headers show

Commit Message

Fabian Blaese March 22, 2020, 6:19 p.m.
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
---
Changes in v2:
- Remove obsolete target Variable from bsp
Changes in v3:
- Rebase onto OpenWrt 19.07 (add generic subtarget)
- Add per-device rootfs option
- Remove SquashFS blocksize override
---
 bsp/board_ipq806x.bsp                              |  7 +++++++
 bsp/ipq806x/.config                                | 14 ++++++++++++++
 .../fff/fff-network/ipq806x/network.tplink,c2600   |  9 +++++++++
 3 files changed, 30 insertions(+)
 create mode 100644 bsp/board_ipq806x.bsp
 create mode 100644 bsp/ipq806x/.config
 create mode 100644 src/packages/fff/fff-network/ipq806x/network.tplink,c2600

Patch hide | download patch | download mbox

diff --git a/bsp/board_ipq806x.bsp b/bsp/board_ipq806x.bsp
new file mode 100644
index 0000000..cfb9b7c
--- /dev/null
+++ b/bsp/board_ipq806x.bsp
@@ -0,0 +1,7 @@ 
+machine=ipq806x
+chipset=ipq806x
+subtarget=generic
+
+images=(
+        "openwrt-${chipset}-tplink_c2600-squashfs-sysupgrade.bin"
+       )
diff --git a/bsp/ipq806x/.config b/bsp/ipq806x/.config
new file mode 100644
index 0000000..cb8074e
--- /dev/null
+++ b/bsp/ipq806x/.config
@@ -0,0 +1,14 @@ 
+# Generated using "./buildscript config openwrt".
+# Do no edit manually
+#
+CONFIG_TARGET_ipq806x=y
+CONFIG_TARGET_ipq806x_generic=y
+CONFIG_TARGET_MULTI_PROFILE=y
+CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_tplink_c2600=y
+CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_tplink_c2600=""
+CONFIG_TARGET_PER_DEVICE_ROOTFS=y
+CONFIG_BUSYBOX_CUSTOM=y
+CONFIG_CLEAN_IPKG=y
+CONFIG_PACKAGE_kmod-hwmon-core=m
+CONFIG_PACKAGE_opkg=m
+CONFIG_STRIP_KERNEL_EXPORTS=y
diff --git a/src/packages/fff/fff-network/ipq806x/network.tplink,c2600 b/src/packages/fff/fff-network/ipq806x/network.tplink,c2600
new file mode 100644
index 0000000..efc8063
--- /dev/null
+++ b/src/packages/fff/fff-network/ipq806x/network.tplink,c2600
@@ -0,0 +1,9 @@ 
+. /lib/functions/fff/network
+
+WANDEV=eth0
+SWITCHDEV=eth0
+CLIENT_PORTS="0t 1 2"
+WAN_PORTS="0t 5"
+BATMAN_PORTS="0t 3 4"
+
+ROUTERMAC=$(cat /sys/class/net/eth1/address)

Comments

Adrian Schmutzler March 22, 2020, 7:15 p.m.
Hallo,

siehe inline.

> -----Original Message-----
> From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On Behalf
> Of Fabian Bläse
> Sent: Sonntag, 22. März 2020 19:20
> To: franken-dev@freifunk.net
> Subject: [PATCH v3] Add support for Archer C2600
> 
> Signed-off-by: Fabian Bläse <fabian@blaese.de>
> Reviewed-by: Robert Langhammer <rlanghammer@web.de>
> ---
> Changes in v2:
> - Remove obsolete target Variable from bsp Changes in v3:
> - Rebase onto OpenWrt 19.07 (add generic subtarget)
> - Add per-device rootfs option
> - Remove SquashFS blocksize override
> ---
>  bsp/board_ipq806x.bsp                              |  7 +++++++
>  bsp/ipq806x/.config                                | 14 ++++++++++++++
>  .../fff/fff-network/ipq806x/network.tplink,c2600   |  9 +++++++++
>  3 files changed, 30 insertions(+)
>  create mode 100644 bsp/board_ipq806x.bsp  create mode 100644
> bsp/ipq806x/.config  create mode 100644 src/packages/fff/fff-
> network/ipq806x/network.tplink,c2600
> 
> diff --git a/bsp/board_ipq806x.bsp b/bsp/board_ipq806x.bsp new file mode
> 100644 index 0000000..cfb9b7c
> --- /dev/null
> +++ b/bsp/board_ipq806x.bsp
> @@ -0,0 +1,7 @@
> +machine=ipq806x
> +chipset=ipq806x
> +subtarget=generic
> +
> +images=(
> +        "openwrt-${chipset}-tplink_c2600-squashfs-sysupgrade.bin"

Hier muss noch ein $subtarget rein.

> +       )
> diff --git a/bsp/ipq806x/.config b/bsp/ipq806x/.config new file mode 100644
> index 0000000..cb8074e
> --- /dev/null
> +++ b/bsp/ipq806x/.config
> @@ -0,0 +1,14 @@
> +# Generated using "./buildscript config openwrt".
> +# Do no edit manually
> +#
> +CONFIG_TARGET_ipq806x=y
> +CONFIG_TARGET_ipq806x_generic=y
> +CONFIG_TARGET_MULTI_PROFILE=y
> +CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_tplink_c2600=y
> +CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_tplink_c26
> 00=""
> +CONFIG_TARGET_PER_DEVICE_ROOTFS=y
> +CONFIG_BUSYBOX_CUSTOM=y
> +CONFIG_CLEAN_IPKG=y
> +CONFIG_PACKAGE_kmod-hwmon-core=m
> +CONFIG_PACKAGE_opkg=m
> +CONFIG_STRIP_KERNEL_EXPORTS=y

Meiner Meinung nach ist diese Option nur bei tiny notwendig.

Das ist auch gar nicht so lustig, weil man so u.U. keine Kernelmodule nachträglich hinzufügen kann, die auf Symbole aus dem Kernel zugreifen. Für unseren Standardusecase ist das aber wohl wurscht, ich würde das auch in diesem Patch nicht anfassen, sondern wenn dann für alle non-tiny targets auf einmal ändern.

> diff --git a/src/packages/fff/fff-network/ipq806x/network.tplink,c2600
> b/src/packages/fff/fff-network/ipq806x/network.tplink,c2600
> new file mode 100644
> index 0000000..efc8063
> --- /dev/null
> +++ b/src/packages/fff/fff-network/ipq806x/network.tplink,c2600

Ich finde das Komma ekelig, aber es sollte so richtig funktionieren.

> @@ -0,0 +1,9 @@
> +. /lib/functions/fff/network

Den include brachen wir nicht.

Dafür kannst du

PORTORDER="5 4 3 2 1"

ergänzen.

> +
> +WANDEV=eth0
> +SWITCHDEV=eth0
> +CLIENT_PORTS="0t 1 2"
> +WAN_PORTS="0t 5"
> +BATMAN_PORTS="0t 3 4"

Hängt halt jetzt alles am WAN-phy (eigtl. mixed-switch). Ist aber funktional richtig und passt zum bisherigen Vorgehen in der off. Firmware.

Mit den (notwendigen) Änderungen würde ich auch ein Review geben.

Grüße

Adrian

> +
> +ROUTERMAC=$(cat /sys/class/net/eth1/address)
> --
> 2.25.2
Fabian Blaese March 22, 2020, 7:29 p.m.
On 22.03.20 20:15, mail@adrianschmutzler.de wrote:
>> diff --git a/bsp/board_ipq806x.bsp b/bsp/board_ipq806x.bsp new file mode
>> 100644 index 0000000..cfb9b7c
>> --- /dev/null
>> +++ b/bsp/board_ipq806x.bsp
>> @@ -0,0 +1,7 @@
>> +machine=ipq806x
>> +chipset=ipq806x
>> +subtarget=generic
>> +
>> +images=(
>> +        "openwrt-${chipset}-tplink_c2600-squashfs-sysupgrade.bin"
> 
> Hier muss noch ein $subtarget rein.
Jo, hab ich dann grade auch gemerkt und schon ne v4 vorbereitet.

>> diff --git a/src/packages/fff/fff-network/ipq806x/network.tplink,c2600
>> b/src/packages/fff/fff-network/ipq806x/network.tplink,c2600
>> new file mode 100644
>> index 0000000..efc8063
>> --- /dev/null
>> +++ b/src/packages/fff/fff-network/ipq806x/network.tplink,c2600
> 
> Ich finde das Komma ekelig, aber es sollte so richtig funktionieren.
Richtig, hübsch ist das nicht, aber dafür hast du ja schon einen Patch offen. Bis dahin würde ich das mal so lassen..

Gruß
Fabian