From db6ff390b03f8e5de06ecf9540dcbd74c0aef67f Mon Sep 17 00:00:00 2001 From: Jeff Collins Date: Thu, 25 Feb 2021 11:11:58 -0500 Subject: [PATCH 1/7] mvebu: add LED support for GL.iNet GL-MV1000 This patch enables LED support for the GL.iNet GL-MV1000 Signed-off-by: Jeff Collins [add SPDX identifier on new file, add aliases, minor cosmetic issues] Signed-off-by: Adrian Schmutzler (cherry picked from commit 6e0c780eb3b4ba1e52216c1d671897749dd81829) --- .../cortexa53/base-files/etc/board.d/01_leds | 18 ++++++++++++ .../dts/marvell/armada-3720-gl-mv1000.dts | 29 ++++++++++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100755 target/linux/mvebu/cortexa53/base-files/etc/board.d/01_leds diff --git a/target/linux/mvebu/cortexa53/base-files/etc/board.d/01_leds b/target/linux/mvebu/cortexa53/base-files/etc/board.d/01_leds new file mode 100755 index 0000000000..42f4deb88a --- /dev/null +++ b/target/linux/mvebu/cortexa53/base-files/etc/board.d/01_leds @@ -0,0 +1,18 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0-only + +. /lib/functions/uci-defaults.sh + +board_config_update + +board=$(board_name) + +case "$board" in +glinet,gl-mv1000) + ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts index 86c33fa100..0e15debdea 100644 --- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts +++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts @@ -8,6 +8,13 @@ model = "GL.iNet GL-MV1000"; compatible = "glinet,gl-mv1000", "marvell,armada3720"; + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -23,12 +30,32 @@ regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; regulator-boot-on; - + gpios-states = <0>; states = <1800000 0x1 3300000 0x0>; enable-active-high; }; + + leds { + compatible = "gpio-leds"; + + vpn { + label = "green:vpn"; + gpios = <&gpionb 11 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "green:wan"; + gpios = <&gpionb 12 GPIO_ACTIVE_LOW>; + }; + + led_power: power { + label = "green:power"; + gpios = <&gpionb 13 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + }; }; &spi0 { From c459d5a710d7b74fa94721ea9f5c3fa985fef961 Mon Sep 17 00:00:00 2001 From: Walter Sonius Date: Sun, 21 Mar 2021 20:06:33 +0100 Subject: [PATCH 2/7] ath79: fix lan port display order for sitecom wlr-7100 Physical port order watched from the back of the device is: 4 / 3 / 2 / 1 / WAN which also matches corresponding leds. This patch corrects LuCI switch webpage LAN port order. Signed-off-by: Walter Sonius [improve commit title, fix sorting in 02_network] Signed-off-by: Adrian Schmutzler (cherry picked from commit 46c0634b508f731df487a7909c439b2794445e26) --- target/linux/ath79/generic/base-files/etc/board.d/02_network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index c816a85460..e9822d5fca 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -224,6 +224,7 @@ ath79_setup_interfaces() dlink,dir-842-c3|\ dlink,dir-859-a1|\ engenius,epg5000|\ + sitecom,wlr-7100|\ tplink,archer-c2-v3|\ tplink,tl-wr1043nd-v4|\ tplink,tl-wr1043n-v5) @@ -263,7 +264,6 @@ ath79_setup_interfaces() iodata,wn-ac1600dgr2|\ iodata,wn-ag300dgr|\ pcs,cr5000|\ - sitecom,wlr-7100|\ wd,mynet-n750) ucidef_add_switch "switch0" \ "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" From 0444a93bdf7b64c1042aa3bf20a68c1157d99c0e Mon Sep 17 00:00:00 2001 From: INAGAKI Hiroshi Date: Wed, 17 Mar 2021 18:35:34 +0900 Subject: [PATCH 3/7] ramips: add support for ELECOM WRC-1750GST2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ELECOM WRC-1750GST2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on MT7621A. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 256 MiB (NT5CC128M16JR-EK) - Flash : SPI-NOR 32 MiB (MX25L25645GMI-08G) - WLAN : 2.4/5 GHz 3T3R (2x MediaTek MT7615) - Ethernet : 10/100/1000 Mbps x5 - Switch : MediaTek MT7530 (SoC) - LEDs/Keys : 4x/6x (2x buttons, 1x slide-switch) - UART : through-hole on PCB - J4: 3.3V, GND, TX, RX, from ethernet port side - 57600n8 - Power : 12 VDC, 1.5 A Flash instruction using factory image: 1. Boot WRC-1750GST2 normally with "Router" mode 2. Access to "http://192.168.2.1/" and open firmware update page ("ファームウェア更新") 3. Select the OpenWrt factory image and click apply ("適用") button 4. Wait ~120 seconds to complete flashing MAC addresses: LAN : 04:AB:18:xx:xx:23 (Factory, 0xE000 (hex)) WAN : 04:AB:18:xx:xx:24 (Factory, 0xE006 (hex)) 2.4GHz : 04:AB:18:xx:xx:25 (Factory, 0x4 (hex)) 5GHz : 04:AB:18:xx:xx:26 (Factory, 0x8004 (hex)) Signed-off-by: INAGAKI Hiroshi (cherry picked from commit b3ca1f30efd7bb96a22f72b766d302e552265276) --- .../ramips/dts/mt7621_elecom_wrc-1750gst2.dts | 40 +++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 8 ++++ 2 files changed, 48 insertions(+) create mode 100644 target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts new file mode 100644 index 0000000000..4b8888cd91 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_elecom_wrc-gs-2pci.dtsi" + +/ { + compatible = "elecom,wrc-1750gst2", "mediatek,mt7621-soc"; + model = "ELECOM WRC-1750GST2"; +}; + +&partitions { + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x1800000>; + }; + + partition@1850000 { + label = "tm_pattern"; + reg = <0x1850000 0x400000>; + read-only; + }; + + partition@1c50000 { + label = "tm_key"; + reg = <0x1c50000 0x100000>; + read-only; + }; + + partition@1d50000 { + label = "nvram"; + reg = <0x1d50000 0xb0000>; + read-only; + }; + + partition@1e00000 { + label = "user_data"; + reg = <0x1e00000 0x200000>; + read-only; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 396b112b76..25ca1b87f0 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -460,6 +460,14 @@ define Device/elecom_wrc-1750gs endef TARGET_DEVICES += elecom_wrc-1750gs +define Device/elecom_wrc-1750gst2 + $(Device/elecom_wrc-gs) + IMAGE_SIZE := 24576k + DEVICE_MODEL := WRC-1750GST2 + ELECOM_HWNAME := WRC-1750GST2 +endef +TARGET_DEVICES += elecom_wrc-1750gst2 + define Device/elecom_wrc-1750gsv $(Device/elecom_wrc-gs) IMAGE_SIZE := 11264k From 5a11ca3cf33c421949985a7ff176dac17cf07bd8 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Mon, 1 Feb 2021 10:58:09 +0100 Subject: [PATCH 4/7] base-files: add logging for configuration import Make sysupgrade backup import more verbose. Signed-off-by: Florian Eckert (cherry picked from commit fdbdbe8eaaa6aa3acacdcb3ae1308b2a2055fc39) --- package/base-files/files/sbin/sysupgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index 7977b06ef1..7e0a00e13b 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -287,6 +287,7 @@ if [ -n "$CONF_RESTORE" ]; then fi [ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V="" + v "Restoring config files..." tar -C / -x${TAR_V}zf "$CONF_RESTORE" exit $? fi From fdc0342704b692c46ccb65c6372a853ff89094c4 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sat, 20 Mar 2021 23:23:34 -1000 Subject: [PATCH 5/7] build,json: fix duplicates in default_packages Calling without the DUMP=1 argument causes the target specific Makefile to be "included" again which adds the target specific packages twice, once on the actual run and once included from `include/target.mk`. This led to duplicate package entries, causing confusion in downstream projects using the generated JSON files. While at it, apply `black` style to Python script. Signed-off-by: Paul Spooren (cherry picked from commit 7f4c2b1a4f9216218dced64794318f2197565c85) --- scripts/json_overview_image_info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index ca6fbbc962..23d8dcb857 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -38,9 +38,10 @@ if output: "make", "--no-print-directory", "-C", - "target/linux/{}".format(output['target'].split('/')[0]), + "target/linux/{}".format(output["target"].split("/")[0]), "val.DEFAULT_PACKAGES", "val.ARCH_PACKAGES", + "DUMP=1", ], stdout=PIPE, stderr=PIPE, From aacf3786083fbf3e96e732f14c3b72077d543ef0 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 24 Mar 2021 09:47:12 +0000 Subject: [PATCH 6/7] mwlwifi: add PKG_FLAGS:=nonshared This should fix the problem of mwlwifi-firmware-* not being found when using the ImageBuilder. Signed-off-by: Daniel Golle (cherry picked from commit 9b3aaf1cdb873cc2a7b2f2ef4e72ddb716afba38) Signed-off-by: Daniel Golle --- package/kernel/mwlwifi/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/kernel/mwlwifi/Makefile b/package/kernel/mwlwifi/Makefile index ebd88bb352..749fbbe90f 100644 --- a/package/kernel/mwlwifi/Makefile +++ b/package/kernel/mwlwifi/Makefile @@ -21,6 +21,7 @@ PKG_MIRROR_HASH:=0eda0e774a87e58e611d6436350e1cf2be3de50fddde334909a07a15b0c9862 PKG_MAINTAINER:=Imre Kaloz PKG_BUILD_PARALLEL:=1 +PKG_FLAGS:=nonshared include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/package.mk From 22149da1f4f65985439b3e92da9a5226ad219f3b Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Thu, 25 Mar 2021 22:53:28 -1000 Subject: [PATCH 7/7] build,json: backport default_packages fixes Remove duplicate packages by running in `target/linux/` rather than `target/linux//` and sort packages alphabetically. Squash commit of: 7880a64848 build,json: 3rd fixup of default_packages b36068d35d build,json: fixup fixup of arch_packages 1bf2b3fe90 build,json: fixup missing arch_packages Signed-off-by: Paul Spooren --- scripts/json_overview_image_info.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index 23d8dcb857..8dbd24af2d 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -38,10 +38,9 @@ if output: "make", "--no-print-directory", "-C", - "target/linux/{}".format(output["target"].split("/")[0]), + "target/linux/", "val.DEFAULT_PACKAGES", "val.ARCH_PACKAGES", - "DUMP=1", ], stdout=PIPE, stderr=PIPE, @@ -50,7 +49,8 @@ if output: universal_newlines=True, ).stdout.splitlines() - output["default_packages"] = default_packages.split() + output["default_packages"] = sorted(default_packages.split()) + output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":"))) else: print("JSON info file script could not find any JSON files for target")