openwrt/staging/neocturne.git
3 months agotools/7z: update to 24.05
Michael Pratt [Thu, 11 Jul 2024 10:33:55 +0000 (06:33 -0400)]
tools/7z: update to 24.05

Update to a more recent stable release.

Most notably, this version includes
some fixes for building on an OS like Alpine.
This allows for the removal of hacks
that fixed building on Alpine,
but broke building on ARM archs.

Manually adjust:
- 7-zip-flags.patch
- 7-zip-musl.patch

Link: https://7-zip.org/history.txt
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15991
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 months agotools/7z: cleanup Makefile
Michael Pratt [Thu, 11 Jul 2024 07:54:29 +0000 (03:54 -0400)]
tools/7z: cleanup Makefile

Define the version in one variable,
and use Make functions to use variations of it elsewhere.

Correct the CPE ID.

Override the default tar directory flag
by adding a new value to the tar options
instead of defining the entire command.

Use variables for adjusting build recipes
instead of adding custom build recipes.

Remove unnecessary lines and add spacing.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15991
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 months agobuild: add support for host building in a subdirectory
Michael Pratt [Thu, 11 Jul 2024 06:36:18 +0000 (02:36 -0400)]
build: add support for host building in a subdirectory

Add HOST_MAKE_PATH and use it in order to execute Make
in a subdirectory of the build directory
and in a similar way that MAKE_PATH is used for target building.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15991
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 months agoutil-linux: update to v2.40.2
Thomas Weißschuh [Tue, 23 Jul 2024 19:22:17 +0000 (21:22 +0200)]
util-linux: update to v2.40.2

Release Notes:
        https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/v2.40-ReleaseNotes
        https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/v2.40.1-ReleaseNotes
        https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/v2.40.2-ReleaseNotes

Remove upstreamed:
        0001-meson-Fix-build-python-option.patch

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Link: https://github.com/openwrt/openwrt/pull/15995
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 months agotools: util-linux: update to v2.40.2
Thomas Weißschuh [Tue, 23 Jul 2024 19:24:39 +0000 (21:24 +0200)]
tools: util-linux: update to v2.40.2

Also switch from .tar.gz to .tar.xz to align with
package/utils/util-linux/Makefile.
This makes synchronized updates easier.

Release Notes:
        https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/v2.40-ReleaseNotes
        https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/v2.40.1-ReleaseNotes
        https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/v2.40.2-ReleaseNotes

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Link: https://github.com/openwrt/openwrt/pull/15995
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 months agobase-files: upgrade: nand: allow custom fw extraction in nand_do_upgrade()
Rafał Miłecki [Fri, 12 Jul 2024 09:36:48 +0000 (11:36 +0200)]
base-files: upgrade: nand: allow custom fw extraction in nand_do_upgrade()

By default nand_do_upgrade() can only deal with raw and gzipped firmware
files. Vendors often use custom firmware containers. Allow passing
custom extraction command to allow using nand_do_upgrade() with vendor
firmwares.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
4 months agomediatek: add support for TP-Link TL-XTR8488
Chukun Pan [Tue, 18 Jun 2024 15:02:12 +0000 (23:02 +0800)]
mediatek: add support for TP-Link TL-XTR8488

Hardware specification:
  SoC: MediaTek MT7986A 4x A53
  Flash: ESMT F50L1G41LB 128MB
  RAM: MT40A512M16TB-062ER 1GB
  Ethernet: 2x 2.5G, 4x 1G Lan
  WiFi1: MT7976GN 2.4GHz 4T4R
  WiFi2: MT7976AN 5.2GHz 4T4R
  WiFi3: MT7915AN 5.8GHz 4T4R
  Button: Reset, WPS, Turbo
  USB: 1 x USB 3.0
  Power: DC 12V 5A

Flash instructions:
  1. Execute the following operation to open nc shell:
     https://openwrt.org/inbox/toh/tp-link/xdr-6086#rooting
  2. Replace the stock bootloader to OpenWrt's:
     dd bs=131072 conv=sync of=/dev/mtdblock9 if=/tmp/xxx-preloader.bin
     dd bs=131072 conv=sync of=/dev/mtdblock9 seek=28 if=/tmp/xxx-bl31-uboot.fip
  3. Connect to your PC via the Gigabit port of the router,
     set a static ip on the ethernet interface of your PC.
  4. Download the initramfs image, and restart the router,
     waiting for tftp recovery to complete.
  5. After openwrt boots up, perform sysupgrade.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/15930
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agouboot-mediatek: add TP-LINK TL-XTR8488 support
Chukun Pan [Mon, 17 Jun 2024 12:10:06 +0000 (20:10 +0800)]
uboot-mediatek: add TP-LINK TL-XTR8488 support

Same as TP-Link TL-XDR608x, this router comes with locked vendor
loader. Add U-Boot build for replacement loader for this device.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/15930
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agorockchip: add support for Radxa ROCK 3A
FUKAUMI Naoki [Wed, 24 Jul 2024 05:48:09 +0000 (14:48 +0900)]
rockchip: add support for Radxa ROCK 3A

Radxa ROCK 3A is a credit card sized SBC with rich interfaces[1] using
the Rockchip RK3328 SoC.

Hardware
--------
- Rockchip RK3568 SoC
- Quad Cortex-A55 CPU
- Mail G52 GPU
- 1 TOPs NPU
- 2/4/8GB LPDDR4 RAM
- 1x eMMC connector
- 1x M.2 M Key (2-lane PCIe 3.0) supporting NVMe SSD
- 1x Micro SD card slot
- 1x 1000M Ethernet with PoE support (additional PoE HAT required)
- 1x USB 3.0 Type-A port (Host)
- 1x USB 3.0 Type-A port (OTG)
- 2x USB 2.0 Type-A ports (Host)
- 40 pin color GPIO header

[1] https://radxa.com/products/rock3/3a

Installation
------------
Uncompress the OpenWrt sysupgrade and write it to a micro SD card or
internal eMMC using dd.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://github.com/openwrt/openwrt/pull/15985
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agotreewide: fixup models names for UniFi U6 series
Rafał Miłecki [Thu, 18 Jul 2024 08:37:38 +0000 (10:37 +0200)]
treewide: fixup models names for UniFi U6 series

Ubiquiti has a set of UniFi 802.11ax (Wi-Fi 6) AP devices. All models
include "U6" in their names and also have code names with no special
characters (including spaces).

Examples:
1. U6 Lite (codename U6-Lite)
2. U6 Long-Range (codename U6-LR)
3. U6+ (codename U6-PLUS)
4. U6 Pro (codename U6-Pro)
5. U6 Mesh (codename U6-Mesh)
6. U6 Mesh Pro (codename U6-Mesh-Pro)
7. U6 Enterprise (codename U6-Enterprise)

Use proper full names for those devices. Names in OpenWrt/DTS code may
need updating too but it can be handled later.

Cc: Elbert Mai <code@elbertmai.com>
Cc: Daniel Golle <daniel@makrotopia.org>
Cc: Henrik Riomar <henrik.riomar@gmail.com>
Cc: David Bauer <mail@david-bauer.net>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
4 months agorockchip: add support for Radxa ROCK Pi S
FUKAUMI Naoki [Sun, 21 Jul 2024 23:01:56 +0000 (08:01 +0900)]
rockchip: add support for Radxa ROCK Pi S

Radxa ROCK Pi S is a small in size, full in features SBC[1] using the
Rockchip RK3308B SoC.

Hardware
--------
- Rockchip RK3308B SoC
- Quad A35 CPU
- 256/512MB DDR3 RAM
- Optional 4/8GB eMMC
- Micro SD Card slot
- Optional WiFi 4 and BT 4 (not supported yet)
- 1x 100M Ethernet with PoE support (additional PoE HAT required)
- 1x USB 2.0 Type-A port (Host)
- 1x USB 2.0 Type-C port (OTG)
- 2x 26 Pin GPIO header

[1] https://radxa.com/products/rockpi/pis

Installation
------------
Uncompress the OpenWrt sysupgrade and write it to a micro SD card or
internal eMMC using dd.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://github.com/openwrt/openwrt/pull/15933
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agowifi-scripts: add missing dependency on ucode-mod-rtnl
FUKAUMI Naoki [Wed, 10 Jul 2024 21:33:41 +0000 (06:33 +0900)]
wifi-scripts: add missing dependency on ucode-mod-rtnl

rtnl is used in hostap/common.uc.

$ grep -r rtnl files
files/usr/share/hostap/common.uc:import * as rtnl from "rtnl";
files/usr/share/hostap/common.uc:      rtnl.request(rtnl.const.RTM_SETLINK, 0, { dev: reuse_ifname, ifname: name}) != false))
files/usr/share/hostap/common.uc: rtnl.request(rtnl.const.RTM_SETLINK, 0, { dev: name, change: 1, flags: up ? 1 : 0 });

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://github.com/openwrt/openwrt/pull/15922
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agosunxi: add csi video support for nanopi-neo-air
Michel Promonet [Sun, 23 Jun 2024 19:46:46 +0000 (21:46 +0200)]
sunxi: add csi video support for nanopi-neo-air

add dtc configuration that declare CSI connection with ov5640

Signed-off-by: Michel Promonet <michel.promonet@free.fr>
Link: https://github.com/openwrt/openwrt/pull/15967
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agofirmware: add Intel/Lantiq VRX518 DSL firmware package
Martin Schiller [Wed, 21 Aug 2019 07:04:15 +0000 (09:04 +0200)]
firmware: add Intel/Lantiq VRX518 DSL firmware package

This is required by the DSL CPE API driver.

Signed-off-by: Martin Schiller <ms.3headeddevs@gmail.com>
[update for new license]
Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15550
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agofirmware: add Intel/Lantiq VRX518 PPE firmware package
Martin Schiller [Wed, 21 Aug 2019 06:32:09 +0000 (08:32 +0200)]
firmware: add Intel/Lantiq VRX518 PPE firmware package

This firmware is used by the vrx518 tc driver.

Signed-off-by: Martin Schiller <ms.3headeddevs@gmail.com>
[update for new license]
Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15550
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agofirmware: add Intel/Lantiq VRX518 ACA firmware package
Martin Schiller [Wed, 21 Aug 2019 06:05:06 +0000 (08:05 +0200)]
firmware: add Intel/Lantiq VRX518 ACA firmware package

This firmware is used by the vrx518 ep driver.

Signed-off-by: Martin Schiller <ms.3headeddevs@gmail.com>
[update for new license]
Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15550
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoramips: add support for Keenetic KN-3510
Maxim Anisimov [Tue, 18 Jun 2024 13:09:35 +0000 (16:09 +0300)]
ramips: add support for Keenetic KN-3510

Keenetic KN-3510 is a 2.4/5 Ghz band 11ax access point

Specification:
- System-On-Chip: MT7621AT
- CPU/Speed: 880 MHz
- Flash-Chip: Macronix MX30LF1G28AD-TI
- Flash size: 128 MiB
- RAM: 256 MiB
- 2x 10/100/1000 Mbps Ethernet
- PoE, 802.3af/at
- 4x internal antennas
- UART (J1) header on PCB (115200 8n1)
- WiFi: MT7915 2x2 2.4G 573.5Mbps + 2x2 5G 1201Mbps
- 2x LED, 2x button, 1x mode switch

Notes:
- The device supports dual boot mode
- The firmware partitions were concatinated into one

Flash instruction:
The only way to flash OpenWrt image is to use tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-ramips-mt7621-keenetic_kn-3510-squashfs-factory.bin"
   to "KN-3510_recovery.bin" and place it in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed until power led start blinking.
4. Router will download file from server, write it to flash and reboot

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15744
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoramips: add support for Netgear WAX214v2
Borys Zhukov [Sun, 7 Jul 2024 22:54:07 +0000 (18:54 -0400)]
ramips: add support for Netgear WAX214v2

Netgear WAX214v2 is an 802.11ax (Wi-Fi 6) wireless access point.

Specifications:
* SoC: MediaTek MT7621AT
* RAM: 512 MiB
* Flash: NAND 128 MiB (ESMT PSU1GA30DT)
* Wi-Fi: 2.4/5 GHz 4T4R (MediaTek MT7915E)
* Ethernet: 1x 10/100/1000 Mbps LAN
* Switch: MediaTek MT7530 (SoC built-in)
* LEDs/Keys
  * Power (green, blue, amber)
  * LAN (green, amber)
  * WLAN 2.4GHz (green, blue)
  * WLAN 5GHz (green, blue)
  * Reset button
* USB: None
* UART: Marked J1 on board, 115200 8N1
* Power
  * 12 VDC, 1.5 A
  * IEEE 802.3at (PoE+)

Load addresses (same as Netgear WAX202):
* stock
  * 0x80010000: FIT image
  * 0x81001000: kernel image -> entry
* OpenWrt
  * 0x80010000: FIT image
  * 0x82000000: uncompressed kernel+relocate image
  * 0x80001000: relocated kernel image -> entry

MAC addresses as verified by OEM firmware:

vendor   OpenWrt   address
eth0     lan       label
ra0      phy0      label + 2
rax0     phy1      label + 3

Installation:
* Flash the factory image by TFTP to the bootloader.
  NMRP can be used to TFTP without opening the case.

Revert to stock firmware:
* Flash the stock firmware to the bootloader using TFTP/NMRP.

References to WAX214v2 GPL source:
https://www.downloads.netgear.com/files/GPL/WAX214v2-V1.0.1.5-gpl-src.tar.gz

* openwrt/target/linux/ramips/dts/mt7621-ax-nand-wax214v2.dts
  DTS file for this device.

Signed-off-by: Borys Zhukov <borys@zhukov.org>
Link: https://github.com/openwrt/openwrt/pull/14401
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agokernel: modules: video: add kmod-video-gspca-pac7302
Luiz Angelo Daros de Luca [Sat, 6 Jul 2024 07:37:42 +0000 (04:37 -0300)]
kernel: modules: video: add kmod-video-gspca-pac7302

Add the package for the Pixart PAC7302 USB Camera Driver kernel module.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15886
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoramips: add support for Wavlink WL-WN531G3-A2
Eros Brigmann [Thu, 4 Jul 2024 18:10:25 +0000 (20:10 +0200)]
ramips: add support for Wavlink WL-WN531G3-A2

This device is exactly the same as WL-WN531G3 but with different partition layout and different MAC layout. Labeled as Quantum D4G Rev.: A2.

Hardware
--------
SoC:   Mediatek MT7620A
RAM:   64MB
FLASH: 8MB NOR (GigaDevice GD25Q64CS)
ETH:
  - 2x 10/100/1000 Mbps Ethernet (RTL8211F)
  - 3x 10/100 Mbps Ethernet (integrated in SOC)
WIFI:
  - 2.4GHz: 1x (integrated in SOC) (2x2:2)
  - 5GHz:   1x MT7612E (2x2:2)
  - 4 external antennas
BTN:
  - 1x Reset button
  - 1x Touchlink button
  - 1x Turbo button
  - 1x Wps button
  - 1x ON/OFF switch
LEDS:
  - 1x Red led (system status)
  - 1x Blue led (system status)
  - 5x Blue leds (ethernet ports)
  - 1x Power led
  - 1x Wifi led
UART:
  - 57600-8-N-1
Everything works correctly.

Installation
------------
Flash the initramfs image in the OEM firmware interface
When Openwrt boots, flash the sysupgrade image otherwise you won't be
able to keep configuration between reboots.

Notes
-----
1) Router mac addresses:
   LAN XX:XX:XX:XX:XX:0F (factory @ 0x28)
   WAN XX:XX:XX:XX:XX:10 (factory @ 0x2e)
   WIFI 2G XX:XX:XX:XX:XX:11 (factory @ 0x04)
   WIFI 5G XX:XX:XX:XX:XX:12 (factory @ 0x8004)

   LABEL XX:XX:XX:XX:XX:11

Signed-off-by: Eros Brigmann <erosbrigmann@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15876
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agorockchip: make SATA(AHCI) really work on Radxa E25
FUKAUMI Naoki [Wed, 10 Jul 2024 21:20:21 +0000 (06:20 +0900)]
rockchip: make SATA(AHCI) really work on Radxa E25

kmod-ahci-dwc is required to use SATA(AHCI) on Radxa E25.

Fixes: f7c732bf9e ("rockchip: add Radxa E25 board support")
Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://github.com/openwrt/openwrt/pull/15923
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agotreewide: match the COMFAST brand name across supported devices
Luca Piccirillo [Wed, 10 Jul 2024 16:48:39 +0000 (18:48 +0200)]
treewide: match the COMFAST brand name across supported devices

COMFAST CF-E393AX
COMFAST CF-E390AX & CF-EW72 V2
COMFAST CF-WR617AC

Signed-off-by: Luca Piccirillo <luca.piccirillo@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14690
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoath79: qca9563: Amplifi Router HD: add DEVICE_VENDOR Ubiquiti
Kristian Skramstad [Fri, 12 Jul 2024 06:47:23 +0000 (08:47 +0200)]
ath79: qca9563: Amplifi Router HD: add DEVICE_VENDOR Ubiquiti

In make menuconfig the name is [Amplifi Router HD], and
is missing Ubiquiti. Lets fix that by adding
DEVICE_VENDOR := Ubiquiti to generic-ubnt.mk so the name is:
[Ubiquiti Amplifi Router HD].

Signed-off-by: Kristian Skramstad <kristian+github@83.no>
Link: https://github.com/openwrt/openwrt/pull/15932
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agobase-files: ipcalc.sh handle start and range being empty strings
Philip Prindeville [Sun, 14 Jul 2024 20:07:53 +0000 (14:07 -0600)]
base-files: ipcalc.sh handle start and range being empty strings

If we're being paranoid and quote all the arguments to ipcalc.sh,
it's possible to pass in empty start and range arguments.  This
should be handled the same as their being absent.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Link: https://github.com/openwrt/openwrt/pull/15946
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoath79: add support for Huawei AP6010DN
Marco von Rosenberg [Sun, 31 Mar 2024 15:07:13 +0000 (17:07 +0200)]
ath79: add support for Huawei AP6010DN

Huawei AP6010DN is a dual-band, dual-radio 802.11a/b/g/n 2x2 MIMO
enterprise access point with one Gigabit Ethernet port and PoE
support.

Hardware highlights:
- CPU: AR9344 SoC at 480MHz
- RAM: 128MB DDR2
- Flash: 32MB SPI-NOR
- Wi-Fi 2.4GHz: AR9344-internal radio
- Wi-Fi 5GHz: AR9580 PCIe WLAN SoC
- Ethernet: 10/100/1000 Mbps Ethernet through Atheros AR8035 PHY
- PoE: yes
- Standalone 12V/2A power input
- Serial console externally available through RJ45 port
- External watchdog: CAT706SVI (1.6s timeout)

Serial console:
  9600n8 (9600 baud, no stop bits, no parity, 8 data bits)

MAC addresses:
  Each device has 32 consecutive MAC addresses allocated by
  the vendor, which don't overlap between devices.
  This was confirmed with multiple devices with consecutive
  serial numbers.
  The MAC address range starts with the address on the label.
  To be able to distinguish between the interfaces,
  the following MAC address scheme is used:
    - eth0 = label MAC
    - radio0 (Wi-Fi 2.4GHz) = label MAC + 1
    - radio1 (Wi-Fi 5GHz) = label MAC + 2

Installation:
0. Connect some sort of RJ45-to-USB adapter to "Console" port of the AP

1. Power up the AP

2. At prompt "Press f or F  to stop Auto-Boot in 3 seconds",
   do what they say.
   Log in with default admin password "admin@huawei.com".

3. Boot the OpenWrt initramfs from TFTP using the hidden script "run ramboot".
   Replace IP address as needed:

   > setenv serverip 192.168.1.10
   > setenv ipaddr 192.168.1.1
   > setenv rambootfile openwrt-ath79-generic-huawei_ap6010dn-initramfs-kernel.bin
   > saveenv
   > run ramboot

4. Optional but recommended as the factory firmware cannot be downloaded publicly:
   Back up contents of "firmware" partition using the web interface or ssh:

   $ ssh root@192.168.1.1 cat /dev/mtd11 > huawei_ap6010dn_fw_backup.bin

5. Run sysupgrade using sysupgrade image. OpenWrt
   shall boot from flash afterwards.

Return to factory firmware (using firmware upgrade package downloaded from non-public Huawei website):
1. Start a TFTP server in the directory where
   the firmware upgrade package is located

2. Boot to u-boot as described above

3. Install firmware upgrade package and format the config partitions:

   > update system FatAP6X10XN_SOMEVERSION.bin
   > format_fs

Return to factory firmware (from previously created backup):
1. Copy over the firmware partition backup to /tmp,
   for example using scp

2. Use sysupgrade with force to restore the backup:
   sysupgrade -F huawei_ap6010dn_fw_backup.bin

3. Boot AP to U-Boot as described above

Quirks and known issues:
- The stock firmware has a semi dual boot concept where the primary
kernel uses a squashfs as root partition and the secondary kernel uses
an initramfs. This dual boot concept is circumvented on purpose to gain
more flash space and since the stock firmware's flash layout isn't
compatible with mtdsplit.
- The external watchdog's timeout of 1.6s is very hard to satisfy
during bootup. This is why the GPIO15 pin connected to the watchdog input
is configured directly in the LZMA loader to output the AHB_CLK/2 signal
which keeps the watchdog happy until the wdt-gpio kernel driver takes
over. Because it would also take too long to read the whole kernel image
from flash, the uImage header only includes the loader which then reads
the kernel image from flash after GPIO15 is configured.

Signed-off-by: Marco von Rosenberg <marcovr@selfnet.de>
Link: https://github.com/openwrt/openwrt/pull/15941
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agomediatek: add ABT ASR3000 support
Tianling Shen [Sat, 6 Jul 2024 07:30:31 +0000 (15:30 +0800)]
mediatek: add ABT ASR3000 support

Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: 128 MB SPI-NAND
  RAM: 256MB
  Ethernet: 4x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset, Mesh
  Power: DC 12V 1A

Gain telnet access:
1. Login into web interface, and download the configuration.
2. Decode and uncompress the configuration:
     * Enter fakeroot if you are not login as root.
   base64 -d e-xxxxxxxxxxxx-cfg.tar.gz | tar -zx
3. Edit 'etc/passwd', remove root password: 'root::1:0:99999:7:::'.
4. Edit 'etc/rc.local', insert telnetd command before 'exit 0':
   ( sleep 3s; /usr/sbin/telnetd; ) &
5. Repack the configuration:
   tar -zc etc/ | base64 > e-xxxxxxxxxxxx-cfg.tar.gz
6. Upload new configuration via web interface, now you can connect to
   ASR3000 via telnet.

Flash instructions:
1. Connect to ASR3000, backup everything, especially 'Factory' part.
2. Write new BL2:
   mtd write openwrt-mediatek-filogic-abt_asr3000-preloader.bin BL2
3. Write new FIP:
   mtd write openwrt-mediatek-filogic-abt_asr3000-bl31-uboot.fip FIP
4. Set static IP on your PC:
   IP 192.168.1.254/24, GW 192.168.1.1
5. Serve OpenWrt initramfs image using TFTP server.
6. Cut off the power and re-engage, wait for TFTP recovery to complete.
7. After OpenWrt has booted, perform sysupgrade.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/15887
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoramips: mt7620: remove kmod-switch-rtl8366-smi from package list
Mieczyslaw Nalewaj [Wed, 19 Jun 2024 12:49:44 +0000 (14:49 +0200)]
ramips: mt7620: remove kmod-switch-rtl8366-smi from package list

Remove kmod-switch-rtl8366-smi from the package list, as it is still loaded
because kmod-switch-rtl8367b depends on it

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15757
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agolantiq: fix checkpatch warnings in etop driver
Aleksander Jan Bajkowski [Sat, 13 Jul 2024 10:36:02 +0000 (12:36 +0200)]
lantiq: fix checkpatch warnings in etop driver

This commit fixes all errors reported by the checkpatch script. This
should make it easier to accept upstream this patch.

There should be no functional changes.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/15939
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agolantiq: properly release descriptors in etop driver detach
Aleksander Jan Bajkowski [Sat, 13 Jul 2024 10:11:34 +0000 (12:11 +0200)]
lantiq: properly release descriptors in etop driver detach

This patch fixes two issues in the driver detach:
* double free of the same descriptor (upstream bug, backported in 66177c081f1b05e4eb7f6c23d97954e8172c4336),
* releasing tx descriptor instead of rx (downstream bug).

The driver is compiled into the kernel that is why the error
is not visible in normal use.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/15939
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agomac80211: fix kconf build warnings
Sean Khan [Sat, 13 Jul 2024 20:40:30 +0000 (16:40 -0400)]
mac80211: fix kconf build warnings

This patch cleans up the following warnings during build:

"warning: format not a string literal"

```
conf.c: In function 'conf_askvalue':
conf.c:89:17: warning: format not a string literal and no format arguments [-Wformat-security]
    89 |                 printf(_("(NEW) "));
      |                 ^~~~~~
conf.c: In function 'conf_choice':
conf.c:285:33: warning: format not a string literal and no format arguments [-Wformat-security]
  285 |                                 printf(_(" (NEW)"));
      |                                 ^~~~~~
conf.c: In function 'check_conf':
conf.c:440:41: warning: format not a string literal and no format arguments [-Wformat-security]
  440 |                                         printf(_("*\n* Restart config...\n*\n"));
      |                                         ^~~~~~
conf.c: In function 'main':
conf.c:617:41: warning: format not a string literal and no format arguments [-Wformat-security]
  617 |                                         _("\n*** The configuration requires explicit update.\n\n"));
      |                                         ^
conf.c:669:25: warning: format not a string literal and no format arguments [-Wformat-security]
  669 |                         fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
      |                         ^~~~~~~
conf.c:673:25: warning: format not a string literal and no format arguments [-Wformat-security]
  673 |                         fprintf(stderr, _("\n*** Error during update of the configuration.\n\n"));
      |                         ^~~~~~~
conf.c:684:25: warning: format not a string literal and no format arguments [-Wformat-security]
  684 |                         fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
      |                         ^~~~~~~
```

And POSIX Yacc warnings
```
lex -ozconf.lex.c -L zconf.l
yacc -ozconf.tab.c -t -l zconf.y
zconf.y:34.1-7: warning: POSIX Yacc does not support %expect [-Wyacc]
    34 | %expect 32
      | ^~~~~~~
zconf.y:97.1-11: warning: POSIX Yacc does not support %destructor [-Wyacc]
    97 | %destructor {
      | ^~~~~~~~~~~
gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -DKBUILD_NO_NLS   -c -o zconf.tab.o zconf.tab.c
gcc   conf.o zconf.tab.o   -o conf
```

After:

gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -DKBUILD_NO_NLS   -c -o conf.o conf.c
yacc -Wno-yacc -ozconf.tab.c -t -l zconf.y
gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -DKBUILD_NO_NLS   -c -o zconf.tab.o zconf.tab.c
gcc   conf.o zconf.tab.o   -o conf

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/15953
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agolibbpf: Update to v1.4.5
Tony Ambardar [Mon, 15 Jul 2024 05:21:52 +0000 (22:21 -0700)]
libbpf: Update to v1.4.5

Update to the latest upstream release to include recent improvements and
bugfixes.

Link: https://github.com/libbpf/libbpf/releases/tag/v1.4.5
Link: https://github.com/libbpf/libbpf/releases/tag/v1.4.4
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
4 months agokernel: bump 6.6 to 6.6.41
John Audia [Thu, 18 Jul 2024 20:15:36 +0000 (16:15 -0400)]
kernel: bump 6.6 to 6.6.41

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

Manually rebased:
lantiq/patches-6.6/0028-NET-lantiq-various-etop-fixes.patch

All other patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
4 months agokernel: bump 6.1 to 6.1.100
Zxl hhyccc [Thu, 18 Jul 2024 16:45:20 +0000 (00:45 +0800)]
kernel: bump 6.1 to 6.1.100
https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.100

All patches automatically rebased.

Build system: bcm53xx ath79

Signed-off-by: Zxl hhyccc <zxlhhy@gmail.com>
4 months agobase-files: upgrade: nand: use "cmd" argument for extracting command
Rafał Miłecki [Fri, 12 Jul 2024 09:36:47 +0000 (11:36 +0200)]
base-files: upgrade: nand: use "cmd" argument for extracting command

NAND code uses either "cat" or "zcat" for getting firmware image
content. Code was full of duplicated ${gz}cat calls. Use "cmd" variable
that is determined by a caller and passed to lower level functions. This
avoids code duplication and allows adding support for more formats.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
4 months agobase-files: upgrade: nand: document nand_do_upgrade()
Rafał Miłecki [Fri, 12 Jul 2024 09:36:46 +0000 (11:36 +0200)]
base-files: upgrade: nand: document nand_do_upgrade()

Describe what firmware files are supported.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
4 months agomediatek: switch to fitblk for cmcc rax3000m
Tianling Shen [Tue, 2 Apr 2024 12:26:45 +0000 (20:26 +0800)]
mediatek: switch to fitblk for cmcc rax3000m

Use the new fitblk driver.

Tested-by: Yangyu Chen <cyy@cyyself.name>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
4 months agomediatek: convert eeprom/macaddr to nvmem format for cmcc rax3000m
Tianling Shen [Tue, 2 Apr 2024 12:26:45 +0000 (20:26 +0800)]
mediatek: convert eeprom/macaddr to nvmem format for cmcc rax3000m

Switch to new nvmem binding.

Also fixes a issue that the MAC address assigned to lan/wan was
reversed on eMMC boards.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
4 months agotarget.mk: init default configs if they are missing in the .config
Martin Schiller [Thu, 18 Jul 2024 11:53:37 +0000 (13:53 +0200)]
target.mk: init default configs if they are missing in the .config

The config options that are enabled by default and where other default
packages depends on should not only be set if there is no .config file,
but also if the .config exists but the config option (e.g.
CONFIG_SECCOMP) is missing in the file.

This is relevant, for example, if you are working with .config templates
and then want to complete the configuration using make defconfig.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
4 months agotarget.mk: further improve handling of default enabled SECCOMP
Martin Schiller [Wed, 17 Jul 2024 11:00:38 +0000 (13:00 +0200)]
target.mk: further improve handling of default enabled SECCOMP

The fix in commit 847fad476f3d ("target.mk: improve handling of default
enabled SECCOMP") unfortunately does not work for targets where the ARCH
variable is set in ./$(SUBTARGET)/target.mk.

To get this working, the ./$(SUBTARGET)/target.mk must be included
before the check.

Fixes: 847fad476f3d ("target.mk: improve handling of default enabled SECCOMP")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
4 months agomediatek: fix platform_copy_config()
Daniel Golle [Thu, 18 Jul 2024 10:56:13 +0000 (11:56 +0100)]
mediatek: fix platform_copy_config()

Also use env variables exported by export_fitblk_rootdev() in
platform_copy_config().

Fixes: 4448d6325f ("mediatek: make use of common uImage.FIT upgrade functions")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agobase-files: remove fitblk_get_bootdev() from /lib/upgrade/common.sh
Daniel Golle [Wed, 17 Jul 2024 15:25:59 +0000 (16:25 +0100)]
base-files: remove fitblk_get_bootdev() from /lib/upgrade/common.sh

The function was moved to /lib/upgrade/fit.sh which is part of the fitblk
package. Remove it from /lib/upgrade/common.sh to safe space on boards
not using unified uImage.FIT images.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agouboot-envtools: use /lib/upgrade/fit.sh
Daniel Golle [Wed, 17 Jul 2024 15:25:05 +0000 (16:25 +0100)]
uboot-envtools: use /lib/upgrade/fit.sh

Use export_fitblk_bootdev() in /lib/upgrade/fit.sh instead of now
deprecated fitblk_get_bootdev() function. Include /lib/upgrade/fit.sh
instead of /lib/upgrade/common.sh to allow removing the function there.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agomediatek: make use of common uImage.FIT upgrade functions
Daniel Golle [Wed, 17 Jul 2024 15:24:03 +0000 (16:24 +0100)]
mediatek: make use of common uImage.FIT upgrade functions

Use newly introduced fit_do_upgrade() function in /lib/upgrade/platform.sh.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agofitblk: move shell functions to common file
Daniel Golle [Wed, 17 Jul 2024 15:22:10 +0000 (16:22 +0100)]
fitblk: move shell functions to common file

Move shell functions used for sysupgrade into /lib/upgrade/fit.sh.
Introduce improved fitblk boot device detection function which
works also in case ubiblock devices have not yet been created or
even UBI itself not yet being attached.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agoomap: re-enable target
Jan Hoffmann [Sat, 13 Jul 2024 12:49:09 +0000 (14:49 +0200)]
omap: re-enable target

The target was marked source-only due do the broken Ethernet port on
some devices. With that fixed, it can be enabled again.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
4 months agoomap: switch back to old cpsw ethernet driver
Jan Hoffmann [Sat, 13 Jul 2024 12:49:08 +0000 (14:49 +0200)]
omap: switch back to old cpsw ethernet driver

The new cpsw-switch driver reserves VLAN 1 for internal use, which
conflicts with the default network configuration of OpenWrt.

Switch back to the older cpsw driver to make the network connection on
the affected devices (BeagleBone Black and AM335x EVM) usable again.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
4 months agokernel: bump 6.1 to 6.1.99
Zxl hhyccc [Tue, 16 Jul 2024 06:14:08 +0000 (14:14 +0800)]
kernel: bump 6.1 to 6.1.99

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

All patches automatically rebased.

Build system: Kirkwood bcm53xx

Signed-off-by: Zxl hhyccc <zxlhhy@gmail.com>
4 months agoimagebuilder: remove initramfs image files
Christian Marangi [Tue, 16 Jul 2024 17:00:29 +0000 (19:00 +0200)]
imagebuilder: remove initramfs image files

Initramfs images are not supported by imagebuilder. With recent changes
to support Per Device Rootfs, we now generate an image and a vmlinux for
each Rootfs and these additional files are all shipped in the
imagebuilder tar.

Drop these new file and any vmlinux-initramfs as they are not used and
increase the final size of the imagebuilder archive.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agokernel: bump 6.6 to 6.6.40
John Audia [Mon, 15 Jul 2024 19:37:46 +0000 (15:37 -0400)]
kernel: bump 6.6 to 6.6.40

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

All patches (one in this case) automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000
Run-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/15956
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agowolfssl: Update to version 5.7.2
Hauke Mehrtens [Sun, 14 Jul 2024 23:06:38 +0000 (01:06 +0200)]
wolfssl: Update to version 5.7.2

This fixes multiple security problems:
 * [Medium] CVE-2024-1544
   Potential ECDSA nonce side channel attack in versions of wolfSSL before 5.6.6 with wc_ecc_sign_hash calls.

 * [Medium] CVE-2024-5288
   A private key blinding operation, enabled by defining the macro WOLFSSL_BLIND_PRIVATE_KEY, was added to mitigate a potential row hammer attack on ECC operations.

 * [Low] When parsing a provided maliciously crafted certificate directly using wolfSSL API, outside of a TLS connection, a certificate with an excessively large number of extensions could lead to a potential DoS.

 * [Low] CVE-2024-5991
   In the function MatchDomainName(), input param str is treated as a NULL terminated string despite being user provided and unchecked.

 * [Medium] CVE-2024-5814
   A malicious TLS1.2 server can force a TLS1.3 client with downgrade capability to use a ciphersuite that it did not agree to and achieve a successful connection.

 * [Medium] OCSP stapling version 2 response verification bypass issue when a crafted response of length 0 is received.

 * [Medium] OCSP stapling version 2 revocation bypass with a retry of a TLS connection attempt.

Unset DISABLE_NLS to prevent setting the unsupported configuration
option --disable-nls which breaks the build now.

Link: https://github.com/openwrt/openwrt/pull/15948
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agomediatek: filogic: disable eMMC HS400 mode for Mount Stuart series
Chad Monroe [Mon, 15 Jul 2024 17:37:55 +0000 (10:37 -0700)]
mediatek: filogic: disable eMMC HS400 mode for Mount Stuart series

The eMMC chip used in a small batch of these devices has issues operating
in HS400 mode. Reducing to HS200 mode works around the problem and does
not cause any noticeable performance penalties as smaller chips are not fast
enough to saturate the bus. Root cause analysis is pending.

Signed-off-by: Chad Monroe <chad@monroe.io>
4 months agouboot-mediatek: fix build error on mt7988-rfb
Felix Fietkau [Mon, 15 Jul 2024 09:55:20 +0000 (11:55 +0200)]
uboot-mediatek: fix build error on mt7988-rfb

Remove an unnecessary config option that was breaking the build

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agokernel: bump 6.1 to 6.1.98
Zxl hhyccc [Fri, 12 Jul 2024 17:37:10 +0000 (01:37 +0800)]
kernel: bump 6.1 to 6.1.98
https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.98

All patches automatically rebased.

Build system: bcm53xx ath79

Signed-off-by: Zxl hhyccc <zxlhhy@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15935
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agokernel: bump 6.6 to 6.6.39
John Audia [Thu, 11 Jul 2024 20:00:56 +0000 (16:00 -0400)]
kernel: bump 6.6 to 6.6.39

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

Manually rebased:
generic/backport-6.6/0080-v6.9-smp-Avoid-setup_max_cpus_namespace_collision_shadowing.patch

Removed upstreamed:
generic/backport-6.6/801-v6.11-gpio-mmio-do-not-calculate-bgpio_bits-via-ngpios.patch[1]
generic/backport-6.6/0081-v6.10-cpu-Fix-broken-cmdline-nosmp-and-maxcpus-0.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.39&id=dee87316b5f5f167a201491a774bbd6e10c8dd94
2. https://github.com/gregkh/linux/commit/69787793e7f0673465c89714d1522fde978bbfa8

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/15928
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agofstools: update to git HEAD
Daniel Golle [Sun, 14 Jul 2024 18:44:26 +0000 (19:44 +0100)]
fstools: update to git HEAD

 408c2cc libfstools: skip JFFS2 padding when BLOCKSIZE was given
 013050f fstools: remove redundant F2FS_MINSIZE definition

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agomediatek: add BPi-R3 mini to platform_check_image()
Daniel Golle [Sun, 14 Jul 2024 15:28:42 +0000 (16:28 +0100)]
mediatek: add BPi-R3 mini to platform_check_image()

Add entry for the BananaPi R3 mini to the platform_check_image()
function where it has been missing.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agouboot-mediatek: remove hard-coded UBI volume numbers
Daniel Golle [Tue, 9 Jul 2024 16:01:41 +0000 (17:01 +0100)]
uboot-mediatek: remove hard-coded UBI volume numbers

There is no point in hard-coding the UBI volume numbers as we are
dynamically looking up the volume by volume name in all cases by now.

Remove this relict as it causes problems without being useful for
anything.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agouboot-mediatek: refresh device defconfig files
Shiji Yang [Fri, 5 Jul 2024 05:52:06 +0000 (13:52 +0800)]
uboot-mediatek: refresh device defconfig files

It seems that most of them are manually modified. However, we can
use `make savedefconfig` to generate a clean defconfig file.

Refreshed by:
```
Boards=(
mt7623n_bpir2_defconfig \
mt7623a_unielec_u7623_02_defconfig \
mt7622_bananapi_bpi-r64-sdmmc_defconfig \
mt7622_bananapi_bpi-r64-emmc_defconfig \
mt7622_bananapi_bpi-r64-snand_defconfig \
mt7622_linksys_e8450_defconfig \
mt7622_ubnt_unifi-6-lr-v1_defconfig \
mt7622_ubnt_unifi-6-lr-v2_defconfig \
mt7622_ubnt_unifi-6-lr-v3_defconfig \
ravpower-rp-wd009-ram_defconfig \
mt7621_zbtlink_zbt-wg3526-16m_defconfig \
mt7986_netcore_n60_defconfig \
mt7986a_bpi-r3-emmc_defconfig \
mt7986a_bpi-r3-nor_defconfig \
mt7986a_bpi-r3-sd_defconfig \
mt7986a_bpi-r3-snand_defconfig \
mt7986_xiaomi_redmi-ax6000_defconfig \
mt7986_tplink_tl-xdr4288_defconfig \
mt7986_tplink_tl-xdr6086_defconfig \
mt7986_tplink_tl-xdr6088_defconfig \
mt7981_qihoo-360t7_defconfig \
mt7981_xiaomi_mi-router-wr30u_defconfig \
mt7981_h3c_magic-nx30-pro_defconfig \
mt7986a_glinet_gl-mt6000_defconfig \
mt7981_cmcc_rax3000m-emmc_defconfig \
mt7981_cmcc_rax3000m-nand_defconfig \
mt7981_jcg_q30-pro_defconfig \
mt7986_zyxel_ex5601-t0_defconfig \
mt7981_xiaomi_mi-router-ax3000t_defconfig \
mt7986a_jdcloud_re-cp-03_defconfig \
mt7986a_bpi-r3-mini-emmc_defconfig \
mt7986a_bpi-r3-mini-snand_defconfig \
mt7981_nokia_ea0326gmp_defconfig \
mt7988a_bananapi_bpi-r4-emmc_defconfig \
mt7988a_bananapi_bpi-r4-sdmmc_defconfig \
mt7988a_bananapi_bpi-r4-snand_defconfig \
mt7988a_bananapi_bpi-r4-poe-emmc_defconfig \
mt7988a_bananapi_bpi-r4-poe-sdmmc_defconfig \
mt7988a_bananapi_bpi-r4-poe-snand_defconfig \
mt7622_xiaomi_redmi-router-ax6s-ubi-loader_defconfig \
mt7981_openwrt-one-nor_defconfig \
mt7981_openwrt-one-spi-nand_defconfig \
)

for Board in ${Boards[@]}
do
echo "Refresh board ${Board}"
make ${Board}
make savedefconfig
cat ./defconfig > ./configs/${Board}
done
```

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
4 months agouboot-mediatek: update to U-Boot release v2024.07
Shiji Yang [Fri, 5 Jul 2024 05:52:06 +0000 (13:52 +0800)]
uboot-mediatek: update to U-Boot release v2024.07

1. Rename function _do_env_set() to env_do_env_set().
2. Replace kwbimage hack with UBOOT_CUSTOMIZE_CONFIG:
   "--disable TOOLS_KWBIMAGE" and "--disable TOOLS_LIBCRYPTO".
3. Disable CONFIG_CMD_BOOTEFI_BOOTMGR for all supported devices
   because the newly added UEFI bootmenu entries doesn't work.
4. Enable CONFIG_VERSION_VARIABLE for the OpenWrt One.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Co-authored-by: Daniel Golle <daniel@makrotopia.org>
4 months agomt76: update to Git HEAD (2024-07-13)
Felix Fietkau [Sat, 13 Jul 2024 13:31:11 +0000 (15:31 +0200)]
mt76: update to Git HEAD (2024-07-13)

564cd93961fc mt76: sync with upstream changes
3b47d9df427c wifi: mt76: mt7915: fix oops on non-dbdc mt7986

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agonetfilter: kmod-nft-netdev: add egress support
谢致邦 (XIE Zhibang) [Mon, 17 Jun 2024 16:07:53 +0000 (16:07 +0000)]
netfilter: kmod-nft-netdev: add egress support

The netdev egress hook was added in Linux kernel 5.16.

Link: https://patchwork.ozlabs.org/project/openwrt/patch/tencent_EB1DF62723D08576A747D0DAE16FFB99B505@qq.com/
Signed-off-by: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
4 months agoramips: fix image recipe for ASUS RT-N56U
Shiji Yang [Sat, 6 Jul 2024 10:27:19 +0000 (18:27 +0800)]
ramips: fix image recipe for ASUS RT-N56U

The OpenWrt image metadata includes checksum validation. Therefore,
it must be generated at the end.

Fixes: https://github.com/openwrt/openwrt/issues/9045
Fixes: https://github.com/openwrt/openwrt/issues/13674
Link: https://patchwork.ozlabs.org/project/openwrt/patch/TYCP286MB08952FAACDFA234C5E052131BCD82@TYCP286MB0895.JPNP286.PROD.OUTLOOK.COM/
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
4 months agotegra: promote kernel 6.6 as default
Tomasz Maciej Nowak [Thu, 11 Jul 2024 19:38:22 +0000 (21:38 +0200)]
tegra: promote kernel 6.6 as default

It has been stable so far. As result of this change drop 5.15 files.

Link: https://patchwork.ozlabs.org/project/openwrt/patch/20240711194120.11563-1-tmn505@terefe.re/
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
4 months agortl8812au-ct: fix build with mac80211 6.9.9 backport
Shiji Yang [Sat, 13 Jul 2024 08:50:59 +0000 (16:50 +0800)]
rtl8812au-ct: fix build with mac80211 6.9.9 backport

The change_beacon() API has been updated since the 6.7 kernel. Ref:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.9.9&id=66f85d57b7109baf8a7d5ee04049ac9412611d35

Fix build error:
../rtl8812au-ct-2022.10.26~9b2b203a/os_dep/linux/ioctl_cfg80211.c:5984:26: error: initialization of 'int (*)(struct wiphy *, struct net_device *, struct cfg80211_ap_update *)' from incompatible pointer type 'int (*)(struct wiphy *, struct net_device *, struct cfg80211_beacon_data *)' [-Werror=incompatible-pointer-types]
 5984 |         .change_beacon = cfg80211_rtw_change_beacon,
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
../rtl8812au-ct-2022.10.26~9b2b203a/os_dep/linux/ioctl_cfg80211.c:5984:26: note: (near initialization for 'rtw_cfg80211_ops.change_beacon')

Link: https://patchwork.ozlabs.org/project/openwrt/patch/TYCP286MB0895A26BA1C0517F2CBE71F0BCA72@TYCP286MB0895.JPNP286.PROD.OUTLOOK.COM/
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
4 months agomac80211: rt2x00: remove upstreamed patch
Shiji Yang [Sat, 13 Jul 2024 03:47:21 +0000 (11:47 +0800)]
mac80211: rt2x00: remove upstreamed patch

This BBP register fix patch has already been upstreamed. Ref:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.9.9&id=50da74e1e8b682853d1e07fc8bbe3a0774ae5e09

Fixes: 1bfcc1ea8a78 ("mac80211: update to version 6.9.9")
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
4 months agoath10k-ct: fix mac80211 backport patch to account for the bump to 6.7
Felix Fietkau [Fri, 12 Jul 2024 16:26:56 +0000 (18:26 +0200)]
ath10k-ct: fix mac80211 backport patch to account for the bump to 6.7

Fixes build error

Fixes: 1bfcc1ea8a78 ("mac80211: update to version 6.9.9")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agoucode: update to Git HEAD (2024-07-11)
Felix Fietkau [Thu, 11 Jul 2024 13:03:13 +0000 (15:03 +0200)]
ucode: update to Git HEAD (2024-07-11)

73644a036f5a nl80211: move access to tb array out of uc_nl_convert_attr and below
6e3cf83a77a7 nl80211: add support for multi-attribute arrays
6ff24d5488a9 nl80211: update nl80211.h to latest wireless-next
abc2aef28641 nl80211: add wiphy multi-radio support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agomac80211: update to version 6.9.9
Felix Fietkau [Wed, 19 Jun 2024 11:51:47 +0000 (13:51 +0200)]
mac80211: update to version 6.9.9

Brings lots of driver updates and API changes needed for mt76 updates.
Disable iwlwifi and ath11k on 5.15, since backport is too difficult,
and the only remaining targets won't need those drivers.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agokernel: add mhi bus firmware download backport to 6.1
Felix Fietkau [Fri, 12 Jul 2024 13:04:12 +0000 (15:04 +0200)]
kernel: add mhi bus firmware download backport to 6.1

Required by a newer mac80211 backport

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agomvebu: rb5009: wire SFP led by default
Robert Marko [Thu, 11 Jul 2024 13:16:27 +0000 (15:16 +0200)]
mvebu: rb5009: wire SFP led by default

There is no reason not to wire up the default netdev trigger for the SFP
LED since we have a separate SFP interface visible.

Link: https://github.com/openwrt/openwrt/pull/15927
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agomvebu: rb5009: convert LEDs to color/function
Robert Marko [Thu, 11 Jul 2024 13:14:47 +0000 (15:14 +0200)]
mvebu: rb5009: convert LEDs to color/function

Since we are trying to get rid of using labels, lets convert RB5009 to the
function/color combo.

Link: https://github.com/openwrt/openwrt/pull/15927
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agomvebu: rb5009: fix QCA8081 LED polarity
Robert Marko [Thu, 11 Jul 2024 13:02:28 +0000 (15:02 +0200)]
mvebu: rb5009: fix QCA8081 LED polarity

Currently, QCA8081 LED is never configured and the default configuration
has the LED polarity inverted so it will be lit when there is nothing
connected to the PHY.

So lets define the LED as active-low and configure the trigger via 01_leds.

Fixes: 85d9fd6f0ec7 ("mvebu: add support for RB5009UG+S+IN")
Link: https://github.com/openwrt/openwrt/pull/15927
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agorockchip: stop "heartbeat" LED for Radxa CM3I(E25)
FUKAUMI Naoki [Thu, 11 Jul 2024 05:01:39 +0000 (14:01 +0900)]
rockchip: stop "heartbeat" LED for Radxa CM3I(E25)

stop "heartbeat" which happens before OpenWrt controls LED. instead,
just turn LED on.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://github.com/openwrt/openwrt/pull/15913
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoramips: mt7621: reduce MMC clock to 48 MHz
Daniel Golle [Fri, 12 Jul 2024 01:38:53 +0000 (02:38 +0100)]
ramips: mt7621: reduce MMC clock to 48 MHz

The switch to the upstream mmc-mtk driver caused problems with MT7621
because of unstable too high clock frequency:
[   49.643291] mmc0: error -88 whilst initialising SD card
[   49.890047] mmc0: error -88 whilst initialising SD card
[   50.142414] mmc0: error -88 whilst initialising SD card
[   50.419218] mmc0: error -88 whilst initialising SD card
...

Fix this by reducing the clock speed to 48 MHz instead of 50 MHz, which
is also the value used in upstream Linux mt7621.dtsi.

With that change applied SD cards work as expected on MT7621 devices
also with the new driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 months agoramips: improve support for HiWiFi HC5861 SDHC
Shiji Yang [Tue, 9 Jul 2024 17:26:52 +0000 (01:26 +0800)]
ramips: improve support for HiWiFi HC5861 SDHC

1. Override max clock frequency to a stable value 24 MHz.
2. Use voltage regulator to control the power supply.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
4 months agoramips: switch default SDHC driver to kmod-mmc-mtk
Shiji Yang [Tue, 9 Jul 2024 16:16:36 +0000 (00:16 +0800)]
ramips: switch default SDHC driver to kmod-mmc-mtk

Now that the SDHC of MT762{0,1,8} has been supported upstream, it's
time to switch the default driver to the upstream one. We will still
keep the old driver for users to choose from.

Tested on HiWiFi HC5861 (MT7620A) and HiWiFi HC5661A (MT7628N).

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
4 months agoramips: make SoC dtsi compatible with upstream mmc-mtk driver
Shiji Yang [Tue, 9 Jul 2024 16:16:36 +0000 (00:16 +0800)]
ramips: make SoC dtsi compatible with upstream mmc-mtk driver

Add all essential MTK SDHC properties to support the new mmc-mtk
driver. Since this driver relies on power regulators, we also
need to enable this feature for MT7620, just like MT762{1,8}.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Co-authored-by: John Thomson <git@johnthomson.fastmail.com.au>
4 months agoramips: modules: add Mediatek MMC driver package
Shiji Yang [Tue, 9 Jul 2024 16:16:36 +0000 (00:16 +0800)]
ramips: modules: add Mediatek MMC driver package

This is the upstream implementation of the MTK SD/SDIO/MMC card
reader driver. It is an alternative solution for the downstream
driver package "kmod-sdhci-mt7620".

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Co-authored-by: John Thomson <git@johnthomson.fastmail.com.au>
4 months agoramips: mtk-sd: initialize pad delay and drive strength
Shiji Yang [Tue, 9 Jul 2024 16:16:36 +0000 (00:16 +0800)]
ramips: mtk-sd: initialize pad delay and drive strength

Port vendor register init values to upstream MTK SHDC driver.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
4 months agoramips: mtk-mmc: use "cd-inverted" to set CD line polarity
Shiji Yang [Tue, 9 Jul 2024 16:16:36 +0000 (00:16 +0800)]
ramips: mtk-mmc: use "cd-inverted" to set CD line polarity

"cd-inverted" is an upstream documented property used to indicate
the CD line is actived high. We will introduce a new upstream SDHC
driver, and this change will make them compatible with each other.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
4 months agomac80211: clear vif private data in order to fix accidental reuse
Felix Fietkau [Wed, 3 Jul 2024 15:45:33 +0000 (17:45 +0200)]
mac80211: clear vif private data in order to fix accidental reuse

Fixes potential issues when bringing an interface down and then up again

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 months agofirmware: ipq-wifi: update to version 2024-07-04
Kristian Skramstad [Sat, 6 Jul 2024 07:12:58 +0000 (09:12 +0200)]
firmware: ipq-wifi: update to version 2024-07-04

Added:
[+] qcn9074: add Cambium Networks XE3-4 BDF
[+] ipq60xx: add Cambium Networks XE3-4 BDF

Signed-off-by: Kristian Skramstad <kristian+github@83.no>
Link: https://github.com/openwrt/openwrt/pull/15884
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agowireless-regdb: Update to version 2024.07.04
Hauke Mehrtens [Wed, 10 Jul 2024 21:52:41 +0000 (23:52 +0200)]
wireless-regdb: Update to version 2024.07.04

Changes:
  2a768c4 wireless-regdb: Update regulatory rules for Mongolia (MN) on 6GHz
  04875d9 wireless-regdb: Update regulatory rules for Saudi Arabia (SA) on 6GHz
  b7bced8 wireless-regdb: Update regulatory rules for South Africa (ZA) on 6GHz
  7bc8615 wireless-regdb: Update regulatory info for Thailand (TH) on 6GHz
  f901fa9 wireless-regdb: Update regulatory info for Malaysia (MY) for 2022
  d72d288 wireless-regdb: Update regulatory info for Morocco (MA) on 6GHz
  414face wireless-regdb: Update regulatory info for Chile (CL) on 6GHz
  1156a08 wireless-regdb: Update regulatory info for Mexico (MX) on 6GHz
  cc6cf7c wireless-regdb: Update regulatory info for Iceland (IS) on 6GHz
  ce03cc0 wireless-regdb: Update regulatory info for Mauritius(MU) on 6GHz
  7e37778 wireless-regdb: Update regulatory info for Argentina (AR) on 6GHz
  56f3a43 wireless-regdb: Update regulatory info for United Arab Emirates (AE) on 6GHz
  3cb8b91 wireless-regdb: Update regulatory info for Colombia (CO) on 6GHz
  3682ce5 wireless-regdb: Update regulatory info for Costa Rica (CR) for 2021
  dd4ffe7 wireless-regdb: Update regulatory info for Dominican Republic (DO) on 6GHz
  f8ef7da wireless-regdb: Update regulatory info for Liechtenstein (LI) on 6GHz
  a9ecabe wireless-regdb: Update regulatory info for Jordan (JO) for 2022
  5a9fdad wireless-regdb: Update regulatory info for Kenya (KE) for 2022
  19326c3 wireless-regdb: Update regulatory info for Macao (MO) for 2024
  4838054 wireless-regdb: update regulatory database based on preceding changes

Link: https://github.com/openwrt/openwrt/pull/15921
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agokernel: bump 6.6 to 6.6.38
John Audia [Tue, 9 Jul 2024 20:20:30 +0000 (16:20 -0400)]
kernel: bump 6.6 to 6.6.38

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

Removed target/linux/generic/hack-6.6/900-fix-build-to-handle-return-value.patch
which was introduced as a hacky attempt to fix an upstream issue related to 6.6.37.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/15879
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agokernel: bump 6.6 to 6.6.37
John Audia [Fri, 5 Jul 2024 10:04:18 +0000 (06:04 -0400)]
kernel: bump 6.6 to 6.6.37

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

Added:
generic/hack-6.6/900-fix-build-to-handle-return-value.patch[1]

Manually rebased:
generic/pending-6.6/834-ledtrig-libata.patch

Removed upstreamed:
bcm27xx/patches-6.6/950-0398-drm-panel-panel-ilitek9881c-Use-cansleep-methods.patch[2]

All other patches automatically rebased.

1. Patch suggested by @DragonBluep to circumvent upstream breakage of kernel 6.6.37 compilation. See comments in https://github.com/openwrt/openwrt/pull/15879 for additional discussion.
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.37&id=1618f7a875ffd916596392fd29880c0429b8af60

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/15879
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 months agoncurses: add foot terminfo
novenary enneagon [Wed, 10 Jul 2024 09:16:03 +0000 (12:16 +0300)]
ncurses: add foot terminfo

Add terminfo file for the terminal emulator foot.

https://codeberg.org/dnkl/foot

Signed-off-by: novenary enneagon <novenary@kwak.zip>
Link: https://github.com/openwrt/openwrt/pull/15915
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoramips: limit max spi clock frequency to 50 MHz
Shiji Yang [Sun, 7 Jul 2024 16:05:14 +0000 (00:05 +0800)]
ramips: limit max spi clock frequency to 50 MHz

In the past few years, we have received several reports about SPI
Flash not working properly. This is caused by excessively fast
clock frequency. It's really annoying to fix them one by one. Let's
reduce these aggressive frequencies to 50 MHz. This is a safe and
suggested value in the vendor SDK.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
4 months agorockchip: fix baudrate for Radxa E25
Tianling Shen [Thu, 4 Jul 2024 13:09:03 +0000 (21:09 +0800)]
rockchip: fix baudrate for Radxa E25

According to the documentation[1], the serial baudrate of E25 is
115.2 Kbps, and setting it to 1.5 Mbps will cause onboard CH340B
USB-UART chip unstable.

Since mainline TPL is yet available, download patched TPL binary
from Radxa.

1. https://wiki.radxa.com/Rock3/CM/CM3I/E25/getting_started

Fixes: https://github.com/openwrt/openwrt/issues/15814
Fixes: f7c732bf9ed9 ("rockchip: add Radxa E25 board support")
Tested-by: FUKAUMI Naoki <naoki@radxa.com>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/15870
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agolibiwinfo: update to Git HEAD (2024-07-06)
Tan Zien [Sat, 6 Jul 2024 17:23:25 +0000 (01:23 +0800)]
libiwinfo: update to Git HEAD (2024-07-06)

2158201 devices: add device id for Atheros AR9590

Signed-off-by: Tan Zien <nabsdh9@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15889
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoreadline: override termlib for host
Rosen Penev [Tue, 9 Jul 2024 21:06:57 +0000 (14:06 -0700)]
readline: override termlib for host

For some reason, it's not working right locally. Override as is done
with the target build.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15916
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agokernel: fix broken initramfs images for Separate cpio
Christian Marangi [Tue, 9 Jul 2024 02:27:11 +0000 (04:27 +0200)]
kernel: fix broken initramfs images for Separate cpio

Commit 0137fbd74bff ("kernel: skip rebuilding kernel with
ROOTFS_INITRAMFS_SEPARATE") had a logic error error and didn't account
that the generic initramfs is still needed to be built to enable support
for the cpio compression and other config specific to initramfs. With
that commit we completely skip rebuilding the kernel with those new
options.

To better handle this, skip kernel build ONLY when we are handling Per
Device Rootfs, permitting the first generic build to be actually called
with the new options.

Fixes: 0137fbd74bff ("kernel: skip rebuilding kernel with ROOTFS_INITRAMFS_SEPARATE")
Link: https://github.com/openwrt/openwrt/pull/15912
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoqualcommax: ipq807x: add Asus RT-AX89X BX revision
Robert Marko [Sun, 11 Feb 2024 17:57:52 +0000 (18:57 +0100)]
qualcommax: ipq807x: add Asus RT-AX89X BX revision

This commit adds support for Asus RT-AX89X BX revision.

WARNING: Only the BX revision boards (So B1, B2 etc) are supported because
AX revision boards use IPQ8074 v1 SoC which is unsupported.

Specifications:
---------------
* CPU: Qualcomm IPQ8074A Quad core Cortex-A53 @ 2.2GHz
* RAM: 1024MB
* Storage: 256MB SLC NAND (Macronix MX30UF2G18AC)
* Ethernet:
* 5x 1G RJ45 ports via QCA8337 switch
* 3x 1G RJ45 ports via internal switch (QCA8075 PHY)
* 1x 10G RJ45 via internal switch (AQR113C PHY)
* 1x 10G SFP+ slot via internal switch
* WLAN:
* 2.4GHz 4x4
* 5GHz 8x8
* 8 external antennas
* USB: 2x USB 3.0 Type-A
* Buttons:
* Power switch
* WPS
* Reset
* Wireless ON/OFF
* LED ON/OFF
LED-s:
* Power
* Wi-Fi
* WAN
* 10G
* SFP+
Power:
* 19.5V via DC jack

Installation instructions:
--------------------------
1. Flash temporary OpenWrt initramfs:
* Flash openwrt-qualcommax-ipq807x-asus_rt-ax89x-initramfs-factory.trx
via the stock firmware.
Administration -> Firmware Upgrade -> Manual Firmware update (Upload)

After flashing the device will reboot with OpenWrt initramfs and it can
be accesed via any of the LAN ports via SSH with the usual OpenWrt
default credentials.

2. Sysupgrade from OpenWrt initramfs:
* Copy openwrt-qualcommax-ipq807x-asus_rt-ax89x-squashfs-sysupgrade.bin to
/tmp/openwrt-qualcommax-ipq807x-asus_rt-ax89x-squashfs-sysupgrade.bin of
the running initramfs image.
* Simply sysupgrade -n /tmp/openwrt-qualcommax-ipq807x-asus_rt-ax89x-squashfs-sysupgrade.bin

After flashing the device will reboot with OpenWrt initramfs and it can
be accesed via any of the LAN ports via SSH with the usual OpenWrt
default credentials.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agotools: firmware-utils: update to Git HEAD (2024-06-30)
Robert Marko [Sun, 30 Jun 2024 10:51:04 +0000 (12:51 +0200)]
tools: firmware-utils: update to Git HEAD (2024-06-30)

0cfd1043e6c4 zytrx: add ZyXEL LTE7490-M904
3d09357fc7b5 asusuimage: new tool for creating TRX-images compatible with AsusWRT
f35781fcd2c3 asusuimage: fix compile error with old GCC release

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoimage: add recipe for legacy multiple images
Robert Marko [Wed, 26 Jun 2024 16:52:29 +0000 (18:52 +0200)]
image: add recipe for legacy multiple images

Asus RT-AX89X has modded U-Boot that boots FIT images fine when manually
using bootm command, however once the image is flashed and device boots via
the default bootcmd it only supports booting via legacy images.

More precisely, it requires the "multi" image format with:
1. kernel
2. ramdisk
3. DTB

So, lets add a recipe based on the existing uImage one.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agogeneric: add fix for AQR113 PMD Global Transmit Disable bit
Robert Marko [Sun, 11 Feb 2024 17:56:54 +0000 (18:56 +0100)]
generic: add fix for AQR113 PMD Global Transmit Disable bit

PMD Global Transmit Disable bit should be cleared for normal operation.
This should be HW default, however I found that on Asus RT-AX89X that uses
AQR113C PHY and firmware 5.4 this bit is set by default.

With this bit set the AQR cannot achieve a link with its link-partner and
it took me multiple hours of digging through the vendor GPL source to find
this out, so lets always clear this bit during .config_init() to avoid a
situation like this in the future.

aqr107_wait_processor_intensive_op() is moved up because datasheet notes
that any changes to this bit are processor intensive.

This is a modified version of patch that got merged upstream as AQR113C
has a separate config_init() upstream.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agofirmware: ipq-wifi: add Asus RT-AX89X BDF
Robert Marko [Mon, 26 Jun 2023 10:09:16 +0000 (12:09 +0200)]
firmware: ipq-wifi: add Asus RT-AX89X BDF

Include the Asus RT-AX89X BDF.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoqualcommax: ipq807x: enable QCA83XX PHY driver
Robert Marko [Sat, 10 Feb 2024 19:40:37 +0000 (20:40 +0100)]
qualcommax: ipq807x: enable QCA83XX PHY driver

Asus RT-AX89X has an external QCA8337 switch that has built-in
internal ethernet PHY-s that are supported by the QCA83XX PHY driver so
lets enable it.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoqualcommax: ipq807x: enable qca8k driver
Robert Marko [Sat, 10 Feb 2024 11:35:05 +0000 (12:35 +0100)]
qualcommax: ipq807x: enable qca8k driver

Asus RT-AX89X has an Qualcomm QCA8337 switch used to provide additional
1G copper ports, so lets enable qca8k in order to utilize DSA instead of
relying on SSDK for it.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoqualcommax: ipq807x: enable GPIO bitbanged MDIO
Robert Marko [Sat, 10 Feb 2024 16:19:54 +0000 (17:19 +0100)]
qualcommax: ipq807x: enable GPIO bitbanged MDIO

Asus RT-AX89X is using GPIO bitbanged MDIO on newer HW revisions, so lets
enable it in kernel config.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 months agoqualcommax: ipq8074-ess: move switch to ess-instance node
Robert Marko [Thu, 29 Jun 2023 18:18:10 +0000 (20:18 +0200)]
qualcommax: ipq8074-ess: move switch to ess-instance node

It seems that newer SSDK is now expecting the switch node to be a subnode
of "ess-instance" node which also contains "num_devices" as the number of
switches as you can also have external switches connected.

Asus RT-AX89X is even more peculiar as its bootloader has a hardcoded path
to enable if on that revision there is an AQR113 connected to port 6 of the
switch.

So, lets move the current switch node under ess-instance as otherwise it
seems that SSDK is having some issues parsing the UNIPHY mode properly as
I am getting the following:
[    6.981404] _adpt_hppe_instance1_mode_get[3275]:ERROR:port 6 doesn't support port_interface_mode 9

Which should not happen as that port has the mode set to 13.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>