Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen
2021-11-01 12:53:08 +08:00
170 changed files with 3500 additions and 575 deletions

View File

@@ -107,7 +107,7 @@ menu "Global build settings"
default n
help
This makes file checksums part of package metadata. It increases size
but provides you with pkg_check command to check for flash coruptions.
but provides you with pkg_check command to check for flash corruptions.
config INCLUDE_CONFIG
bool "Include build configuration in firmware" if DEVEL

View File

@@ -1112,7 +1112,7 @@ config KERNEL_SQUASHFS_XATTR
bool "Squashfs XATTR support"
#
# compile optimiziation setting
# compile optimization setting
#
choice
prompt "Compiler optimization level"

View File

@@ -187,6 +187,19 @@ define Build/elecom-product-header
mv $(fw).new $(fw)
endef
define Build/elecom-wrc-gs-factory
$(eval product=$(word 1,$(1)))
$(eval version=$(word 2,$(1)))
$(eval hash_opt=$(word 3,$(1)))
$(MKHASH) md5 $(hash_opt) $@ >> $@
( \
echo -n "ELECOM $(product) v$(version)" | \
dd bs=32 count=1 conv=sync; \
dd if=$@; \
) > $@.new
mv $@.new $@
endef
define Build/elx-header
$(eval hw_id=$(word 1,$(1)))
$(eval xor_pattern=$(word 2,$(1)))

View File

@@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL
endif
LINUX_VERSION-5.4 = .155
LINUX_VERSION-5.10 = .75
LINUX_VERSION-5.10 = .76
LINUX_KERNEL_HASH-5.4.155 = cc0c0f902748d251cb22d0e69e3b8d260c447eb0072ef853da15da6cce775038
LINUX_KERNEL_HASH-5.10.75 = 0a2b2f5fefb90773190aaef4726ac363e03992aedc424b0a57eca092d084304b
LINUX_KERNEL_HASH-5.10.76 = 480a09ba1962862ff18df9453fa0df6ba11cbe19eefedeab81bf2c84f49e1890
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

View File

@@ -64,6 +64,7 @@ define Meson/CreateNativeFile
-e "s|@CC@|$(foreach BIN,$(HOSTCC),'$(BIN)',)|" \
-e "s|@CXX@|$(foreach BIN,$(HOSTCXX),'$(BIN)',)|" \
-e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \
-e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \
-e "s|@CFLAGS@|$(foreach FLAG,$(HOST_CFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \
-e "s|@CXXFLAGS@|$(foreach FLAG,$(HOST_CXXFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \
-e "s|@LDFLAGS@|$(foreach FLAG,$(HOST_LDFLAGS),'$(FLAG)',)|" \
@@ -80,6 +81,7 @@ define Meson/CreateCrossFile
-e "s|@STRIP@|$(TARGET_CROSS)strip|" \
-e "s|@NM@|$(TARGET_NM)|" \
-e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \
-e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \
-e "s|@CFLAGS@|$(foreach FLAG,$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \
-e "s|@CXXFLAGS@|$(foreach FLAG,$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \
-e "s|@LDFLAGS@|$(foreach FLAG,$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS),'$(FLAG)',)|" \

View File

@@ -209,10 +209,10 @@ add_group_and_user() {
if [ -n "$rusers" ]; then
local tuple oIFS="$IFS"
for tuple in $rusers; do
local uid gid uname gname
local uid gid uname gname addngroups addngroup addngname addngid
IFS=":"
set -- $tuple; uname="$1"; gname="$2"
set -- $tuple; uname="$1"; gname="$2"; addngroups="$3"
IFS="="
set -- $uname; uname="$1"; uid="$2"
set -- $gname; gname="$1"; gid="$2"
@@ -232,7 +232,24 @@ add_group_and_user() {
group_add_user "$gname" "$uname"
fi
unset uid gid uname gname
if [ -n "$uname" ] && [ -n "$addngroups" ]; then
oIFS="$IFS"
IFS=","
for addngroup in $addngroups ; do
IFS="="
set -- $addngroup; addngname="$1"; addngid="$2"
if [ -n "$addngid" ]; then
group_exists "$addngname" || group_add "$addngname" "$addngid"
else
group_add_next "$addngname"
fi
group_add_user "$addngname" "$uname"
done
IFS="$oIFS"
fi
unset uid gid uname gname addngroups addngroup addngname addngid
done
fi
}
@@ -313,6 +330,19 @@ find_mtd_part() {
echo "${INDEX:+$PREFIX$INDEX}"
}
find_mmc_part() {
local DEVNAME PARTNAME
if grep -q "$1" /proc/mtd; then
echo "" && return 0
fi
for DEVNAME in /sys/block/mmcblk*/mmcblk*p*; do
PARTNAME="$(grep PARTNAME ${DEVNAME}/uevent | cut -f2 -d'=')"
[ "$PARTNAME" = "$1" ] && echo "/dev/$(basename $DEVNAME)" && return 0
done
}
group_add() {
local name="$1"
local gid="$2"

View File

@@ -48,6 +48,19 @@ caldata_extract_ubi() {
caldata_die "failed to extract calibration data from $ubi"
}
caldata_extract_mmc() {
local part=$1
local offset=$(($2))
local count=$(($3))
local mmc_part
mmc_part=$(find_mmc_part $part)
[ -n "$mmc_part" ] || caldata_die "no mmc partition found for partition $part"
caldata_dd $mmc_part /lib/firmware/$FIRMWARE $count $offset || \
caldata_die "failed to extract calibration data from $mmc_part"
}
caldata_extract_reverse() {
local part=$1
local offset=$2

View File

@@ -135,6 +135,15 @@ mtd_get_part_size() {
done < /proc/mtd
}
mmc_get_mac_binary() {
local part_name="$1"
local offset="$2"
local part
part=$(find_mmc_part "$part_name")
get_mac_binary "$part" "$offset"
}
macaddr_add() {
local mac=$1
local val=$2

View File

@@ -77,9 +77,8 @@ buffalo,wzr-hp-g300nh-s)
domywifi,dw33d)
ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000"
;;
glinet,gl-ar150)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
;;
dongwon,dw02-412h-64m|\
dongwon,dw02-412h-128m|\
glinet,gl-ar300m-lite|\
glinet,gl-ar300m-nand|\
glinet,gl-ar300m-nor|\
@@ -88,6 +87,9 @@ glinet,gl-ar300m16)
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
;;
glinet,gl-ar150)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
;;
netgear,wndr3700|\
netgear,wndr3700-v2|\
netgear,wndrmac-v1)

View File

@@ -37,6 +37,7 @@ samknows,whitebox-v8|\
xiaomi,mi-router-3g-v2|\
xiaomi,mi-router-4a-gigabit|\
xiaomi,mi-router-4c|\
xiaomi,miwifi-3c|\
xiaomi,miwifi-nano|\
zbtlink,zbt-wg2626|\
zte,mf283plus)

View File

@@ -270,6 +270,15 @@ define U-Boot/nanopi_neo2
ATF:=a64
endef
define U-Boot/nanopi_r1s_h5
BUILD_SUBTARGET:=cortexa53
NAME:=NanoPi R1S (H5)
BUILD_DEVICES:=friendlyarm_nanopi-r1s-h5
DEPENDS:=+PACKAGE_u-boot-nanopi_r1s_h5:arm-trusted-firmware-sunxi-a64
UENV:=a64
ATF:=a64
endef
define U-Boot/pine64_plus
BUILD_SUBTARGET:=cortexa53
NAME:=Pine64 Plus A64
@@ -357,6 +366,7 @@ UBOOT_TARGETS := \
nanopi_neo_plus2 \
nanopi_neo2 \
nanopi_r1 \
nanopi_r1s_h5 \
orangepi_zero \
orangepi_r1 \
orangepi_one \

View File

@@ -0,0 +1,271 @@
From e7510d24cab4741f72489b9d67c2d42b18fe5374 Mon Sep 17 00:00:00 2001
From: Chukun Pan <amadeus@jmu.edu.cn>
Date: Sun, 10 Oct 2021 21:36:57 +0800
Subject: [PATCH] sunxi: Add support for FriendlyARM NanoPi R1S H5
This adds support for the NanoPi R1S H5 board.
Allwinner H5 SoC
512MB DDR3 RAM
10/100/1000M Ethernet x 2
RTL8189ETV WiFi 802.11b/g/n
USB 2.0 host port (A)
MicroSD Slot
Reset button
Serial Debug Port
WAN - LAN - SYS LED
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
arch/arm/dts/Makefile | 1 +
arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts | 195 +++++++++++++++++++++++
board/sunxi/MAINTAINERS | 5 +
configs/nanopi_r1s_h5_defconfig | 14 ++
4 files changed, 215 insertions(+)
create mode 100644 arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts
create mode 100644 configs/nanopi_r1s_h5_defconfig
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index b8a382d1539..ed3d360bb10 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -638,6 +638,7 @@ dtb-$(CONFIG_MACH_SUN50I_H5) += \
sun50i-h5-libretech-all-h5-cc.dtb \
sun50i-h5-nanopi-neo2.dtb \
sun50i-h5-nanopi-neo-plus2.dtb \
+ sun50i-h5-nanopi-r1s-h5.dtb \
sun50i-h5-orangepi-zero-plus.dtb \
sun50i-h5-orangepi-pc2.dtb \
sun50i-h5-orangepi-prime.dtb \
diff --git a/arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts b/arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts
new file mode 100644
index 00000000000..55bcdf8d1a0
--- /dev/null
+++ b/arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts
@@ -0,0 +1,190 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2021 Chukun Pan <amadeus@jmu.edu.cn>
+ *
+ * Based on sun50i-h5-nanopi-neo-plus2.dts, which is:
+ * Copyright (C) 2017 Antony Antony <antony@phenome.org>
+ * Copyright (C) 2016 ARM Ltd.
+ */
+
+/dts-v1/;
+#include "sun50i-h5.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ model = "FriendlyARM NanoPi R1S H5";
+ compatible = "friendlyarm,nanopi-r1s-h5", "allwinner,sun50i-h5";
+
+ aliases {
+ ethernet0 = &emac;
+ ethernet1 = &rtl8189etv;
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ sys {
+ label = "nanopi:red:sys";
+ gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+
+ lan {
+ label = "nanopi:green:lan";
+ gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ wan {
+ label = "nanopi:green:wan";
+ gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ r-gpio-keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ reg_gmac_3v3: gmac-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "gmac-3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <100000>;
+ enable-active-high;
+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
+ };
+
+ reg_vcc3v3: vcc3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ reg_usb0_vbus: usb0-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb0-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
+ status = "okay";
+ };
+
+ vdd_cpux: gpio-regulator {
+ compatible = "regulator-gpio";
+ regulator-name = "vdd-cpux";
+ regulator-type = "voltage";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-ramp-delay = <50>; /* 4ms */
+ gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>;
+ gpios-states = <0x1>;
+ states = <1100000 0x0>, <1300000 0x1>;
+ };
+
+ wifi_pwrseq: wifi_pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
+ post-power-on-delay-ms = <200>;
+ };
+};
+
+&cpu0 {
+ cpu-supply = <&vdd_cpux>;
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&ehci2 {
+ status = "okay";
+};
+
+&emac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&emac_rgmii_pins>;
+ phy-supply = <&reg_gmac_3v3>;
+ phy-handle = <&ext_rgmii_phy>;
+ phy-mode = "rgmii-id";
+ status = "okay";
+};
+
+&external_mdio {
+ ext_rgmii_phy: ethernet-phy@7 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <7>;
+ };
+};
+
+&i2c0 {
+ status = "okay";
+
+ eeprom@51 {
+ compatible = "microchip,24c02";
+ reg = <0x51>;
+ pagesize = <16>;
+ };
+};
+
+&mmc0 {
+ vmmc-supply = <&reg_vcc3v3>;
+ bus-width = <4>;
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
+ status = "okay";
+};
+
+&mmc1 {
+ vmmc-supply = <&reg_vcc3v3>;
+ vqmmc-supply = <&reg_vcc3v3>;
+ mmc-pwrseq = <&wifi_pwrseq>;
+ bus-width = <4>;
+ non-removable;
+ status = "okay";
+
+ rtl8189etv: sdio_wifi@1 {
+ reg = <1>;
+ };
+};
+
+&ohci1 {
+ status = "okay";
+};
+
+&ohci2 {
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pa_pins>;
+ status = "okay";
+};
+
+&usb_otg {
+ dr_mode = "peripheral";
+ status = "okay";
+};
+
+&usbphy {
+ /* USB Type-A port's VBUS is always on */
+ usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+ usb0_vbus-supply = <&reg_usb0_vbus>;
+ status = "okay";
+};
diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
index 2543c94de79..56a0ee3689b 100644
--- a/board/sunxi/MAINTAINERS
+++ b/board/sunxi/MAINTAINERS
@@ -358,6 +358,11 @@ M: Jelle van der Waa <jelle@vdwaa.nl>
S: Maintained
F: configs/nanopi_neo_air_defconfig
+NANOPI-R1S-H5 BOARD
+M: Chukun Pan <amadeus@jmu.edu.cn>
+S: Maintained
+F: configs/nanopi_r1s_h5_defconfig
+
NANOPI-A64 BOARD
M: Jagan Teki <jagan@amarulasolutions.com>
S: Maintained
diff --git a/configs/nanopi_r1s_h5_defconfig b/configs/nanopi_r1s_h5_defconfig
new file mode 100644
index 00000000000..27cf172d72a
--- /dev/null
+++ b/configs/nanopi_r1s_h5_defconfig
@@ -0,0 +1,14 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SPL=y
+CONFIG_MACH_SUN50I_H5=y
+CONFIG_DRAM_CLK=672
+CONFIG_DRAM_ZQ=3881977
+# CONFIG_DRAM_ODT_EN is not set
+CONFIG_MACPWR="PD6"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-nanopi-r1s-h5"
+CONFIG_SUN8I_EMAC=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y

View File

@@ -292,7 +292,6 @@ $(Package/ath10k-ct-firmware-default)
CATEGORY:=Firmware
PROVIDES:=ath10k-firmware-qca4019
CONFLICTS:=ath10k-firmware-qca4019
DEPENDS:=+ath10k-board-qca4019
endef
define Package/ath10k-firmware-qca4019-ct-full-htt
$(Package/ath10k-ct-firmware-default)
@@ -307,7 +306,6 @@ $(Package/ath10k-ct-firmware-default)
ath10k-firmware-qca4019-ct \
ath10k-firmware-qca4019-ct-htt
DEPENDS:=\
+ath10k-board-qca4019 \
+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
endef
define Package/ath10k-firmware-qca4019-ct-htt
@@ -322,7 +320,6 @@ $(Package/ath10k-firmware-default)
ath10k-firmware-qca4019 \
ath10k-firmware-qca4019-ct
DEPENDS:=\
+ath10k-board-qca4019 \
+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct
endef

View File

@@ -33,7 +33,7 @@ define Package/ath10k-board-qca4019/install
$(1)/lib/firmware/ath10k/QCA4019/hw1.0/
endef
$(eval $(call BuildPackage,ath10k-board-qca4019))
Package/ath10k-firmware-qca4019 = $(call Package/firmware-default,ath10k qca4019 firmware,+ath10k-board-qca4019)
Package/ath10k-firmware-qca4019 = $(call Package/firmware-default,ath10k qca4019 firmware)
define Package/ath10k-firmware-qca4019/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
$(INSTALL_DATA) \

View File

@@ -48,6 +48,7 @@ define KernelPackage/bonding
KCONFIG:=CONFIG_BONDING
FILES:=$(LINUX_DIR)/drivers/net/bonding/bonding.ko
AUTOLOAD:=$(call AutoLoad,40,bonding)
MODPARAMS.bonding:=max_bonds=0
endef
define KernelPackage/bonding/description

View File

@@ -0,0 +1,121 @@
From 6f8c8bf4c7c9be1c42088689fd4370e06b46608a Mon Sep 17 00:00:00 2001
From: Abinaya Kalaiselvan <akalaise@codeaurora.org>
Date: Wed, 20 Oct 2021 11:59:07 +0300
Subject: ath10k: fix module load regression with iram-recovery feature
Commit 9af7c32ceca8 ("ath10k: add target IRAM recovery feature support")
introduced a new firmware feature flag ATH10K_FW_FEATURE_IRAM_RECOVERY. But
this caused ath10k_pci module load to fail if ATH10K_FW_CRASH_DUMP_RAM_DATA bit
was not enabled in the ath10k coredump_mask module parameter:
[ 2209.328190] ath10k_pci 0000:02:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
[ 2209.434414] ath10k_pci 0000:02:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 1 testmode 1
[ 2209.547191] ath10k_pci 0000:02:00.0: firmware ver 10.4-3.9.0.2-00099 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps,peer-fixed-rate,iram-recovery crc32 cbade90a
[ 2210.896485] ath10k_pci 0000:02:00.0: board_file api 1 bmi_id 0:1 crc32 a040efc2
[ 2213.603339] ath10k_pci 0000:02:00.0: failed to copy target iram contents: -12
[ 2213.839027] ath10k_pci 0000:02:00.0: could not init core (-12)
[ 2213.933910] ath10k_pci 0000:02:00.0: could not probe fw (-12)
And by default coredump_mask does not have ATH10K_FW_CRASH_DUMP_RAM_DATA
enabled so anyone using a firmware with iram-recovery feature would fail. To my
knowledge only QCA9984 firmwares starting from release 10.4-3.9.0.2-00099
enabled the feature.
The reason for regression was that ath10k_core_copy_target_iram() used
ath10k_coredump_get_mem_layout() to get the memory layout, but when
ATH10K_FW_CRASH_DUMP_RAM_DATA was disabled it would get just NULL and bail out
with an error.
While looking at all this I noticed another bug: if CONFIG_DEV_COREDUMP is
disabled but the firmware has iram-recovery enabled the module load fails with
similar error messages. I fixed that by returning 0 from
ath10k_core_copy_target_iram() when _ath10k_coredump_get_mem_layout() returns
NULL.
Tested-on: QCA9984 hw2.0 PCI 10.4-3.9.0.2-00139
Fixes: 9af7c32ceca8 ("ath10k: add target IRAM recovery feature support")
Signed-off-by: Abinaya Kalaiselvan <akalaise@codeaurora.org>
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211020075054.23061-1-kvalo@codeaurora.org
---
drivers/net/wireless/ath/ath10k/core.c | 11 +++++++++--
drivers/net/wireless/ath/ath10k/coredump.c | 11 ++++++++---
drivers/net/wireless/ath/ath10k/coredump.h | 7 +++++++
3 files changed, 24 insertions(+), 5 deletions(-)
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -2690,9 +2690,16 @@ static int ath10k_core_copy_target_iram(
int i, ret;
u32 len, remaining_len;
- hw_mem = ath10k_coredump_get_mem_layout(ar);
+ /* copy target iram feature must work also when
+ * ATH10K_FW_CRASH_DUMP_RAM_DATA is disabled, so
+ * _ath10k_coredump_get_mem_layout() to accomplist that
+ */
+ hw_mem = _ath10k_coredump_get_mem_layout(ar);
if (!hw_mem)
- return -ENOMEM;
+ /* if CONFIG_DEV_COREDUMP is disabled we get NULL, then
+ * just silently disable the feature by doing nothing
+ */
+ return 0;
for (i = 0; i < hw_mem->region_table.size; i++) {
tmp = &hw_mem->region_table.regions[i];
--- a/drivers/net/wireless/ath/ath10k/coredump.c
+++ b/drivers/net/wireless/ath/ath10k/coredump.c
@@ -1447,11 +1447,17 @@ static u32 ath10k_coredump_get_ramdump_s
const struct ath10k_hw_mem_layout *ath10k_coredump_get_mem_layout(struct ath10k *ar)
{
- int i;
-
if (!test_bit(ATH10K_FW_CRASH_DUMP_RAM_DATA, &ath10k_coredump_mask))
return NULL;
+ return _ath10k_coredump_get_mem_layout(ar);
+}
+EXPORT_SYMBOL(ath10k_coredump_get_mem_layout);
+
+const struct ath10k_hw_mem_layout *_ath10k_coredump_get_mem_layout(struct ath10k *ar)
+{
+ int i;
+
if (WARN_ON(ar->target_version == 0))
return NULL;
@@ -1464,7 +1470,6 @@ const struct ath10k_hw_mem_layout *ath10
return NULL;
}
-EXPORT_SYMBOL(ath10k_coredump_get_mem_layout);
struct ath10k_fw_crash_data *ath10k_coredump_new(struct ath10k *ar)
{
--- a/drivers/net/wireless/ath/ath10k/coredump.h
+++ b/drivers/net/wireless/ath/ath10k/coredump.h
@@ -176,6 +176,7 @@ int ath10k_coredump_register(struct ath1
void ath10k_coredump_unregister(struct ath10k *ar);
void ath10k_coredump_destroy(struct ath10k *ar);
+const struct ath10k_hw_mem_layout *_ath10k_coredump_get_mem_layout(struct ath10k *ar);
const struct ath10k_hw_mem_layout *ath10k_coredump_get_mem_layout(struct ath10k *ar);
#else /* CONFIG_DEV_COREDUMP */
@@ -213,6 +214,12 @@ ath10k_coredump_get_mem_layout(struct at
{
return NULL;
}
+
+static inline const struct ath10k_hw_mem_layout *
+_ath10k_coredump_get_mem_layout(struct ath10k *ar)
+{
+ return NULL;
+}
#endif /* CONFIG_DEV_COREDUMP */

View File

@@ -14,7 +14,7 @@ Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -3345,6 +3345,16 @@ int ath10k_core_register(struct ath10k *
@@ -3352,6 +3352,16 @@ int ath10k_core_register(struct ath10k *
queue_work(ar->workqueue, &ar->register_work);

View File

@@ -172,7 +172,7 @@ v13:
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
@@ -3060,6 +3066,10 @@ int ath10k_core_start(struct ath10k *ar,
@@ -3067,6 +3073,10 @@ int ath10k_core_start(struct ath10k *ar,
goto err_hif_stop;
}
@@ -183,7 +183,7 @@ v13:
return 0;
err_hif_stop:
@@ -3318,9 +3328,18 @@ static void ath10k_core_register_work(st
@@ -3325,9 +3335,18 @@ static void ath10k_core_register_work(st
goto err_spectral_destroy;
}
@@ -202,7 +202,7 @@ v13:
err_spectral_destroy:
ath10k_spectral_destroy(ar);
err_debug_destroy:
@@ -3366,6 +3385,8 @@ void ath10k_core_unregister(struct ath10
@@ -3373,6 +3392,8 @@ void ath10k_core_unregister(struct ath10
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
return;

View File

@@ -26,7 +26,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
#include <linux/property.h>
#include <linux/dmi.h>
#include <linux/ctype.h>
@@ -3236,6 +3237,8 @@ static int ath10k_core_probe_fw(struct a
@@ -3243,6 +3244,8 @@ static int ath10k_core_probe_fw(struct a
device_get_mac_address(ar->dev, ar->mac_addr, sizeof(ar->mac_addr));

View File

@@ -0,0 +1,29 @@
From 03469e79fee9e8e908dae3bd1a80bcd9a66f2a88 Mon Sep 17 00:00:00 2001
From: Christian Lamparter <chunkeey@gmail.com>
Date: Mon, 11 Oct 2021 18:18:00 +0300
Subject: ath9k: support DT ieee80211-freq-limit property to limit channels
The common DT property can be used to limit the available channels
but ath9k has to manually call wiphy_read_of_freq_limits().
I would have put this into ath9k_of_init(). But it didn't work there.
The reason is that in ath9k_of_init() the channels and bands are not yet
registered in the wiphy struct. So there isn't any channel to flag as
disabled.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211009212847.1781986-1-chunkeey@gmail.com
---
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -1094,6 +1094,8 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc,
ARRAY_SIZE(ath9k_tpt_blink));
#endif
+ wiphy_read_of_freq_limits(hw->wiphy);
+
/* Register with mac80211 */
error = ieee80211_register_hw(hw);
if (error)

View File

@@ -1,15 +0,0 @@
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -625,6 +625,12 @@ static int ath9k_of_init(struct ath_soft
ath_dbg(common, CONFIG, "parsing configuration from OF node\n");
+ if (of_property_read_bool(np, "qca,disable-2ghz"))
+ ah->disable_2ghz = true;
+
+ if (of_property_read_bool(np, "qca,disable-5ghz"))
+ ah->disable_5ghz = true;
+
if (of_property_read_bool(np, "qca,no-eeprom")) {
/* ath9k-eeprom-<bus>-<id>.bin */
scnprintf(eeprom_name, sizeof(eeprom_name),

View File

@@ -16,7 +16,7 @@
static const struct platform_device_id ath9k_platform_id_table[] = {
{
@@ -69,6 +77,242 @@ static const struct ath_bus_ops ath_ahb_
@@ -69,6 +77,236 @@ static const struct ath_bus_ops ath_ahb_
.eeprom_read = ath_ahb_eeprom_read,
};
@@ -218,12 +218,6 @@
+ else
+ pdata->led_pin = -1;
+
+ if (of_property_read_bool(pdev->dev.of_node, "qca,disable-2ghz"))
+ pdata->disable_2ghz = true;
+
+ if (of_property_read_bool(pdev->dev.of_node, "qca,disable-5ghz"))
+ pdata->disable_5ghz = true;
+
+ if (of_property_read_bool(pdev->dev.of_node, "qca,tx-gain-buffalo"))
+ pdata->tx_gain_buffalo = true;
+

View File

@@ -26,6 +26,7 @@ PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/host-build.mk
define Package/elfutils/Default
SECTION:=libs
@@ -60,6 +61,12 @@ else
CONFIGURE_ARGS += --disable-nls
endif
HOST_CONFIGURE_ARGS += \
--disable-debuginfod \
--disable-libdebuginfod \
--without-lzma \
--without-zstd
CONFIGURE_ARGS += \
--program-prefix=eu- \
--disable-debuginfod \
@@ -97,6 +104,7 @@ define Package/libelf/install
endef
# these lines need to be ordered by dependency because of ABI versioning
$(eval $(call HostBuild))
$(eval $(call BuildPackage,libelf))
$(eval $(call BuildPackage,libdw))
$(eval $(call BuildPackage,libasm))

View File

@@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libselinux
PKG_VERSION:=3.2
PKG_VERSION:=3.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/3.2
PKG_HASH:=df758ef1d9d4811051dd901ea6b029ae334ffd7c671c128beb16bce1e25ac161
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
PKG_HASH:=acfdee27633d2496508c28727c3d41d3748076f66d42fccde2e6b9f3463a7057
HOST_BUILD_DEPENDS:=libsepol/host pcre/host
PKG_LICENSE:=libselinux-1.0

View File

@@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libsemanage
PKG_VERSION:=3.2
PKG_RELEASE:=2
PKG_VERSION:=3.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/3.2
PKG_HASH:=d722a55ca4fe2d4e2b30527720db657e6238b28079e69e2e4affeb8e733ee511
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
PKG_HASH:=84d0ec5afa34bbbb471f602d8c1bf317d12443d07852a34b60741d428d597ce8
PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING

View File

@@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libsepol
PKG_VERSION:=3.2
PKG_VERSION:=3.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/3.2
PKG_HASH:=dfc7f662af8000116e56a01de6a0394ed79be1b34b999e551346233c5dd19508
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
PKG_HASH:=2d97df3eb8466169b389c3660acbb90c54200ac96e452eca9f41a9639f4f238b
PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>

View File

@@ -5,9 +5,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
PKG_SOURCE_DATE:=2021-10-21
PKG_SOURCE_VERSION:=f78bdec2ed5f4c83d2c93f422c8bd21b68b02517
PKG_MIRROR_HASH:=579fdf2357bd8ccf528e18ac770d80c0f42eb916fd8442f747e29e7f121b76e7
PKG_SOURCE_DATE:=2021-10-30
PKG_SOURCE_VERSION:=8f82742ca4f47f459284f3a07323d04da72ea5f6
PKG_MIRROR_HASH:=5e519bb1aec9bb30782213f32f19f12e874c909e42826618dd4332ded816d2fe
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=GPL-2.0

View File

@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=6in4
PKG_RELEASE:=27
PKG_RELEASE:=28
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk

View File

@@ -138,8 +138,6 @@ proto_6in4_setup() {
proto_6in4_teardown() {
local cfg="$1"
local link="6in4-$cfg"
ip link del $link
}
proto_6in4_init_config() {

View File

@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=6rd
PKG_RELEASE:=11
PKG_RELEASE:=12
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk

View File

@@ -82,8 +82,6 @@ proto_6rd_setup() {
proto_6rd_teardown() {
local cfg="$1"
local link="6rd-$cfg"
ip link del $link
}
proto_6rd_init_config() {

View File

@@ -829,12 +829,14 @@ dnsmasq_start()
CONFIGFILE_TMP="${CONFIGFILE}.$$"
HOSTFILE="${BASEHOSTFILE}.${cfg}"
HOSTFILE_TMP="${HOSTFILE}.$$"
HOSTFILE_DIR="$(dirname "$HOSTFILE")"
BASEDHCPSTAMPFILE_CFG="${BASEDHCPSTAMPFILE}.${cfg}"
# before we can call xappend
umask u=rwx,g=rx,o=rx
mkdir -p /var/run/dnsmasq/
mkdir -p $(dirname $CONFIGFILE)
mkdir -p $(dirname $HOSTFILE)
mkdir -p "$HOSTFILE_DIR"
mkdir -p /var/lib/misc
chown dnsmasq:dnsmasq /var/run/dnsmasq
@@ -1158,6 +1160,7 @@ dnsmasq_start()
procd_add_jail_mount $EXTRA_MOUNT $RFC6761FILE $TRUSTANCHORSFILE
procd_add_jail_mount $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript
procd_add_jail_mount /etc/passwd /etc/group /etc/TZ /etc/hosts /etc/ethers
[ "$HOSTFILE_DIR" != "/tmp" ] && procd_add_jail_mount "$HOSTFILE_DIR"
procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile
procd_close_instance

View File

@@ -95,6 +95,11 @@ config DROPBEAR_DBCLIENT
bool "Build dropbear with dbclient"
default y
config DROPBEAR_DBCLIENT_AGENTFORWARD
bool "Enable agent forwarding in dbclient"
default y
depends on DROPBEAR_DBCLIENT
config DROPBEAR_SCP
bool "Build dropbear with scp"
default y
@@ -109,4 +114,8 @@ config DROPBEAR_ASKPASS
Increases binary size by about 0.1 kB (MIPS).
config DROPBEAR_AGENTFORWARD
bool "Enable agent forwarding"
default y
endmenu

View File

@@ -32,7 +32,8 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_DROPBEAR_CURVE25519 CONFIG_DROPBEAR_ZLIB \
CONFIG_DROPBEAR_ED25519 CONFIG_DROPBEAR_CHACHA20POLY1305 \
CONFIG_DROPBEAR_UTMP CONFIG_DROPBEAR_PUTUTLINE \
CONFIG_DROPBEAR_DBCLIENT CONFIG_DROPBEAR_SCP CONFIG_DROPBEAR_ASKPASS
CONFIG_DROPBEAR_DBCLIENT CONFIG_DROPBEAR_SCP CONFIG_DROPBEAR_ASKPASS \
CONFIG_DROPBEAR_DBCLIENT_AGENTFORWARD CONFIG_DROPBEAR_AGENTFORWARD
include $(INCLUDE_DIR)/package.mk
@@ -135,6 +136,8 @@ DB_OPT_CONFIG = \
!!DROPBEAR_ECC_384|CONFIG_DROPBEAR_ECC_FULL|1|0 \
!!DROPBEAR_ECC_521|CONFIG_DROPBEAR_ECC_FULL|1|0 \
DROPBEAR_CLI_ASKPASS_HELPER|CONFIG_DROPBEAR_ASKPASS|1|0 \
DROPBEAR_CLI_AGENTFWD|CONFIG_DROPBEAR_DBCLIENT_AGENTFORWARD|1|0 \
DROPBEAR_SVR_AGENTFWD|CONFIG_DROPBEAR_AGENTFORWARD|1|0 \
TARGET_CFLAGS += -DARGTYPE=3 -ffunction-sections -fdata-sections -flto

View File

@@ -21,6 +21,7 @@
"fstat",
"getsockname",
"ioctl",
"madvise",
"mmap",
"mmap2",
"munmap",

View File

@@ -7,9 +7,9 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=selinux-policy
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.defensec.nl/selinux-policy.git
PKG_VERSION:=0.9
PKG_MIRROR_HASH:=f1a37a4fc104fbacde3012178fc117b473899360f26a8735156394288441d99c
PKG_SOURCE_URL:=https://github.com/DefenSec/selinux-policy
PKG_VERSION:=1.0
PKG_MIRROR_HASH:=2358a064d1231d39e6292d646e1a38898d949b8bef6558ac1e0992d3b5bca33f
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_BUILD_DEPENDS:=secilc/host policycoreutils/host

View File

@@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=checkpolicy
PKG_VERSION:=3.2
PKG_VERSION:=3.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/3.2
PKG_HASH:=9b1c81fa86fe3867842164448d90c8e7ea94b2987497809c65d4caa87a5c5bc8
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
PKG_HASH:=25c84edfa3a10ab8cb073b97bc55cb66377532d54a2723da9accdabd05431485
PKG_INSTALL:=1
PKG_BUILD_DEPENDS:=libselinux
HOST_BUILD_DEPENDS:=libselinux/host

View File

@@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=policycoreutils
PKG_VERSION:=3.2
PKG_VERSION:=3.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/3.2
PKG_HASH:=d1331c6fa766c547b071c491de90b9f343c8dbffdb119be8a5a7e491199b93a9
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
PKG_HASH:=4199040ced8a81f2ddd0522b4faf2aba62fc821473f4051dc8474fb1c4a01078
PKG_INSTALL:=1
HOST_BUILD_DEPENDS:=libsemanage/host gettext-full/host
PKG_BUILD_DEPENDS:=BUSYBOX_CONFIG_PAM:libpam gettext-full/host

View File

@@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=secilc
PKG_VERSION:=3.2
PKG_VERSION:=3.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/3.2
PKG_HASH:=5f6e6528a281b29ac5e558babffc3d8aab682fd8df8977daff5f266a50292cc3
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
PKG_HASH:=2c5e1a5d417baf1d2aa3eac294e12c3aac7184a5ef6a779dcbe469ed756e8651
HOST_BUILD_DEPENDS:=libsepol/host
PKG_MAINTAINER:=Dominick Grift <dominick.grift@defensec.nl>

View File

@@ -4697,7 +4697,7 @@ sub process {
## $line !~ /^.\s*$Type\s+$Ident(?:\s*=[^,{]*)?\s*,\s*$Type\s*$Ident.*/) {
##
## # Remove any bracketed sections to ensure we do not
## # falsly report the parameters of functions.
## # falsely report the parameters of functions.
## my $ln = $line;
## while ($ln =~ s/\([^\(\)]*\)//g) {
## }

View File

@@ -207,7 +207,7 @@ class GitHubCommitTsCache(object):
class DownloadGitHubTarball(object):
"""Download and repack archive tarabll from GitHub.
"""Download and repack archive tarball from GitHub.
Compared with the method of packing after cloning the whole repo, this
method is more friendly to users with fragile internet connection.
@@ -220,7 +220,7 @@ class DownloadGitHubTarball(object):
- GitHub archives do not contain source codes for submodules.
- GitHub archives seem to respect .gitattributes and ignore pathes with
- GitHub archives seem to respect .gitattributes and ignore paths with
export-ignore attributes.
For the first two issues, the method will fail loudly to allow fallback to

View File

@@ -569,7 +569,7 @@ while [ -n "$1" ]; do
echo -e " Most commands also take a --cflags parameter which " >&2
echo -e " is used to specify C flags to be passed to the " >&2
echo -e " cross compiler when performing tests." >&2
echo -e " This paremter may be repeated multiple times." >&2
echo -e " This parameter may be repeated multiple times." >&2
exit 1
;;

View File

@@ -3,7 +3,6 @@
import argparse
from ftplib import FTP
from sys import argv
from os import stat
parser = argparse.ArgumentParser(description='Tool to boot AVM EVA ramdisk images.')

View File

@@ -7,7 +7,7 @@ from sys import argv
import json
if len(argv) != 2:
print("JSON info files script requires ouput file as argument")
print("JSON info files script requires output file as argument")
exit(1)
output_path = Path(argv[1])

View File

@@ -11,11 +11,11 @@
# This is appended to the factory image and is tested by the Linksys Upgrader - as observed in civic.
# The footer is 256 bytes. The format is:
# .LINKSYS. This is detected by the Linksys upgrader before continuing with upgrade. (9 bytes)
# <VERSION> The version number of upgrade. Not checked so use arbitary value (8 bytes)
# <VERSION> The version number of upgrade. Not checked so use arbitrary value (8 bytes)
# <TYPE> Model of target device, padded (0x20) to (15 bytes)
# <CRC> CRC checksum of the image to flash (8 byte)
# <padding> Padding (0x20) (7 bytes)
# <signature> Signature of signer. Not checked so use Arbitary value (16 bytes)
# <signature> Signature of signer. Not checked so use arbitrary value (16 bytes)
# <padding> Padding (0x00) (192 bytes)
# 0x0A (1 byte)

View File

@@ -295,13 +295,19 @@ sub parse_package_metadata($) {
my @ugspecs = split /\s+/, $1;
for my $ugspec (@ugspecs) {
my @ugspec = split /:/, $ugspec, 2;
my @ugspec = split /:/, $ugspec, 3;
if ($ugspec[0]) {
parse_package_metadata_usergroup($src->{makefile}, "user", \%usernames, \%userids, $ugspec[0]) or return 0;
}
if ($ugspec[1]) {
parse_package_metadata_usergroup($src->{makefile}, "group", \%groupnames, \%groupids, $ugspec[1]) or return 0;
}
if ($ugspec[2]) {
my @addngroups = split /,/, $ugspec[2];
for my $addngroup (@addngroups) {
parse_package_metadata_usergroup($src->{makefile}, "group", \%groupnames, \%groupids, $addngroup) or return 0;
}
}
}
};
}

View File

@@ -2,7 +2,7 @@
function usage {
echo "Usage: prepare_image image_type kernel_image rootfs_image header_size"
echo "Padd root and kernel image to the correct size and append the jffs2 start marker as needed"
echo "Pad root and kernel image to the correct size and append the jffs2 start marker as needed"
exit 1
}

View File

@@ -3,12 +3,12 @@
# directory where search for images
TOP_DIR="${TOP_DIR:-./bin/targets}"
# key to sign images
BUILD_KEY="${BUILD_KEY:-key-build}" # TODO unifiy naming?
BUILD_KEY="${BUILD_KEY:-key-build}" # TODO unify naming?
# remove other signatures (added e.g. by buildbot)
REMOVE_OTER_SIGNATURES="${REMOVE_OTER_SIGNATURES:-1}"
# find all sysupgrade images in TOP_DIR
# factory images don't need signatures as non OpenWrt system doen't check them anyway
# factory images don't need signatures as non OpenWrt system doesn't check them anyway
for image in $(find $TOP_DIR -type f -name "*-sysupgrade.bin"); do
# check if image actually support metadata
if fwtool -i /dev/null "$image"; then

View File

@@ -7,9 +7,9 @@
###
### The script compares locally compiled package with the package indexes
### available upstream. This way the storage impact of optimizations or
### feature modifiactions is easy to see.
### feature modifications is easy to see.
###
### If no environmental variables are set the scritp reads the current
### If no environmental variables are set the script reads the current
### .config file. The evaluated env variables are the following:
###
### TARGET SUBTARGET ARCH PACKAGES BIN_DIR BASE_URL CHECK_INSTALLED

View File

@@ -772,7 +772,7 @@ sub writeOutFirmware {
$_->{'name'}, $filename);
}
# If the next parition is before the end of the current image, then rewind.
# If the next partition is before the end of the current image, then rewind.
elsif ($_->{'offset'} < $end_point) {
$debug and printf("Rewound %s before <%s> in \"%s\"\n",
(($end_point - $_->{'offset'}) >= $block_size ?
@@ -971,7 +971,7 @@ if (!GetOptions("d|debug" => \$debug,
print " [-b|--redboot] <file> Input/Output RedBoot filename\n";
print " [-s|--sysconf] <file> Input/Output SysConf filename\n";
print " [-L|--loader] <file> Second stage boot loader filename\n";
print " [-k|--kernel] <file> Input/Ouptut Kernel filename\n";
print " [-k|--kernel] <file> Input/Output Kernel filename\n";
print " [-r|--ramdisk] <file> Input/Output Ramdisk filename(s)\n";
print " [-f|--fisdir] <file> Input/Output FIS directory filename\n";
print " [-m|--microcode] <file> Input/Output Microcode filename\n";

View File

@@ -10,7 +10,7 @@ case "$board" in
meraki,mr24|\
wd,mybooklive|\
wd,mybooklive-duo)
ucidef_set_interface_lan "eth0"
ucidef_set_interface_lan "eth0" "dhcp"
;;
netgear,wndap620)
ucidef_add_switch "switch0" "2:lan" "5@eth0"

View File

@@ -43,7 +43,7 @@ produce a noisy warning.
hcd->msi_enabled = 1;
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1891,6 +1891,7 @@ struct xhci_hcd {
@@ -1892,6 +1892,7 @@ struct xhci_hcd {
struct xhci_hub usb2_rhub;
struct xhci_hub usb3_rhub;
/* support xHCI 1.0 spec USB2 hardware LPM */

View File

@@ -15,7 +15,7 @@
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};

View File

@@ -78,7 +78,7 @@
&wmac {
status = "okay";
qca,disable-5ghz;
ieee80211-freq-limit = <2402000 2482000>;
mtd-cal-data = <&art 0x1000>;
};

View File

@@ -207,7 +207,7 @@
compatible = "pci168c,0030";
reg = <0x0000 0 0 0 0>;
qca,no-eeprom;
qca,disable-2ghz;
ieee80211-freq-limit = <4900000 5990000>;
#gpio-cells = <2>;
gpio-controller;
};

View File

@@ -69,7 +69,7 @@
ath9k: wifi@0,0,0 {
compatible = "pci168c,0030";
reg = <0x0 0 0 0 0>;
qca,disable-5ghz;
ieee80211-freq-limit = <2402000 2482000>;
qca,no-eeprom;
#gpio-cells = <2>;
gpio-controller;
@@ -79,7 +79,7 @@
&wmac {
status = "okay";
qca,disable-2ghz;
ieee80211-freq-limit = <4900000 5990000>;
mtd-cal-data = <&art 0x1000>;
};

View File

@@ -123,7 +123,7 @@
mac-address-increment = <(-2)>;
mtd-cal-data = <&art 0x5000>;
qca,no-eeprom;
qca,disable-5ghz;
ieee80211-freq-limit = <2402000 2482000>;
#gpio-cells = <2>;
gpio-controller;
};
@@ -132,7 +132,7 @@
&wmac {
status = "okay";
qca,disable-2ghz;
ieee80211-freq-limit = <4900000 5990000>;
mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";

View File

@@ -0,0 +1,158 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qca953x.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
model = "Letv LBA-047-CH";
compatible = "letv,lba-047-ch", "qca,qca9531";
aliases {
led-boot = &led_status_red;
led-failsafe = &led_status_red;
led-running = &led_status_blue;
led-upgrade = &led_status_red;
label-mac-device = &eth0;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&led_wan_pin>;
led_status_blue: status_blue {
label = "blue:status";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_status_red: status_red {
label = "red:status";
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
};
};
virtual_flash {
compatible = "mtd-concat";
devices = <&fwconcat0 &fwconcat1>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
reg = <0x0 0x0>;
label = "firmware";
compatible = "openwrt,uimage", "denx,uimage";
openwrt,ih-magic = <IH_MAGIC_OKLI>;
};
};
};
};
&pinmux {
/* GPIO 4: LED_LINK_5 (WAN) */
led_wan_pin: pinmux_led_wan_pin {
pinctrl-single,bits = <0x04 0x0000002d 0x000000ff>;
};
};
&spi {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x40000>;
read-only;
};
partition@40000 {
label = "u-boot-env";
reg = <0x40000 0x10000>;
read-only;
};
fwconcat0: partition@50000 {
label = "fwconcat0";
reg = <0x50000 0xe30000>;
};
partition@e80000 {
label = "loader";
reg = <0xe80000 0x10000>;
};
fwconcat1: partition@e90000 {
label = "fwconcat1";
reg = <0xe90000 0x160000>;
};
art: partition@ff0000 {
label = "art";
reg = <0xff0000 0x10000>;
read-only;
};
};
};
};
&eth0 {
status = "okay";
phy-handle = <&swphy4>;
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
};
&eth1 {
compatible = "qca,qca9530-eth", "syscon", "simple-mfd";
nvmem-cells = <&macaddr_art_6>;
nvmem-cell-names = "mac-address";
};
&wmac {
status = "okay";
mtd-cal-data = <&art 0x1000>;
};
&art {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>;
};
};

View File

@@ -0,0 +1,34 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qca9557_dongwon_dw02-412h.dtsi"
/ {
model = "Dongwon T&I DW02-412H (128M)";
compatible = "dongwon,dw02-412h-128m", "qca,qca9557";
};
&nand {
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "current";
reg = <0x0 0x1000000>;
read-only;
};
partition@1000000 {
label = "kernel";
reg = <0x1000000 0x800000>;
};
partition@1800000 {
label = "ubi";
reg = <0x1800000 0x6800000>;
};
};
};

View File

@@ -0,0 +1,34 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qca9557_dongwon_dw02-412h.dtsi"
/ {
model = "Dongwon T&I DW02-412H (64M)";
compatible = "dongwon,dw02-412h-64m", "qca,qca9557";
};
&nand {
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "current";
reg = <0x0 0x1000000>;
read-only;
};
partition@1000000 {
label = "kernel";
reg = <0x1000000 0x800000>;
};
partition@1800000 {
label = "ubi";
reg = <0x1800000 0x2800000>;
};
};
};

View File

@@ -0,0 +1,175 @@
// 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>
/ {
aliases {
led-boot = &led_wan;
led-failsafe = &led_wan;
led-upgrade = &led_wan;
};
keys {
compatible = "gpio-keys";
wps {
label = "WPS button";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "Reset button";
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
led_wan: wan {
label = "green:wan";
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
wlan {
label = "green:wlan";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
};
};
&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 {
label = "log";
reg = <0x050000 0x010000>;
read-only;
};
partition@60000 {
label = "recoverk";
reg = <0x060000 0x0e0000>;
read-only;
};
partition@140000 {
label = "recoverr";
reg = <0x140000 0x090000>;
read-only;
};
partition@1d0000 {
label = "nvram";
reg = <0x1d0000 0x010000>;
read-only;
};
partition@1e0000 {
label = "nvbackup";
reg = <0x1e0000 0x010000>;
read-only;
};
art: partition@1f0000 {
label = "art";
reg = <0x1f0000 0x010000>;
read-only;
};
};
};
};
&pcie0 {
status = "okay";
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0 0 0 0 0>;
};
};
&wmac {
status = "okay";
mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
mac-address-increment = <3>;
};
&usb_phy0 {
status = "okay";
};
&usb0 {
status = "okay";
};
&mdio0 {
status = "okay";
phy0: ethernet-phy@0 {
reg = <0>;
qca,ar8327-initvals = <
0x04 0x07600000 /* PORT0 PAD MODE CTRL */
0x50 0xcf37cf37 /* LED Control Register 0 */
0x54 0x00000000 /* LED Control Register 1 */
0x58 0x00000000 /* LED Control Register 2 */
0x5c 0x0030c300 /* LED Control Register 3 */
0x7c 0x0000007e /* PORT0_STATUS */
>;
};
};
&eth0 {
status = "okay";
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
phy-handle = <&phy0>;
pll-data = <0xa6000000 0x00000101 0x00001616>;
gmac-config {
device = <&gmac>;
rgmii-enabled = <1>;
};
};
&art {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
};

View File

@@ -23,27 +23,6 @@
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
};
};
i2c: i2c {
compatible = "i2c-gpio";
sda-gpios = <&gpio 18 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
scl-gpios = <&gpio 19 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
i2c-gpio,delay-us = <5>;
i2c-gpio,timeout-ms = <1>;
};
sfp1: sfp {
compatible = "sff,sfp";
i2c-bus = <&i2c>;
maximum-power-milliwatt = <1000>;
los-gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
mod-def0-gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
tx-disable-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
// Toggling GPIO16 actually enables/disables the transmitter,
// but the SFP driver does not seem to be using it.
};
};
&pcie0 {
@@ -76,30 +55,3 @@
&usb_phy1 {
status = "okay";
};
&mdio1 {
status = "okay";
phy_sfp: ethernet-phy@0 {
reg = <0>;
phy-mode = "sgmii";
sfp = <&sfp1>;
};
};
&eth1 {
status = "okay";
phy-handle = <&phy_sfp>;
pll-data = <0x03000000 0x00000101 0x00001616>;
qca955x-sgmii-fixup;
gmac-config {
device = <&gmac>;
};
fixed-link {
speed = <1000>;
full-duplex;
};
};

View File

@@ -42,6 +42,27 @@
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
};
};
i2c: i2c {
compatible = "i2c-gpio";
sda-gpios = <&gpio 18 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
scl-gpios = <&gpio 19 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
i2c-gpio,delay-us = <5>;
i2c-gpio,timeout-ms = <1>;
};
sfp1: sfp {
compatible = "sff,sfp";
i2c-bus = <&i2c>;
maximum-power-milliwatt = <1000>;
los-gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
mod-def0-gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
tx-disable-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
// Toggling GPIO16 actually enables/disables the transmitter,
// but the SFP driver does not seem to be using it.
};
};
&mdio0 {
@@ -64,6 +85,33 @@
};
};
&mdio1 {
status = "okay";
phy_sfp: ethernet-phy@0 {
reg = <0>;
phy-mode = "sgmii";
sfp = <&sfp1>;
};
};
&eth1 {
status = "okay";
phy-handle = <&phy_sfp>;
pll-data = <0x03000000 0x00000101 0x00001616>;
qca955x-sgmii-fixup;
gmac-config {
device = <&gmac>;
};
fixed-link {
speed = <1000>;
full-duplex;
};
};
&spi {
status = "okay";

View File

@@ -307,6 +307,11 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1"
;;
letv,lba-047-ch)
ucidef_set_interface_wan "eth0"
ucidef_add_switch "switch0" \
"0@eth1" "3:lan:2" "4:lan:1"
;;
librerouter,librerouter-v1)
ucidef_add_switch "switch0" \
"0@eth0" "5:wan" "6@eth1" "4:lan"

View File

@@ -76,13 +76,13 @@ tplink,wbs510-v2)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "20"
;;
ubnt,aircube-ac|\
ubnt,aircube-isp)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "11"
;;
ubnt,nanobeam-ac-gen2|\
ubnt,nanostation-ac)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "3"
;;
ubnt,aircube-isp)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "11"
;;
ubnt,nanostation-m)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "8"
;;

View File

@@ -1443,6 +1443,21 @@ define Device/joyit_jt-or750i
endef
TARGET_DEVICES += joyit_jt-or750i
define Device/letv_lba-047-ch
$(Device/loader-okli-uimage)
SOC := qca9531
DEVICE_VENDOR := Letv
DEVICE_MODEL := LBA-047-CH
IMAGE_SIZE := 15936k
LOADER_FLASH_OFFS := 0x50000
KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49
IMAGES += factory.bin
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
append-rootfs | pad-rootfs | check-size | pad-to 14528k | \
append-loader-okli-uimage $(1) | pad-to 64k
endef
TARGET_DEVICES += letv_lba-047-ch
define Device/librerouter_librerouter-v1
SOC := qca9558
DEVICE_VENDOR := Librerouter

View File

@@ -22,7 +22,8 @@ define Device/mikrotik_routerboard-921gs-5hpacd-15s
$(Device/mikrotik_nand)
SOC := qca9558
DEVICE_MODEL := RouterBOARD 921GS-5HPacD-15s (mANTBox 15s)
DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct kmod-i2c-gpio \
kmod-sfp
SUPPORTED_DEVICES += rb-921gs-5hpacd-r2
endef
TARGET_DEVICES += mikrotik_routerboard-921gs-5hpacd-15s

View File

@@ -1,13 +1,25 @@
define Build/dw-headers
head -c 4 $@ >> $@.tmp && \
head -c 8 /dev/zero >> $@.tmp && \
tail -c +9 $@ >> $@.tmp && \
( \
header_crc="$$(head -c 68 $@.tmp | gzip -c | \
tail -c 8 | od -An -N4 -tx4 --endian little | tr -d ' \n')"; \
printf "$$(echo $$header_crc | sed 's/../\\x&/g')" | \
dd of=$@.tmp bs=4 count=1 seek=1 conv=notrunc \
)
mv $@.tmp $@
endef
# attention: only zlib compression is allowed for the boot fs
define Build/zyxel-buildkerneljffs
rm -rf $(KDIR_TMP)/zyxelnbg6716
mkdir -p $(KDIR_TMP)/zyxelnbg6716/image/boot
cp $@ $(KDIR_TMP)/zyxelnbg6716/image/boot/vmlinux.lzma.uImage
mkdir -p $@.tmp/boot
cp $@ $@.tmp/boot/vmlinux.lzma.uImage
$(STAGING_DIR_HOST)/bin/mkfs.jffs2 \
--big-endian --squash-uids -v -e 128KiB -q -f -n -x lzma -x rtime \
-o $@ \
-d $(KDIR_TMP)/zyxelnbg6716/image
rm -rf $(KDIR_TMP)/zyxelnbg6716
-d $@.tmp
rm -rf $@.tmp
endef
define Build/zyxel-factory
@@ -77,6 +89,41 @@ define Device/domywifi_dw33d
endef
TARGET_DEVICES += domywifi_dw33d
define Device/dongwon_dw02-412h
SOC := qca9557
DEVICE_VENDOR := Dongwon T&I
DEVICE_MODEL := DW02-412H
DEVICE_ALT0_VENDOR := KT
DEVICE_ALT0_MODEL := GiGA WiFi home
DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
KERNEL_SIZE := 8192k
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | dw-headers
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma | dw-headers
UBINIZE_OPTS := -E 5
IMAGES += factory.img
IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \
check-size
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
define Device/dongwon_dw02-412h-64m
$(Device/dongwon_dw02-412h)
DEVICE_VARIANT := (64M)
DEVICE_ALT0_VARIANT := (64M)
IMAGE_SIZE := 49152k
endef
TARGET_DEVICES += dongwon_dw02-412h-64m
define Device/dongwon_dw02-412h-128m
$(Device/dongwon_dw02-412h)
DEVICE_VARIANT := (128M)
DEVICE_ALT0_VARIANT := (128M)
IMAGE_SIZE := 114688k
endef
TARGET_DEVICES += dongwon_dw02-412h-128m
define Device/glinet_gl-ar300m-common-nand
SOC := qca9531
DEVICE_VENDOR := GL.iNet

View File

@@ -15,7 +15,6 @@ ath79_setup_interfaces()
"0@eth1" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
;;
mikrotik,routerboard-912uag-2hpnd|\
mikrotik,routerboard-921gs-5hpacd-15s|\
mikrotik,routerboard-lhg-2nd|\
mikrotik,routerboard-sxt-5nd-r2|\
mikrotik,routerboard-wap-g-5hact2hnd|\
@@ -38,7 +37,6 @@ ath79_setup_macs()
case "$board" in
mikrotik,routerboard-912uag-2hpnd|\
mikrotik,routerboard-921gs-5hpacd-15s|\
mikrotik,routerboard-lhg-2nd|\
mikrotik,routerboard-sxt-5nd-r2|\
mikrotik,routerboard-wap-g-5hact2hnd|\
@@ -46,6 +44,7 @@ ath79_setup_macs()
label_mac="$mac_base"
lan_mac="$mac_base"
;;
mikrotik,routerboard-921gs-5hpacd-15s|\
mikrotik,routerboard-922uags-5hpacd)
label_mac="$mac_base"
lan_mac="$mac_base"

View File

@@ -6,6 +6,10 @@ board_config_update
board=$(board_name)
case "$board" in
dongwon,dw02-412h-64m|\
dongwon,dw02-412h-128m)
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x02"
;;
glinet,gl-ar300m-nand|\
glinet,gl-ar300m-nor)
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"

View File

@@ -15,6 +15,11 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "1:wan" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth1"
;;
dongwon,dw02-412h-64m|\
dongwon,dw02-412h-128m)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:4" "3:lan:3" "4:lan:2" "5:lan:1" "1:wan"
;;
glinet,gl-ar750s-nor|\
glinet,gl-ar750s-nor-nand)
ucidef_add_switch "switch0" \
@@ -47,6 +52,11 @@ ath79_setup_macs()
local board="$1"
case "$board" in
dongwon,dw02-412h-64m|\
dongwon,dw02-412h-128m)
wan_mac=$(mtd_get_mac_binary art 0x0)
label_mac=$wan_mac
;;
netgear,wndr3700-v4|\
netgear,wndr4300|\
netgear,wndr4300sw|\

View File

@@ -13,6 +13,11 @@ case "$FIRMWARE" in
caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(mtd_get_mac_binary art 0x12)
;;
dongwon,dw02-412h-64m|\
dongwon,dw02-412h-128m)
caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 4)
;;
glinet,gl-ar750s-nor|\
glinet,gl-ar750s-nor-nand)
caldata_extract "art" 0x5000 0x844

View File

@@ -1,6 +1,6 @@
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -733,6 +733,13 @@ static int at803x_aneg_done(struct phy_d
@@ -830,6 +830,13 @@ static int at803x_aneg_done(struct phy_d
if (!(phy_read(phydev, AT803X_PSSR) & AT803X_PSSR_MR_AN_COMPLETE)) {
phydev_warn(phydev, "803x_aneg_done: SGMII link is not ok\n");
aneg_done = 0;

View File

@@ -1,90 +0,0 @@
From e47ad4978bde4920c1e1eb381531a6904025c852 Mon Sep 17 00:00:00 2001
From: Jonathan Bell <jonathan@raspberrypi.org>
Date: Thu, 11 Jul 2019 17:55:43 +0100
Subject: [PATCH] xhci: add quirk for host controllers that don't
update endpoint DCS
Seen on a VLI VL805 PCIe to USB controller. For non-stream endpoints
at least, if the xHC halts on a particular TRB due to an error then
the DCS field in the Out Endpoint Context maintained by the hardware
is not updated with the current cycle state.
Using the quirk XHCI_EP_CTX_BROKEN_DCS and instead fetch the DCS bit
from the TRB that the xHC stopped on.
See: https://github.com/raspberrypi/linux/issues/3060
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
---
drivers/usb/host/xhci-pci.c | 4 +++-
drivers/usb/host/xhci-ring.c | 26 +++++++++++++++++++++++++-
drivers/usb/host/xhci.h | 1 +
3 files changed, 29 insertions(+), 2 deletions(-)
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -276,8 +276,10 @@ static void xhci_pci_quirks(struct devic
pdev->device == 0x3432)
xhci->quirks |= XHCI_BROKEN_STREAMS;
- if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483)
+ if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) {
xhci->quirks |= XHCI_LPM_SUPPORT;
+ xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS;
+ }
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI)
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -562,7 +562,10 @@ void xhci_find_new_dequeue_state(struct
struct xhci_virt_ep *ep = &dev->eps[ep_index];
struct xhci_ring *ep_ring;
struct xhci_segment *new_seg;
+ struct xhci_segment *halted_seg = NULL;
union xhci_trb *new_deq;
+ union xhci_trb *halted_trb;
+ int index = 0;
dma_addr_t addr;
u64 hw_dequeue;
bool cycle_found = false;
@@ -600,7 +603,28 @@ void xhci_find_new_dequeue_state(struct
hw_dequeue = xhci_get_hw_deq(xhci, dev, ep_index, stream_id);
new_seg = ep_ring->deq_seg;
new_deq = ep_ring->dequeue;
- state->new_cycle_state = hw_dequeue & 0x1;
+
+ /*
+ * Quirk: xHC write-back of the DCS field in the hardware dequeue
+ * pointer is wrong - use the cycle state of the TRB pointed to by
+ * the dequeue pointer.
+ */
+ if (xhci->quirks & XHCI_EP_CTX_BROKEN_DCS &&
+ !(ep->ep_state & EP_HAS_STREAMS))
+ halted_seg = trb_in_td(xhci, cur_td->start_seg,
+ cur_td->first_trb, cur_td->last_trb,
+ hw_dequeue & ~0xf, false);
+ if (halted_seg) {
+ index = ((dma_addr_t)(hw_dequeue & ~0xf) - halted_seg->dma) /
+ sizeof(*halted_trb);
+ halted_trb = &halted_seg->trbs[index];
+ state->new_cycle_state = halted_trb->generic.field[3] & 0x1;
+ xhci_dbg(xhci, "Endpoint DCS = %d TRB index = %d cycle = %d\n",
+ (u8)(hw_dequeue & 0x1), index,
+ state->new_cycle_state);
+ } else {
+ state->new_cycle_state = hw_dequeue & 0x1;
+ }
state->stream_id = stream_id;
/*
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1884,6 +1884,7 @@ struct xhci_hcd {
#define XHCI_DISABLE_SPARSE BIT_ULL(38)
#define XHCI_SG_TRB_CACHE_SIZE_QUIRK BIT_ULL(39)
#define XHCI_NO_SOFT_RETRY BIT_ULL(40)
+#define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(41)
unsigned int num_active_eps;
unsigned int limit_active_eps;

View File

@@ -54,8 +54,8 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
@@ -1885,6 +1885,7 @@ struct xhci_hcd {
#define XHCI_SG_TRB_CACHE_SIZE_QUIRK BIT_ULL(39)
#define XHCI_NO_SOFT_RETRY BIT_ULL(40)
#define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(41)
+#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(42)
#define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(42)
+#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(43)
unsigned int num_active_eps;
unsigned int limit_active_eps;

View File

@@ -318,7 +318,7 @@ TARGET_DEVICES += luxul_xwr-3150
define Device/meraki_mr32
DEVICE_VENDOR := Meraki
DEVICE_MODEL := MR32
DEVICE_PACKAGES := $(B43) kmod-i2c-bcm-iproc kmod-i2c-gpio kmod-eeprom-at24 \
DEVICE_PACKAGES := $(B43) kmod-i2c-bcm-iproc kmod-eeprom-at24 \
kmod-leds-pwm kmod-hwmon-ina2xx kmod-bluetooth
DEVICE_DTS := bcm53016-meraki-mr32
# Meraki FW r23 tries to resize the part.safe partition before it will

View File

@@ -0,0 +1,32 @@
From beda1bbdb19baa8319ed81fa370fe0c5b91d05df Mon Sep 17 00:00:00 2001
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Tue, 26 Oct 2021 11:36:22 -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>
---
arch/arm/boot/dts/bcm5301x.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index f92089290ccd..ec5de636796e 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -408,7 +408,7 @@ uart2: serial@18008000 {
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>;
--
2.25.1

View File

@@ -0,0 +1,106 @@
From 6dba4bdfd7a30e77b848a45404b224588bf989e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Fri, 8 Oct 2021 22:59:38 +0200
Subject: [PATCH] Revert "pinctrl: bcm: ns: support updated DT binding as
syscon subnode"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit a49d784d5a8272d0f63c448fe8dc69e589db006e.
The updated binding was wrong / invalid and has been reverted. There
isn't any upstream kernel DTS using it and Broadcom isn't known to use
it neither. There is close to zero chance this will cause regression for
anyone.
Actually in-kernel bcm5301x.dtsi still uses the old good binding and so
it's broken since the driver update. This revert fixes it.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20211008205938.29925-3-zajec5@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/pinctrl/bcm/pinctrl-ns.c | 29 ++++++++++-------------------
1 file changed, 10 insertions(+), 19 deletions(-)
--- a/drivers/pinctrl/bcm/pinctrl-ns.c
+++ b/drivers/pinctrl/bcm/pinctrl-ns.c
@@ -5,7 +5,6 @@
#include <linux/err.h>
#include <linux/io.h>
-#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
@@ -13,7 +12,6 @@
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
#include <linux/platform_device.h>
-#include <linux/regmap.h>
#include <linux/slab.h>
#define FLAG_BCM4708 BIT(1)
@@ -24,8 +22,7 @@ struct ns_pinctrl {
struct device *dev;
unsigned int chipset_flag;
struct pinctrl_dev *pctldev;
- struct regmap *regmap;
- u32 offset;
+ void __iomem *base;
struct pinctrl_desc pctldesc;
struct ns_pinctrl_group *groups;
@@ -232,9 +229,9 @@ static int ns_pinctrl_set_mux(struct pin
unset |= BIT(pin_number);
}
- regmap_read(ns_pinctrl->regmap, ns_pinctrl->offset, &tmp);
+ tmp = readl(ns_pinctrl->base);
tmp &= ~unset;
- regmap_write(ns_pinctrl->regmap, ns_pinctrl->offset, tmp);
+ writel(tmp, ns_pinctrl->base);
return 0;
}
@@ -266,13 +263,13 @@ static const struct of_device_id ns_pinc
static int ns_pinctrl_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct device_node *np = dev->of_node;
const struct of_device_id *of_id;
struct ns_pinctrl *ns_pinctrl;
struct pinctrl_desc *pctldesc;
struct pinctrl_pin_desc *pin;
struct ns_pinctrl_group *group;
struct ns_pinctrl_function *function;
+ struct resource *res;
int i;
ns_pinctrl = devm_kzalloc(dev, sizeof(*ns_pinctrl), GFP_KERNEL);
@@ -290,18 +287,12 @@ static int ns_pinctrl_probe(struct platf
return -EINVAL;
ns_pinctrl->chipset_flag = (uintptr_t)of_id->data;
- ns_pinctrl->regmap = syscon_node_to_regmap(of_get_parent(np));
- if (IS_ERR(ns_pinctrl->regmap)) {
- int err = PTR_ERR(ns_pinctrl->regmap);
-
- dev_err(dev, "Failed to map pinctrl regs: %d\n", err);
-
- return err;
- }
-
- if (of_property_read_u32(np, "offset", &ns_pinctrl->offset)) {
- dev_err(dev, "Failed to get register offset\n");
- return -ENOENT;
+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
+ "cru_gpio_control");
+ ns_pinctrl->base = devm_ioremap_resource(dev, res);
+ if (IS_ERR(ns_pinctrl->base)) {
+ dev_err(dev, "Failed to map pinctrl regs\n");
+ return PTR_ERR(ns_pinctrl->base);
}
memcpy(pctldesc, &ns_pinctrl_desc, sizeof(*pctldesc));

View File

@@ -127,11 +127,11 @@ it on BCM4708 family.
/*
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1884,6 +1884,7 @@ struct xhci_hcd {
#define XHCI_DISABLE_SPARSE BIT_ULL(38)
@@ -1885,6 +1885,7 @@ struct xhci_hcd {
#define XHCI_SG_TRB_CACHE_SIZE_QUIRK BIT_ULL(39)
#define XHCI_NO_SOFT_RETRY BIT_ULL(40)
+#define XHCI_FAKE_DOORBELL BIT_ULL(41)
#define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(42)
+#define XHCI_FAKE_DOORBELL BIT_ULL(44)
unsigned int num_active_eps;
unsigned int limit_active_eps;

View File

@@ -1,33 +0,0 @@
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Subject: [PATCH] ARM: dts: BCM5301X: Update Northstar pinctrl binding
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -422,7 +422,7 @@
#size-cells = <1>;
cru@100 {
- compatible = "simple-bus";
+ compatible = "syscon", "simple-mfd";
reg = <0x100 0x1a4>;
ranges;
#address-cells = <1>;
@@ -448,10 +448,9 @@
"sata1", "sata2";
};
- pinctrl: pin-controller@1c0 {
+ pinctrl: pin-controller {
compatible = "brcm,bcm4708-pinmux";
- reg = <0x1c0 0x24>;
- reg-names = "cru_gpio_control";
+ offset = <0xc0>;
spi-pins {
groups = "spi_grp";

View File

@@ -0,0 +1,85 @@
From: Christian Lamparter <chunkeey@gmail.com>
Date: Sat, 12 Sep 2020 22:11:12 +0200
Subject: bcm53xx: Meraki MR32 use hw i2c
replace the i2c-gpio provided i2c functionality with the
hardware in the SoC. This can be activated once the
internal i2c works as well as the bit-banged i2c-gpio.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
+++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
@@ -85,40 +85,6 @@
max-brightness = <255>;
};
};
-
- i2c {
- /*
- * The platform provided I2C does not budge.
- * This is a replacement until I can figure
- * out what are the missing bits...
- */
-
- compatible = "i2c-gpio";
- sda-gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
- scl-gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
- i2c-gpio,delay-us = <10>; /* close to 100 kHz */
- #address-cells = <1>;
- #size-cells = <0>;
-
- current_sense: ina219@45 {
- compatible = "ti,ina219";
- reg = <0x45>;
- shunt-resistor = <60000>; /* = 60 mOhms */
- };
-
- eeprom: eeprom@50 {
- compatible = "atmel,24c64";
- reg = <0x50>;
- pagesize = <32>;
- read-only;
- #address-cells = <1>;
- #size-cells = <1>;
-
- mac_address: mac-address@66 {
- reg = <0x66 0x6>;
- };
- };
- };
};
&uart0 {
@@ -196,3 +168,31 @@
};
};
};
+
+&i2c0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinmux_i2c>;
+
+ clock-frequency = <100000>;
+
+ current_sense: ina219@45 {
+ compatible = "ti,ina219";
+ reg = <0x45>;
+ shunt-resistor = <60000>; /* = 60 mOhms */
+ };
+
+ eeprom: eeprom@50 {
+ compatible = "atmel,24c64";
+ reg = <0x50>;
+ pagesize = <32>;
+ read-only;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ mac_address: mac-address@66 {
+ reg = <0x66 0x6>;
+ };
+ };
+};

View File

@@ -109,7 +109,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -1095,6 +1095,13 @@ void br_vlan_notify(const struct net_bri
@@ -1093,6 +1093,13 @@ void br_vlan_notify(const struct net_bri
bool br_vlan_can_enter_range(const struct net_bridge_vlan *v_curr,
const struct net_bridge_vlan *range_end);
@@ -123,7 +123,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static inline struct net_bridge_vlan_group *br_vlan_group(
const struct net_bridge *br)
{
@@ -1252,6 +1259,19 @@ static inline int nbp_get_num_vlan_infos
@@ -1250,6 +1257,19 @@ static inline int nbp_get_num_vlan_infos
{
return 0;
}

View File

@@ -16,7 +16,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
--- a/tools/testing/selftests/netfilter/nft_flowtable.sh
+++ b/tools/testing/selftests/netfilter/nft_flowtable.sh
@@ -371,6 +371,88 @@ else
@@ -370,6 +370,88 @@ else
ip netns exec nsr1 nft list ruleset
fi

View File

@@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
#include <net/dsa.h>
#include "mt7530.h"
@@ -1540,6 +1541,109 @@ mtk_get_tag_protocol(struct dsa_switch *
@@ -1534,6 +1535,109 @@ mtk_get_tag_protocol(struct dsa_switch *
}
}
@@ -137,7 +137,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static int
mt7530_setup(struct dsa_switch *ds)
{
@@ -1681,6 +1785,12 @@ mt7530_setup(struct dsa_switch *ds)
@@ -1675,6 +1779,12 @@ mt7530_setup(struct dsa_switch *ds)
}
}

View File

@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2377,6 +2377,17 @@ static void mt753x_phylink_mac_link_up(s
@@ -2371,6 +2371,17 @@ static void mt753x_phylink_mac_link_up(s
mcr |= PMCR_RX_FC_EN;
}
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mt7530_set(priv, MT7530_PMCR_P(port), mcr);
}
@@ -2607,6 +2618,36 @@ mt753x_phy_write(struct dsa_switch *ds,
@@ -2601,6 +2612,36 @@ mt753x_phy_write(struct dsa_switch *ds,
return priv->info->phy_write(ds, port, regnum, val);
}
@@ -72,7 +72,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static const struct dsa_switch_ops mt7530_switch_ops = {
.get_tag_protocol = mtk_get_tag_protocol,
.setup = mt753x_setup,
@@ -2635,6 +2676,8 @@ static const struct dsa_switch_ops mt753
@@ -2629,6 +2670,8 @@ static const struct dsa_switch_ops mt753
.phylink_mac_an_restart = mt753x_phylink_mac_an_restart,
.phylink_mac_link_down = mt753x_phylink_mac_link_down,
.phylink_mac_link_up = mt753x_phylink_mac_link_up,

View File

@@ -1398,7 +1398,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
phy_mode = device_get_phy_mode(&pdev->dev);
@@ -635,7 +635,7 @@ void stmmac_remove_config_dt(struct plat
@@ -643,7 +643,7 @@ void stmmac_remove_config_dt(struct plat
}
#else
struct plat_stmmacenet_data *

View File

@@ -12,7 +12,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
---
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -113,6 +113,7 @@ config ARM
@@ -114,6 +114,7 @@ config ARM
select HAVE_UID16
select HAVE_VIRT_CPU_ACCOUNTING_GEN
select IRQ_FORCED_THREADING

View File

@@ -30,7 +30,7 @@
ret = read_sr(nor);
if (ret < 0) {
dev_err(nor->dev, "error while reading status register\n");
@@ -2337,7 +2344,7 @@ static const struct flash_info spi_nor_i
@@ -2338,7 +2345,7 @@ static const struct flash_info spi_nor_i
{ "mx25l1606e", INFO(0xc22015, 0, 64 * 1024, 32, SECT_4K) },
{ "mx25l3205d", INFO(0xc22016, 0, 64 * 1024, 64, SECT_4K) },
{ "mx25l3255e", INFO(0xc29e16, 0, 64 * 1024, 64, SECT_4K) },
@@ -39,7 +39,7 @@
{ "mx25u2033e", INFO(0xc22532, 0, 64 * 1024, 4, SECT_4K) },
{ "mx25u3235f", INFO(0xc22536, 0, 64 * 1024, 64,
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
@@ -5025,6 +5032,9 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -5026,6 +5033,9 @@ int spi_nor_scan(struct spi_nor *nor, co
if (info->flags & USE_CLSR)
nor->flags |= SNOR_F_USE_CLSR;

View File

@@ -0,0 +1,11 @@
--- a/drivers/mtd/spi-nor/esmt.c
+++ b/drivers/mtd/spi-nor/esmt.c
@@ -10,6 +10,8 @@
static const struct flash_info esmt_parts[] = {
/* ESMT */
+ { "f25l16pa-2s", INFO(0x8c2115, 0, 64 * 1024, 32,
+ SECT_4K | SPI_NOR_HAS_LOCK) },
{ "f25l32pa", INFO(0x8c2016, 0, 64 * 1024, 64,
SECT_4K | SPI_NOR_HAS_LOCK) },
{ "f25l32qa", INFO(0x8c4116, 0, 64 * 1024, 64,

View File

@@ -37,7 +37,7 @@ Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
if (skb == NULL)
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -1527,8 +1527,8 @@ bool nbp_switchdev_allowed_egress(const
@@ -1525,8 +1525,8 @@ bool nbp_switchdev_allowed_egress(const
int br_switchdev_set_port_flag(struct net_bridge_port *p,
unsigned long flags,
unsigned long mask);
@@ -48,7 +48,7 @@ Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
int br_switchdev_port_vlan_add(struct net_device *dev, u16 vid, u16 flags,
struct netlink_ext_ack *extack);
int br_switchdev_port_vlan_del(struct net_device *dev, u16 vid);
@@ -1574,7 +1574,8 @@ static inline int br_switchdev_port_vlan
@@ -1572,7 +1572,8 @@ static inline int br_switchdev_port_vlan
}
static inline void

View File

@@ -0,0 +1,10 @@
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -2243,6 +2243,7 @@ static const struct flash_info spi_nor_i
{ "en25s64", INFO(0x1c3817, 0, 64 * 1024, 128, SECT_4K) },
/* ESMT */
+ { "f25l16pa-2s", INFO(0x8c2115, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_HAS_LOCK) },
{ "f25l32pa", INFO(0x8c2016, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_HAS_LOCK) },
{ "f25l32qa", INFO(0x8c4116, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_HAS_LOCK) },
{ "f25l64qa", INFO(0x8c4117, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_HAS_LOCK) },

View File

@@ -19,6 +19,6 @@ DEFAULT_PACKAGES += \
kmod-leds-gpio kmod-gpio-button-hotplug swconfig \
kmod-ath10k-ct wpad-openssl uboot-envtools \
kmod-usb3 kmod-usb-dwc3 ath10k-firmware-qca4019-ct \
autocore-arm e2fsprogs
ath10k-board-qca4019 autocore-arm e2fsprogs
$(eval $(call BuildTarget))

View File

@@ -108,6 +108,14 @@ ipq40xx_setup_interfaces()
"0u@eth0" "3:lan:2" "4:lan:1"
ucidef_set_interface_wan "eth1"
;;
netgear,rbr50|\
netgear,rbs50|\
netgear,srr60|\
netgear,srs60)
ucidef_add_switch "switch0" \
"0u@eth0" "2:lan" "3:lan" "4:lan"
ucidef_set_interface_wan "eth1"
;;
qxwlan,e2600ac-c1 |\
qxwlan,e2600ac-c2)
ucidef_set_interfaces_lan_wan "eth0" "eth1"

View File

@@ -46,6 +46,13 @@ case "$FIRMWARE" in
# OEM assigns 4 sequential MACs
ath10k_patch_mac $(macaddr_setbit_la $(macaddr_add "$(cat /sys/class/net/eth0/address)" 4))
;;
netgear,rbr50|\
netgear,rbs50|\
netgear,srr60|\
netgear,srs60)
caldata_extract_mmc "0:ART" 0x9000 0x2f20
ath10k_patch_mac $(mmc_get_mac_binary ARTMTD 0x12)
;;
openmesh,a62)
caldata_extract "0:ART" 0x9000 0x2f20
;;
@@ -155,6 +162,13 @@ case "$FIRMWARE" in
caldata_extract "ART" 0x1000 0x2f20
ath10k_patch_mac $(mtd_get_mac_binary dnidata 0x0)
;;
netgear,rbr50|\
netgear,rbs50|\
netgear,srr60|\
netgear,srs60)
caldata_extract_mmc "0:ART" 0x1000 0x2f20
ath10k_patch_mac $(mmc_get_mac_binary ARTMTD 0x0)
;;
netgear,wac510)
caldata_extract "0:ART" 0x1000 0x2f20
ath10k_patch_mac $(mtd_get_mac_binary "0:MANUDATA" 0x6)
@@ -271,6 +285,13 @@ case "$FIRMWARE" in
caldata_extract "ART" 0x5000 0x2f20
ath10k_patch_mac $(mtd_get_mac_binary dnidata 0xc)
;;
netgear,rbr50|\
netgear,rbs50|\
netgear,srr60|\
netgear,srs60)
caldata_extract_mmc "0:ART" 0x5000 0x2f20
ath10k_patch_mac $(mmc_get_mac_binary ARTMTD 0xc)
;;
netgear,wac510)
caldata_extract "0:ART" 0x5000 0x2f20
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:MANUDATA" 0x6) 16)

View File

@@ -0,0 +1,76 @@
# SPDX-License-Identifier: GPL-2.0-only
. /lib/functions.sh
platform_do_upgrade_netgear_orbi_upgrade() {
command -v losetup >/dev/null || {
logger -s "Upgrade failed: 'losetup' not installed."
return 1
}
local tar_file=$1
local kernel=$2
local rootfs=$3
[ -z "$kernel" ] && kernel=$(find_mmc_part "kernel")
[ -z "$rootfs" ] && rootfs=$(find_mmc_part "rootfs")
[ -z "$kernel" ] && echo "Upgrade failed: kernel partition not found! Rebooting..." && reboot -f
[ -z "$rootfs" ] && echo "Upgrade failed: rootfs partition not found! Rebooting..." && reboot -f
netgear_orbi_do_flash $tar_file $kernel $rootfs
echo "sysupgrade successful"
umount -a
reboot -f
}
netgear_orbi_do_flash() {
local tar_file=$1
local kernel=$2
local rootfs=$3
# keep sure its unbound
losetup --detach-all || {
echo "Failed to detach all loop devices. Skip this try."
reboot -f
}
# use the first found directory in the tar archive
local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
board_dir=${board_dir%/}
echo "flashing kernel to $kernel"
tar xf $tar_file ${board_dir}/kernel -O >$kernel
echo "flashing rootfs to ${rootfs}"
tar xf $tar_file ${board_dir}/root -O >"${rootfs}"
# a padded rootfs is needed for overlay fs creation
local offset=$(tar xf $tar_file ${board_dir}/root -O | wc -c)
[ $offset -lt 65536 ] && {
echo "Wrong size for rootfs: $offset"
sleep 10
reboot -f
}
# Mount loop for rootfs_data
local loopdev="$(losetup -f)"
losetup -o $offset $loopdev $rootfs || {
echo "Failed to mount looped rootfs_data."
sleep 10
reboot -f
}
echo "Format new rootfs_data at position ${offset}."
mkfs.ext4 -F -L rootfs_data $loopdev
mkdir /tmp/new_root
mount -t ext4 $loopdev /tmp/new_root && {
echo "Saving config to rootfs_data at position ${offset}."
cp -v "$UPGRADE_BACKUP" "/tmp/new_root/$BACKUP_FILE"
umount /tmp/new_root
}
# Cleanup
losetup -d $loopdev >/dev/null 2>&1
sync
}

View File

@@ -119,6 +119,12 @@ platform_do_upgrade() {
[ "$(rootfs_type)" = "tmpfs" ] && mtd erase firmware
default_do_upgrade "$1"
;;
netgear,rbr50 |\
netgear,rbs50 |\
netgear,srr60 |\
netgear,srs60)
platform_do_upgrade_netgear_orbi_upgrade "$1"
;;
openmesh,a42 |\
openmesh,a62 |\
plasmacloud,pa1200 |\

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