]> git.ipfire.org Git - thirdparty/openwrt.git/log
thirdparty/openwrt.git
4 months agomediatek: filogic: add build for ASUS ZenWiFi BT8 with OpenWrt's U-Boot 18243/head
Daniel Golle [Thu, 13 Mar 2025 22:22:39 +0000 (22:22 +0000)] 
mediatek: filogic: add build for ASUS ZenWiFi BT8 with OpenWrt's U-Boot

Add 'ubootmod' variant for the ASUS ZenWiFi BT8.
An out-of-tree installer will be provided in Github to allow users an easy
transition from the stock loader to OpenWrt's bootchain which is built from
source.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agouboot-envtools: add support for ASUS ZenWiFi BT8 (ubootmod)
Daniel Golle [Thu, 20 Feb 2025 02:40:56 +0000 (02:40 +0000)] 
uboot-envtools: add support for ASUS ZenWiFi BT8 (ubootmod)

We are using a replacement bootchain on that device, so add default UBI
environment settings.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agouboot-mediatek: add ASUS ZenWiFi BT8 support
John Crispin [Fri, 17 Jan 2025 10:25:52 +0000 (11:25 +0100)] 
uboot-mediatek: add ASUS ZenWiFi BT8 support

Add U-Boot build for the ASUS ZenWiFi BT8 intended to replace the
stock loader.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agoarm-trusted-firmware-mediatek: add MT7988 BL2 DDR4 images
John Crispin [Fri, 17 Jan 2025 10:25:18 +0000 (11:25 +0100)] 
arm-trusted-firmware-mediatek: add MT7988 BL2 DDR4 images

Other than most boards with DDR4 the ASUS ZenWiFi BT8 cannot use the
"comb" DDR calibration option and needs only the "ddr4" option set
instead.

Build TF-A SPIM-NAND with UBI as well as to boot from RAM with
mtk_uartboot for MT7988 with DDR4 RAM.

Signed-off-by: John Crispin <john@phrozen.org>
4 months agomediatek: filogic: prepare for ubootmod build of ASUS ZenWiFi BT8
Daniel Golle [Thu, 13 Mar 2025 22:10:40 +0000 (22:10 +0000)] 
mediatek: filogic: prepare for ubootmod build of ASUS ZenWiFi BT8

Break out all flash-layout dependent parts from device tree into separate
dtsi file to be used by both, stock layout and upcoming ubootmod variant.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agomediatek: filogic: add Asus ZenWiFi BT8
John Crispin [Fri, 17 Jan 2025 10:36:17 +0000 (11:36 +0100)] 
mediatek: filogic: add Asus ZenWiFi BT8

Hardware
--------
MediaTek MT7988D SoC (3x Cortex-A73 @1.8 GHz max)
1GB DDR4 RAM
128MB SPI-NAND (Winbond)
MediaTek MT7996 BE14000 Tri-Band Wi-Fi 7
3x LAN (2x 1GE MT7988 built-in, 1x 2.5GE MaxLinear GPY211C)
1x WAN (2.5GE MT7988 built-in)
LED: RGB PWM (supported as 3x PWM LED)
USB: 1x USB 3
Buttons: RESET, WPS
UART: 115200 8N1 3.3V

Installation
------------
1. Hold down RESET button and power on the device until
   LED pulses red.

2. Assign IP 192.168.1.70/24 to your computer's Ethernet port

3. Connect Ethernet to one of the 1GE LAN ports

4. Open browser and visit http://192.168.1.1

5. Upload openwrt-mediatek-filogic-asus_zenwifi-bt8-factory.bin

6. Once OpenWrt initramfs system comes up, do sysupgrade using
   openwrt-mediatek-filogic-asus_zenwifi-bt8-squashfs-sysupgrade.bin

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agoRevert "tools/libressl: update to 4.0.0"
Robert Marko [Sat, 29 Mar 2025 18:23:15 +0000 (19:23 +0100)] 
Revert "tools/libressl: update to 4.0.0"

This reverts commit 21cece29e9eebc397eadee259e60c7fc44828cce.

Unfortunately, LibreSSL 4.0 causes the host APK tools to segfault under
fakeroot when .apk is being generated and it is completely breaking
building under Debian and Ubuntu hosts.

So, until this is fixed lets revert the update.

Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agokernel: move accepted patch from pending-6.6 to backport-6.6
Rui Salvaterra [Fri, 28 Mar 2025 16:00:39 +0000 (16:00 +0000)] 
kernel: move accepted patch from pending-6.6 to backport-6.6

792-igc-enable-HW-vlan-tag-insertion-stripping-by-defaul.patch has been
accepted for Linux 6.16.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
4 months agogeneric: fitblk: close block device if mapping image failed
Daniel Golle [Fri, 28 Mar 2025 15:40:28 +0000 (15:40 +0000)] 
generic: fitblk: close block device if mapping image failed

In case a broken fit image is present on flash the fitblk driver would
not map any /dev/fit* devices, but also not always close the block device
the image resides on. In case of ubiblock devices this is fatal as one
then cannot remove the ubiblock device (-EBUSY), and hence cannot replace
the broken image.
Always close the block device in case no sub-image was mapped.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agotools/libressl: update to 4.0.0 16901/head
Rosen Penev [Thu, 7 Nov 2024 23:04:28 +0000 (15:04 -0800)] 
tools/libressl: update to 4.0.0

Stable version. Odd versions are betas.

Added static patch to rename some ecdsa symbols that conflict with
u-boot's mkimage.

These symbols are not exported by default but because OpenWrt uses a
static libressl, they are present and conflict with mkimage's libecdsa.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16901
Signed-off-by: Nick Hainke <vincent@systemli.org>
4 months agoqualcommax: ipq60xx: add Linksys MR7500 support 18185/head
Weikai Kong [Sat, 21 Dec 2024 23:49:15 +0000 (18:49 -0500)] 
qualcommax: ipq60xx: add Linksys MR7500 support

Codename: Divo

Hardware specification:
========
SoC: Qualcomm IPQ6018
RAM: 512MB (2x ESMT 256MB DDR3L M15T2G16128A–DEBG2R)
NAND Flash: 512MB (Macronix MX30UF4G18AC or SK Hynix H27S4G8F2EDA-BC)
Ethernet: 1x 10/100/1000/2500/5000Mbps (Marvell AQR114C-B0)
Ethernet: 4x 10/100/1000Mbps (Qualcomm QCA8075)
WiFi1: 6GHz ax 4x4@20/40/160 MHz (Qualcomm QCN9024 + Skyworks SKY85784-11) - channels 33-229
WiFi2: 5GHz ax 2x2@20/40/80 MHz (Qualcomm QCN5052 + Skyworks SKY85755-11) - channels 36-177
WiFi3: 2.4GHz ax 2x2@20/40 MHz (Qualcomm QCN5022 + Skyworks SKY8340-11)
IoT: Bluetooth 5 (CSR8811) - not implemented
LED: 1x RGB status + USB Blue (PWM)
USB: 1x USB 3.0
Button: WPS, Reset

Flash instructions (Without Serial):
========
Open Linksys Web UI - http://192.168.1.1/ca or http://linksysxxxxx.lan/ca depending on your setup.
  xxxxx is the last 5 digits from the SN found on a sticker under the device.
Click on the Linksys Logo to by-pass smart app registration.
Login with your admin password. The default password can be found on the same sticker.
To enter into the support mode, click on the “CA” link and the bottom of the page.
Open the “Connectivity” menu and upload the squash-factory image with the “Choose file” button.
Click start. Ignore all the prompts and warnings by click “yes” in all the popups.

Flash instructions (With Serial):
========
1. Installation using serial connection from OEM firmware (default login: root, password: admin):
- fw_printenv -n boot_part
In case of 2:
- flash_erase /dev/mtd13 0 0
- nandwrite -p /dev/mtd13 openwrt-qualcommax-ipq60xx-linksys_mr7500-squashfs-factory.bin
or in case of 1:
- flash_erase /dev/mtd15 0 0
- nandwrite -p /dev/mtd15 openwrt-qualcommax-ipq60xx-linksys_mr7500-squashfs-factory.bin
After first boot install firmware on second partition:
- mtd -r -e kernel -n write openwrt-qualcommax-ipq60xx-linksys_mr7500-squashfs-factory.bin kernel
or:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq60xx-linksys_mr7500-squashfs-factory.bin alt_kernel

2. Installation from initramfs image using USB drive:
Put the initramfs image on the USB drive:
- dd bs=1M if=openwrt-qualcommax-ipq60xx-linksys_mr7500-initramfs-uImage.itb of=/dev/sda
Stop u-boot and run:
- usb start && usbboot $loadaddr 0 && bootm $loadaddr
Write firmware to the flash from initramfs:
- mtd -e kernel -n write openwrt-qualcommax-ipq60xx-linksys_mr7500-squashfs-factory.bin kernel
and:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq60xx-linksys_mr7500-squashfs-factory.bin alt_kernel

3. Back to the OEM firmware:
- mtd -e kernel -n write FW_MR7500_1.1.12.211919_prod.img kernel
and:
- mtd -r -e alt_kernel -n write FW_MR7500_1.1.12.211919_prod.img alt_kernel

4. USB recovery:
Put the initramfs image on the USB:
- dd bs=1M if=openwrt-qualcommax-ipq60xx-linksys_mr7500-initramfs-uImage.itb of=/dev/sda
Set u-boot env:
- fw_setenv bootusb 'usb start && usbboot $loadaddr 0 && bootm $loadaddr'
- fw_setenv bootcmd 'run bootusb; if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'

AQR firmware:
========
0. Firmware extracting:
To extract the firmware, use unblob (unblob.org)
1. Firmware loading:
To properly load the firmware and initialize AQR PHY, we must use the u-boot aq_load_fw function.
To do this, you need to modify u-boot env:
With USB recovery:
- fw_setenv bootcmd 'aq_load_fw; run bootusb; if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'
and without:
- fw_setenv bootcmd 'aq_load_fw; if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'
2. Firmware updating:
Newer firmware (AQR114C.cld) is available in the latest OEM firmware (https://downloads.linksys.com/support/assets/firmware/FW_MR7500_1.1.12.211919_prod.img).
Copy AQR114C.cld to /lib/firmware/marvell

Link: openwrt#17428

Signed-off-by: Weikai Kong <priv@pppig236.com>
Link: https://github.com/openwrt/openwrt/pull/18185
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agotarget.mk: Fix features detection for PWM
Weikai Kong [Sat, 15 Mar 2025 17:09:54 +0000 (13:09 -0400)] 
target.mk: Fix features detection for PWM

kmod-leds-pwm depends on @PWM_SUPPORT, instead of adding pwm to the
features env for specific targets, use the existing detection method.

Signed-off-by: Weikai Kong <priv@pppig236.com>
Link: https://github.com/openwrt/openwrt/pull/18185
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoipq60xx: define common Linksys MR devices configuration
Weikai Kong [Sun, 29 Dec 2024 04:54:27 +0000 (23:54 -0500)] 
ipq60xx: define common Linksys MR devices configuration

ipq60xx series MR devices share some common attributes such as LED for
USB port.

Signed-off-by: Weikai Kong <priv@pppig236.com>
Link: https://github.com/openwrt/openwrt/pull/18185
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoipq6018-ess: Add dp5-syn node
Weikai Kong [Sat, 28 Dec 2024 21:41:08 +0000 (16:41 -0500)] 
ipq6018-ess: Add dp5-syn node

Linksys MR7500 features 4x QSGMII QCA8075 and 1x USXGMII (1/2.5/5 GbE)

Signed-off-by: Weikai Kong <priv@pppig236.com>
Link: https://github.com/openwrt/openwrt/pull/18185
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoqca-ssdk: enable AQR for ipq60xx targets
Weikai Kong [Mon, 30 Dec 2024 06:09:07 +0000 (01:09 -0500)] 
qca-ssdk: enable AQR for ipq60xx targets

MR7500 features IPQ6018 which is CPPE, however, it also utilizes AQR114CB0 as WAN.
Previously, without this patch, aquantia_phy_api_ops was never called.
Therefore, enable `IN_AQUATIA_PHY` so that AQR PHY gets initialized properly on boot.

[    3.973942] Aquantia AQR114C 90000.mdio-1:08: loading firmware version 'v5.6.5 Cybertan Divo 090221 14:43:44' from 'NVMEM'
[   16.059953] aquantia_phy_api_ops_init[1485]:INFO:qca probe aquantia phy driver succeeded!
[   17.930149] Aquantia AQR114C 90000.mdio-1:08: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:08, irq=POLL)

Signed-off-by: Weikai Kong <priv@pppig236.com>
Link: https://github.com/openwrt/openwrt/pull/18185
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agotools/isl: update to 0.27 18249/head
Mieczyslaw Nalewaj [Fri, 14 Mar 2025 21:47:24 +0000 (22:47 +0100)] 
tools/isl: update to 0.27

version: 0.27
 date: Sun Sep  1 12:07:24 PM CEST 2024
 changes:
         - improved modulo detection
         - remove all unused local variables from affine expressions
         - minor improvements to coalescing
         - minor improvements to lexicographic optimization
         - improved constraint simplification
         - fix handling of empty piecewise expressions

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18249
Signed-off-by: Nick Hainke <vincent@systemli.org>
4 months agoqualcommax: ipq807x: Create working factory images for EAP620 HD v1 and EAP660 HD v1 18340/head
Shymon Samsel [Mon, 24 Mar 2025 17:24:02 +0000 (13:24 -0400)] 
qualcommax: ipq807x: Create working factory images for EAP620 HD v1 and EAP660 HD v1

Create factory tar for EAP620 HD v1 and EAP660 HD v1 which is accepted by the stock UI.
Fix bug in ipq807x and ipq60xx makefiles so TPLINK_SUPPORT_STRING is handled properly.
Modify tplink-mkimage-2022 script and relevant makefiles to allow spaces in support strings (required for EAP620 HD v1 and EAP660 HD v1).

Installation steps are identical to EAP610-Outdoor:
Web UI method
-------------

Set up the device using the vendor's web UI. After that go to
Management->SSH and enable the "SSH Login" checkbox. Select "Save".
The connect to the machine via SSH:

    ssh -o hostkeyalgorithms=ssh-rsa <ip_of_device>

Disable signature verification:

    cliclientd stopcs

Rename the "-web-ui-factory" image to something less than 63
characters, maintaining the ".bin" suffix.
 * Go to System -> Firmware Update.
 * Under "New Firmware File", click "Browse" and select the image
 * Select "Update" and confirm by clicking "OK".

If the update fails, the web UI should show an error message.
Otherwise, the device should reboot into OpenWRT.

Signed-off-by: Shymon Samsel <ssamsel@umass.edu>
Link: https://github.com/openwrt/openwrt/pull/18340
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agogeneric: reorder settings
Mieczyslaw Nalewaj [Mon, 24 Mar 2025 06:18:37 +0000 (07:18 +0100)] 
generic: reorder settings

Move "# CONFIG_NVMEM_LAYOUT_ASCII_ENV is not set" to the correct location.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18335
Signed-off-by: Nick Hainke <vincent@systemli.org>
4 months agolldpd: bump to 1.0.19 18345/head
Paul Donald [Tue, 25 Mar 2025 00:40:06 +0000 (01:40 +0100)] 
lldpd: bump to 1.0.19

Changes:
- Support of both Apple Silicon and Intel for macOS package.
- Add cvlan/svlan/tpmr capabilities.
- Disable LLDP in firmware for Intel X7xx cards on FreeBSD.
- Add lldpctl_watch_sync_unblock to liblldpctl.
- Add C++ wrapper for lldpctl.

Fix:
- Fix AppArmor policy for /run/lldpd/lldpd.socket.lock.
- Do not query stats for a down interface on Linux.

```
 # lldpd -vv
lldpd 1.0.19
  Built on 2025-03-24T17:43:44Z

Additional LLDP features:    LLDP-MED, Dot1, Dot3, Custom TLV
Additional protocols:        CDP, FDP, EDP, SONMP
SNMP support:                no
Old kernel support:          no (Linux 2.6.39+)
Privilege separation:        enabled
Privilege separation user:   lldp
Privilege separation group:  lldp
Privilege separation chroot: /var/run/lldp
Configuration directory:     /tmp

C compiler command: C compiler command is not available for reproducible builds
Linker command:     Linker compiler command is not available for reproducible builds
```

Tested on: 24.10.0

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18345
Signed-off-by: Nick Hainke <vincent@systemli.org>
4 months agombedtls: update to 3.6.3 18353/head
Magnus Kroken [Wed, 26 Mar 2025 20:42:51 +0000 (21:42 +0100)] 
mbedtls: update to 3.6.3

This release of Mbed TLS provides the fix for a tls compatibility issue of handling fragmented handshake messages.
This release includes fixes for security issues.

* Potential authentication bypass in TLS handshake (CVE-2025-27810) [1]
* TLS clients may unwittingly skip server authentication (CVE-2025-27809) [2]

[1]: https://mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2025-03-2/
[2]: https://mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2025-03-1/

Full release announcement:
https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-3.6.3

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18353
Signed-off-by: Nick Hainke <vincent@systemli.org>
4 months agorampis: fix tplink_mr200v1 wan interface 18298/head
Marius Durbaca [Wed, 19 Mar 2025 07:41:35 +0000 (09:41 +0200)] 
rampis: fix tplink_mr200v1 wan interface

RNDIS interface name change from usb0 to eth1

Signed-off-by: Marius Durbaca <mariusd84@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18298
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agokernel: bump 6.6 to 6.6.84 18326/head
John Audia [Sat, 22 Mar 2025 21:35:16 +0000 (17:35 -0400)] 
kernel: bump 6.6 to 6.6.84

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.84

All patches automatically rebased.

Build system: x86/64
Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, x86/64
Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18326
Signed-off-by: Nick Hainke <vincent@systemli.org>
4 months agoqualcommax: mr7350: switch to ascii-eq-delim-env 18186/head
Weikai Kong [Thu, 6 Mar 2025 21:48:47 +0000 (16:48 -0500)] 
qualcommax: mr7350: switch to ascii-eq-delim-env

Using the pending ascii-eq-delim-env4 driver is a better way to read mac addresses since no
extra config is required

The change is like eacc4d8c9b31ac17df034d2140558bdaaa56c16b, except for using smem for devinfo

thanks to @musashino205 for pointing out the simplification that removes
the extra partition

Signed-off-by: Weikai Kong <priv@pppig236.com>
Link: https://github.com/openwrt/openwrt/pull/18186
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoiw: backport he operation scan support 18240/head
Aleksander Jan Bajkowski [Fri, 28 Feb 2025 21:07:54 +0000 (22:07 +0100)] 
iw: backport he operation scan support

With this patch, iw can now scan APs in the 6 GHz band and shows
their operation parameters:
~~~
6 Ghz Operation Information: 0x0103070f06
Primary Channel: 1
Channel Width: 80+80 or 160 MHz
Regulatory Info: 0
Center Frequency Segment 0: 7
Center Frequency Segment 1: 15
Minimum Rate: 6
~~~

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/18240
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agomediatek: filogic: fix device sorting 18331/head
Christoph Krapp [Sun, 23 Mar 2025 14:13:31 +0000 (15:13 +0100)] 
mediatek: filogic: fix device sorting

arcadyan_mozart was incorrectly placed below asus devices

Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18331
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoqualcommax: ipq807x: Create working factory tar for WAX620 and WAX630. 18334/head
Erik Servili [Mon, 24 Mar 2025 22:12:54 +0000 (23:12 +0100)] 
qualcommax: ipq807x: Create working factory tar for WAX620 and WAX630.

Create factory tar for WAX620 and WAX630 which is accepted by the stock UI.
Must use 'Boot up Backup Firmware' button on stock upgrade page after install and reboot to swap partitions.

Signed-off-by: Erik Servili <serverror@serverror.com>
Link: https://github.com/openwrt/openwrt/pull/18334
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoramips: dts: remove redundant console bootargs 18303/head
Shiji Yang [Wed, 19 Mar 2025 17:26:35 +0000 (01:26 +0800)] 
ramips: dts: remove redundant console bootargs

`bootargs = "console=ttyS0,57600";` is already defined on all
ramips target SoCs' dtsi. We don't need to override it with the
same value.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/18303
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agostrace: update to 6.14 18350/head
Nick Hainke [Tue, 25 Mar 2025 19:34:36 +0000 (20:34 +0100)] 
strace: update to 6.14

Release Notes:
- https://github.com/strace/strace/releases/tag/v6.13
- https://github.com/strace/strace/releases/tag/v6.14

Link: https://github.com/openwrt/openwrt/pull/18350
Signed-off-by: Nick Hainke <vincent@systemli.org>
4 months agolibtracefs: update to 1.8.1 18349/head
Nick Hainke [Tue, 25 Mar 2025 16:31:24 +0000 (17:31 +0100)] 
libtracefs: update to 1.8.1

ChangeLog
417c2e3 libtracefs: version 1.8.1
41efd9e libtracefs: Add meson build targets to Makefile
310b796 libtracefs utest: Add better logic to cause missed events
b589e32 libtracefs: Add cpu-map sample to trace mapped buffer
4ede86e libtracefs: Enable mmapped ring buffer
e6737d4 libtracefs: Initialize val in build_filter()
590e452 libtracefs: Close dir in the error path in tracefs_event_systems()
0309a87 libtracefs: Close dir in the error path in tracefs_system_events()
f34fb1f libtracefs: Prevent memory leak in tracefs_dynevent_get_all()
48e906b libtracefs: my_yyinput() should return 0 when no data can be read
5e5b2a7 libtracefs: Prevent memory leak in tracefs_instance_create()
8f2593f libtracefs: Prevent a memory leak in open_cpu_files()
7d77b83 libtracefs: Prevent a memory leak in tracefs_system_events()
7fcd8d2 libtracefs: Prevent a memory leak in add_func_str()
a01d0ba libtracefs: Don't leak socket file descriptor in open_vsock()
efdf7f7 libtracefs: Prevent memory leak in tracefs_event_systems()
2342293 libtracefs: Prevent a memory leak in tracefs_synth_add_end_field()
1c95394 libtracefs: Prevent a memory leak in update_fields()
6b35665 libtracefs: Prevent memory leak in append_filer()
aecc0b7 libtracefs: Call va_end() before exiting tracefs_hist_set_sort_key()
a5e37f7 libtracefs: Add trace-mmap.c to meson build
8f62e96 libtracefs meson: Use SemVer in the build description
e04fa01 meson: Add utest option
fb213a4 libtracefs: Update trace_buffer_meta
04505a0 libtracefs utest: Include libgen.h for basename()
7b4a9c9 libtracefs utest: Define _LARGEFILE64_SOURCE for lseek64() with musl
ba75081 libtracefs utest: Add PATH_MAX if it is not already defined
5f27b7f libtracefs: Update the kbuf for previous read in trace_mmap_load_subbuf()
73ac9c1 libtracefs: Fix tracefs_instance_reset() of triggers
7d15d77 libtracefs meson: build tracefs-mmap by default

Link: https://github.com/openwrt/openwrt/pull/18349
Signed-off-by: Nick Hainke <vincent@systemli.org>
4 months agolibtraceevent: update to 1.8.4
Nick Hainke [Tue, 25 Mar 2025 16:27:01 +0000 (17:27 +0100)] 
libtraceevent: update to 1.8.4

ChangeLog:
bd47bd5 libtraceevent: 1.8.4
fe0bc49 libtraceevent: Print function pointer address when TEP_EVENT_FL_PRINTRAW is specified
f2224d5 libtraceevent: Have sizeof() parsing handle u8/s8 through u64/s64
5f570de libtraceevent: Print arrays like Linux does
645a883 libtraceevent: 1.8.3
d4c1fb4 libtraceevent: Add meson build targets to Makefile
c3dc220 libtraceevent: Fix a double free in process_op()
021da90 libtraceevent: Do not return a local stack pointer in get_field_str()
340e2e6 libtraceevent: Have unit test fail when any tests fail
c84155f libtraceevent: prevent a memory leak in tep_plugin_add_option()
03551eb libtraceevent: Prevent a memory leak in process_fields()
34ece90 libtraceevent: Close shared object in the error path of load_plugin()
8802f0f libtraceevent: Avoid a simple asprintf case
76a0eb8 libtraceevent: Fix event-parse memory leak in process_cond
5bc98bd libtraceevent: Have single quotes represent characters
ec8e0cc libtraceevent: Fix tests running on big endian arch
60ed6c3 libtraceevent: build: Various fixes for the Meson build of libtraceevent
0351241 libtraceevent utest: Include libgen.h for basename() with musl

Link: https://github.com/openwrt/openwrt/pull/18349
Signed-off-by: Nick Hainke <vincent@systemli.org>
4 months agoucode: update to Git HEAD (2025-03-24)
Felix Fietkau [Tue, 25 Mar 2025 10:07:24 +0000 (11:07 +0100)] 
ucode: update to Git HEAD (2025-03-24)

2824982da336 ubus: fix broken uc_ubus_defer()

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agomediatek: filogic: bpi-r3-mini: add kmod-eeprom-at24 18346/head
Martin Schiller [Tue, 25 Mar 2025 06:46:42 +0000 (07:46 +0100)] 
mediatek: filogic: bpi-r3-mini: add kmod-eeprom-at24

The bpi-r3-mini has an eeprom onboard. Add the related driver to be
able to access this memory.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
4 months agouboot-tools: dont build tools unconditionally 18329/head
Robert Marko [Sun, 23 Mar 2025 09:29:28 +0000 (10:29 +0100)] 
uboot-tools: dont build tools unconditionally

Currently, both envtools and the rest of U-Boot tools are being built
regardless if the dumpimage package has been selected.

This will fail if only envtools are selected since the rest of tools
require OpenSSL while envtools do not require them.

So, only build tools if dumpimage is selected.

Fixes: 46e376c93514 ("uboot-tools: migrate uboot-envtools to uboot-tools")
Fixes: #18327
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://github.com/openwrt/openwrt/pull/18329
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agouboot-tools: remove uboot-tools definition
Robert Marko [Sun, 23 Mar 2025 09:19:18 +0000 (10:19 +0100)] 
uboot-tools: remove uboot-tools definition

This is completely unused and not even registered, so drop it.

Link: https://github.com/openwrt/openwrt/pull/18329
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agouboot-tools: disable python build to fix build error
Felix Fietkau [Mon, 24 Mar 2025 11:05:10 +0000 (12:05 +0100)] 
uboot-tools: disable python build to fix build error

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agoqualcommax: ipq60xx: add GL.iNet GL-AX1800/AXT1800 support 14950/head
Chukun Pan [Wed, 20 Mar 2024 15:05:07 +0000 (23:05 +0800)] 
qualcommax: ipq60xx: add GL.iNet GL-AX1800/AXT1800 support

Specifications:
  SoC:     Qualcomm IPQ6000
  RAM:     512 MiB
  Flash:   128 MiB NAND
  ETH:     Qualcomm QCA8075
  WLAN1:   2.4GHz 802.11b/g/n/ax 2x2
  WLAN2:   5GHz 802.11a/n/ac/ax 2x2
  Button:  Reset, Switch
  USB:     1x 3.0
  SD slot: 1 in GL-AXT1800

Install via stock firmware:
  Upload factory.bin in stock firmware's upgrade page,
  do not preserve settings.

Install via uboot web failsafe:
  Push the reset button for 5 seconds, then use broswer
  to access http://192.168.1.1, and upload factory.ubi.

Afterwards upgrade can use sysupgrade image.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/14950
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoqualcommax: backport cpufreq patch for ipq60xx
Chukun Pan [Tue, 5 Mar 2024 14:30:20 +0000 (22:30 +0800)] 
qualcommax: backport cpufreq patch for ipq60xx

Make cpufreq work on different IPQ60xx SoC.
Also rebase ipq6018-cp-cpu.dtsi for mp5496.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/14950
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoqualcommax: backport sdhci patches for ipq60xx
Chukun Pan [Mon, 4 Mar 2024 15:02:16 +0000 (23:02 +0800)] 
qualcommax: backport sdhci patches for ipq60xx

Refresh device tree, remove the useless sdhc2 aliases.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/14950
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoqualcommax: backport some upstream dts changes
Chukun Pan [Fri, 15 Nov 2024 15:10:39 +0000 (23:10 +0800)] 
qualcommax: backport some upstream dts changes

This is the minimal change for the upcoming patches.
Refresh the device tree of ipq807x at the same time.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/14950
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoqualcommax: backport unmerged ipq60xx pwm support
Chukun Pan [Sun, 3 Mar 2024 15:09:36 +0000 (23:09 +0800)] 
qualcommax: backport unmerged ipq60xx pwm support

Because of the dt-bindings error, these patches have not
been merged yet, and the driver part is fine.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/14950
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agofilogic: move append-gl-metadata to image-commands.mk
Chukun Pan [Wed, 6 Nov 2024 15:10:05 +0000 (23:10 +0800)] 
filogic: move append-gl-metadata to image-commands.mk

This can be used by GL.iNet devices from other target.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/14950
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agolldpd: add `custom-tlv` handling 14872/head
Paul Donald [Sun, 21 Apr 2024 22:08:48 +0000 (00:08 +0200)] 
lldpd: add `custom-tlv` handling

Do not verify the format of TLV. Leave that to lldpd.

These lldpd config entries:

config custom-tlv
list ports 'eth0'
option tlv 'replace oui 33,44,55 subtype 254 oui-info 55,55,55,55,55'

config custom-tlv
option tlv 'oui 33,44,44 subtype 232'
list ports 'br-lan'
list ports 'eth0'

config custom-tlv # oui-info truncated
option tlv 'add oui 33,44,33 subtype 66 oui-info 5555555555'

config custom-tlv
option tlv 'add oui 33,44,31 subtype 44'

config custom-tlv # invalid oui
option tlv 'add oui 3322 subtype 79'

config custom-tlv # invalid oui
option tlv 'oui 3312 subtype 74'

Produce the following lldpd.conf content:

configure ports eth0 lldp custom-tlv replace oui 33,44,55 subtype 254 oui-info 55,55,55,55,55
configure ports br-lan,eth0 lldp custom-tlv oui 33,44,44 subtype 232
configure lldp custom-tlv add oui 33,44,33 subtype 66 oui-info 5555555555
configure lldp custom-tlv add oui 33,44,31 subtype 44
configure lldp custom-tlv add oui 3322 subtype 79
configure lldp custom-tlv oui 3312 subtype 74

And lldpd (v1.0.13 on v22) logs the following:

Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op replace oui 33:44:55 subtype fe
Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op add oui 33:44:44 subtype e8
Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op add oui 33:44:33 subtype 42
Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op add oui 33:44:33 subtype 42
Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op add oui 33:44:31 subtype 2c
Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op add oui 33:44:31 subtype 2c
Sat Mar 16 19:11:39 2024 daemon.warn lldpcli[10915]: invalid OUI value '3322'
Sat Mar 16 19:11:39 2024 daemon.info lldpcli[10915]: an error occurred while executing last command
Sat Mar 16 19:11:39 2024 daemon.warn lldpcli[10915]: invalid OUI value '3312'
Sat Mar 16 19:11:39 2024 daemon.info lldpcli[10915]: an error occurred while executing last command
Sat Mar 16 19:11:39 2024 daemon.info lldpcli[10915]: lldpd should resume operations

( The last two TLV are invalid: their oui must be three hex bytes, comma
separated. Only the first hex byte of oui-info 5555555555 is used )

Depends on #14867 and its release version bump

Tested on: 22.03.6

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14872
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agolldpd: get_config_cid_ifaces() -> get_interface_csv()
Paul Donald [Sun, 21 Apr 2024 21:18:36 +0000 (23:18 +0200)] 
lldpd: get_config_cid_ifaces() -> get_interface_csv()

where csv = comma separated value(s)

Make the function more generic. Can use it for not only 'config'.

Now it can be used to parse interfaces for additional lldpd settings,
e.g. custom-tlv.

Tested on: 22.03.6

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14872
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agouboot-tools: create dumpimage package 18276/head
Scott Mercer [Mon, 17 Mar 2025 03:57:29 +0000 (23:57 -0400)] 
uboot-tools: create dumpimage package

Ddd dumpimage package to uboot-tools.
Add patches to fix compile for uboot versions >= 2024.01

Signed-off-by: Scott Mercer <TheRootEd24@gmail.com>
4 months agouboot-tools: migrate uboot-envtools to uboot-tools
Scott Mercer [Mon, 17 Mar 2025 03:50:33 +0000 (23:50 -0400)] 
uboot-tools: migrate uboot-envtools to uboot-tools

Generalize and merge uboot-envtools package into uboot-tools package.
Remove existing uboot-envtools package.

Signed-off-by: Scott Mercer <TheRootEd24@gmail.com>
4 months agouboot-tools: add stub package skeleton
Scott Mercer [Mon, 17 Mar 2025 03:40:13 +0000 (23:40 -0400)] 
uboot-tools: add stub package skeleton

Add uboot-tools stub package skeleton which will replace uboot-envtools
and also provide target-builds for other U-Boot tools.

Signed-off-by: Scott Mercer <TheRootEd24@gmail.com>
4 months agoubox: fix logging to external filesystem 18023/head
Daniel F. Dickinson [Wed, 19 Feb 2025 04:58:06 +0000 (23:58 -0500)] 
ubox: fix logging to external filesystem

As described in #13873, from 23.05.0 onwards logging to a file on an
external filesystem fails under some conditions.

This occurs because the log initscript had code added to prevent start
logging to an external filesystem on boot, and added a trigger to start
said logging when the external filesystem gets mounted.

The issue is that for filesystems mount with fstab uci, the fstab
scripts runs at START=11, while log runs at START=12, which means the
external filesystem may already be mounted by the time the log initscript
runs. Since the external filesystem is already mounted it does not
trigger a hotplug event to trigger the trigger to start logging. This
combination means the logging never automatically starts when the log
file is on an external filesystem.

We therefore add a check for the presence of a mounted filesystem when
the log file is being sent to an fstab mounted filesystem. If the
filesystem is mounted, we don't skip starting logging during boot.

If the filesystem is not mounted then file logging is not started and
the trigger will start the logging when the filesystem is mounted.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
[improved commit message]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agomediatek: filogic: fix case statement in 01_leds
Daniel Golle [Fri, 21 Mar 2025 11:39:07 +0000 (11:39 +0000)] 
mediatek: filogic: fix case statement in 01_leds

Remove a stray '|' character from 01_leds which has accidentally
been added.

Reported-by: Chukun Pan <amadeus@jmu.edu.cn>
Fixes: 63d56af6c6 ("mediatek: filogic: migrate Netgate N60 to upstream PHY LED control")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agokernel: igc: enable HW vlan tag insertion/stripping by default 18195/head
Rui Salvaterra [Sat, 8 Mar 2025 19:41:16 +0000 (19:41 +0000)] 
kernel: igc: enable HW vlan tag insertion/stripping by default

Add a pending patch [1] in order to do so. This will be moved to the backports
section as soon as we know on which Linux version it will be merged.

[1] https://lore.kernel.org/netdev/20250313093615.8037-1-rsalvaterra@gmail.com/

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
4 months agomediatek: filogic: PHY LEDs do have an address, gpio-leds don't
Daniel Golle [Fri, 21 Mar 2025 01:04:39 +0000 (01:04 +0000)] 
mediatek: filogic: PHY LEDs do have an address, gpio-leds don't

Other than GPIO LEDs, PHY LEDs do have an address.

Fix node names such that all gpio-leds do *not* contain an '@' sign and
PHY leds which do have an address also do contain the '@' sign.

This is done to prevent more copy&paste'ry of non-complaint DT
fragments.

Fixes: 7cbe34170e ("mediatek: add support for the GL.iNet GL-MT3000")
Fixes: fe10f97439 ("filogic: add support for GL.iNet GL-MT6000")
Fixes: e8f7597317 ("mediatek: filogic: add support for Cudy RE3000 v1")
Fixes: c9cb6411c1 ("mediatek: add support for Cudy WR3000 v1")
Fixes: 7560af7647 ("mediatek: filogic: migrate ASUS TUF AX6000 to upstream PHY LED control")
Fixes: 25ea7ff393 ("mediatek: filogic: migrate Acer W6/W6d to upstream PHY LED control")
Fixes: d50d51d74e ("mediatek: filogic: migrate Zyxel NWA50AX Pro to upstream PHY LED control")
Fixes: b88de5d507 ("mediatek: filogic: migrate Zyxel EX5700 to upstream PHY LED control")
Fixes: 63d56af6c6 ("mediatek: filogic: migrate Netgate N60 to upstream PHY LED control")
Fixes: fd76a38190 ("mediatek: filogic: migrate SmartRG Bonanza to upstream PHY LED control")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agoRevert "mediatek: rename PHY LEDs to match upstream bindings"
Daniel Golle [Fri, 21 Mar 2025 00:52:39 +0000 (00:52 +0000)] 
Revert "mediatek: rename PHY LEDs to match upstream bindings"

This reverts commit 7103a1554aedbccc16a8beab759fcbd3b9d8e422.
It was merged by accident.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agomediatek: rename PHY LEDs to match upstream bindings 18265/head
Aleksander Jan Bajkowski [Sun, 2 Mar 2025 18:11:28 +0000 (19:11 +0100)] 
mediatek: rename PHY LEDs to match upstream bindings

Kernel docs recommends the following pattern "(^led-[0-9a-f]$|led)"[1].

1. https://elixir.bootlin.com/linux/v6.14-rc6/source/Documentation/devicetree/bindings/leds/leds-gpio.yaml#L24

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
4 months agokernel: drop Maxlinear PHY LED control hack 18267/head
Aleksander Jan Bajkowski [Sat, 1 Mar 2025 14:41:07 +0000 (15:41 +0100)] 
kernel: drop Maxlinear PHY LED control hack

All devices have already been migrated to the upstream PHY LED
API. This prevents users from adding new devices using this hack.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
4 months agomediatek: filogic: migrate SmartRG Bonanza to upstream PHY LED control 18266/head
Aleksander Jan Bajkowski [Sat, 1 Mar 2025 14:57:05 +0000 (15:57 +0100)] 
mediatek: filogic: migrate SmartRG Bonanza to upstream PHY LED control

This commit switches the control of the leds connected to the Maxlinear
GPY211C PHY to an upstream solution. There should be no functional changes.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
4 months agomediatek: filogic: migrate Netgate N60 to upstream PHY LED control 18152/head
Aleksander Jan Bajkowski [Sat, 1 Mar 2025 14:14:33 +0000 (15:14 +0100)] 
mediatek: filogic: migrate Netgate N60 to upstream PHY LED control

This commit switches the control of the leds connected to the Maxlinear
GPY211C PHY to an upstream solution. There should be no functional changes.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
4 months agomediatek: filogic: migrate Zyxel EX5700 to upstream PHY LED control 18151/head
Aleksander Jan Bajkowski [Sat, 1 Mar 2025 14:28:33 +0000 (15:28 +0100)] 
mediatek: filogic: migrate Zyxel EX5700 to upstream PHY LED control

This commit switches the control of the leds connected to the Maxlinear
GPY211C PHY to an upstream solution. There should be no functional changes.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
4 months agolibnl-tiny: update to Git HEAD (2025-03-19)
Felix Fietkau [Wed, 19 Mar 2025 12:18:59 +0000 (13:18 +0100)] 
libnl-tiny: update to Git HEAD (2025-03-19)

c0df580adbd4 attr.c: fix nla_reserve size check

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agokernel: move accepted patch from pending-6.6 to backport-6.6
Daniel Golle [Tue, 18 Mar 2025 14:20:52 +0000 (14:20 +0000)] 
kernel: move accepted patch from pending-6.6 to backport-6.6

742-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch has been
accepted a while ago as
https://git.kernel.org/torvalds/linux/c/87bfdbbb1992

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agoipq-wifi: fix PKG_MIRROR_HASH after update to 2024-02-17 18288/head
Álvaro Fernández Rojas [Tue, 18 Mar 2025 06:59:56 +0000 (07:59 +0100)] 
ipq-wifi: fix PKG_MIRROR_HASH after update to 2024-02-17

PKG_MIRROR_HASH is incorrect and the package check is currently failing.

Fixes: 4990ce613b7d ("ipq-wifi: update to 2024-02-17")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 months agorockchip: fix missing ".patch" file extension 18281/head
Tomas Lara [Mon, 17 Mar 2025 14:59:23 +0000 (14:59 +0000)] 
rockchip: fix missing ".patch" file extension

Fixes missing .patch file extension in:
- https://github.com/openwrt/openwrt/commit/de9ad11dac094b6074c9b23341acbc28806404ae
- https://github.com/openwrt/openwrt/commit/2e7d060fd1ba6160067df1a2ba303c7c2efe2a7e

Signed-off-by: Tomas Lara <tl849670@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18281
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoat91bootstrap: update at91bootstrap v4 targets to v4.0.10 18131/head
Nayab Sayed [Thu, 27 Feb 2025 09:10:11 +0000 (14:40 +0530)] 
at91bootstrap: update at91bootstrap v4 targets to v4.0.10

Update AT91Bootstrap v4 capable targets to v4.0.10.

Signed-off-by: Nayab Sayed <nayabbasha.sayed@microchip.com>
Link: https://github.com/openwrt/openwrt/pull/18131
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoath79: om2p-v1: fix compatible string 18271/head
Rosen Penev [Mon, 16 Dec 2024 22:15:08 +0000 (14:15 -0800)] 
ath79: om2p-v1: fix compatible string

This device uses AR9285, and not AR9280.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18271
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoramips: Fix Hongdian H8922 v30 pinctrl default state 18278/head
Coia Prant [Mon, 17 Mar 2025 10:19:24 +0000 (18:19 +0800)] 
ramips: Fix Hongdian H8922 v30 pinctrl default state

According to the MT7620A hardware datasheet, GPIO/14 was originally used for RIN of UARTF, but is now used as the WPS LED.

Corrected pinctrl to ensure it works properly in the future.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18278
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoath79: support switch LEDs on TL-WR1043ND v2/v3 12487/head
Lech Perczak [Tue, 28 Feb 2023 01:26:40 +0000 (02:26 +0100)] 
ath79: support switch LEDs on TL-WR1043ND v2/v3

Add switch LED definitions for TP-Link TL-WR1043ND family, based on data
extracted from ar71xx board file. Update the LED labels to match current
pattern, i.e. drop the "tp-link:" prefix.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoath79: TP-link TL-WR1043ND v2/v3: use fixed-link for AR8327 switch connection
Lech Perczak [Tue, 4 Feb 2025 20:15:21 +0000 (21:15 +0100)] 
ath79: TP-link TL-WR1043ND v2/v3: use fixed-link for AR8327 switch connection

Attaching PHY driver to the switch, while adding LEDs binding causes the
PHY driver to create additional LED instances, handled incorrectly by
the PHY driver, which are non-functional. Use fixed-link to attach the
switch driver, instead of PHY driver, to prevent that.

This has a side effect of not logging switch port up/down events in the kernel
log.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoath79: support switch LEDs on Archer C7 family
Lech Perczak [Tue, 14 Sep 2021 21:48:51 +0000 (23:48 +0200)] 
ath79: support switch LEDs on Archer C7 family

Add switch LED definitions for TP-Link Archer C7 v1/2/3 family, based on data
extracted from ar71xx board file. Update the LED labels to match current
pattern, i.e. drop the "tp-link:" prefix.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoath79: TP-link Archer C7v2: use fixed-link for AR8327 switch connection
Lech Perczak [Tue, 4 Feb 2025 20:15:16 +0000 (21:15 +0100)] 
ath79: TP-link Archer C7v2: use fixed-link for AR8327 switch connection

Attaching PHY driver to the switch, while adding LEDs binding causes the
PHY driver to create additional LED instances, handled incorrectly by
the PHY driver, which are non-functional. Use fixed-link to attach the
switch driver, instead of PHY driver, to prevent that.

This has a side effect of not logging switch port up/down events in the kernel
log.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoath79: support switch LEDs on TL-WDR4300 family
Lech Perczak [Tue, 14 Sep 2021 21:47:02 +0000 (23:47 +0200)] 
ath79: support switch LEDs on TL-WDR4300 family

Add switch LED definitions for TP-Link TL-WDR4300 family, based on data
extracted from ar71xx board file. Update the LED labels to match current
pattern, i.e. drop the "tp-link:" prefix.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoath79: TP-link TL-WDR4300: use fixed-link for AR8327 switch connection
Lech Perczak [Tue, 4 Feb 2025 20:14:52 +0000 (21:14 +0100)] 
ath79: TP-link TL-WDR4300: use fixed-link for AR8327 switch connection

Attaching PHY driver to the switch, while adding LEDs binding causes the
PHY driver to create additional LED instances, handled incorrectly by
the PHY driver, which are non-functional. Use fixed-link to attach the
switch driver, instead of PHY driver, to prevent that.

This has a side effect of not logging switch port up/down events in the kernel
log.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agokernel: ar8327: support LED device tree bindings
Lech Perczak [Tue, 14 Sep 2021 21:39:41 +0000 (23:39 +0200)] 
kernel: ar8327: support LED device tree bindings

The ar8216 switch driver supports exposing configuration of AR8327 and
AR8337 switch LEDs to the userspace, however it is only configurable
through platform data, causing the devices ported from ar71xx target to
lack the support.
Since there is still a long way to go until we can migrate the target to
qca8k, an interim solution is needed.
Extend ar8327_hw_config_of function to parse a "leds"
subnode, which will populate the missing platform data based on device
tree contents, and restore the existing support for the LEDs.
Standard bindings apply, mapping "reg" property to LED index, with
addition of "qca,led-mode" property, which selects HW (0) or SW (1)
mode, defaulting to HW mode.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agokernel: ar8327: fix active-low LED initialization
Lech Perczak [Tue, 4 Feb 2025 20:14:45 +0000 (21:14 +0100)] 
kernel: ar8327: fix active-low LED initialization

Switch LEDs configured as active-low remain low instead of high upon
initialization, because in ar8327_leds_init, no distinction is made with
regards to LED pattern based on active_low property - only whether HW
mode is active. Select the proper initial pattern based also on
active_low to fix that.

While at that, simplify the equation ruling pattern selection for
setting brightness, avoiding unnecessary binary XOR operation, not
really valid for 'bool' type.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoath79: fix chipidea usb controller detection 18230/head
Simonas Tamošaitis [Wed, 12 Mar 2025 09:49:10 +0000 (11:49 +0200)] 
ath79: fix chipidea usb controller detection

Devices with chipidea usb controller does not detect usb hub after
phy-names change to "usb", revert it back to "usb-phy"

Fixes: 787cb9d87edb ("ath79: change phy-names to only usb")
Signed-off-by: Simonas Tamošaitis <simsasss@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18230
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoramips: add missing LEDs and modem control for ASUS 4G-AX56 17927/head
Henrik Ginstmark [Sun, 9 Feb 2025 19:22:43 +0000 (20:22 +0100)] 
ramips: add missing LEDs and modem control for ASUS 4G-AX56

Add missing LEDs and modem control for ASUS 4G-AX56
 - wifi2.4G white
 - wifi5G   white
 - wan      two-coloured, white and red
 - modem    four-coloured white, blue, yellow and red
   change
      label = "xxxx:modem";
   to
      color = <LED_COLOR_ID_xxxx>;
      function = LED_FUNCTION_MOBILE;
 - rssi-1   white
 - rssi-2   white
 - rssi-3   white

and modem reboot and reset

Combined into one commit

Signed-off-by: Henrik Ginstmark <henrik@ginstmark.se>
Link: https://github.com/openwrt/openwrt/pull/17927
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agokernel: modules: add Intel ICE support 17564/head
Stephen Howell [Fri, 10 Jan 2025 16:44:04 +0000 (16:44 +0000)] 
kernel: modules: add Intel ICE support

Add support for the Intel E800 series of cards, with switchdev
support enabled for lower CPU usage.

Signed-off-by: Stephen Howell <howels@allthatwemight.be>
Link: https://github.com/openwrt/openwrt/pull/17564
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agolinux-firmware: Add support for Intel ICE
Stephen Howell [Fri, 10 Jan 2025 16:42:33 +0000 (16:42 +0000)] 
linux-firmware: Add support for Intel ICE

Uses the OS Default DDP package for Intel Ethernet 800 series.

Signed-off-by: Stephen Howell <howels@allthatwemight.be>
Link: https://github.com/openwrt/openwrt/pull/17564
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agounetmsg: add unet pub/sub message broker based on ubus
Felix Fietkau [Fri, 7 Mar 2025 17:20:23 +0000 (18:20 +0100)] 
unetmsg: add unet pub/sub message broker based on ubus

This service automatically establishes connections to any hosts that are members
of the same unet network, and allows publish/subscribe exchanges via ubus channels.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agoprovision: add script for managing device provisioning data
Felix Fietkau [Fri, 14 Mar 2025 13:05:06 +0000 (14:05 +0100)] 
provision: add script for managing device provisioning data

This is useful for keeping specific data on a device across factory reset.
It uses a separate partition (only UBI supported at the moment) to store
the data. The primary use case is storing sensitive data like cryptographic
keys for maintaining a device as part of a network.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agobase-files: add support for creating a provisioning partition on sysupgrade
Felix Fietkau [Thu, 13 Mar 2025 12:33:54 +0000 (13:33 +0100)] 
base-files: add support for creating a provisioning partition on sysupgrade

This partition can be used to store sensitive config items (e.g. keys/certificates)
across factory resets.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agounetd: cli: add support for changing network password
Felix Fietkau [Sat, 15 Mar 2025 20:55:10 +0000 (21:55 +0100)] 
unetd: cli: add support for changing network password

This does not actually create a new private key. Instead, the salt is replaced,
and a xor key is generated which when merged with the key derived from the new
password transforms into the original private key.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agounetd: cli: add unet_create/update/delete hook calls
Felix Fietkau [Wed, 26 Feb 2025 09:41:48 +0000 (10:41 +0100)] 
unetd: cli: add unet_create/update/delete hook calls

Useful for upcoming cli modules that store created interfaces separately

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agounetd: update to Git HEAD (2025-03-15)
Felix Fietkau [Sat, 15 Mar 2025 20:54:47 +0000 (21:54 +0100)] 
unetd: update to Git HEAD (2025-03-15)

5f97919896c4 cli: reduce code duplication, cleanup
20e4b342aa08 cli: add support for adding xor key to private key

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agounetd: cli: bypass override directory
Felix Fietkau [Fri, 28 Feb 2025 16:21:10 +0000 (17:21 +0100)] 
unetd: cli: bypass override directory

Useful for better integration with uconfig, which overrides uci with generated files

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agoucode: update to Git HEAD (2025-03-17)
Felix Fietkau [Mon, 17 Mar 2025 09:25:04 +0000 (10:25 +0100)] 
ucode: update to Git HEAD (2025-03-17)

9d94d54ed1a3 uci: implement cursor.list_append() and cursor.list_remove()
a5a299075f37 zlib: rework code logic
ee6a6c3ca579 zlib: deduplicate code
d20f7bb87d47 zlib: add stream-oriented deflate operations
0255af462be3 zlib: add stream-oriented inflate operations
9260bd5354bf WIP: lib: support map() over objects
60f05ac60bfe docs: cover switch statement in syntax article
338aa2ebf00e docs: add article with array specific information
df5a79a04b17 uci: link save() and commit() functions in cursor class description
03fb60d0e4b3 docs: add detailed documentation article for dictionaries
8e122f16327c ubus: add support for calling system objects
21a615c84367 socket: add reuseaddr argument for socket.listen()
e04908ef57e7 uci: add support for altering the override config directory
9dbace122d7e socket: add missing documentation for socket.listen() reuseaddr
312b25482b30 ubus: add errval_return() helper macro
1af4a6bbc206 ubus: add channel defer() method
0002684b9772 ubus: support sending multiple reply messages on a request
fb1da7157d13 ubus: remove broken implied await when calling defer() outside of uloop.run()
67a4ad20f172 ubus: fix uninitialized variable warning

Fixes: https://github.com/jow-/ucode/issues/279
Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agomediatek: u7623: fix network switch enumeration
Tomasz Maciej Nowak [Tue, 4 Mar 2025 16:43:11 +0000 (17:43 +0100)] 
mediatek: u7623: fix network switch enumeration

With upstream changes hitting kernel 6.4 the dtb for u7623 ends up with
both mac (gmac) disabled, since this is now the default status in
mt7623.dtsi. Fix this by including mt7623a.dtsi (which already has all
necessary bits) and enabling all revlevant ports. This will also do
a side hustle of assigning proper clocks for power controller and
specifying proper power domain for few devices.

Link: https://lore.kernel.org/all/20230210182505.24597-1-arinc.unal@arinc9.com
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250304164507.60511-2-tmn505@terefe.re/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agouboot-mediatek: u7623: remove keys pin function
Tomasz Maciej Nowak [Tue, 4 Mar 2025 16:43:10 +0000 (17:43 +0100)] 
uboot-mediatek: u7623: remove keys pin function

Apparently U-Boot will discard whole node if requested pin function is
unknown to the driver. This resulted in inability to interact with
U-Boot on the said board, as U-Boot always assumed the recovery key
pressed and issued recovery procedure. Log snippet:

button_gpio gpio-keys: pinctrl_select_state_full: pinctrl_config_one: err=-38
reset button found
button pushed, resetting environment

Recovery procedure also booted recovery image, which didn't affect much
the 23.05.x release, since the root fs argument was valid, so changes
persisted. But as 24.10.x hit with fitblk, the board will boot only
recovery image (initramfs) because of default bootargs will reset on each
boot and U-Boot provided bootargs took precedence.

Fixes: 42eeb22450f2 ("uboot-mediatek: fix factory/reset button")
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250304164507.60511-1-tmn505@terefe.re/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoramips: use openwrt,netdev-name to fix port name conflict on TP-Link Deco M4R v4 18082/head
J. S. Seldenthuis [Sun, 23 Feb 2025 12:54:58 +0000 (13:54 +0100)] 
ramips: use openwrt,netdev-name to fix port name conflict on TP-Link Deco M4R v4

Since 24.10.0, eth0, used for the WAN interface, does not work. From dmesg:

...
[    1.831126] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    1.846204] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 19
...
[    1.933969] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    1.967668] mt7530-mdio mdio-bus:1f: configuring for fixed/rgmii link mode
[    1.975999] mt7530-mdio mdio-bus:1f eth0 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7530 PHY] (irq=21)
[    1.986907] mt7530-mdio mdio-bus:1f: Link is Up - 1Gbps/Full - flow control rx/tx
[    1.987149] mtk_soc_eth 1e100000.ethernet eth0: error -17 registering interface eth0
[    2.004157] mt7530-mdio mdio-bus:1f eth1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=22)
[    2.017698] mtk_soc_eth 1e100000.ethernet eth0: entered promiscuous mode
[    2.024849] DSA: tree 0 setup
...
[    4.249680] mtk_soc_eth 1e100000.ethernet dsa: renamed from eth0
...

Like #15865, it seems that gmac0 does not rename eth0 to dsa until after the
switch ports are initialized, leading to a name collision (error -17 = EEXIST).

This patch follows #17062 by using openwrt,netdev-name to fix the collision.

Signed-off-by: J. S. Seldenthuis <jseldenthuis@lely.com>
Link: https://github.com/openwrt/openwrt/pull/18082
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agonettle: update to 3.10.1 17824/head
Jack Sun [Sun, 2 Feb 2025 02:28:14 +0000 (10:28 +0800)] 
nettle: update to 3.10.1

refresh path:100-portability.patch
Announcement:https://lists.gnu.org/archive/html/info-gnu/2024-12/msg00008.html

Signed-off-by: Jack Sun <sunjiazheng321521@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17824
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoipq806x: use nvmem for wifi mac 16229/head
Rosen Penev [Thu, 22 Aug 2024 17:47:03 +0000 (10:47 -0700)] 
ipq806x: use nvmem for wifi mac

Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16229
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agox86: add Supermicro SuperServer E302-9D 17990/head
Til Kaiser [Sun, 16 Feb 2025 17:03:01 +0000 (18:03 +0100)] 
x86: add Supermicro SuperServer E302-9D

This adds a default network configuration for the
Supermicro SuperServer SYS-E302-9D by adding all
onboard network ports to the default `lan` interface.

The network ports `eth0` till `eth3` use the `igb`
driver, whereas `eth4` till `eth7` use `i40e`.

--- Hardware Highlights ---
CPU: Intel Xeon D-2123IT, 2.20GHz, 4 cores
RAM: Up to 256GB in 4 DIMM Slots
Ports: 4x 1GbE, 2x 10GBase-T, 2x 10G SFP+, 1x IPMI 2.0
Video: 1x VGA
USB: 2x 3.0

Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/17990
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agokernel: modules: reorder i40e, mlx4, and mlx5 load priorities
Til Kaiser [Sun, 16 Feb 2025 16:57:48 +0000 (17:57 +0100)] 
kernel: modules: reorder i40e, mlx4, and mlx5 load priorities

Sets the boot flag for the i40e network device driver
to load it at a more early stage of the boot process.

With commit 0a47d518df0d758e8d3b31264cb0428d57c362c3,
I added a boot priority for the mlx4 and mlx5 drivers.

Also, increase those priorities because I think they
are too low since there is currently no "room" for
built-in network device drivers.
That can cause interface order, i.e., name inconsistencies,
when Mellanox ConnectX cards are inserted or removed.

Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/17990
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoath79: ZTE MF281: use specific board definition file for qca9888 17620/head
Lech Perczak [Mon, 3 Feb 2025 23:24:21 +0000 (00:24 +0100)] 
ath79: ZTE MF281: use specific board definition file for qca9888

Using board definition file extracted from stock firmware yields 50%
throughput improvement in RX direction under iperf3 test.
Make the device use temporary files from firmware_qca-wireless.git
temporarily, as well as select the specific variant in the device tree
files. The device uses same board file as the MF286C.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17620
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoath79: support ZTE MF286C
Lech Perczak [Sun, 24 Nov 2024 23:36:24 +0000 (00:36 +0100)] 
ath79: support ZTE MF286C

ZTE MF286 is an indoor LTE category 12 CPE router with simultaneous
dual-band 802.11ac plus 802.11n Wi-Fi radios and quad-port gigabit
Ethernet switch, FXS and external USB 2.0 port.

Software-wise it's compatible with previous MF286A, save for different
5GHz Wi-Fi board definition file, requiring a separate image.

Hardware highlights:
- CPU: QCA9563 SoC at 775MHz,
- RAM: 128MB DDR2,
- NOR Flash: MX25L1606E 2MB SPI Flash, for U-boot only,
- NAND Flash: W25N01GV 128MB SPI NAND-Flash, for all other data,
- Wi-Fi 5GHz: QCA9886 2x2 MIMO 802.11ac Wave2 radio,
- WI-Fi 2.4GHz: QCA9563 3x3 MIMO 802.11n radio,
- Switch: QCA8337v2 4-port gigabit Ethernet, with single SGMII CPU port,
- WWAN: MDM9250-based category 12 internal LTE modem
  in extended  mini-PCIE form factor, with 5 internal antennas and
  2 external antenna connections, single mini-SIM slot.
- FXS: one external ATA port (handled entirely by modem part) with two
  physical connections in parallel,
- USB: Single external USB 2.0 port,
- Switches: power switch, WPS, Wi-Fi and reset buttons,
- LEDs: Wi-Fi, Test (internal). Rest of LEDs (Phone, WWAN, Battery,
  Signal state) handled entirely by modem. 4 link status LEDs handled by
  the switch on the backside.
- Label MAC device: eth0

Internal modem of MF286C is supported via uqmi.

Console connection: connector X2 is the console port, with the following
pinout, starting from pin 1, which is the topmost pin when the board is
upright:
- VCC (3.3V). Do not use unless you need to source power for the
  converer from it.
- TX
- RX
- GND
Default port configuration in U-boot as well as in stock firmware is
115200-8-N-1.

Installation:
Due to different flash layout from stock firmware, sysupgrade from
within stock firmware is impossible, despite it's based on QSDK which
itself is based on OpenWrt.

STEP 0: Stock firmware update:
As installing OpenWrt cuts you off from official firmware updates for
the modem part, it is recommended to update the stock firmware to latest
ath79: support ZTE MF286C

STEP 1: Booting initramfs image:

Method 1: using serial console (RECOMMENDED):
- Have TFTP server running, exposing the OpenWrt initramfs image, and
  set your computer's IP address as 192.168.0.22. This is the default
  expected by U-boot. You may wish to change that, and alter later
  commands accordingly.
- Connect the serial console if you haven't done so already,
- Interrupt boot sequence by pressing any key in U-boot when prompted
- Use the following commands to boot OpenWrt initramfs through TFTP:

  setenv serverip 192.168.0.22
  setenv ipaddr 192.168.0.1
  tftpboot 0x81000000 openwrt-ath79-nand-zte_mf286c-initramfs-kernel.bin
  bootm 0x81000000

  (Replace server IP and router IP as needed). There is no  emergency
  TFTP boot sequence triggered by buttons, contrary to MF283+.
- When OpenWrt initramfs finishes booting, proceed to actual
  installation.

STEP 2: Backing up original software:
As the stock firmware may be customized by the carrier and is not
officially available in the Internet, IT IS IMPERATIVE to back up the
stock firmware, if you ever plan to returning to stock firmware.
It is highly recommended to perform backup using both methods, to avoid
hassle of reassembling firmware images in future, if a restore is
needed.

Method 1: after booting OpenWrt initramfs image via TFTP:
- Connect your USB-UART adapter
- Dump stock firmware located on stock kernel and ubi partitions:

  ssh root@192.168.1.1: cat /dev/mtd9 > mtd3_ubiconcat0.bin
  ssh root@192.168.1.1: cat /dev/mtd4 > mtd4_kernel.bin
  ssh root@192.168.1.1: cat /dev/mtd9 > mtd5_ubiconcat1.bin

And keep them in a safe place, should a restore be needed in future.

Method 2: using stock firmware:
- Connect an external USB drive formatted with FAT or ext4 to the USB
  port.
- The drive will be auto-mounted to /var/usb_disk
- Check the flash layout of the device:

  cat /proc/mtd

  It should show the following:
  mtd0: 000a0000 00010000 "u-boot"
  mtd1: 00020000 00010000 "u-boot-env"
  mtd2: 00140000 00010000 "reserved1"
  mtd3: 000a0000 00020000 "fota-flag"
  mtd4: 00080000 00020000 "art"
  mtd5: 00080000 00020000 "mac"
  mtd6: 000c0000 00020000 "reserved2"
  mtd7: 00400000 00020000 "cfg-param"
  mtd8: 00400000 00020000 "log"
  mtd9: 000a0000 00020000 "oops"
  mtd10: 00500000 00020000 "reserved3"
  mtd11: 00800000 00020000 "web"
  mtd12: 00300000 00020000 "kernel"
  mtd13: 01a00000 00020000 "rootfs"
  mtd14: 01900000 00020000 "data"
  mtd15: 03200000 00020000 "fota"
  mtd16: 01d00000 00020000 "firmware"

  Differences might indicate that this is NOT a MF286C device but
  one of other variants.
- Copy over all MTD partitions, for example by executing the following:

  for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do cat /dev/mtd$i > \
  /var/usb_disk/mtd$i; done

  "Firmware" partition can be skipped, it is a concatenation
  of "kernel" and "rootfs".

- If the count of MTD partitions is different, this might indicate that
  this is not a MF286C device, but one of its other variants.
- (optionally) rename the files according to MTD partition names from
  /proc/mtd
- Unmount the filesystem:

  umount /var/usb_disk; sync

  and then remove the drive.
- Store the files in safe place if you ever plan to return to stock
  firmware. This is especially important, because stock firmware for
  this device is not available officially, and is usually customized by
  the mobile providers.

STEP 3: Actual installation:
- Set your computer IP to 192.168.1.22/24
- scp the sysupgrade image to the device:

  scp -O openwrt-ath79-nand-zte_mf286a-squashfs-sysupgrade.bin \
  root@192.168.1.1:/tmp/

- ssh into the device and execute sysupgrade:

  sysupgrade -n /tmp/openwrt-ath79-nand-zte_mf286a-squashfs-sysupgrade.bin

- Wait for router to reboot to full OpenWrt.

STEP 4: WAN connection establishment
Since the router is equipped with LTE modem as its main WAN interface, it
might be useful to connect to the Internet right away after
installation. To do so, please put the following entries in
/etc/config/network, replacing the specific configuration entries with
one needed for your ISP:

config interface 'wan'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
        option auth '<auth>' # As required, usually 'none'
        option pincode '<pin>' # If required by SIM
        option apn '<apn>' # As required by ISP
        option pdptype '<pdp>' # Typically 'ipv4', or 'ipv4v6' or 'ipv6'

For example, the following works for most polish ISPs
config interface 'wan'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
        option auth 'none'
        option apn 'internet'
        option pdptype 'ipv4'

The required minimum is:
config interface 'wan'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
In this case, the modem will use last configured APN from stock
firmware - this should work out of the box, unless your SIM requires
PIN which can't be switched off.

If you have build with LuCI, installing luci-proto-qmi helps with this
task.

Restoring the stock firmware:

- Boot to initramfs as in step 3:
- Completely detach ubi0 partition using ubidetach /dev/ubi0_0
- Copy over the stock kernel image using scp to /tmp
- Erase kernel and restore stock kernel:
  (scp mtd4_kernel.bin root@192.168.1.1:/tmp/)
  mtd write kernel /tmp/mtd4_kernel.bin
  rm /tmp/mtd4_kernel.bin
- Copy over the stock partition backups one-by-one using scp to /tmp, and
  restore them individually. Otherwise you might run out of space in
  tmpfs:

  (scp -O mtd3_ubiconcat0.bin root@192.168.1.1:/tmp/)

  mtd write ubiconcat0 /tmp/mtd3_ubiconcat0.bin
  rm /tmp/mtd3_ubiconcat0.bin

  (scp -O mtd5_ubiconcat1.bin root@192.168.1.1:/tmp/)

  mtd write ubiconcat1 /tmp/mtd5_ubiconcat1.bin
  rm /tmp/mtd5_ubiconcat1.bin

- If the write was correct, force a device reboot with

  reboot -f

Quirks and known issues
- It was observed, that CH340-based USB-UART converters output garbage
  during U-boot phase of system boot. At least CP2102 is known to work
  properly.
- Kernel partition size is increased to 4MB compared to stock 3MB, to
  accomodate future kernel updates - at this moment OpenWrt 5.10 kernel
  image is at 2.5MB which is dangerously close to the limit. This has no
  effect on booting the system - but keep that in mind when reassembling
  an image to restore stock firmware.
- uqmi seems to be unable to change APN manually, so please use the one
  you used before in stock firmware first. If you need to change it,
  please use protocok '3g' to establish connection once, or use the
  following command to change APN (and optionally IP type) manually:
  echo -ne 'AT+CGDCONT=1,"IP","<apn>' > /dev/ttyUSB0
- The only usable LED as a "system LED" is the blue debug LED hidden
  inside the case. All other LEDs are controlled by modem, on which the
  router part has some influence only on Wi-Fi LED.
- GPIO5 used for modem reset is a suicide switch, causing a hardware
  reset of whole board, not only the modem. It is attached to
  gpio-restart driver, to restart the modem on reboot as well, to ensure
  QMI connectivity after reboot, which tends to fail otherwise.
- Modem, as in MF283+, exposes root shell over ADB - while not needed
  for OpenWrt operation at all - have fun lurking around.
  The same modem module is used as in older MF286.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17620
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoath79: ZTE MF286A: use specific board definition file for qca9888
Lech Perczak [Sun, 24 Nov 2024 23:22:27 +0000 (00:22 +0100)] 
ath79: ZTE MF286A: use specific board definition file for qca9888

Using board definition file extracted from stock firmware yields 50%
throughput improvement in RX direction under iperf3 test.
Make the device use temporary files from firmware_qca-wireless.git
temporarily, as well as select the specific variant in the device tree
files.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17620
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoipq-wifi: update to 2024-02-17
Lech Perczak [Sun, 24 Nov 2024 23:15:12 +0000 (00:15 +0100)] 
ipq-wifi: update to 2024-02-17

Changes included in this release:
* qca9888: add ZTE MF286C BDF
* qca9888: add ZTE MF28A/R BDF

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17620
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agogeneric: silence led set_brightness error message 18080/head
Chukun Pan [Thu, 20 Feb 2025 12:04:09 +0000 (20:04 +0800)] 
generic: silence led set_brightness error message

Currently, if the phy driver does not implement the led_brightness_set
function, setting the LED will result in the following error message:

leds mdio-bus:*:green:lan: Setting an LED's brightness failed (-524)

Backport a patch to silence this error message.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/18080
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agomediatek: Xiaomi AX3000t: enable SPI calibration 17976/head
Mikhail Zhilkin [Sat, 15 Feb 2025 12:24:20 +0000 (12:24 +0000)] 
mediatek: Xiaomi AX3000t: enable SPI calibration

Xiaomi enabled SPI calibration in new firmware:
- 1.0.84 and newer (rd03 model)
- 1.0.76 and newer (rd23 model)

This enables SPI calibration routines in OpenWrt too.

Tested-by: Aleksandr Danilov <sc16me@gmail.com>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17976
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agogeneric: import rtl8261n patches from mediatek 18163/head
Andrew LaMarche [Tue, 4 Mar 2025 19:18:08 +0000 (19:18 +0000)] 
generic: import rtl8261n patches from mediatek

RTL8261N is used on some Airoha and Realtek devices. Move the driver
from Mediatek to generic so it can be used everywhere.

Signed-off-by: Andrew LaMarche <andrewjlamarche@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18163
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoramips: mt7621: add support for Maginon MC-1200AC 17671/head
Simon Etzlstorfer [Mon, 10 Mar 2025 16:25:42 +0000 (17:25 +0100)] 
ramips: mt7621: add support for Maginon MC-1200AC

This commit adds support for Maginon MC-1200AC.

Hardware specifications:

SoC: MediaTek MT7621
Flash: 16 MB SPI Flash
RAM: 128 MB RAM
Ethernet:
2x 1G RJ45 ports
WLAN:
2.4GHz: MediaTek MT7603E
5GHz: MediaTek MT7613BE
LEDs: Red and blue status lights
Power: 12V DC
UART: 3.3V, 115200 baud, 8N1, like printed on silkscreen (GND,TX,RX,3.3V)

MAC addresses
-------------
+---------+-------------------+
|         | MAC example       |
+---------+-------------------+
| LAN     | 80:3F:5D:xx:xx:72 |
| WAN     | 80:3F:5D:xx:xx:73 |
| WLAN 2g | 80:3F:5D:xx:xx:74 |
| WLAN 5g | 80:3F:5D:xx:xx:75 |
+---------+-------------------+

Installation:

The firmware can be flashed via the U-Boot recovery web interface.
To access it, hold the reset button while powering on the device.
U-Boot recovery web interface is then avaiable at 192.168.10.1.

Alternatively, the image can be loaded using the U-Boot serial interface and TFTP.

Signed-off-by: Simon Etzlstorfer <simon@etzi.at>
Link: https://github.com/openwrt/openwrt/pull/17671
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agobcm27xx: refresh kernel configs 18262/head
Álvaro Fernández Rojas [Sun, 16 Mar 2025 10:32:56 +0000 (11:32 +0100)] 
bcm27xx: refresh kernel configs

Refresh kernel config for all bcm27xx subtargets.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 months agoselinux-policy: fix PKG_MIRROR_HASH after update to v2.6 18261/head
Álvaro Fernández Rojas [Sun, 16 Mar 2025 07:27:21 +0000 (08:27 +0100)] 
selinux-policy: fix PKG_MIRROR_HASH after update to v2.6

PKG_MIRROR_HASH is incorrect and fails the download from mirrors.

Fixes: 0aaabffdea2c ("selinux-policy: update to version v2.6")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>