From 2360924e4a43754b5a3c24e5797d94c6a9451a7f Mon Sep 17 00:00:00 2001 From: Dark4MD Date: Tue, 7 Jan 2020 12:40:40 +0100 Subject: [PATCH 1/3] lantiq-xrx200: add support for AVM FRITZ!Box 3370 (Hynix and Micron) Support included for the Hynix and Micron NAND Variant. Install via EVA Bootloader like discribed in the OpenWRT Commit: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=0b62fe5ed87ecac52301096b15abb69f96117c8c --- docs/user/supported_devices.rst | 1 + targets/lantiq-xrx200 | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst index c42824cd..c96e13f7 100644 --- a/docs/user/supported_devices.rst +++ b/docs/user/supported_devices.rst @@ -250,6 +250,7 @@ lantiq-xrx200 * AVM + - FRITZ!Box 3370 (Hynix Nand, Micron Nand) [#lan_as_wan]_ - FRITZ!Box 7360 (v1, v2) [#avmflash]_ [#lan_as_wan]_ - FRITZ!Box 7360 SL [#avmflash]_ [#lan_as_wan]_ - FRITZ!Box 7362 SL [#eva_ramboot]_ [#lan_as_wan]_ diff --git a/targets/lantiq-xrx200 b/targets/lantiq-xrx200 index 43526eb0..d70441df 100644 --- a/targets/lantiq-xrx200 +++ b/targets/lantiq-xrx200 @@ -1,3 +1,21 @@ +-- AVM + +device('avm-fritz-box-3370-rev-2-hynix-nand', 'avm_fritz3370-rev2-hynix', { + factory = false, + extra_images = { + {'-squashfs-eva-filesystem', '-eva-filesystem', '.bin'}, + {'-squashfs-eva-kernel', '-eva-kernel', '.bin'}, + }, +}) + +device('avm-fritz-box-3370-rev-2-micron-nand', 'avm_fritz3370-rev2-micron', { + factory = false, + extra_images = { + {'-squashfs-eva-filesystem', '-eva-filesystem', '.bin'}, + {'-squashfs-eva-kernel', '-eva-kernel', '.bin'}, + }, +}) + device('avm-fritz-box-7360-sl', 'avm_fritz7360sl', { factory = false, aliases = {'avm-fritz-box-7360-v1', 'avm-fritz-box-7360-v2'}, From 7ba5577eac5146fc8df3b669cd3c10a96e0ad0a1 Mon Sep 17 00:00:00 2001 From: dzzinstant Date: Sat, 16 May 2020 23:37:28 +0200 Subject: [PATCH 2/3] Add 'power' button to buttons which enable gluon-setup-mode. Unlike other AVM devices, the Fritz!Box 3370 has got a 'Power' button instead of 'WPS', 'DECT' or similar. However, for a complete implementation of gluon it must be possible to reboot the device into setup mode via pressing a button. Notes: 1. The power button is used both for rebooting to setup mode (long press > 3s) and switching off the device (short press). This works because wait_setup_mode() is already started by 'power pressed', whereas poweroff would be called later upon 'power released'. 2. Adding yet another button for setup mode isn't very pretty, esp. for the sake of one device. However, - there are only few devices (21/784) with a power button - 302/784 devices have more than one button (reset + wps|phone) assigned to setup-mode, so the confusion is already there anyway. --- .../files/etc/hotplug.d/button/50-gluon-setup-mode | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/gluon-setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode b/package/gluon-setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode index 314f8a43..df596ad8 100755 --- a/package/gluon-setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode +++ b/package/gluon-setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode @@ -12,7 +12,8 @@ wait_setup_mode() { } -if [ "$BUTTON" = wps ] || [ "$BUTTON" = reset ] || [ "$BUTTON" = phone ]; then +if [ "$BUTTON" = wps ] || [ "$BUTTON" = reset ] || + [ "$BUTTON" = phone ] || [ "$BUTTON" = power ]; then case "$ACTION" in pressed) wait_setup_mode & From 84fe9fc1a0d9642b84f7bda9077f4b8038a1dfc4 Mon Sep 17 00:00:00 2001 From: dzzinstant Date: Sat, 6 Jun 2020 17:26:40 +0200 Subject: [PATCH 3/3] lantiq: show LAN activity on AVM Fritzbox 3370 Change stock OpenWRT configuration for system.led_lan.trigger to 'netdev'. This will configure the LED to show both status and activity on the LAN ports, as demanded by gluon's Device Integration Checklist. --- ...xrx200-show_LAN_activity_on_AVM_3370.patch | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 patches/openwrt/0010-lantiq-xrx200-show_LAN_activity_on_AVM_3370.patch diff --git a/patches/openwrt/0010-lantiq-xrx200-show_LAN_activity_on_AVM_3370.patch b/patches/openwrt/0010-lantiq-xrx200-show_LAN_activity_on_AVM_3370.patch new file mode 100644 index 00000000..460a9b8e --- /dev/null +++ b/patches/openwrt/0010-lantiq-xrx200-show_LAN_activity_on_AVM_3370.patch @@ -0,0 +1,24 @@ +From: D. Gathmann +Date: Sat, 06 Jun 2020 14:37:07 +0200 +Subject: lantiq: show LAN activity on AVM Fritzbox 3370 + +This patch changes system.led_lan.trigger to 'netdev' for Fritzbox 3370. +This will configure the LED to show both status and activity on the LAN ports, +as demanded by gluon's Device Integration Checklist. + +Signed-off-by: D. Gathmann + +diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds +index e89de97fbe..3d7d1dc6db 100755 +--- a/target/linux/lantiq/base-files/etc/board.d/01_leds ++++ b/target/linux/lantiq/base-files/etc/board.d/01_leds +@@ -55,7 +55,7 @@ netgear,dm200) + ;; + avm,fritz3370-rev2-hynix|\ + avm,fritz3370-rev2-micron) +- ucidef_set_led_switch "lan" "LAN" "fritz3370:green:lan" "switch0" "0x17" ++ ucidef_set_led_netdev "lan" "LAN" "fritz3370:green:lan" "eth0" + ;; + zyxel,p-2812hnu-f1|\ + zyxel,p-2812hnu-f3) +