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 1e43048ab7..c07104f0f4 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 d407981b70..cde81490e4 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 3350558adb..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" @@ -1176,6 +1174,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" 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..c69d84939c 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 @@ -30,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/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-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/include/image.mk b/include/image.mk index 54f498d3f0..12654931cd 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 dd3c1bfbf0..5861b03670 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -1,14 +1,14 @@ -# 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 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/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 75724968b0..ac05c6fd8c 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 378833a1fc..be7d8644ed 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/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 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/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 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)) 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/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 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 d951390ada..0e2db6a749 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/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index cbbe6c1009..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:=28 +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 + 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 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 diff --git a/scripts/download.pl b/scripts/download.pl index 4ad905ad27..f88d76dfb6 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://mirrors.cloud.tencent.com/apache/$1"; push @mirrors, "https://mirrors.aliyun.com/apache/$1"; 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 9b85270913..135a91bc92 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 1a8d021a68..cf759d591b 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" \ @@ -266,6 +267,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 9805655eab..b1c30e8c6e 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1336,6 +1336,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 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; 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" 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 } 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 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>; }; }; 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-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/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_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/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" 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)))),) \ diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 3e4cf1c53a..37d96b5290 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1161,6 +1161,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) 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) 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", 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)