Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
f58bf546eb
@ -76,6 +76,7 @@ menuconfig DEVEL
|
||||
|
||||
config KERNEL_CFLAGS
|
||||
string "Kernel extra CFLAGS" if DEVEL
|
||||
default "-falign-functions=32" if TARGET_bcm53xx
|
||||
default ""
|
||||
|
||||
config EXTERNAL_KERNEL_TREE
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.15 = .49
|
||||
LINUX_KERNEL_HASH-5.15.49 = 32497893ba47f4ad32a59fa4254e8c25e41bc821798e3b2f2443822fa00059dc
|
||||
LINUX_VERSION-5.15 = .50
|
||||
LINUX_KERNEL_HASH-5.15.50 = 554d507d37a23810fe8c83912761e4a4f73c40794bc685ff7ca98042fe1bd70f
|
||||
|
||||
@ -18,6 +18,6 @@ define FixupLibdir
|
||||
mkdir -p $(1)/lib; \
|
||||
mv $(1)/lib64/* $(1)/lib/; \
|
||||
rm -rf $(1)/lib64; \
|
||||
ln -sf lib $(1)/lib64; \
|
||||
fi
|
||||
ln -sf lib $(1)/lib64
|
||||
endef
|
||||
|
||||
@ -31,6 +31,9 @@ ampedwireless,ally-00x19k|\
|
||||
ampedwireless,ally-r1900k)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
|
||||
;;
|
||||
beeline,smartbox-giga)
|
||||
ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000"
|
||||
;;
|
||||
buffalo,wsr-1166dhp|\
|
||||
buffalo,wsr-600dhp|\
|
||||
mediatek,linkit-smart-7688|\
|
||||
|
||||
@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=strace
|
||||
PKG_VERSION:=5.16
|
||||
PKG_VERSION:=5.18
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION)
|
||||
PKG_HASH:=dc7db230ff3e57c249830ba94acab2b862da1fcaac55417e9b85041a833ca285
|
||||
PKG_HASH:=60293ea79ac9253d600cdc9be077ad2988ca22284a439c9e66be5150db3d1187
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=LGPL-2.1-or-later
|
||||
|
||||
@ -373,7 +373,7 @@ define KernelPackage/switch-rtl8366rb
|
||||
DEPENDS:=+kmod-switch-rtl8366-smi
|
||||
KCONFIG:=CONFIG_RTL8366RB_PHY
|
||||
FILES:=$(LINUX_DIR)/drivers/net/phy/rtl8366rb.ko
|
||||
AUTOLOAD:=$(call AutoLoad,43,rtl8366rb)
|
||||
AUTOLOAD:=$(call AutoLoad,43,rtl8366rb,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/switch-rtl8366rb/description
|
||||
@ -389,7 +389,7 @@ define KernelPackage/switch-rtl8366s
|
||||
DEPENDS:=+kmod-switch-rtl8366-smi
|
||||
KCONFIG:=CONFIG_RTL8366S_PHY
|
||||
FILES:=$(LINUX_DIR)/drivers/net/phy/rtl8366s.ko
|
||||
AUTOLOAD:=$(call AutoLoad,43,rtl8366s)
|
||||
AUTOLOAD:=$(call AutoLoad,43,rtl8366s,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/switch-rtl8366s/description
|
||||
@ -399,6 +399,22 @@ endef
|
||||
$(eval $(call KernelPackage,switch-rtl8366s))
|
||||
|
||||
|
||||
define KernelPackage/switch-rtl8367
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Realtek RTL8367 switch support
|
||||
DEPENDS:=+kmod-switch-rtl8366-smi
|
||||
KCONFIG:=CONFIG_RTL8367_PHY
|
||||
FILES:=$(LINUX_DIR)/drivers/net/phy/rtl8367.ko
|
||||
AUTOLOAD:=$(call AutoLoad,43,rtl8367,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/switch-rtl8367/description
|
||||
Realtek RTL8367 switch support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,switch-rtl8367))
|
||||
|
||||
|
||||
define KernelPackage/switch-rtl8367b
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Realtek RTL8367R/B switch support
|
||||
|
||||
@ -252,7 +252,7 @@ endef
|
||||
define KernelPackage/mac80211-hwsim
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=mac80211 HW simulation device
|
||||
DEPENDS+= +kmod-mac80211 +@DRIVER_11AC_SUPPORT +@DRIVER_11N_SUPPORT
|
||||
DEPENDS+= +kmod-mac80211 +@DRIVER_11AX_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11N_SUPPORT
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mac80211_hwsim)
|
||||
endef
|
||||
|
||||
@ -15,7 +15,7 @@ config-$(call config_package,ipw2200) += IPW2200
|
||||
|
||||
define KernelPackage/iwlwifi
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
DEPENDS:= +kmod-mac80211 @PCI_SUPPORT +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT
|
||||
DEPENDS:= +kmod-mac80211 @PCI_SUPPORT +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11AX_SUPPORT
|
||||
TITLE:=Intel AGN Wireless support
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko \
|
||||
|
||||
@ -0,0 +1,28 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sat, 2 Jul 2022 16:41:32 +0200
|
||||
Subject: [PATCH] mac80211: fix queue selection for mesh/OCB interfaces
|
||||
|
||||
When using iTXQ, the code assumes that there is only one vif queue for
|
||||
broadcast packets, using the BE queue. Allowing non-BE queue marking
|
||||
violates that assumption and txq->ac == skb_queue_mapping is no longer
|
||||
guaranteed. This can cause issues with queue handling in the driver and
|
||||
also causes issues with the recent ATF change, resulting in an AQL
|
||||
underflow warning.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/mac80211/wme.c
|
||||
+++ b/net/mac80211/wme.c
|
||||
@@ -147,8 +147,8 @@ u16 __ieee80211_select_queue(struct ieee
|
||||
bool qos;
|
||||
|
||||
/* all mesh/ocb stations are required to support WME */
|
||||
- if (sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
|
||||
- sdata->vif.type == NL80211_IFTYPE_OCB)
|
||||
+ if (sta && (sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
|
||||
+ sdata->vif.type == NL80211_IFTYPE_OCB))
|
||||
qos = true;
|
||||
else if (sta)
|
||||
qos = sta->sta.wme;
|
||||
@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2022-06-24
|
||||
PKG_SOURCE_VERSION:=b6e865e2cc7080c91ec34a9dd3648d25f7ce04c6
|
||||
PKG_MIRROR_HASH:=4d311e55431400266a1d58534ea22421b080670f937df3d9ad1fb9a9d0362bda
|
||||
PKG_SOURCE_DATE:=2022-07-03
|
||||
PKG_SOURCE_VERSION:=93e3fce916c62d06892d41bf00d0f4c2926c9a0b
|
||||
PKG_MIRROR_HASH:=ad966e7aa81301f0601ceb7aae2ecb471c452f5d8366f701add807152fd08971
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_USE_NINJA:=0
|
||||
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libiconv-full
|
||||
PKG_VERSION:=1.16
|
||||
PKG_VERSION:=1.17
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=libiconv-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@GNU/libiconv
|
||||
PKG_HASH:=e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04
|
||||
PKG_HASH:=8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/libiconv-$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=json-c
|
||||
PKG_VERSION:=0.15
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=0.16
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-nodoc.tar.gz
|
||||
PKG_SOURCE_URL:=https://s3.amazonaws.com/json-c_releases/releases/
|
||||
PKG_HASH:=99bca4f944b8ced8ae0bbc6310d6a3528ca715e69541793a1ef51f8c5b4b0878
|
||||
PKG_HASH:=ac8a3dd6820daaca579b23fbc74664310fbc3d67f52f6707cda67d21dde5570f
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=MIT
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -401,8 +401,6 @@ set(JSON_C_SOURCES
|
||||
@@ -433,8 +433,6 @@ configure_file(json.h.cmakein ${PROJECT_
|
||||
include_directories(${PROJECT_SOURCE_DIR})
|
||||
include_directories(${PROJECT_BINARY_DIR})
|
||||
|
||||
-add_subdirectory(doc)
|
||||
-
|
||||
# uninstall
|
||||
add_custom_target(uninstall
|
||||
COMMAND cat ${PROJECT_BINARY_DIR}/install_manifest.txt | xargs rm
|
||||
# "uninstall" custom target for make generators in unix like operating systems
|
||||
# and if that target is not present
|
||||
if (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -265,7 +265,7 @@ message(STATUS "Wrote ${PROJECT_BINARY_D
|
||||
configure_file(${PROJECT_SOURCE_DIR}/cmake/json_config.h.in ${PROJECT_BINARY_DIR}/json_config.h)
|
||||
message(STATUS "Wrote ${PROJECT_BINARY_DIR}/json_config.h")
|
||||
|
||||
-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
||||
+if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections")
|
||||
if ("${DISABLE_WERROR}" STREQUAL "OFF")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
||||
@ -1,20 +1,20 @@
|
||||
# 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.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libnl
|
||||
PKG_VERSION:=3.5.0
|
||||
PKG_VERSION:=3.6.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/thom311/libnl/releases/download/libnl$(subst .,_,$(PKG_VERSION))
|
||||
PKG_HASH:=352133ec9545da76f77e70ccb48c9d7e5324d67f6474744647a7ed382b5e05fa
|
||||
PKG_HASH:=532155fd011e5a805bd67121b87a01c757e2bb24112ac17e69cb86013b970009
|
||||
|
||||
PKG_LICENSE:=LGPL-2.1
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
From db0d59cd06f3ffd350379847c0885e1bfb85af0f Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Sat, 7 Mar 2015 11:34:42 +0100
|
||||
Subject: [PATCH 2/2] build: add Libs.private field in libnl pkg-config file
|
||||
|
||||
In order to support static linking, the libnl pkg-config file should
|
||||
indicate in its Libs.private field the libraries that libnl-3.0.a
|
||||
requires. The LIBS variable contains the appropriate list of
|
||||
libraries: -lm in all cases, and -lpthread when pthread support is
|
||||
enabled. This allows to statically link applications against libnl
|
||||
properly.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
libnl-3.0.pc.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/libnl-3.0.pc.in
|
||||
+++ b/libnl-3.0.pc.in
|
||||
@@ -7,4 +7,5 @@ Name: libnl
|
||||
Description: Convenience library for netlink sockets
|
||||
Version: @PACKAGE_VERSION@
|
||||
Libs: -L${libdir} -lnl-@MAJ_VERSION@
|
||||
+Libs.private: @LIBS@
|
||||
Cflags: -I${includedir}/libnl@MAJ_VERSION@
|
||||
@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nettle
|
||||
PKG_VERSION:=3.7.3
|
||||
PKG_VERSION:=3.8
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@GNU/nettle
|
||||
PKG_HASH:=661f5eb03f048a3b924c3a8ad2515d4068e40f67e774e8a26827658007e3bcf0
|
||||
PKG_HASH:=7576c68481c198f644b08c160d1a4850ba9449e308069455b5213319f234e8e6
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -4661,6 +4661,7 @@ $as_echo_n "checking build system compil
|
||||
@@ -4704,6 +4704,7 @@ $as_echo_n "checking build system compil
|
||||
# remove anything that might look like compiler output to our "||" expression
|
||||
rm -f conftest* a.out b.out a.exe a_out.exe
|
||||
cat >conftest.c <<EOF
|
||||
@ -8,7 +8,7 @@
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -4693,6 +4694,7 @@ $as_echo_n "checking build system compil
|
||||
@@ -4736,6 +4737,7 @@ $as_echo_n "checking build system compil
|
||||
# remove anything that might look like compiler output to our "||" expression
|
||||
rm -f conftest* a.out b.out a.exe a_out.exe
|
||||
cat >conftest.c <<EOF
|
||||
@ -16,7 +16,7 @@
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -4729,6 +4731,7 @@ $as_echo_n "checking build system compil
|
||||
@@ -4772,6 +4774,7 @@ $as_echo_n "checking build system compil
|
||||
# remove anything that might look like compiler output to our "||" expression
|
||||
rm -f conftest* a.out b.out a.exe a_out.exe
|
||||
cat >conftest.c <<EOF
|
||||
@ -24,7 +24,7 @@
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -4779,6 +4782,7 @@ else
|
||||
@@ -4822,6 +4825,7 @@ else
|
||||
gmp_cv_prog_exeext_for_build="$EXEEXT"
|
||||
else
|
||||
cat >conftest.c <<EOF
|
||||
|
||||
@ -51,6 +51,9 @@ config WOLFSSL_HAS_ECC25519
|
||||
bool "Include ECC Curve 25519 support"
|
||||
default y
|
||||
|
||||
config WOLFSSL_HAS_ECC448
|
||||
bool "Include ECC Curve 448 support"
|
||||
|
||||
config WOLFSSL_HAS_OPENVPN
|
||||
bool "Include OpenVPN support"
|
||||
default y
|
||||
|
||||
@ -32,6 +32,7 @@ PKG_CONFIG_DEPENDS:=\
|
||||
CONFIG_WOLFSSL_HAS_DH \
|
||||
CONFIG_WOLFSSL_HAS_DTLS \
|
||||
CONFIG_WOLFSSL_HAS_ECC25519 \
|
||||
CONFIG_WOLFSSL_HAS_ECC448 \
|
||||
CONFIG_WOLFSSL_HAS_OCSP \
|
||||
CONFIG_WOLFSSL_HAS_OPENVPN CONFIG_WOLFSSL_ALT_NAMES \
|
||||
CONFIG_WOLFSSL_HAS_SESSION_TICKET \
|
||||
@ -119,6 +120,7 @@ CONFIGURE_ARGS += \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_SESSION_TICKET),enable,disable)-session-ticket \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_DTLS),enable,disable)-dtls \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_ECC25519),enable,disable)-curve25519 \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_ECC448),enable,disable)-curve448 \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_AFALG),enable,disable)-afalg \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_OPENVPN),enable,disable)-openvpn \
|
||||
--enable-devcrypto=$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_CBC),cbc\
|
||||
|
||||
@ -54,7 +54,7 @@ CONFIG_RSN_PREAUTH=y
|
||||
#CONFIG_IEEE80211W=y
|
||||
|
||||
# Support Operating Channel Validation
|
||||
#CONFIG_OCV=y
|
||||
CONFIG_OCV=y
|
||||
|
||||
# Integrated EAP server
|
||||
#CONFIG_EAP=y
|
||||
|
||||
@ -54,7 +54,7 @@ CONFIG_RSN_PREAUTH=y
|
||||
#CONFIG_IEEE80211W=y
|
||||
|
||||
# Support Operating Channel Validation
|
||||
#CONFIG_OCV=y
|
||||
CONFIG_OCV=y
|
||||
|
||||
# Integrated EAP server
|
||||
CONFIG_EAP=y
|
||||
|
||||
@ -375,6 +375,8 @@ hostapd_common_add_bss_config() {
|
||||
|
||||
config_add_boolean fils
|
||||
config_add_string fils_dhcp
|
||||
|
||||
config_add_int ocv
|
||||
}
|
||||
|
||||
hostapd_set_vlan_file() {
|
||||
@ -547,7 +549,7 @@ hostapd_set_bss_options() {
|
||||
airtime_bss_weight airtime_bss_limit airtime_sta_weight \
|
||||
multicast_to_unicast proxy_arp per_sta_vif \
|
||||
eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id \
|
||||
vendor_elements fils
|
||||
vendor_elements fils ocv
|
||||
|
||||
set_default fils 0
|
||||
set_default isolate 0
|
||||
@ -620,6 +622,8 @@ hostapd_set_bss_options() {
|
||||
json_for_each_item append_radius_acct_req_attr radius_acct_req_attr
|
||||
}
|
||||
|
||||
[ -n "$ocv" ] && append bss_conf "ocv=$ocv" "$N"
|
||||
|
||||
case "$auth_type" in
|
||||
sae|owe|eap192|eap-eap192)
|
||||
set_default ieee80211w 2
|
||||
@ -1271,7 +1275,7 @@ wpa_supplicant_add_network() {
|
||||
json_get_vars \
|
||||
ssid bssid key \
|
||||
basic_rate mcast_rate \
|
||||
ieee80211w ieee80211r fils \
|
||||
ieee80211w ieee80211r fils ocv \
|
||||
multi_ap \
|
||||
default_disabled
|
||||
|
||||
@ -1323,6 +1327,8 @@ wpa_supplicant_add_network() {
|
||||
[ "$default_disabled" = 1 ] && append network_data "disabled=1" "$N$T"
|
||||
}
|
||||
|
||||
[ -n "$ocv" ] && append network_data "ocv=$ocv" "$N$T"
|
||||
|
||||
case "$auth_type" in
|
||||
none) ;;
|
||||
owe)
|
||||
|
||||
@ -315,7 +315,7 @@ CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
|
||||
#CONFIG_IEEE80211W=y
|
||||
|
||||
# Support Operating Channel Validation
|
||||
#CONFIG_OCV=y
|
||||
CONFIG_OCV=y
|
||||
|
||||
# Select TLS implementation
|
||||
# openssl = OpenSSL (default)
|
||||
|
||||
@ -315,7 +315,7 @@ CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
|
||||
#CONFIG_IEEE80211W=y
|
||||
|
||||
# Support Operating Channel Validation
|
||||
#CONFIG_OCV=y
|
||||
CONFIG_OCV=y
|
||||
|
||||
# Select TLS implementation
|
||||
# openssl = OpenSSL (default)
|
||||
|
||||
@ -54,6 +54,10 @@ static inline int has_feature(const char *feat)
|
||||
#ifdef CONFIG_FILS
|
||||
if (!strcmp(feat, "fils"))
|
||||
return 1;
|
||||
#endif
|
||||
#ifdef CONFIG_OCV
|
||||
if (!strcmp(feat, "ocv"))
|
||||
return 1;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=tcpdump
|
||||
PKG_VERSION:=4.9.3
|
||||
PKG_RELEASE:=4
|
||||
PKG_VERSION:=4.99.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.tcpdump.org/release/
|
||||
PKG_HASH:=2cd47cb3d460b6ff75f4a9940f594317ad456cfbf2bd2c8e5151e16559db6410
|
||||
PKG_HASH:=79b36985fb2703146618d87c4acde3e068b91c553fb93f021a337f175fd10ebe
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
@ -58,8 +58,8 @@ ifeq ($(BUILD_VARIANT),mini)
|
||||
endif
|
||||
|
||||
define Package/tcpdump/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tcpdump $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tcpdump $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
Package/tcpdump-mini/install = $(Package/tcpdump/install)
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -6183,97 +6183,6 @@ $as_echo "no" >&6; }
|
||||
fi
|
||||
fi
|
||||
@@ -6230,97 +6230,6 @@ fi
|
||||
|
||||
|
||||
|
||||
-#
|
||||
-# Check for special debugging functions
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,47 +0,0 @@
|
||||
--- a/print-ppp.c
|
||||
+++ b/print-ppp.c
|
||||
@@ -1368,19 +1368,29 @@ trunc:
|
||||
}
|
||||
|
||||
#ifndef TCPDUMP_MINI
|
||||
+/*
|
||||
+ * Un-escape RFC 1662 PPP in HDLC-like framing, with octet escapes.
|
||||
+ * The length argument is the on-the-wire length, not the captured
|
||||
+ * length; we can only un-escape the captured part.
|
||||
+ */
|
||||
static void
|
||||
ppp_hdlc(netdissect_options *ndo,
|
||||
const u_char *p, int length)
|
||||
{
|
||||
+ u_int caplen = ndo->ndo_snapend - p;
|
||||
u_char *b, *t, c;
|
||||
const u_char *s;
|
||||
- int i, proto;
|
||||
+ u_int i;
|
||||
+ int proto;
|
||||
const void *se;
|
||||
|
||||
+ if (caplen == 0)
|
||||
+ return;
|
||||
+
|
||||
if (length <= 0)
|
||||
return;
|
||||
|
||||
- b = (u_char *)malloc(length);
|
||||
+ b = (u_char *)malloc(caplen);
|
||||
if (b == NULL)
|
||||
return;
|
||||
|
||||
@@ -1389,10 +1399,10 @@ ppp_hdlc(netdissect_options *ndo,
|
||||
* Do this so that we dont overwrite the original packet
|
||||
* contents.
|
||||
*/
|
||||
- for (s = p, t = b, i = length; i > 0 && ND_TTEST(*s); i--) {
|
||||
+ for (s = p, t = b, i = caplen; i != 0; i--) {
|
||||
c = *s++;
|
||||
if (c == 0x7d) {
|
||||
- if (i <= 1 || !ND_TTEST(*s))
|
||||
+ if (i <= 1)
|
||||
break;
|
||||
i--;
|
||||
c = *s++ ^ 0x20;
|
||||
@ -1,101 +0,0 @@
|
||||
From 8ab211a7ec728bb0ad8c766c8eeb12deb0a13b86 Mon Sep 17 00:00:00 2001
|
||||
From: Guy Harris <gharris@sonic.net>
|
||||
Date: Wed, 30 Sep 2020 11:37:30 -0700
|
||||
Subject: [PATCH] Handle very large -f files by rejecting them.
|
||||
|
||||
_read(), on Windows, has a 32-bit size argument and a 32-bit return
|
||||
value, so reject -f files that have more than 2^31-1 characters.
|
||||
|
||||
Add some #defines so that, on Windows, we use _fstati64 to get the size
|
||||
of that file, to handle large files.
|
||||
|
||||
Don't assume that our definition for ssize_t is the same size as size_t;
|
||||
by the time we want to print the return value of the read, we know it'll
|
||||
fit into an int, so just cast it to int and print it with %d.
|
||||
|
||||
(cherry picked from commit faf8fb70af3a013e5d662b8283dec742fd6b1a77)
|
||||
---
|
||||
netdissect-stdinc.h | 16 +++++++++++++++-
|
||||
tcpdump.c | 15 ++++++++++++---
|
||||
2 files changed, 27 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/netdissect-stdinc.h
|
||||
+++ b/netdissect-stdinc.h
|
||||
@@ -149,10 +149,17 @@
|
||||
#ifdef _MSC_VER
|
||||
#define stat _stat
|
||||
#define open _open
|
||||
-#define fstat _fstat
|
||||
#define read _read
|
||||
#define close _close
|
||||
#define O_RDONLY _O_RDONLY
|
||||
+
|
||||
+/*
|
||||
+ * We define our_fstat64 as _fstati64, and define our_statb as
|
||||
+ * struct _stati64, so we get 64-bit file sizes.
|
||||
+ */
|
||||
+#define our_fstat _fstati64
|
||||
+#define our_statb struct _stati64
|
||||
+
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/*
|
||||
@@ -211,6 +218,13 @@ typedef char* caddr_t;
|
||||
|
||||
#include <arpa/inet.h>
|
||||
|
||||
+/*
|
||||
+ * We should have large file support enabled, if it's available,
|
||||
+ * so just use fstat as our_fstat and struct stat as our_statb.
|
||||
+ */
|
||||
+#define our_fstat fstat
|
||||
+#define our_statb struct stat
|
||||
+
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#ifndef HAVE___ATTRIBUTE__
|
||||
--- a/tcpdump.c
|
||||
+++ b/tcpdump.c
|
||||
@@ -108,6 +108,7 @@ The Regents of the University of Califor
|
||||
#endif /* HAVE_CAP_NG_H */
|
||||
#endif /* HAVE_LIBCAP_NG */
|
||||
|
||||
+#include "netdissect-stdinc.h"
|
||||
#include "netdissect.h"
|
||||
#include "interface.h"
|
||||
#include "addrtoname.h"
|
||||
@@ -861,15 +862,22 @@ read_infile(char *fname)
|
||||
{
|
||||
register int i, fd, cc;
|
||||
register char *cp;
|
||||
- struct stat buf;
|
||||
+ our_statb buf;
|
||||
|
||||
fd = open(fname, O_RDONLY|O_BINARY);
|
||||
if (fd < 0)
|
||||
error("can't open %s: %s", fname, pcap_strerror(errno));
|
||||
|
||||
- if (fstat(fd, &buf) < 0)
|
||||
+ if (our_fstat(fd, &buf) < 0)
|
||||
error("can't stat %s: %s", fname, pcap_strerror(errno));
|
||||
|
||||
+ /*
|
||||
+ * Reject files whose size doesn't fit into an int; a filter
|
||||
+ * *that* large will probably be too big.
|
||||
+ */
|
||||
+ if (buf.st_size > INT_MAX)
|
||||
+ error("%s is too large", fname);
|
||||
+
|
||||
cp = malloc((u_int)buf.st_size + 1);
|
||||
if (cp == NULL)
|
||||
error("malloc(%d) for %s: %s", (u_int)buf.st_size + 1,
|
||||
@@ -878,7 +886,8 @@ read_infile(char *fname)
|
||||
if (cc < 0)
|
||||
error("read %s: %s", fname, pcap_strerror(errno));
|
||||
if (cc != buf.st_size)
|
||||
- error("short read %s (%d != %d)", fname, cc, (int)buf.st_size);
|
||||
+ error("short read %s (%d != %d)", fname, (int) cc,
|
||||
+ (int)buf.st_size);
|
||||
|
||||
close(fd);
|
||||
/* replace "# comment" with spaces */
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=f2fs-tools
|
||||
PKG_VERSION:=1.14.0
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=1.15.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/
|
||||
PKG_HASH:=619263d4e2022152a1472c1d912eaae104f20bd227ce0bb9d41d1d6608094bd1
|
||||
PKG_HASH:=147d471040b44900283ce2c935f1d35d13d7f40008e7cb8fab2b69f54da01a4f
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
|
||||
@ -0,0 +1,88 @@
|
||||
From 9af8ee5baceab59d46154c96da62b52935f363fe Mon Sep 17 00:00:00 2001
|
||||
From: Nick Hainke <vincent@systemli.org>
|
||||
Date: Mon, 27 Jun 2022 20:43:11 +0200
|
||||
Subject: [PATCH] configure.ac: fix AC_ARG_WITH
|
||||
|
||||
In the new version the configuration no longer respects the
|
||||
--without/--with blkid/selinux parameters. Add the tests for
|
||||
"with_blkid" and "with_selinux" back to configure.ac as described
|
||||
in the manual.
|
||||
|
||||
Link: https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/External-Software.html
|
||||
|
||||
Fixes: c48335416a09 ("configure.ac: Enable cross-compilation")
|
||||
|
||||
Signed-off-by: Nick Hainke <vincent@systemli.org>
|
||||
---
|
||||
configure.ac | 44 ++++++++++++++++++++++++++++++--------------
|
||||
1 file changed, 30 insertions(+), 14 deletions(-)
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -39,12 +39,16 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign
|
||||
|
||||
# Test configure options.
|
||||
AC_ARG_WITH([selinux],
|
||||
- AS_HELP_STRING([--without-selinux],
|
||||
- [Ignore presence of libselinux and disable selinux support]))
|
||||
+ [AS_HELP_STRING([--without-selinux],
|
||||
+ [Ignore presence of libselinux and disable selinux support])],
|
||||
+ [],
|
||||
+ [with_selinux=check])
|
||||
|
||||
AC_ARG_WITH([blkid],
|
||||
- AS_HELP_STRING([--without-blkid],
|
||||
- [Ignore presence of libblkid and disable blkid support]))
|
||||
+ [AS_HELP_STRING([--without-blkid],
|
||||
+ [Ignore presence of libblkid and disable blkid support])],
|
||||
+ [],
|
||||
+ [with_blkid=check])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
@@ -55,11 +59,17 @@ AC_PATH_PROG([LDCONFIG], [ldconfig],
|
||||
[$PATH:/sbin])
|
||||
|
||||
# Checks for libraries.
|
||||
-AC_CHECK_LIB([blkid], [blkid_probe_all],
|
||||
- [AC_SUBST([libblkid_LIBS], ["-lblkid"])
|
||||
- AC_DEFINE([HAVE_LIBBLKID], [1],
|
||||
- [Define if you have libblkid])
|
||||
- ], [], [])
|
||||
+AS_IF([test "x$with_blkid" != xno],
|
||||
+ [AC_CHECK_LIB([blkid], [blkid_probe_all],
|
||||
+ [AC_SUBST([libblkid_LIBS], ["-lblkid"])
|
||||
+ AC_DEFINE([HAVE_LIBBLKID], [1],
|
||||
+ [Define if you have libblkid])
|
||||
+ ],
|
||||
+ [if test "x$with_blkid" != xcheck; then
|
||||
+ AC_MSG_FAILURE(
|
||||
+ [--with-blkid was given, but test for blkid failed])
|
||||
+ fi
|
||||
+ ], -lblkid)])
|
||||
|
||||
AC_CHECK_LIB([lzo2], [main],
|
||||
[AC_SUBST([liblzo2_LIBS], ["-llzo2"])
|
||||
@@ -73,11 +83,17 @@ AC_CHECK_LIB([lz4], [main],
|
||||
[Define if you have liblz4])
|
||||
], [], [])
|
||||
|
||||
-AC_CHECK_LIB([selinux], [getcon],
|
||||
- [AC_SUBST([libselinux_LIBS], ["-lselinux"])
|
||||
- AC_DEFINE([HAVE_LIBSELINUX], [1],
|
||||
- [Define if you have libselinux])
|
||||
- ], [], [])
|
||||
+AS_IF([test "x$with_selinux" != xno],
|
||||
+ [AC_CHECK_LIB([selinux], [getcon],
|
||||
+ [AC_SUBST([libselinux_LIBS], ["-lselinux"])
|
||||
+ AC_DEFINE([HAVE_LIBSELINUX], [1],
|
||||
+ [Define if you have libselinux])
|
||||
+ ],
|
||||
+ [if test "x$with_selinux" != xcheck; then
|
||||
+ AC_MSG_FAILURE(
|
||||
+ [--with-selinux was given, but test for selinux failed])
|
||||
+ fi
|
||||
+ ], -lselinux)])
|
||||
|
||||
AC_CHECK_LIB([uuid], [uuid_clear],
|
||||
[AC_SUBST([libuuid_LIBS], ["-luuid"])
|
||||
@ -1,46 +0,0 @@
|
||||
From f056fbeff08d30a6d9acdb9e06704461ceee3500 Mon Sep 17 00:00:00 2001
|
||||
From: Jaegeuk Kim <jaegeuk@kernel.org>
|
||||
Date: Thu, 1 Apr 2021 20:13:55 -0700
|
||||
Subject: resize.f2fs: fix wrong ovp calculation
|
||||
|
||||
beroal reported a mount failure due to broken valid_user_blocks.
|
||||
[ 6890.647749] F2FS-fs (loop0): Wrong valid_user_blocks: 16040048,
|
||||
user_block_count: 10016768
|
||||
|
||||
From fsck,
|
||||
|
||||
segment_count_main [0x 9a95 : 39573]
|
||||
-> 39573 * 2MB = 78GB as user space
|
||||
|
||||
overprov_segment_count [0x 4e29 : 20009]
|
||||
-> 20009 * 2MB = 40GB as overprovisioned space which user can't see.
|
||||
|
||||
But,
|
||||
[FSCK] valid_block_count matching with CP [Ok..] [0xf4c070]
|
||||
-> 0xf4c070 = 16040048
|
||||
|
||||
valid_block_count [0x f4c070 : 16040048]
|
||||
-> So, this is correct.
|
||||
|
||||
It turns out resize.f2fs gave very large and wrong overprovisioning space
|
||||
result in shortage of user blocks. The root cause was f2fs_get_usable_segments()
|
||||
didn't consider resize case which needs segment_count_main from new superblock.
|
||||
|
||||
Fixes: f8410857b7a8 ("f2fs-tools: zns zone-capacity support")
|
||||
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
||||
---
|
||||
lib/libf2fs_zoned.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/lib/libf2fs_zoned.c
|
||||
+++ b/lib/libf2fs_zoned.c
|
||||
@@ -495,6 +495,9 @@ uint32_t f2fs_get_usable_segments(struct
|
||||
int i, j;
|
||||
uint32_t usable_segs = 0, zone_segs;
|
||||
|
||||
+ if (c.func == RESIZE)
|
||||
+ return get_sb(segment_count_main);
|
||||
+
|
||||
for (i = 0; i < c.ndevs; i++) {
|
||||
if (c.devices[i].zoned_model != F2FS_ZONED_HM) {
|
||||
usable_segs += c.devices[i].total_segments;
|
||||
121
scripts/sercomm-kernel-header.py
Executable file
121
scripts/sercomm-kernel-header.py
Executable file
@ -0,0 +1,121 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#
|
||||
# sercomm-kernel-header.py: Creates Sercomm kernel header
|
||||
#
|
||||
# Copyright © 2022 Mikhail Zhilkin
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import binascii
|
||||
import os
|
||||
import struct
|
||||
|
||||
KERNEL_HEADER_SIZE = 0x100
|
||||
PADDING = 0xff
|
||||
ROOTFS_FAKE_HEADER = "UBI#"
|
||||
|
||||
def auto_int(x):
|
||||
return int(x, 0)
|
||||
|
||||
def create_kernel_header(args):
|
||||
out_file = open(args.header_file, "wb")
|
||||
header = get_kernel_header(args)
|
||||
out_file.write(header)
|
||||
out_file.close()
|
||||
|
||||
def get_kernel_header(args):
|
||||
header = bytearray([PADDING] * KERNEL_HEADER_SIZE)
|
||||
|
||||
struct.pack_into('<L', header, 0xc, 0xffffff02)
|
||||
struct.pack_into('<L', header, 0x1c, 0x0)
|
||||
struct.pack_into('<L', header, 0x34, 0x0)
|
||||
struct.pack_into('<L', header, 0x10, args.kernel_offset)
|
||||
struct.pack_into('<L', header, 0x28, args.rootfs_offset)
|
||||
|
||||
if (args.rootfs_file):
|
||||
if (args.rootfs_checking_size):
|
||||
rootfs_size = args.rootfs_checking_size
|
||||
else:
|
||||
rootfs_size = os.path.getsize(args.rootfs_file)
|
||||
buf = open(args.rootfs_file,'rb').read(rootfs_size)
|
||||
crc = binascii.crc32(buf) & 0xffffffff
|
||||
else:
|
||||
rootfs_size = len(ROOTFS_FAKE_HEADER)
|
||||
crc = binascii.crc32(str.encode(ROOTFS_FAKE_HEADER)) & \
|
||||
0xffffffff
|
||||
struct.pack_into('<L', header, 0x2c, rootfs_size)
|
||||
struct.pack_into('<L', header, 0x30, crc)
|
||||
|
||||
rootfs_end_offset = args.rootfs_offset + rootfs_size
|
||||
struct.pack_into('<L', header, 0x4, rootfs_end_offset)
|
||||
|
||||
kernel_size = os.path.getsize(args.kernel_file)
|
||||
struct.pack_into('<L', header, 0x14, kernel_size)
|
||||
|
||||
buf = open(args.kernel_file,'rb').read()
|
||||
crc = binascii.crc32(buf) & 0xffffffff
|
||||
struct.pack_into('<L', header, 0x18, crc)
|
||||
|
||||
crc = binascii.crc32(header) & 0xffffffff
|
||||
struct.pack_into('<L', header, 0x8, crc)
|
||||
|
||||
struct.pack_into('<L', header, 0x0, 0x726553)
|
||||
|
||||
return header
|
||||
|
||||
def main():
|
||||
global args
|
||||
|
||||
parser = argparse.ArgumentParser(description='This script generates \
|
||||
a kernel header for the Sercomm mt7621 devices')
|
||||
|
||||
parser.add_argument('--kernel-image',
|
||||
dest='kernel_file',
|
||||
action='store',
|
||||
type=str,
|
||||
help='Path to a Kernel binary image')
|
||||
|
||||
parser.add_argument('--kernel-offset',
|
||||
dest='kernel_offset',
|
||||
action='store',
|
||||
type=auto_int,
|
||||
help='Kernel offset')
|
||||
|
||||
parser.add_argument('--rootfs-offset',
|
||||
dest='rootfs_offset',
|
||||
action='store',
|
||||
type=auto_int,
|
||||
help='RootFS offset')
|
||||
|
||||
parser.add_argument('--output-header',
|
||||
dest='header_file',
|
||||
action='store',
|
||||
type=str,
|
||||
help='Output kernel header file')
|
||||
|
||||
parser.add_argument('--rootfs-image',
|
||||
dest='rootfs_file',
|
||||
action='store',
|
||||
type=str,
|
||||
help='Path to RootFS binary image (optional)')
|
||||
|
||||
parser.add_argument('--rootfs-checking-size',
|
||||
dest='rootfs_checking_size',
|
||||
action='store',
|
||||
type=auto_int,
|
||||
help='Bytes count for CRC calculation (optional)')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if ((not args.kernel_file) or
|
||||
(not args.kernel_offset) or
|
||||
(not args.rootfs_offset) or
|
||||
(not args.header_file)):
|
||||
parser.print_help()
|
||||
exit()
|
||||
|
||||
create_kernel_header(args)
|
||||
|
||||
main()
|
||||
102
scripts/sercomm-pid.py
Executable file
102
scripts/sercomm-pid.py
Executable file
@ -0,0 +1,102 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#
|
||||
# sercomm-pid.py: Creates Sercomm device PID
|
||||
#
|
||||
# Copyright © 2022 Mikhail Zhilkin
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import binascii
|
||||
import struct
|
||||
|
||||
PID_SIZE = 0x70
|
||||
PADDING = 0x30
|
||||
PADDING_TAIL = 0x0
|
||||
|
||||
def auto_int(x):
|
||||
return int(x, 0)
|
||||
|
||||
def create_pid_file(args):
|
||||
pid_file = open(args.pid_file, "wb")
|
||||
buf = get_pid(args)
|
||||
pid_file.write(buf)
|
||||
pid_file.close()
|
||||
|
||||
def get_pid(args):
|
||||
buf = bytearray([PADDING] * PID_SIZE)
|
||||
|
||||
enc = args.hw_version.rjust(8, '0').encode('ascii')
|
||||
struct.pack_into('>8s', buf, 0x0, enc)
|
||||
|
||||
enc = binascii.hexlify(args.hw_id.encode())
|
||||
struct.pack_into('>6s', buf, 0x8, enc)
|
||||
|
||||
enc = args.sw_version.rjust(4, '0').encode('ascii')
|
||||
struct.pack_into('>4s', buf, 0x64, enc)
|
||||
|
||||
if (args.extra_padd_size):
|
||||
tail = bytearray([PADDING_TAIL] * args.extra_padd_size)
|
||||
if (args.extra_padd_byte):
|
||||
struct.pack_into ('<i', tail, 0x0,
|
||||
args.extra_padd_byte)
|
||||
buf += tail
|
||||
|
||||
return buf
|
||||
|
||||
def main():
|
||||
global args
|
||||
|
||||
parser = argparse.ArgumentParser(description='This script \
|
||||
generates firmware PID for the Sercomm-based devices')
|
||||
|
||||
parser.add_argument('--hw-version',
|
||||
dest='hw_version',
|
||||
action='store',
|
||||
type=str,
|
||||
help='Sercomm hardware version')
|
||||
|
||||
parser.add_argument('--hw-id',
|
||||
dest='hw_id',
|
||||
action='store',
|
||||
type=str,
|
||||
help='Sercomm hardware ID')
|
||||
|
||||
parser.add_argument('--sw-version',
|
||||
dest='sw_version',
|
||||
action='store',
|
||||
type=str,
|
||||
help='Sercomm software version')
|
||||
|
||||
parser.add_argument('--pid-file',
|
||||
dest='pid_file',
|
||||
action='store',
|
||||
type=str,
|
||||
help='Output PID file')
|
||||
|
||||
parser.add_argument('--extra-padding-size',
|
||||
dest='extra_padd_size',
|
||||
action='store',
|
||||
type=auto_int,
|
||||
help='Size of extra NULL padding at the end of the file \
|
||||
(optional)')
|
||||
|
||||
parser.add_argument('--extra-padding-first-byte',
|
||||
dest='extra_padd_byte',
|
||||
action='store',
|
||||
type=auto_int,
|
||||
help='First byte of extra padding (optional)')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if ((not args.hw_version) or
|
||||
(not args.hw_id) or
|
||||
(not args.sw_version) or
|
||||
(not args.pid_file)):
|
||||
parser.print_help()
|
||||
exit()
|
||||
|
||||
create_pid_file(args)
|
||||
|
||||
main()
|
||||
@ -19,9 +19,5 @@ CONFIG_PHY_AR7100_USB=y
|
||||
CONFIG_PHY_AR7200_USB=y
|
||||
CONFIG_REALTEK_PHY=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_RTL8366RB_PHY=y
|
||||
CONFIG_RTL8366S_PHY=y
|
||||
CONFIG_RTL8366_SMI=y
|
||||
CONFIG_RTL8367_PHY=y
|
||||
CONFIG_VITESSE_PHY=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
|
||||
@ -682,7 +682,7 @@ define Device/tplink_tl-wr1043nd-v1
|
||||
SOC := ar9132
|
||||
DEVICE_MODEL := TL-WR1043N/ND
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-switch-rtl8366rb
|
||||
TPLINK_HWID := 0x10430001
|
||||
SUPPORTED_DEVICES += tl-wr1043nd
|
||||
endef
|
||||
@ -750,7 +750,7 @@ define Device/tplink_tl-wr2543-v1
|
||||
SOC := ar7242
|
||||
DEVICE_MODEL := TL-WR2543N/ND
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-switch-rtl8367
|
||||
TPLINK_HWID := 0x25430001
|
||||
IMAGE/sysupgrade.bin := tplink-v1-image sysupgrade -v 3.13.99 | \
|
||||
check-size | append-metadata
|
||||
|
||||
@ -581,6 +581,7 @@ TARGET_DEVICES += buffalo_wzr-hp-g300nh-rb
|
||||
define Device/buffalo_wzr-hp-g300nh-s
|
||||
$(Device/buffalo_wzr-hp-g300nh)
|
||||
DEVICE_MODEL := WZR-HP-G300NH (RTL8366S switch)
|
||||
DEVICE_PACKAGES += kmod-switch-rtl8366rb
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wzr-hp-g300nh-s
|
||||
|
||||
@ -997,7 +998,7 @@ define Device/dlink_dir-825-b1
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
|
||||
check-size | append-metadata
|
||||
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \
|
||||
kmod-leds-reset kmod-owl-loader
|
||||
kmod-leds-reset kmod-owl-loader kmod-switch-rtl8366s
|
||||
SUPPORTED_DEVICES += dir-825-b1
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dir-825-b1
|
||||
@ -1709,7 +1710,7 @@ define Device/netgear_wndr3x00
|
||||
$(Device/netgear_generic)
|
||||
SOC := ar7161
|
||||
DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \
|
||||
kmod-leds-reset kmod-owl-loader
|
||||
kmod-leds-reset kmod-owl-loader kmod-switch-rtl8366s
|
||||
endef
|
||||
|
||||
define Device/netgear_wndr3700
|
||||
|
||||
@ -14,7 +14,7 @@ use the same logic.
|
||||
|
||||
--- a/drivers/tty/serial/amba-pl011.c
|
||||
+++ b/drivers/tty/serial/amba-pl011.c
|
||||
@@ -2738,7 +2738,12 @@ static int pl011_setup_port(struct devic
|
||||
@@ -2725,7 +2725,12 @@ static int pl011_setup_port(struct devic
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/tty/serial/amba-pl011.c
|
||||
+++ b/drivers/tty/serial/amba-pl011.c
|
||||
@@ -1725,6 +1725,23 @@ static void pl011_put_poll_char(struct u
|
||||
@@ -1718,6 +1718,23 @@ static void pl011_put_poll_char(struct u
|
||||
|
||||
#endif /* CONFIG_CONSOLE_POLL */
|
||||
|
||||
@ -50,7 +50,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
static int pl011_hwinit(struct uart_port *port)
|
||||
{
|
||||
struct uart_amba_port *uap =
|
||||
@@ -1741,7 +1758,7 @@ static int pl011_hwinit(struct uart_port
|
||||
@@ -1734,7 +1751,7 @@ static int pl011_hwinit(struct uart_port
|
||||
if (retval)
|
||||
return retval;
|
||||
|
||||
@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
/* Clear pending error and receive interrupts */
|
||||
pl011_write(UART011_OEIS | UART011_BEIS | UART011_PEIS |
|
||||
@@ -2434,7 +2451,7 @@ static int pl011_console_setup(struct co
|
||||
@@ -2421,7 +2438,7 @@ static int pl011_console_setup(struct co
|
||||
plat->init();
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
if (uap->vendor->fixed_options) {
|
||||
baud = uap->fixed_baud;
|
||||
@@ -2651,6 +2668,7 @@ static struct uart_driver amba_reg = {
|
||||
@@ -2638,6 +2655,7 @@ static struct uart_driver amba_reg = {
|
||||
.cons = AMBA_CONSOLE,
|
||||
};
|
||||
|
||||
@ -76,7 +76,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
static int pl011_probe_dt_alias(int index, struct device *dev)
|
||||
{
|
||||
struct device_node *np;
|
||||
@@ -2682,6 +2700,7 @@ static int pl011_probe_dt_alias(int inde
|
||||
@@ -2669,6 +2687,7 @@ static int pl011_probe_dt_alias(int inde
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
- reg
|
||||
--- a/drivers/tty/serial/amba-pl011.c
|
||||
+++ b/drivers/tty/serial/amba-pl011.c
|
||||
@@ -2829,6 +2829,11 @@ static int pl011_probe(struct amba_devic
|
||||
@@ -2816,6 +2816,11 @@ static int pl011_probe(struct amba_devic
|
||||
if (IS_ERR(uap->clk))
|
||||
return PTR_ERR(uap->clk);
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
static void pl011_stop_rx(struct uart_port *port)
|
||||
{
|
||||
struct uart_amba_port *uap =
|
||||
@@ -2276,6 +2302,8 @@ static const struct uart_ops amba_pl011_
|
||||
@@ -2263,6 +2289,8 @@ static const struct uart_ops amba_pl011_
|
||||
.stop_tx = pl011_stop_tx,
|
||||
.start_tx = pl011_start_tx,
|
||||
.stop_rx = pl011_stop_rx,
|
||||
|
||||
@ -77,7 +77,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
#include "mtdcore.h"
|
||||
|
||||
@@ -1002,6 +1003,8 @@ int mtd_device_parse_register(struct mtd
|
||||
@@ -1012,6 +1013,8 @@ int mtd_device_parse_register(struct mtd
|
||||
|
||||
ret = mtd_otp_nvmem_add(mtd);
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
#include <linux/nvmem-provider.h>
|
||||
|
||||
#include <linux/mtd/mtd.h>
|
||||
@@ -697,6 +698,16 @@ int add_mtd_device(struct mtd_info *mtd)
|
||||
@@ -707,6 +708,16 @@ int add_mtd_device(struct mtd_info *mtd)
|
||||
of this try_ nonsense, and no bitching about it
|
||||
either. :) */
|
||||
__module_get(THIS_MODULE);
|
||||
|
||||
@ -17,7 +17,7 @@ Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
|
||||
--- a/drivers/mtd/mtdcore.c
|
||||
+++ b/drivers/mtd/mtdcore.c
|
||||
@@ -1203,6 +1203,44 @@ out_unlock:
|
||||
@@ -1213,6 +1213,44 @@ out_unlock:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(get_mtd_device_nm);
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -3678,6 +3678,7 @@ static const struct mtk_soc_data mt2701_
|
||||
@@ -3675,6 +3675,7 @@ static const struct mtk_soc_data mt2701_
|
||||
.hw_features = MTK_HW_FEATURES,
|
||||
.required_clks = MT7623_CLKS_BITMAP,
|
||||
.required_pctl = true,
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
From dd1d420f40e75c3881a04001e6f2798492ee83c2 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Hainke <vincent@systemli.org>
|
||||
Date: Thu, 30 Jun 2022 12:32:20 +0200
|
||||
Subject: [PATCH] arm64: dts: mt7622: fix BPI-R64 WPS button
|
||||
|
||||
The bananapi R64 (BPI-R64) experiences wrong WPS button signals.
|
||||
In OpenWrt pushing the WPS button while powering on the device will set
|
||||
it to recovery mode. Currently, this also happens without any user
|
||||
interaction. In particular, the wrong signals appear while booting the
|
||||
device or restarting it, e.g. after doing a system upgrade. If the
|
||||
device is in recovery mode the user needs to manually power cycle or
|
||||
restart it.
|
||||
|
||||
The official BPI-R64 sources set the WPS button to GPIO_ACTIVE_LOW in
|
||||
the device tree. This setting seems to suppress the unwanted WPS button
|
||||
press signals. So this commit changes the button from GPIO_ACTIVE_HIGH to
|
||||
GPIO_ACTIVE_LOW.
|
||||
|
||||
The official BPI-R64 sources can be found on
|
||||
https://github.com/BPI-SINOVOIP/BPI-R64-openwrt
|
||||
|
||||
Fixes: 0b6286dd96c0 ("arm64: dts: mt7622: add bananapi BPI-R64 board")
|
||||
|
||||
Suggested-by: INAGAKI Hiroshi <musashino.open@gmail.com>
|
||||
Signed-off-by: Nick Hainke <vincent@systemli.org>
|
||||
---
|
||||
arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
|
||||
+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
|
||||
@@ -54,7 +54,7 @@
|
||||
wps {
|
||||
label = "wps";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
- gpios = <&pio 102 GPIO_ACTIVE_HIGH>;
|
||||
+ gpios = <&pio 102 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
237
target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts
Normal file
237
target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts
Normal file
@ -0,0 +1,237 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7621.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
/ {
|
||||
compatible = "beeline,smartbox-giga", "mediatek,mt7621-soc";
|
||||
model = "Beeline SmartBox GIGA";
|
||||
|
||||
aliases {
|
||||
label-mac-device = &gmac0;
|
||||
|
||||
led-boot = &led_status_green;
|
||||
led-failsafe = &led_status_red;
|
||||
led-running = &led_status_green;
|
||||
led-upgrade = &led_status_red;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_status_green: led-0 {
|
||||
label = "green:status";
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led-1 {
|
||||
label = "blue:wan";
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
function = LED_FUNCTION_WAN;
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_status_red: led-2 {
|
||||
label = "red:status";
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
ubi-concat {
|
||||
compatible = "mtd-concat";
|
||||
devices = <&ubiconcat0 &ubiconcat1 &ubiconcat2 \
|
||||
&ubiconcat3>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "ubi";
|
||||
reg = <0x0 0x5400000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&nand {
|
||||
status = "okay";
|
||||
|
||||
partitions {
|
||||
compatible = "sercomm,sc-partitions", "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x100000>;
|
||||
sercomm,scpart-id = <0>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
label = "dynamic partition map";
|
||||
reg = <0x100000 0x100000>;
|
||||
sercomm,scpart-id = <1>;
|
||||
};
|
||||
|
||||
factory: partition@200000 {
|
||||
label = "Factory";
|
||||
reg = <0x200000 0x100000>;
|
||||
sercomm,scpart-id = <2>;
|
||||
read-only;
|
||||
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_factory_21000: macaddr@21000 {
|
||||
reg = <0x21000 0x6>;
|
||||
};
|
||||
};
|
||||
|
||||
partition@300000 {
|
||||
label = "Boot Flag";
|
||||
reg = <0x300000 0x100000>;
|
||||
sercomm,scpart-id = <3>;
|
||||
};
|
||||
|
||||
partition@400000 {
|
||||
label = "kernel";
|
||||
reg = <0x400000 0x600000>;
|
||||
sercomm,scpart-id = <4>;
|
||||
};
|
||||
|
||||
partition@a00000 {
|
||||
label = "Kernel 2";
|
||||
reg = <0xa00000 0x600000>;
|
||||
sercomm,scpart-id = <5>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
ubiconcat0: partition@1000000 {
|
||||
label = "File System 1";
|
||||
reg = <0x1000000 0x1800000>;
|
||||
sercomm,scpart-id = <6>;
|
||||
};
|
||||
|
||||
partition@2800000 {
|
||||
label = "File System 2";
|
||||
reg = <0x2800000 0x1800000>;
|
||||
sercomm,scpart-id = <7>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
ubiconcat1: partition@4000000 {
|
||||
label = "Configuration/log";
|
||||
reg = <0x4000000 0x800000>;
|
||||
sercomm,scpart-id = <8>;
|
||||
};
|
||||
|
||||
ubiconcat2: partition@4800000 {
|
||||
label = "application tmp buffer (Ftool)";
|
||||
reg = <0x4800000 0xc00000>;
|
||||
sercomm,scpart-id = <9>;
|
||||
};
|
||||
|
||||
ubiconcat3: partition@5400000 {
|
||||
label = "container";
|
||||
reg = <0x5400000 0x2800000>;
|
||||
sercomm,scpart-id = <10>;
|
||||
};
|
||||
|
||||
partition@7c00000 {
|
||||
label = "bad block reserved";
|
||||
reg = <0x7c00000 0x380000>;
|
||||
sercomm,scpart-id = <11>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x8000>;
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
|
||||
nvmem-cells = <&macaddr_factory_21000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <(5)>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||
ieee80211-freq-limit = <2400000 2500000>;
|
||||
|
||||
nvmem-cells = <&macaddr_factory_21000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <(4)>;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&macaddr_factory_21000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@0 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
|
||||
nvmem-cells = <&macaddr_factory_21000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <(1)>;
|
||||
};
|
||||
|
||||
port@1 {
|
||||
status = "okay";
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
status = "okay";
|
||||
label = "lan2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uartlite3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "i2c", "jtag";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
@ -10,10 +10,10 @@
|
||||
model = "YunCore AX820";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_status_green;
|
||||
led-failsafe = &led_status_green;
|
||||
led-running = &led_status_green;
|
||||
led-upgrade = &led_status_green;
|
||||
led-boot = &led_system;
|
||||
led-failsafe = &led_system;
|
||||
led-running = &led_system;
|
||||
led-upgrade = &led_system;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@ -23,10 +23,30 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_status_green: status_green {
|
||||
label = "green:status";
|
||||
/* At least 2 AX820 variants are known and cannot be distinguished (same hw rev):
|
||||
- System LED green GPIO 15; red and blue apparently not connected
|
||||
- System LED red GPIO 15, WLAN2G LED green GPIO 14, WLAN5G LED blue GPIO 16
|
||||
The canonical values taken from a Yuncore datasheet are:
|
||||
- System LED green GPIO 15, WLAN2G LED blue GPIO 14, WLAN5G LED red GPIO 16
|
||||
All 3 colors relate to the same single RGB LED showing up on the front lightpipe.
|
||||
As a result, all 3 LEDs are defined even if only one may be available, and
|
||||
the color information is absent as it is not reliable */
|
||||
wlan2g {
|
||||
label = "wlan2g";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy0radio";
|
||||
};
|
||||
|
||||
led_system: system {
|
||||
label = "system";
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wlan5g {
|
||||
label = "wlan5g";
|
||||
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1radio";
|
||||
};
|
||||
};
|
||||
|
||||
watchdog {
|
||||
|
||||
123
target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts
Normal file
123
target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts
Normal file
@ -0,0 +1,123 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include "mt7628an.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "comfast,cf-wr617ac", "mediatek,mt7628an-soc";
|
||||
model = "Comfast CF-WR617AC";
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
led_status_blue: status_blue {
|
||||
label = "blue:status";
|
||||
gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
led_status_red: status_red {
|
||||
label = "red:status";
|
||||
gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
led-boot = &led_status_red;
|
||||
led-failsafe = &led_status_red;
|
||||
led-running = &led_status_blue;
|
||||
led-upgrade = &led_status_red;
|
||||
};
|
||||
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
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 0x760000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x8000>;
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
mtd-mac-address = < 0x8004>;
|
||||
mac-address-increment = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
ðernet {
|
||||
nvmem-cells = <&macaddr_factory_e000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&esw {
|
||||
mediatek,portmap = <0x2f>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||
};
|
||||
|
||||
&factory {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
macaddr_factory_e000: macaddr@4 {
|
||||
reg = <0xe000 0x6>;
|
||||
};
|
||||
};
|
||||
@ -0,0 +1,56 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7628an_xiaomi_mi-router-4.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "xiaomi,mi-router-4a-100m-intl", "mediatek,mt7628an-soc";
|
||||
model = "Xiaomi Mi Router 4A (100M International Edition)";
|
||||
};
|
||||
|
||||
&partitions {
|
||||
partition@60000 {
|
||||
label = "overlay";
|
||||
reg = <0x60000 0x200000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@260000 {
|
||||
label = "firmware";
|
||||
reg = <0x260000 0xda0000>;
|
||||
compatible = "denx,uimage";
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x8000>;
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
};
|
||||
};
|
||||
|
||||
ðernet {
|
||||
nvmem-cells = <&macaddr_factory_4>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <(-1)>;
|
||||
};
|
||||
|
||||
&esw {
|
||||
mediatek,portmap = <0x3e>;
|
||||
mediatek,portdisable = <0x2a>;
|
||||
};
|
||||
|
||||
&factory {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_factory_4: macaddr@4 {
|
||||
reg = <0x4 0x6>;
|
||||
};
|
||||
};
|
||||
@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
DEVICE_VARS += LOADER_TYPE LOADER_FLASH_OFFS
|
||||
DEVICE_VARS += LOADER_TYPE LOADER_FLASH_OFFS LZMA_TEXT_START
|
||||
DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
|
||||
DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR
|
||||
DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK
|
||||
@ -22,6 +22,7 @@ ldrplatform-$(CONFIG_TARGET_ramips_mt7621) := mt7621
|
||||
ldrflashstart-y := 0x1c000000
|
||||
ldrflashstart-$(CONFIG_TARGET_ramips_mt7621) := 0x1fc00000
|
||||
|
||||
LOADADDR := $(loadaddr-y)
|
||||
LOADER_PLATFORM := $(ldrplatform-y)
|
||||
LOADER_FLASH_START := $(ldrflashstart-y)
|
||||
|
||||
@ -45,7 +46,8 @@ define Build/loader-common
|
||||
PKG_BUILD_DIR="$@.src" \
|
||||
TARGET_DIR="$(dir $@)" LOADER_NAME="$(notdir $@)" \
|
||||
BOARD="$(BOARDNAME)" PLATFORM="$(LOADER_PLATFORM)" \
|
||||
LZMA_TEXT_START=0x81800000 LOADADDR=$(KERNEL_LOADADDR) \
|
||||
LZMA_TEXT_START=$(LZMA_TEXT_START) \
|
||||
LOADADDR=$(LOADADDR) \
|
||||
$(1) compile loader.$(LOADER_TYPE)
|
||||
mv "$@.$(LOADER_TYPE)" "$@"
|
||||
rm -rf $@.src
|
||||
@ -176,6 +178,7 @@ define Device/Default
|
||||
PROFILES = Default
|
||||
KERNEL := $(KERNEL_DTB) | uImage lzma
|
||||
KERNEL_LOADADDR := $(loadaddr-y)
|
||||
LZMA_TEXT_START := 0x81800000
|
||||
SOC := $(DEFAULT_SOC)
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
DEVICE_DTS = $$(SOC)_$(1)
|
||||
|
||||
87
target/linux/ramips/image/common-sercomm.mk
Normal file
87
target/linux/ramips/image/common-sercomm.mk
Normal file
@ -0,0 +1,87 @@
|
||||
DEVICE_VARS += SERCOMM_KERNEL_OFFSET SERCOMM_ROOTFS_OFFSET
|
||||
|
||||
define Build/sercomm-crypto
|
||||
$(TOPDIR)/scripts/sercomm-crypto.py \
|
||||
--input-file $@ \
|
||||
--key-file $@.key \
|
||||
--output-file $@.ser \
|
||||
--version $(SERCOMM_SWVER)
|
||||
$(STAGING_DIR_HOST)/bin/openssl enc -md md5 -aes-256-cbc \
|
||||
-in $@ \
|
||||
-out $@.enc \
|
||||
-K `cat $@.key` \
|
||||
-iv 00000000000000000000000000000000
|
||||
dd if=$@.enc >> $@.ser 2>/dev/null
|
||||
mv $@.ser $@
|
||||
rm -f $@.enc $@.key
|
||||
endef
|
||||
|
||||
define Build/sercomm-kernel
|
||||
$(TOPDIR)/scripts/sercomm-kernel-header.py \
|
||||
--kernel-image $@ \
|
||||
--kernel-offset $(SERCOMM_KERNEL_OFFSET) \
|
||||
--rootfs-offset $(SERCOMM_ROOTFS_OFFSET) \
|
||||
--output-header $@.hdr
|
||||
dd if=$@ >> $@.hdr 2>/dev/null
|
||||
mv $@.hdr $@
|
||||
endef
|
||||
|
||||
define Build/sercomm-part-tag
|
||||
$(call Build/sercomm-part-tag-common,$(word 1,$(1)) $@)
|
||||
endef
|
||||
|
||||
define Build/sercomm-part-tag-common
|
||||
$(eval file=$(word 2,$(1)))
|
||||
$(TOPDIR)/scripts/sercomm-partition-tag.py \
|
||||
--input-file $(file) \
|
||||
--output-file $(file).tmp \
|
||||
--part-name $(word 1,$(1)) \
|
||||
--part-version $(SERCOMM_SWVER)
|
||||
mv $(file).tmp $(file)
|
||||
endef
|
||||
|
||||
define Build/sercomm-payload
|
||||
$(TOPDIR)/scripts/sercomm-pid.py \
|
||||
--hw-version $(SERCOMM_HWVER) \
|
||||
--hw-id $(SERCOMM_HWID) \
|
||||
--sw-version $(SERCOMM_SWVER) \
|
||||
--pid-file $@.pid \
|
||||
--extra-padding-size 0x10 \
|
||||
--extra-padding-first-byte 0x0a
|
||||
$(TOPDIR)/scripts/sercomm-payload.py \
|
||||
--input-file $@ \
|
||||
--output-file $@.tmp \
|
||||
--pid "$$(cat $@.pid | od -t x1 -An -v | tr -d '\n')"
|
||||
mv $@.tmp $@
|
||||
rm $@.pid
|
||||
endef
|
||||
|
||||
define Build/sercomm-prepend-tagged-kernel
|
||||
$(CP) $(IMAGE_KERNEL) $(IMAGE_KERNEL).tagged
|
||||
$(call Build/sercomm-part-tag-common,$(word 1,$(1)) \
|
||||
$(IMAGE_KERNEL).tagged)
|
||||
dd if=$@ >> $(IMAGE_KERNEL).tagged 2>/dev/null
|
||||
mv $(IMAGE_KERNEL).tagged $@
|
||||
endef
|
||||
|
||||
define Device/sercomm_dxx
|
||||
$(Device/dsa-migration)
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_SIZE := 6144k
|
||||
UBINIZE_OPTS := -E 5
|
||||
LOADER_TYPE := bin
|
||||
KERNEL_LOADADDR := 0x81001000
|
||||
LZMA_TEXT_START := 0x82800000
|
||||
KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | lzma -a0 | \
|
||||
uImage lzma | sercomm-kernel
|
||||
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | \
|
||||
lzma -a0 | uImage lzma
|
||||
IMAGES += factory.img
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
IMAGE/factory.img := append-ubi | sercomm-part-tag rootfs | \
|
||||
sercomm-prepend-tagged-kernel kernel | gzip | sercomm-payload | \
|
||||
sercomm-crypto
|
||||
SERCOMM_KERNEL_OFFSET := 0x400100
|
||||
SERCOMM_ROOTFS_OFFSET := 0x1000000
|
||||
endef
|
||||
@ -2,6 +2,7 @@
|
||||
# MT7621 Profiles
|
||||
#
|
||||
|
||||
include ./common-sercomm.mk
|
||||
include ./common-tp-link.mk
|
||||
|
||||
DEFAULT_SOC := mt7621
|
||||
@ -285,6 +286,19 @@ define Device/beeline_smartbox-flash
|
||||
endef
|
||||
TARGET_DEVICES += beeline_smartbox-flash
|
||||
|
||||
define Device/beeline_smartbox-giga
|
||||
$(Device/sercomm_dxx)
|
||||
IMAGE_SIZE := 24576k
|
||||
SERCOMM_HWID := DBE
|
||||
SERCOMM_HWVER := 10100
|
||||
SERCOMM_SWVER := 1001
|
||||
DEVICE_VENDOR := Beeline
|
||||
DEVICE_MODEL := SmartBox GIGA
|
||||
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \
|
||||
kmod-usb3 uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += beeline_smartbox-giga
|
||||
|
||||
define Device/buffalo_wsr-1166dhp
|
||||
$(Device/dsa-migration)
|
||||
$(Device/uimage-lzma-loader)
|
||||
|
||||
@ -107,6 +107,15 @@ define Device/buffalo_wcr-1166ds
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wcr-1166ds
|
||||
|
||||
define Device/comfast_cf-wr617ac
|
||||
IMAGE_SIZE := 7872k
|
||||
DTS := CF-WR617AC
|
||||
DEVICE_VENDOR := Comfast
|
||||
DEVICE_MODEL := CF-WR617AC
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-rt2800-pci
|
||||
endef
|
||||
TARGET_DEVICES += comfast_cf-wr617ac
|
||||
|
||||
define Device/comfast_cf-wr758ac
|
||||
IMAGE_SIZE := 7872k
|
||||
DEVICE_VENDOR := COMFAST
|
||||
@ -911,6 +920,16 @@ define Device/xiaomi_mi-router-4a-100m
|
||||
endef
|
||||
TARGET_DEVICES += xiaomi_mi-router-4a-100m
|
||||
|
||||
define Device/xiaomi_mi-router-4a-100m-intl
|
||||
IMAGE_SIZE := 14976k
|
||||
DEVICE_VENDOR := Xiaomi
|
||||
DEVICE_MODEL := Mi Router 4A
|
||||
DEVICE_VARIANT := 100M International Edition
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
SUPPORTED_DEVICES += xiaomi,mir4a-100m-intl
|
||||
endef
|
||||
TARGET_DEVICES += xiaomi_mi-router-4a-100m-intl
|
||||
|
||||
define Device/xiaomi_mi-router-4c
|
||||
IMAGE_SIZE := 14976k
|
||||
DEVICE_VENDOR := Xiaomi
|
||||
|
||||
@ -23,7 +23,8 @@ asus,rt-n56u-b1)
|
||||
ucidef_set_led_netdev "lan" "LAN link" "blue:lan" "br-lan"
|
||||
ucidef_set_led_netdev "wan" "WAN link" "blue:wan" "wan"
|
||||
;;
|
||||
beeline,smartbox-flash)
|
||||
beeline,smartbox-flash|\
|
||||
beeline,smartbox-giga)
|
||||
ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan"
|
||||
;;
|
||||
cudy,wr2100)
|
||||
|
||||
@ -42,6 +42,7 @@ ramips_setup_interfaces()
|
||||
;;
|
||||
asiarf,ap7621-nv1|\
|
||||
beeline,smartbox-flash|\
|
||||
beeline,smartbox-giga|\
|
||||
glinet,gl-mt1300|\
|
||||
iptime,a3002mesh|\
|
||||
jcg,q20|\
|
||||
|
||||
@ -55,6 +55,7 @@ platform_do_upgrade() {
|
||||
asus,rt-ac85p|\
|
||||
asus,rt-ax53u|\
|
||||
beeline,smartbox-flash|\
|
||||
beeline,smartbox-giga|\
|
||||
dlink,dir-1960-a1|\
|
||||
dlink,dir-2640-a1|\
|
||||
dlink,dir-2660-a1|\
|
||||
|
||||
@ -162,6 +162,7 @@ CONFIG_MTD_NAND_MTK_BMT=y
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_ROUTERBOOT_PARTS=y
|
||||
CONFIG_MTD_SERCOMM_PARTS=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPI_NOR_USE_VARIABLE_ERASE=y
|
||||
CONFIG_MTD_SPLIT_FIT_FW=y
|
||||
|
||||
@ -169,6 +169,7 @@ CONFIG_MTD_NAND_MTK_BMT=y
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_ROUTERBOOT_PARTS=y
|
||||
CONFIG_MTD_SERCOMM_PARTS=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPI_NOR_USE_VARIABLE_ERASE=y
|
||||
CONFIG_MTD_SPLIT_FIT_FW=y
|
||||
|
||||
@ -77,6 +77,10 @@ ramips_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"3:lan" "4:wan" "6@eth0"
|
||||
;;
|
||||
comfast,cf-wr617ac)
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
|
||||
;;
|
||||
comfast,cf-wr758ac-v1|\
|
||||
comfast,cf-wr758ac-v2|\
|
||||
tplink,tl-wr902ac-v3|\
|
||||
@ -148,7 +152,8 @@ ramips_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:wan" "3:lan" "4:lan" "6@eth0"
|
||||
;;
|
||||
xiaomi,mi-router-4a-100m)
|
||||
xiaomi,mi-router-4a-100m|\
|
||||
xiaomi,mi-router-4a-100m-intl)
|
||||
ucidef_add_switch "switch0" \
|
||||
"4:lan:1" "2:lan:2" "0:wan" "6@eth0"
|
||||
;;
|
||||
@ -191,6 +196,10 @@ ramips_setup_macs()
|
||||
lan_mac=$wan_mac
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
comfast,cf-wr617ac)
|
||||
lan_mac=$(mtd_get_mac_binary factory 0xe000)
|
||||
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||
;;
|
||||
cudy,wr1000|\
|
||||
hilink,hlk-7628n|\
|
||||
hilink,hlk-7688a|\
|
||||
@ -272,6 +281,7 @@ ramips_setup_macs()
|
||||
wan_mac=$(mtd_get_mac_binary factory 0x28)
|
||||
;;
|
||||
xiaomi,mi-router-4a-100m|\
|
||||
xiaomi,mi-router-4a-100m-intl|\
|
||||
xiaomi,mi-router-4c)
|
||||
wan_mac=$(mtd_get_mac_binary factory 0x4)
|
||||
;;
|
||||
|
||||
@ -14,7 +14,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -3293,6 +3293,7 @@ static const struct net_device_ops mtk_n
|
||||
@@ -3290,6 +3290,7 @@ static const struct net_device_ops mtk_n
|
||||
|
||||
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
||||
{
|
||||
@ -22,7 +22,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
||||
const __be32 *_id = of_get_property(np, "reg", NULL);
|
||||
phy_interface_t phy_mode;
|
||||
struct phylink *phylink;
|
||||
@@ -3388,6 +3389,9 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
@@ -3385,6 +3386,9 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
else
|
||||
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN;
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
|
||||
--- a/drivers/tty/serial/serial_core.c
|
||||
+++ b/drivers/tty/serial/serial_core.c
|
||||
@@ -401,6 +401,9 @@ uart_get_baud_rate(struct uart_port *por
|
||||
@@ -393,6 +393,9 @@ uart_get_baud_rate(struct uart_port *por
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -43,6 +43,13 @@
|
||||
gpio-controller;
|
||||
indirect-access-bus-id = <0>;
|
||||
|
||||
poe_enable {
|
||||
gpio-hog;
|
||||
gpios = <1 GPIO_ACTIVE_HIGH>;
|
||||
output-high;
|
||||
line-name = "poe-enable";
|
||||
};
|
||||
|
||||
sff_p9_gpios {
|
||||
gpio-hog;
|
||||
gpios = < 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user