From 1f1d8d4f474aebbbb57937797966b7267fc70240 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 3 Feb 2021 14:41:50 +0000 Subject: [PATCH 01/22] arm-trusted-firmware-tools: add package Package ARM Trusted Firmware host tools separately. (instead of building tfa-fiptool as part of tfa-layerscape) Signed-off-by: Daniel Golle --- .../boot/arm-trusted-firmware-tools/Makefile | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 package/boot/arm-trusted-firmware-tools/Makefile diff --git a/package/boot/arm-trusted-firmware-tools/Makefile b/package/boot/arm-trusted-firmware-tools/Makefile new file mode 100644 index 0000000000..af9957c3a9 --- /dev/null +++ b/package/boot/arm-trusted-firmware-tools/Makefile @@ -0,0 +1,70 @@ +# +# Copyright 2021 Daniel Golle +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=arm-trusted-firmware-tools +PKG_VERSION:=2.4 +PKG_RELEASE:=1 +PKG_HASH:=bf3eb3617a74cddd7fb0e0eacbfe38c3258ee07d4c8ed730deef7a175cc3d55b + +PKG_MAINTAINER:=Daniel Golle +PKG_HOST_ONLY:=1 + +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/trusted-firmware-a-$(PKG_VERSION) + +include $(INCLUDE_DIR)/trusted-firmware-a.mk +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk + +define Package/arm-trusted-firmware-tools + SECTION:=boot + CATEGORY:=Boot Loaders + TITLE:=ARM Trusted Firmware tools + URL:=https://www.trustedfirmware.org + BUILDONLY:=1 +endef + +HOST_CFLAGS += -Wall -Werror -pedantic -std=c99 +define Host/Compile + $(MAKE) -C \ + $(HOST_BUILD_DIR)/tools/cert_create \ + CFLAGS="$(HOST_CFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" + $(MAKE) -C \ + $(HOST_BUILD_DIR)/tools/encrypt_fw \ + CFLAGS="$(HOST_CFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" + $(MAKE) -C \ + $(HOST_BUILD_DIR)/tools/fiptool \ + CFLAGS="$(HOST_CFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" + $(MAKE) -C \ + $(HOST_BUILD_DIR)/tools/sptool \ + CFLAGS="$(HOST_CFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" +endef + +define Host/Install + $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/ + $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/fiptool/fiptool $(STAGING_DIR_HOST)/bin/ + $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/cert_create/cert_create $(STAGING_DIR_HOST)/bin/ + $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/encrypt_fw/encrypt_fw $(STAGING_DIR_HOST)/bin/ + $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/sptool/sptool $(STAGING_DIR_HOST)/bin/ + $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/sptool/sp_mk_generator.py $(STAGING_DIR_HOST)/bin/ +endef + +define Host/Clean + rm -f $(STAGING_DIR_HOST)/bin/fiptool + rm -f $(STAGING_DIR_HOST)/bin/cert_create + rm -f $(STAGING_DIR_HOST)/bin/encrypt_fw + rm -f $(STAGING_DIR_HOST)/bin/sptool + rm -f $(STAGING_DIR_HOST)/bin/sp_mk_generator.py +endef + +$(eval $(call BuildPackage,arm-trusted-firmware-tools)) +$(eval $(call HostBuild)) From 84bc7d31e0a83688ef00b89b78cd124fb55e594d Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 3 Feb 2021 14:42:51 +0000 Subject: [PATCH 02/22] tfa-layerscape: don't build fiptool tfa-fiptool is now provided by an extra package. Use that instead. Signed-off-by: Daniel Golle --- package/boot/tfa-layerscape/Makefile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile index b4295c6310..bf3f132c08 100644 --- a/package/boot/tfa-layerscape/Makefile +++ b/package/boot/tfa-layerscape/Makefile @@ -9,30 +9,25 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tfa-layerscape PKG_VERSION:=LSDK-20.04-update-290520 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/atf PKG_SOURCE_VERSION:=7d748e6f0ec652ba7c43733dc67a3d0b0217390a PKG_MIRROR_HASH:=d209c9ad18aac9f18375450b98b8dab00f0382ccb485df14623bf9b72ea1dd9b -PKG_BUILD_DEPENDS:=tfa-layerscape/host +PKG_BUILD_DEPENDS:=arm-trusted-firmware-tools/host tfa-layerscape/host include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk HOST_CFLAGS += -Wall -Werror -pedantic -std=c99 define Host/Compile - $(MAKE) -C \ - $(HOST_BUILD_DIR)/tools/fiptool \ - CFLAGS="$(HOST_CFLAGS)" \ - LDFLAGS="$(HOST_LDFLAGS)" $(MAKE) -C \ $(HOST_BUILD_DIR)/plat/nxp/tools \ CFLAGS="$(HOST_CFLAGS)" endef define Host/Install - $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/fiptool/fiptool $(STAGING_DIR_HOST)/bin/tfa-fiptool $(INSTALL_BIN) $(HOST_BUILD_DIR)/plat/nxp/tools/create_pbl $(STAGING_DIR_HOST)/bin/tfa-create-pbl $(INSTALL_BIN) $(HOST_BUILD_DIR)/plat/nxp/tools/byte_swap $(STAGING_DIR_HOST)/bin/tfa-byte-swap endef @@ -128,7 +123,7 @@ define Build/Compile fip pbl PLAT=$(PLAT) BOOT_MODE=$(BOOT_MODE) \ RCW=$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-rcw.bin \ BL33=$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-uboot.bin \ - FIPTOOL=$(STAGING_DIR_HOST)/bin/tfa-fiptool \ + FIPTOOL=$(STAGING_DIR_HOST)/bin/fiptool \ CREATE_PBL=$(STAGING_DIR_HOST)/bin/tfa-create-pbl \ BYTE_SWAP=$(STAGING_DIR_HOST)/bin/tfa-byte-swap endef From c3959cd54fa911379a0fef12c020705f227d798a Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 3 Feb 2021 14:48:45 +0000 Subject: [PATCH 03/22] arm-trusted-firmware-mediatek: make use of trusted-firmware-a.mk Signed-off-by: Daniel Golle --- .../boot/arm-trusted-firmware-mediatek/Makefile | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/package/boot/arm-trusted-firmware-mediatek/Makefile b/package/boot/arm-trusted-firmware-mediatek/Makefile index c886a4ccc7..41ab0aeea1 100644 --- a/package/boot/arm-trusted-firmware-mediatek/Makefile +++ b/package/boot/arm-trusted-firmware-mediatek/Makefile @@ -17,11 +17,9 @@ PKG_SOURCE_DATE:=2020-11-09 PKG_SOURCE_VERSION:=03017334ccd8c0fac12e7db36749b95b9a7d745f PKG_MIRROR_HASH:=b211b2f9143d4debc7ad8dc959cb606888af20af790855dd66c87e451b6a1bc7 -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=docs/license.rst - PKG_MAINTAINER:=Daniel Golle +include $(INCLUDE_DIR)/trusted-firmware-a.mk include $(INCLUDE_DIR)/package.mk define Download/mt7622-header-emmc @@ -65,8 +63,6 @@ define Package/arm-trusted-firmware-mt7622-sdmmc VARIANT:=sdmmc endef -export GCC_HONOUR_COPTS=s - MAKE_VARS = \ CROSS_COMPILE="$(TARGET_CROSS)" @@ -87,15 +83,15 @@ endef define Build/InstallDev $(INSTALL_DIR) $(STAGING_DIR_IMAGE) - $(CP) $(PKG_BUILD_DIR)/build/mt7622/release/bl2.bin $(STAGING_DIR_IMAGE)/bl2-$(BUILD_VARIANT).bin - $(CP) $(PKG_BUILD_DIR)/build/mt7622/release/bl2.img $(STAGING_DIR_IMAGE)/bl2-$(BUILD_VARIANT).img + $(CP) $(PKG_BUILD_DIR)/build/mt7622/release/bl2.bin $(STAGING_DIR_IMAGE)/mt7622-bl2-$(BUILD_VARIANT).bin + $(CP) $(PKG_BUILD_DIR)/build/mt7622/release/bl2.img $(STAGING_DIR_IMAGE)/mt7622-bl2-$(BUILD_VARIANT).img # bl31.bin turns out to be identical for all build variants - $(CP) $(PKG_BUILD_DIR)/build/mt7622/release/bl31.bin $(STAGING_DIR_IMAGE)/bl31.bin + $(CP) $(PKG_BUILD_DIR)/build/mt7622/release/bl31.bin $(STAGING_DIR_IMAGE)/mt7622-bl31.bin ifeq ($(BUILD_VARIANT),emmc) - $(CP) $(DL_DIR)/mt7622-header_emmc.bin $(STAGING_DIR_IMAGE)/header-emmc.bin + $(CP) $(DL_DIR)/mt7622-header_emmc.bin $(STAGING_DIR_IMAGE) endif ifeq ($(BUILD_VARIANT),sdmmc) - $(CP) $(DL_DIR)/mt7622-header_sdmmc.bin $(STAGING_DIR_IMAGE)/header-sdmmc.bin + $(CP) $(DL_DIR)/mt7622-header_sdmmc.bin $(STAGING_DIR_IMAGE) endif endef From 104d60fe94cefc4009a9d65735afeedd46beaa5b Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 3 Feb 2021 15:38:14 +0000 Subject: [PATCH 04/22] trusted-firmware-a.mk: add PKG_CPE_ID Vulnerabilities of Trusted Firmware A are tracked as cpe:/a:arm:arm_trusted_firmware Signed-off-by: Daniel Golle --- include/trusted-firmware-a.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/include/trusted-firmware-a.mk b/include/trusted-firmware-a.mk index ec3e4f4e6b..9f38cfd664 100644 --- a/include/trusted-firmware-a.mk +++ b/include/trusted-firmware-a.mk @@ -1,4 +1,5 @@ PKG_NAME ?= trusted-firmware-a +PKG_CPE_ID ?= cpe:/a:arm:arm_trusted_firmware ifndef PKG_SOURCE_PROTO PKG_SOURCE = trusted-firmware-a-$(PKG_VERSION).tar.gz From 7c8c4f1be648aff9f1072ee27a2cc8f6a4a788ef Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 4 Feb 2021 01:01:36 +0000 Subject: [PATCH 05/22] hostapd: fix P2P group information processing vulnerability A vulnerability was discovered in how wpa_supplicant processing P2P (Wi-Fi Direct) group information from active group owners. This issue was discovered by fuzz testing of wpa_supplicant by Google's OSS-Fuzz. https://w1.fi/security/2020-2/wpa_supplicant-p2p-group-info-processing-vulnerability.txt Signed-off-by: Daniel Golle --- package/network/services/hostapd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index cbbe6c1009..3b6ce617d3 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=28 +PKG_RELEASE:=29 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git From 43ff6e641e7c321ab3b67c43ba73a6877d8f0439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Thu, 4 Feb 2021 09:10:05 +0100 Subject: [PATCH 06/22] hostapd: add forgotten patch for P2P vulnerability fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 7c8c4f1be648 ("hostapd: fix P2P group information processing vulnerability") was missing the actual patch for the vulnerability. Fixes: 7c8c4f1be648 ("hostapd: fix P2P group information processing vulnerability") Signed-off-by: Petr Štetiar --- package/network/services/hostapd/Makefile | 2 +- ...of-secondary-device-types-for-P2P-gr.patch | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 package/network/services/hostapd/patches/801-P2P-Fix-copying-of-secondary-device-types-for-P2P-gr.patch diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 3b6ce617d3..6ab97c6e92 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=29 +PKG_RELEASE:=30 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git diff --git a/package/network/services/hostapd/patches/801-P2P-Fix-copying-of-secondary-device-types-for-P2P-gr.patch b/package/network/services/hostapd/patches/801-P2P-Fix-copying-of-secondary-device-types-for-P2P-gr.patch new file mode 100644 index 0000000000..4657b55d85 --- /dev/null +++ b/package/network/services/hostapd/patches/801-P2P-Fix-copying-of-secondary-device-types-for-P2P-gr.patch @@ -0,0 +1,38 @@ +From 947272febe24a8f0ea828b5b2f35f13c3821901e Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Mon, 9 Nov 2020 11:43:12 +0200 +Subject: [PATCH] P2P: Fix copying of secondary device types for P2P group + client + +Parsing and copying of WPS secondary device types list was verifying +that the contents is not too long for the internal maximum in the case +of WPS messages, but similar validation was missing from the case of P2P +group information which encodes this information in a different +attribute. This could result in writing beyond the memory area assigned +for these entries and corrupting memory within an instance of struct +p2p_device. This could result in invalid operations and unexpected +behavior when trying to free pointers from that corrupted memory. + +Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27269 +Fixes: e57ae6e19edf ("P2P: Keep track of secondary device types for peers") +Signed-off-by: Jouni Malinen +--- + src/p2p/p2p.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c +index 74b7b52ae05c..5cbfc217fc1f 100644 +--- a/src/p2p/p2p.c ++++ b/src/p2p/p2p.c +@@ -453,6 +453,8 @@ static void p2p_copy_client_info(struct p2p_device *dev, + dev->info.config_methods = cli->config_methods; + os_memcpy(dev->info.pri_dev_type, cli->pri_dev_type, 8); + dev->info.wps_sec_dev_type_list_len = 8 * cli->num_sec_dev_types; ++ if (dev->info.wps_sec_dev_type_list_len > WPS_SEC_DEV_TYPE_MAX_LEN) ++ dev->info.wps_sec_dev_type_list_len = WPS_SEC_DEV_TYPE_MAX_LEN; + os_memcpy(dev->info.wps_sec_dev_type_list, cli->sec_dev_types, + dev->info.wps_sec_dev_type_list_len); + } +-- +2.25.1 + From 36c9cf3e51c563d350207b16edee111485d3e04b Mon Sep 17 00:00:00 2001 From: John Audia Date: Wed, 3 Feb 2021 21:09:56 -0500 Subject: [PATCH 07/22] kernel: bump 5.4 to 5.4.95 Ran update_kernel.sh in a fresh clone without any existing toolchains. Removed upstreamed patches: imx6: 303-ARM-dts-imx6qdl-gw52xx-fix-duplicate-regulator-namin.patch Build system: x86_64 Build-tested: ipq806x/R7800, bcm27xx/bcm2711 Run-tested: ipq806x/R7800 No dmesg regressions, everything functional Signed-off-by: John Audia --- include/kernel-version.mk | 4 +- .../910-unaligned_access_hacks.patch | 2 +- ...gw52xx-fix-duplicate-regulator-namin.patch | 37 ------------------- 3 files changed, 3 insertions(+), 40 deletions(-) delete mode 100644 target/linux/imx6/patches-5.4/303-ARM-dts-imx6qdl-gw52xx-fix-duplicate-regulator-namin.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index dd3c1bfbf0..e524308964 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .94 +LINUX_VERSION-5.4 = .95 -LINUX_KERNEL_HASH-5.4.94 = c23df57db7312e9afa5ce477046e227a3c2153efbe1f29045ad23c820aad2b39 +LINUX_KERNEL_HASH-5.4.95 = 030ae544f346bfa2ce619dd9e17e93d10ec393632d3b6d6cf5d1fc84b914d449 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch index dfc16a7ba1..c7bcc29372 100644 --- a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch @@ -706,7 +706,7 @@ EXPORT_SYMBOL(xfrm_parse_spi); --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -3973,14 +3973,16 @@ static bool tcp_parse_aligned_timestamp( +@@ -3975,14 +3975,16 @@ static bool tcp_parse_aligned_timestamp( { const __be32 *ptr = (const __be32 *)(th + 1); diff --git a/target/linux/imx6/patches-5.4/303-ARM-dts-imx6qdl-gw52xx-fix-duplicate-regulator-namin.patch b/target/linux/imx6/patches-5.4/303-ARM-dts-imx6qdl-gw52xx-fix-duplicate-regulator-namin.patch deleted file mode 100644 index c459e6f11c..0000000000 --- a/target/linux/imx6/patches-5.4/303-ARM-dts-imx6qdl-gw52xx-fix-duplicate-regulator-namin.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 069abe403d4eba85eccea16f8b72186a89a68bb1 Mon Sep 17 00:00:00 2001 -From: Koen Vandeputte -Date: Thu, 7 Jan 2021 10:06:03 +0100 -Subject: [PATCH] ARM: dts: imx6qdl-gw52xx: fix duplicate regulator naming - -2 regulator descriptions carry identical naming. - -This leads to following boot warning: -[ 0.173138] debugfs: Directory 'vdd1p8' with parent 'regulator' already present! - -Fix this by renaming the one used for audio. - -Fixes: 5051bff33102 ("ARM: dts: imx: ventana: add LTC3676 PMIC support") -Signed-off-by: Tim Harvey -Signed-off-by: Koen Vandeputte -Cc: Fabio Estevam -Cc: Rob Herring -Cc: Sascha Hauer -Cc: Shawn Guo -Cc: NXP Linux Team -Cc: Pengutronix Kernel Team -Cc: stable@vger.kernel.org # v4.11 ---- - arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi -+++ b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi -@@ -273,7 +273,7 @@ - - /* VDD_AUD_1P8: Audio codec */ - reg_aud_1p8v: ldo3 { -- regulator-name = "vdd1p8"; -+ regulator-name = "vdd1p8a"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-boot-on; From a21be2a70365363f5dd08efd6c629a254cc37170 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 2 Feb 2021 12:56:16 +0000 Subject: [PATCH 08/22] kernel: add defaults for new SELinux options Signed-off-by: Daniel Golle --- config/Config-kernel.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 3350558adb..c0460db72a 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -1176,6 +1176,16 @@ config KERNEL_SECURITY_SELINUX_DEVELOP depends on KERNEL_SECURITY_SELINUX default y +config KERNEL_SECURITY_SELINUX_SIDTAB_HASH_BITS + int + depends on KERNEL_SECURITY_SELINUX + default 9 + +config KERNEL_SECURITY_SELINUX_SID2STR_CACHE_SIZE + int + depends on KERNEL_SECURITY_SELINUX + default 256 + config KERNEL_LSM string default "lockdown,yama,loadpin,safesetid,integrity,selinux" From 381a458d5886c4a82a81adf60c2f19f41b943576 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 5 Feb 2021 13:16:21 +0000 Subject: [PATCH 09/22] selinux-policy: update to version 0.6 Signed-off-by: Daniel Golle --- package/system/selinux-policy/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/system/selinux-policy/Makefile b/package/system/selinux-policy/Makefile index 491b26a83e..8f5a290fa6 100644 --- a/package/system/selinux-policy/Makefile +++ b/package/system/selinux-policy/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=selinux-policy PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://git.defensec.nl/selinux-policy.git -PKG_VERSION:=0.5 -PKG_MIRROR_HASH:=c96a8cf7ac3445c52a28150c5000a55bde8112402bc77ccfee825cff0bdc8a03 +PKG_VERSION:=0.6 +PKG_MIRROR_HASH:=55a27eab67f39a03ba586691984a04234d16b97e816bca17ac42c94aae01c3c6 PKG_SOURCE_VERSION:=v$(PKG_VERSION) PKG_BUILD_DEPENDS:=secilc/host policycoreutils/host From a17b8eaa2e4b319b7069170398fe965786a813e9 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Mon, 21 Sep 2020 16:48:37 -1000 Subject: [PATCH 10/22] build: use SPDX license tags The license folder is a core part of OpenWrt and all GPL-2.0 licensed. Use SPDX license tags to allow machines to check licenses. Signed-off-by: Paul Spooren [rebase, keep some Copyright lines, sharpen commit message] Signed-off-by: Adrian Schmutzler --- BSDmakefile | 7 +++---- Config.in | 6 ++---- Makefile | 6 +----- config/Config-build.in | 6 ++---- config/Config-devel.in | 6 ++---- config/Config-images.in | 6 ++---- config/Config-kernel.in | 6 ++---- include/autotools.mk | 7 ++----- include/debug.mk | 7 ++----- include/depends.mk | 8 +++----- include/download.mk | 5 +---- include/feeds.mk | 5 +---- include/hardening.mk | 7 ++----- include/host-build.mk | 7 ++----- include/image.mk | 7 ++----- include/kernel-build.mk | 8 +++----- include/kernel-defaults.mk | 7 ++----- include/kernel-version.mk | 2 +- include/kernel.mk | 7 ++----- include/netfilter.mk | 7 ++----- include/nls.mk | 7 ++----- include/package-bin.mk | 7 ++----- include/package-defaults.mk | 7 ++----- include/package-dumpinfo.mk | 7 ++----- include/package-ipkg.mk | 7 ++----- include/package-seccomp.mk | 7 ++----- include/package.mk | 7 ++----- include/prereq-build.mk | 7 ++----- include/prereq.mk | 7 ++----- include/quilt.mk | 6 ++---- include/subdir.mk | 7 ++----- include/target.mk | 5 +---- include/toolchain-build.mk | 7 ++----- include/toplevel.mk | 8 ++------ include/unpack.mk | 7 ++----- include/verbose.mk | 7 ++----- include/version.mk | 5 +---- rules.mk | 5 +---- 38 files changed, 72 insertions(+), 175 deletions(-) diff --git a/BSDmakefile b/BSDmakefile index c6a0425698..66fe08858f 100644 --- a/BSDmakefile +++ b/BSDmakefile @@ -1,7 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only +# # Copyright (C) 2006 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + world ${.TARGETS}: @gmake $@ diff --git a/Config.in b/Config.in index d30c04839e..546e8249cc 100644 --- a/Config.in +++ b/Config.in @@ -1,8 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only +# # Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# mainmenu "OpenWrt Configuration" diff --git a/Makefile b/Makefile index 0144b0c5ff..aecee6929e 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,6 @@ -# Makefile for OpenWrt +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2007 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# TOPDIR:=${CURDIR} LC_ALL:=C diff --git a/config/Config-build.in b/config/Config-build.in index 0aaf6b31c3..342859b7c0 100644 --- a/config/Config-build.in +++ b/config/Config-build.in @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only +# # Copyright (C) 2006-2013 OpenWrt.org # Copyright (C) 2016 LEDE Project -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# config EXPERIMENTAL bool "Enable experimental features by default" diff --git a/config/Config-devel.in b/config/Config-devel.in index 21e15f16dc..126462bfc3 100644 --- a/config/Config-devel.in +++ b/config/Config-devel.in @@ -1,8 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only +# # Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# menuconfig DEVEL bool "Advanced configuration options (for developers)" diff --git a/config/Config-images.in b/config/Config-images.in index 7d56d70908..2921cd5bca 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -1,8 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only +# # Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# menu "Target Images" diff --git a/config/Config-kernel.in b/config/Config-kernel.in index c0460db72a..f71114b5da 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -1,8 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only +# # Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# config KERNEL_BUILD_USER string "Custom Kernel Build User Name" diff --git a/include/autotools.mk b/include/autotools.mk index ae320fbde0..ec67c844f7 100644 --- a/include/autotools.mk +++ b/include/autotools.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2007-2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2007-2020 OpenWrt.org autoconf_bool = $(patsubst %,$(if $($(1)),--enable,--disable)-%,$(2)) diff --git a/include/debug.mk b/include/debug.mk index 59a99c0f77..98a1d6e889 100644 --- a/include/debug.mk +++ b/include/debug.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2007 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2007-2020 OpenWrt.org # debug flags: # diff --git a/include/depends.mk b/include/depends.mk index ace7139000..0080b97876 100644 --- a/include/depends.mk +++ b/include/depends.mk @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2007 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2007-2020 OpenWrt.org + # define a dependency on a subtree # parameters: # 1: directories/files diff --git a/include/download.mk b/include/download.mk index d393bf3907..a638e69382 100644 --- a/include/download.mk +++ b/include/download.mk @@ -1,10 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2012 OpenWrt.org # Copyright (C) 2016 LEDE project -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# PROJECT_GIT = https://git.openwrt.org diff --git a/include/feeds.mk b/include/feeds.mk index 2b259b96b3..ef5fef7f4b 100644 --- a/include/feeds.mk +++ b/include/feeds.mk @@ -1,10 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2014 OpenWrt.org # Copyright (C) 2016 LEDE Project -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -include $(TMP_DIR)/.packageauxvars diff --git a/include/hardening.mk b/include/hardening.mk index 4e49e6b1b9..6acd862f5c 100644 --- a/include/hardening.mk +++ b/include/hardening.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2015-2020 OpenWrt.org PKG_CHECK_FORMAT_SECURITY ?= 1 PKG_ASLR_PIE ?= 1 diff --git a/include/host-build.mk b/include/host-build.mk index ab6e05e14f..e4a5c48e72 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2006-2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2006-2020 OpenWrt.org include $(INCLUDE_DIR)/download.mk diff --git a/include/image.mk b/include/image.mk index 6843b935f7..2530108211 100644 --- a/include/image.mk +++ b/include/image.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2006-2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2006-2020 OpenWrt.org override TARGET_BUILD= include $(INCLUDE_DIR)/prereq.mk diff --git a/include/kernel-build.mk b/include/kernel-build.mk index 6123c9d456..66a9f64c80 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2006-2007 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2006-2020 OpenWrt.org + include $(INCLUDE_DIR)/prereq.mk include $(INCLUDE_DIR)/depends.mk diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 5b376dc9da..e5a0ba367b 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2006-2020 OpenWrt.org ifdef CONFIG_STRIP_KERNEL_EXPORTS KERNEL_MAKEOPTS += \ diff --git a/include/kernel-version.mk b/include/kernel-version.mk index e524308964..5861b03670 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -1,5 +1,5 @@ -# Use the default kernel version if the Makefile doesn't override it +# Use the default kernel version if the Makefile doesn't override it LINUX_RELEASE?=1 ifdef CONFIG_TESTING_KERNEL diff --git a/include/kernel.mk b/include/kernel.mk index 1466048b0c..d2a5b42138 100644 --- a/include/kernel.mk +++ b/include/kernel.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2006-2020 OpenWrt.org ifneq ($(filter check,$(MAKECMDGOALS)),) CHECK:=1 diff --git a/include/netfilter.mk b/include/netfilter.mk index 889beb7a98..60f031e9a7 100644 --- a/include/netfilter.mk +++ b/include/netfilter.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2006-2020 OpenWrt.org ifneq ($(__inc_netfilter),1) __inc_netfilter:=1 diff --git a/include/nls.mk b/include/nls.mk index 04838821b4..742f8c25aa 100644 --- a/include/nls.mk +++ b/include/nls.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2011-2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2011-2020 OpenWrt.org # iconv full ifeq ($(CONFIG_BUILD_NLS),y) diff --git a/include/package-bin.mk b/include/package-bin.mk index 4ae049af54..192f0726d2 100644 --- a/include/package-bin.mk +++ b/include/package-bin.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2007-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2007-2020 OpenWrt.org ifeq ($(DUMP),) define BuildTarget/bin diff --git a/include/package-defaults.mk b/include/package-defaults.mk index 2a04bc17e9..3ee3a965f2 100644 --- a/include/package-defaults.mk +++ b/include/package-defaults.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2006 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2006-2020 OpenWrt.org PKG_DEFAULT_DEPENDS = +libc +USE_GLIBC:librt +USE_GLIBC:libpthread diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk index ef98c482fb..30b0187f11 100644 --- a/include/package-dumpinfo.mk +++ b/include/package-dumpinfo.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2006 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2006-2020 OpenWrt.org ifneq ($(DUMP),) diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index 32de3cc93e..ead4b5742c 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2006-2020 OpenWrt.org ifndef DUMP include $(INCLUDE_DIR)/feeds.mk diff --git a/include/package-seccomp.mk b/include/package-seccomp.mk index fa49617d41..86e834450d 100644 --- a/include/package-seccomp.mk +++ b/include/package-seccomp.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2015-2020 OpenWrt.org PKG_CONFIG_DEPENDS+= CONFIG_KERNEL_SECCOMP diff --git a/include/package.mk b/include/package.mk index 24128c53a6..dc1f69a710 100644 --- a/include/package.mk +++ b/include/package.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2006-2008 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2006-2020 OpenWrt.org __package_mk:=1 diff --git a/include/prereq-build.mk b/include/prereq-build.mk index fb11a070a1..6dce11cba2 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2006-2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2006-2020 OpenWrt.org include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/prereq.mk diff --git a/include/prereq.mk b/include/prereq.mk index 6d14140792..c11178a884 100644 --- a/include/prereq.mk +++ b/include/prereq.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2006-2020 OpenWrt.org ifneq ($(__prereq_inc),1) __prereq_inc:=1 diff --git a/include/quilt.mk b/include/quilt.mk index 56f674a2f3..00597ca0f2 100644 --- a/include/quilt.mk +++ b/include/quilt.mk @@ -1,8 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2007-2009 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. +# Copyright (C) 2007-2020 OpenWrt.org ifeq ($(TARGET_BUILD),1) PKG_BUILD_DIR:=$(LINUX_DIR) diff --git a/include/subdir.mk b/include/subdir.mk index f01cd55f30..be080859b7 100644 --- a/include/subdir.mk +++ b/include/subdir.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2007 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2007-2020 OpenWrt.org ifeq ($(MAKECMDGOALS),prereq) SUBTARGETS:=prereq diff --git a/include/target.mk b/include/target.mk index edc6a146de..7526224972 100644 --- a/include/target.mk +++ b/include/target.mk @@ -1,10 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2007-2008 OpenWrt.org # Copyright (C) 2016 LEDE Project -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# ifneq ($(__target_inc),1) __target_inc=1 diff --git a/include/toolchain-build.mk b/include/toolchain-build.mk index 35d8c9380e..b7a253b71b 100644 --- a/include/toolchain-build.mk +++ b/include/toolchain-build.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2009 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2009-2020 OpenWrt.org override CONFIG_AUTOREBUILD= override CONFIG_AUTOREMOVE= diff --git a/include/toplevel.mk b/include/toplevel.mk index 23bae149d4..744695b19c 100644 --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -1,10 +1,6 @@ -# Makefile for OpenWrt -# -# Copyright (C) 2007-2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. +# SPDX-License-Identifier: GPL-2.0-only # +# Copyright (C) 2007-2020 OpenWrt.org PREP_MK= OPENWRT_BUILD= QUIET=0 diff --git a/include/unpack.mk b/include/unpack.mk index 5bb27d41c9..6a56b8e742 100644 --- a/include/unpack.mk +++ b/include/unpack.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2006-2007 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2006-2020 OpenWrt.org HOST_TAR:=$(TAR) TAR_CMD=$(HOST_TAR) -C $(1)/.. $(TAR_OPTIONS) diff --git a/include/verbose.mk b/include/verbose.mk index d260080195..3ecf842d11 100644 --- a/include/verbose.mk +++ b/include/verbose.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2006 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2006-2020 OpenWrt.org ifndef OPENWRT_VERBOSE OPENWRT_VERBOSE:= diff --git a/include/version.mk b/include/version.mk index b7f42e13bb..f39e35cd09 100644 --- a/include/version.mk +++ b/include/version.mk @@ -1,10 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2012-2015 OpenWrt.org # Copyright (C) 2016 LEDE Project -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# # Substituted by SDK, do not remove # REVISION:=x diff --git a/rules.mk b/rules.mk index b658e93020..cbe1b0cb4c 100644 --- a/rules.mk +++ b/rules.mk @@ -1,10 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2010 OpenWrt.org # Copyright (C) 2016 LEDE Project -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# ifneq ($(__rules_inc),1) __rules_inc=1 From ddafcc79473249089ffd4c2de8159af2a27e5683 Mon Sep 17 00:00:00 2001 From: Ewan Parker Date: Sat, 31 Oct 2020 09:29:54 +0000 Subject: [PATCH 11/22] ramips: add support for Hi-Link HLK-7688A Specifications: - SoC: MediaTek MT7688AN - RAM: 128 MB - Flash: 32 MB - Ethernet: 5x 10/100 (1x WAN, 4x LAN) - Wireless: built in 2.4GHz (bgn) - USB: 1x USB 2.0 port - Buttons: 1x Reset - LEDs: 1x (WiFi) Flash instructions: - Configure TFTP server with IP address 10.10.10.3 - Name the firmware file as firmware.bin - Connect any Ethernet port to the TFTP server's LAN - Choose option 2 in U-Boot - Alternatively choose option 7 to upload firmware to the built-in web server MAC addresses as verified by OEM firmware: use address source 2g *:XX factory 0x4 LAN *:XX+1 factory 0x28 WAN *:XX+1 factory 0x2e Notes: This board is ostensibly a module containing the MediaTek MT7688AN SoC, 128 MB DDR2 SDRAM and 32 MB flash storage. The SoC can be operated in IoT Gateway Mode or IoT Device Mode. From some vendors the U-Boot that comes installed operates on UART 2 which is inaccessible in gateway mode and operates unreliably in the Linux kernel when using more than 64 MB of RAM. For those, updating U-Boot is recommended. Signed-off-by: Ewan Parker [add WLAN to 01_leds] Signed-off-by: Adrian Schmutzler --- .../ramips/dts/mt7628an_hilink_hlk-7688a.dts | 115 ++++++++++++++++++ target/linux/ramips/image/mt76x8.mk | 8 ++ .../mt76x8/base-files/etc/board.d/01_leds | 3 + .../mt76x8/base-files/etc/board.d/02_network | 2 + 4 files changed, 128 insertions(+) create mode 100644 target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts diff --git a/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts new file mode 100644 index 0000000000..969488e416 --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7628an.dtsi" + +#include +#include + +/ { + compatible = "hilink,hlk-7688a", "mediatek,mt7628an-soc"; + model = "Hi-Link HLK-7688A"; + + aliases { + led-boot = &led_wlan; + led-failsafe = &led_wlan; + led-upgrade = &led_wlan; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 38 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_wlan: wlan { + label = "green:wlan"; + gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; +}; + +&state_default { + gpio { + groups = "wdt", "wled_an"; + function = "gpio"; + }; +}; + +&uart1 { + status = "okay"; +}; + +&i2c { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x1fb0000>; + }; + }; + }; + + spidev@1 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "linux,spidev"; + reg = <1>; + spi-max-frequency = <40000000>; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + status = "okay"; +}; diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 00593dd6f5..00976f6044 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -135,6 +135,14 @@ define Device/hilink_hlk-7628n endef TARGET_DEVICES += hilink_hlk-7628n +define Device/hilink_hlk-7688a + IMAGE_SIZE := 32448k + DEVICE_VENDOR := Hi-Link + DEVICE_MODEL := HLK-7688A + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += hilink_hlk-7688a + define Device/hiwifi_hc5661a IMAGE_SIZE := 15808k DEVICE_VENDOR := HiWiFi diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds index 31bd9e05b1..bcbc2ed1e6 100755 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds @@ -33,6 +33,9 @@ hilink,hlk-7628n|\ skylab,skw92a) ucidef_set_led_netdev "wifi_led" "wifi" "green:wlan" "wlan0" ;; +hilink,hlk-7688a) + ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt" + ;; hiwifi,hc5661a|\ hiwifi,hc5761a) ucidef_set_led_switch "internet" "internet" "blue:internet" "switch0" "0x10" diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network index fcc2630b3f..8bbcbb2190 100755 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network @@ -63,6 +63,7 @@ ramips_setup_interfaces() "1:lan" "0:wan" "6@eth0" ;; hilink,hlk-7628n|\ + hilink,hlk-7688a|\ hiwifi,hc5861b|\ skylab,skw92a|\ tplink,archer-c20-v4|\ @@ -166,6 +167,7 @@ ramips_setup_macs() lan_mac=$wan_mac ;; cudy,wr1000|\ + hilink,hlk-7688a|\ wavlink,wl-wn577a2) wan_mac=$(mtd_get_mac_binary factory 0x2e) label_mac=$(mtd_get_mac_binary factory 0x4) From 55d2db0e8cebca5aa9739c4db875ef57c4643f6d Mon Sep 17 00:00:00 2001 From: Martin Kennedy Date: Sat, 28 Nov 2020 02:03:32 +0000 Subject: [PATCH 12/22] ath79: add support for Meraki MR12 Port device support for Meraki MR12 from the ar71xx target to ath79. Specifications: - SoC: AR7242-AH1A CPU - RAM: 64MiB (NANYA NT5DS32M16DS-5T) - NOR Flash: 16MiB (MXIC MX25L12845EMI-10G) - Ethernet: 1 x PoE Gigabit Ethernet Port (SoC MAC + AR8021-BL1E PHY) - Ethernet: 1 x 100Mbit port (SoC MAC+PHY) - Wi-Fi: Atheros AR9283-AL1A (2T2R, 11n) Installation: 1. Requires TFTP server at 192.168.1.101, w/ initramfs & sysupgrade .bins 2. Open shell case 3. Connect a USB->TTL cable to headers furthest from the RF shield 4. Power on the router; connect to U-boot over 115200-baud connection 5. Interrupt U-boot process to boot Openwrt by running: setenv bootcmd bootm 0xbf0a0000; saveenv; tftpboot 0c00000 .bin; bootm 0c00000; 6. Copy sysupgrade image to /tmp on MR12 7. sysupgrade /tmp/.bin Notes: - kmod-owl-loader is still required to load the ART partition into the driver. - The manner of storing MAC addresses is updated from ar71xx; it is at 0x66 of the 'config' partition, where it was discovered that the OEM firmware stores it. This is set as read-only. If you are migrating from ar71xx and used the method mentioned above to upgrade, use kmod-mtd-rw or UCI to add the MAC back in. One more method for doing this is described below. - Migrating directly from ar71xx has not been thoroughly tested, but one method has been used a couple of times with good success, migrating 18.06.2 to a full image produced as of this commit. Please note that these instructions are only for experienced users, and/or those still able to open their device up to flash it via the serial headers should anything go wrong. 1) Install kmod-mtd-rw and uboot-envtools 2) Run `insmod mtd-rw.ko i_want_a_brick=1` 3) Modify /etc/fw_env.config to point to the u-boot-env partition. The file /etc/fw_env.config should contain: # MTD device env offset env size sector size /dev/mtd1 0x00000 0x10000 0x10000 See https://openwrt.org/docs/techref/bootloader/uboot.config for more details. 4) Run `fw_printenv` to verify everything is correct, as per the link above. 5) Run `fw_setenv bootcmd bootm 0xbf0a0000` to set a new boot address. 6) Manually modify /lib/upgrade/common.sh's get_image function: Change ... cat "$from" 2>/dev/null | $cmd ... into ... ( dd if=/dev/zero bs=1 count=$((0x66)) ; # Pad the first 102 bytes echo -ne '\x00\x18\x0a\x12\x34\x56' ; # Add in MAC address dd if=/dev/zero bs=1 count=$((0x20000-0x66-0x6)) ; # Pad the rest cat "$from" 2>/dev/null ) | $cmd ... which, during the upgrade process, will pad the image by 128K of zeroes-plus-MAC-address, in order for the ar71xx's firmware partition -- which starts at 0xbf080000 -- to be instead aligned with the ath79 firmware partition, which starts 128K later at 0xbf0a0000. 7) Copy the sysupgrade image into /tmp, as above 8) Run `sysupgrade -F /tmp/.bin`, then wait Again, this may BRICK YOUR DEVICE, so make *sure* to have your serial cable handy. Signed-off-by: Martin Kennedy [add LED migration and extend compat message] Signed-off-by: Adrian Schmutzler --- target/linux/ath79/dts/ar7242_meraki_mr12.dts | 170 ++++++++++++++++++ .../generic/base-files/etc/board.d/01_leds | 19 +- .../generic/base-files/etc/board.d/02_network | 5 + .../etc/hotplug.d/firmware/10-ath9k-eeprom | 3 + .../etc/uci-defaults/04_led_migration | 3 + .../etc/uci-defaults/05_fix-compat-version | 1 + target/linux/ath79/image/generic.mk | 17 ++ 7 files changed, 209 insertions(+), 9 deletions(-) create mode 100644 target/linux/ath79/dts/ar7242_meraki_mr12.dts diff --git a/target/linux/ath79/dts/ar7242_meraki_mr12.dts b/target/linux/ath79/dts/ar7242_meraki_mr12.dts new file mode 100644 index 0000000000..125919d4f1 --- /dev/null +++ b/target/linux/ath79/dts/ar7242_meraki_mr12.dts @@ -0,0 +1,170 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar7242.dtsi" + +#include +#include + +/ { + compatible = "meraki,mr12", "qca,ar7242"; + model = "Meraki MR12"; + + aliases { + led-boot = &led_power_orange; + led-failsafe = &led_power_orange; + led-running = &led_power_green; + led-upgrade = &led_power_orange; + }; + + extosc: ref { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-output-names = "ref"; + clock-frequency = <40000000>; + }; + + leds { + compatible = "gpio-leds"; + + link1 { + label = "green:link1"; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + + link2 { + label = "green:link2"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + + link3 { + label = "green:link3"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + link4 { + label = "green:link4"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + lan { + label = "green:lan"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + led_power_orange: power_orange { + label = "orange:power"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + panic-indicator; + }; + + led_power_green: power_green { + label = "green:power"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&pcie { + status = "okay"; + + wifi@0,0,0 { + compatible = "pci168c,002a"; + reg = <0x0000 0 0 0 0>; + qca,no-eeprom; + mtd-mac-address = <&config 0x66>; + mtd-mac-address-increment = <1>; + }; +}; + +&pll { + clocks = <&extosc>; +}; + +&uart { + status = "okay"; +}; + +&mdio0 { + status = "okay"; + + phy4: ethernet-phy@4 { + reg = <4>; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&config 0x66>; + + pll-data = <0x02000000 0x00000101 0x00001313>; + + phy-mode = "rgmii-id"; + phy-handle = <&phy4>; +}; + +&mdio1 { + status = "okay"; +}; + +ð1 { + status = "okay"; + + mtd-mac-address = <&config 0x66>; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x40000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x40000 0x40000>; + read-only; + }; + + config: partition@80000 { + label = "config"; + reg = <0x80000 0x20000>; + read-only; + }; + + partition@a0000 { + label = "firmware"; + reg = <0xa0000 0xf40000>; + compatible = "denx,uimage"; + }; + + partition@fe0000 { + label = "art"; + reg = <0xfe0000 0x20000>; + read-only; + }; + }; + }; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index c6ade98c8f..169df8b285 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -217,6 +217,16 @@ glinet,gl-x750) hak5,lan-turtle) ucidef_set_led_netdev "wan" "WAN" "orange:system" "eth1" ;; +meraki,mr12|\ +tplink,cpe210-v2|\ +tplink,cpe210-v3) + ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0" + ucidef_set_rssimon "wlan0" "200000" "1" + ucidef_set_led_rssi "rssilow" "RSSILOW" "green:link1" "wlan0" "1" "100" + ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:link2" "wlan0" "30" "100" + ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:link3" "wlan0" "60" "100" + ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:link4" "wlan0" "80" "100" + ;; meraki,mr16) ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0" ;; @@ -306,15 +316,6 @@ tplink,wbs510-v2) ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:link3" "wlan0" "60" "100" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:link4" "wlan0" "80" "100" ;; -tplink,cpe210-v2|\ -tplink,cpe210-v3) - ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0" - ucidef_set_rssimon "wlan0" "200000" "1" - ucidef_set_led_rssi "rssilow" "RSSILOW" "green:link1" "wlan0" "1" "100" - ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:link2" "wlan0" "30" "100" - ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:link3" "wlan0" "60" "100" - ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:link4" "wlan0" "80" "100" - ;; tplink,cpe510-v2|\ tplink,cpe510-v3) ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0" 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 cb6765bba5..cb675cab1a 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 @@ -265,6 +265,11 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "5:wan" "6@eth1" "4:lan" ;; + meraki,mr12) + ucidef_set_interface_lan "eth0" + ucidef_add_switch "switch0" \ + "0@eth1" "1:lan" + ;; mercury,mw4530r-v1|\ tplink,archer-a7-v5|\ tplink,archer-c6-v2|\ diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 552eb406ab..2e520ac067 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -56,6 +56,9 @@ case "$FIRMWARE" in caldata_extract "calibrate" 0x1000 0x440 ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env0 RADIOADDR1) ;; + meraki,mr12) + caldata_extract "art" 0x11000 0xeb8 + ;; nec,wg800hp) caldata_extract "art" 0x1000 0x440 ath9k_patch_mac $(mtd_get_mac_text board_data 0x680) diff --git a/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration b/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration index ea5cafa66b..e9b0fade38 100644 --- a/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration +++ b/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration @@ -17,6 +17,9 @@ engenius,epg5000) glinet,gl-mifi) migrate_leds ":net=:3g4g" ;; +meraki,mr12) + migrate_leds ":wifi=:link" ":wan=:lan" + ;; openmesh,mr600-v1) migrate_leds ":wlan58=:wifi5g" ;; diff --git a/target/linux/ath79/generic/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/ath79/generic/base-files/etc/uci-defaults/05_fix-compat-version index af5fb80f26..a6b7fa3162 100644 --- a/target/linux/ath79/generic/base-files/etc/uci-defaults/05_fix-compat-version +++ b/target/linux/ath79/generic/base-files/etc/uci-defaults/05_fix-compat-version @@ -1,6 +1,7 @@ . /lib/functions.sh case "$(board_name)" in + meraki,mr12|\ meraki,mr16) uci set system.@system[0].compat_version="2.0" uci commit system diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index c43d396db5..d11cc28146 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1309,6 +1309,23 @@ define Device/librerouter_librerouter-v1 endef TARGET_DEVICES += librerouter_librerouter-v1 +define Device/meraki_mr12 + SOC := ar7242 + DEVICE_VENDOR := Meraki + DEVICE_MODEL := MR12 + IMAGE_SIZE := 15616k + DEVICE_PACKAGES := kmod-owl-loader rssileds + SUPPORTED_DEVICES += mr12 + DEVICE_COMPAT_VERSION := 2.0 + DEVICE_COMPAT_MESSAGE := Partitions differ from ar71xx version of MR12. Image format is incompatible. \ + To use sysupgrade, you must change /lib/update/common.sh::get_image to prepend 128K zeroes to this image, \ + and change the bootcmd in u-boot to "bootm 0xbf0a0000". After that, you can use "sysupgrade -F -n". \ + Make sure you do not keep your old config, as ethernet setup is not compatible either. \ + For more details, see the OpenWrt Wiki: https://openwrt.org/toh/meraki/MR12, \ + or the commit message of the MR12 ath79 port on git.openwrt.org. +endef +TARGET_DEVICES += meraki_mr12 + define Device/meraki_mr16 SOC := ar7161 DEVICE_VENDOR := Meraki From 4a1803978575295f8cec0813cc74b3448730feac Mon Sep 17 00:00:00 2001 From: David Bentham Date: Sat, 21 Nov 2020 14:04:49 +0000 Subject: [PATCH 13/22] ramips: add support for UniElec U7621-01 UniElec U7621-01 is a router platform board, the smaller model of the U7621-06. The device has the following specifications: - MT7621AT (880 MHz) - 256 of RAM (DDR3) - 16 MB of FLASH (SPI NOR) - 5x 1 Gbps Ethernet (MT7621 built-in switch) - 1x 2.4Ghz MT7603E - 1x 5Ghz MT7612 - 1x miniPCIe slots (PCIe bus only) - 1x miniSIM slot - 1x USB 2.0 (uses the usb 3.0 driver) - 8x LEDs (1x GPIO-controlled) - 1x reset button - 1x UART header (4-pins) - 1x GPIO header (30-pins) - 1x DC jack for main power (12 V) The following has been tested and is working: - Ethernet switch - 1x 2.4Ghz MT7603E (wifi) - 1x 5Ghz MT7612 (wifi) - miniPCIe slots (tested with Wi-Fi cards and LTE modem cards) - miniSIM slot (works with normal size simcard) - sysupgrade - reset button Installation: This board has no locked down bootloader. The seller can be asked to install openwrt v18.06, so upgrades are standard sysupgrade method. Recovery: This board contains a Chinese, closed-source bootloader called Breed (Boot and Recovery Environment for Embedded Devices). Breed supports web recovery and to enter it, you keep the reset button pressed for around 5 seconds during boot. Your machine will be assigned an IP through DHCP and the router will use IP address 192.168.1.1. The recovery website is in Chinese, but is easy to use. Click on the second item in the list to access the recovery page, then the second item on the next page is where you select the firmware. In order to start the recovery, you click the button at the bottom. LEDs list (left to right): - ESW_P0_LED_0 - ESW_P1_LED_0 - ESW_P2_LED_0 - ESW_P3_LED_0 - ESW_P4_LED_0 - CTS2_N (GPIO10, configured as "status" LED) - LED_WLAN# (connected with pin 44 in wifi1 slot) Signed-off-by: David Bentham [add DEVICE_VARIANT, fix DEVICE_PACKAGES, remove &gpio] Signed-off-by: Adrian Schmutzler --- .../dts/mt7621_unielec_u7621-01-16m.dts | 48 ++++++++ .../ramips/dts/mt7621_unielec_u7621-01.dtsi | 115 ++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 11 ++ 3 files changed, 174 insertions(+) create mode 100644 target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts create mode 100644 target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts new file mode 100644 index 0000000000..d063f08711 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_unielec_u7621-01.dtsi" + +/ { + compatible = "unielec,u7621-01-16m", "unielec,u7621-01", "mediatek,mt7621-soc"; + model = "UniElec U7621-01 (16M flash)"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <14000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bootloader"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi new file mode 100644 index 0000000000..336f68ea61 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "unielec,u7621-01", "mediatek,mt7621-soc"; + + aliases { + led-boot = &led_status; + led-failsafe = &led_status; + led-running = &led_status; + led-upgrade = &led_status; + }; + + gpio-export { + compatible = "gpio-export"; + #size-cells = <0>; + + modem_reset { + gpio-export,name = "modem_reset"; + gpio-export,output = <1>; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status: status { + label = "green:status"; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0000>; + ieee80211-freq-limit = <2400000 2500000>; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + + led { + led-sources = <2>; + }; + }; +}; + +&gmac0 { + mtd-mac-address = <&factory 0xe000>; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe000>; + mtd-mac-address-increment = <1>; + }; + + port@1 { + status = "okay"; + label = "lan1"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan3"; + }; + + port@4 { + status = "okay"; + label = "lan4"; + }; + }; +}; + +&state_default { + gpio { + groups = "jtag", "uart2", "wdt"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index ce3a352337..f5ab398ec1 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1163,6 +1163,17 @@ define Device/ubnt_unifi-nanohd endef TARGET_DEVICES += ubnt_unifi-nanohd +define Device/unielec_u7621-01-16m + $(Device/dsa-migration) + $(Device/uimage-lzma-loader) + IMAGE_SIZE := 16064k + DEVICE_VENDOR := UniElec + DEVICE_MODEL := U7621-01 + DEVICE_VARIANT := 16M + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 +endef +TARGET_DEVICES += unielec_u7621-01-16m + define Device/unielec_u7621-06-16m $(Device/dsa-migration) $(Device/uimage-lzma-loader) From 3f4d1dad0009d3fdd50aecb78c6d896ab58b83c7 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 5 Feb 2021 18:18:00 +0100 Subject: [PATCH 14/22] ramips: replace full-text licenses by SPDX identifier This replaces several full-text and abbreviated licenses found in DTS files by the corresponding SPDX identifiers. This should make it easier to identify the license both by humans and machines. Signed-off-by: Adrian Schmutzler --- .../dts/mt7620a_alfa-network_ac1200rm.dts | 28 +----------------- .../dts/mt7620a_edimax_br-6478ac-v2.dts | 8 +---- target/linux/ramips/dts/mt7620a_hnet_c108.dts | 29 +------------------ .../ramips/dts/mt7620a_linksys_e1700.dts | 7 +---- .../ramips/dts/mt7620a_netgear_ex2700.dts | 7 +---- .../ramips/dts/mt7620a_sanlinking_d240.dts | 29 +------------------ .../dts/mt7621_unielec_u7621-06-16m.dts | 29 +------------------ .../dts/mt7621_unielec_u7621-06-64m.dts | 29 +------------------ .../ramips/dts/mt7621_unielec_u7621-06.dtsi | 29 +------------------ .../dts/mt7628an_alfa-network_awusfree1.dts | 28 +----------------- .../dts/mt7628an_unielec_u7628-01-16m.dts | 29 +------------------ .../ramips/dts/mt7628an_unielec_u7628-01.dtsi | 29 +------------------ 12 files changed, 12 insertions(+), 269 deletions(-) diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts index fe666e482a..27b6896cec 100644 --- a/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts +++ b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts @@ -1,33 +1,7 @@ +// SPDX-License-Identifier: BSD-3-Clause /* - * BSD LICENSE - * * Copyright (C) 2018 Piotr Dymacz * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the names of the copyright holders nor the names of any - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "mt7620a.dtsi" diff --git a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts index 773db22c74..e7af34aa8e 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts +++ b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts @@ -1,14 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* - * Device Tree file for the Edimax BR-6478AC V2 - * based on Linksys E1700 - * * Copyright (C) 2016 Rohan Murch * Copyright (C) 2016 Hans Ulli Kroll * Copyright (C) 2017 James McKenzie - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. */ #include "mt7620a.dtsi" diff --git a/target/linux/ramips/dts/mt7620a_hnet_c108.dts b/target/linux/ramips/dts/mt7620a_hnet_c108.dts index d9c5c24287..4035139ed1 100644 --- a/target/linux/ramips/dts/mt7620a_hnet_c108.dts +++ b/target/linux/ramips/dts/mt7620a_hnet_c108.dts @@ -1,34 +1,7 @@ +// SPDX-License-Identifier: BSD-3-Clause /* - * BSD LICENSE - * * Copyright(c) 2017 Kristian Evensen . * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Broadcom Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "mt7620a.dtsi" diff --git a/target/linux/ramips/dts/mt7620a_linksys_e1700.dts b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts index 01197aafd2..2619a4653a 100644 --- a/target/linux/ramips/dts/mt7620a_linksys_e1700.dts +++ b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts @@ -1,11 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* - * Device Tree file for the Linksys E1700 - * * Copyright (C) 2014 Imre Kaloz - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. */ #include "mt7620a.dtsi" diff --git a/target/linux/ramips/dts/mt7620a_netgear_ex2700.dts b/target/linux/ramips/dts/mt7620a_netgear_ex2700.dts index ec310dee22..9ed0883b45 100644 --- a/target/linux/ramips/dts/mt7620a_netgear_ex2700.dts +++ b/target/linux/ramips/dts/mt7620a_netgear_ex2700.dts @@ -1,11 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* - * Device Tree file for the Netgear EX2700 - * * Copyright (C) 2016 Joseph C. Lehner - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. */ #include "mt7620a_netgear_ex2700_wn3000rp-v3.dtsi" diff --git a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts index 8003ac9dc2..6cff557fcd 100644 --- a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts +++ b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts @@ -1,34 +1,7 @@ +// SPDX-License-Identifier: BSD-3-Clause /* - * BSD LICENSE - * * Copyright(c) 2017 Kristian Evensen . * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Broadcom Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "mt7620a.dtsi" diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts index b1600b8c9f..e9789cff5d 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts @@ -1,35 +1,8 @@ +// SPDX-License-Identifier: BSD-3-Clause /* - * BSD LICENSE - * * Copyright(c) 2017 Kristian Evensen . * Copyright(c) 2017 Piotr Dymacz . * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Broadcom Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "mt7621_unielec_u7621-06.dtsi" diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts index c4d1975883..74e4d6625b 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts @@ -1,36 +1,9 @@ +// SPDX-License-Identifier: BSD-3-Clause /* - * BSD LICENSE - * * Copyright(c) 2017 Kristian Evensen . * Copyright(c) 2017 Piotr Dymacz . * Copyright(c) 2018 Nishant Sharma . * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Broadcom Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "mt7621_unielec_u7621-06.dtsi" diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi index e9c4767b79..3b149df85a 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi @@ -1,35 +1,8 @@ +// SPDX-License-Identifier: BSD-3-Clause /* - * BSD LICENSE - * * Copyright(c) 2017 Kristian Evensen . * Copyright(c) 2017 Piotr Dymacz . * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Broadcom Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "mt7621.dtsi" diff --git a/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts index 13e22e01cd..d4f6a093d4 100644 --- a/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts +++ b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts @@ -1,33 +1,7 @@ +// SPDX-License-Identifier: BSD-3-Clause /* - * BSD LICENSE - * * Copyright (C) 2018 Piotr Dymacz * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the names of the copyright holders nor the names of any - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "mt7628an.dtsi" diff --git a/target/linux/ramips/dts/mt7628an_unielec_u7628-01-16m.dts b/target/linux/ramips/dts/mt7628an_unielec_u7628-01-16m.dts index 7044efc86f..c25a31f0ab 100644 --- a/target/linux/ramips/dts/mt7628an_unielec_u7628-01-16m.dts +++ b/target/linux/ramips/dts/mt7628an_unielec_u7628-01-16m.dts @@ -1,35 +1,8 @@ +// SPDX-License-Identifier: BSD-3-Clause /* - * BSD LICENSE - * * Copyright(c) 2017 Kristian Evensen . * Copyright(c) 2017 Piotr Dymacz . * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Broadcom Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "mt7628an_unielec_u7628-01.dtsi" diff --git a/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi b/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi index 4facb036fd..f0a6b1df5d 100644 --- a/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi +++ b/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi @@ -1,35 +1,8 @@ +// SPDX-License-Identifier: BSD-3-Clause /* - * BSD LICENSE - * * Copyright(c) 2017 Kristian Evensen . * Copyright(c) 2017 Piotr Dymacz . * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Broadcom Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "mt7628an.dtsi" From 04a0e5c082a802427ef045dd211e5b023a06abec Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 5 Feb 2021 18:28:30 +0100 Subject: [PATCH 15/22] ipq806x: replace full-text BSC license by SPDX identifier This replaces a full-text BSD clause by the corresponding SPDX identifier. This should make it easier to identify the license both by humans and machines. Signed-off-by: Adrian Schmutzler --- .../arch/arm/boot/dts/qcom-ipq8064-wpq864.dts | 28 +------------------ 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts index 739b7261a3..ba3f51e446 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts @@ -1,34 +1,8 @@ +// SPDX-License-Identifier: BSD-3-Clause /* - * BSD LICENSE - * * Copyright (C) 2017 Christian Mehlis * Copyright (C) 2018 Mathias Kresin * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the names of the copyright holders nor the names of any - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "qcom-ipq8064-v1.0.dtsi" From c9619fe6a5705ea261fe5bc785b7f646fee5afce Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Tue, 3 Nov 2020 21:29:21 +0100 Subject: [PATCH 16/22] lantiq: change phy-mode to mii for FRITZ!Box 7412 FRITZ!Box 7412 loads the firmware for fast ethernet PHY and mii is more accurate in this case. Gmii is used by Gigabit ethernet PHYs. Signed-off-by: Aleksander Jan Bajkowski Reviewed-by: Mathias Kresin [minor commit title/message adjustments] Signed-off-by: Adrian Schmutzler --- .../files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts index 2ee0cfd13c..3b1703dd3c 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts @@ -195,7 +195,7 @@ ethernet@2 { compatible = "lantiq,xrx200-pdi-port"; reg = <2>; - phy-mode = "gmii"; + phy-mode = "mii"; phy-handle = <&phy11>; }; }; From 321035420cb7c5bb5fd53879824d2886a6f288e8 Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Fri, 25 Dec 2020 20:16:41 +0900 Subject: [PATCH 17/22] kirkwood: refresh kernel config Refresh config with make kernel_oldconfig. Signed-off-by: Sungbo Eo --- target/linux/kirkwood/config-5.4 | 65 +------------------------------- 1 file changed, 2 insertions(+), 63 deletions(-) diff --git a/target/linux/kirkwood/config-5.4 b/target/linux/kirkwood/config-5.4 index dcf6a1e327..2ef4c05074 100644 --- a/target/linux/kirkwood/config-5.4 +++ b/target/linux/kirkwood/config-5.4 @@ -1,22 +1,6 @@ CONFIG_ALIGNMENT_TRAP=y CONFIG_ARCH_32BIT_OFF_T=y CONFIG_ARCH_CLOCKSOURCE_DATA=y -CONFIG_ARCH_HAS_BINFMT_FLAT=y -CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y -CONFIG_ARCH_HAS_DMA_WRITE_COMBINE=y -CONFIG_ARCH_HAS_ELF_RANDOMIZE=y -CONFIG_ARCH_HAS_FORTIFY_SOURCE=y -CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y -CONFIG_ARCH_HAS_KCOV=y -CONFIG_ARCH_HAS_KEEPINITRD=y -CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y -CONFIG_ARCH_HAS_PHYS_TO_DMA=y -CONFIG_ARCH_HAS_SETUP_DMA_OPS=y -CONFIG_ARCH_HAS_SET_MEMORY=y -CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y -CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y -CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_KEEP_MEMBLOCK=y CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y @@ -29,16 +13,7 @@ CONFIG_ARCH_MULTI_V5=y CONFIG_ARCH_MVEBU=y CONFIG_ARCH_NR_GPIO=0 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y -CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARCH_USE_BUILTIN_BSWAP=y -CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y -CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y -CONFIG_ARCH_WANT_GENERAL_HUGETLB=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_ARCH_WANT_LIBATA_LEDS=y CONFIG_ARM=y # CONFIG_ARMADA_37XX_WATCHDOG is not set # CONFIG_ARMADA_THERMAL is not set @@ -62,7 +37,6 @@ CONFIG_BLK_MQ_PCI=y CONFIG_BLK_SCSI_REQUEST=y CONFIG_CACHE_FEROCEON_L2=y # CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set -CONFIG_CC_HAS_KASAN_GENERIC=y CONFIG_CLKDEV_LOOKUP=y CONFIG_CLKSRC_MMIO=y CONFIG_CLONE_BACKWARDS=y @@ -133,12 +107,14 @@ CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_IRQ_SHOW_LEVEL=y CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_PHY=y +CONFIG_GENERIC_PINCONF=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GLOB=y CONFIG_GPIOLIB=y +CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_MVEBU=y CONFIG_GRO_CELLS=y CONFIG_HANDLE_DOMAIN_IRQ=y @@ -146,43 +122,6 @@ CONFIG_HARDIRQS_SW_RESEND=y CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y -CONFIG_HAVE_ARCH_AUDITSYSCALL=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_CLK=y -CONFIG_HAVE_CLK_PREPARE=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_COPY_THREAD_TLS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_HAVE_DEBUG_KMEMLEAK=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y -CONFIG_HAVE_EBPF_JIT=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_IDE=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION=y -CONFIG_HAVE_MOD_ARCH_SPECIFIC=y -CONFIG_HAVE_NET_DSA=y -CONFIG_HAVE_OPROFILE=y -CONFIG_HAVE_OPTPROBES=y -CONFIG_HAVE_PCI=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_HAVE_PERF_REGS=y -CONFIG_HAVE_PERF_USER_STACK_DUMP=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_RSEQ=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_UID16=y -CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_OMAP=y CONFIG_HZ=100 From d468ff97b71994d5f30751fdd22c530c85a52f42 Mon Sep 17 00:00:00 2001 From: Yanase Yuki Date: Thu, 5 Nov 2020 19:59:06 +0900 Subject: [PATCH 18/22] build: move elx-header into image-commands.mk ELECOM WAB-I1750-PS will need this in ath79, so move it to common Makefile. Signed-off-by: Yanase Yuki --- include/image-commands.mk | 20 ++++++++++++++++++++ target/linux/ramips/image/Makefile | 20 -------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index 07a96920ae..c3f8b4b95a 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -167,6 +167,26 @@ define Build/elecom-product-header mv $(fw).new $(fw) endef +define Build/elx-header + $(eval hw_id=$(word 1,$(1))) + $(eval xor_pattern=$(word 2,$(1))) + ( \ + echo -ne "\x00\x00\x00\x00\x00\x00\x00\x03" | \ + dd bs=42 count=1 conv=sync; \ + hw_id="$(hw_id)"; \ + echo -ne "\x$${hw_id:0:2}\x$${hw_id:2:2}\x$${hw_id:4:2}\x$${hw_id:6:2}" | \ + dd bs=20 count=1 conv=sync; \ + echo -ne "$$(printf '%08x' $$(stat -c%s $@) | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \ + dd bs=8 count=1 conv=sync; \ + echo -ne "$$($(STAGING_DIR_HOST)/bin/mkhash md5 $@ | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \ + dd bs=58 count=1 conv=sync; \ + ) > $(KDIR)/tmp/$(DEVICE_NAME).header + $(call Build/xor-image,-p $(xor_pattern) -x) + cat $(KDIR)/tmp/$(DEVICE_NAME).header $@ > $@.new + mv $@.new $@ + rm -rf $(KDIR)/tmp/$(DEVICE_NAME).header +endef + define Build/eva-image $(STAGING_DIR_HOST)/bin/lzma2eva $(KERNEL_LOADADDR) $(KERNEL_LOADADDR) $@ $@.new mv $@.new $@ diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 2fb13dcf08..21bd135a62 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -35,26 +35,6 @@ define Build/edimax-header @mv $@.new $@ endef -define Build/elx-header - $(eval hw_id=$(word 1,$(1))) - $(eval xor_pattern=$(word 2,$(1))) - ( \ - echo -ne "\x00\x00\x00\x00\x00\x00\x00\x03" | \ - dd bs=42 count=1 conv=sync; \ - hw_id="$(hw_id)"; \ - echo -ne "\x$${hw_id:0:2}\x$${hw_id:2:2}\x$${hw_id:4:2}\x$${hw_id:6:2}" | \ - dd bs=20 count=1 conv=sync; \ - echo -ne "$$(printf '%08x' $$(stat -c%s $@) | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \ - dd bs=8 count=1 conv=sync; \ - echo -ne "$$($(STAGING_DIR_HOST)/bin/mkhash md5 $@ | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \ - dd bs=58 count=1 conv=sync; \ - ) > $(KDIR)/tmp/$(DEVICE_NAME).header - $(call Build/xor-image,-p $(xor_pattern) -x) - cat $(KDIR)/tmp/$(DEVICE_NAME).header $@ > $@.new - mv $@.new $@ - rm -rf $(KDIR)/tmp/$(DEVICE_NAME).header -endef - define Build/jcg-header $(STAGING_DIR_HOST)/bin/jcgimage -v $(1) \ $(if $(JCG_MAXSIZE), -m $$(($(subst k, * 1024,$(JCG_MAXSIZE)))),) \ From 8a79161a8226ffad4333c7dcb27e70ae7269ca04 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 5 Feb 2021 20:53:26 +0100 Subject: [PATCH 19/22] ath79: wrap ucidef_add_switch in 02_network Wrap line to be consistent with all other definitions. Signed-off-by: Adrian Schmutzler --- target/linux/ath79/generic/base-files/etc/board.d/02_network | 3 ++- 1 file changed, 2 insertions(+), 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 cb675cab1a..135c5ad327 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 @@ -200,7 +200,8 @@ ath79_setup_interfaces() "0@eth0" "2:wan" "3:lan" "4:lan" ;; dlink,dap-2695-a1) - ucidef_add_switch "switch0" "0@eth0" "2:lan" "3:wan" "6@eth1" + ucidef_add_switch "switch0" \ + "0@eth0" "2:lan" "3:wan" "6@eth1" ;; dlink,dch-g020-a1) ucidef_add_switch "switch0" \ From 8d4afab0abc3fc0ea8a240077a5b8dddecbfd6eb Mon Sep 17 00:00:00 2001 From: Alexey Kunitskiy Date: Sun, 13 Dec 2020 18:48:58 +0200 Subject: [PATCH 20/22] tplink-safeloader: add support for TP-Link Archer A7 v5 (RU) Although provided in separate zip archives, the firmwares for EU and RU version are byte-identical. This adds the missing ID compared to the support-list in the vendor firmware. Note (since I checked it anyway): Partitions and support list are unchanged for all three existing firmware versions: * 20200721-rel40773 * 20201029-rel43238 * 20201120-rel50399 Signed-off-by: Alexey Kunitskiy [rewrite commit message] Signed-off-by: Adrian Schmutzler --- tools/firmware-utils/src/tplink-safeloader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 785ff39642..b9dfad51a6 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -769,7 +769,8 @@ static struct device_info boards[] = { "{product_name:Archer A7,product_ver:5.0.0,special_id:55530000}\n" "{product_name:Archer A7,product_ver:5.0.0,special_id:43410000}\n" "{product_name:Archer A7,product_ver:5.0.0,special_id:4A500000}\n" - "{product_name:Archer A7,product_ver:5.0.0,special_id:54570000}\n", + "{product_name:Archer A7,product_ver:5.0.0,special_id:54570000}\n" + "{product_name:Archer A7,product_ver:5.0.0,special_id:52550000}\n", .part_trail = 0x00, .soft_ver = "soft_ver:1.0.0\n", From 450ec48d61254e241ecfaa7d0cf9dec40473469d Mon Sep 17 00:00:00 2001 From: Thomas Beckler Date: Sat, 30 May 2020 23:40:03 +0200 Subject: [PATCH 21/22] kirkwood: use 3 temperature sensors for Zyxel NSA310B Instead of taking the input of one temperature sensor (temp1), the script takes into account three temperature sensors to control the PWM of the cooling fan. temp1 -> placed on main board temp2 -> placed on main board temp3 -> placed on or close to chipset All three temperatures give valid input for the PWM of the fan on NSA310 and are actually changing. Tested on two NSA310. Signed-off-by: Thomas Beckler Reviewed-by: Alberto Bursi [commit title/message facelift, code cleanup] Signed-off-by: Adrian Schmutzler --- .../base-files/etc/init.d/hwmon_fancontrol | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol b/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol index c64ed1100c..334a2a08ef 100755 --- a/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol +++ b/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol @@ -27,10 +27,22 @@ boot() { ;; zyxel,nsa310b) path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0' - echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1 - echo 1 > "$path_to_hwmon/pwm1_auto_channels" # temp1 is the only one that changes - echo 23000 > "$path_to_hwmon/temp1_auto_temp_min" - echo 43000 > "$path_to_hwmon/temp1_auto_temp_max" # next step is 49600 millicelsius, or 50 celsius, 43 celsius is better + # use the max. value of (temp1) OR (temp2) OR (temp3) as an input + # for the PWM of the cooling fan + echo 123 > "$path_to_hwmon/pwm1_auto_channels" + # Temperature sensor #1 placed on mainboard + echo 30000 > "$path_to_hwmon/temp1_auto_temp_min" + echo 49600 > "$path_to_hwmon/temp1_auto_temp_max" + # Temperature sensor #2 placed on mainboard + # range: 0 to 127000 in steps of 1000 [millicelsius] + echo 30000 > "$path_to_hwmon/temp2_auto_temp_min" + # range: 0 to 127000 in steps of ???? [millicelsius] + echo 49600 > "$path_to_hwmon/temp2_auto_temp_max" + # Temperature sensor #3 placed close to a chipset + # range: 0 to 60000 in steps of 1000 [millicelsius] + echo 23000 > "$path_to_hwmon/temp3_auto_temp_min" + # pre-defined steps: 103000, 122000, 143300, 170000 in [millicelsius] + echo 103000 > "$path_to_hwmon/temp3_auto_temp_max" ;; esac } From 8286f3a3d3a7d65d36ee312c6fd3828d4e4fd048 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sat, 30 Jan 2021 10:54:44 -1000 Subject: [PATCH 22/22] treewide: unify OpenWrt hosted source via @OPENWRT Multiple sources are hosted on OpenWrts source server only. The source URLs to point to the server vary based on different epochs in OpenWrts history. Replace all by @OPENWRT which is an "empty" mirror, therefore using the fallback servers sources.cdn.openwrt.org and sources.openwrt.org. Signed-off-by: Paul Spooren --- include/download.mk | 2 +- package/boot/fconfig/Makefile | 2 +- package/firmware/b43legacy-firmware/Makefile | 2 +- package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile | 2 +- package/kernel/broadcom-wl/Makefile | 2 +- package/kernel/lantiq/ltq-adsl/Makefile | 2 +- package/kernel/lantiq/ltq-tapi/Makefile | 2 +- package/kernel/lantiq/ltq-vdsl-mei/Makefile | 2 +- package/kernel/lantiq/ltq-vdsl/Makefile | 2 +- package/kernel/lantiq/ltq-vmmc/Makefile | 2 +- package/kernel/mac80211/broadcom.mk | 6 +++--- package/network/config/ltq-adsl-app/Makefile | 2 +- package/network/config/ltq-vdsl-app/Makefile | 2 +- scripts/download.pl | 2 ++ tools/lzma-old/Makefile | 2 +- tools/lzma/Makefile | 2 +- 16 files changed, 19 insertions(+), 17 deletions(-) diff --git a/include/download.mk b/include/download.mk index a638e69382..c69d84939c 100644 --- a/include/download.mk +++ b/include/download.mk @@ -27,7 +27,7 @@ define dl_method $(strip \ $(if $(filter git,$(2)),$(call dl_method_git,$(1),$(2)), $(if $(2),$(2), \ - $(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ + $(if $(filter @OPENWRT @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ $(if $(filter git://%,$(1)),$(call dl_method_git,$(1),$(2)), \ $(if $(filter svn://%,$(1)),svn, \ $(if $(filter cvs://%,$(1)),cvs, \ diff --git a/package/boot/fconfig/Makefile b/package/boot/fconfig/Makefile index 9b806fe97c..5784477bf4 100644 --- a/package/boot/fconfig/Makefile +++ b/package/boot/fconfig/Makefile @@ -12,7 +12,7 @@ PKG_VERSION:=20080329 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://downloads.openwrt.org/sources +PKG_SOURCE_URL:=@OPENWRT PKG_HASH:=4ff0e8f07e35e46b705c0dbe9d9544ede01ea092a69e3f7db03e55a3f2bb8eb7 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/package/firmware/b43legacy-firmware/Makefile b/package/firmware/b43legacy-firmware/Makefile index 9b9c0070b2..ecbfc32293 100644 --- a/package/firmware/b43legacy-firmware/Makefile +++ b/package/firmware/b43legacy-firmware/Makefile @@ -12,7 +12,7 @@ PKG_VERSION:=3.130.20.0 PKG_RELEASE:=1 PKG_SOURCE:=wl_apsta-$(PKG_VERSION).o -PKG_SOURCE_URL:=https://downloads.openwrt.org/sources +PKG_SOURCE_URL:=@OPENWRT PKG_HASH:=7dba610b1d96dd14e901bcbce14cd6ecd1b1ac6f5c0035b0d6b6dc46a7c3ef90 include $(INCLUDE_DIR)/package.mk diff --git a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile index a076fe2596..649325601c 100644 --- a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile +++ b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile @@ -10,7 +10,7 @@ PKG_NAME:=dsl_vr9_firmware_xdsl PKG_VERSION:=05.08.01.08.01.06_05.08.00.0B.01.01_osc PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources +PKG_SOURCE_URL:=@OPENWRT PKG_HASH:=44cd94130571fe42dfa8f0f9d44597d104e9e77962617fe38646b7a0b4184a2b PKG_BUILD_DEPENDS:=bsdiff/host diff --git a/package/kernel/broadcom-wl/Makefile b/package/kernel/broadcom-wl/Makefile index 661c7f0589..7188c4900e 100644 --- a/package/kernel/broadcom-wl/Makefile +++ b/package/kernel/broadcom-wl/Makefile @@ -13,7 +13,7 @@ PKG_VERSION:=5.10.56.27.3 PKG_RELEASE:=10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(ARCH).tar.bz2 -PKG_SOURCE_URL:=https://downloads.openwrt.org/sources +PKG_SOURCE_URL:=@OPENWRT ifeq ($(ARCH),mipsel) PKG_HASH:=26a8c370f48fc129d0731cfd751c36cae1419b0bc8ca35781126744e60eae009 diff --git a/package/kernel/lantiq/ltq-adsl/Makefile b/package/kernel/lantiq/ltq-adsl/Makefile index 1a9128fc58..b2e1ccb640 100644 --- a/package/kernel/lantiq/ltq-adsl/Makefile +++ b/package/kernel/lantiq/ltq-adsl/Makefile @@ -13,7 +13,7 @@ PKG_VERSION:=3.24.4.4 PKG_RELEASE:=3 PKG_SOURCE:=drv_dsl_cpe_api_danube-$(PKG_VERSION).tar.gz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-dsl-$(BUILD_VARIANT)/drv_dsl_cpe_api-$(PKG_VERSION) -PKG_SOURCE_URL:=https://mirror2.openwrt.org/sources/ +PKG_SOURCE_URL:=@OPENWRT PKG_HASH:=eb2ed59715d3bf4e8a1460bbbe2f1660039e0a9f9d72afb1b2b16590094eb33c PKG_MAINTAINER:=John Crispin diff --git a/package/kernel/lantiq/ltq-tapi/Makefile b/package/kernel/lantiq/ltq-tapi/Makefile index 072041c589..a04f7d38e5 100644 --- a/package/kernel/lantiq/ltq-tapi/Makefile +++ b/package/kernel/lantiq/ltq-tapi/Makefile @@ -13,7 +13,7 @@ PKG_VERSION:=3.13.0 PKG_RELEASE:=4 PKG_SOURCE:=drv_tapi-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources +PKG_SOURCE_URL:=@OPENWRT PKG_HASH:=109374d52872716570fca3fef3b93c9a93159a804dfd42484b19152b825af5c0 PKG_MAINTAINER:=John Crispin diff --git a/package/kernel/lantiq/ltq-vdsl-mei/Makefile b/package/kernel/lantiq/ltq-vdsl-mei/Makefile index 5d15f2650b..4a305d9c27 100644 --- a/package/kernel/lantiq/ltq-vdsl-mei/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-mei/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=4 PKG_BASE_NAME:=drv_mei_cpe PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_BASE_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources +PKG_SOURCE_URL:=@OPENWRT PKG_HASH:=94f6904364348b7f74087e721968abc28b2564fb9bd8899aa930d36490387662 PKG_FIXUP:=autoreconf PKG_FLAGS:=nonshared diff --git a/package/kernel/lantiq/ltq-vdsl/Makefile b/package/kernel/lantiq/ltq-vdsl/Makefile index d518bd647d..c09c88057f 100644 --- a/package/kernel/lantiq/ltq-vdsl/Makefile +++ b/package/kernel/lantiq/ltq-vdsl/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=3 PKG_BASE_NAME:=drv_dsl_cpe_api PKG_SOURCE:=$(PKG_BASE_NAME)_vrx-$(PKG_VERSION).tar.gz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_BASE_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources +PKG_SOURCE_URL:=@OPENWRT PKG_HASH:=b4966a60653acc49254b168c6cc9c49eb36c54548e763617788aa4f252a29f21 PKG_LICENSE:=GPL-2.0 BSD-2-Clause PKG_LICENSE_FILES:=LICENSE diff --git a/package/kernel/lantiq/ltq-vmmc/Makefile b/package/kernel/lantiq/ltq-vmmc/Makefile index 586d9f6c75..c733345cfa 100644 --- a/package/kernel/lantiq/ltq-vmmc/Makefile +++ b/package/kernel/lantiq/ltq-vmmc/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_HASH:=707f515eb727c032418c4da67d7e86884bb56cdc2a606e8f6ded6057d8767e57 -PKG_SOURCE_URL:=https://mirror2.openwrt.org/sources +PKG_SOURCE_URL:=@OPENWRT PKG_MAINTAINER:=John Crispin PKG_CHECK_FORMAT_SECURITY:=0 diff --git a/package/kernel/mac80211/broadcom.mk b/package/kernel/mac80211/broadcom.mk index fb8071e747..fb576c5809 100644 --- a/package/kernel/mac80211/broadcom.mk +++ b/package/kernel/mac80211/broadcom.mk @@ -51,7 +51,7 @@ ifneq ($(CONFIG_B43_FW_5_10),) PKG_B43_FWV4_VERSION:=5.10.56.27.3 PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/driver/wl_apsta/wl_prebuilt.o PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)_mipsel.tar.bz2 - PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/ + PKG_B43_FWV4_SOURCE_URL:=@OPENWRT PKG_B43_FWV4_HASH:=26a8c370f48fc129d0731cfd751c36cae1419b0bc8ca35781126744e60eae009 else ifneq ($(CONFIG_B43_FW_4_178),) @@ -59,7 +59,7 @@ ifneq ($(CONFIG_B43_FW_4_178),) PKG_B43_FWV4_VERSION:=4.178.10.4 PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/linux/wl_apsta.o PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2 - PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/ + PKG_B43_FWV4_SOURCE_URL:=@OPENWRT PKG_B43_FWV4_HASH:=32f6ad98facbb9045646fdc8b54bb03086d204153253f9c65d0234a5d90ae53f else ifneq ($(CONFIG_B43_FW_5_100_138),) @@ -74,7 +74,7 @@ else PKG_B43_FWV4_VERSION:=4.150.10.5 PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/driver/wl_apsta_mimo.o PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2 - PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/ + PKG_B43_FWV4_SOURCE_URL:=@OPENWRT PKG_B43_FWV4_HASH:=a9f4e276a4d8d3a1cd0f2eb87080ae89b77f0a7140f06d4e9e2135fc44fdd533 endif endif diff --git a/package/network/config/ltq-adsl-app/Makefile b/package/network/config/ltq-adsl-app/Makefile index cfd66d0ee4..38d2ef06a5 100644 --- a/package/network/config/ltq-adsl-app/Makefile +++ b/package/network/config/ltq-adsl-app/Makefile @@ -13,7 +13,7 @@ PKG_VERSION:=3.24.4.4 PKG_RELEASE:=9 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_BUILD_DIR:=$(BUILD_DIR)/dsl_cpe_control-$(PKG_VERSION) -PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/ +PKG_SOURCE_URL:=@OPENWRT PKG_HASH:=af0bdf45cc7a62e2b38d39aad4924dd83c24fae170ae5bbd8190c2a3d9106257 PKG_MAINTAINER:=John Crispin PKG_LICENSE:=BSD-3-Clause diff --git a/package/network/config/ltq-vdsl-app/Makefile b/package/network/config/ltq-vdsl-app/Makefile index 5e2db1d5c6..2d300fbb27 100644 --- a/package/network/config/ltq-vdsl-app/Makefile +++ b/package/network/config/ltq-vdsl-app/Makefile @@ -12,7 +12,7 @@ PKG_VERSION:=4.17.18.6 PKG_RELEASE:=5 PKG_BASE_NAME:=dsl_cpe_control PKG_SOURCE:=$(PKG_BASE_NAME)_vrx-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources +PKG_SOURCE_URL:=@OPENWRT PKG_HASH:=da8bb929526a61aea0e153ef524331fcd472a1ebbc6d88ca017735a4f82ece02 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_BASE_NAME)-$(PKG_VERSION) PKG_LICENSE:=BSD-2-Clause diff --git a/scripts/download.pl b/scripts/download.pl index 61af0a0429..e13405033f 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -194,6 +194,8 @@ foreach my $mirror (@ARGV) { for (1 .. 5) { push @mirrors, "https://downloads.sourceforge.net/$1"; } + } elsif ($mirror =~ /^\@OPENWRT$/) { + # use OpenWrt source server directly } elsif ($mirror =~ /^\@APACHE\/(.+)$/) { push @mirrors, "https://mirror.netcologne.de/apache.org/$1"; push @mirrors, "https://mirror.aarnet.edu.au/pub/apache/$1"; diff --git a/tools/lzma-old/Makefile b/tools/lzma-old/Makefile index 4ccd336ed0..21e7428c07 100644 --- a/tools/lzma-old/Makefile +++ b/tools/lzma-old/Makefile @@ -10,7 +10,7 @@ PKG_NAME:=lzma-old PKG_VERSION:=4.32 PKG_SOURCE:=lzma-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://downloads.openwrt.org/sources +PKG_SOURCE_URL:=@OPENWRT PKG_HASH:=49053e4bb5e0646a841d250d9cb81f7714f5fff04a133216c4748163567acc3d HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/lzma-$(PKG_VERSION) diff --git a/tools/lzma/Makefile b/tools/lzma/Makefile index 04c427a3a9..b87289e385 100644 --- a/tools/lzma/Makefile +++ b/tools/lzma/Makefile @@ -10,7 +10,7 @@ PKG_NAME:=lzma PKG_VERSION:=4.65 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://downloads.openwrt.org/sources +PKG_SOURCE_URL:=@OPENWRT PKG_HASH:=dcbdb5f4843eff638e4a5e8be0e2486a3c5483df73c70823618db8e66f609ec2 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)