Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
81f9f50fa4
@ -117,7 +117,7 @@ define Kernel/Configure/Default
|
|||||||
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config; \
|
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config; \
|
||||||
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev; \
|
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev; \
|
||||||
}
|
}
|
||||||
$(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(KERNEL_MAKE) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
|
$(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(KERNEL_MAKE) $(if $(findstring uml,$(BOARD)),ARCH=$(ARCH)) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
|
||||||
grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | $(MKHASH) md5 > $(LINUX_DIR)/.vermagic
|
grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | $(MKHASH) md5 > $(LINUX_DIR)/.vermagic
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -8,12 +8,12 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=intel-microcode
|
PKG_NAME:=intel-microcode
|
||||||
PKG_VERSION:=20220510
|
PKG_VERSION:=20220809
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).1.tar.xz
|
PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).1.tar.xz
|
||||||
PKG_SOURCE_URL:=@DEBIAN/pool/non-free/i/intel-microcode/
|
PKG_SOURCE_URL:=@DEBIAN/pool/non-free/i/intel-microcode/
|
||||||
PKG_HASH:=49752447c1b905dd130699cdef09fb2bba47b6f413d27787c98a5569273e283e
|
PKG_HASH:=4cf6c3638bb52d9d45c1916af866fd0929628a6f459daac3edfd369149e9c665
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/intel-microcode-3.$(PKG_VERSION).1
|
PKG_BUILD_DIR:=$(BUILD_DIR)/intel-microcode-3.$(PKG_VERSION).1
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=iucode-tool/host
|
PKG_BUILD_DEPENDS:=iucode-tool/host
|
||||||
|
@ -37,7 +37,9 @@ ALLWIFIBOARDS:= \
|
|||||||
pakedge_wr-1 \
|
pakedge_wr-1 \
|
||||||
qxwlan_e2600ac-c1 \
|
qxwlan_e2600ac-c1 \
|
||||||
qxwlan_e2600ac-c2 \
|
qxwlan_e2600ac-c2 \
|
||||||
teltonika_rutx
|
sony_ncp-hg100-cellular \
|
||||||
|
teltonika_rutx \
|
||||||
|
zte_mf289f
|
||||||
|
|
||||||
ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))
|
ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))
|
||||||
|
|
||||||
@ -110,6 +112,8 @@ $(eval $(call generate-ipq-wifi-package,p2w_r619ac,P&W R619AC))
|
|||||||
$(eval $(call generate-ipq-wifi-package,pakedge_wr-1,Pakedge WR-1))
|
$(eval $(call generate-ipq-wifi-package,pakedge_wr-1,Pakedge WR-1))
|
||||||
$(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac-c1,Qxwlan E2600AC C1))
|
$(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac-c1,Qxwlan E2600AC C1))
|
||||||
$(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac-c2,Qxwlan E2600AC C2))
|
$(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac-c2,Qxwlan E2600AC C2))
|
||||||
|
$(eval $(call generate-ipq-wifi-package,sony_ncp-hg100-cellular,Sony NCP-HG100/Cellular))
|
||||||
$(eval $(call generate-ipq-wifi-package,teltonika_rutx,Teltonika RUTX))
|
$(eval $(call generate-ipq-wifi-package,teltonika_rutx,Teltonika RUTX))
|
||||||
|
$(eval $(call generate-ipq-wifi-package,zte_mf289f,ZTE MF289F))
|
||||||
|
|
||||||
$(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE))))
|
$(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE))))
|
||||||
|
BIN
package/firmware/ipq-wifi/board-sony_ncp-hg100-cellular.qca4019
Normal file
BIN
package/firmware/ipq-wifi/board-sony_ncp-hg100-cellular.qca4019
Normal file
Binary file not shown.
BIN
package/firmware/ipq-wifi/board-zte_mf289f.qca4019
Normal file
BIN
package/firmware/ipq-wifi/board-zte_mf289f.qca4019
Normal file
Binary file not shown.
BIN
package/firmware/ipq-wifi/board-zte_mf289f.qca9984
Normal file
BIN
package/firmware/ipq-wifi/board-zte_mf289f.qca9984
Normal file
Binary file not shown.
@ -226,6 +226,7 @@ define KernelPackage/lib80211
|
|||||||
$(call KernelPackage/mac80211/Default)
|
$(call KernelPackage/mac80211/Default)
|
||||||
TITLE:=802.11 Networking stack
|
TITLE:=802.11 Networking stack
|
||||||
DEPENDS:=+kmod-cfg80211 +kmod-crypto-hash +kmod-crypto-ccm
|
DEPENDS:=+kmod-cfg80211 +kmod-crypto-hash +kmod-crypto-ccm
|
||||||
|
HIDDEN:=1
|
||||||
FILES:= \
|
FILES:= \
|
||||||
$(PKG_BUILD_DIR)/net/wireless/lib80211.ko \
|
$(PKG_BUILD_DIR)/net/wireless/lib80211.ko \
|
||||||
$(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_wep.ko \
|
$(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_wep.ko \
|
||||||
|
@ -138,8 +138,8 @@ mac80211_hostapd_setup_base() {
|
|||||||
[ -n "$acs_exclude_dfs" ] && [ "$acs_exclude_dfs" -gt 0 ] &&
|
[ -n "$acs_exclude_dfs" ] && [ "$acs_exclude_dfs" -gt 0 ] &&
|
||||||
append base_cfg "acs_exclude_dfs=1" "$N"
|
append base_cfg "acs_exclude_dfs=1" "$N"
|
||||||
|
|
||||||
json_get_vars noscan ht_coex min_tx_power:0 vendor_vht
|
json_get_vars noscan ht_coex min_tx_power:0 tx_burst vendor_vht
|
||||||
json_get_values ht_capab_list ht_capab tx_burst
|
json_get_values ht_capab_list ht_capab
|
||||||
json_get_values channel_list channels
|
json_get_values channel_list channels
|
||||||
|
|
||||||
[ "$auto_channel" = 0 ] && [ -z "$channel_list" ] && \
|
[ "$auto_channel" = 0 ] && [ -z "$channel_list" ] && \
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
--- a/drivers/staging/rtl8723bs/Kconfig
|
||||||
|
+++ b/drivers/staging/rtl8723bs/Kconfig
|
||||||
|
@@ -5,7 +5,6 @@ config RTL8723BS
|
||||||
|
depends on m
|
||||||
|
depends on WLAN && MMC && CFG80211
|
||||||
|
depends on m
|
||||||
|
- select CFG80211_WEXT
|
||||||
|
select BPAUTO_CRYPTO_LIB_ARC4
|
||||||
|
help
|
||||||
|
This option enables support for RTL8723BS SDIO drivers, such as
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=sysfsutils
|
PKG_NAME:=sysfsutils
|
||||||
PKG_VERSION:=2.1.0
|
PKG_VERSION:=2.1.0
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=4
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=@SF/linux-diag
|
PKG_SOURCE_URL:=@SF/linux-diag
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
# Based on Debian's script /etc/init.d/sysfsutils by
|
# Based on Debian's script /etc/init.d/sysfsutils by
|
||||||
# Martin Pitt <mpitt@debian.org>
|
# Martin Pitt <mpitt@debian.org>
|
||||||
|
|
||||||
|
START=11
|
||||||
|
|
||||||
load_conffile() {
|
load_conffile() {
|
||||||
FILE="$1"
|
FILE="$1"
|
||||||
sed 's/#.*$//; /^[[:space:]]*$/d;
|
sed 's/#.*$//; /^[[:space:]]*$/d;
|
||||||
@ -39,7 +41,6 @@ load_conffile() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
START=11
|
|
||||||
start() {
|
start() {
|
||||||
for file in /etc/sysfs.conf /etc/sysfs.d/*.conf; do
|
for file in /etc/sysfs.conf /etc/sysfs.d/*.conf; do
|
||||||
[ -r "$file" ] || continue
|
[ -r "$file" ] || continue
|
||||||
|
@ -67,8 +67,8 @@ config WOLFSSL_HAS_DEVCRYPTO
|
|||||||
bool
|
bool
|
||||||
|
|
||||||
if PACKAGE_libwolfssl
|
if PACKAGE_libwolfssl
|
||||||
if PACKAGE_libwolfssl-cpu-crypto
|
if PACKAGE_libwolfsslcpu-crypto
|
||||||
comment "Hardware Acceleration does not apply to libwolfssl-cpu-crypto"
|
comment "Hardware Acceleration does not apply to libwolfsslcpu-crypto"
|
||||||
endif
|
endif
|
||||||
choice
|
choice
|
||||||
prompt "Hardware Acceleration"
|
prompt "Hardware Acceleration"
|
||||||
|
@ -25,7 +25,6 @@ PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
|
|||||||
PKG_CPE_ID:=cpe:/a:wolfssl:wolfssl
|
PKG_CPE_ID:=cpe:/a:wolfssl:wolfssl
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS:=\
|
PKG_CONFIG_DEPENDS:=\
|
||||||
CONFIG_PACKAGE_libwolfssl-benchmark \
|
|
||||||
CONFIG_WOLFSSL_HAS_AES_CCM \
|
CONFIG_WOLFSSL_HAS_AES_CCM \
|
||||||
CONFIG_WOLFSSL_HAS_ARC4 \
|
CONFIG_WOLFSSL_HAS_ARC4 \
|
||||||
CONFIG_WOLFSSL_HAS_CERTGEN \
|
CONFIG_WOLFSSL_HAS_CERTGEN \
|
||||||
@ -44,6 +43,7 @@ PKG_CONFIG_DEPENDS:=\
|
|||||||
PKG_ABI_VERSION:=$(patsubst %-stable,%,$(PKG_VERSION)).$(call version_abbrev,$(call confvar,$(PKG_CONFIG_DEPENDS)))
|
PKG_ABI_VERSION:=$(patsubst %-stable,%,$(PKG_VERSION)).$(call version_abbrev,$(call confvar,$(PKG_CONFIG_DEPENDS)))
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS+=\
|
PKG_CONFIG_DEPENDS+=\
|
||||||
|
CONFIG_PACKAGE_libwolfssl-benchmark \
|
||||||
CONFIG_WOLFSSL_HAS_AFALG \
|
CONFIG_WOLFSSL_HAS_AFALG \
|
||||||
CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES \
|
CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES \
|
||||||
CONFIG_WOLFSSL_HAS_DEVCRYPTO_CBC \
|
CONFIG_WOLFSSL_HAS_DEVCRYPTO_CBC \
|
||||||
@ -67,7 +67,7 @@ $(call Package/libwolfssl/Default)
|
|||||||
ABI_VERSION:=$(PKG_ABI_VERSION)
|
ABI_VERSION:=$(PKG_ABI_VERSION)
|
||||||
VARIANT:=regular
|
VARIANT:=regular
|
||||||
DEFAULT_VARIANT:=1
|
DEFAULT_VARIANT:=1
|
||||||
CONFLICTS:=libwolfssl-cpu-crypto
|
CONFLICTS:=libwolfsslcpu-crypto
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libwolfssl/description
|
define Package/libwolfssl/description
|
||||||
@ -79,7 +79,7 @@ define Package/libwolfssl/config
|
|||||||
source "$(SOURCE)/Config.in"
|
source "$(SOURCE)/Config.in"
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libwolfssl-cpu-crypto
|
define Package/libwolfsslcpu-crypto
|
||||||
$(call Package/libwolfssl/Default)
|
$(call Package/libwolfssl/Default)
|
||||||
TITLE:=wolfSSL library with AES CPU instructions
|
TITLE:=wolfSSL library with AES CPU instructions
|
||||||
PROVIDES:=libwolfssl libcyassl
|
PROVIDES:=libwolfssl libcyassl
|
||||||
@ -94,20 +94,20 @@ $(call Package/libwolfssl/Default)
|
|||||||
DEPENDS:=libwolfssl
|
DEPENDS:=libwolfssl
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libwolfssl-cpu-crypto/description
|
define Package/libwolfsslcpu-crypto/description
|
||||||
$(call Package/libwolfssl/description)
|
$(call Package/libwolfssl/description)
|
||||||
This variant uses AES CPU instructions (Intel AESNI or ARMv8 Crypto Extension)
|
This variant uses AES CPU instructions (Intel AESNI or ARMv8 Crypto Extension)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libwolfssl-cpu-crypto/config
|
define Package/libwolfsslcpu-crypto/config
|
||||||
if TARGET_armvirt && PACKAGE_libwolfssl-cpu-crypto = y
|
if TARGET_armvirt && PACKAGE_libwolfsslcpu-crypto = y
|
||||||
comment "You are about to build libwolfssl-cpu-crypto into an armvirt_64 image."
|
comment "You are about to build libwolfsslcpu-crypto into an armvirt_64 image."
|
||||||
comment "Ensure all of your installation targets support the Crypto Extension. "
|
comment "Ensure all of your installation targets support the Crypto Extension. "
|
||||||
comment "Look for the 'aes' feature in /proc/cpuinfo. This library does not do "
|
comment "Look for the 'aes' feature in /proc/cpuinfo. This library does not do "
|
||||||
comment "run-time detection and will crash if the CPU does not support it. "
|
comment "run-time detection and will crash if the CPU does not support it. "
|
||||||
endif
|
endif
|
||||||
if TARGET_bcm27xx && PACKAGE_libwolfssl-cpu-crypto
|
if TARGET_bcm27xx && PACKAGE_libwolfsslcpu-crypto
|
||||||
comment "Beware that libwolfssl-cpu-crypto will not run in a bcm27xx target. "
|
comment "Beware that libwolfsslcpu-crypto will not run in a bcm27xx target. "
|
||||||
endif
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ else ifdef CONFIG_aarch64
|
|||||||
CONFIGURE_ARGS += --enable-armasm
|
CONFIGURE_ARGS += --enable-armasm
|
||||||
TARGET_CFLAGS:=$(TARGET_CFLAGS:-mcpu%=-mcpu%+crypto)
|
TARGET_CFLAGS:=$(TARGET_CFLAGS:-mcpu%=-mcpu%+crypto)
|
||||||
WOLFSSL_NOASM_REGEX:=^bcm27xx/.*
|
WOLFSSL_NOASM_REGEX:=^bcm27xx/.*
|
||||||
Package/libwolfssl-cpu-crypto/preinst=\
|
Package/libwolfsslcpu-crypto/preinst=\
|
||||||
$(subst @@WOLFSSL_NOASM_REGEX@@,$(WOLFSSL_NOASM_REGEX),$(file <preinst.arm-ce))
|
$(subst @@WOLFSSL_NOASM_REGEX@@,$(WOLFSSL_NOASM_REGEX),$(file <preinst.arm-ce))
|
||||||
else ifdef CONFIG_TARGET_x86_64
|
else ifdef CONFIG_TARGET_x86_64
|
||||||
CONFIGURE_ARGS += --enable-intelasm
|
CONFIGURE_ARGS += --enable-intelasm
|
||||||
@ -194,7 +194,7 @@ define Package/libwolfssl/install
|
|||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so.* $(1)/usr/lib/
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so.* $(1)/usr/lib/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
Package/libwolfssl-cpu-crypto/install=$(Package/libwolfssl/install)
|
Package/libwolfsslcpu-crypto/install=$(Package/libwolfssl/install)
|
||||||
|
|
||||||
define Package/libwolfssl-benchmark/install
|
define Package/libwolfssl-benchmark/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
@ -202,5 +202,5 @@ define Package/libwolfssl-benchmark/install
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,libwolfssl))
|
$(eval $(call BuildPackage,libwolfssl))
|
||||||
$(eval $(call BuildPackage,libwolfssl-cpu-crypto))
|
$(eval $(call BuildPackage,libwolfsslcpu-crypto))
|
||||||
$(eval $(call BuildPackage,libwolfssl-benchmark))
|
$(eval $(call BuildPackage,libwolfssl-benchmark))
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec >&2
|
exec >&2
|
||||||
printf "[libwolfssl-cpu-crypto] Checking for Arm v8-A Cryptographic Extension support: "
|
printf "[libwolfsslcpu-crypto] Checking for Arm v8-A Cryptographic Extension support: "
|
||||||
if [ -n "${IPKG_INSTROOT}" ]; then
|
if [ -n "${IPKG_INSTROOT}" ]; then
|
||||||
printf "...[offline]... "
|
printf "...[offline]... "
|
||||||
eval "$(grep '^DISTRIB_TARGET=' "${IPKG_INSTROOT}/etc/openwrt_release")"
|
eval "$(grep '^DISTRIB_TARGET=' "${IPKG_INSTROOT}/etc/openwrt_release")"
|
||||||
@ -8,14 +8,14 @@ if [ -n "${IPKG_INSTROOT}" ]; then
|
|||||||
echo "${DISTRIB_TARGET}" | grep '@@WOLFSSL_NOASM_REGEX@@' > /dev/null && {
|
echo "${DISTRIB_TARGET}" | grep '@@WOLFSSL_NOASM_REGEX@@' > /dev/null && {
|
||||||
echo "not supported"
|
echo "not supported"
|
||||||
echo "Error: Target ${DISTRIB_TARGET} does not support Arm Cryptographic Extension."
|
echo "Error: Target ${DISTRIB_TARGET} does not support Arm Cryptographic Extension."
|
||||||
echo "Install the regular libwolfssl package instead of libwolfssl-cpu-crypto."
|
echo "Install the regular libwolfssl package instead of libwolfsslcpu-crypto."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
grep -q '^Features.*\baes\b' /proc/cpuinfo || {
|
grep -q '^Features.*\baes\b' /proc/cpuinfo || {
|
||||||
echo "not supported"
|
echo "not supported"
|
||||||
echo "Error: Arm v8-A Cryptographic Extension not supported."
|
echo "Error: Arm v8-A Cryptographic Extension not supported."
|
||||||
echo "Install the regular libwolfssl package instead of libwolfssl-cpu-crypto."
|
echo "Install the regular libwolfssl package instead of libwolfsslcpu-crypto."
|
||||||
echo "Contents of /proc/cpuinfo:"
|
echo "Contents of /proc/cpuinfo:"
|
||||||
cat /proc/cpuinfo
|
cat /proc/cpuinfo
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=nftables
|
PKG_NAME:=nftables
|
||||||
PKG_VERSION:=1.0.5
|
PKG_VERSION:=1.0.5
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
|
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
|
||||||
|
23
package/network/utils/nftables/patches/0001-fix-nft.patch
Normal file
23
package/network/utils/nftables/patches/0001-fix-nft.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
'rule inet dscpclassify dscp_match meta l4proto { udp } th dport { 3478 } th sport { 3478-3497, 16384-16387 } goto ct_set_ef'
|
||||||
|
works with 'nft add', but not 'nft insert', the latter yields: "BUG: unhandled op 4".
|
||||||
|
|
||||||
|
Fixes: 81e36530fcac ("src: replace interval segment tree overlap and automerge")
|
||||||
|
Signed-off-by: Florian Westphal <fw@strlen.de>
|
||||||
|
---
|
||||||
|
src/evaluate.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/src/evaluate.c b/src/evaluate.c
|
||||||
|
index d9c9ca28a53a..edebd7bcd8ab 100644
|
||||||
|
--- a/src/evaluate.c
|
||||||
|
+++ b/src/evaluate.c
|
||||||
|
@@ -1520,6 +1520,7 @@ static int interval_set_eval(struct eval_ctx *ctx, struct set *set,
|
||||||
|
switch (ctx->cmd->op) {
|
||||||
|
case CMD_CREATE:
|
||||||
|
case CMD_ADD:
|
||||||
|
+ case CMD_INSERT:
|
||||||
|
if (set->automerge) {
|
||||||
|
ret = set_automerge(ctx->msgs, ctx->cmd, set, init,
|
||||||
|
ctx->nft->debug_mask);
|
||||||
|
--
|
||||||
|
2.35.1
|
@ -70,27 +70,50 @@ sub hash_cmd() {
|
|||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub download_cmd($) {
|
sub download_cmd {
|
||||||
my $url = shift;
|
my $url = shift;
|
||||||
my $have_curl = 0;
|
my $have_curl = 0;
|
||||||
|
my $have_aria2c = 0;
|
||||||
|
my $filename = shift;
|
||||||
|
my $additional_mirrors = join(" ", map "$_/$filename", @_);
|
||||||
|
|
||||||
if (open CURL, "curl --version 2>/dev/null |") {
|
my @chArray = ('a'..'z', 'A'..'Z', 0..9);
|
||||||
|
my $rfn = join '', "${filename}_", map{ $chArray[int rand @chArray] } 0..9;
|
||||||
|
if (open CURL, '-|', 'curl', '--version') {
|
||||||
if (defined(my $line = readline CURL)) {
|
if (defined(my $line = readline CURL)) {
|
||||||
$have_curl = 1 if $line =~ /^curl /;
|
$have_curl = 1 if $line =~ /^curl /;
|
||||||
}
|
}
|
||||||
close CURL;
|
close CURL;
|
||||||
}
|
}
|
||||||
|
if (open ARIA2C, '-|', 'aria2c', '--version') {
|
||||||
|
if (defined(my $line = readline ARIA2C)) {
|
||||||
|
$have_aria2c = 1 if $line =~ /^aria2 /;
|
||||||
|
}
|
||||||
|
close ARIA2C;
|
||||||
|
}
|
||||||
|
|
||||||
return $have_curl
|
if ($have_aria2c) {
|
||||||
? (qw(curl -f --connect-timeout 20 --retry 5 --location),
|
@mirrors=();
|
||||||
|
return join(" ", "[ -d $ENV{'TMPDIR'}/aria2c ] || mkdir $ENV{'TMPDIR'}/aria2c;",
|
||||||
|
"touch $ENV{'TMPDIR'}/aria2c/${rfn}_spp;",
|
||||||
|
qw(aria2c --stderr -c -x2 -s10 -j10 -k1M), $url, $additional_mirrors,
|
||||||
|
$check_certificate ? () : '--check-certificate=false',
|
||||||
|
"--server-stat-of=$ENV{'TMPDIR'}/aria2c/${rfn}_spp",
|
||||||
|
"--server-stat-if=$ENV{'TMPDIR'}/aria2c/${rfn}_spp",
|
||||||
|
"-d $ENV{'TMPDIR'}/aria2c -o $rfn;",
|
||||||
|
"cat $ENV{'TMPDIR'}/aria2c/$rfn;",
|
||||||
|
"rm $ENV{'TMPDIR'}/aria2c/$rfn $ENV{'TMPDIR'}/aria2c/${rfn}_spp");
|
||||||
|
} elsif ($have_curl) {
|
||||||
|
return (qw(curl -f --connect-timeout 20 --retry 5 --location),
|
||||||
$check_certificate ? () : '--insecure',
|
$check_certificate ? () : '--insecure',
|
||||||
shellwords($ENV{CURL_OPTIONS} || ''),
|
shellwords($ENV{CURL_OPTIONS} || ''),
|
||||||
$url)
|
$url);
|
||||||
: (qw(wget --tries=5 --timeout=20 --output-document=-),
|
} else {
|
||||||
|
return (qw(wget --tries=5 --timeout=20 --output-document=-),
|
||||||
$check_certificate ? () : '--no-check-certificate',
|
$check_certificate ? () : '--no-check-certificate',
|
||||||
shellwords($ENV{WGET_OPTIONS} || ''),
|
shellwords($ENV{WGET_OPTIONS} || ''),
|
||||||
$url)
|
$url);
|
||||||
;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my $hash_cmd = hash_cmd();
|
my $hash_cmd = hash_cmd();
|
||||||
@ -100,6 +123,7 @@ sub download
|
|||||||
{
|
{
|
||||||
my $mirror = shift;
|
my $mirror = shift;
|
||||||
my $download_filename = shift;
|
my $download_filename = shift;
|
||||||
|
my @additional_mirrors = @_;
|
||||||
|
|
||||||
$mirror =~ s!/$!!;
|
$mirror =~ s!/$!!;
|
||||||
|
|
||||||
@ -146,9 +170,9 @@ sub download
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
my @cmd = download_cmd("$mirror/$download_filename");
|
my @cmd = download_cmd("$mirror/$download_filename", $download_filename, @additional_mirrors);
|
||||||
print STDERR "+ ".join(" ",@cmd)."\n";
|
print STDERR "+ ".join(" ",@cmd)."\n";
|
||||||
open(FETCH_FD, '-|', @cmd) or die "Cannot launch curl or wget.\n";
|
open(FETCH_FD, '-|', @cmd) or die "Cannot launch aria2c, curl or wget.\n";
|
||||||
$hash_cmd and do {
|
$hash_cmd and do {
|
||||||
open MD5SUM, "| $hash_cmd > '$target/$filename.hash'" or die "Cannot launch $hash_cmd.\n";
|
open MD5SUM, "| $hash_cmd > '$target/$filename.hash'" or die "Cannot launch $hash_cmd.\n";
|
||||||
};
|
};
|
||||||
@ -324,9 +348,9 @@ while (!-f "$target/$filename") {
|
|||||||
my $mirror = shift @mirrors;
|
my $mirror = shift @mirrors;
|
||||||
$mirror or die "No more mirrors to try - giving up.\n";
|
$mirror or die "No more mirrors to try - giving up.\n";
|
||||||
|
|
||||||
download($mirror, $url_filename);
|
download($mirror, $url_filename, @mirrors);
|
||||||
if (!-f "$target/$filename" && $url_filename ne $filename) {
|
if (!-f "$target/$filename" && $url_filename ne $filename) {
|
||||||
download($mirror, $filename);
|
download($mirror, $filename, @mirrors);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,8 +9,7 @@ CPU_TYPE:=464fp
|
|||||||
FEATURES:=fpu dt gpio ramdisk squashfs usb
|
FEATURES:=fpu dt gpio ramdisk squashfs usb
|
||||||
SUBTARGETS:=nand sata
|
SUBTARGETS:=nand sata
|
||||||
|
|
||||||
KERNEL_PATCHVER:=5.10
|
KERNEL_PATCHVER:=5.15
|
||||||
KERNEL_TESTING_PATCHVER:=5.15
|
|
||||||
|
|
||||||
define Target/Description
|
define Target/Description
|
||||||
Build images for AppliedMicro APM821xx based boards.
|
Build images for AppliedMicro APM821xx based boards.
|
||||||
|
@ -38,7 +38,6 @@ CONFIG_CPU_BIG_ENDIAN=y
|
|||||||
CONFIG_CRC16=y
|
CONFIG_CRC16=y
|
||||||
# CONFIG_CRC32_SARWATE is not set
|
# CONFIG_CRC32_SARWATE is not set
|
||||||
CONFIG_CRC32_SLICEBY8=y
|
CONFIG_CRC32_SLICEBY8=y
|
||||||
CONFIG_CRYPTO_BLAKE2S=y
|
|
||||||
CONFIG_CRYPTO_DEFLATE=y
|
CONFIG_CRYPTO_DEFLATE=y
|
||||||
CONFIG_CRYPTO_DEV_PPC4XX=y
|
CONFIG_CRYPTO_DEV_PPC4XX=y
|
||||||
CONFIG_CRYPTO_HW=y
|
CONFIG_CRYPTO_HW=y
|
||||||
@ -76,7 +75,6 @@ CONFIG_GENERIC_BUG=y
|
|||||||
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
|
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
|
||||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||||
CONFIG_GENERIC_CPU=y
|
|
||||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||||
@ -180,6 +178,7 @@ CONFIG_PHYSICAL_START=0x00000000
|
|||||||
CONFIG_PHYS_64BIT=y
|
CONFIG_PHYS_64BIT=y
|
||||||
CONFIG_PHYS_ADDR_T_64BIT=y
|
CONFIG_PHYS_ADDR_T_64BIT=y
|
||||||
# CONFIG_PMU_SYSFS is not set
|
# CONFIG_PMU_SYSFS is not set
|
||||||
|
# CONFIG_POWERPC_CPU is not set
|
||||||
CONFIG_PPC=y
|
CONFIG_PPC=y
|
||||||
CONFIG_PPC32=y
|
CONFIG_PPC32=y
|
||||||
CONFIG_PPC44x_SIMPLE=y
|
CONFIG_PPC44x_SIMPLE=y
|
||||||
@ -233,6 +232,7 @@ CONFIG_THREAD_INFO_IN_TASK=y
|
|||||||
CONFIG_THREAD_SHIFT=13
|
CONFIG_THREAD_SHIFT=13
|
||||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||||
CONFIG_TINY_SRCU=y
|
CONFIG_TINY_SRCU=y
|
||||||
|
CONFIG_TOOLCHAIN_DEFAULT_CPU=y
|
||||||
CONFIG_USB_SUPPORT=y
|
CONFIG_USB_SUPPORT=y
|
||||||
CONFIG_VDSO32=y
|
CONFIG_VDSO32=y
|
||||||
# CONFIG_VIRTIO_MENU is not set
|
# CONFIG_VIRTIO_MENU is not set
|
||||||
|
@ -8,8 +8,7 @@ SUBTARGETS:=generic mikrotik nand tiny
|
|||||||
|
|
||||||
FEATURES:=ramdisk squashfs usbgadget
|
FEATURES:=ramdisk squashfs usbgadget
|
||||||
|
|
||||||
KERNEL_PATCHVER:=5.10
|
KERNEL_PATCHVER:=5.15
|
||||||
KERNEL_TESTING_PATCHVER:=5.15
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/target.mk
|
include $(INCLUDE_DIR)/target.mk
|
||||||
|
|
||||||
|
@ -2652,6 +2652,7 @@ CONFIG_INPUT_MISC=y
|
|||||||
# CONFIG_INTEL_HID_EVENT is not set
|
# CONFIG_INTEL_HID_EVENT is not set
|
||||||
# CONFIG_INTEL_IDLE is not set
|
# CONFIG_INTEL_IDLE is not set
|
||||||
# CONFIG_INTEL_IDMA64 is not set
|
# CONFIG_INTEL_IDMA64 is not set
|
||||||
|
# CONFIG_INTEL_IDXD is not set
|
||||||
# CONFIG_INTEL_INT0002_VGPIO is not set
|
# CONFIG_INTEL_INT0002_VGPIO is not set
|
||||||
# CONFIG_INTEL_IOATDMA is not set
|
# CONFIG_INTEL_IOATDMA is not set
|
||||||
# CONFIG_INTEL_ISH_HID is not set
|
# CONFIG_INTEL_ISH_HID is not set
|
||||||
@ -2679,6 +2680,7 @@ CONFIG_INPUT_MISC=y
|
|||||||
# CONFIG_INV_MPU6050_I2C is not set
|
# CONFIG_INV_MPU6050_I2C is not set
|
||||||
# CONFIG_INV_MPU6050_IIO is not set
|
# CONFIG_INV_MPU6050_IIO is not set
|
||||||
# CONFIG_INV_MPU6050_SPI is not set
|
# CONFIG_INV_MPU6050_SPI is not set
|
||||||
|
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
|
||||||
# CONFIG_IOMMU_SUPPORT is not set
|
# CONFIG_IOMMU_SUPPORT is not set
|
||||||
# CONFIG_IONIC is not set
|
# CONFIG_IONIC is not set
|
||||||
# CONFIG_IOSCHED_BFQ is not set
|
# CONFIG_IOSCHED_BFQ is not set
|
||||||
@ -7031,6 +7033,7 @@ CONFIG_VHOST_MENU=y
|
|||||||
# CONFIG_VIRTIO_CONSOLE is not set
|
# CONFIG_VIRTIO_CONSOLE is not set
|
||||||
# CONFIG_VIRTIO_FS is not set
|
# CONFIG_VIRTIO_FS is not set
|
||||||
# CONFIG_VIRTIO_INPUT is not set
|
# CONFIG_VIRTIO_INPUT is not set
|
||||||
|
# CONFIG_VIRTIO_IOMMU is not set
|
||||||
CONFIG_VIRTIO_MENU=y
|
CONFIG_VIRTIO_MENU=y
|
||||||
# CONFIG_VIRTIO_MMIO is not set
|
# CONFIG_VIRTIO_MMIO is not set
|
||||||
# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set
|
# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set
|
||||||
|
@ -2746,6 +2746,8 @@ CONFIG_INPUT_MISC=y
|
|||||||
# CONFIG_INTEL_HID_EVENT is not set
|
# CONFIG_INTEL_HID_EVENT is not set
|
||||||
# CONFIG_INTEL_IDLE is not set
|
# CONFIG_INTEL_IDLE is not set
|
||||||
# CONFIG_INTEL_IDMA64 is not set
|
# CONFIG_INTEL_IDMA64 is not set
|
||||||
|
# CONFIG_INTEL_IDXD is not set
|
||||||
|
# CONFIG_INTEL_IDXD_COMPAT is not set
|
||||||
# CONFIG_INTEL_INT0002_VGPIO is not set
|
# CONFIG_INTEL_INT0002_VGPIO is not set
|
||||||
# CONFIG_INTEL_IOATDMA is not set
|
# CONFIG_INTEL_IOATDMA is not set
|
||||||
# CONFIG_INTEL_ISH_HID is not set
|
# CONFIG_INTEL_ISH_HID is not set
|
||||||
@ -2773,6 +2775,9 @@ CONFIG_INPUT_MISC=y
|
|||||||
# CONFIG_INV_MPU6050_I2C is not set
|
# CONFIG_INV_MPU6050_I2C is not set
|
||||||
# CONFIG_INV_MPU6050_IIO is not set
|
# CONFIG_INV_MPU6050_IIO is not set
|
||||||
# CONFIG_INV_MPU6050_SPI is not set
|
# CONFIG_INV_MPU6050_SPI is not set
|
||||||
|
# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
|
||||||
|
# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not set
|
||||||
|
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
|
||||||
# CONFIG_IOMMU_SUPPORT is not set
|
# CONFIG_IOMMU_SUPPORT is not set
|
||||||
# CONFIG_IONIC is not set
|
# CONFIG_IONIC is not set
|
||||||
# CONFIG_IOSCHED_BFQ is not set
|
# CONFIG_IOSCHED_BFQ is not set
|
||||||
@ -7362,6 +7367,7 @@ CONFIG_VHOST_MENU=y
|
|||||||
# CONFIG_VIRTIO_CONSOLE is not set
|
# CONFIG_VIRTIO_CONSOLE is not set
|
||||||
# CONFIG_VIRTIO_FS is not set
|
# CONFIG_VIRTIO_FS is not set
|
||||||
# CONFIG_VIRTIO_INPUT is not set
|
# CONFIG_VIRTIO_INPUT is not set
|
||||||
|
# CONFIG_VIRTIO_IOMMU is not set
|
||||||
CONFIG_VIRTIO_MENU=y
|
CONFIG_VIRTIO_MENU=y
|
||||||
# CONFIG_VIRTIO_MMIO is not set
|
# CONFIG_VIRTIO_MMIO is not set
|
||||||
# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set
|
# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
From dd07dd394d8bfdb5d527fab18ca54f20815ec4e4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Will Moss <willormos@gmail.com>
|
||||||
|
Date: Wed, 3 Aug 2022 13:48:55 +0000
|
||||||
|
Subject: [PATCH] of_net: do mac-address-increment only once
|
||||||
|
|
||||||
|
Remove mac-address-increment and mac-address-increment-byte
|
||||||
|
DT property after incrementing process to make sure MAC address
|
||||||
|
would not get incremented more if this function is stared again.
|
||||||
|
It could happen if device initialization is deferred after
|
||||||
|
unsuccessful attempt.
|
||||||
|
|
||||||
|
Signed-off-by: Will Moss <willormos@gmail.com>
|
||||||
|
---
|
||||||
|
drivers/of/of_net.c | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
--- a/drivers/of/of_net.c
|
||||||
|
+++ b/drivers/of/of_net.c
|
||||||
|
@@ -190,6 +190,12 @@ found:
|
||||||
|
addr[3] = (mac_val >> 16) & 0xff;
|
||||||
|
addr[4] = (mac_val >> 8) & 0xff;
|
||||||
|
addr[5] = (mac_val >> 0) & 0xff;
|
||||||
|
+
|
||||||
|
+ /* Remove mac-address-increment and mac-address-increment-byte
|
||||||
|
+ * DT property to make sure MAC address would not get incremented
|
||||||
|
+ * more if this function is stared again. */
|
||||||
|
+ of_remove_property(np, of_find_property(np, "mac-address-increment", NULL));
|
||||||
|
+ of_remove_property(np, of_find_property(np, "mac-address-increment-byte", NULL));
|
||||||
|
}
|
||||||
|
|
||||||
|
of_add_mac_address(np, addr);
|
@ -0,0 +1,31 @@
|
|||||||
|
From dd07dd394d8bfdb5d527fab18ca54f20815ec4e4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Will Moss <willormos@gmail.com>
|
||||||
|
Date: Wed, 3 Aug 2022 13:48:55 +0000
|
||||||
|
Subject: [PATCH] of_net: do mac-address-increment only once
|
||||||
|
|
||||||
|
Remove mac-address-increment and mac-address-increment-byte
|
||||||
|
DT property after incrementing process to make sure MAC address
|
||||||
|
would not get incremented more if this function is stared again.
|
||||||
|
It could happen if device initialization is deferred after
|
||||||
|
unsuccessful attempt.
|
||||||
|
|
||||||
|
Signed-off-by: Will Moss <willormos@gmail.com>
|
||||||
|
---
|
||||||
|
drivers/of/of_net.c | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
--- a/net/core/of_net.c
|
||||||
|
+++ b/net/core/of_net.c
|
||||||
|
@@ -194,6 +194,12 @@ found:
|
||||||
|
addr[3] = (mac_val >> 16) & 0xff;
|
||||||
|
addr[4] = (mac_val >> 8) & 0xff;
|
||||||
|
addr[5] = (mac_val >> 0) & 0xff;
|
||||||
|
+
|
||||||
|
+ /* Remove mac-address-increment and mac-address-increment-byte
|
||||||
|
+ * DT property to make sure MAC address would not get incremented
|
||||||
|
+ * more if this function is stared again. */
|
||||||
|
+ of_remove_property(np, of_find_property(np, "mac-address-increment", NULL));
|
||||||
|
+ of_remove_property(np, of_find_property(np, "mac-address-increment-byte", NULL));
|
||||||
|
}
|
||||||
|
|
||||||
|
of_add_mac_address(np, addr);
|
@ -94,6 +94,11 @@ qxwlan,e2600ac-c2)
|
|||||||
ucidef_set_led_wlan "wlan2g" "WLAN0" "green:wlan0" "phy0tpt"
|
ucidef_set_led_wlan "wlan2g" "WLAN0" "green:wlan0" "phy0tpt"
|
||||||
ucidef_set_led_wlan "wlan5g" "WLAN1" "green:wlan1" "phy1tpt"
|
ucidef_set_led_wlan "wlan5g" "WLAN1" "green:wlan1" "phy1tpt"
|
||||||
;;
|
;;
|
||||||
|
sony,ncp-hg100-cellular)
|
||||||
|
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
||||||
|
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||||
|
ucidef_set_led_netdev "wwan" "WWAN" "green:wan-4" "wwan0"
|
||||||
|
;;
|
||||||
zyxel,nbg6617 |\
|
zyxel,nbg6617 |\
|
||||||
zyxel,wre6606)
|
zyxel,wre6606)
|
||||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy0tpt"
|
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy0tpt"
|
||||||
|
@ -19,7 +19,8 @@ ipq40xx_setup_interfaces()
|
|||||||
luma,wrtq-329acn|\
|
luma,wrtq-329acn|\
|
||||||
netgear,wac510|\
|
netgear,wac510|\
|
||||||
plasmacloud,pa1200|\
|
plasmacloud,pa1200|\
|
||||||
plasmacloud,pa2200)
|
plasmacloud,pa2200|\
|
||||||
|
sony,ncp-hg100-cellular)
|
||||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||||
;;
|
;;
|
||||||
aruba,ap-303|\
|
aruba,ap-303|\
|
||||||
@ -160,6 +161,11 @@ ipq40xx_setup_interfaces()
|
|||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
"0u@eth0" "2:lan:4" "3:lan:3" "4:lan:2" "0u@eth1" "5:wan"
|
"0u@eth0" "2:lan:4" "3:lan:3" "4:lan:2" "0u@eth1" "5:wan"
|
||||||
;;
|
;;
|
||||||
|
zte,mf289f)
|
||||||
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||||
|
ucidef_add_switch "switch0" \
|
||||||
|
"0u@eth0" "0u@eth1" "2:lan:1" "5:lan:2"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unsupported hardware. Network interfaces not initialized"
|
echo "Unsupported hardware. Network interfaces not initialized"
|
||||||
;;
|
;;
|
||||||
|
@ -24,7 +24,11 @@ mikrotik,cap-ac)
|
|||||||
mikrotik,hap-ac3)
|
mikrotik,hap-ac3)
|
||||||
ucidef_add_gpio_switch "poe_passtrough" "PoE Passthrough" "452" "0"
|
ucidef_add_gpio_switch "poe_passtrough" "PoE Passthrough" "452" "0"
|
||||||
;;
|
;;
|
||||||
zte,mf286d)
|
sony,ncp-hg100-cellular)
|
||||||
|
ucidef_add_gpio_switch "uart_dbgcon_en" "debug console enable" "427" "1"
|
||||||
|
;;
|
||||||
|
zte,mf286d|\
|
||||||
|
zte,mf289f)
|
||||||
ucidef_add_gpio_switch "power_btn_block" "Power button blocker" "421" "0"
|
ucidef_add_gpio_switch "power_btn_block" "Power button blocker" "421" "0"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -141,6 +141,13 @@ case "$FIRMWARE" in
|
|||||||
caldata_extract "0:ART" 0x1000 0x2f20
|
caldata_extract "0:ART" 0x1000 0x2f20
|
||||||
ath10k_patch_mac $(macaddr_add $(get_mac_label) 2)
|
ath10k_patch_mac $(macaddr_add $(get_mac_label) 2)
|
||||||
;;
|
;;
|
||||||
|
teltonika,rutx10)
|
||||||
|
caldata_extract "0:ART" 0x1000 0x2f20
|
||||||
|
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:CONFIG" 0x0) 2)
|
||||||
|
;;
|
||||||
|
sony,ncp-hg100-cellular)
|
||||||
|
caldata_extract_mmc "0:ART" 0x1000 0x2f20
|
||||||
|
;;
|
||||||
zyxel,nbg6617 |\
|
zyxel,nbg6617 |\
|
||||||
zyxel,wre6606)
|
zyxel,wre6606)
|
||||||
caldata_extract "ART" 0x1000 0x2f20
|
caldata_extract "ART" 0x1000 0x2f20
|
||||||
@ -232,6 +239,13 @@ case "$FIRMWARE" in
|
|||||||
caldata_extract "0:ART" 0x5000 0x2f20
|
caldata_extract "0:ART" 0x5000 0x2f20
|
||||||
ath10k_patch_mac $(macaddr_add $(get_mac_label) 4)
|
ath10k_patch_mac $(macaddr_add $(get_mac_label) 4)
|
||||||
;;
|
;;
|
||||||
|
teltonika,rutx10)
|
||||||
|
caldata_extract "0:ART" 0x5000 0x2f20
|
||||||
|
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:CONFIG" 0x0) 3)
|
||||||
|
;;
|
||||||
|
sony,ncp-hg100-cellular)
|
||||||
|
caldata_extract_mmc "0:ART" 0x5000 0x2f20
|
||||||
|
;;
|
||||||
zyxel,nbg6617 |\
|
zyxel,nbg6617 |\
|
||||||
zyxel,wre6606)
|
zyxel,wre6606)
|
||||||
caldata_extract "ART" 0x5000 0x2f20
|
caldata_extract "ART" 0x5000 0x2f20
|
||||||
|
@ -25,7 +25,8 @@ Once this is done. Retry.
|
|||||||
EOF
|
EOF
|
||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
zte,mf286d)
|
zte,mf286d |\
|
||||||
|
zte,mf289f)
|
||||||
CI_UBIPART="rootfs"
|
CI_UBIPART="rootfs"
|
||||||
local mtdnum="$( find_mtd_index $CI_UBIPART )"
|
local mtdnum="$( find_mtd_index $CI_UBIPART )"
|
||||||
[ ! "$mtdnum" ] && return 1
|
[ ! "$mtdnum" ] && return 1
|
||||||
@ -194,8 +195,12 @@ platform_do_upgrade() {
|
|||||||
PART_NAME="inactive"
|
PART_NAME="inactive"
|
||||||
platform_do_upgrade_dualboot_datachk "$1"
|
platform_do_upgrade_dualboot_datachk "$1"
|
||||||
;;
|
;;
|
||||||
|
sony,ncp-hg100-cellular)
|
||||||
|
sony_emmc_do_upgrade "$1"
|
||||||
|
;;
|
||||||
teltonika,rutx10 |\
|
teltonika,rutx10 |\
|
||||||
zte,mf286d)
|
zte,mf286d |\
|
||||||
|
zte,mf289f)
|
||||||
CI_UBIPART="rootfs"
|
CI_UBIPART="rootfs"
|
||||||
nand_do_upgrade "$1"
|
nand_do_upgrade "$1"
|
||||||
;;
|
;;
|
||||||
|
91
target/linux/ipq40xx/base-files/lib/upgrade/sony.sh
Normal file
91
target/linux/ipq40xx/base-files/lib/upgrade/sony.sh
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
. /lib/functions.sh
|
||||||
|
|
||||||
|
update_bootconfig() {
|
||||||
|
local offset=$1
|
||||||
|
local index="$2"
|
||||||
|
local cfgpart=$(find_mmc_part "0:BOOTCONFIG")
|
||||||
|
local cur_index
|
||||||
|
|
||||||
|
if [ -z "$cfgpart" ]; then
|
||||||
|
echo "failed to get the partition: \"0:BOOTCONFIG\""
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cur_index=$(dd if=${cfgpart} bs=1 count=1 skip=$offset 2> /dev/null | hexdump -e '"%d"')
|
||||||
|
if [ ${index} != ${cur_index} ]; then
|
||||||
|
echo "updating \"0:BOOTCONFIG\""
|
||||||
|
echo -en "\x0${index}" | \
|
||||||
|
dd of=${cfgpart} bs=1 count=1 seek=$offset conv=notrunc 2>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
# also update 0:BOOTCONFIG1 if exists
|
||||||
|
cfgpart=$(find_mmc_part "0:BOOTCONFIG1")
|
||||||
|
[ -z "$cfgpart" ] && return
|
||||||
|
|
||||||
|
cur_index=$(dd if=${cfgpart} bs=1 count=1 skip=$offset 2> /dev/null | hexdump -e '"%d"')
|
||||||
|
if [ ${index} != ${cur_index} ]; then
|
||||||
|
echo "updating \"0:BOOTCONFIG1\""
|
||||||
|
echo -en "\x0${index}" | \
|
||||||
|
dd of=${cfgpart} bs=1 count=1 seek=$offset conv=notrunc 2>/dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
### Note ###
|
||||||
|
# After the commit bad1835f27ec31dbc30060b03cc714212275168a in fstools,
|
||||||
|
# p17 (label: "rootfs_data") is mounted as a rootfs_data on boot instead
|
||||||
|
# of the loop device labeled as "rootfs_data" in p15 (label: "rootfs").
|
||||||
|
#
|
||||||
|
# cmdline flag is added to avoid mount "rootfs_data" partition by the
|
||||||
|
# commit 964d1e3af0e111bad6d393f8a3be702e334c2398 in fstools, but
|
||||||
|
# NCP-HG100 doesn't use it because it has a large (abount 1.6GB)
|
||||||
|
# "rootfs_data" partition and the advantage is larger than the
|
||||||
|
# disadvantages, such as overwriting the stock data in "rootfs_data"
|
||||||
|
# partition.
|
||||||
|
sony_emmc_do_upgrade() {
|
||||||
|
local tar_file=$1
|
||||||
|
local kernel_dev
|
||||||
|
local rootfs_dev
|
||||||
|
local board_dir
|
||||||
|
|
||||||
|
kernel_dev=$(find_mmc_part "0:HLOS")
|
||||||
|
rootfs_dev=$(find_mmc_part "rootfs")
|
||||||
|
rootfs_data_dev=$(find_mmc_part "rootfs_data")
|
||||||
|
|
||||||
|
if [ -z "$kernel_dev" ] || [ -z "$rootfs_dev" ] || [ -z "$rootfs_data_dev" ]; then
|
||||||
|
echo "The partition name for kernel or rootfs or rootfs_data is not specified or failed to get the mmc device."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# use first partitions of kernel/rootfs for NCP-HG100
|
||||||
|
# - offset 88 (0x58): 0:HLOS (kernel)
|
||||||
|
# - offset 108 (0x6c): rootfs
|
||||||
|
update_bootconfig 88 0 || exit 1
|
||||||
|
update_bootconfig 108 0 || exit 1
|
||||||
|
|
||||||
|
board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
|
||||||
|
board_dir=${board_dir%/}
|
||||||
|
|
||||||
|
echo "Flashing kernel to ${kernel_dev}"
|
||||||
|
tar xf $tar_file ${board_dir}/kernel -O > $kernel_dev
|
||||||
|
|
||||||
|
echo "Flashing rootfs to ${rootfs_dev}"
|
||||||
|
tar xf $tar_file ${board_dir}/root -O > $rootfs_dev
|
||||||
|
|
||||||
|
echo "Format new rootfs_data"
|
||||||
|
mkfs.ext4 -F -L rootfs_data $rootfs_data_dev
|
||||||
|
|
||||||
|
if [ -e "$UPGRADE_BACKUP" ]; then
|
||||||
|
mkdir /tmp/new_root
|
||||||
|
mount -t ext4 $rootfs_data_dev /tmp/new_root && {
|
||||||
|
echo "Saving configurations to rootfs_data"
|
||||||
|
cp "$UPGRADE_BACKUP" "/tmp/new_root/$BACKUP_FILE"
|
||||||
|
umount /tmp/new_root
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "sysupgrade successful"
|
||||||
|
|
||||||
|
sync
|
||||||
|
umount -a
|
||||||
|
reboot -f
|
||||||
|
}
|
@ -188,30 +188,12 @@
|
|||||||
label = "0:ART";
|
label = "0:ART";
|
||||||
reg = <0x2e0000 0x10000>;
|
reg = <0x2e0000 0x10000>;
|
||||||
read-only;
|
read-only;
|
||||||
compatible = "nvmem-cells";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
precal_art_1000: precal@1000 {
|
|
||||||
reg = <0x1000 0x2f20>;
|
|
||||||
};
|
|
||||||
|
|
||||||
precal_art_5000: precal@5000 {
|
|
||||||
reg = <0x5000 0x2f20>;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config: partition@2f0000 {
|
config: partition@2f0000 {
|
||||||
label = "0:CONFIG";
|
label = "0:CONFIG";
|
||||||
reg = <0x2f0000 0x10000>;
|
reg = <0x2f0000 0x10000>;
|
||||||
read-only;
|
read-only;
|
||||||
compatible = "nvmem-cells";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
macaddr_config_0: macaddr@0 {
|
|
||||||
reg = <0x0 0x6>;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
partition@300000 {
|
partition@300000 {
|
||||||
@ -267,15 +249,3 @@
|
|||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
phy-reset-gpio = <&tlmm 62 0>;
|
phy-reset-gpio = <&tlmm 62 0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&wifi0 {
|
|
||||||
nvmem-cell-names = "pre-calibration", "mac-address";
|
|
||||||
nvmem-cells = <&precal_art_1000>, <&macaddr_config_0>;
|
|
||||||
mac-address-increment = <2>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&wifi1 {
|
|
||||||
nvmem-cell-names = "pre-calibration", "mac-address";
|
|
||||||
nvmem-cells = <&precal_art_5000>, <&macaddr_config_0>;
|
|
||||||
mac-address-increment = <3>;
|
|
||||||
};
|
|
||||||
|
@ -182,6 +182,14 @@
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_art_0: macaddr@0{
|
||||||
|
reg = <0x0000 0x0006>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_art_6: macaddr@6{
|
||||||
|
reg = <0x0006 0x0006>;
|
||||||
|
};
|
||||||
|
|
||||||
precal_art_1000: precal@1000 {
|
precal_art_1000: precal@1000 {
|
||||||
reg = <0x1000 0x2f20>;
|
reg = <0x1000 0x2f20>;
|
||||||
};
|
};
|
||||||
@ -227,11 +235,15 @@
|
|||||||
&gmac0 {
|
&gmac0 {
|
||||||
qcom,phy_mdio_addr = <2>;
|
qcom,phy_mdio_addr = <2>;
|
||||||
qcom,poll_required = <1>;
|
qcom,poll_required = <1>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
nvmem-cells = <&macaddr_art_6>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&gmac1 {
|
&gmac1 {
|
||||||
qcom,phy_mdio_addr = <4>;
|
qcom,phy_mdio_addr = <4>;
|
||||||
qcom,poll_required = <1>;
|
qcom,poll_required = <1>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
nvmem-cells = <&macaddr_art_0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&tlmm {
|
&tlmm {
|
||||||
|
@ -0,0 +1,438 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
// Copyright (c) 2022, Pawel Dembicki <paweldembicki@gmail.com>.
|
||||||
|
// Copyright (c) 2022, Giammarco Marzano <stich86@gmail.com>.
|
||||||
|
|
||||||
|
#include "qcom-ipq4019.dtsi"
|
||||||
|
#include <dt-bindings/soc/qcom,tcsr.h>
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
#include <dt-bindings/leds/common.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "ZTE MF289F";
|
||||||
|
compatible = "zte,mf289f";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_status;
|
||||||
|
led-failsafe = &led_status;
|
||||||
|
led-running = &led_status;
|
||||||
|
led-upgrade = &led_status;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
/*
|
||||||
|
* bootargs forced by u-boot bootipq command:
|
||||||
|
* 'ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait'
|
||||||
|
*/
|
||||||
|
bootargs-append = " root=/dev/ubiblock0_1";
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This node is used to restart modem module to avoid anomalous
|
||||||
|
* behaviours on initial communication.
|
||||||
|
*/
|
||||||
|
gpio-restart {
|
||||||
|
compatible = "gpio-restart";
|
||||||
|
gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
led_status: led-0 {
|
||||||
|
label = "blue:power";
|
||||||
|
function = LED_FUNCTION_POWER;
|
||||||
|
color = <LED_COLOR_ID_BLUE>;
|
||||||
|
gpios = <&tlmm 10 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led-1 {
|
||||||
|
function = LED_FUNCTION_WLAN;
|
||||||
|
color = <LED_COLOR_ID_BLUE>;
|
||||||
|
gpios = <&tlmm 61 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,default-trigger = "phy0tpt";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
key-reset {
|
||||||
|
label = "reset";
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
key-wps {
|
||||||
|
label = "wps";
|
||||||
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
gpios = <&tlmm 68 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
soc {
|
||||||
|
ess-psgmii@98000 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
tcsr@1949000 {
|
||||||
|
compatible = "qcom,tcsr";
|
||||||
|
reg = <0x1949000 0x100>;
|
||||||
|
qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
|
||||||
|
};
|
||||||
|
|
||||||
|
tcsr@194b000 {
|
||||||
|
/* select hostmode */
|
||||||
|
compatible = "qcom,tcsr";
|
||||||
|
reg = <0x194b000 0x100>;
|
||||||
|
qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
ess_tcsr@1953000 {
|
||||||
|
compatible = "qcom,tcsr";
|
||||||
|
reg = <0x1953000 0x1000>;
|
||||||
|
qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
|
||||||
|
};
|
||||||
|
|
||||||
|
tcsr@1957000 {
|
||||||
|
compatible = "qcom,tcsr";
|
||||||
|
reg = <0x1957000 0x100>;
|
||||||
|
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
ess-switch@c000000 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
edma@c080000 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&prng {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&mdio {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-0 = <&mdio_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
|
||||||
|
reset-delay-us = <2000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&watchdog {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&blsp_dma {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb2 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb3 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&blsp1_spi1 {
|
||||||
|
pinctrl-0 = <&spi_0_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
status = "okay";
|
||||||
|
cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>,
|
||||||
|
<&tlmm 54 GPIO_ACTIVE_HIGH>;
|
||||||
|
|
||||||
|
flash@0 {
|
||||||
|
compatible = "jedec,spi-nor";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <24000000>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "0:SBL1";
|
||||||
|
reg = <0x0 0x40000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@40000 {
|
||||||
|
label = "0:MIBIB";
|
||||||
|
reg = <0x40000 0x20000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@60000 {
|
||||||
|
label = "0:QSEE";
|
||||||
|
reg = <0x60000 0x60000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@c0000 {
|
||||||
|
label = "0:CDT";
|
||||||
|
reg = <0xc0000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@d0000 {
|
||||||
|
label = "0:DDRPARAMS";
|
||||||
|
reg = <0xd0000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@e0000 {
|
||||||
|
label = "0:APPSBLENV";
|
||||||
|
reg = <0xe0000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@f0000 {
|
||||||
|
label = "0:APPSBL";
|
||||||
|
reg = <0xf0000 0xc0000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@1b0000 {
|
||||||
|
label = "0:reserved1";
|
||||||
|
reg = <0x1b0000 0x50000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
spi-nand@1 { /* flash@1 ? */
|
||||||
|
compatible = "spi-nand";
|
||||||
|
reg = <1>;
|
||||||
|
spi-max-frequency = <24000000>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "fota-flag";
|
||||||
|
reg = <0x0 0xa0000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@a0000 {
|
||||||
|
label = "ART";
|
||||||
|
reg = <0xa0000 0x80000>;
|
||||||
|
read-only;
|
||||||
|
compatible = "nvmem-cells";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
precal_art_1000: precal@1000 {
|
||||||
|
reg = <0x1000 0x2f20>;
|
||||||
|
};
|
||||||
|
|
||||||
|
precal_art_5000: precal@5000 {
|
||||||
|
reg = <0x5000 0x2f20>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@120000 {
|
||||||
|
label = "mac";
|
||||||
|
reg = <0x120000 0x80000>;
|
||||||
|
read-only;
|
||||||
|
compatible = "nvmem-cells";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_mac_0: macaddr@0 {
|
||||||
|
reg = <0x0 0x6>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@1a0000 {
|
||||||
|
label = "reserved2";
|
||||||
|
reg = <0x1a0000 0xc0000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@260000 {
|
||||||
|
label = "cfg-param";
|
||||||
|
reg = <0x260000 0x400000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@660000 {
|
||||||
|
label = "log";
|
||||||
|
reg = <0x660000 0x400000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@a60000 {
|
||||||
|
label = "oops";
|
||||||
|
reg = <0xa60000 0xa0000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@b00000 {
|
||||||
|
label = "reserved3";
|
||||||
|
reg = <0xb00000 0x500000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@1000000 {
|
||||||
|
label = "web";
|
||||||
|
reg = <0x1000000 0x800000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@1800000 {
|
||||||
|
label = "rootfs";
|
||||||
|
reg = <0x1800000 0x1d00000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@3500000 {
|
||||||
|
label = "data";
|
||||||
|
reg = <0x3500000 0x1900000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@4e00000 {
|
||||||
|
label = "fota";
|
||||||
|
reg = <0x4e00000 0x3200000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&blsp1_uart1 {
|
||||||
|
pinctrl-0 = <&serial_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&crypto {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&cryptobam {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gmac0 {
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
nvmem-cells = <&macaddr_mac_0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&gmac1 {
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
nvmem-cells = <&macaddr_mac_0>;
|
||||||
|
mac-address-increment = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
&qpic_bam {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&tlmm {
|
||||||
|
i2c_0_pins: i2c_0_pinmux {
|
||||||
|
mux {
|
||||||
|
pins = "gpio20", "gpio21";
|
||||||
|
function = "blsp_i2c0";
|
||||||
|
bias-disable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mdio_pins: mdio_pinmux {
|
||||||
|
mux_1 {
|
||||||
|
pins = "gpio6";
|
||||||
|
function = "mdio";
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
|
||||||
|
mux_2 {
|
||||||
|
pins = "gpio7";
|
||||||
|
function = "mdc";
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
serial_pins: serial_pinmux {
|
||||||
|
mux {
|
||||||
|
pins = "gpio16", "gpio17";
|
||||||
|
function = "blsp_uart0";
|
||||||
|
bias-disable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
spi_0_pins: spi_0_pinmux {
|
||||||
|
pinmux {
|
||||||
|
function = "blsp_spi0";
|
||||||
|
pins = "gpio13", "gpio14", "gpio15";
|
||||||
|
drive-strength = <12>;
|
||||||
|
bias-disable;
|
||||||
|
};
|
||||||
|
|
||||||
|
pinmux_cs {
|
||||||
|
function = "gpio";
|
||||||
|
pins = "gpio12", "gpio54";
|
||||||
|
drive-strength = <2>;
|
||||||
|
bias-disable;
|
||||||
|
output-high;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb2_hs_phy {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb3_ss_phy {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb3_hs_phy {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&wifi0 {
|
||||||
|
status = "okay";
|
||||||
|
nvmem-cell-names = "pre-calibration", "mac-address";
|
||||||
|
nvmem-cells = <&precal_art_1000>, <&macaddr_mac_0>;
|
||||||
|
mac-address-increment = <2>;
|
||||||
|
qcom,ath10k-calibration-variant = "zte,mf289f";
|
||||||
|
};
|
||||||
|
|
||||||
|
/* This node is used only on AT2 version for 5Ghz on IPQ4019 with board-id=21 */
|
||||||
|
&wifi1 {
|
||||||
|
status = "okay";
|
||||||
|
nvmem-cell-names = "pre-calibration", "mac-address";
|
||||||
|
nvmem-cells = <&precal_art_5000>, <&macaddr_mac_0>;
|
||||||
|
mac-address-increment = <3>;
|
||||||
|
qcom,ath10k-calibration-variant = "zte,mf289f";
|
||||||
|
};
|
||||||
|
|
||||||
|
/* This node is used only on AT1 version for 5Ghz on QCA9984 */
|
||||||
|
&pcie0 {
|
||||||
|
status = "okay";
|
||||||
|
perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
|
||||||
|
wake-gpio = <&tlmm 40 GPIO_ACTIVE_LOW>;
|
||||||
|
clkreq-gpio = <&tlmm 39 GPIO_ACTIVE_LOW>;
|
||||||
|
|
||||||
|
bridge@0,0 {
|
||||||
|
reg = <0x00000000 0 0 0 0>;
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <2>;
|
||||||
|
ranges;
|
||||||
|
|
||||||
|
wifi2: wifi@1,0 {
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
nvmem-cells = <&macaddr_mac_0>;
|
||||||
|
mac-address-increment = <4>;
|
||||||
|
compatible = "qcom,ath10k";
|
||||||
|
reg = <0x00010000 0 0 0 0>;
|
||||||
|
qcom,ath10k-calibration-variant = "zte,mf289f";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
@ -0,0 +1,631 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-only OR MIT
|
||||||
|
|
||||||
|
#include "qcom-ipq4019.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
#include <dt-bindings/leds/common.h>
|
||||||
|
#include <dt-bindings/soc/qcom,tcsr.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "Sony NCP-HG100/Cellular";
|
||||||
|
compatible = "sony,ncp-hg100-cellular";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_cloud_green;
|
||||||
|
led-failsafe = &led_cloud_red;
|
||||||
|
led-running = &led_cloud_green;
|
||||||
|
led-upgrade = &led_cloud_green;
|
||||||
|
label-mac-device = &gmac0;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
bootargs = "console=ttyMSM0,115200n8 root=/dev/mmcblk0p15 rootfstype=squashfs,ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
memory {
|
||||||
|
device_type = "memory";
|
||||||
|
reg = <0x80000000 0x20000000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
soc {
|
||||||
|
tcsr@1949000 {
|
||||||
|
status = "okay";
|
||||||
|
compatible = "qcom,tcsr";
|
||||||
|
reg = <0x1949000 0x100>;
|
||||||
|
qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
|
||||||
|
};
|
||||||
|
|
||||||
|
tcsr@194b000 {
|
||||||
|
status = "okay";
|
||||||
|
compatible = "qcom,tcsr";
|
||||||
|
reg = <0x194b000 0x100>;
|
||||||
|
qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
|
||||||
|
};
|
||||||
|
|
||||||
|
ess_tcsr@1953000 {
|
||||||
|
status = "okay";
|
||||||
|
compatible = "qcom,tcsr";
|
||||||
|
reg = <0x1953000 0x1000>;
|
||||||
|
qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
|
||||||
|
};
|
||||||
|
|
||||||
|
tcsr@1957000 {
|
||||||
|
status = "okay";
|
||||||
|
compatible = "qcom,tcsr";
|
||||||
|
reg = <0x1957000 0x100>;
|
||||||
|
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
ess-psgmii@98000 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
dma@7984000 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
ess-switch@c000000 {
|
||||||
|
status = "okay";
|
||||||
|
switch_mac_mode = <0x0>; /* mac mode for RGMII RMII */
|
||||||
|
switch_initvlas = <0x0007c 0x54>; /* PORT0_STATUS */
|
||||||
|
};
|
||||||
|
|
||||||
|
edma@c080000 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keys-repeat {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
pinctrl-0 = <&keys_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
autorepeat;
|
||||||
|
|
||||||
|
key-volup {
|
||||||
|
label = "volume up";
|
||||||
|
linux,code = <KEY_VOLUMEUP>;
|
||||||
|
gpios = <&tlmm 39 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,input-type = <EV_KEY>;
|
||||||
|
};
|
||||||
|
|
||||||
|
key-voldown {
|
||||||
|
label = "volume down";
|
||||||
|
linux,code = <KEY_VOLUMEDOWN>;
|
||||||
|
gpios = <&tlmm 40 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,input-type = <EV_KEY>;
|
||||||
|
};
|
||||||
|
|
||||||
|
key-alexatrigger {
|
||||||
|
label = "alexa trigger";
|
||||||
|
linux,code = <BTN_0>;
|
||||||
|
gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,input-type = <EV_KEY>;
|
||||||
|
};
|
||||||
|
|
||||||
|
key-mute {
|
||||||
|
label = "mic mute";
|
||||||
|
linux,code = <BTN_1>;
|
||||||
|
gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,input-type = <EV_SW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
key-reset {
|
||||||
|
label = "reset";
|
||||||
|
gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
};
|
||||||
|
|
||||||
|
key-wps {
|
||||||
|
label = "setup";
|
||||||
|
gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&tlmm {
|
||||||
|
pinctrl-0 = <&bt_pins>, <&aud_pins>, <&mcu_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* uart0 is shared for debug console and Z-Wave,
|
||||||
|
* use only for debug console in OpenWrt.
|
||||||
|
*
|
||||||
|
* 1: debug console
|
||||||
|
* 0: Z-Wave
|
||||||
|
*/
|
||||||
|
uart0_ctrl_pins: uart0_ctrl_pinmux {
|
||||||
|
mux {
|
||||||
|
pins = "gpio15";
|
||||||
|
function = "gpio";
|
||||||
|
output-high;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
serial_pins: serial_pinmux {
|
||||||
|
mux {
|
||||||
|
pins = "gpio16", "gpio17";
|
||||||
|
function = "blsp_uart0";
|
||||||
|
bias-disable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* reset pin for Z-Wave
|
||||||
|
* active-low, >= 20ns
|
||||||
|
*/
|
||||||
|
zwave_pins: zwave_pinmux {
|
||||||
|
mux {
|
||||||
|
pins = "gpio59";
|
||||||
|
function = "gpio";
|
||||||
|
output-high;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
serial_1_pins: serial1_pinmux {
|
||||||
|
mux {
|
||||||
|
pins = "gpio8", "gpio9",
|
||||||
|
"gpio10", "gpio11";
|
||||||
|
function = "blsp_uart1";
|
||||||
|
bias-disable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
bt_pins: bt_pinmux {
|
||||||
|
mux_reset {
|
||||||
|
pins = "gpio66";
|
||||||
|
function = "gpio";
|
||||||
|
output-high;
|
||||||
|
};
|
||||||
|
|
||||||
|
mux_pwr {
|
||||||
|
pins = "gpio68";
|
||||||
|
function = "gpio";
|
||||||
|
output-high;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mdio_pins: mdio_pinmux {
|
||||||
|
mux_1 {
|
||||||
|
pins = "gpio6";
|
||||||
|
function = "mdio";
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
|
||||||
|
mux_2 {
|
||||||
|
pins = "gpio7";
|
||||||
|
function = "mdc";
|
||||||
|
bias-pull-up;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c_1_pins: i2c_1_pinmux {
|
||||||
|
mux {
|
||||||
|
pins = "gpio12", "gpio13";
|
||||||
|
function = "blsp_i2c1";
|
||||||
|
bias-disable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keys_pins: keys_pinmux {
|
||||||
|
mux_1 {
|
||||||
|
pins = "gpio39", "gpio40", "gpio42", "gpio47";
|
||||||
|
function = "gpio";
|
||||||
|
bias-disable;
|
||||||
|
};
|
||||||
|
|
||||||
|
mux_2 {
|
||||||
|
pins = "gpio2";
|
||||||
|
function = "gpio";
|
||||||
|
input;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sd_pins: sd_pins {
|
||||||
|
mux {
|
||||||
|
function = "sdio";
|
||||||
|
pins = "gpio23", "gpio24", "gpio25", "gpio26",
|
||||||
|
"gpio28", "gpio29", "gpio30", "gpio31";
|
||||||
|
drive-strength = <4>;
|
||||||
|
};
|
||||||
|
|
||||||
|
mux_sd_clk {
|
||||||
|
function = "sdio";
|
||||||
|
pins = "gpio27";
|
||||||
|
drive-strength = <16>;
|
||||||
|
};
|
||||||
|
|
||||||
|
mux_sd7 {
|
||||||
|
function = "sdio";
|
||||||
|
pins = "gpio32";
|
||||||
|
drive-strength = <4>;
|
||||||
|
bias-disable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
aud_pins: aud_pinmux {
|
||||||
|
mux {
|
||||||
|
pins = "gpio48", "gpio49", "gpio50", "gpio51";
|
||||||
|
function = "aud_pin";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
alc1304_pins: alc1304_pinmux {
|
||||||
|
mux_1 {
|
||||||
|
pins = "gpio44";
|
||||||
|
function = "gpio";
|
||||||
|
bias-disable;
|
||||||
|
};
|
||||||
|
|
||||||
|
mux_2 {
|
||||||
|
pins = "gpio45";
|
||||||
|
function = "gpio";
|
||||||
|
bias-disable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cx2902x_reset: cx2902x_pinmux {
|
||||||
|
mux_1 {
|
||||||
|
pins = "gpio64";
|
||||||
|
function = "gpio";
|
||||||
|
bias-disable;
|
||||||
|
};
|
||||||
|
|
||||||
|
mux_2 {
|
||||||
|
pins = "gpio65";
|
||||||
|
function = "gpio";
|
||||||
|
bias-disable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
lte_pins: lte_pinmux {
|
||||||
|
mux_en {
|
||||||
|
pins = "gpio20";
|
||||||
|
function = "gpio";
|
||||||
|
output-high;
|
||||||
|
};
|
||||||
|
|
||||||
|
mux_reset {
|
||||||
|
pins = "gpio35";
|
||||||
|
function = "gpio";
|
||||||
|
input;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
usb3_pins: usb3_pinmux {
|
||||||
|
mux_en {
|
||||||
|
pins = "gpio36";
|
||||||
|
function = "gpio";
|
||||||
|
output-high;
|
||||||
|
};
|
||||||
|
|
||||||
|
mux_flt {
|
||||||
|
pins = "gpio4";
|
||||||
|
function = "gpio";
|
||||||
|
input;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mcu_pins: mcu_pinmux {
|
||||||
|
mux_boot {
|
||||||
|
pins = "gpio38";
|
||||||
|
function = "gpio";
|
||||||
|
output-low;
|
||||||
|
};
|
||||||
|
|
||||||
|
mux_reset {
|
||||||
|
pins = "gpio5";
|
||||||
|
function = "gpio";
|
||||||
|
output-high;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&blsp_dma {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&blsp1_i2c4 {
|
||||||
|
/*
|
||||||
|
* There is no driver for the following devices:
|
||||||
|
* - CY8C4014LQI@14 : Touch-Sensor for buttons on top
|
||||||
|
* - MINI54FDE@15 : MCU for Fan/RGB LED/Thermal control
|
||||||
|
* - ALC5629@18 : I2S/PCM Audio DAC
|
||||||
|
* - CX20924@41 : Voice Input Processor
|
||||||
|
*/
|
||||||
|
pinctrl-0 = <&i2c_1_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
led-controller@32 {
|
||||||
|
compatible = "ti,lp55231";
|
||||||
|
reg = <0x32>;
|
||||||
|
clock-mode = /bits/ 8 <0>;
|
||||||
|
enable-gpio = <&tlmm 1 GPIO_ACTIVE_HIGH>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
led@0 {
|
||||||
|
chan-name = "green:wan";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x0>;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
|
function = LED_FUNCTION_WAN;
|
||||||
|
};
|
||||||
|
|
||||||
|
led@1 {
|
||||||
|
chan-name = "blue:wan";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x1>;
|
||||||
|
color = <LED_COLOR_ID_BLUE>;
|
||||||
|
function = LED_FUNCTION_WAN;
|
||||||
|
};
|
||||||
|
|
||||||
|
led@2 {
|
||||||
|
chan-name = "green:lan";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x2>;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
|
function = LED_FUNCTION_LAN;
|
||||||
|
};
|
||||||
|
|
||||||
|
led@3 {
|
||||||
|
chan-name = "blue:lan";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x3>;
|
||||||
|
color = <LED_COLOR_ID_BLUE>;
|
||||||
|
function = LED_FUNCTION_LAN;
|
||||||
|
};
|
||||||
|
|
||||||
|
led@4 {
|
||||||
|
chan-name = "green:wlan-2";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x4>;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
|
function = LED_FUNCTION_WLAN;
|
||||||
|
function-enumerator = <2>;
|
||||||
|
linux,default-trigger = "phy0tpt";
|
||||||
|
};
|
||||||
|
|
||||||
|
led@5 {
|
||||||
|
chan-name = "blue:wlan-2";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x5>;
|
||||||
|
color = <LED_COLOR_ID_BLUE>;
|
||||||
|
function = LED_FUNCTION_WLAN;
|
||||||
|
function-enumerator = <2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led@6 {
|
||||||
|
chan-name = "red:wan";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x6>;
|
||||||
|
color = <LED_COLOR_ID_RED>;
|
||||||
|
function = LED_FUNCTION_WAN;
|
||||||
|
};
|
||||||
|
|
||||||
|
led@7 {
|
||||||
|
chan-name = "red:lan";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x7>;
|
||||||
|
color = <LED_COLOR_ID_RED>;
|
||||||
|
function = LED_FUNCTION_LAN;
|
||||||
|
};
|
||||||
|
|
||||||
|
led@8 {
|
||||||
|
chan-name = "red:wlan-2";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x8>;
|
||||||
|
color = <LED_COLOR_ID_RED>;
|
||||||
|
function = LED_FUNCTION_WLAN;
|
||||||
|
function-enumerator = <2>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
led-controller@33 {
|
||||||
|
compatible = "ti,lp55231";
|
||||||
|
reg = <0x33>;
|
||||||
|
clock-mode = /bits/ 8 <0>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
led@0 {
|
||||||
|
chan-name = "green:wlan-5";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x0>;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
|
function = LED_FUNCTION_WLAN;
|
||||||
|
linux,default-trigger = "phy1tpt";
|
||||||
|
function-enumerator = <5>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led@1 {
|
||||||
|
chan-name = "blue:wlan-5";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x1>;
|
||||||
|
color = <LED_COLOR_ID_BLUE>;
|
||||||
|
function = LED_FUNCTION_WLAN;
|
||||||
|
function-enumerator = <5>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led@2 {
|
||||||
|
chan-name = "green:wan-4";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x2>;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
|
function = LED_FUNCTION_WAN; /* WWAN/LTE/4G */
|
||||||
|
function-enumerator = <4>; /* WWAN/LTE/4G */
|
||||||
|
};
|
||||||
|
|
||||||
|
led@3 {
|
||||||
|
chan-name = "blue:wan-4";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x3>;
|
||||||
|
color = <LED_COLOR_ID_BLUE>;
|
||||||
|
function = LED_FUNCTION_WAN; /* WWAN/LTE/4G */
|
||||||
|
function-enumerator = <4>; /* WWAN/LTE/4G */
|
||||||
|
};
|
||||||
|
|
||||||
|
led_cloud_green: led@4 {
|
||||||
|
chan-name = "green:power";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x4>;
|
||||||
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
|
function = LED_FUNCTION_POWER;
|
||||||
|
};
|
||||||
|
|
||||||
|
led@5 {
|
||||||
|
chan-name = "blue:power";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x5>;
|
||||||
|
color = <LED_COLOR_ID_BLUE>;
|
||||||
|
function = LED_FUNCTION_POWER;
|
||||||
|
};
|
||||||
|
|
||||||
|
led@6 {
|
||||||
|
chan-name = "red:wlan-5";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x6>;
|
||||||
|
color = <LED_COLOR_ID_RED>;
|
||||||
|
function = LED_FUNCTION_WLAN;
|
||||||
|
function-enumerator = <5>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led@7 {
|
||||||
|
chan-name = "red:wan-4";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x7>;
|
||||||
|
color = <LED_COLOR_ID_RED>;
|
||||||
|
function = LED_FUNCTION_WAN; /* WWAN/LTE/4G */
|
||||||
|
function-enumerator = <4>; /* WWAN/LTE/4G */
|
||||||
|
};
|
||||||
|
|
||||||
|
led_cloud_red: led@8 {
|
||||||
|
chan-name = "red:power";
|
||||||
|
led-cur = /bits/ 8 <50>;
|
||||||
|
max-cur = /bits/ 8 <100>;
|
||||||
|
reg = <0x8>;
|
||||||
|
color = <LED_COLOR_ID_RED>;
|
||||||
|
function = LED_FUNCTION_POWER;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&blsp1_uart1 {
|
||||||
|
pinctrl-0 = <&serial_pins>, <&uart0_ctrl_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&blsp1_uart2 {
|
||||||
|
pinctrl-0 = <&serial_1_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&crypto {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&cryptobam {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&mdio {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-0 = <&mdio_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
reset-gpios = <&tlmm 41 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&prng {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&vqmmc {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&sdhci {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-0 = <&sd_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
vqmmc-supply = <&vqmmc>;
|
||||||
|
non-removable;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
emmc@0 {
|
||||||
|
compatible = "mmc-card";
|
||||||
|
reg = <0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb2 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb2_hs_phy {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb3 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
pinctrl-0 = <&usb3_pins>, <<e_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
|
||||||
|
dwc3@8a00000 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
device@1 {
|
||||||
|
compatible = "usb1bc7,1900";
|
||||||
|
reg = <1>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb3_hs_phy {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb3_ss_phy {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&wifi0 {
|
||||||
|
status = "okay";
|
||||||
|
qcom,ath10k-calibration-variant = "Sony-NCP-HG100-Cellular";
|
||||||
|
};
|
||||||
|
|
||||||
|
&wifi1 {
|
||||||
|
status = "okay";
|
||||||
|
qcom,ath10k-calibration-variant = "Sony-NCP-HG100-Cellular";
|
||||||
|
};
|
||||||
|
|
||||||
|
&watchdog {
|
||||||
|
status = "okay";
|
||||||
|
};
|
@ -1004,6 +1004,19 @@ define Device/qxwlan_e2600ac-c2
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += qxwlan_e2600ac-c2
|
TARGET_DEVICES += qxwlan_e2600ac-c2
|
||||||
|
|
||||||
|
define Device/sony_ncp-hg100-cellular
|
||||||
|
$(call Device/FitImage)
|
||||||
|
DEVICE_VENDOR := Sony
|
||||||
|
DEVICE_MODEL := NCP-HG100/Cellular
|
||||||
|
DEVICE_DTS_CONFIG := config@ap.dk04.1-c4
|
||||||
|
SOC := qcom-ipq4019
|
||||||
|
KERNEL_SIZE := 8192k
|
||||||
|
IMAGE_SIZE := 128m
|
||||||
|
DEVICE_PACKAGES := e2fsprogs ipq-wifi-sony_ncp-hg100-cellular \
|
||||||
|
kmod-fs-ext4 uqmi
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += sony_ncp-hg100-cellular
|
||||||
|
|
||||||
define Device/teltonika_rutx10
|
define Device/teltonika_rutx10
|
||||||
$(call Device/FitImage)
|
$(call Device/FitImage)
|
||||||
$(call Device/UbiFit)
|
$(call Device/UbiFit)
|
||||||
@ -1047,10 +1060,9 @@ define Device/unielec_u4019-32m
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += unielec_u4019-32m
|
TARGET_DEVICES += unielec_u4019-32m
|
||||||
|
|
||||||
define Device/zte_mf286d
|
define Device/zte_mf28x_common
|
||||||
$(call Device/FitzImage)
|
$(call Device/FitzImage)
|
||||||
DEVICE_VENDOR := ZTE
|
DEVICE_VENDOR := ZTE
|
||||||
DEVICE_MODEL := MF286D
|
|
||||||
SOC := qcom-ipq4019
|
SOC := qcom-ipq4019
|
||||||
DEVICE_DTS_CONFIG := config@ap.dk04.1-c1
|
DEVICE_DTS_CONFIG := config@ap.dk04.1-c1
|
||||||
BLOCKSIZE := 128k
|
BLOCKSIZE := 128k
|
||||||
@ -1058,8 +1070,20 @@ define Device/zte_mf286d
|
|||||||
KERNEL_IN_UBI := 1
|
KERNEL_IN_UBI := 1
|
||||||
DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
|
DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Device/zte_mf286d
|
||||||
|
$(call Device/zte_mf28x_common)
|
||||||
|
DEVICE_MODEL := MF286D
|
||||||
|
endef
|
||||||
TARGET_DEVICES += zte_mf286d
|
TARGET_DEVICES += zte_mf286d
|
||||||
|
|
||||||
|
define Device/zte_mf289f
|
||||||
|
$(call Device/zte_mf28x_common)
|
||||||
|
DEVICE_MODEL := MF289F
|
||||||
|
DEVICE_PACKAGES += ipq-wifi-zte_mf289f ath10k-firmware-qca9984-ct
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += zte_mf289f
|
||||||
|
|
||||||
define Device/zyxel_nbg6617
|
define Device/zyxel_nbg6617
|
||||||
$(call Device/FitImageLzma)
|
$(call Device/FitImageLzma)
|
||||||
DEVICE_VENDOR := ZyXEL
|
DEVICE_VENDOR := ZyXEL
|
||||||
|
@ -798,7 +798,6 @@ CONFIG_VIRTIO=y
|
|||||||
CONFIG_VIRTIO_BALLOON=y
|
CONFIG_VIRTIO_BALLOON=y
|
||||||
CONFIG_VIRTIO_BLK=y
|
CONFIG_VIRTIO_BLK=y
|
||||||
CONFIG_VIRTIO_CONSOLE=y
|
CONFIG_VIRTIO_CONSOLE=y
|
||||||
# CONFIG_VIRTIO_IOMMU is not set
|
|
||||||
CONFIG_VIRTIO_MMIO=y
|
CONFIG_VIRTIO_MMIO=y
|
||||||
CONFIG_VIRTIO_NET=y
|
CONFIG_VIRTIO_NET=y
|
||||||
CONFIG_VIRTIO_PCI=y
|
CONFIG_VIRTIO_PCI=y
|
||||||
|
@ -275,9 +275,7 @@ CONFIG_INPUT_KEYBOARD=y
|
|||||||
CONFIG_INPUT_TOUCHSCREEN=y
|
CONFIG_INPUT_TOUCHSCREEN=y
|
||||||
CONFIG_IOMMU_API=y
|
CONFIG_IOMMU_API=y
|
||||||
# CONFIG_IOMMU_DEBUGFS is not set
|
# CONFIG_IOMMU_DEBUGFS is not set
|
||||||
# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
|
|
||||||
CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
|
CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
|
||||||
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
|
|
||||||
CONFIG_IOMMU_IO_PGTABLE=y
|
CONFIG_IOMMU_IO_PGTABLE=y
|
||||||
CONFIG_IOMMU_IO_PGTABLE_ARMV7S=y
|
CONFIG_IOMMU_IO_PGTABLE_ARMV7S=y
|
||||||
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S_SELFTEST is not set
|
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S_SELFTEST is not set
|
||||||
|
1
target/linux/octeon/generic/target.mk
Normal file
1
target/linux/octeon/generic/target.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOARDNAME:=Generic
|
@ -2,13 +2,12 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2013 OpenWrt.org
|
# Copyright (C) 2013 OpenWrt.org
|
||||||
|
|
||||||
define Profile/Default
|
define Profile/Generic
|
||||||
NAME:=Default Profile
|
NAME:=Octeon SoC
|
||||||
PRIORITY:=1
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Profile/Default/Description
|
define Profile/Generic/Description
|
||||||
Base packages for Octeon boards.
|
Base packages for Octeon boards.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call Profile,Default))
|
$(eval $(call Profile,Generic))
|
||||||
|
@ -177,7 +177,6 @@ CONFIG_INITRAMFS_SOURCE=""
|
|||||||
CONFIG_INPUT=y
|
CONFIG_INPUT=y
|
||||||
CONFIG_IOMMU_API=y
|
CONFIG_IOMMU_API=y
|
||||||
# CONFIG_IOMMU_DEBUGFS is not set
|
# CONFIG_IOMMU_DEBUGFS is not set
|
||||||
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
|
|
||||||
CONFIG_IOMMU_HELPER=y
|
CONFIG_IOMMU_HELPER=y
|
||||||
CONFIG_IOMMU_SUPPORT=y
|
CONFIG_IOMMU_SUPPORT=y
|
||||||
CONFIG_IRQCHIP=y
|
CONFIG_IRQCHIP=y
|
||||||
|
@ -183,9 +183,7 @@ CONFIG_INITRAMFS_SOURCE=""
|
|||||||
CONFIG_INPUT=y
|
CONFIG_INPUT=y
|
||||||
CONFIG_IOMMU_API=y
|
CONFIG_IOMMU_API=y
|
||||||
# CONFIG_IOMMU_DEBUGFS is not set
|
# CONFIG_IOMMU_DEBUGFS is not set
|
||||||
# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
|
|
||||||
CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
|
CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
|
||||||
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
|
|
||||||
CONFIG_IOMMU_HELPER=y
|
CONFIG_IOMMU_HELPER=y
|
||||||
CONFIG_IOMMU_SUPPORT=y
|
CONFIG_IOMMU_SUPPORT=y
|
||||||
CONFIG_IRQCHIP=y
|
CONFIG_IRQCHIP=y
|
||||||
|
@ -116,7 +116,7 @@ static void rtl839x_create_tx_header(struct p_hdr *h, unsigned int dest_port, in
|
|||||||
// h->cpu_tag[1] |= BIT(1) | BIT(0); // Bypass filter 1/2
|
// h->cpu_tag[1] |= BIT(1) | BIT(0); // Bypass filter 1/2
|
||||||
if (dest_port >= 32) {
|
if (dest_port >= 32) {
|
||||||
dest_port -= 32;
|
dest_port -= 32;
|
||||||
h->cpu_tag[2] = BIT(dest_port) >> 16;
|
h->cpu_tag[2] |= (BIT(dest_port) >> 16) & 0xf;
|
||||||
h->cpu_tag[3] = BIT(dest_port) & 0xffff;
|
h->cpu_tag[3] = BIT(dest_port) & 0xffff;
|
||||||
} else {
|
} else {
|
||||||
h->cpu_tag[4] = BIT(dest_port) >> 16;
|
h->cpu_tag[4] = BIT(dest_port) >> 16;
|
||||||
|
@ -306,9 +306,7 @@ CONFIG_INPUT_MATRIXKMAP=y
|
|||||||
CONFIG_INPUT_RK805_PWRKEY=y
|
CONFIG_INPUT_RK805_PWRKEY=y
|
||||||
CONFIG_IOMMU_API=y
|
CONFIG_IOMMU_API=y
|
||||||
# CONFIG_IOMMU_DEBUGFS is not set
|
# CONFIG_IOMMU_DEBUGFS is not set
|
||||||
# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
|
|
||||||
CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
|
CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
|
||||||
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
|
|
||||||
CONFIG_IOMMU_DMA=y
|
CONFIG_IOMMU_DMA=y
|
||||||
CONFIG_IOMMU_IOVA=y
|
CONFIG_IOMMU_IOVA=y
|
||||||
CONFIG_IOMMU_IO_PGTABLE=y
|
CONFIG_IOMMU_IO_PGTABLE=y
|
||||||
|
@ -242,7 +242,6 @@ CONFIG_INPUT=y
|
|||||||
CONFIG_INPUT_KEYBOARD=y
|
CONFIG_INPUT_KEYBOARD=y
|
||||||
CONFIG_IOMMU_API=y
|
CONFIG_IOMMU_API=y
|
||||||
# CONFIG_IOMMU_DEBUGFS is not set
|
# CONFIG_IOMMU_DEBUGFS is not set
|
||||||
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
|
|
||||||
CONFIG_IOMMU_IOVA=y
|
CONFIG_IOMMU_IOVA=y
|
||||||
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
|
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
|
||||||
# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
|
# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
|
||||||
|
@ -248,9 +248,7 @@ CONFIG_INPUT_KEYBOARD=y
|
|||||||
CONFIG_INTERCONNECT=y
|
CONFIG_INTERCONNECT=y
|
||||||
CONFIG_IOMMU_API=y
|
CONFIG_IOMMU_API=y
|
||||||
# CONFIG_IOMMU_DEBUGFS is not set
|
# CONFIG_IOMMU_DEBUGFS is not set
|
||||||
# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
|
|
||||||
CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
|
CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
|
||||||
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
|
|
||||||
CONFIG_IOMMU_IOVA=y
|
CONFIG_IOMMU_IOVA=y
|
||||||
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
|
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
|
||||||
# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
|
# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
|
||||||
|
@ -14,6 +14,7 @@ BOARDNAME:=User Mode Linux
|
|||||||
FEATURES:=audio ext4 rootfs-part squashfs
|
FEATURES:=audio ext4 rootfs-part squashfs
|
||||||
|
|
||||||
KERNEL_PATCHVER:=5.10
|
KERNEL_PATCHVER:=5.10
|
||||||
|
KERNEL_TESTING_PATCHVER:=5.15
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/target.mk
|
include $(INCLUDE_DIR)/target.mk
|
||||||
|
|
||||||
|
141
target/linux/uml/config-5.15
Normal file
141
target/linux/uml/config-5.15
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
CONFIG_3_LEVEL_PGTABLES=y
|
||||||
|
CONFIG_64BIT=y
|
||||||
|
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
|
||||||
|
CONFIG_ARCH_EPHEMERAL_INODES=y
|
||||||
|
CONFIG_ARCH_NO_PREEMPT=y
|
||||||
|
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||||
|
CONFIG_BLK_DEV_COW_COMMON=y
|
||||||
|
CONFIG_BLK_DEV_LOOP=y
|
||||||
|
CONFIG_BLK_DEV_UBD=y
|
||||||
|
CONFIG_BLK_DEV_UBD_SYNC=y
|
||||||
|
CONFIG_BLK_MQ_VIRTIO=y
|
||||||
|
CONFIG_CDROM=y
|
||||||
|
# CONFIG_COMMON_CLK is not set
|
||||||
|
# CONFIG_COMPAT_32BIT_TIME is not set
|
||||||
|
CONFIG_CON_CHAN="xterm"
|
||||||
|
CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
|
||||||
|
CONFIG_CPU_SUP_AMD=y
|
||||||
|
CONFIG_CPU_SUP_CENTAUR=y
|
||||||
|
CONFIG_CPU_SUP_HYGON=y
|
||||||
|
CONFIG_CPU_SUP_INTEL=y
|
||||||
|
CONFIG_CPU_SUP_ZHAOXIN=y
|
||||||
|
CONFIG_CRC16=y
|
||||||
|
CONFIG_CRYPTO_BLAKE2S=y
|
||||||
|
CONFIG_CRYPTO_CRC32=y
|
||||||
|
CONFIG_CRYPTO_CRC32C=y
|
||||||
|
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||||
|
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11
|
||||||
|
CONFIG_CRYPTO_RNG2=y
|
||||||
|
CONFIG_CRYPTO_SHA1=y
|
||||||
|
# CONFIG_CRYPTO_TWOFISH_X86_64 is not set
|
||||||
|
CONFIG_DEBUG_MEMORY_INIT=y
|
||||||
|
CONFIG_DECOMPRESS_BZIP2=y
|
||||||
|
CONFIG_DECOMPRESS_GZIP=y
|
||||||
|
CONFIG_DNOTIFY=y
|
||||||
|
# CONFIG_EARLY_PRINTK is not set
|
||||||
|
CONFIG_EXT4_FS=y
|
||||||
|
CONFIG_F2FS_FS=y
|
||||||
|
CONFIG_FAILOVER=y
|
||||||
|
CONFIG_FS_IOMAP=y
|
||||||
|
CONFIG_FS_MBCACHE=y
|
||||||
|
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||||
|
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||||
|
# CONFIG_GENERIC_CPU is not set
|
||||||
|
CONFIG_GENERIC_CPU_DEVICES=y
|
||||||
|
CONFIG_GENERIC_FIND_FIRST_BIT=y
|
||||||
|
CONFIG_GENERIC_IRQ_SHOW=y
|
||||||
|
CONFIG_HOSTFS=y
|
||||||
|
CONFIG_HVC_DRIVER=y
|
||||||
|
CONFIG_HW_RANDOM=y
|
||||||
|
CONFIG_HZ_PERIODIC=y
|
||||||
|
CONFIG_IA32_FEAT_CTL=y
|
||||||
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
|
CONFIG_INIT_ENV_ARG_LIMIT=128
|
||||||
|
CONFIG_IRQ_WORK=y
|
||||||
|
CONFIG_ISO9660_FS=y
|
||||||
|
CONFIG_JBD2=y
|
||||||
|
# CONFIG_JFFS2_FS is not set
|
||||||
|
CONFIG_KALLSYMS=y
|
||||||
|
CONFIG_KERNEL_STACK_ORDER=2
|
||||||
|
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||||
|
# CONFIG_MATOM is not set
|
||||||
|
CONFIG_MAY_HAVE_RUNTIME_DEPS=y
|
||||||
|
CONFIG_MCONSOLE=y
|
||||||
|
# CONFIG_MCORE2 is not set
|
||||||
|
CONFIG_MEMFD_CREATE=y
|
||||||
|
CONFIG_MIGRATION=y
|
||||||
|
CONFIG_MK8=y
|
||||||
|
# CONFIG_MMAPPER is not set
|
||||||
|
CONFIG_MODULES_USE_ELF_RELA=y
|
||||||
|
# CONFIG_MPSC is not set
|
||||||
|
CONFIG_NAMESPACES=y
|
||||||
|
CONFIG_NEED_PER_CPU_KM=y
|
||||||
|
CONFIG_NET_FAILOVER=y
|
||||||
|
# CONFIG_NET_NS is not set
|
||||||
|
CONFIG_NLS=y
|
||||||
|
CONFIG_NO_DMA=y
|
||||||
|
CONFIG_NO_IOMEM=y
|
||||||
|
CONFIG_NO_IOPORT_MAP=y
|
||||||
|
CONFIG_NR_CPUS=1
|
||||||
|
CONFIG_NULL_CHAN=y
|
||||||
|
# CONFIG_OF is not set
|
||||||
|
CONFIG_PGTABLE_LEVELS=3
|
||||||
|
CONFIG_PHYS_ADDR_T_64BIT=y
|
||||||
|
CONFIG_PORT_CHAN=y
|
||||||
|
CONFIG_POSIX_MQUEUE=y
|
||||||
|
CONFIG_POSIX_MQUEUE_SYSCTL=y
|
||||||
|
# CONFIG_PROCESSOR_SELECT is not set
|
||||||
|
CONFIG_PROC_PAGE_MONITOR=y
|
||||||
|
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||||
|
CONFIG_PTY_CHAN=y
|
||||||
|
CONFIG_RD_BZIP2=y
|
||||||
|
CONFIG_RD_GZIP=y
|
||||||
|
CONFIG_RELAY=y
|
||||||
|
CONFIG_SG_POOL=y
|
||||||
|
CONFIG_SOFT_WATCHDOG=m
|
||||||
|
CONFIG_SRCU=y
|
||||||
|
CONFIG_SSL=y
|
||||||
|
CONFIG_SSL_CHAN="pty"
|
||||||
|
CONFIG_STACKTRACE=y
|
||||||
|
CONFIG_STDERR_CONSOLE=y
|
||||||
|
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||||
|
CONFIG_TINY_SRCU=y
|
||||||
|
CONFIG_TTY_CHAN=y
|
||||||
|
CONFIG_UML=y
|
||||||
|
CONFIG_UML_NET=y
|
||||||
|
CONFIG_UML_NET_DAEMON=y
|
||||||
|
CONFIG_UML_NET_DETERMINISTIC_MAC=y
|
||||||
|
CONFIG_UML_NET_ETHERTAP=y
|
||||||
|
CONFIG_UML_NET_MCAST=y
|
||||||
|
# CONFIG_UML_NET_PCAP is not set
|
||||||
|
CONFIG_UML_NET_SLIP=y
|
||||||
|
CONFIG_UML_NET_SLIRP=y
|
||||||
|
CONFIG_UML_NET_TUNTAP=y
|
||||||
|
# CONFIG_UML_NET_VDE is not set
|
||||||
|
CONFIG_UML_NET_VECTOR=y
|
||||||
|
# CONFIG_UML_PCI_OVER_VIRTIO is not set
|
||||||
|
CONFIG_UML_RANDOM=y
|
||||||
|
# CONFIG_UML_SOUND is not set
|
||||||
|
CONFIG_UML_TIME_TRAVEL_SUPPORT=y
|
||||||
|
CONFIG_UML_WATCHDOG=y
|
||||||
|
CONFIG_UML_X86=y
|
||||||
|
# CONFIG_USER_NS is not set
|
||||||
|
CONFIG_VIRTIO=y
|
||||||
|
CONFIG_VIRTIO_BLK=y
|
||||||
|
CONFIG_VIRTIO_CONSOLE=y
|
||||||
|
CONFIG_VIRTIO_NET=y
|
||||||
|
CONFIG_VIRTIO_UML=y
|
||||||
|
CONFIG_VMAP_STACK=y
|
||||||
|
CONFIG_VM_EVENT_COUNTERS=y
|
||||||
|
CONFIG_WATCHDOG_CORE=y
|
||||||
|
CONFIG_X86_64=y
|
||||||
|
CONFIG_X86_CMOV=y
|
||||||
|
CONFIG_X86_CMPXCHG64=y
|
||||||
|
CONFIG_X86_INTEL_USERCOPY=y
|
||||||
|
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
|
||||||
|
CONFIG_X86_L1_CACHE_SHIFT=6
|
||||||
|
CONFIG_X86_MINIMUM_CPU_FAMILY=64
|
||||||
|
CONFIG_X86_TSC=y
|
||||||
|
CONFIG_X86_USE_PPRO_CHECKSUM=y
|
||||||
|
CONFIG_XTERM_CHAN=y
|
||||||
|
CONFIG_ZLIB_INFLATE=y
|
@ -0,0 +1,32 @@
|
|||||||
|
From 1fb1abc83636f5329c26cd29f0f19f3faeb697a5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Johannes Berg <johannes.berg@intel.com>
|
||||||
|
Date: Mon, 14 Dec 2020 20:51:02 +0100
|
||||||
|
Subject: [PATCH] um: Fix build w/o CONFIG_PM_SLEEP
|
||||||
|
|
||||||
|
uml_pm_wake() is unconditionally called from the SIGUSR1 wakeup
|
||||||
|
handler since that's in the userspace portion of UML, and thus
|
||||||
|
a bit tricky to ifdef out. Since pm_system_wakeup() can always
|
||||||
|
be called (but may be an empty inline), also simply always have
|
||||||
|
uml_pm_wake() to fix the build.
|
||||||
|
|
||||||
|
Reported-by: Randy Dunlap <rdunlap@infradead.org>
|
||||||
|
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
|
||||||
|
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||||
|
Signed-off-by: Richard Weinberger <richard@nod.at>
|
||||||
|
---
|
||||||
|
--- a/arch/um/kernel/um_arch.c
|
||||||
|
+++ b/arch/um/kernel/um_arch.c
|
||||||
|
@@ -387,12 +387,12 @@
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef CONFIG_PM_SLEEP
|
||||||
|
void uml_pm_wake(void)
|
||||||
|
{
|
||||||
|
pm_system_wakeup();
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef CONFIG_PM_SLEEP
|
||||||
|
static int init_pm_wake_signal(void)
|
||||||
|
{
|
||||||
|
/*
|
@ -0,0 +1,54 @@
|
|||||||
|
From 53b5c5f559cc95fc676cb4cc9e5a8d9f0cb8f58c Mon Sep 17 00:00:00 2001
|
||||||
|
Message-Id: <53b5c5f559cc95fc676cb4cc9e5a8d9f0cb8f58c.1659815468.git.chunkeey@gmail.com>
|
||||||
|
From: Christian Lamparter <chunkeey@gmail.com>
|
||||||
|
Date: Sat, 6 Aug 2022 21:22:01 +0200
|
||||||
|
Subject: [PATCH v1 1/2] um: fix default console kernel parameter
|
||||||
|
To: linux-um@lists.infradead.org
|
||||||
|
Cc: Richard Weinberger <richard@nod.at>,
|
||||||
|
Anton Ivanov <anton.ivanov@cambridgegreys.com>,
|
||||||
|
Johannes Berg <johannes@sipsolutions.net>
|
||||||
|
|
||||||
|
OpenWrt's UML with 5.15 was producing odd errors/warnings during preinit
|
||||||
|
part of the early userspace portion:
|
||||||
|
|
||||||
|
|[ 0.000000] Kernel command line: ubd0=root.img root=98:0 console=tty
|
||||||
|
|[...]
|
||||||
|
|[ 0.440000] random: jshn: uninitialized urandom read (4 bytes read)
|
||||||
|
|[ 0.460000] random: jshn: uninitialized urandom read (4 bytes read)
|
||||||
|
|/etc/preinit: line 47: can't create /dev/tty: No such device or address
|
||||||
|
|/etc/preinit: line 48: can't create /dev/tty: No such device or address
|
||||||
|
|/etc/preinit: line 58: can't open /dev/tty: No such device or address
|
||||||
|
|[...] repeated many times
|
||||||
|
|
||||||
|
That "/dev/tty" came from the command line (which is automatically
|
||||||
|
added if no console= parameter was specified for the uml binary).
|
||||||
|
|
||||||
|
The TLDP project tells the following about the /dev/tty:
|
||||||
|
<https://tldp.org/HOWTO/Text-Terminal-HOWTO-7.html#ss7.3>
|
||||||
|
| /dev/tty stands for the controlling terminal (if any) for the current
|
||||||
|
| process.[...]
|
||||||
|
| /dev/tty is something like a link to the actually terminal device[..]
|
||||||
|
|
||||||
|
The "(if any)" is important here, since it's possible for processes to
|
||||||
|
not have a controlling terminal.
|
||||||
|
|
||||||
|
I think this was a simple typo and the author wanted tty0 there.
|
||||||
|
|
||||||
|
CC: Thomas Meyer <thomas@m3y3r.de>
|
||||||
|
Fixes: d7ffac33631b ("um: stdio_console: Make preferred console")
|
||||||
|
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||||
|
---
|
||||||
|
arch/um/kernel/um_arch.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/arch/um/kernel/um_arch.c
|
||||||
|
+++ b/arch/um/kernel/um_arch.c
|
||||||
|
@@ -31,7 +31,7 @@
|
||||||
|
#include <os.h>
|
||||||
|
|
||||||
|
#define DEFAULT_COMMAND_LINE_ROOT "root=98:0"
|
||||||
|
-#define DEFAULT_COMMAND_LINE_CONSOLE "console=tty"
|
||||||
|
+#define DEFAULT_COMMAND_LINE_CONSOLE "console=tty0"
|
||||||
|
|
||||||
|
/* Changed in add_arg and setup_arch, which run before SMP is started */
|
||||||
|
static char __initdata command_line[COMMAND_LINE_SIZE] = { 0 };
|
213
target/linux/uml/patches-5.15/101-mconsole-exec.patch
Normal file
213
target/linux/uml/patches-5.15/101-mconsole-exec.patch
Normal file
@ -0,0 +1,213 @@
|
|||||||
|
#
|
||||||
|
# Minimalist mconsole exec patch
|
||||||
|
#
|
||||||
|
# 3.10 version (with bit more synchronous behavior) by fingon at iki dot fi
|
||||||
|
# Adaptation to kernel 3.3.8 made by David Fernández (david at dit.upm.es) for
|
||||||
|
# Starting point: mconsole-exec-2.6.30.patch for kernel 2.6.30
|
||||||
|
# Author of original patch: Paolo Giarrusso, aka Blaisorblade
|
||||||
|
# (http://www.user-mode-linux.org/~blaisorblade)
|
||||||
|
#
|
||||||
|
# Known misfeatures:
|
||||||
|
#
|
||||||
|
# - If output is too long, blocks (and breaks horribly)
|
||||||
|
# (this misfeature from 3.10 patches, when minimalizing the patch;
|
||||||
|
# workaround: redirect to a shared filesystem if long output is expected)
|
||||||
|
#
|
||||||
|
# - Nothing useful is done with stdin
|
||||||
|
#
|
||||||
|
--- a/arch/um/drivers/mconsole.h
|
||||||
|
+++ b/arch/um/drivers/mconsole.h
|
||||||
|
@@ -85,6 +85,7 @@ extern void mconsole_cad(struct mc_reque
|
||||||
|
extern void mconsole_stop(struct mc_request *req);
|
||||||
|
extern void mconsole_go(struct mc_request *req);
|
||||||
|
extern void mconsole_log(struct mc_request *req);
|
||||||
|
+extern void mconsole_exec(struct mc_request *req);
|
||||||
|
extern void mconsole_proc(struct mc_request *req);
|
||||||
|
extern void mconsole_stack(struct mc_request *req);
|
||||||
|
|
||||||
|
--- a/arch/um/drivers/mconsole_kern.c
|
||||||
|
+++ b/arch/um/drivers/mconsole_kern.c
|
||||||
|
@@ -4,6 +4,7 @@
|
||||||
|
* Copyright (C) 2001 - 2008 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#include <linux/kmod.h>
|
||||||
|
#include <linux/console.h>
|
||||||
|
#include <linux/ctype.h>
|
||||||
|
#include <linux/string.h>
|
||||||
|
@@ -27,6 +28,7 @@
|
||||||
|
#include <linux/mount.h>
|
||||||
|
#include <linux/file.h>
|
||||||
|
#include <linux/uaccess.h>
|
||||||
|
+#include <linux/completion.h>
|
||||||
|
#include <asm/switch_to.h>
|
||||||
|
|
||||||
|
#include <init.h>
|
||||||
|
@@ -124,6 +126,59 @@ void mconsole_log(struct mc_request *req
|
||||||
|
mconsole_reply(req, "", 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
+void mconsole_exec(struct mc_request *req)
|
||||||
|
+{
|
||||||
|
+ struct subprocess_info *sub_info;
|
||||||
|
+ int res, len;
|
||||||
|
+ struct file *out;
|
||||||
|
+ char buf[MCONSOLE_MAX_DATA];
|
||||||
|
+
|
||||||
|
+ char *envp[] = {
|
||||||
|
+ "HOME=/", "TERM=linux",
|
||||||
|
+ "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin",
|
||||||
|
+ NULL
|
||||||
|
+ };
|
||||||
|
+ char *argv[] = {
|
||||||
|
+ "/bin/sh", "-c",
|
||||||
|
+ req->request.data + strlen("exec "),
|
||||||
|
+ NULL
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ sub_info = call_usermodehelper_setup("/bin/sh", argv, envp, GFP_ATOMIC, NULL, NULL, NULL);
|
||||||
|
+ if (sub_info == NULL) {
|
||||||
|
+ mconsole_reply(req, "call_usermodehelper_setup failed", 1, 0);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ res = call_usermodehelper_stdoutpipe(sub_info, &out);
|
||||||
|
+ if (res < 0) {
|
||||||
|
+ kfree(sub_info);
|
||||||
|
+ mconsole_reply(req, "call_usermodehelper_stdoutpipe failed", 1, 0);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ res = call_usermodehelper_exec(sub_info, UMH_WAIT_PROC);
|
||||||
|
+ if (res < 0) {
|
||||||
|
+ kfree(sub_info);
|
||||||
|
+ mconsole_reply(req, "call_usermodehelper_exec failed", 1, 0);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ for (;;) {
|
||||||
|
+ len = out->f_op->read(out, buf, sizeof(buf), &out->f_pos);
|
||||||
|
+ if (len < 0) {
|
||||||
|
+ mconsole_reply(req, "reading output failed", 1, 0);
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ if (len == 0)
|
||||||
|
+ break;
|
||||||
|
+ mconsole_reply_len(req, buf, len, 0, 1);
|
||||||
|
+ }
|
||||||
|
+ fput(out);
|
||||||
|
+
|
||||||
|
+ mconsole_reply_len(req, NULL, 0, 0, 0);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
void mconsole_proc(struct mc_request *req)
|
||||||
|
{
|
||||||
|
struct vfsmount *mnt = proc_mnt;
|
||||||
|
@@ -190,6 +245,7 @@ void mconsole_proc(struct mc_request *re
|
||||||
|
stop - pause the UML; it will do nothing until it receives a 'go' \n\
|
||||||
|
go - continue the UML after a 'stop' \n\
|
||||||
|
log <string> - make UML enter <string> into the kernel log\n\
|
||||||
|
+ exec <string> - pass <string> to /bin/sh -c synchronously\n\
|
||||||
|
proc <file> - returns the contents of the UML's /proc/<file>\n\
|
||||||
|
stack <pid> - returns the stack of the specified pid\n\
|
||||||
|
"
|
||||||
|
--- a/arch/um/drivers/mconsole_user.c
|
||||||
|
+++ b/arch/um/drivers/mconsole_user.c
|
||||||
|
@@ -30,6 +30,7 @@ static struct mconsole_command commands[
|
||||||
|
{ "stop", mconsole_stop, MCONSOLE_PROC },
|
||||||
|
{ "go", mconsole_go, MCONSOLE_INTR },
|
||||||
|
{ "log", mconsole_log, MCONSOLE_INTR },
|
||||||
|
+ { "exec", mconsole_exec, MCONSOLE_PROC },
|
||||||
|
{ "proc", mconsole_proc, MCONSOLE_PROC },
|
||||||
|
{ "stack", mconsole_stack, MCONSOLE_INTR },
|
||||||
|
};
|
||||||
|
--- a/arch/um/os-Linux/file.c
|
||||||
|
+++ b/arch/um/os-Linux/file.c
|
||||||
|
@@ -560,6 +560,8 @@ int os_create_unix_socket(const char *fi
|
||||||
|
|
||||||
|
addr.sun_family = AF_UNIX;
|
||||||
|
|
||||||
|
+ if (len > sizeof(addr.sun_path))
|
||||||
|
+ len = sizeof(addr.sun_path);
|
||||||
|
snprintf(addr.sun_path, len, "%s", file);
|
||||||
|
|
||||||
|
err = bind(sock, (struct sockaddr *) &addr, sizeof(addr));
|
||||||
|
--- a/include/linux/kmod.h
|
||||||
|
+++ b/include/linux/kmod.h
|
||||||
|
@@ -32,4 +32,6 @@ static inline int request_module_nowait(
|
||||||
|
#define try_then_request_module(x, mod...) (x)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+int call_usermodehelper_stdoutpipe(struct subprocess_info *sub_info, struct file **filp);
|
||||||
|
+
|
||||||
|
#endif /* __LINUX_KMOD_H__ */
|
||||||
|
--- a/include/linux/umh.h
|
||||||
|
+++ b/include/linux/umh.h
|
||||||
|
@@ -22,6 +22,7 @@ struct subprocess_info {
|
||||||
|
const char *path;
|
||||||
|
char **argv;
|
||||||
|
char **envp;
|
||||||
|
+ struct file *stdout;
|
||||||
|
int wait;
|
||||||
|
int retval;
|
||||||
|
int (*init)(struct subprocess_info *info, struct cred *new);
|
||||||
|
--- a/kernel/umh.c
|
||||||
|
+++ b/kernel/umh.c
|
||||||
|
@@ -28,6 +28,7 @@
|
||||||
|
#include <linux/async.h>
|
||||||
|
#include <linux/uaccess.h>
|
||||||
|
#include <linux/initrd.h>
|
||||||
|
+#include <linux/pipe_fs_i.h>
|
||||||
|
|
||||||
|
#include <trace/events/module.h>
|
||||||
|
|
||||||
|
@@ -73,6 +74,28 @@ static int call_usermodehelper_exec_asyn
|
||||||
|
flush_signal_handlers(current, 1);
|
||||||
|
spin_unlock_irq(¤t->sighand->siglock);
|
||||||
|
|
||||||
|
+ /* Install output when needed */
|
||||||
|
+ if (sub_info->stdout) {
|
||||||
|
+ struct files_struct *f = current->files;
|
||||||
|
+ struct fdtable *fdt;
|
||||||
|
+
|
||||||
|
+ sys_close(1);
|
||||||
|
+ sys_close(2);
|
||||||
|
+ get_file(sub_info->stdout);
|
||||||
|
+ fd_install(1, sub_info->stdout);
|
||||||
|
+ fd_install(2, sub_info->stdout);
|
||||||
|
+ spin_lock(&f->file_lock);
|
||||||
|
+ fdt = files_fdtable(f);
|
||||||
|
+ __set_bit(1, fdt->open_fds);
|
||||||
|
+ __clear_bit(1, fdt->close_on_exec);
|
||||||
|
+ __set_bit(2, fdt->open_fds);
|
||||||
|
+ __clear_bit(2, fdt->close_on_exec);
|
||||||
|
+ spin_unlock(&f->file_lock);
|
||||||
|
+
|
||||||
|
+ /* disallow core files */
|
||||||
|
+ current->signal->rlim[RLIMIT_CORE] = (struct rlimit){0, 0};
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Initial kernel threads share ther FS with init, in order to
|
||||||
|
* get the init root directory. But we've now created a new
|
||||||
|
@@ -332,6 +355,20 @@ static void helper_unlock(void)
|
||||||
|
wake_up(&running_helpers_waitq);
|
||||||
|
}
|
||||||
|
|
||||||
|
+int call_usermodehelper_stdoutpipe(struct subprocess_info *sub_info,
|
||||||
|
+ struct file **filp)
|
||||||
|
+{
|
||||||
|
+ struct file *f[2];
|
||||||
|
+
|
||||||
|
+ if (create_pipe_files(f, 0) < 0)
|
||||||
|
+ return PTR_ERR(f);
|
||||||
|
+
|
||||||
|
+ sub_info->stdout = f[1];
|
||||||
|
+ *filp = f[0];
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+EXPORT_SYMBOL(call_usermodehelper_stdoutpipe);
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* call_usermodehelper_setup - prepare to call a usermode helper
|
||||||
|
* @path: path to usermode executable
|
147
target/linux/uml/patches-5.15/102-pseudo-random-mac.patch
Normal file
147
target/linux/uml/patches-5.15/102-pseudo-random-mac.patch
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
===============================================================================
|
||||||
|
|
||||||
|
This patch makes MAC addresses of network interfaces predictable. In
|
||||||
|
particular, it adds a small routine that computes MAC addresses of based on
|
||||||
|
a SHA1 hash of the virtual machine name and interface ID.
|
||||||
|
|
||||||
|
TECHNICAL INFORMATION:
|
||||||
|
|
||||||
|
Applies to vanilla kernel 3.9.4.
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
--- a/arch/um/drivers/Kconfig
|
||||||
|
+++ b/arch/um/drivers/Kconfig
|
||||||
|
@@ -146,6 +146,20 @@ config UML_NET
|
||||||
|
enable at least one of the following transport options to actually
|
||||||
|
make use of UML networking.
|
||||||
|
|
||||||
|
+config UML_NET_DETERMINISTIC_MAC
|
||||||
|
+ bool "Use deterministic MAC addresses for network interfaces"
|
||||||
|
+ default y
|
||||||
|
+ depends on UML_NET
|
||||||
|
+ select CRYPTO_SHA1
|
||||||
|
+ help
|
||||||
|
+ Virtual network devices inside a User-Mode Linux instance must be
|
||||||
|
+ assigned a MAC (Ethernet) address. If none is specified on the UML
|
||||||
|
+ command line, one must be automatically computed. If this option is
|
||||||
|
+ enabled, a randomly generated address is used. Otherwise, if this
|
||||||
|
+ option is disabled, the address is generated from a SHA1 hash of
|
||||||
|
+ the umid of the UML instance and the interface name. The latter choice
|
||||||
|
+ is useful to make MAC addresses predictable.
|
||||||
|
+
|
||||||
|
config UML_NET_ETHERTAP
|
||||||
|
bool "Ethertap transport (obsolete)"
|
||||||
|
depends on UML_NET
|
||||||
|
--- a/arch/um/drivers/net_kern.c
|
||||||
|
+++ b/arch/um/drivers/net_kern.c
|
||||||
|
@@ -25,6 +25,14 @@
|
||||||
|
#include <net_kern.h>
|
||||||
|
#include <net_user.h>
|
||||||
|
|
||||||
|
+#include <crypto/sha1.h>
|
||||||
|
+#include <crypto/hash.h>
|
||||||
|
+#include <linux/string.h>
|
||||||
|
+#include <linux/crypto.h>
|
||||||
|
+#include <linux/err.h>
|
||||||
|
+#include <linux/scatterlist.h>
|
||||||
|
+#include "os.h"
|
||||||
|
+
|
||||||
|
#define DRIVER_NAME "uml-netdev"
|
||||||
|
|
||||||
|
static DEFINE_SPINLOCK(opened_lock);
|
||||||
|
@@ -274,9 +282,51 @@ static const struct ethtool_ops uml_net_
|
||||||
|
.get_ts_info = ethtool_op_get_ts_info,
|
||||||
|
};
|
||||||
|
|
||||||
|
+#ifdef CONFIG_UML_NET_DETERMINISTIC_MAC
|
||||||
|
+
|
||||||
|
+/* Compute a SHA1 hash of the UML instance's id and
|
||||||
|
+ * * an interface name. */
|
||||||
|
+static int compute_hash(const char *umid, const char *ifname, char *hash)
|
||||||
|
+{
|
||||||
|
+ struct ahash_request *desc;
|
||||||
|
+ struct crypto_ahash *tfm;
|
||||||
|
+ struct scatterlist sg;
|
||||||
|
+ char vmif[1024];
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ strcpy (vmif, umid);
|
||||||
|
+ strcat (vmif, ifname);
|
||||||
|
+
|
||||||
|
+ tfm = crypto_alloc_ahash("sha1", 0, CRYPTO_ALG_ASYNC);
|
||||||
|
+ if (IS_ERR(tfm))
|
||||||
|
+ return -ENOMEM;
|
||||||
|
+
|
||||||
|
+ desc = ahash_request_alloc(tfm, GFP_KERNEL);
|
||||||
|
+ if (!desc) {
|
||||||
|
+ ret = -ENOMEM;
|
||||||
|
+ goto out;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ crypto_ahash_clear_flags(tfm, ~0);
|
||||||
|
+
|
||||||
|
+ sg_init_table(&sg, 1);
|
||||||
|
+ sg_set_buf(&sg, vmif, strlen(vmif));
|
||||||
|
+
|
||||||
|
+ ahash_request_set_crypt(desc, &sg, hash, strlen(vmif));
|
||||||
|
+
|
||||||
|
+ ret = crypto_ahash_digest(desc);
|
||||||
|
+out:
|
||||||
|
+ crypto_free_ahash(tfm);
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
void uml_net_setup_etheraddr(struct net_device *dev, char *str)
|
||||||
|
{
|
||||||
|
unsigned char *addr = dev->dev_addr;
|
||||||
|
+ u8 hash[SHA1_DIGEST_SIZE];
|
||||||
|
char *end;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
@@ -319,9 +369,26 @@ void uml_net_setup_etheraddr(struct net_
|
||||||
|
return;
|
||||||
|
|
||||||
|
random:
|
||||||
|
+#ifndef CONFIG_UML_NET_DETERMINISTIC_MAC
|
||||||
|
printk(KERN_INFO
|
||||||
|
"Choosing a random ethernet address for device %s\n", dev->name);
|
||||||
|
eth_hw_addr_random(dev);
|
||||||
|
+#else
|
||||||
|
+ printk(KERN_INFO
|
||||||
|
+ "Computing a digest to use as ethernet address for device %s\n", dev->name);
|
||||||
|
+ if (compute_hash(get_umid(), dev->name, hash) < 0) {
|
||||||
|
+ printk(KERN_WARNING
|
||||||
|
+ "Could not compute digest to use as ethernet address for device %s. "
|
||||||
|
+ "Using random address instead.\n", dev->name);
|
||||||
|
+ random_ether_addr(addr);
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ for (i=0; i < 6; i++)
|
||||||
|
+ addr[i] = (hash[i] + hash[i+6]) % 0x100;
|
||||||
|
+ }
|
||||||
|
+ addr [0] &= 0xfe; /* clear multicast bit */
|
||||||
|
+ addr [0] |= 0x02; /* set local assignment bit (IEEE802) */
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static DEFINE_SPINLOCK(devices_lock);
|
||||||
|
--- a/kernel/umh.c
|
||||||
|
+++ b/kernel/umh.c
|
||||||
|
@@ -356,12 +356,12 @@ static void helper_unlock(void)
|
||||||
|
}
|
||||||
|
|
||||||
|
int call_usermodehelper_stdoutpipe(struct subprocess_info *sub_info,
|
||||||
|
- struct file **filp)
|
||||||
|
+ struct file **filp)
|
||||||
|
{
|
||||||
|
struct file *f[2];
|
||||||
|
|
||||||
|
if (create_pipe_files(f, 0) < 0)
|
||||||
|
- return PTR_ERR(f);
|
||||||
|
+ return PTR_ERR(f);
|
||||||
|
|
||||||
|
sub_info->stdout = f[1];
|
||||||
|
*filp = f[0];
|
@ -0,0 +1,40 @@
|
|||||||
|
From d7936f11aded13f03871c0d6502d611d6a1e2dc5 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-Id: <d7936f11aded13f03871c0d6502d611d6a1e2dc5.1659815468.git.chunkeey@gmail.com>
|
||||||
|
In-Reply-To: <53b5c5f559cc95fc676cb4cc9e5a8d9f0cb8f58c.1659815468.git.chunkeey@gmail.com>
|
||||||
|
References: <53b5c5f559cc95fc676cb4cc9e5a8d9f0cb8f58c.1659815468.git.chunkeey@gmail.com>
|
||||||
|
From: Christian Lamparter <chunkeey@gmail.com>
|
||||||
|
Date: Sat, 6 Aug 2022 19:27:20 +0200
|
||||||
|
Subject: [PATCH v1 2/2] um: increase default virtual physical memory to 64 MiB
|
||||||
|
To: linux-um@lists.infradead.org
|
||||||
|
Cc: Richard Weinberger <richard@nod.at>,
|
||||||
|
Anton Ivanov <anton.ivanov@cambridgegreys.com>,
|
||||||
|
Johannes Berg <johannes@sipsolutions.net>
|
||||||
|
|
||||||
|
The current 32 MiB of RAM causes OOMs to appear shortly after
|
||||||
|
booting in a minimal OpenWrt 22.03 configuration with a
|
||||||
|
5.10.134 kernel.
|
||||||
|
|
||||||
|
Of course, passing a "mem=64M" (from the --help text) parameter
|
||||||
|
works too, but it produces the following (info) message:
|
||||||
|
|
||||||
|
| [ 0.000000] Unknown kernel command line parameters "mem=64M", will be passed to user space.
|
||||||
|
|
||||||
|
That's why, I think it would be nicer, if this is working out
|
||||||
|
of the box again :).
|
||||||
|
|
||||||
|
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||||
|
---
|
||||||
|
arch/um/kernel/um_arch.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/arch/um/kernel/um_arch.c
|
||||||
|
+++ b/arch/um/kernel/um_arch.c
|
||||||
|
@@ -130,7 +130,7 @@ static int have_root __initdata;
|
||||||
|
static int have_console __initdata;
|
||||||
|
|
||||||
|
/* Set in uml_mem_setup and modified in linux_main */
|
||||||
|
-long long physmem_size = 32 * 1024 * 1024;
|
||||||
|
+long long physmem_size = 64 * 1024 * 1024;
|
||||||
|
EXPORT_SYMBOL(physmem_size);
|
||||||
|
|
||||||
|
static const char *usage_string =
|
@ -242,7 +242,6 @@ CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
|||||||
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
|
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
|
||||||
CONFIG_INTEL_GTT=y
|
CONFIG_INTEL_GTT=y
|
||||||
CONFIG_INTEL_IDLE=y
|
CONFIG_INTEL_IDLE=y
|
||||||
# CONFIG_INTEL_IDXD is not set
|
|
||||||
CONFIG_INTEL_IOMMU=y
|
CONFIG_INTEL_IOMMU=y
|
||||||
# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
|
# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
|
||||||
CONFIG_INTEL_IOMMU_FLOPPY_WA=y
|
CONFIG_INTEL_IOMMU_FLOPPY_WA=y
|
||||||
@ -264,7 +263,6 @@ CONFIG_IOASID=y
|
|||||||
CONFIG_IOMMU_API=y
|
CONFIG_IOMMU_API=y
|
||||||
# CONFIG_IOMMU_DEBUG is not set
|
# CONFIG_IOMMU_DEBUG is not set
|
||||||
# CONFIG_IOMMU_DEBUGFS is not set
|
# CONFIG_IOMMU_DEBUGFS is not set
|
||||||
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
|
|
||||||
CONFIG_IOMMU_DMA=y
|
CONFIG_IOMMU_DMA=y
|
||||||
CONFIG_IOMMU_HELPER=y
|
CONFIG_IOMMU_HELPER=y
|
||||||
CONFIG_IOMMU_IOVA=y
|
CONFIG_IOMMU_IOVA=y
|
||||||
|
@ -257,7 +257,6 @@ CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
|||||||
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
|
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
|
||||||
CONFIG_INTEL_GTT=y
|
CONFIG_INTEL_GTT=y
|
||||||
CONFIG_INTEL_IDLE=y
|
CONFIG_INTEL_IDLE=y
|
||||||
# CONFIG_INTEL_IDXD_COMPAT is not set
|
|
||||||
CONFIG_INTEL_IOMMU=y
|
CONFIG_INTEL_IOMMU=y
|
||||||
# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
|
# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
|
||||||
CONFIG_INTEL_IOMMU_FLOPPY_WA=y
|
CONFIG_INTEL_IOMMU_FLOPPY_WA=y
|
||||||
@ -280,7 +279,7 @@ CONFIG_IOASID=y
|
|||||||
CONFIG_IOMMU_API=y
|
CONFIG_IOMMU_API=y
|
||||||
# CONFIG_IOMMU_DEBUG is not set
|
# CONFIG_IOMMU_DEBUG is not set
|
||||||
# CONFIG_IOMMU_DEBUGFS is not set
|
# CONFIG_IOMMU_DEBUGFS is not set
|
||||||
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
|
CONFIG_IOMMU_DEFAULT_DMA_LAZY=y
|
||||||
CONFIG_IOMMU_DMA=y
|
CONFIG_IOMMU_DMA=y
|
||||||
CONFIG_IOMMU_HELPER=y
|
CONFIG_IOMMU_HELPER=y
|
||||||
CONFIG_IOMMU_IOVA=y
|
CONFIG_IOMMU_IOVA=y
|
||||||
|
@ -123,6 +123,7 @@ CONFIG_SERIAL_MCTRL_GPIO=y
|
|||||||
# CONFIG_USB_UHCI_HCD is not set
|
# CONFIG_USB_UHCI_HCD is not set
|
||||||
CONFIG_VIA_RHINE=y
|
CONFIG_VIA_RHINE=y
|
||||||
CONFIG_VIA_RHINE_MMIO=y
|
CONFIG_VIA_RHINE_MMIO=y
|
||||||
|
CONFIG_WATCHDOG_CORE=y
|
||||||
# CONFIG_WDT is not set
|
# CONFIG_WDT is not set
|
||||||
# CONFIG_X86_ACPI_CPUFREQ is not set
|
# CONFIG_X86_ACPI_CPUFREQ is not set
|
||||||
CONFIG_X86_ALIGNMENT_16=y
|
CONFIG_X86_ALIGNMENT_16=y
|
||||||
|
@ -131,6 +131,7 @@ CONFIG_SERIAL_MCTRL_GPIO=y
|
|||||||
# CONFIG_USB_UHCI_HCD is not set
|
# CONFIG_USB_UHCI_HCD is not set
|
||||||
CONFIG_VIA_RHINE=y
|
CONFIG_VIA_RHINE=y
|
||||||
CONFIG_VIA_RHINE_MMIO=y
|
CONFIG_VIA_RHINE_MMIO=y
|
||||||
|
CONFIG_WATCHDOG_CORE=y
|
||||||
# CONFIG_WDT is not set
|
# CONFIG_WDT is not set
|
||||||
# CONFIG_WIRELESS_HOTKEY is not set
|
# CONFIG_WIRELESS_HOTKEY is not set
|
||||||
# CONFIG_X86_ACPI_CPUFREQ is not set
|
# CONFIG_X86_ACPI_CPUFREQ is not set
|
||||||
|
@ -39,7 +39,9 @@ define KernelPackage/f71808e-wdt
|
|||||||
SUBMENU:=$(OTHER_MENU)
|
SUBMENU:=$(OTHER_MENU)
|
||||||
TITLE:=Fintek F718xx/F818xx Watchdog Timer
|
TITLE:=Fintek F718xx/F818xx Watchdog Timer
|
||||||
DEPENDS:=@TARGET_x86
|
DEPENDS:=@TARGET_x86
|
||||||
KCONFIG:=CONFIG_F71808E_WDT
|
KCONFIG:=\
|
||||||
|
CONFIG_F71808E_WDT \
|
||||||
|
CONFIG_WATCHDOG_CORE=y
|
||||||
FILES:=$(LINUX_DIR)/drivers/watchdog/f71808e_wdt.ko
|
FILES:=$(LINUX_DIR)/drivers/watchdog/f71808e_wdt.ko
|
||||||
AUTOLOAD:=$(call AutoProbe,f71808e-wdt,1)
|
AUTOLOAD:=$(call AutoProbe,f71808e-wdt,1)
|
||||||
endef
|
endef
|
||||||
@ -123,8 +125,10 @@ define KernelPackage/itco-wdt
|
|||||||
SUBMENU:=$(OTHER_MENU)
|
SUBMENU:=$(OTHER_MENU)
|
||||||
TITLE:=Intel iTCO Watchdog Timer
|
TITLE:=Intel iTCO Watchdog Timer
|
||||||
DEPENDS:=@TARGET_x86
|
DEPENDS:=@TARGET_x86
|
||||||
KCONFIG:=CONFIG_ITCO_WDT \
|
KCONFIG:=\
|
||||||
CONFIG_ITCO_VENDOR_SUPPORT=y
|
CONFIG_ITCO_WDT \
|
||||||
|
CONFIG_ITCO_VENDOR_SUPPORT=y \
|
||||||
|
CONFIG_WATCHDOG_CORE=y
|
||||||
FILES:=$(LINUX_DIR)/drivers/watchdog/iTCO_wdt.ko \
|
FILES:=$(LINUX_DIR)/drivers/watchdog/iTCO_wdt.ko \
|
||||||
$(LINUX_DIR)/drivers/watchdog/iTCO_vendor_support.ko
|
$(LINUX_DIR)/drivers/watchdog/iTCO_vendor_support.ko
|
||||||
AUTOLOAD:=$(call AutoLoad,50,iTCO_vendor_support iTCO_wdt,1)
|
AUTOLOAD:=$(call AutoLoad,50,iTCO_vendor_support iTCO_wdt,1)
|
||||||
@ -178,7 +182,9 @@ define KernelPackage/w83627hf-wdt
|
|||||||
SUBMENU:=$(OTHER_MENU)
|
SUBMENU:=$(OTHER_MENU)
|
||||||
TITLE:=Winbond 83627HF Watchdog Timer
|
TITLE:=Winbond 83627HF Watchdog Timer
|
||||||
DEPENDS:=@TARGET_x86
|
DEPENDS:=@TARGET_x86
|
||||||
KCONFIG:=CONFIG_W83627HF_WDT
|
KCONFIG:=\
|
||||||
|
CONFIG_W83627HF_WDT \
|
||||||
|
ONFIG_WATCHDOG_CORE=y
|
||||||
FILES:=$(LINUX_DIR)/drivers/watchdog/w83627hf_wdt.ko
|
FILES:=$(LINUX_DIR)/drivers/watchdog/w83627hf_wdt.ko
|
||||||
AUTOLOAD:=$(call AutoLoad,50,w83627hf-wdt,1)
|
AUTOLOAD:=$(call AutoLoad,50,w83627hf-wdt,1)
|
||||||
endef
|
endef
|
||||||
|
Loading…
x
Reference in New Issue
Block a user