Merge branch 'main' into main

This commit is contained in:
Mark Trevor Birss 2024-12-22 21:24:08 +02:00 committed by GitHub
commit 735ae0a69e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 749 additions and 34 deletions

View File

@ -107,6 +107,7 @@ glinet,gl-mt3000)
;;
mercusys,mr90x-v1|\
routerich,ax3000|\
tenbay,wr3000k|\
tplink,re6000xd)
local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
ubootenv_add_uci_config "$envdev" "0x0" "0x20000" "0x20000" "1"

View File

@ -69,6 +69,15 @@ define Package/mt7922bt-firmware/install
endef
$(eval $(call BuildPackage,mt7922bt-firmware))
Package/mt7925bt-firmware = $(call Package/firmware-default,mt7925bt firmware,,LICENCE.mediatek)
define Package/mt7925bt-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7925
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/mediatek/mt7925/BT_RAM_CODE_MT7925_1_1_hdr.bin \
$(1)/lib/firmware/mediatek/mt7925
endef
$(eval $(call BuildPackage,mt7925bt-firmware))
Package/mt7981-wo-firmware = $(call Package/firmware-default,MT7981 offload firmware,,LICENCE.mediatek)
define Package/mt7981-wo-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/mediatek

View File

@ -366,6 +366,26 @@ endef
$(eval $(call KernelPackage,crypto-hmac))
define KernelPackage/crypto-hw-atmel
TITLE:=Microchip / Atmel ECC/SHA/RNG hw accelerator
DEPENDS:=+kmod-i2c-core +kmod-crypto-ecdh +kmod-crypto-sha1 \
+kmod-crypto-sha256 +kmod-lib-crc16 +kmod-random-core
KCONFIG:= \
CONFIG_CRYPTO_HW=y \
CONFIG_CRYPTO_DEV_ATMEL_I2C \
CONFIG_CRYPTO_DEV_ATMEL_ECC \
CONFIG_CRYPTO_DEV_ATMEL_SHA204A
FILES:= \
$(LINUX_DIR)/drivers/crypto/atmel-i2c.ko \
$(LINUX_DIR)/drivers/crypto/atmel-ecc.ko \
$(LINUX_DIR)/drivers/crypto/atmel-sha204a.ko
AUTOLOAD:=$(call AutoLoad,09,atmel-i2c atmel-ecc atmel-sha204a)
$(call AddDepends/crypto)
endef
$(eval $(call KernelPackage,crypto-hw-atmel))
define KernelPackage/crypto-hw-ccp
TITLE:=AMD Cryptographic Coprocessor
DEPENDS:= \

View File

@ -1525,6 +1525,28 @@ endef
$(eval $(call KernelPackage,bnx2x))
define KernelPackage/bnxt-en
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Broadcom NetXtreme-C/E network driver
DEPENDS:=@PCI_SUPPORT +kmod-hwmon-core +kmod-lib-crc32c +kmod-mdio +kmod-ptp
FILES:=$(LINUX_DIR)/drivers/net/ethernet/broadcom/bnxt/bnxt_en.ko
KCONFIG:= \
CONFIG_BNXT \
CONFIG_BNXT_SRIOV=y \
CONFIG_BNXT_FLOWER_OFFLOAD=y \
CONFIG_BNXT_DCB=n \
CONFIG_BNXT_HWMON=y
AUTOLOAD:=$(call AutoProbe,bnxt_en)
endef
define KernelPackage/bnxt-en/description
Supports Broadcom NetXtreme-C/E based Ethernet NICs including:
* BCM573xx
* BCM574xx
endef
$(eval $(call KernelPackage,bnxt-en))
define KernelPackage/be2net
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Broadcom Emulex OneConnect 10Gbps NIC

View File

@ -0,0 +1,87 @@
From 113fb8a8d1f27156f58b27ce0fc02af9b3705bf7 Mon Sep 17 00:00:00 2001
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Sun, 22 Dec 2024 11:02:39 +0100
Subject: [PATCH] netfilter: nft_set_hash: unaligned atomic read on struct
nft_set_ext
Access to genmask field in struct nft_set_ext results in unaligned
atomic read:
[ 72.130109] Unable to handle kernel paging request at virtual address ffff0000c2bb708c
[ 72.131036] Mem abort info:
[ 72.131213] ESR = 0x0000000096000021
[ 72.131446] EC = 0x25: DABT (current EL), IL = 32 bits
[ 72.132209] SET = 0, FnV = 0
[ 72.133216] EA = 0, S1PTW = 0
[ 72.134080] FSC = 0x21: alignment fault
[ 72.135593] Data abort info:
[ 72.137194] ISV = 0, ISS = 0x00000021, ISS2 = 0x00000000
[ 72.142351] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[ 72.145989] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[ 72.150115] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000237d27000
[ 72.154893] [ffff0000c2bb708c] pgd=0000000000000000, p4d=180000023ffff403, pud=180000023f84b403, pmd=180000023f835403,
+pte=0068000102bb7707
[ 72.163021] Internal error: Oops: 0000000096000021 [#1] SMP
[...]
[ 72.170041] CPU: 7 UID: 0 PID: 54 Comm: kworker/7:0 Tainted: G E 6.13.0-rc3+ #2
[ 72.170509] Tainted: [E]=UNSIGNED_MODULE
[ 72.170720] Hardware name: QEMU QEMU Virtual Machine, BIOS edk2-stable202302-for-qemu 03/01/2023
[ 72.171192] Workqueue: events_power_efficient nft_rhash_gc [nf_tables]
[ 72.171552] pstate: 21400005 (nzCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
[ 72.171915] pc : nft_rhash_gc+0x200/0x2d8 [nf_tables]
[ 72.172166] lr : nft_rhash_gc+0x128/0x2d8 [nf_tables]
[ 72.172546] sp : ffff800081f2bce0
[ 72.172724] x29: ffff800081f2bd40 x28: ffff0000c2bb708c x27: 0000000000000038
[ 72.173078] x26: ffff0000c6780ef0 x25: ffff0000c643df00 x24: ffff0000c6778f78
[ 72.173431] x23: 000000000000001a x22: ffff0000c4b1f000 x21: ffff0000c6780f78
[ 72.173782] x20: ffff0000c2bb70dc x19: ffff0000c2bb7080 x18: 0000000000000000
[ 72.174135] x17: ffff0000c0a4e1c0 x16: 0000000000003000 x15: 0000ac26d173b978
[ 72.174485] x14: ffffffffffffffff x13: 0000000000000030 x12: ffff0000c6780ef0
[ 72.174841] x11: 0000000000000000 x10: ffff800081f2bcf8 x9 : ffff0000c3000000
[ 72.175193] x8 : 00000000000004be x7 : 0000000000000000 x6 : 0000000000000000
[ 72.175544] x5 : 0000000000000040 x4 : ffff0000c3000010 x3 : 0000000000000000
[ 72.175871] x2 : 0000000000003a98 x1 : ffff0000c2bb708c x0 : 0000000000000004
[ 72.176207] Call trace:
[ 72.176316] nft_rhash_gc+0x200/0x2d8 [nf_tables] (P)
[ 72.176653] process_one_work+0x178/0x3d0
[ 72.176831] worker_thread+0x200/0x3f0
[ 72.176995] kthread+0xe8/0xf8
[ 72.177130] ret_from_fork+0x10/0x20
[ 72.177289] Code: 54fff984 d503201f d2800080 91003261 (f820303f)
[ 72.177557] ---[ end trace 0000000000000000 ]---
Align struct nft_set_ext to word size to address this and
documentation it.
pahole reports that this increases the size of elements for rhash and
pipapo in 8 bytes on x86_64.
Fixes: 7ffc7481153b ("netfilter: nft_set_hash: skip duplicated elements pending gc run")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
include/net/netfilter/nf_tables.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -721,15 +721,18 @@ struct nft_set_ext_tmpl {
/**
* struct nft_set_ext - set extensions
*
- * @genmask: generation mask
+ * @genmask: generation mask, but also flags (see NFT_SET_ELEM_DEAD_BIT)
* @offset: offsets of individual extension types
* @data: beginning of extension data
+ *
+ * This structure must be aligned to word size, otherwise atomic bitops
+ * on genmask field can cause aligment failure on some archs.
*/
struct nft_set_ext {
u8 genmask;
u8 offset[NFT_SET_EXT_NUM];
char data[];
-};
+} __aligned(BITS_PER_LONG / 8);
static inline void nft_set_ext_prepare(struct nft_set_ext_tmpl *tmpl)
{

View File

@ -2,7 +2,8 @@ set_preinit_iface() {
case $(board_name) in
cudy,m3000-v1|\
cudy,tr3000-v1|\
glinet,gl-mt3000)
glinet,gl-mt3000|\
openembed,som7981)
ip link set eth1 up
ifname=eth1
;;

View File

@ -0,0 +1,218 @@
// SPDX-License-Identifier: GPL-2.0-only OR MIT
/dts-v1/;
#include "mt7981.dtsi"
/ {
model = "Cudy AP3000 v1";
compatible = "cudy,ap3000-v1", "mediatek,mt7981";
aliases {
label-mac-device = &gmac0;
led-boot = &status_led;
led-failsafe = &status_led;
led-running = &status_led;
led-upgrade = &status_led;
serial0 = &uart0;
};
chosen {
stdout-path = "serial0:115200n8";
};
gpio-keys {
compatible = "gpio-keys";
button-reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
};
};
gpio-leds {
compatible = "gpio-leds";
led-0 {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_WLAN_2GHZ;
gpios = <&pio 4 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
led-1 {
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_WLAN_5GHZ;
gpios = <&pio 10 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
status_led: led-2 {
color = <LED_COLOR_ID_AMBER>;
function = LED_FUNCTION_STATUS;
gpios = <&pio 11 GPIO_ACTIVE_LOW>;
};
};
watchdog {
compatible = "linux,wdt-gpio";
gpios = <&pio 6 GPIO_ACTIVE_HIGH>;
hw_algo = "level";
hw_margin_ms = <10000>;
always-running;
};
};
&uart0 {
status = "okay";
};
&watchdog {
status = "okay";
};
&eth {
pinctrl-names = "default";
pinctrl-0 = <&mdio_pins>;
status = "okay";
gmac0: mac@0 {
compatible = "mediatek,eth-mac";
reg = <0>;
phy-handle = <&phy1>;
phy-mode = "2500base-x";
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_bdinfo_de00 0>;
};
};
&mdio_bus {
phy1: phy@1 {
reg = <1>;
interrupt-parent = <&pio>;
interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&pio 39 GPIO_ACTIVE_LOW>;
reset-assert-us = <100000>;
reset-deassert-us = <100000>;
};
};
&pio {
spi0_flash_pins: spi0-pins {
mux {
function = "spi";
groups = "spi0", "spi0_wp_hold";
};
conf-pu {
pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
drive-strength = <MTK_DRIVE_8mA>;
bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
};
conf-pd {
pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
drive-strength = <MTK_DRIVE_8mA>;
bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
};
};
};
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_flash_pins>;
status = "okay";
/* ESMT F50L2G41XA (256M) */
spi_nand@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <52000000>;
spi-tx-buswidth = <4>;
spi-rx-buswidth = <4>;
spi-cal-enable;
spi-cal-mode = "read-data";
spi-cal-datalen = <7>;
spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4e 0x41 0x4e 0x44>;
spi-cal-addrlen = <5>;
spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
mediatek,nmbm;
mediatek,bmt-max-ratio = <1>;
mediatek,bmt-max-reserved-blocks = <64>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "bl2";
reg = <0x0 0x100000>;
read-only;
};
partition@100000 {
label = "u-boot-env";
reg = <0x100000 0x80000>;
};
partition@180000 {
label = "factory";
reg = <0x180000 0x200000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x1000>;
};
};
};
partition@380000 {
label = "bdinfo";
reg = <0x380000 0x40000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_bdinfo_de00: macaddr@de00 {
compatible = "mac-base";
reg = <0xde00 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
partition@3C0000 {
label = "fip";
reg = <0x3C0000 0x200000>;
read-only;
};
partition@5C0000 {
label = "ubi";
reg = <0x5C0000 0x4000000>;
};
};
};
};
&wifi {
nvmem-cell-names = "eeprom";
nvmem-cells = <&eeprom_factory_0>;
status = "okay";
};

View File

@ -12,9 +12,10 @@
compatible = "openembed,som7981", "mediatek,mt7981";
aliases {
led-boot = &wlan2g_led;
led-failsafe = &wlan2g_led;
led-upgrade = &wlan2g_led;
led-boot = &act_led;
led-failsafe = &act_led;
led-running = &act_led;
led-upgrade = &act_led;
serial0 = &uart0;
};
@ -26,6 +27,11 @@
reg = <0 0x40000000 0 0x40000000>;
};
beeper {
compatible = "gpio-beeper";
gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
};
gpio-keys {
compatible = "gpio-keys";
@ -34,12 +40,6 @@
linux,code = <KEY_RESTART>;
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
};
button-wps {
label = "wps";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&pio 0 GPIO_ACTIVE_LOW>;
};
};
gpio-leds {
@ -47,28 +47,27 @@
led-0 {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_AMBER>;
color = <LED_COLOR_ID_GREEN>;
gpios = <&pio 8 GPIO_ACTIVE_LOW>;
};
led-1 {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_GREEN>;
color = <LED_COLOR_ID_AMBER>;
gpios = <&pio 13 GPIO_ACTIVE_LOW>;
};
wlan2g_led: led-2 {
function = LED_FUNCTION_WLAN_2GHZ;
color = <LED_COLOR_ID_RED>;
led-2 {
function = LED_FUNCTION_PANIC;
color = <LED_COLOR_ID_GREEN>;
gpios = <&pio 34 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
panic-indicator;
};
led-3 {
function = LED_FUNCTION_WLAN_5GHZ;
act_led: led-3 {
function = LED_FUNCTION_ACTIVITY;
color = <LED_COLOR_ID_RED>;
gpios = <&pio 35 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
};
@ -97,14 +96,38 @@
};
};
&i2c0 {
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
status = "okay";
eeprom@50 {
compatible = "atmel,24c64";
reg = <0x50>;
page-size = <32>;
};
rtc@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
#clock-cells = <0>;
};
crypto@60 {
compatible = "atmel,atecc508a";
reg = <0x60>;
};
};
&mdio_bus {
phy0: ethernet-phy@5 {
reg = <5>;
compatible = "ethernet-phy-ieee802.3-c45";
phy-mode = "2500base-x";
reset-gpios = <&pio 14 GPIO_ACTIVE_LOW>;
reset-assert-us = <10000>;
reset-deassert-us = <50000>;
reset-assert-us = <15000>;
reset-deassert-us = <68000>;
realtek,aldps-enable;
};
};
@ -184,6 +207,13 @@
};
&pio {
i2c0_pins: i2c0-pins {
mux {
function = "i2c";
groups = "i2c0_1";
};
};
spi0_flash_pins: spi0-pins {
mux {
function = "spi";
@ -202,12 +232,45 @@
mediatek,pull-down-adv = <0>;
};
};
uart1_pins: uart1-pins {
mux {
function = "uart";
groups = "uart1_3";
};
};
uart2_pins: uart2-pins {
mux {
function = "uart";
groups = "uart2_0_tx_rx";
};
};
wwan_rst_h: wwan-rst-h {
pins = "GPIO_WPS";
drive-strength = <8>;
mediatek,pull-down-adv = <0>;
output-low;
};
};
&uart0 {
status = "okay";
};
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>;
status = "okay";
};
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&uart2_pins>;
status = "okay";
};
&usb_phy {
status = "okay";
};
@ -220,8 +283,16 @@
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
status = "okay";
band@1 {
reg = <1>;
nvmem-cells = <&macaddr_factory_a 0>;
nvmem-cell-names = "mac-address";
};
};
&xhci {
pinctrl-names = "default";
pinctrl-0 = <&wwan_rst_h>;
status = "okay";
};

View File

@ -0,0 +1,249 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/dts-v1/;
#include "mt7981.dtsi"
/ {
model = "Tenbay WR3000K";
compatible = "tenbay,wr3000k", "mediatek,mt7981";
aliases {
led-boot = &led_run;
led-failsafe = &led_blue;
led-running = &led_green;
led-upgrade = &led_blue;
serial0 = &uart0;
label-mac-device = &wan;
};
chosen {
stdout-path = "serial0:115200n8";
};
gpio-keys {
compatible = "gpio-keys";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
};
wps {
label = "wps";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&pio 0 GPIO_ACTIVE_LOW>;
};
};
leds {
compatible = "gpio-leds";
led_run: led-0 {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_STATUS;
gpios = <&pio 10 GPIO_ACTIVE_LOW>;
};
led_green: led-1 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_STATUS;
gpios = <&pio 11 GPIO_ACTIVE_LOW>;
};
led_blue: led-2 {
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_STATUS;
gpios = <&pio 12 GPIO_ACTIVE_LOW>;
};
};
};
&uart0 {
status = "okay";
};
&watchdog {
status = "okay";
};
&eth {
pinctrl-names = "default";
pinctrl-0 = <&mdio_pins>;
status = "okay";
gmac0: mac@0 {
compatible = "mediatek,eth-mac";
reg = <0>;
phy-mode = "2500base-x";
nvmem-cells = <&macaddr_factory_4 (-1)>;
nvmem-cell-names = "mac-address";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
};
&mdio_bus {
switch: switch@1f {
compatible = "mediatek,mt7531";
reg = <31>;
reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&pio>;
interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
};
};
&switch {
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
label = "lan1";
};
port@1 {
reg = <1>;
label = "lan2";
};
port@2 {
reg = <2>;
label = "lan3";
};
wan: port@3 {
reg = <3>;
label = "wan";
nvmem-cells = <&macaddr_factory_4 (-2)>;
nvmem-cell-names = "mac-address";
};
port@6 {
reg = <6>;
ethernet = <&gmac0>;
phy-mode = "2500base-x";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
};
};
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_flash_pins>;
status = "okay";
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <52000000>;
spi-cal-enable;
spi-cal-mode = "read-data";
spi-cal-datalen = <7>;
spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
spi-cal-addrlen = <5>;
spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
mediatek,nmbm;
mediatek,bmt-max-ratio = <1>;
mediatek,bmt-max-reserved-blocks = <64>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "BL2";
reg = <0x00000 0x0100000>;
read-only;
};
partition@100000 {
label = "u-boot-env";
reg = <0x0100000 0x0080000>;
};
factory: partition@180000 {
label = "Factory";
reg = <0x180000 0x0200000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x1000>;
};
macaddr_factory_4: macaddr@4 {
compatible = "mac-base";
reg = <0x4 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
partition@380000 {
label = "FIP";
reg = <0x380000 0x0200000>;
read-only;
};
partition@580000 {
label = "ubi";
compatible = "linux,ubi";
reg = <0x580000 0x3000000>;
};
partition@3580000 {
label = "ubi1";
reg = <0x3580000 0x3000000>;
};
partition@6580000 {
label = "Product";
reg = <0x6580000 0x0020000>; // 128 KB
};
partition@65a0000 {
label = "Custom";
reg = <0x65a0000 0x1000000>; // 16 MB
};
};
};
};
&pio {
spi0_flash_pins: spi0-pins {
mux {
function = "spi";
groups = "spi0", "spi0_wp_hold";
};
};
};
&wifi {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
status = "okay";
};

View File

@ -71,8 +71,8 @@ nradio,c8-668gl)
ucidef_set_led_netdev "5g" "5G" "blue:indicator-0" "eth1" "link"
;;
openembed,som7981)
ucidef_set_led_netdev "lanact" "LANACT" "green:lan" "eth1" "rx tx"
ucidef_set_led_netdev "lanlink" "LANLINK" "amber:lan" "eth1" "link"
ucidef_set_led_netdev "lanact" "LANACT" "amber:lan" "eth1" "rx tx"
ucidef_set_led_netdev "lanlink" "LANLINK" "green:lan" "eth1" "link"
;;
openwrt,one)
ucidef_set_led_netdev "wanact" "WANACT" "mdio-bus:0f:green:wan" "eth0" "rx tx"

View File

@ -36,7 +36,8 @@ mediatek_setup_interfaces()
keenetic,kn-3811|\
qihoo,360t7|\
routerich,ax3000|\
routerich,ax3000-ubootmod)
routerich,ax3000-ubootmod|\
tenbay,wr3000k)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" wan
;;
asus,tuf-ax4200|\
@ -75,6 +76,7 @@ mediatek_setup_interfaces()
ucidef_set_interfaces_lan_wan "lan1" eth1
;;
cudy,ap3000outdoor-v1|\
cudy,ap3000-v1|\
cudy,re3000-v1|\
netgear,wax220|\
ubnt,unifi-6-plus|\

View File

@ -73,14 +73,11 @@ case "$board" in
addr=$(mtd_get_mac_binary "Factory" 0x8000)
[ "$PHYNBR" = "1" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
;;
cudy,tr3000-v1|\
cudy,re3000-v1)
addr=$(mtd_get_mac_binary bdinfo 0xde00)
[ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_setbit_la $(macaddr_add $addr 1) > /sys${DEVPATH}/macaddress
;;
cudy,ap3000outdoor-v1|\
cudy,ap3000-v1|\
cudy,m3000-v1|\
cudy,re3000-v1|\
cudy,tr3000-v1|\
cudy,wr3000s-v1|\
cudy,wr3000-v1)
addr=$(mtd_get_mac_binary bdinfo 0xde00)
@ -141,9 +138,6 @@ case "$board" in
[ "$PHYNBR" = "0" ] && echo "$hw_mac_addr" > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_setbit_la $hw_mac_addr > /sys${DEVPATH}/macaddress
;;
openembed,som7981)
[ "$PHYNBR" = "1" ] && cat /sys/class/net/eth0/address > /sys${DEVPATH}/macaddress
;;
qihoo,360t7)
addr=$(mtd_get_mac_ascii factory lanMac)
[ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress

View File

@ -594,6 +594,23 @@ define Device/cudy_ap3000outdoor-v1
endef
TARGET_DEVICES += cudy_ap3000outdoor-v1
define Device/cudy_ap3000-v1
DEVICE_VENDOR := Cudy
DEVICE_MODEL := AP3000
DEVICE_VARIANT := v1
DEVICE_DTS := mt7981b-cudy-ap3000-v1
DEVICE_DTS_DIR := ../dts
SUPPORTED_DEVICES += R49
UBINIZE_OPTS := -E 5
BLOCKSIZE := 128k
PAGESIZE := 2048
IMAGE_SIZE := 65536k
KERNEL_IN_UBI := 1
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware
endef
TARGET_DEVICES += cudy_ap3000-v1
define Device/cudy_m3000-v1
DEVICE_VENDOR := Cudy
DEVICE_MODEL := M3000
@ -1215,7 +1232,10 @@ define Device/openembed_som7981
DEVICE_MODEL := SOM7981
DEVICE_DTS := mt7981b-openembed-som7981
DEVICE_DTS_DIR := ../dts
DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3
DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware \
kmod-crypto-hw-atmel kmod-eeprom-at24 kmod-gpio-beeper kmod-rtc-pcf8563 \
kmod-usb-net-cdc-mbim kmod-usb-net-qmi-wwan kmod-usb-serial-option \
kmod-usb3 uqmi
UBINIZE_OPTS := -E 5
BLOCKSIZE := 128k
PAGESIZE := 2048
@ -1349,6 +1369,27 @@ define Device/ruijie_rg-x60-pro
endef
TARGET_DEVICES += ruijie_rg-x60-pro
define Device/tenbay_wr3000k
DEVICE_VENDOR := Tenbay
DEVICE_MODEL := WR3000K
DEVICE_DTS := mt7981b-tenbay-wr3000k
DEVICE_DTS_DIR := ../dts
DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware
UBINIZE_OPTS := -E 5
BLOCKSIZE := 128k
PAGESIZE := 2048
IMAGE_SIZE := 49152k
KERNEL_IN_UBI := 1
IMAGES += factory.bin
IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
KERNEL = kernel-bin | lzma | \
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
KERNEL_INITRAMFS = kernel-bin | lzma | \
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd
endef
TARGET_DEVICES += tenbay_wr3000k
define Device/tplink_re6000xd
DEVICE_VENDOR := TP-Link
DEVICE_MODEL := RE6000XD