Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2021-12-14 01:07:17 +08:00
commit bd0bd2af71
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
169 changed files with 4361 additions and 834 deletions

View File

@ -272,6 +272,12 @@ menu "Target Images"
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
select PACKAGE_kmod-e1000
config VHDX_IMAGES
bool "Build Hyper-V image files (VHDX)"
depends on TARGET_x86
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
select PACKAGE_kmod-e1000
config TARGET_IMAGES_GZIP
bool "GZip images"
depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta

View File

@ -395,7 +395,7 @@ define Build/patch-cmdline
endef
# Convert a raw image into a $1 type image.
# E.g. | qemu-image vdi
# E.g. | qemu-image vdi <optional extra arguments to qemu-img binary>
define Build/qemu-image
if command -v qemu-img; then \
qemu-img convert -f raw -O $1 $@ $@.new; \
@ -524,12 +524,14 @@ define Build/xor-image
endef
define Build/zip
rm -rf $@.tmp
mkdir $@.tmp
mv $@ $@.tmp/$(1)
mv $@ $@.tmp/$(word 1,$(1))
zip -j -X \
$(STAGING_DIR_HOST)/bin/zip -j -X \
$(if $(SOURCE_DATE_EPOCH),--mtime="$(SOURCE_DATE_EPOCH)") \
$@ $@.tmp/$(if $(1),$(1),$@)
$(wordlist 2,$(words $(1)),$(1)) \
$@ $@.tmp/$(if $(word 1,$(1)),$(word 1,$(1)),$$(basename $@))
rm -rf $@.tmp
endef

View File

@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL
endif
LINUX_VERSION-5.4 = .162
LINUX_VERSION-5.10 = .82
LINUX_VERSION-5.10 = .83
LINUX_KERNEL_HASH-5.4.162 = c12d72ddaac78189305a5e98825295ecb02282970033b052276035e83189e25b
LINUX_KERNEL_HASH-5.10.82 = d66f7c7eed02f84ae550b3c91a26c70eea13682a6d672432f07bce66ff8ce350
LINUX_KERNEL_HASH-5.10.83 = ef259a43f33ddb56001283f4f4e50af29b8a48fa066aed7371a90ebf38c29b70
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

View File

@ -56,7 +56,7 @@ MESON_CPU:="$(CPU_TYPE)$(if $(CPU_SUBTYPE),+$(CPU_SUBTYPE))"
endif
define Meson
$(2) $(STAGING_DIR_HOST)/bin/$(PYTHON) $(STAGING_DIR_HOST)/bin/meson $(1)
$(2) $(STAGING_DIR_HOST)/bin/$(PYTHON) $(STAGING_DIR_HOST)/bin/meson.py $(1)
endef
define Meson/CreateNativeFile

View File

@ -24,6 +24,7 @@ PKG_CONFIG_DEPENDS += \
CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE \
CONFIG_NAND_SUPPORT \
CONFIG_LEGACY_SDCARD_SUPPORT \
CONFIG_EMMC_SUPPORT \
CONFIG_CLEAN_IPKG \
CONFIG_PER_FEED_REPO \
$(foreach feed,$(FEEDS_AVAILABLE),CONFIG_FEED_$(feed))
@ -124,6 +125,12 @@ ifeq ($(CONFIG_NAND_SUPPORT),)
endef
endif
ifeq ($(CONFIG_EMMC_SUPPORT),)
define Package/base-files/emmc-support
rm -f $(1)/lib/upgrade/emmc.sh
endef
endif
ifeq ($(CONFIG_LEGACY_SDCARD_SUPPORT),)
define Package/base-files/legacy-sdcard-support
rm -f $(1)/lib/upgrade/legacy-sdcard.sh
@ -136,6 +143,7 @@ define Package/base-files/install
$(Package/base-files/install-key)
$(Package/base-files/nand-support)
$(Package/base-files/legacy-sdcard-support)
$(Package/base-files/emmc-support)
if [ -d $(GENERIC_PLATFORM_DIR)/base-files/. ]; then \
$(CP) $(GENERIC_PLATFORM_DIR)/base-files/* $(1)/; \
fi

View File

@ -105,9 +105,9 @@ service_data() {
}
service_running() {
local service="${1:-$(basename $initscript)}"
local instance="${2:-*}"
procd_running "$service" "$instance" "$@"
local instance="${1:-*}"
procd_running "$(basename $initscript)" "$instance"
}
${INIT_TRACE:+set -x}

View File

@ -0,0 +1,64 @@
# Copyright (C) 2021 OpenWrt.org
#
. /lib/functions.sh
emmc_upgrade_tar() {
local tar_file="$1"
[ "$CI_KERNPART" -a -z "$EMMC_KERN_DEV" ] && export EMMC_KERN_DEV="$(find_mmc_part $CI_KERNPART $CI_ROOTDEV)"
[ "$CI_ROOTPART" -a -z "$EMMC_ROOT_DEV" ] && export EMMC_ROOT_DEV="$(find_mmc_part $CI_ROOTPART $CI_ROOTDEV)"
[ "$CI_DATAPART" -a -z "$EMMC_DATA_DEV" ] && export EMMC_DATA_DEV="$(find_mmc_part $CI_DATAPART $CI_ROOTDEV)"
local has_kernel
local has_rootfs
local board_dir=$(tar tf "$tar_file" | grep -m 1 '^sysupgrade-.*/$')
board_dir=${board_dir%/}
tar tf "$tar_file" ${board_dir}/kernel 1>/dev/null 2>/dev/null && has_kernel=1
tar tf "$tar_file" ${board_dir}/root 1>/dev/null 2>/dev/null && has_rootfs=1
[ "$has_kernel" = 1 -a "$EMMC_KERN_DEV" ] &&
export EMMC_KERNEL_BLOCKS=$(($(tar xf "$tar_file" ${board_dir}/kernel -O | dd of="$EMMC_KERN_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1)))
[ "$has_rootfs" = 1 -a "$EMMC_ROOT_DEV" ] &&
export EMMC_ROOTFS_BLOCKS=$(($(tar xf "$tar_file" ${board_dir}/root -O | dd of="$EMMC_ROOT_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1)))
if [ -z "$UPGRADE_BACKUP" ]; then
if [ "$EMMC_DATA_DEV" ]; then
dd if=/dev/zero of="$EMMC_DATA_DEV" bs=512 count=8
elif [ "$EMMC_ROOTFS_BLOCKS" ]; then
dd if=/dev/zero of="$EMMC_ROOT_DEV" bs=512 seek=$EMMC_ROOTFS_BLOCKS count=8
elif [ "$EMMC_KERNEL_BLOCKS" ]; then
dd if=/dev/zero of="$EMMC_KERN_DEV" bs=512 seek=$EMMC_KERNEL_BLOCKS count=8
fi
fi
}
emmc_upgrade_fit() {
local fit_file="$1"
[ "$CI_KERNPART" -a -z "$EMMC_KERN_DEV" ] && export EMMC_KERN_DEV="$(find_mmc_part $CI_KERNPART $CI_ROOTDEV)"
if [ "$EMMC_KERN_DEV" ]; then
export EMMC_KERNEL_BLOCKS=$(($(get_image "$fit_file" | fwtool -i /dev/null -T - | dd of="$EMMC_KERN_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1)))
[ -z "$UPGRADE_BACKUP" ] && dd if=/dev/zero of="$EMMC_KERN_DEV" bs=512 seek=$EMMC_KERNEL_BLOCKS count=8
fi
}
emmc_copy_config() {
if [ "$EMMC_DATA_DEV" ]; then
dd if="$UPGRADE_BACKUP" of="$EMMC_DATA_DEV" bs=512
elif [ "$EMMC_ROOTFS_BLOCKS" ]; then
dd if="$UPGRADE_BACKUP" of="$EMMC_ROOT_DEV" bs=512 seek=$EMMC_ROOTFS_BLOCKS
elif [ "$EMMC_KERNEL_BLOCKS" ]; then
dd if="$UPGRADE_BACKUP" of="$EMMC_KERN_DEV" bs=512 seek=$EMMC_KERNEL_BLOCKS
fi
}
emmc_do_upgrade() {
local file_type=$(identify $1)
case "$file_type" in
"fit") emmc_upgrade_fit $1;;
*) emmc_upgrade_tar $1;;
esac
}

View File

@ -35,6 +35,7 @@ devolo,magic-2-wifi-next|\
edgecore,ecw5211|\
glinet,gl-ap1300|\
glinet,gl-b1300|\
glinet,gl-b2200|\
luma,wrtq-329acn|\
netgear,wac510|\
openmesh,a42|\

View File

@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=intel-microcode
PKG_VERSION:=20200616
PKG_VERSION:=20210608
PKG_RELEASE:=1
PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz
PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).2.tar.xz
PKG_SOURCE_URL:=@DEBIAN/pool/non-free/i/intel-microcode/
PKG_HASH:=bcc3b81c452fe4649a948c022475d76c1cdfbb730f36749a082f412f1406a3b9
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE)
PKG_HASH:=fbf82688ffd0d87b352a35c57bd097ea014f0ad32c9c8f9629725c1b43d1c84d
PKG_BUILD_DIR:=$(BUILD_DIR)/intel-microcode-3.$(PKG_VERSION).2
PKG_BUILD_DEPENDS:=iucode-tool/host

View File

@ -39,6 +39,7 @@ ALLWIFIBOARDS:= \
engenius_emr3500 \
ezviz_cs-w3-wd1200g-eup \
glinet_gl-ap1300 \
glinet_gl-b2200 \
glinet_gl-s1300 \
linksys_ea8300 \
linksys_mr8300-v0 \
@ -127,6 +128,7 @@ $(eval $(call generate-ipq-wifi-package,engenius_emd1,EnGenius EMD1))
$(eval $(call generate-ipq-wifi-package,engenius_emr3500,EnGenius EMR3500))
$(eval $(call generate-ipq-wifi-package,ezviz_cs-w3-wd1200g-eup,EZVIZ CS-W3-WD1200G EUP))
$(eval $(call generate-ipq-wifi-package,glinet_gl-ap1300,GL.iNet GL-AP1300))
$(eval $(call generate-ipq-wifi-package,glinet_gl-b2200,GL.iNet GL-B2200))
$(eval $(call generate-ipq-wifi-package,glinet_gl-s1300,GL.iNet GL-S1300))
$(eval $(call generate-ipq-wifi-package,linksys_ea8300,Linksys EA8300))
$(eval $(call generate-ipq-wifi-package,linksys_mr8300-v0,Linksys MR8300))

View File

@ -70,7 +70,6 @@ define KernelPackage/fs-btrfs
DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +kmod-lib-zstd
KCONFIG:=\
CONFIG_BTRFS_FS \
CONFIG_BTRFS_FS_POSIX_ACL=n \
CONFIG_BTRFS_FS_CHECK_INTEGRITY=n
FILES:=\
$(LINUX_DIR)/fs/btrfs/btrfs.ko

View File

@ -914,6 +914,21 @@ endef
$(eval $(call KernelPackage,video-gspca-sq905c))
define KernelPackage/video-gspca-sq930x
TITLE:=sq930x webcam support
KCONFIG:=CONFIG_USB_GSPCA_SQ930X
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_sq930x.ko
AUTOLOAD:=$(call AutoProbe,gspca_sq930x)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-sq930x/description
The SQ Technologies SQ930X based USB Camera Driver (sq930x) kernel module
endef
$(eval $(call KernelPackage,video-gspca-sq930x))
define KernelPackage/video-gspca-stk014
TITLE:=stk014 webcam support
KCONFIG:=CONFIG_USB_GSPCA_STK014

View File

@ -0,0 +1,28 @@
From: Felix Fietkau <nbd@nbd.name>
Date: Thu, 2 Dec 2021 13:30:05 +0100
Subject: [PATCH] mac80211: send ADDBA requests using the tid/queue of the
aggregation session
Sending them out on a different queue can cause a race condition where a
number of packets in the queue may be discarded by the receiver, because
the ADDBA request is sent too early.
This affects any driver with software A-MPDU setup which does not allocate
packet seqno in hardware on tx, regardless of whether iTXQ is used or not.
The only driver I've seen that explicitly deals with this issue internally
is mwl8k.
Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -106,7 +106,7 @@ static void ieee80211_send_addba_request
mgmt->u.action.u.addba_req.start_seq_num =
cpu_to_le16(start_seq_num << 4);
- ieee80211_tx_skb(sdata, skb);
+ ieee80211_tx_skb_tid(sdata, skb, tid);
}
void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn)

View File

@ -0,0 +1,79 @@
From: Johannes Berg <johannes.berg@intel.com>
Date: Mon, 29 Nov 2021 15:32:47 +0200
Subject: [PATCH] mac80211: agg-tx: don't schedule_and_wake_txq() under
sta->lock
When we call ieee80211_agg_start_txq(), that will in turn call
schedule_and_wake_txq(). Called from ieee80211_stop_tx_ba_cb()
this is done under sta->lock, which leads to certain circular
lock dependencies, as reported by Chris Murphy:
https://lore.kernel.org/r/CAJCQCtSXJ5qA4bqSPY=oLRMbv-irihVvP7A2uGutEbXQVkoNaw@mail.gmail.com
In general, ieee80211_agg_start_txq() is usually not called
with sta->lock held, only in this one place. But it's always
called with sta->ampdu_mlme.mtx held, and that's therefore
clearly sufficient.
Change ieee80211_stop_tx_ba_cb() to also call it without the
sta->lock held, by factoring it out of ieee80211_remove_tid_tx()
(which is only called in this one place).
This breaks the locking chain and makes it less likely that
we'll have similar locking chain problems in the future.
Reported-by: Chris Murphy <lists@colorremedies.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -9,7 +9,7 @@
* Copyright 2007, Michael Wu <flamingice@sourmilk.net>
* Copyright 2007-2010, Intel Corporation
* Copyright(c) 2015-2017 Intel Deutschland GmbH
- * Copyright (C) 2018 - 2020 Intel Corporation
+ * Copyright (C) 2018 - 2021 Intel Corporation
*/
#include <linux/ieee80211.h>
@@ -213,6 +213,8 @@ ieee80211_agg_start_txq(struct sta_info
struct ieee80211_txq *txq = sta->sta.txq[tid];
struct txq_info *txqi;
+ lockdep_assert_held(&sta->ampdu_mlme.mtx);
+
if (!txq)
return;
@@ -290,7 +292,6 @@ static void ieee80211_remove_tid_tx(stru
ieee80211_assign_tid_tx(sta, tid, NULL);
ieee80211_agg_splice_finish(sta->sdata, tid);
- ieee80211_agg_start_txq(sta, tid, false);
kfree_rcu(tid_tx, rcu_head);
}
@@ -889,6 +890,7 @@ void ieee80211_stop_tx_ba_cb(struct sta_
{
struct ieee80211_sub_if_data *sdata = sta->sdata;
bool send_delba = false;
+ bool start_txq = false;
ht_dbg(sdata, "Stopping Tx BA session for %pM tid %d\n",
sta->sta.addr, tid);
@@ -906,10 +908,14 @@ void ieee80211_stop_tx_ba_cb(struct sta_
send_delba = true;
ieee80211_remove_tid_tx(sta, tid);
+ start_txq = true;
unlock_sta:
spin_unlock_bh(&sta->lock);
+ if (start_txq)
+ ieee80211_agg_start_txq(sta, tid, false);
+
if (send_delba)
ieee80211_send_delba(sdata, sta->sta.addr, tid,
WLAN_BACK_INITIATOR, WLAN_REASON_QSTA_NOT_USE);

View File

@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2021-11-23
PKG_SOURCE_VERSION:=99225b985cbcab4707589f1fa313436f4bf1e368
PKG_MIRROR_HASH:=6444c7d49d778c7621b03f0f201ce41f6dc9ac00dedb29c66478360b4fd60492
PKG_SOURCE_DATE:=2021-12-03
PKG_SOURCE_VERSION:=678071ef70297b7264661c356ddb3c8cf7f3c87b
PKG_MIRROR_HASH:=b1f8613f7c65ca6a893f83ed9efc3f7ce72b9b4904fd11b89264f57f4f2a3b5e
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_USE_NINJA:=0

View File

@ -3,11 +3,11 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=nat46
PKG_MIRROR_HASH:=5e7ebe31311a7b79f9eda222e94170611b3e041e3a472f55b6a283d9b0093bd4
PKG_MIRROR_HASH:=1476da31996e26ef76e2ba9623d978d33002abf357a59323d9b539812b0a4b76
PKG_SOURCE_URL:=https://github.com/ayourtch/nat46.git
PKG_SOURCE_DATE:=2021-11-08
PKG_SOURCE_DATE:=2021-11-24
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=1fdf2a3cf90843ef65b8e84ff25d5e0507eaa3fe
PKG_SOURCE_VERSION:=d9bc161faa4c18ad1d327a96baa2dc4460b71ccd
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
PKG_LICENSE:=GPL-2.0

View File

@ -7,10 +7,10 @@ PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/greearb/rtl8812AU_8821AU_linux.git
PKG_MIRROR_HASH:=aee819df4ba83251b59bd1d4f412287b27105e5de9284bb09579f0e1a1538328
PKG_MIRROR_HASH:=31e658df3e4d4c18c396259c2e0bef2bfc44a4aa870931f031a31e948be98af4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2020-12-07
PKG_SOURCE_VERSION:=1e9689c89fa627d2d764ba0e8359fd444fe8458f
PKG_SOURCE_DATE:=2021-11-07
PKG_SOURCE_VERSION:=39df55967b7de9f6c9600017b724303f95a8b9e2
PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
PKG_BUILD_PARALLEL:=1

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libnftnl
PKG_VERSION:=1.2.0
PKG_VERSION:=1.2.1
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
PKG_HASH:=90b01fddfe9be8c3245c3ba5ff5a4424a8df708828f92b2b361976b658c074f5
PKG_HASH:=7508a5c414fab13e3cb3ce8262d0ce4f02c1590a8e4f8628ab497b5b4585937c
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
PKG_LICENSE:=GPL-2.0-or-later

View File

@ -60,6 +60,7 @@ setup_interface () {
[ -n "$message" ] && json_add_string message "$message"
[ -n "$timezone" ] && json_add_int timezone "$timezone"
[ -n "$lease" ] && json_add_int leasetime "$lease"
[ -n "$serverid" ] && json_add_string dhcpserver "$serverid"
proto_close_data
proto_send_update "$INTERFACE"

View File

@ -1,17 +1,17 @@
# DNS
tcp:53 CS5
tcp:5353 CS5
udp:53 CS5
udp:5353 CS5
tcp:53 voice
tcp:5353 voice
udp:53 voice
udp:5353 voice
# NTP
udp:123 CS6
udp:123 voice
# SSH
tcp:22 +CS4
tcp:22 +video
# HTTP/QUIC
tcp:80 +CS3
tcp:443 +CS3
udp:80 +CS3
udp:443 +CS3
tcp:80 +besteffort
tcp:443 +besteffort
udp:80 +besteffort
udp:443 +besteffort

View File

@ -1,13 +1,14 @@
config defaults
list defaults /etc/qosify/*.conf
option dscp_prio CS5
option dscp_icmp +CS0
option dscp_bulk bulk
option dscp_default_udp CS4
option bulk_trigger_timeout 5
option bulk_trigger_pps 100
option dscp_prio video
option dscp_icmp +besteffort
option dscp_default_udp besteffort
option prio_max_avg_pkt_len 500
config class besteffort
option ingress CS0
option egress CS0
config class bulk
option ingress LE
option egress LE

View File

@ -143,6 +143,7 @@ define Package/hostapd/Default
TITLE:=IEEE 802.1x Authenticator
URL:=http://hostap.epitest.fi/
DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
EXTRA_DEPENDS:=hostapd-common (=$(PKG_VERSION)-$(PKG_RELEASE))
USERID:=network=101:network=101
PROVIDES:=hostapd
CONFLICTS:=$(HOSTAPD_PROVIDERS)
@ -227,6 +228,7 @@ define Package/wpad/Default
SUBMENU:=WirelessAPD
TITLE:=IEEE 802.1x Auth/Supplicant
DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
EXTRA_DEPENDS:=hostapd-common (=$(PKG_VERSION)-$(PKG_RELEASE))
USERID:=network=101:network=101
URL:=http://hostap.epitest.fi/
PROVIDES:=hostapd wpa-supplicant
@ -342,6 +344,7 @@ define Package/wpa-supplicant/Default
TITLE:=WPA Supplicant
URL:=http://hostap.epitest.fi/wpa_supplicant/
DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
EXTRA_DEPENDS:=hostapd-common (=$(PKG_VERSION)-$(PKG_RELEASE))
USERID:=network=101:network=101
PROVIDES:=wpa-supplicant
CONFLICTS:=$(SUPPLICANT_PROVIDERS)
@ -598,6 +601,7 @@ endef
define Package/hostapd-common/install
$(INSTALL_DIR) $(1)/etc/capabilities $(1)/etc/rc.button $(1)/etc/hotplug.d/ieee80211 $(1)/etc/init.d $(1)/lib/netifd $(1)/usr/share/acl.d
$(INSTALL_BIN) ./files/dhcp-get-server.sh $(1)/lib/netifd/dhcp-get-server.sh
$(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/netifd/hostapd.sh
$(INSTALL_BIN) ./files/wpad.init $(1)/etc/init.d/wpad
$(INSTALL_BIN) ./files/wps-hotplug.sh $(1)/etc/rc.button/wps

View File

@ -0,0 +1,2 @@
#!/bin/sh
[ "$1" = bound ] && echo "$serverid"

View File

@ -60,7 +60,7 @@ CONFIG_RSN_PREAUTH=y
CONFIG_EAP=y
# EAP Re-authentication Protocol (ERP) in integrated EAP server
#CONFIG_ERP=y
CONFIG_ERP=y
# EAP-MD5 for the integrated EAP server
CONFIG_EAP_MD5=y

View File

@ -72,6 +72,15 @@ hostapd_append_wpa_key_mgmt() {
;;
esac
[ "$fils" -gt 0 ] && {
case "$auth_type" in
eap*)
append wpa_key_mgmt FILS-SHA256
[ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt FT-FILS-SHA256
;;
esac
}
[ "$auth_osen" = "1" ] && append wpa_key_mgmt "OSEN"
}
@ -362,6 +371,9 @@ hostapd_common_add_bss_config() {
config_add_int eap_server
config_add_string eap_user_file ca_cert server_cert private_key private_key_passwd server_id
config_add_boolean fils
config_add_string fils_dhcp
}
hostapd_set_vlan_file() {
@ -534,8 +546,9 @@ hostapd_set_bss_options() {
airtime_bss_weight airtime_bss_limit airtime_sta_weight \
multicast_to_unicast proxy_arp per_sta_vif \
eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id \
vendor_elements
vendor_elements fils
set_default fils 0
set_default isolate 0
set_default maxassoc 0
set_default max_inactivity 0
@ -557,6 +570,8 @@ hostapd_set_bss_options() {
set_default airtime_bss_limit 0
set_default eap_server 0
/usr/sbin/hostapd -vfils || fils=0
append bss_conf "ctrl_interface=/var/run/hostapd"
if [ "$isolate" -gt 0 ]; then
append bss_conf "ap_isolate=$isolate" "$N"
@ -657,7 +672,9 @@ hostapd_set_bss_options() {
auth_server auth_secret auth_port \
dae_client dae_secret dae_port \
ownip radius_client_addr \
eap_reauth_period request_cui
eap_reauth_period request_cui \
erp_domain mobility_domain \
fils_realm fils_dhcp
# radius can provide VLAN ID for clients
vlan_possible=1
@ -667,6 +684,30 @@ hostapd_set_bss_options() {
[ -n "$auth_port" ] || json_get_var auth_port port
[ -n "$auth_secret" ] || json_get_var auth_secret key
[ "$fils" -gt 0 ] && {
set_default erp_domain "$mobility_domain"
set_default erp_domain "$(echo "$ssid" | md5sum | head -c 8)"
set_default fils_realm "$erp_domain"
append bss_conf "erp_send_reauth_start=1" "$N"
append bss_conf "erp_domain=$erp_domain" "$N"
append bss_conf "fils_realm=$fils_realm" "$N"
append bss_conf "fils_cache_id=$(echo "$fils_realm" | md5sum | head -c 4)" "$N"
[ "$fils_dhcp" = "*" ] && {
json_get_values network network
fils_dhcp=
for net in $network; do
fils_dhcp="$(ifstatus "$net" | jsonfilter -e '@.data.dhcpserver')"
[ -n "$fils_dhcp" ] && break
done
[ -z "$fils_dhcp" -a -n "$network_bridge" -a -n "$network_ifname" ] && \
fils_dhcp="$(udhcpc -B -n -q -s /lib/netifd/dhcp-get-server.sh -t 1 -i "$network_ifname" 2>/dev/null)"
}
[ -n "$fils_dhcp" ] && append bss_conf "dhcp_server=$fils_dhcp" "$N"
}
set_default auth_port 1812
set_default dae_port 3799
set_default request_cui 0
@ -856,6 +897,10 @@ hostapd_set_bss_options() {
done
fi
fi
if [ "$fils" -gt 0 ]; then
json_get_vars fils_realm
set_default fils_realm "$(echo "$ssid" | md5sum | head -c 8)"
fi
append bss_conf "wpa_disable_eapol_key_retries=$wpa_disable_eapol_key_retries" "$N"
@ -880,7 +925,7 @@ hostapd_set_bss_options() {
fi
append bss_conf "okc=$auth_cache" "$N"
[ "$auth_cache" = 0 ] && append bss_conf "disable_pmksa_caching=1" "$N"
[ "$auth_cache" = 0 -a "$fils" = 0 ] && append bss_conf "disable_pmksa_caching=1" "$N"
# RSN -> allow management frame protection
case "$ieee80211w" in
@ -1034,6 +1079,7 @@ hostapd_set_bss_options() {
if [ "$eap_server" = "1" ]; then
append bss_conf "eap_server=1" "$N"
append bss_conf "eap_server_erp=1" "$N"
[ -n "$eap_user_file" ] && append bss_conf "eap_user_file=$eap_user_file" "$N"
[ -n "$ca_cert" ] && append bss_conf "ca_cert=$ca_cert" "$N"
[ -n "$server_cert" ] && append bss_conf "server_cert=$server_cert" "$N"
@ -1200,7 +1246,7 @@ wpa_supplicant_add_network() {
json_get_vars \
ssid bssid key \
basic_rate mcast_rate \
ieee80211w ieee80211r \
ieee80211w ieee80211r fils \
multi_ap \
default_disabled
@ -1292,6 +1338,7 @@ wpa_supplicant_add_network() {
json_get_vars eap_type identity anonymous_identity ca_cert ca_cert_usesystem
[ "$fils" -gt 0 ] && append network_data "erp=1" "$N$T"
if [ "$ca_cert_usesystem" -eq "1" -a -f "/etc/ssl/certs/ca-certificates.crt" ]; then
append network_data "ca_cert=\"/etc/ssl/certs/ca-certificates.crt\"" "$N$T"
else

View File

@ -578,7 +578,7 @@ CONFIG_HS20=y
#CONFIG_MBO=y
# Fast Initial Link Setup (FILS) (IEEE 802.11ai)
#CONFIG_FILS=y
CONFIG_FILS=y
# FILS shared key authentication with PFS
#CONFIG_FILS_SK_PFS=y

View File

@ -578,7 +578,7 @@ CONFIG_P2P=y
#CONFIG_MBO=y
# Fast Initial Link Setup (FILS) (IEEE 802.11ai)
#CONFIG_FILS=y
CONFIG_FILS=y
# FILS shared key authentication with PFS
#CONFIG_FILS_SK_PFS=y

View File

@ -0,0 +1,20 @@
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -323,6 +323,7 @@ ifdef CONFIG_FILS
CFLAGS += -DCONFIG_FILS
OBJS += ../src/ap/fils_hlp.o
NEED_SHA384=y
+NEED_HMAC_SHA384_KDF=y
NEED_AES_SIV=y
ifdef CONFIG_FILS_SK_PFS
CFLAGS += -DCONFIG_FILS_SK_PFS
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -309,6 +309,7 @@ endif
ifdef CONFIG_FILS
CFLAGS += -DCONFIG_FILS
NEED_SHA384=y
+NEED_HMAC_SHA384_KDF=y
NEED_AES_SIV=y
ifdef CONFIG_FILS_SK_PFS
CFLAGS += -DCONFIG_FILS_SK_PFS

View File

@ -18,7 +18,7 @@
OBJS += ../src/ap/vlan_init.o
OBJS += ../src/ap/vlan_ifconfig.o
OBJS += ../src/ap/vlan.o
@@ -349,10 +351,14 @@ CFLAGS += -DCONFIG_MBO
@@ -350,10 +352,14 @@ CFLAGS += -DCONFIG_MBO
OBJS += ../src/ap/mbo_ap.o
endif
@ -36,7 +36,7 @@
LIBS += $(DRV_AP_LIBS)
ifdef CONFIG_L2_PACKET
@@ -1277,6 +1283,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
@@ -1278,6 +1284,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
_OBJS_VAR := OBJS
include ../src/objs.mk
@ -49,7 +49,7 @@
hostapd: $(OBJS)
$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
@$(E) " LD " $@
@@ -1351,6 +1363,12 @@ include ../src/objs.mk
@@ -1352,6 +1364,12 @@ include ../src/objs.mk
_OBJS_VAR := SOBJS
include ../src/objs.mk
@ -72,7 +72,7 @@
include ../src/build.rules
ifdef LIBS
@@ -359,7 +360,9 @@ endif
@@ -360,7 +361,9 @@ endif
ifdef CONFIG_IBSS_RSN
NEED_RSN_AUTHENTICATOR=y
CFLAGS += -DCONFIG_IBSS_RSN
@ -82,7 +82,7 @@
OBJS += ibss_rsn.o
endif
@@ -897,6 +900,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
@@ -898,6 +901,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
LIBS += -ldl -rdynamic
endif
@ -93,7 +93,7 @@
endif
ifdef CONFIG_AP
@@ -904,9 +911,11 @@ NEED_EAP_COMMON=y
@@ -905,9 +912,11 @@ NEED_EAP_COMMON=y
NEED_RSN_AUTHENTICATOR=y
CFLAGS += -DCONFIG_AP
OBJS += ap.o
@ -105,7 +105,7 @@
OBJS += ../src/ap/hostapd.o
OBJS += ../src/ap/wpa_auth_glue.o
OBJS += ../src/ap/utils.o
@@ -986,6 +995,12 @@ endif
@@ -987,6 +996,12 @@ endif
ifdef CONFIG_HS20
OBJS += ../src/ap/hs20.o
endif
@ -118,7 +118,7 @@
endif
ifdef CONFIG_MBO
@@ -994,7 +1009,9 @@ CFLAGS += -DCONFIG_MBO
@@ -995,7 +1010,9 @@ CFLAGS += -DCONFIG_MBO
endif
ifdef NEED_RSN_AUTHENTICATOR
@ -128,7 +128,7 @@
NEED_AES_WRAP=y
OBJS += ../src/ap/wpa_auth.o
OBJS += ../src/ap/wpa_auth_ie.o
@@ -1889,6 +1906,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
@@ -1890,6 +1907,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
_OBJS_VAR := OBJS
include ../src/objs.mk
@ -141,7 +141,7 @@
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
@$(E) " LD " $@
@@ -2021,6 +2044,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
@@ -2022,6 +2045,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
@$(E) " sed" $<

View File

@ -30,7 +30,7 @@
reply_len = -1;
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -955,6 +955,9 @@ ifdef CONFIG_FILS
@@ -956,6 +956,9 @@ ifdef CONFIG_FILS
OBJS += ../src/ap/fils_hlp.o
endif
ifdef CONFIG_CTRL_IFACE

View File

@ -1,6 +1,6 @@
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -1293,7 +1293,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
@@ -1294,7 +1294,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
@$(AR) cr $@ hostapd_multi.o $(OBJS)
hostapd: $(OBJS)
@ -9,7 +9,7 @@
@$(E) " LD " $@
ifdef CONFIG_WPA_TRACE
@@ -1304,7 +1304,7 @@ _OBJS_VAR := OBJS_c
@@ -1305,7 +1305,7 @@ _OBJS_VAR := OBJS_c
include ../src/objs.mk
hostapd_cli: $(OBJS_c)
@ -20,7 +20,7 @@
NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS)
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1918,31 +1918,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
@@ -1919,31 +1919,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
@$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)

View File

@ -283,7 +283,7 @@
ifdef CONFIG_CODE_COVERAGE
CFLAGS += -O0 -fprofile-arcs -ftest-coverage
LIBS += -lgcov
@@ -959,6 +965,9 @@ ifdef CONFIG_CTRL_IFACE_MIB
@@ -960,6 +966,9 @@ ifdef CONFIG_CTRL_IFACE_MIB
CFLAGS += -DCONFIG_CTRL_IFACE_MIB
endif
OBJS += ../src/ap/ctrl_iface_ap.o

View File

@ -50,6 +50,10 @@ static inline int has_feature(const char *feat)
#ifdef CONFIG_WPS
if (!strcmp(feat, "wps"))
return 1;
#endif
#ifdef CONFIG_FILS
if (!strcmp(feat, "fils"))
return 1;
#endif
return 0;
}

View File

@ -7,12 +7,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=nftables
PKG_VERSION:=1.0.0
PKG_RELEASE:=2
PKG_VERSION:=1.0.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
PKG_HASH:=58bf547daf967a2b88ecb4f425f126006ebde22711db806b25c1d6cf84fe45f4
PKG_HASH:=3ceeba625818e81a0be293e9dd486c3ef799ebd92165270f1e57e9a201efa423
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-2.0
@ -65,6 +65,9 @@ define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/include/nftables $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnftables.pc \
$(1)/usr/lib/pkgconfig/
endef
define Package/nftables/install/Default

View File

@ -7,13 +7,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ca-certificates
PKG_VERSION:=20210119
PKG_VERSION:=20211016
PKG_RELEASE:=1
PKG_MAINTAINER:=
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@DEBIAN/pool/main/c/ca-certificates
PKG_HASH:=daa3afae563711c30a0586ddae4336e8e3974c2b627faaca404c4e0141b64665
PKG_HASH:=2ae9b6dc5f40c25d6d7fe55e07b54f12a8967d1955d3b7b2f42ee46266eeef88
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk

View File

@ -0,0 +1,53 @@
From 3c51cb5ff1d0db41fb3288fb555c7e7055cf3e86 Mon Sep 17 00:00:00 2001
From: Christian Lamparter <chunkeey@gmail.com>
Date: Wed, 1 Dec 2021 14:41:31 +0100
Subject: [PATCH] ca-certificates: fix python3-cryptography woes in
certdata2pem.py
reverts the code portion of the Debian's ca-certificate
commit 033d52259172 ("mozilla/certdata2pem.py: print a warning for expired certificates.")
It broke builds with the popular Ubuntu 20.04 (focal) releases.
This was due to them shipping with an older python3-cryptography
version which is not compatible.
More concerns were raised by jow- as well:
"We don't want the build to depend on the local system time anyway."
Reported-by: Chen Minqiang <ptpt52@gmail.com>
Reported-by: Shane Synan <digitalcircuit36939@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
---
--- a/work/mozilla/certdata2pem.py
+++ b/work/mozilla/certdata2pem.py
@@ -21,16 +21,12 @@
# USA.
import base64
-import datetime
import os.path
import re
import sys
import textwrap
import io
-from cryptography import x509
-
-
objects = []
# Dirty file parser.
@@ -121,13 +117,6 @@ for obj in objects:
if obj['CKA_CLASS'] == 'CKO_CERTIFICATE':
if not obj['CKA_LABEL'] in trust or not trust[obj['CKA_LABEL']]:
continue
-
- cert = x509.load_der_x509_certificate(obj['CKA_VALUE'])
- if cert.not_valid_after < datetime.datetime.now():
- print('!'*74)
- print('Trusted but expired certificate found: %s' % obj['CKA_LABEL'])
- print('!'*74)
-
bname = obj['CKA_LABEL'][1:-1].replace('/', '_')\
.replace(' ', '_')\
.replace('(', '=')\

View File

@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
PKG_MIRROR_HASH:=39f24aa076a61a3d570f4e5f7a3f38eb6b6e3b96a967c8be7f0dc3e3ffaeed1a
PKG_SOURCE_DATE:=2021-11-23
PKG_SOURCE_VERSION:=01ac2c4500cb0c7934640e6d2e5f99b08483bdf4
PKG_MIRROR_HASH:=e2c60679cc39549e01c2c8e64eeb78278edb92953ce24e74b73da9ac0f21fe3d
PKG_SOURCE_DATE:=2021-12-11
PKG_SOURCE_VERSION:=bb95fe8df7115ab57792369c768927eafc042161
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0

View File

@ -0,0 +1,93 @@
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (C) 2016-2019 Yousong Zhou <yszhou4tech@gmail.com>
include $(TOPDIR)/rules.mk
PKG_NAME:=dtc
PKG_VERSION:=1.6.1
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_HASH:=65cec529893659a49a89740bb362f507a3b94fc8cd791e76a8d6a2b6f3203473
PKG_SOURCE_URL:=@KERNEL/software/utils/dtc
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=GPL
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/meson.mk
define Package/dtc
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Device Tree Compiler
URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
endef
define Package/dtc/description
Device Tree Compiler for Flat Device Trees Device Tree Compiler, dtc, takes
as input a device-tree in a given format and outputs a device-tree in another
format for booting kernels on embedded systems.
endef
define Package/dtc/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/dtc $(1)/usr/bin
endef
# See Documentation/manual.txt for details about each utility
define Package/fdt-utils
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Flat Device Tree Utilities
URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
DEPENDS:=+libfdt
endef
define Package/fdt-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/convert-dtsv0 $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtdump $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtget $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtput $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtoverlay $(1)/usr/bin
endef
define Package/libfdt
SECTION:=libs
CATEGORY:=Libraries
TITLE:=a utility library for reading and manipulating dtb files
URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
endef
define Package/libfdt/description
This is a library containing functions for manipulating Flat Device Trees.
endef
define Package/libfdt/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdt*.so* $(1)/usr/lib
endef
MESON_ARGS += \
-Dtools=true \
-Dyaml=disabled \
-Dvalgrind=disabled \
-Dpython=disabled
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
endef
$(eval $(call BuildPackage,dtc))
$(eval $(call BuildPackage,fdt-utils))
$(eval $(call BuildPackage,libfdt))

View File

@ -0,0 +1,137 @@
From 17739b7ef510917471409d71fb45d8eaf6a1e1fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Thu, 9 Dec 2021 07:14:20 +0100
Subject: [PATCH] Support 'r' format for printing raw bytes with fdtget
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
FT is sometimes used for storing raw data. That is quite common for
U-Boot FIT images.
Extracting such data is not trivial currently. Using type 's' (string)
will replace every 0x00 (NUL) with 0x20 (space). Using type 'x' will
print bytes but in xxd incompatible format.
This commit adds support for 'r' (raw) format. Example usage:
fdtget -t r firmware.itb /images/foo data > image.raw
Support for encoding isn't added as there isn't any clean way of passing
binary data as command line argument.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Message-Id: <20211209061420.29466-1-zajec5@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
Documentation/manual.txt | 2 +-
fdtget.c | 5 +++++
fdtput.c | 2 ++
tests/run_tests.sh | 2 ++
tests/utilfdt_test.c | 5 ++++-
util.c | 4 ++--
util.h | 3 ++-
7 files changed, 18 insertions(+), 5 deletions(-)
--- a/Documentation/manual.txt
+++ b/Documentation/manual.txt
@@ -712,7 +712,7 @@ The syntax of the fdtget command is:
where options are:
- <type> s=string, i=int, u=unsigned, x=hex
+ <type> s=string, i=int, u=unsigned, x=hex, r=raw
Optional modifier prefix:
hh or b=byte, h=2 byte, l=4 byte (default)
--- a/fdtget.c
+++ b/fdtget.c
@@ -91,6 +91,11 @@ static int show_data(struct display_info
if (len == 0)
return 0;
+ if (disp->type == 'r') {
+ fwrite(data, 1, len, stdout);
+ return 0;
+ }
+
is_string = (disp->type) == 's' ||
(!disp->type && util_is_printable_string(data, len));
if (is_string) {
--- a/fdtput.c
+++ b/fdtput.c
@@ -433,6 +433,8 @@ int main(int argc, char *argv[])
if (utilfdt_decode_type(optarg, &disp.type,
&disp.size))
usage("Invalid type string");
+ if (disp.type == 'r')
+ usage("Unsupported raw data type");
break;
case 'v':
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -852,6 +852,8 @@ fdtget_tests () {
run_fdtget_test 8000 -tx $dtb /cpus/PowerPC,970@1 d-cache-size
run_fdtget_test "61 62 63 0" -tbx $dtb /randomnode tricky1
run_fdtget_test "a b c d de ea ad be ef" -tbx $dtb /randomnode blob
+ run_fdtget_test "MyBoardName\0MyBoardFamilyName\0" -tr $dtb / compatible
+ run_fdtget_test "\x0a\x0b\x0c\x0d\xde\xea\xad\xbe\xef" -tr $dtb /randomnode blob
# Here the property size is not a multiple of 4 bytes, so it should fail
run_wrap_error_test $DTGET -tlx $dtb /randomnode mixed
--- a/tests/utilfdt_test.c
+++ b/tests/utilfdt_test.c
@@ -73,6 +73,9 @@ static void check_sizes(char *modifier,
*ptr = 's';
check(fmt, 's', -1);
+
+ *ptr = 'r';
+ check(fmt, 'r', -1);
}
static void test_utilfdt_decode_type(void)
@@ -90,7 +93,7 @@ static void test_utilfdt_decode_type(voi
/* try every other character */
checkfail("");
for (ch = ' '; ch < 127; ch++) {
- if (!strchr("iuxs", ch)) {
+ if (!strchr("iuxsr", ch)) {
*fmt = ch;
fmt[1] = '\0';
checkfail(fmt);
--- a/util.c
+++ b/util.c
@@ -353,11 +353,11 @@ int utilfdt_decode_type(const char *fmt,
}
/* we should now have a type */
- if ((*fmt == '\0') || !strchr("iuxs", *fmt))
+ if ((*fmt == '\0') || !strchr("iuxsr", *fmt))
return -1;
/* convert qualifier (bhL) to byte size */
- if (*fmt != 's')
+ if (*fmt != 's' && *fmt != 'r')
*size = qualifier == 'b' ? 1 :
qualifier == 'h' ? 2 :
qualifier == 'l' ? 4 : -1;
--- a/util.h
+++ b/util.h
@@ -143,6 +143,7 @@ int utilfdt_write_err(const char *filena
* i signed integer
* u unsigned integer
* x hex
+ * r raw
*
* TODO: Implement ll modifier (8 bytes)
* TODO: Implement o type (octal)
@@ -160,7 +161,7 @@ int utilfdt_decode_type(const char *fmt,
*/
#define USAGE_TYPE_MSG \
- "<type>\ts=string, i=int, u=unsigned, x=hex\n" \
+ "<type>\ts=string, i=int, u=unsigned, x=hex, r=raw\n" \
"\tOptional modifier prefix:\n" \
"\t\thh or b=byte, h=2 byte, l=4 byte (default)";

View File

@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git
PKG_SOURCE_DATE:=2021-07-30
PKG_SOURCE_VERSION:=a5c65fa1192e174e9e895637aaf93945959aa029
PKG_MIRROR_HASH:=8ef94e74f50b21fd226dd5311962f8bdbd3aa55da11026b2cf2a4b35556350af
PKG_SOURCE_DATE:=2021-12-02
PKG_SOURCE_VERSION:=56e8e19151743c923f48604c457850cf8eb52076
PKG_MIRROR_HASH:=2a40ac73e8eab0a7a4474cb331b8e2fc972635314b0b5e02a9f2b9a32c5d5f3b
include $(INCLUDE_DIR)/package.mk

View File

@ -17,6 +17,7 @@ sub target_config_features(@) {
/^display$/ and $ret .= "\tselect DISPLAY_SUPPORT\n";
/^dt$/ and $ret .= "\tselect USES_DEVICETREE\n";
/^dt-overlay$/ and $ret .= "\tselect HAS_DT_OVERLAY_SUPPORT\n";
/^emmc$/ and $ret .= "\tselect EMMC_SUPPORT\n";
/^ext4$/ and $ret .= "\tselect USES_EXT4\n";
/^fpu$/ and $ret .= "\tselect HAS_FPU\n";
/^gpio$/ and $ret .= "\tselect GPIO_SUPPORT\n";

View File

@ -98,6 +98,9 @@ config HAS_MIPS16
config RFKILL_SUPPORT
bool
config EMMC_SUPPORT
bool
config NAND_SUPPORT
bool

View File

@ -146,6 +146,9 @@
has-synopsys-hc-bug;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
usb1: usb@1c000000 {
@ -159,6 +162,9 @@
phys = <&usb_phy>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
spi: spi@1f000000 {

View File

@ -29,6 +29,9 @@
phys = <&usb_phy>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
};

View File

@ -36,6 +36,9 @@
phys = <&usb_phy>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
};

View File

@ -36,6 +36,9 @@
phys = <&usb_phy>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
};

View File

@ -114,11 +114,12 @@
ethernet-switch@1e {
compatible = "brcm,bcm53128";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x1e>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port0@0 {
reg = <0>;
label = "lan1";

View File

@ -41,8 +41,8 @@
gpio_spi {
compatible = "spi-gpio";
#address-cells = <0x1>;
ranges;
#address-cells = <1>;
#size-cells = <0>;
sck-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
mosi-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;

View File

@ -116,6 +116,9 @@
phys = <&usb_phy>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
spi: spi@1f000000 {

View File

@ -0,0 +1,130 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "ar9344.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
model = "Embedded Wireless Balin";
compatible = "embeddedwireless,balin", "qca,ar9344";
chosen {
stdout-path = "serial0:115200n8";
};
aliases {
led-boot = &led_system;
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
};
leds {
compatible = "gpio-leds";
led_system: led-0 {
label = "green:system";
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_POWER;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "on";
};
};
keys {
compatible = "gpio-keys";
reset {
linux,code = <KEY_RESTART>;
gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
debounce-interval = <60>;
};
};
};
&ref {
clock-frequency = <40000000>;
};
&spi {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x040000>;
read-only;
};
partition@40000 {
label = "u-boot-env";
reg = <0x040000 0x010000>;
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x050000 0xfa0000>;
};
partition@ff0000 {
label = "art";
reg = <0xff0000 0x010000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
calibration_art_1000: calibration_data@1000 {
reg = <0x1000 0x440>;
};
macaddr_art_1002: macaddr@1002 {
reg = <0x1002 0x6>;
};
};
};
};
};
&builtin_switch {
/delete-property/qca,phy4-mii-enable;
};
&eth1 {
status = "okay";
nvmem-cells = <&macaddr_art_1002>;
nvmem-cell-names = "mac-address";
mac-address-increment-byte = <3>;
mac-address-increment = <0x40>;
gmac-config {
device = <&gmac>;
switch-phy-swap = <0>;
switch-only-mode = <1>;
};
};
&wmac {
status = "okay";
nvmem-cells = <&macaddr_art_1002>, <&calibration_art_1000>;
nvmem-cell-names = "mac-address", "calibration";
};
&pcie {
status = "okay";
};

View File

@ -129,6 +129,9 @@
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
mac-address-increment = <8>;
gpio-controller;
#gpio-cells = <2>;
};
};

View File

@ -0,0 +1,108 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "ar9344_wd_mynet-nxxx.dtsi"
#include <dt-bindings/leds/common.h>
/ {
model = "Western Digital My Net N600";
compatible = "wd,mynet-n600", "qca,ar9344";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led-0 {
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_WLAN;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
};
led_power: led-1 {
label = "blue:power";
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_POWER;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
};
led-2 {
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_WAN;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
};
led-3 {
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_WPS;
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
};
};
keys {
compatible = "gpio-keys";
reset {
linux,code = <KEY_RESTART>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
wps {
linux,code = <KEY_WPS_BUTTON>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
};
};
&gpio {
gpio_ext_lna0 {
gpio-hog;
gpios = <14 0>;
output-high;
line-name = "ext:lna0";
};
gpio_ext_lna1 {
gpio-hog;
gpios = <15 0>;
output-high;
line-name = "ext:lna1";
};
};
&pinmux {
pmx_led_switch: pinmux_led_switch {
pinctrl-single,bits =
<0x0 0x2c2b2a00 0xffffff00>, /* GPIO1-3 default to PHY2-4 */
<0x4 0x00000029 0x000000ff>; /* GPIO4 default to PHY1 */
};
};
&builtin_switch {
pinctrl-names = "default";
pinctrl-0 = <&pmx_led_switch>;
};
&usb {
status = "okay";
};
&eth0 {
status = "okay";
phy-handle = <&swphy0>;
gmac-config {
device = <&gmac>;
switch-phy-swap = <1>;
switch-only-mode = <1>;
};
};
&eth1 {
status = "okay";
};

View File

@ -1,18 +1,11 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "ar9344.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "ar9344_wd_mynet-nxxx.dtsi"
/ {
model = "Western Digital My Net N750";
compatible = "wd,mynet-n750", "qca,ar9344";
chosen {
bootargs = "console=ttyS0,115200n8";
};
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
@ -59,75 +52,19 @@
};
};
&ref {
clock-frequency = <40000000>;
};
&gpio {
gpio_ext_lna0 {
gpio-hog;
gpios = <15 0>;
output-high;
line-name = "mynet-n750:ext:lna0";
line-name = "ext:lna0";
};
gpio_ext_lna1 {
gpio-hog;
gpios = <18 0>;
output-high;
line-name = "mynet-n750:ext:lna1";
};
};
&spi {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "bootloader";
reg = <0x000000 0x40000>;
read-only;
};
partition@40000 {
label = "bdcfg";
reg = <0x040000 0x10000>;
read-only;
};
partition@50000 {
label = "devdata";
reg = <0x050000 0x10000>;
read-only;
};
partition@60000 {
label = "devconf";
reg = <0x060000 0x10000>;
read-only;
};
partition@70000 {
compatible = "seama";
label = "firmware";
reg = <0x070000 0xf80000>;
};
art: partition@ff0000 {
label = "art";
reg = <0xff0000 0x010000>;
read-only;
};
};
line-name = "ext:lna1";
};
};
@ -154,26 +91,6 @@
};
};
&usb_phy {
status = "okay";
};
&pcie {
status = "okay";
wifi@0,0 {
compatible = "pci168c,0033";
reg = <0x0000 0 0 0 0>;
qca,no-eeprom;
};
};
&wmac {
status = "okay";
qca,no-eeprom;
};
&mdio0 {
status = "okay";

View File

@ -0,0 +1,88 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "ar9344.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
chosen {
bootargs = "console=ttyS0,115200n8";
};
};
&ref {
clock-frequency = <40000000>;
};
&spi {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "bootloader";
reg = <0x000000 0x040000>;
read-only;
};
partition@40000 {
label = "bdcfg";
reg = <0x040000 0x010000>;
read-only;
};
partition@50000 {
label = "devdata";
reg = <0x050000 0x010000>;
read-only;
};
partition@60000 {
label = "devconf";
reg = <0x060000 0x010000>;
read-only;
};
partition@70000 {
compatible = "seama";
label = "firmware";
reg = <0x070000 0xf80000>;
};
art: partition@ff0000 {
label = "art";
reg = <0xff0000 0x010000>;
read-only;
};
};
};
};
&usb_phy {
status = "okay";
};
&pcie {
status = "okay";
wifi@0,0 {
compatible = "pci168c,0033";
reg = <0x0000 0 0 0 0>;
qca,no-eeprom;
};
};
&wmac {
status = "okay";
qca,no-eeprom;
};

View File

@ -175,6 +175,9 @@
phys = <&usb_phy>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
nand: nand@1b000200 {

View File

@ -19,7 +19,7 @@
i2c {
compatible = "i2c-gpio";
#address-cells = <1>;
#size-cells = <1>;
#size-cells = <0>;
sda-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
scl-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;

View File

@ -201,6 +201,9 @@
phys = <&usb_phy>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
spi: spi@1f000000 {

View File

@ -0,0 +1,183 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qca955x.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
model = "jjPlus JWAP230";
compatible = "jjplus,jwap230", "qca,qca9558";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led_power: led-0 {
label = "green:power";
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_POWER;
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
};
led-1 {
color = <LED_COLOR_ID_GREEN>;
function-enumerator = <0>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
led-2 {
color = <LED_COLOR_ID_GREEN>;
function-enumerator = <1>;
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
};
};
};
&pcie0 {
status = "okay";
};
&pcie1 {
status = "okay";
};
&spi {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x040000>;
read-only;
};
partition@40000 {
label = "u-boot-env";
reg = <0x040000 0x010000>;
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x050000 0xfa0000>;
};
art: partition@ff0000 {
label = "art";
reg = <0xff0000 0x010000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_lan: macaddr@0 {
reg = <0x0 0x6>;
};
macaddr_art_wan: macaddr@6 {
reg = <0x6 0x6>;
};
calibration_art_wlan: calibration@1000 {
reg = <0x1000 0x440>;
};
};
};
};
};
&mdio0 {
status = "okay";
switch {
compatible = "qca,ar8327";
reg = <0>;
qca,ar8327-initvals = <
0x04 0x07600000 /* PORT0 PAD MODE CTRL */
0x58 0xffb7ffb7 /* LED_CTRL2 */
0x5c 0x03ffff00 /* LED_CTRL3 */
0x7c 0x0000007e /* PORT0_STATUS */
0x0c 0x00080080 /* PORT6 PAD MODE CTRL */
0x94 0x0000007e /* PORT6_STATUS */
>;
};
};
&eth0 {
status = "okay";
nvmem-cells = <&macaddr_art_wan>;
nvmem-cell-names = "mac-address";
pll-data = <0xae000000 0x80000101 0x80001313>;
fixed-link {
speed = <1000>;
full-duplex;
};
gmac_config: gmac-config {
device = <&gmac>;
rxdv-delay = <3>;
rxd-delay = <3>;
txen-delay = <0>;
txd-delay = <0>;
rgmii-enabled = <1>;
};
};
&eth1 {
status = "okay";
nvmem-cells = <&macaddr_art_lan>;
nvmem-cell-names = "mac-address";
pll-data = <0x03000101 0x00000101 0x00001313>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
&wmac {
status = "okay";
nvmem-cells = <&calibration_art_wlan>;
nvmem-cell-names = "calibration";
};
&usb_phy0 {
status = "okay";
};
&usb0 {
status = "okay";
};
&usb_phy1 {
status = "okay";
};
&usb1 {
status = "okay";
};

View File

@ -265,6 +265,9 @@
phys = <&usb_phy0>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
usb1: usb@1b400000 {
@ -283,6 +286,9 @@
phys = <&usb_phy1>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
nand: nand@1b800200 {

View File

@ -0,0 +1,51 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include <dt-bindings/leds/common.h>
#include "qca9563_tplink_eap2x5-1port.dtsi"
/ {
compatible = "tplink,eap225-v1", "qca,qca9563";
model = "TP-Link EAP225 v1";
aliases {
led-boot = &led_status_green;
led-failsafe = &led_status_amber;
led-running = &led_status_green;
led-upgrade = &led_status_amber;
};
leds {
compatible = "gpio-leds";
led_status_green: led-0 {
label = "green:status";
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_STATUS;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led_status_amber: led-1 {
label = "amber:status";
color = <LED_COLOR_ID_AMBER>;
function = LED_FUNCTION_STATUS;
gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
};
led_status_red: led-2 {
label = "red:status";
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_STATUS;
gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
};
};
gpio-export {
compatible = "gpio-export";
led_enable {
gpio-export,name = "leds:enable";
gpio-export,output = <1>;
gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
};
};
};

View File

@ -200,6 +200,9 @@
phys = <&usb_phy0>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
usb1: usb@1b400000 {
@ -219,6 +222,9 @@
phys = <&usb_phy1>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
spi: spi@1f000000 {

View File

@ -65,6 +65,7 @@ ath79_setup_interfaces()
tplink,cpe610-v2|\
tplink,cpe710-v1|\
tplink,eap225-outdoor-v1|\
tplink,eap225-v1|\
tplink,eap225-v3|\
tplink,eap245-v1|\
tplink,re350k-v1|\
@ -129,7 +130,8 @@ ath79_setup_interfaces()
pcs,cr3000|\
tplink,archer-c58-v1|\
tplink,archer-c59-v1|\
tplink,archer-c59-v2)
tplink,archer-c59-v2|\
wd,mynet-n600)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:1" "2:lan:4" "3:lan:3" "4:lan:2"
@ -265,6 +267,10 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:4" "3:lan:3" "4:lan:2" "5:lan:1" "1:wan"
;;
embeddedwireless,balin)
ucidef_add_switch "switch0" \
"0@eth0" "5:lan:1" "4:lan:2" "3:wan"
;;
embeddedwireless,dorin)
ucidef_add_switch "switch0" \
"0@eth0" "1:wan" "2:lan:3" "3:lan:2"
@ -302,6 +308,10 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
;;
jjplus,jwap230)
ucidef_add_switch "switch0" \
"0@eth0" "5:wan:1" "1:lan:2" "6@eth1"
;;
joyit,jt-or750i)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
@ -587,6 +597,7 @@ ath79_setup_macs()
;;
dlink,dir-859-a1|\
qihoo,c301|\
wd,mynet-n600|\
wd,mynet-n750)
lan_mac=$(mtd_get_mac_ascii devdata "lanmac")
wan_mac=$(mtd_get_mac_ascii devdata "wanmac")

View File

@ -30,6 +30,7 @@ case "$FIRMWARE" in
dlink,dir-859-a1|\
nec,wf1200cr|\
nec,wg1200cr|\
wd,mynet-n600|\
wd,mynet-n750)
caldata_extract "art" 0x1000 0x440
ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan24mac")
@ -126,6 +127,7 @@ case "$FIRMWARE" in
openmesh,mr600-v2)
caldata_extract "ART" 0x5000 0x440
;;
wd,mynet-n600|\
wd,mynet-n750)
caldata_extract "art" 0x5000 0x440
ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan5mac")

View File

@ -139,6 +139,7 @@ case "$FIRMWARE" in
caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary romfs 0xf100) 2)
;;
tplink,eap225-v1|\
tplink,eap245-v1|\
tplink,re450-v2|\
tplink,re450-v3|\

View File

@ -394,6 +394,17 @@ define Device/tplink_eap225-outdoor-v1
endef
TARGET_DEVICES += tplink_eap225-outdoor-v1
define Device/tplink_eap225-v1
$(Device/tplink-eap2x5)
SOC := qca9563
IMAGE_SIZE := 13824k
DEVICE_MODEL := EAP225
DEVICE_VARIANT := v1
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
TPLINK_BOARD_ID := EAP225-V1
endef
TARGET_DEVICES += tplink_eap225-v1
define Device/tplink_eap225-v3
$(Device/tplink-eap2x5)
SOC := qca9563

View File

@ -1057,6 +1057,15 @@ define Device/elecom_wrc-300ghbk2-i
endef
TARGET_DEVICES += elecom_wrc-300ghbk2-i
define Device/embeddedwireless_balin
SOC := ar9344
DEVICE_VENDOR := Embedded Wireless
DEVICE_MODEL := Balin
DEVICE_PACKAGES := kmod-usb-chipidea2
IMAGE_SIZE := 16000k
endef
TARGET_DEVICES += embeddedwireless_balin
define Device/embeddedwireless_dorin
SOC := ar9331
DEVICE_VENDOR := Embedded Wireless
@ -1427,6 +1436,14 @@ define Device/jjplus_ja76pf2
endef
TARGET_DEVICES += jjplus_ja76pf2
define Device/jjplus_jwap230
SOC := qca9558
DEVICE_VENDOR := jjPlus
DEVICE_MODEL := JWAP230
IMAGE_SIZE := 16000k
endef
TARGET_DEVICES += jjplus_jwap230
define Device/joyit_jt-or750i
SOC := qca9531
DEVICE_VENDOR := Joy-IT
@ -2358,6 +2375,18 @@ define Device/wallys_dr531
endef
TARGET_DEVICES += wallys_dr531
define Device/wd_mynet-n600
$(Device/seama)
SOC := ar9344
DEVICE_VENDOR := Western Digital
DEVICE_MODEL := My Net N600
IMAGE_SIZE := 15872k
DEVICE_PACKAGES := kmod-usb2
SEAMA_SIGNATURE := wrgnd16_wd_db600
SUPPORTED_DEVICES += mynet-n600
endef
TARGET_DEVICES += wd_mynet-n600
define Device/wd_mynet-n750
$(Device/seama)
SOC := ar9344

View File

@ -1123,7 +1123,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
}
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -5494,7 +5494,7 @@ static void port_event(struct usb_hub *h
@@ -5503,7 +5503,7 @@ static void port_event(struct usb_hub *h
port_dev->over_current_count++;
port_over_current_notify(port_dev);

View File

@ -22,7 +22,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
#define MAX_TUNING_LOOP 40
@@ -3133,7 +3133,7 @@ static void sdhci_timeout_timer(struct t
@@ -3145,7 +3145,7 @@ static void sdhci_timeout_timer(struct t
spin_lock_irqsave(&host->lock, flags);
if (host->cmd && !sdhci_data_line_cmd(host->cmd)) {
@ -31,7 +31,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
mmc_hostname(host->mmc));
sdhci_dumpregs(host);
@@ -3155,7 +3155,7 @@ static void sdhci_timeout_data_timer(str
@@ -3167,7 +3167,7 @@ static void sdhci_timeout_data_timer(str
if (host->data || host->data_cmd ||
(host->cmd && sdhci_data_line_cmd(host->cmd))) {

View File

@ -95,7 +95,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
#include <video/mipi_display.h>
@@ -1194,6 +1196,7 @@ static struct fbtft_platform_data *fbtft
@@ -1187,6 +1189,7 @@ static struct fbtft_platform_data *fbtft
* @display: Display properties
* @sdev: SPI device
* @pdev: Platform device
@ -103,7 +103,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
*
* Allocates, initializes and registers a framebuffer
*
@@ -1203,12 +1206,15 @@ static struct fbtft_platform_data *fbtft
@@ -1196,12 +1199,15 @@ static struct fbtft_platform_data *fbtft
*/
int fbtft_probe_common(struct fbtft_display *display,
struct spi_device *sdev,
@ -120,7 +120,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
int ret;
if (sdev)
@@ -1224,6 +1230,14 @@ int fbtft_probe_common(struct fbtft_disp
@@ -1217,6 +1223,14 @@ int fbtft_probe_common(struct fbtft_disp
pdata = fbtft_properties_read(dev);
if (IS_ERR(pdata))
return PTR_ERR(pdata);

View File

@ -17,7 +17,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/arch/arm/boot/dts/bcm2711.dtsi
+++ b/arch/arm/boot/dts/bcm2711.dtsi
@@ -503,8 +503,8 @@
@@ -509,8 +509,8 @@
msi-controller;
msi-parent = <&pcie0>;

View File

@ -13,7 +13,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
--- a/arch/arm/boot/dts/bcm2711.dtsi
+++ b/arch/arm/boot/dts/bcm2711.dtsi
@@ -554,6 +554,7 @@
@@ -560,6 +560,7 @@
&dsi1 {
interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;

View File

@ -23,7 +23,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
status = "disabled";
};
@@ -1106,7 +1106,3 @@
@@ -1112,7 +1112,3 @@
&usb {
interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
};

View File

@ -1,9 +1,13 @@
# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
RAMFS_COPY_BIN="bcm4908img expr"
RAMFS_COPY_BIN="bcm4908img expr egrep fdtget fw_printenv fw_setenv tr"
PART_NAME=firmware
BCM4908_FW_FORMAT=
BCM4908_FW_BOARD_ID=
BCM4908_FW_INT_IMG_FORMAT=
# $(1): file to read from
# $(2): offset in bytes
# $(3): length in bytes
@ -11,6 +15,12 @@ get_content() {
dd if="$1" skip=$2 bs=1 count=$3 2>/dev/null
}
# $(1): file to read from
# $(2): offset in bytes
get_hex_u32_le() {
dd if="$1" skip=$2 bs=1 count=4 2>/dev/null | hexdump -v -e '1/4 "%02x"'
}
# $(1): file to read from
# $(2): offset in bytes
get_hex_u32_be() {
@ -33,8 +43,23 @@ platform_identify() {
magic=$(get_hex_u32_be "$1" 0)
case "$magic" in
d00dfeed)
BCM4908_FW_FORMAT="pkgtb"
return
;;
2a23245e)
echo "chk"
local header_len=$((0x$(get_hex_u32_be "$1" 4)))
local board_id_len=$(($header_len - 40))
BCM4908_FW_FORMAT="chk"
BCM4908_FW_BOARD_ID=$(dd if="$1" skip=40 bs=1 count=$board_id_len 2>/dev/null | hexdump -v -e '1/1 "%c"')
magic=$(get_hex_u32_be "$1" "$header_len")
[ "$magic" = "d00dfeed" ] && {
BCM4908_FW_INT_IMG_FORMAT="pkgtb"
} || {
BCM4908_FW_INT_IMG_FORMAT="bcm4908img"
}
BCM4908_FW_INT_IMG_EXTRACT_CMD="dd skip=$header_len iflag=skip_bytes"
return
;;
esac
@ -44,12 +69,133 @@ platform_identify() {
magic=$(get_content "$1" $((size - 20 - 64 + 8)) 12)
case "$magic" in
GT-AC5300)
echo "asus"
local size=$(wc -c "$1" | cut -d ' ' -f 1)
BCM4908_FW_FORMAT="asus"
BCM4908_FW_BOARD_ID=$(get_content "$1" $((size - 20 - 64 + 8)) 12)
BCM4908_FW_INT_IMG_FORMAT="bcm4908img"
return
;;
esac
echo "unknown"
# Detecting native format is a bit complex (it may start with CFE or
# JFFS2) so just use bcm4908img instead of bash hacks.
# Make it the last attempt as bcm4908img detects also vendor formats.
bcm4908img info -i "$1" > /dev/null && {
BCM4908_FW_FORMAT="bcm4908img"
return
}
}
#
# pkgtb helpers
#
platform_pkgtb_get_image_name() {
local configuration=$($2 < $1 | fdtget - /configurations default)
[ -z "$configuration" ] && {
echo "Failed to read default configuration from pkgtb" >&2
return
}
local image_name=$($2 < $1 | fdtget - /configurations/$configuration $3)
[ -z "$image_name" ] && {
echo "Failed to read $3 from pkgtb configuration \"$configuration\"" >&2
return
}
echo "$image_name"
}
platform_pkgtb_get_image() {
local cmd="${2:-cat}"
local image_name=$(platform_pkgtb_get_image_name "$1" "$cmd" "$3")
$cmd < $1 | fdtget -p - /images/$image_name | egrep -q "^data$" && {
$cmd < $1 | fdtget -t r - /images/$image_name data
return
}
$cmd < $1 | fdtget -p - /images/$image_name | egrep -q "^data-position$" && {
local data_position=$($cmd < $1 | fdtget - /images/$image_name data-position)
local data_size=$($cmd < $1 | fdtget - /images/$image_name data-size)
$cmd < $1 2>/dev/null | dd skip=$data_position count=$data_size iflag=skip_bytes,count_bytes
return
}
$cmd < $1 | fdtget -p - /images/$image_name | egrep -q "^data-offset" && {
local data_offset=$($cmd < $1 | fdtget - /images/$image_name data-offset)
local totalsize=$(get_hex_u32_be "$1" 4)
local data_position=$(((0x$totalsize + data_offset + 3) & ~3))
local data_size=$($cmd < $1 | fdtget - /images/$image_name data-size)
$cmd < $1 2>/dev/null | dd skip=$data_position count=$data_size iflag=skip_bytes,count_bytes
return
}
}
platform_pkgtb_setup_env_config() {
local size=$((0x$(get_hex_u32_le /dev/ubi0_1 4)))
dd if=/dev/ubi0_1 of=/tmp/env.head count=8 iflag=count_bytes
dd if=/dev/ubi0_1 of=/tmp/env.body skip=8 iflag=skip_bytes
printf "%s\t0x%x\t0x%x\t0x%x" "/tmp/env.body" 0x0 $size $size > /tmp/env.config
}
platform_pkgtb_get_upgrade_index() {
platform_pkgtb_setup_env_config
case "$(fw_printenv -l /tmp -n -c /tmp/env.config COMMITTED)" in
1) echo 2;;
2) echo 1;;
*) echo 1;;
esac
}
platform_pkgtb_commit() {
local size=$((0x$(get_hex_u32_le /dev/ubi0_1 4)))
local valid1=0
local valid2=0
local seq1
local seq2
local tmp
platform_pkgtb_setup_env_config
# Read current values
for valid in $(fw_printenv -l /tmp -n -c /tmp/env.config VALID | tr ',' ' '); do
case "$valid" in
1) valid0=1;;
2) valid1=2;;
esac
done
seq0=$(fw_printenv -l /tmp -n -c /tmp/env.config SEQ | cut -d ',' -f 1)
seq1=$(fw_printenv -l /tmp -n -c /tmp/env.config SEQ | cut -d ',' -f 2)
# Calculate values
case "$1" in
1) valid0=1; seq0=$(((seq1 + 1) % 1000));;
2) valid1=2; seq1=$(((seq0 + 1) % 1000));;
esac
# Update variables
fw_setenv -l /tmp -c /tmp/env.config COMMITTED "$1"
fw_setenv -l /tmp -c /tmp/env.config VALID "$valid0,$valid1"
fw_setenv -l /tmp -c /tmp/env.config SEQ "$seq0,$seq1"
# Write
tmp=$(cat /tmp/env.head /tmp/env.body | wc -c)
cat /tmp/env.head /tmp/env.body | ubiupdatevol /dev/ubi0_1 -s $tmp -
}
#
# check
#
platform_check_pkgtb() {
local cmd="${2:-cat}"
[ -n "$(platform_pkgtb_get_image_name "$1" "$cmd" "bootfs")" -a -n "$(platform_pkgtb_get_image_name "$1" "$cmd" "rootfs")" ]
}
platform_check_image() {
@ -58,48 +204,100 @@ platform_check_image() {
local expected_image=$(platform_expected_image)
local error=0
bcm4908img info -i "$1" > /dev/null || {
echo "Failed to validate BCM4908 image" >&2
platform_identify "$1"
[ -z "$BCM4908_FW_FORMAT" ] && {
echo "Invalid image type. Please use firmware specific for this device."
notify_firmware_broken
return 1
}
echo "Found $BCM4908_FW_FORMAT firmware for device ${BCM4908_FW_BOARD_ID:----}"
bcm4908img bootfs -i "$1" ls | grep -q "1-openwrt" || {
# OpenWrt images have 1-openwrt dummy file in the bootfs.
# Don't allow backup if it's missing
notify_firmware_no_backup
local expected_image="$(platform_expected_image)"
[ -n "$expected_image" -a -n "$BCM4908_FW_BOARD_ID" -a "$BCM4908_FW_FORMAT $BCM4908_FW_BOARD_ID" != "$expected_image" ] && {
echo "Firmware doesn't match device ($expected_image)"
error=1
}
case "$(platform_identify "$1")" in
asus)
local size=$(wc -c "$1" | cut -d ' ' -f 1)
local productid=$(get_content "$1" $((size - 20 - 64 + 8)) 12)
[ -n "$expected_image" -a "asus $productid" != "$expected_image" ] && {
echo "Firmware productid mismatch ($productid)" >&2
error=1
case "$BCM4908_FW_FORMAT" in
"bcm4908img")
bcm4908img info -i "$1" > /dev/null || {
echo "Failed to validate BCM4908 image" >&2
notify_firmware_broken
return 1
}
;;
chk)
local header_len=$((0x$(get_hex_u32_be "$1" 4)))
local board_id_len=$(($header_len - 40))
local board_id=$(dd if="$1" skip=40 bs=1 count=$board_id_len 2>/dev/null | hexdump -v -e '1/1 "%c"')
[ -n "$expected_image" -a "chk $board_id" != "$expected_image" ] && {
echo "Firmware board_id mismatch ($board_id)" >&2
error=1
bcm4908img bootfs -i "$1" ls | grep -q "1-openwrt" || {
# OpenWrt images have 1-openwrt dummy file in the bootfs.
# Don't allow backup if it's missing
notify_firmware_no_backup
}
;;
;;
"pkgtb")
platform_check_pkgtb "$1" || {
echo "Failed to validate pkgtb firmware" >&2
notify_firmware_broken
return 1
}
;;
*)
echo "Invalid image type. Please use firmware specific for this device." >&2
notify_firmware_broken
error=1
;;
case "$BCM4908_FW_INT_IMG_FORMAT" in
"bcm4908img")
bcm4908img info -i "$1" > /dev/null || {
echo "Failed to validate BCM4908 image" >&2
notify_firmware_broken
return 1
}
bcm4908img bootfs -i "$1" ls | grep -q "1-openwrt" || {
# OpenWrt images have 1-openwrt dummy file in the bootfs.
# Don't allow backup if it's missing
notify_firmware_no_backup
}
;;
"pkgtb")
platform_check_pkgtb "$1" "$BCM4908_FW_INT_IMG_EXTRACT_CMD" || {
echo "Failed to validate pkgtb firmware" >&2
notify_firmware_broken
return 1
}
;;
esac
;;
esac
return $error
}
#
# upgrade
#
platform_do_upgrade_pkgtb() {
local cmd="${2:-cat}"
local size
local idx bootfs_id rootfs_id
idx=$(platform_pkgtb_get_upgrade_index)
case "$idx" in
1) bootfs_id=3; rootfs_id=4;;
2) bootfs_id=5; rootfs_id=6;;
esac
size=$(platform_pkgtb_get_image "$1" "$cmd" "bootfs" | wc -c)
ubirmvol /dev/ubi0 -N bootfs$idx
ubimkvol /dev/ubi0 -n $bootfs_id -N bootfs$idx -t static -s $size
platform_pkgtb_get_image "$1" "$cmd" "bootfs" | ubiupdatevol /dev/ubi0_$bootfs_id -s $size -
size=$(platform_pkgtb_get_image "$1" "$cmd" "rootfs" | wc -c)
ubirmvol /dev/ubi0 -N rootfs$idx
ubimkvol /dev/ubi0 -n $rootfs_id -N rootfs$idx -t dynamic -s $size
platform_pkgtb_get_image "$1" "$cmd" "rootfs" | ubiupdatevol /dev/ubi0_$rootfs_id -s $size -
platform_pkgtb_commit $idx
nand_do_upgrade_success
}
# $1: cferam index increment value
platform_calc_new_cferam() {
local inc="$1"
@ -189,10 +387,37 @@ platform_do_upgrade_ubi() {
}
platform_do_upgrade() {
# Try NAND aware UBI upgrade for OpenWrt images
# Below call will exit on success
bcm4908img bootfs -i "$1" ls | grep -q "1-openwrt" && platform_do_upgrade_ubi "$1"
platform_identify "$1"
# Try NAND aware UBI upgrade for OpenWrt images
case "$BCM4908_FW_FORMAT" in
"bcm4908img")
bcm4908img bootfs -i "$1" ls | grep -q "1-openwrt" && platform_do_upgrade_ubi "$1"
;;
"pkgtb")
platform_do_upgrade_pkgtb "$1"
;;
*)
case "$BCM4908_FW_INT_IMG_FORMAT" in
"bcm4908img")
bcm4908img bootfs -i "$1" ls | grep -q "1-openwrt" && platform_do_upgrade_ubi "$1"
;;
"pkgtb")
platform_do_upgrade_pkgtb "$1" "$BCM4908_FW_INT_IMG_EXTRACT_CMD"
;;
*)
echo "NAND aware sysupgrade is unsupported for $BCM4908_FW_FORMAT format"
;;
esac
;;
esac
# Above calls exit on success.
# If we got here it isn't OpenWrt image or something went wrong.
[ "$BCM4908_FW_FORMAT" = "pkgtb" -o "$BCM4908_FW_INT_IMG_FORMAT" = "pkgtb" ] && {
echo "Failed to upgrade pkgtb. Fallback to raw flashing is impossible for this format." >&2
exit 1
}
echo "Writing whole image to NAND flash. All erase counters will be lost."
# Find cferam name for new firmware

View File

@ -2,6 +2,12 @@ RAMFS_COPY_BIN='osafeloader oseama otrx truncate'
PART_NAME=firmware
BCM53XX_FW_FORMAT=
BCM53XX_FW_BOARD_ID=
BCM53XX_FW_INT_IMG_FORMAT=
BCM53XX_FW_INT_IMG_TRX_OFFSET=
BCM53XX_FW_INT_IMG_EXTRACT_CMD=
LXL_FLAGS_VENDOR_LUXUL=0x00000001
# $(1): file to read magic from
@ -30,7 +36,7 @@ platform_expected_image() {
local machine=$(board_name)
case "$machine" in
"dlink,dir-885l") echo "seama wrgac42_dlink.2015_dir885l"; return;;
"dlink,dir-885l") echo "seamaseal wrgac42_dlink.2015_dir885l"; return;;
"luxul,abr-4500-v1") echo "lxl ABR-4500"; return;;
"luxul,xap-810-v1") echo "lxl XAP-810"; return;;
"luxul,xap-1410v1") echo "lxl XAP-1410"; return;;
@ -59,169 +65,126 @@ platform_identify() {
magic=$(get_magic_long "$1")
case "$magic" in
"48445230")
echo "trx"
BCM53XX_FW_FORMAT="trx"
return
;;
"2a23245e")
echo "chk"
local header_len=$((0x$(get_magic_long_at "$1" 4)))
local board_id_len=$(($header_len - 40))
BCM53XX_FW_FORMAT="chk"
BCM53XX_FW_BOARD_ID=$(dd if="$1" skip=40 bs=1 count=$board_id_len 2>/dev/null | hexdump -v -e '1/1 "%c"')
BCM53XX_FW_INT_IMG_FORMAT="trx"
BCM53XX_FW_INT_IMG_TRX_OFFSET="$header_len"
BCM53XX_FW_INT_IMG_EXTRACT_CMD="dd skip=$header_len iflag=skip_bytes"
return
;;
"4c584c23")
echo "lxl"
local hdr_len=$(get_le_long_at "$1" 8)
local flags=$(get_le_long_at "$1" 12)
[ $((flags & LXL_FLAGS_VENDOR_LUXUL)) -gt 0 ] && notify_firmware_no_backup
BCM53XX_FW_FORMAT="lxl"
BCM53XX_FW_BOARD_ID=$(dd if="$1" skip=16 bs=1 count=16 2>/dev/null | hexdump -v -e '1/1 "%c"')
BCM53XX_FW_INT_IMG_FORMAT="trx"
BCM53XX_FW_INT_IMG_TRX_OFFSET="$hdr_len"
BCM53XX_FW_INT_IMG_EXTRACT_CMD="dd skip=$hdr_len iflag=skip_bytes"
return
;;
"5ea3a417")
echo "seama"
BCM53XX_FW_FORMAT="seamaseal"
BCM53XX_FW_BOARD_ID=$(oseama info "$1" | grep "Meta entry:.*signature=" | sed "s/.*=//")
BCM53XX_FW_INT_IMG_EXTRACT_CMD="oseama extract - -e 0"
return
;;
esac
magic=$(get_magic_long_at "$1" 14)
[ "$magic" = "55324e44" ] && {
echo "cybertan"
BCM53XX_FW_FORMAT="cybertan"
BCM53XX_FW_BOARD_ID=$(dd if="$1" bs=1 count=4 2>/dev/null | hexdump -v -e '1/1 "%c"')
BCM53XX_FW_INT_IMG_FORMAT="trx"
BCM53XX_FW_INT_IMG_TRX_OFFSET="32"
BCM53XX_FW_INT_IMG_EXTRACT_CMD="dd skip=32 iflag=skip_bytes"
return
}
magic=$(get_magic_long_at "$1" 60)
[ "$magic" = "4c584c23" ] && {
echo "lxlold"
notify_firmware_no_backup
BCM53XX_FW_FORMAT="lxlold"
BCM53XX_FW_BOARD_ID=$(dd if="$1" skip=48 bs=1 count=12 2>/dev/null | hexdump -v -e '1/1 "%c"')
BCM53XX_FW_INT_IMG_FORMAT="trx"
BCM53XX_FW_INT_IMG_TRX_OFFSET="64"
BCM53XX_FW_INT_IMG_EXTRACT_CMD="dd skip=64 iflag=skip_bytes"
return
}
if osafeloader info "$1" > /dev/null 2>&1; then
echo "safeloader"
BCM53XX_FW_FORMAT="safeloader"
return
fi
echo "unknown"
}
platform_other_check_image() {
[ "$#" -gt 1 ] && return 1
local file_type=$(platform_identify "$1")
local magic
local error=0
case "$file_type" in
"chk")
local header_len=$((0x$(get_magic_long_at "$1" 4)))
local board_id_len=$(($header_len - 40))
local board_id=$(dd if="$1" skip=40 bs=1 count=$board_id_len 2>/dev/null | hexdump -v -e '1/1 "%c"')
local dev_board_id=$(platform_expected_image)
echo "Found CHK image with device board_id $board_id"
platform_identify "$1"
[ -z "$BCM53XX_FW_FORMAT" ] && {
echo "Invalid image type. Please use firmware specific for this device."
notify_firmware_broken
return 1
}
echo "Found $BCM53XX_FW_FORMAT firmware for device $BCM53XX_FW_BOARD_ID"
[ -n "$dev_board_id" -a "chk $board_id" != "$dev_board_id" ] && {
echo "Firmware board_id doesn't match device board_id ($dev_board_id)"
error=1
}
if ! otrx check "$1" -o "$header_len"; then
echo "No valid TRX firmware in the CHK image"
notify_firmware_test_result "trx_valid" 0
error=1
else
notify_firmware_test_result "trx_valid" 1
fi
;;
"cybertan")
local pattern=$(dd if="$1" bs=1 count=4 2>/dev/null | hexdump -v -e '1/1 "%c"')
local dev_pattern=$(platform_expected_image)
echo "Found CyberTAN image with device pattern: $pattern"
[ -n "$dev_pattern" -a "cybertan $pattern" != "$dev_pattern" ] && {
echo "Firmware pattern doesn't match device pattern ($dev_pattern)"
error=1
}
if ! otrx check "$1" -o 32; then
echo "No valid TRX firmware in the CyberTAN image"
notify_firmware_test_result "trx_valid" 0
error=1
else
notify_firmware_test_result "trx_valid" 1
fi
;;
"lxl")
local hdr_len=$(get_le_long_at "$1" 8)
local flags=$(get_le_long_at "$1" 12)
local board=$(dd if="$1" skip=16 bs=1 count=16 2>/dev/null | hexdump -v -e '1/1 "%c"')
local dev_board=$(platform_expected_image)
echo "Found LXL image for board $board"
[ -n "$dev_board" -a "lxl $board" != "$dev_board" ] && {
echo "Firmware ($board) doesn't match device ($dev_board)"
error=1
}
[ $((flags & LXL_FLAGS_VENDOR_LUXUL)) -gt 0 ] && notify_firmware_no_backup
if ! otrx check "$1" -o "$hdr_len"; then
echo "No valid TRX firmware in the LXL image"
notify_firmware_test_result "trx_valid" 0
error=1
else
notify_firmware_test_result "trx_valid" 1
fi
;;
"lxlold")
local board_id=$(dd if="$1" skip=48 bs=1 count=12 2>/dev/null | hexdump -v -e '1/1 "%c"')
local dev_board_id=$(platform_expected_image)
echo "Found LXL image with device board_id $board_id"
[ -n "$dev_board_id" -a "lxl $board_id" != "$dev_board_id" ] && {
echo "Firmware board_id doesn't match device board_id ($dev_board_id)"
error=1
}
notify_firmware_no_backup
if ! otrx check "$1" -o 64; then
echo "No valid TRX firmware in the Luxul image"
notify_firmware_test_result "trx_valid" 0
error=1
else
notify_firmware_test_result "trx_valid" 1
fi
;;
"safeloader")
;;
"seama")
local img_signature=$(oseama info "$1" | grep "Meta entry:.*signature=" | sed "s/.*=//")
local dev_signature=$(platform_expected_image)
echo "Found Seama image with device signature: $img_signature"
[ -n "$dev_signature" -a "seama $img_signature" != "$dev_signature" ] && {
echo "Firmware signature doesn't match device signature ($dev_signature)"
error=1
}
local expected_image="$(platform_expected_image)"
[ -n "$expected_image" -a -n "$BCM53XX_FW_BOARD_ID" -a "$expected_image" != "$BCM53XX_FW_FORMAT $BCM53XX_FW_BOARD_ID" ] && {
echo "Firmware doesn't match device ($expected_image)"
error=1
}
case "$BCM53XX_FW_FORMAT" in
"seamaseal")
$(oseama info "$1" -e 0 | grep -q "Meta entry:.*type=firmware") || {
echo "Seama container doesn't have firmware entity"
echo "Seama seal doesn't contain firmware entity"
error=1
}
;;
;;
"trx")
local expected=$(platform_expected_image)
if ! otrx check "$1"; then
echo "Failed to find a valid TRX in firmware"
notify_firmware_test_result "trx_valid" 0
error=1
else
notify_firmware_test_result "trx_valid" 1
fi
[ "$expected" == "safeloader" ] && {
[ "$expected_image" == "safeloader" ] && {
echo "This device expects SafeLoader format and may not work with TRX"
error=1
}
if ! otrx check "$1"; then
echo "Invalid (corrupted?) TRX firmware"
notify_firmware_test_result "trx_valid" 0
error=1
else
notify_firmware_test_result "trx_valid" 1
fi
;;
;;
*)
echo "Invalid image type. Please use firmware specific for this device."
notify_firmware_broken
error=1
;;
case "$BCM53XX_FW_INT_IMG_FORMAT" in
"trx")
# Make sure that both ways of extracting TRX work.
# platform_do_upgrade() may use any of them.
if ! otrx check "$1" -o "$BCM53XX_FW_INT_IMG_TRX_OFFSET" || \
! $BCM53XX_FW_INT_IMG_EXTRACT_CMD < $1 | otrx check -; then
echo "Invalid (corrupted?) TRX firmware"
notify_firmware_test_result "trx_valid" 0
error=1
else
notify_firmware_test_result "trx_valid" 1
fi
;;
esac
;;
esac
return $error
@ -246,8 +209,8 @@ platform_check_image() {
}
# $(1): image for upgrade (with possible extra header)
# $(2): offset of trx in image
# $(1): TRX image or firmware containing TRX
# $(2): offset of TRX in firmware (optional)
platform_do_upgrade_nand_trx() {
local dir="/tmp/sysupgrade-bcm53xx"
local trx="$1"
@ -311,15 +274,15 @@ platform_do_upgrade_nand_trx() {
nand_do_upgrade $dir/root
}
platform_do_upgrade_nand_seama() {
platform_do_upgrade_nand_seamaseal() {
local dir="/tmp/sysupgrade-bcm53xx"
local seama="$1"
local seamaseal="$1"
local tmp
# Extract Seama entity from Seama seal
rm -fR $dir
mkdir -p $dir
oseama extract "$seama" \
oseama extract "$seamaseal" \
-e 0 \
-o $dir/seama.entity
[ $? -ne 0 ] && {
@ -358,26 +321,6 @@ platform_do_upgrade_nand_seama() {
nand_do_upgrade $dir/root.ubi
}
platform_trx_from_chk_cmd() {
local header_len=$((0x$(get_magic_long_at "$1" 4)))
echo -n dd skip=$header_len iflag=skip_bytes
}
platform_trx_from_cybertan_cmd() {
echo -n dd skip=32 iflag=skip_bytes
}
platform_trx_from_lxl_cmd() {
local hdr_len=$(get_le_long_at "$1" 8)
echo -n dd skip=$hdr_len iflag=skip_bytes
}
platform_trx_from_lxlold_cmd() {
echo -n dd bs=64 skip=1
}
platform_img_from_safeloader() {
local dir="/tmp/sysupgrade-bcm53xx"
@ -396,35 +339,28 @@ platform_img_from_safeloader() {
echo -n $dir/os-image
}
platform_img_from_seama() {
local dir="/tmp/sysupgrade-bcm53xx"
local offset=$(oseama info "$1" -e 0 | grep "Entity offset:" | sed "s/.*:\s*//")
local size=$(oseama info "$1" -e 0 | grep "Entity size:" | sed "s/.*:\s*//")
# Busybox doesn't support required iflag-s
# echo -n dd iflag=skip_bytes,count_bytes skip=$offset count=$size
rm -fR $dir
mkdir -p $dir
dd if="$1" of=$dir/image-noheader.bin bs=$offset skip=1
dd if=$dir/image-noheader.bin of=$dir/image-entity.bin bs=$size count=1
echo -n $dir/image-entity.bin
}
platform_other_do_upgrade() {
local file_type=$(platform_identify "$1")
local trx="$1"
local cmd=
platform_identify "$1"
[ "$(platform_flash_type)" == "nand" ] && {
case "$file_type" in
"chk") platform_do_upgrade_nand_trx "$1" $((0x$(get_magic_long_at "$1" 4)));;
"cybertan") platform_do_upgrade_nand_trx "$1" 32;;
"lxl") platform_do_upgrade_nand_trx "$1" $(get_le_long_at "$1" 8);;
"lxlold") platform_do_upgrade_nand_trx "$1" 64;;
"seama") platform_do_upgrade_nand_seama "$1";;
"trx") platform_do_upgrade_nand_trx "$1";;
# Try NAND-aware upgrade
case "$BCM53XX_FW_FORMAT" in
"seamaseal")
platform_do_upgrade_nand_seamaseal "$1"
;;
"trx")
platform_do_upgrade_nand_trx "$1"
;;
*)
case "$BCM53XX_FW_INT_IMG_FORMAT" in
"trx")
platform_do_upgrade_nand_trx "$1" "$BCM53XX_FW_INT_IMG_TRX_OFFSET"
;;
*)
echo "NAND aware sysupgrade is unsupported for $BCM53XX_FW_FORMAT format"
;;
esac
;;
esac
# Above calls exit on success.
@ -432,16 +368,26 @@ platform_other_do_upgrade() {
echo "Writing whole image to NAND flash. All erase counters will be lost."
}
case "$file_type" in
"chk") cmd=$(platform_trx_from_chk_cmd "$trx");;
"cybertan") cmd=$(platform_trx_from_cybertan_cmd "$trx");;
"lxl") cmd=$(platform_trx_from_lxl_cmd "$trx");;
"lxlold") cmd=$(platform_trx_from_lxlold_cmd "$trx");;
"safeloader") trx=$(platform_img_from_safeloader "$trx"); PART_NAME=os-image;;
"seama") trx=$(platform_img_from_seama "$trx");;
case "$BCM53XX_FW_FORMAT" in
"safeloader")
PART_NAME=os-image
img=$(platform_img_from_safeloader "$1")
default_do_upgrade "$img"
;;
"seamaseal")
default_do_upgrade "$1" "$BCM53XX_FW_INT_IMG_EXTRACT_CMD"
;;
"trx")
default_do_upgrade "$1"
;;
*)
case "$BCM53XX_FW_INT_IMG_FORMAT" in
"trx")
default_do_upgrade "$1" "$BCM53XX_FW_INT_IMG_EXTRACT_CMD"
;;
esac
;;
esac
default_do_upgrade "$trx" "$cmd"
}
platform_do_upgrade() {

View File

@ -20,7 +20,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -265,7 +265,7 @@
@@ -267,7 +267,7 @@
interrupt-parent = <&gic>;
@ -29,7 +29,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
#usb-cells = <0>;
compatible = "generic-ehci";
@@ -287,7 +287,7 @@
@@ -289,7 +289,7 @@
};
};

View File

@ -18,7 +18,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -318,7 +318,7 @@
@@ -320,7 +320,7 @@
interrupt-parent = <&gic>;

View File

@ -38,7 +38,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
};
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -428,7 +428,7 @@
@@ -430,7 +430,7 @@
#address-cells = <1>;
#size-cells = <1>;

View File

@ -17,7 +17,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -428,6 +428,26 @@
@@ -430,6 +430,26 @@
#address-cells = <1>;
#size-cells = <1>;
@ -44,7 +44,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
pinctrl: pin-controller@1c0 {
compatible = "brcm,bcm4708-pinmux";
reg = <0x1c0 0x24>;
@@ -454,32 +474,13 @@
@@ -456,32 +476,13 @@
function = "uart1";
};
};

View File

@ -21,7 +21,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -483,7 +483,7 @@
@@ -485,7 +485,7 @@
};
};

View File

@ -71,7 +71,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+};
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -484,7 +484,7 @@
@@ -486,7 +486,7 @@
};
srab: ethernet-switch@18007000 {

View File

@ -155,7 +155,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
label = "lan4";
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -490,6 +490,10 @@
@@ -492,6 +492,10 @@
status = "disabled";
/* ports are defined in board DTS */

View File

@ -53,7 +53,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
#address-cells = <1>;
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -501,7 +501,7 @@
@@ -503,7 +503,7 @@
reg = <0x18004000 0x14>;
};

View File

@ -28,7 +28,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
};
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -458,18 +458,18 @@
@@ -460,18 +460,18 @@
function = "spi";
};

View File

@ -50,7 +50,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
compatible = "simple-bus";
ranges = <0x00000000 0x19000000 0x00023000>;
#address-cells = <1>;
@@ -369,7 +369,7 @@
@@ -371,7 +371,7 @@
#address-cells = <1>;
};
@ -59,7 +59,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
compatible = "mdio-mux-mmioreg";
mdio-parent-bus = <&mdio>;
#address-cells = <1>;
@@ -415,7 +415,7 @@
@@ -417,7 +417,7 @@
status = "disabled";
};

View File

@ -17,7 +17,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -370,7 +370,7 @@
@@ -372,7 +372,7 @@
};
mdio-mux@18003000 {

View File

@ -1,29 +0,0 @@
From 6e238362b9793bf334c9bed2291b571cbbc75b0b Mon Sep 17 00:00:00 2001
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Wed, 27 Oct 2021 12:37:29 -0700
Subject: [PATCH] ARM: dts: BCM5301X: Fix I2C controller interrupt
The I2C interrupt controller line is off by 32 because the datasheet
describes interrupt inputs into the GIC which are for Shared Peripheral
Interrupts and are starting at offset 32. The ARM GIC binding expects
the SPI interrupts to be numbered from 0 relative to the SPI base.
Fixes: bb097e3e0045 ("ARM: dts: BCM5301X: Add I2C support to the DT")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
arch/arm/boot/dts/bcm5301x.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -408,7 +408,7 @@
i2c0: i2c@18009000 {
compatible = "brcm,iproc-i2c";
reg = <0x18009000 0x50>;
- interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <100000>;

View File

@ -1,26 +0,0 @@
From acead95bf77a34cae7ff04dd99387046310cca0d Mon Sep 17 00:00:00 2001
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Thu, 28 Oct 2021 09:46:53 -0700
Subject: [PATCH] ARM: dts: BCM5301X: Add interrupt properties to GPIO node
The GPIO controller is also an interrupt controller provider and is
currently missing the appropriate 'interrupt-controller' and
'#interrupt-cells' properties to denote that.
Fixes: fb026d3de33b ("ARM: BCM5301X: Add Broadcom's bus-axi to the DTS file")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
arch/arm/boot/dts/bcm5301x.dtsi | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -242,6 +242,8 @@
gpio-controller;
#gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
};
pcie0: pcie@12000 {

View File

@ -346,7 +346,7 @@ TARGET_DEVICES += brcm_bcm963269bhr
### BT ###
define Device/bt_home-hub-2-a
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := BT
DEVICE_VENDOR := British Telecom (BT)
DEVICE_MODEL := Home Hub 2.0
DEVICE_VARIANT := A
CFE_BOARD_ID := HOMEHUB2A
@ -358,7 +358,7 @@ TARGET_DEVICES += bt_home-hub-2-a
define Device/bt_voyager-2110
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := BT
DEVICE_VENDOR := British Telecom (BT)
DEVICE_MODEL := Voyager 2110
CFE_BOARD_ID := V2110
CHIP_ID := 6348
@ -370,7 +370,7 @@ TARGET_DEVICES += bt_voyager-2110
define Device/bt_voyager-2500v-bb
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := BT
DEVICE_VENDOR := British Telecom (BT)
DEVICE_MODEL := Voyager 2500V
CFE_BOARD_ID := V2500V_BB
CHIP_ID := 6348

View File

@ -181,6 +181,7 @@ define Device/storlink-reference
COMPILE := copy-kernel-$(1).bin
COMPILE/copy-kernel-$(1).bin := copy-kernel.bin
IMAGES := factory.bin
FILESYSTEMS := squashfs
IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 6144k | \
storlink-default-images $(1)
DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES)

View File

@ -49,7 +49,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
#define NET_DEVICE_PATH_STACK_MAX 5
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -767,6 +767,20 @@ static int vlan_dev_get_iflink(const str
@@ -770,6 +770,20 @@ static int vlan_dev_get_iflink(const str
return real_dev->ifindex;
}
@ -70,7 +70,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static const struct ethtool_ops vlan_ethtool_ops = {
.get_link_ksettings = vlan_ethtool_get_link_ksettings,
.get_drvinfo = vlan_ethtool_get_drvinfo,
@@ -805,6 +819,7 @@ static const struct net_device_ops vlan_
@@ -808,6 +822,7 @@ static const struct net_device_ops vlan_
#endif
.ndo_fix_features = vlan_dev_fix_features,
.ndo_get_iflink = vlan_dev_get_iflink,

View File

@ -51,7 +51,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
enum tc_setup_type {
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -777,6 +777,12 @@ static int vlan_dev_fill_forward_path(st
@@ -780,6 +780,12 @@ static int vlan_dev_fill_forward_path(st
path->encap.proto = vlan->vlan_proto;
path->dev = ctx->dev;
ctx->dev = vlan->real_dev;

View File

@ -933,7 +933,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -2837,7 +2837,6 @@ static int lan743x_pcidev_probe(struct p
@@ -2831,7 +2831,6 @@ static int lan743x_pcidev_probe(struct p
{
struct lan743x_adapter *adapter = NULL;
struct net_device *netdev = NULL;
@ -941,7 +941,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int ret = -ENODEV;
netdev = devm_alloc_etherdev(&pdev->dev,
@@ -2854,9 +2853,7 @@ static int lan743x_pcidev_probe(struct p
@@ -2848,9 +2847,7 @@ static int lan743x_pcidev_probe(struct p
NETIF_MSG_IFDOWN | NETIF_MSG_TX_QUEUED;
netdev->max_mtu = LAN743X_MAX_FRAME_SIZE;
@ -1360,7 +1360,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int irq;
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -4957,7 +4957,7 @@ int stmmac_dvr_probe(struct device *devi
@@ -4990,7 +4990,7 @@ int stmmac_dvr_probe(struct device *devi
priv->wol_irq = res->wol_irq;
priv->lpi_irq = res->lpi_irq;
@ -1371,7 +1371,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dev_set_drvdata(device, priv->dev);
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -394,7 +394,7 @@ static int stmmac_of_get_mac_mode(struct
@@ -395,7 +395,7 @@ static int stmmac_of_get_mac_mode(struct
* set some private fields that will be used by the main at runtime.
*/
struct plat_stmmacenet_data *
@ -1380,7 +1380,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
{
struct device_node *np = pdev->dev.of_node;
struct plat_stmmacenet_data *plat;
@@ -406,12 +406,12 @@ stmmac_probe_config_dt(struct platform_d
@@ -407,12 +407,12 @@ stmmac_probe_config_dt(struct platform_d
if (!plat)
return ERR_PTR(-ENOMEM);
@ -1398,7 +1398,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
phy_mode = device_get_phy_mode(&pdev->dev);
@@ -643,7 +643,7 @@ void stmmac_remove_config_dt(struct plat
@@ -644,7 +644,7 @@ void stmmac_remove_config_dt(struct plat
}
#else
struct plat_stmmacenet_data *

View File

@ -3852,6 +3852,7 @@ CONFIG_NET_CORE=y
# CONFIG_NET_DSA_LOOP is not set
# CONFIG_NET_DSA_MICROCHIP_KSZ8795 is not set
# CONFIG_NET_DSA_MICROCHIP_KSZ9477 is not set
# CONFIG_NET_DSA_MSCC_FELIX is not set
# CONFIG_NET_DSA_MSCC_SEVILLE is not set
# CONFIG_NET_DSA_MT7530 is not set
# CONFIG_NET_DSA_MV88E6060 is not set

View File

@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
--- /dev/null
+++ b/net/netfilter/xt_FLOWOFFLOAD.c
@@ -0,0 +1,658 @@
@@ -0,0 +1,656 @@
+/*
+ * Copyright (C) 2018-2021 Felix Fietkau <nbd@nbd.name>
+ *
@ -278,8 +278,6 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ hook->used = true;
+ }
+ spin_unlock_bh(&hooks_lock);
+
+ cond_resched();
+}
+
+static void

View File

@ -158,7 +158,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
IPC_SEM_IDS, sysvipc_sem_proc_show);
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -144,6 +144,8 @@ pure_initcall(ipc_ns_init);
@@ -154,6 +154,8 @@ pure_initcall(ipc_ns_init);
void __init shm_init(void)
{

View File

@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
case RTN_THROW:
case RTN_UNREACHABLE:
default:
@@ -4429,6 +4448,17 @@ static int ip6_pkt_prohibit_out(struct n
@@ -4448,6 +4467,17 @@ static int ip6_pkt_prohibit_out(struct n
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
}
@ -175,7 +175,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
/*
* Allocate a dst for local (unicast / anycast) address.
*/
@@ -4909,7 +4939,8 @@ static int rtm_to_fib6_config(struct sk_
@@ -4928,7 +4958,8 @@ static int rtm_to_fib6_config(struct sk_
if (rtm->rtm_type == RTN_UNREACHABLE ||
rtm->rtm_type == RTN_BLACKHOLE ||
rtm->rtm_type == RTN_PROHIBIT ||
@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
cfg->fc_flags |= RTF_REJECT;
if (rtm->rtm_type == RTN_LOCAL)
@@ -6080,6 +6111,8 @@ static int ip6_route_dev_notify(struct n
@@ -6099,6 +6130,8 @@ static int ip6_route_dev_notify(struct n
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.ip6_prohibit_entry->dst.dev = dev;
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif
@@ -6091,6 +6124,7 @@ static int ip6_route_dev_notify(struct n
@@ -6110,6 +6143,7 @@ static int ip6_route_dev_notify(struct n
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
#endif
}
@@ -6282,6 +6316,8 @@ static int __net_init ip6_route_net_init
@@ -6301,6 +6335,8 @@ static int __net_init ip6_route_net_init
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.fib6_has_custom_rules = false;
@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
sizeof(*net->ipv6.ip6_prohibit_entry),
GFP_KERNEL);
@@ -6292,11 +6328,21 @@ static int __net_init ip6_route_net_init
@@ -6311,11 +6347,21 @@ static int __net_init ip6_route_net_init
ip6_template_metrics, true);
INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached);
@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
ip6_template_metrics, true);
@@ -6323,6 +6369,8 @@ out:
@@ -6342,6 +6388,8 @@ out:
return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry:
@@ -6342,6 +6390,7 @@ static void __net_exit ip6_route_net_exi
@@ -6361,6 +6409,7 @@ static void __net_exit ip6_route_net_exi
kfree(net->ipv6.ip6_null_entry);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry);
@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
kfree(net->ipv6.ip6_blk_hole_entry);
#endif
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
@@ -6419,6 +6468,9 @@ void __init ip6_route_init_special_entri
@@ -6438,6 +6487,9 @@ void __init ip6_route_init_special_entri
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);

View File

@ -22,7 +22,8 @@ avm,fritzbox-4040)
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x1e"
;;
avm,fritzbox-7530 |\
glinet,gl-b1300)
glinet,gl-b1300 |\
mikrotik,lhgg-60ad)
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"
;;
edgecore,oap100)

View File

@ -29,6 +29,7 @@ ipq40xx_setup_interfaces()
engenius,eap1300|\
engenius,emd1|\
meraki,mr33|\
mikrotik,lhgg-60ad|\
mikrotik,sxtsq-5-ac|\
netgear,ex6100v2|\
netgear,ex6150v2|\
@ -105,6 +106,11 @@ ipq40xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0u@eth0" "3:lan" "4:lan"
;;
glinet,gl-b2200)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0u@eth0" "1:lan" "2:lan" "3:lan" "5:lan" "0u@eth1" "4:wan"
;;
mobipromo,cm520-79f)
ucidef_add_switch "switch0" \
"0u@eth0" "3:lan:2" "4:lan:1"
@ -190,6 +196,7 @@ ipq40xx_setup_macs()
lan_mac=$(macaddr_add $wan_mac 1)
label_mac="$wan_mac"
;;
mikrotik,lhgg-60ad|\
mikrotik,sxtsq-5-ac)
lan_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base)
label_mac="$lan_mac"

Some files were not shown because too many files have changed in this diff Show More