openwrt/staging/nbd.git
8 months agokernel: fix warning when building fitblk on 32-bit platforms
Daniel Golle [Sat, 24 Feb 2024 03:32:13 +0000 (03:32 +0000)]
kernel: fix warning when building fitblk on 32-bit platforms

Kernel warns about comparision of different types without cast when
building the fitblk driver on 32-bit platforms.
Fix this by using `min_t(size_t, ...`.

Fixes: 8fc5457869 ("kernel: add pending fitblk uImage.FIT sub-image block driver")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agomediatek: mt7623: phase out uImage.FIT partition parser
Daniel Golle [Sat, 24 Feb 2024 03:00:27 +0000 (03:00 +0000)]
mediatek: mt7623: phase out uImage.FIT partition parser

Use the new fitblk driver on the BananaPi R2 as well as UniElec U7623.
Introduce boot device selection for fitblk's /chosen/rootdisk
handle, similar to how it is already done on MT7622, MT7986 and MT7988.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agouboot-mediatek: fix truncated patch
Daniel Golle [Sat, 24 Feb 2024 03:00:46 +0000 (03:00 +0000)]
uboot-mediatek: fix truncated patch

The default environment for the Linksys E8450 and Belkin RT3200 got
truncated by one line due to a broken patch. While the impact was
luckily only cosmetic, fix it so bootmenu title also shows U-Boot
version again.

Fixes: 6aec3c7b5b ("mediatek: mt7622: modernize Linksys E8450 / Belkin RT3200 UBI build")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agoipq40xx: Add support Netgear LBR20
Marcin Gajda [Sun, 11 Feb 2024 15:20:21 +0000 (16:20 +0100)]
ipq40xx: Add support Netgear LBR20

**Netgear LBR20** is a router with two gigabit ethernets , three wifi radios and integrated LTE cat.18 modem.

SoC Type: Qualcomm IPQ4019
RAM: 512 MiB
Flash: 256 MiB , SLC NAND, 2 Gbit (Macronix MX30LF2G18AC)
Bootloader: U-Boot
Modem: LTE CAT.18 Quectel EG-18EA ,  Max. 1.2Gbps downlink / 150Mbps uplink

WiFi class AC2200:
- radio0 : 5G on QCA9888 , WiFi5- 802.11a/n/ac MU-MIMO 2x2 , 887Mbps , 80MHz - limited for low channels
- radio1: 2,4G on IPQ4019 ,WiFi4- 802.11b/g/n MIMO2x2 300Mbps 40Mhz
- radio2: 5G on IPQ4019 , WiFi5- 802.11a/n/ac MU-MIMO 2x2 , 887Mbps ,80Mhz - limited for high channels  (from 100 up to 165) . Becouse of DFS remember to set country before turning on.

Ethernet: 2x1GbE (WAN/LAN1, LAN2)
LEDs:  section power : green and red  , section on top (orbi) drived by TLC59208F: red, green ,blue and white
USB ports: No
Buttons:  2 Reset and SYNC(WPS)
Power: 12 VDC, 2,5 A
Connector type: Barrel

OpenWRT Installation
1. Simplest way is just do upgrade from webpage with *factory.img
2. You can also do it with standard tool for Netgear's debricking - NMPRFlash
3. Most advanced way is to open device , connect to UART console and :
- Prepare OpenWrt initramfs image in TFTP server root (server IP 192.168.1.10)
- Connect serial console (115200,8n1) to UART connector
- Connect TFTP server to RJ-45 port
- Stop in u-Boot and run u-Boot command:

> setenv serverip 192.168.1.10
> set fdt_high 0x85000000
> tftpboot 0x83000000 openwrt-ipq40xx-generic-netgear_lbr20-initramfs-zImage.itb
> bootm 0x83000000

- Login via ssh
- upload or download *sysupgrade.bin ( like wget ... or scp transfer)
-  Install image via "sysupgrade -n" (like “sysupgrade -n /tmp/openwrt-ipq40xx-generic-netgear_lbr20-squashfs-sysupgrade.bin”)

Back to Stock
- Download firmware from official Netgear's webpage , it will be *.img file after decompressing.
- Use NMRPFlash tool  ( detailed insructions on project page https://github.com/jclehner/nmrpflash )

Open the case
- Unscrew nuts and remove washers from antenna's conectors.
- There are two Torx T10 screws under the label next to antenna conectors. You have to unglue this label from left and right corner to get it
- Two parts of shell covers will slide out from eachother , you have to unglue two small rubber pads and namplate sticker on bottom to do that.
- PCB is screwed with 4Pcs of Torx T10 screws
- Before lifting up PCB remove pigtiles for LTE antennas and release them from PCB and radiator (black and white wires)
- On other side of PCB ,in left bottom corner there is already soldered with 4 pins UART connector for console. Counting from left it is  +3,3V , TX , RX ,GND (reffer to this picture: https://i.ibb.co/Pmrf9KB/20240116-103524.jpg )

BDF's files are in firmware_qca-wireless  https://github.com/openwrt/firmware_qca-wireless/ and in parallel sent to ath10k@lists.infradead.org.

Signed-off-by: Marcin Gajda <mgajda@o2.pl>
8 months agoipq806x: refresh Kconfig
Christian Marangi [Fri, 23 Feb 2024 17:05:09 +0000 (18:05 +0100)]
ipq806x: refresh Kconfig

Refresh Kconfig due to new changes in ARM decompressor with
kernel_makemenuconfig.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
8 months agoipq806x: replace ARM bootloader patch with pending upstream version
Christian Marangi [Fri, 23 Feb 2024 16:54:52 +0000 (17:54 +0100)]
ipq806x: replace ARM bootloader patch with pending upstream version

Replace ARM bootloader patch with pending upstream version. The patch
got reviewed upstream and tested on a Netgear R7800.

This fix a problem with the ARM decompressor and permits to use
AUTO_ZRELADDR without having to hardcode PHYS_OFFSET as the bootloader
now correctly parse the memory modes in the appended DTB.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
8 months agoRevert "build: don't drop 'user' flag when using the ImageBuilder"
Daniel Golle [Thu, 22 Feb 2024 19:13:34 +0000 (19:13 +0000)]
Revert "build: don't drop 'user' flag when using the ImageBuilder"

This reverts commit c42b915af0ea53bc1b65bc72afc9875da08b14d2.
Now that rpcd uses the 'Auto-Installed' field to differentiate between
deliberately and implicitely installed packages we can remove the
hotfix.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agorpcd: update to latest git HEAD
Daniel Golle [Thu, 22 Feb 2024 19:12:03 +0000 (19:12 +0000)]
rpcd: update to latest git HEAD

 8ef4c25 sys: use "Auto-Installed" field for packagelist

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agomediatek: mt7622: no longer select FIT_PARTITION
Daniel Golle [Fri, 23 Feb 2024 13:43:43 +0000 (13:43 +0000)]
mediatek: mt7622: no longer select FIT_PARTITION

All mt7622 board previously using the FIT partition parser have been
converted to use the fitblk driver:
 6aec3c7b5b mediatek: mt7622: modernize Linksys E8450 / Belkin RT3200 UBI build
 41c053141e mediatek: mt7622: convert unifi6lr-v{1,2,3}-ubootmod to fitblk
 208f6c1232 mediatek: mt7622: convert BPi-R64 to all-UBI layout and fitblk

Remove the now no longer needed FIT partition parser from builds for
mt7622.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agomediatek: filogic: asus-tuf-ax6000: use NVMEM-on-UBI
Daniel Golle [Mon, 19 Feb 2024 03:22:52 +0000 (03:22 +0000)]
mediatek: filogic: asus-tuf-ax6000: use NVMEM-on-UBI

Use newly added support for NVMEM-on-UBI instead of extracting MAC
address and WiFi EEPROM data in userspace.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agomediatek: filogic: asus-tuf-ax4200: use NVMEM-on-UBI
Daniel Golle [Mon, 19 Feb 2024 03:18:47 +0000 (03:18 +0000)]
mediatek: filogic: asus-tuf-ax4200: use NVMEM-on-UBI

Use newly added support for NVMEM-on-UBI instead of extracting MAC
address and WiFi EEPROM data in userspace.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agomediatek: filogic: asus-rt-ax59u: use NVMEM-on-UBI
Daniel Golle [Mon, 19 Feb 2024 03:11:18 +0000 (03:11 +0000)]
mediatek: filogic: asus-rt-ax59u: use NVMEM-on-UBI

Use newly added support for NVMEM-on-UBI instead of extracting MAC
address and WiFi EEPROM data in userspace.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agoipq-wifi: fix archive hash
Robert Marko [Fri, 23 Feb 2024 13:14:05 +0000 (14:14 +0100)]
ipq-wifi: fix archive hash

It seems that ipq-wifi bump included and incorrect PKG_MIRROR_HASH value,
so fix it by using:
make package/firmware/ipq-wifi/check FIXUP=1

Fixes: 70fd815e57dc ("qualcommax: ipq807x: add support for Linksys MX5300")
Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agomac80211: only build ath10k with smallbuffers
Eneas U de Queiroz [Tue, 10 Oct 2023 19:36:12 +0000 (16:36 -0300)]
mac80211: only build ath10k with smallbuffers

When both variants of ath10k drivers are selected, any driver that is
selected along is being built twice, one for each ath10k variant.

Avoid these redundant builds by introducing an optional second parameter
to config_package that lists the variants for which the package is to be
built.

If the symbol is to be set for all of the variants, $(ALL_VARIANTS) can
be used.  This is the case for the mac80211 and cfg80211 modules.  If
the parameter is empty, then the module will be selected and thus built
when the first variant is compiled.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
8 months agomac80211: build each variant in its own dir
Eneas U de Queiroz [Tue, 10 Oct 2023 18:58:01 +0000 (15:58 -0300)]
mac80211: build each variant in its own dir

Having different build directories is the default when the package
Makefile defines more than one variant.

Mac80211 overrides PKG_BUILD_DIR, not taking different variants in
consideration, which causes clobbering the directories when both
variants are built.

When compiled with AUTOREMOVE=y, the effect is that the package is
unnecessarily rebuilt when the package is compiled again.

Wihout AUTOREMOVE, the problem is worse: the second variant will not be
rebuilt, and you end up with the smallbuffers variant being a copy of
the regular one.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
8 months agoqualcommax: ipq807x: add support for Linksys MX5300
Paweł Owoc [Fri, 24 Nov 2023 21:15:44 +0000 (22:15 +0100)]
qualcommax: ipq807x: add support for Linksys MX5300

Hardware specification:
========
SoC: Qualcomm IPQ8072A
Flash: 512MB (Winbond W29N04GZBIBA)
RAM: 1GB (2x Nanya DDR3L NT5CC256M16ER-EK)
Ethernet: 5x 10/100/1000Mbps (Qualcomm QCA8075)
WiFi1: 5GHz ac 4x4 (Qualcomm QCA9984 + Skyworks SKY85746-11) - channels 100-169
WiFi2: 5GHz ax 4x4 (Qualcomm QCN5054 + Skyworks SKY85755-11) - channels 36-64
WiFi3: 2.4GHz ax 4x4 (Qualcomm QCN5024 + Skyworks SKY8340-11)
IoT: Bluetooth 5, Zigbee and Thread (Qualcomm QCA4024 + Skyworks SE2433T-R)
IoT Flash: 4MB (Macronix MX25R3235F)
RTC: ST M41T00S
LED: 1x RGB status (NXP PCA9633)
USB: 1x USB 3.0
Button: WPS, Reset

Flash instructions:
========
1. Manually upgrade firmware using openwrt-qualcommax-ipq807x-linksys_mx5300-squashfs-factory.bin image.
More details can be found here: https://www.linksys.com/hk/support-article?articleNum=274497
After first boot check actual partition:
- fw_printenv -n boot_part
and install firmware on second partition using command in case of 2:
- mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx5300-squashfs-factory.bin kernel
and in case of 1:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx5300-squashfs-factory.bin alt_kernel

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

3. Installation from initramfs image using USB FAT32 formatted drive:
Stop u-boot and run:
- usb start && fatload usb 0:1 $loadaddr openwrt-qualcommax-ipq807x-linksys_mx5300-initramfs-uImage.itb && bootm $loadaddr
Write firmware to the flash from initramfs:
- mtd -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx5300-squashfs-factory.bin kernel
and:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx5300-squashfs-factory.bin alt_kernel

4. Back to the OEM firmware:
- mtd -e kernel -n write FW_MX5300_1.1.9.200251_prod.img kernel
and:
- mtd -r -e alt_kernel -n write FW_MX5300_1.1.9.200251_prod.img alt_kernel

5. USB recovery:
- fw_setenv usbimage 'openwrt-qualcommax-ipq807x-linksys_mx5300-initramfs-uImage.itb'
  fw_setenv bootusb 'usb start && fatload usb 0:1 $loadaddr $usbimage && bootm $loadaddr'
  fw_setenv bootcmd 'run bootusb; aq_load_fw && if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'

Notes:
========
IoT device is accesible over spi. Not yet supported.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
8 months agoqualcommax: ipq807x: add patch for QUP4 SPI node
Robert Marko [Fri, 24 Nov 2023 22:09:58 +0000 (23:09 +0100)]
qualcommax: ipq807x: add patch for QUP4 SPI node

Add node to support the QUP4 SPI controller inside of IPQ8074.
Some devices use this bus to communicate to a Bluetooth controller.

Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agoqualcommax: ipq807x: reordering, combine the same commands
Paweł Owoc [Thu, 30 Nov 2023 23:30:20 +0000 (00:30 +0100)]
qualcommax: ipq807x: reordering, combine the same commands

Reordering, combine the same commands for ipq807x devices

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
8 months agoramips: fix and clean up D-Link MAC address
Alan Luck [Thu, 15 Feb 2024 05:31:12 +0000 (16:31 +1100)]
ramips: fix and clean up D-Link MAC address

add back WIFI eprom addresses pointer in mt7621_dlink_dir-xx60-a1.dtsi
Change MAC address pointer from factory_e006 to factory_e000 + 3
same as used in D-link firmware 1.11 DIR-1960-A1
DIR-1960-A1,DIR-2640-A1,DIR-2660-A1,DIR-3060-A1

Clean-up MAC addresses in D-Link NOR devices DTS's
Change WIFI MAC Addressees to the same as NAND cousins macaddr_factory_e000 + ?
as later devices don't have the MAC address in factory configuration
same as used in D-Link firmware 1.30 DIR-878-A1
DIR-867-A1,DIR-878-A1,DIR-878-R1,DIR-882-A1,DIR-882-R1,DIR-1935-A1

* D-link software differs between source of wan address

Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
8 months agobase-files: sysupgrade: rename add_*files() functions
Rafał Miłecki [Mon, 12 Feb 2024 10:57:01 +0000 (11:57 +0100)]
base-files: sysupgrade: rename add_*files() functions

Usage of word "add" was somehow misleading in those functions:
1. They don't really add (as in: append) anything. Result files are
   created from scratch.
2. It wasn't clear what adding files means. It could be understood as
   adding actual files somewhere (to existing archive?).

Also the word "add" was also a bit ambiguous.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 months agobase-files: sysupgrade: s/do_save_conffiles/create_backup_archive/
Rafał Miłecki [Mon, 12 Feb 2024 10:57:00 +0000 (11:57 +0100)]
base-files: sysupgrade: s/do_save_conffiles/create_backup_archive/

Rename function to more accurate and self-explanatory name:
1. Use "archive" in name as this functions creates tar archive
2. Avoid "conffiles" as this function may archive more than that

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 months agobase-files: sysupgrade: exit with no error for --help
Rafał Miłecki [Mon, 12 Feb 2024 10:56:59 +0000 (11:56 +0100)]
base-files: sysupgrade: exit with no error for --help

Calling "sysupgrade --help" should result in printing help and exiting
with 0 code.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 months agobase-files: sysupgrade: group & cleanup global variables
Rafał Miłecki [Mon, 12 Feb 2024 10:56:58 +0000 (11:56 +0100)]
base-files: sysupgrade: group & cleanup global variables

Group & describe them by type, drop unneeded exports.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 months agobase-files: sysupgrade: replace UMOUNT_ETCBACKUP_DIR with a local variable
Rafał Miłecki [Mon, 12 Feb 2024 10:56:57 +0000 (11:56 +0100)]
base-files: sysupgrade: replace UMOUNT_ETCBACKUP_DIR with a local variable

It was used inside do_save_conffiles() only.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 months agobase-files: sysupgrade: fix error message and typo
Luiz Angelo Daros de Luca [Thu, 20 Oct 2022 02:56:22 +0000 (23:56 -0300)]
base-files: sysupgrade: fix error message and typo

Some minor error message and comment fixes.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
8 months agoRevert "base-files: sysupgrade: always setup overlay when creating backup"
Rafał Miłecki [Thu, 22 Feb 2024 15:43:47 +0000 (16:43 +0100)]
Revert "base-files: sysupgrade: always setup overlay when creating backup"

This reverts commit 4fa9aaf0bed984d200b3c48d1cc81fca7847c394.

That seemed like a good idea allowing us to include any runtime
generated file in archive. Unfortuantely it broke backups with files
from mounted directories.

When mounting overlay with / as lowerdir its mounts don't propagete in
the mountpoint. That resulted in empty directories:
/tmp/overlay.XXXXXX/backup/tmp/
/tmp/overlay.XXXXXX/backup/var/
/tmp/overlay.XXXXXX/backup/dev/
/tmp/overlay.XXXXXX/backup/proc/
etc.

As some platforms / users try to backup files like /var/dhcp.leases or
/boot/cmdline.txt it means we can't use that solution.

Link: http://lists.openwrt.org/pipermail/openwrt-devel/2024-February/042320.html
Link: https://lore.kernel.org/linux-fsdevel/67bb0571-a6e0-44ea-9ab6-91c267d0642f@gmail.com/T/#u
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 months agoRevert "base-files: sysupgrade: include uci-defaults script disabling services"
Rafał Miłecki [Thu, 22 Feb 2024 15:40:56 +0000 (16:40 +0100)]
Revert "base-files: sysupgrade: include uci-defaults script disabling services"

This reverts commit bf304d10e97c11de8c637fda02578cce79a3a0b4.

That uci-defaults script worked great but generating it required
mounting root dir as overlay lowerdir that needs to be reverted.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 months agowifi-scripts: Support HE Iftypes with multiple entries
Hauke Mehrtens [Sat, 17 Feb 2024 16:58:50 +0000 (17:58 +0100)]
wifi-scripts: Support HE Iftypes with multiple entries

With mac80211_hwsim I have seen such entries in OpenWrt 22.03:
    HE Iftypes: managed, AP
The mac80211.sh script did not detect the entry and failed. Allow
arbitrary other entries before to fix this problem.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
8 months agorockchip: remove LED label hack
Tianling Shen [Mon, 12 Feb 2024 11:21:38 +0000 (19:21 +0800)]
rockchip: remove LED label hack

Now we support parsing the color and function properties.
Ref: e814acc59948 ("base-files: support parse DT LED color and function")

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
8 months agodnsmasq: rework network interface ignore
Yegor Yefremov [Thu, 15 Feb 2024 08:43:09 +0000 (09:43 +0100)]
dnsmasq: rework network interface ignore

In some situations (slow protocol or interfaces with auto 0), the
interfaces are not available during the dnsmasq initialization and
hence, the ignore setting will be skipped.

Install an interface trigger for ignored interfaces in case their
ifname cannot be resolved.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
[bump PKG_RELEASE]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 months agoucode: update to Git HEAD (2024-02-21)
Jo-Philipp Wich [Wed, 21 Feb 2024 21:33:00 +0000 (22:33 +0100)]
ucode: update to Git HEAD (2024-02-21)

ee4af9b55cb4 vm: rework object iteration
a275399dd8e2 uci: refactor uci.changes() to match documentation
ba3855ae3775 lib: fix documentation typo for `pop()` function

Fixes: https://github.com/jow-/ucode/issues/188
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 months agoqualcommax: ipq60xx: Add 8devices Mango DVK
Mantas Pucka [Mon, 22 Jan 2024 09:28:32 +0000 (11:28 +0200)]
qualcommax: ipq60xx: Add 8devices Mango DVK

8devices Mango DVK is a single board computer / devkit for 8devices Mango
system-on-module (SoM).

Specifications:
* CPU: Qualcomm IPQ6010 Quad core Cortex-A53 1.8GHz
* RAM: 512 MB
* Storage:
    * 32 MB serial NOR flash (on SoM)
    * 256 MB parallel NAND flash (on DVK)
* Ethernet:
    * 2x1G RJ45 ports(QCA8072 or QCA8075)
    * 1x2.5G RJ45 port (QCA8081)
    * 1xSFP (shares SGMII with QCA8081)
* Switch: Qualcomm Atheros IPQ6010
* WLAN:
    * 2.4GHz: QCN5121 2x2 802.11b/g/n/ax 574 Mbps PHY rate
    * 5GHz: QCN5152 2x2 802.11a/n/ac/ax 1201 Mbps PHY rate
* USB:
    * 1x USB3.0 Type-A port
    * 1x USB2.0 available at mini PCIe slot
* PCIe: 1x mini PCIe slot 1xLane Gen3 (8GT/s)
* SD/eMMC (on a single shared bus - only one can be active):
    * micro SD slot
    * eMMC module connector
* LEDs:
    * Green power led (not controllable)
    * Green 2.4GHz radio led (GPIO 67)
    * Green 5GHz radio led (GPIO 66)
* Buttons:
    * 1x (WPS GPIO79) button
* GPIOs: 2.54mm header brings out 18 GPIOs (1.8V level)
* UART: 4-pin UART header (3.3V level)
    * 115200 8N1, 3.3V-Tx-Rx-GND (3.3V is pin 1 close to boot-switch SW2)
* Power:
    * PoE IN on 2.5G port (passive 24-48V)
    * DC power terminal (12-58V)

Installation instructions:

Vendor image format is compatible with squashfs-sysupgrade image. Run:

sysupgrade -n -F openwrt-qualcommax-ipq60xx-8devices_mango-dvk-squashfs-sysupgrade.bin

Signed-off-by: Mantas Pucka <mantas@8devices.com>
8 months agoipq-wifi: add support for 8devices Mango board
Mantas Pucka [Wed, 3 Jan 2024 09:25:59 +0000 (11:25 +0200)]
ipq-wifi: add support for 8devices Mango board

Add support for .ipq6018 BDF suffix and add Mango board entry

Signed-off-by: Mantas Pucka <mantas@8devices.com>
8 months agoipq-wifi: update to Git HEAD (2024-02-19)
Mantas Pucka [Tue, 20 Feb 2024 08:44:06 +0000 (10:44 +0200)]
ipq-wifi: update to Git HEAD (2024-02-19)

1cc59e1 ipq6018: add 8devices Mango BDF
10279cc ipq40xx:Add support for Netgear LBR20 with two BDF's

Signed-off-by: Mantas Pucka <mantas@8devices.com>
8 months agoath11k-firmware: add wifi firmware for ipq6018
Mantas Pucka [Wed, 3 Jan 2024 09:21:58 +0000 (11:21 +0200)]
ath11k-firmware: add wifi firmware for ipq6018

So far only stable FW is v2.4. It exists in a different
git repo, so add custom download routine.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
8 months agomac80211: ath11k: disable coldboot for ipq6018
Mantas Pucka [Wed, 3 Jan 2024 09:31:03 +0000 (11:31 +0200)]
mac80211: ath11k: disable coldboot for ipq6018

Coldboot calibration does not work at the moment and causes failure during
wifi startup.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
8 months agoqca-ssdk: support selecting PCS channel for PORT3 on IPQ6018
Mantas Pucka [Mon, 12 Feb 2024 13:05:25 +0000 (15:05 +0200)]
qca-ssdk: support selecting PCS channel for PORT3 on IPQ6018

When QCA8072 is used in PSGMII mode with IPQ6018, PCS used for second
PHY port would overlap with one used by SGMII+ port. SoC has register
to select different PCS in such case.

Original code used PHY_ID for this decision, which also had other
issues, but is no longer viable since we moved to upstream QCA807x
driver.

Introduce DT property port3_pcs_channel to allow describing this in DT.
Default value is <2>, and for some QCA8072 designs <4> would be needed.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
8 months agoqualcommax: ipq60xx: set correct PHY mode for port 0-4
Mantas Pucka [Mon, 12 Feb 2024 13:09:30 +0000 (15:09 +0200)]
qualcommax: ipq60xx: set correct PHY mode for port 0-4

[port 8ed390a (qualcommax: set correct PHY mode for port 0-4) to ipq60xx]

Port 0-4 have the mode set to SGMII instead of PSGMII. Now that we use
he upstream qca807x driver, this conflicts with the qca SSDK driver
that expects the mode to be PSGMII as for not integrated driver, it does
refer to the real PHY mode.

Update the entry for port 0-4 to PSGMII to solve warning from qca SSDK
in ipq6018-ess.dtsi.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
8 months agoqualcommax: ipq807x: skip factory.ubi image for MX4200
Paweł Owoc [Tue, 16 Jan 2024 22:29:01 +0000 (23:29 +0100)]
qualcommax: ipq807x: skip factory.ubi image for MX4200

Skip building not used factory.ubi image

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
8 months agoqualcommax: ipq807x: remove duplicated sysupgrade image definitions
Paweł Owoc [Thu, 15 Feb 2024 20:33:28 +0000 (21:33 +0100)]
qualcommax: ipq807x: remove duplicated sysupgrade image definitions

Image sysupgrade.bin is defined by default and there is no need to define it.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
8 months agoqualcommax: ipq807x: fix variable definition
Paweł Owoc [Tue, 16 Jan 2024 22:14:58 +0000 (23:14 +0100)]
qualcommax: ipq807x: fix variable definition

Fix variable definition, prevent displaying warnings:
- warning: overriding recipe for target
- warning: ignoring old recipe for target

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
8 months agomac80211: add a fix for racy drv_sta_rc_update calls
Felix Fietkau [Wed, 21 Feb 2024 14:28:31 +0000 (15:28 +0100)]
mac80211: add a fix for racy drv_sta_rc_update calls

Fixes potential crash issues in mt76 and other drivers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 months agoramips: clean up useless dts partition labels
Shiji Yang [Sat, 17 Feb 2024 14:10:10 +0000 (22:10 +0800)]
ramips: clean up useless dts partition labels

The previous NVMEM eeprom conversions[1][2] left a lot of partition
labels that were no longer used. They can be removed now.

[1] https://github.com/openwrt/openwrt/pull/13584
[2] https://github.com/openwrt/openwrt/pull/13587

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
8 months agorockchip: add Radxa CM3 IO board support
Marius Durbaca [Tue, 20 Feb 2024 14:34:43 +0000 (14:34 +0000)]
rockchip: add Radxa CM3 IO board support

Hardware
--------
RockChip RK3566 ARM64 (4 cores)
- up to 8GB LPDDR4X
- 1x HDMI,
- 2x MIPI DSI
- 2x MIPI CSI2
- 1x eDP
- 1x PCIe card
- 2x SATA
- 2x USB 2.0 Host
- 1x USB 3.0
- 1x USB 2.0 OTG
- 10/100/1000 Base-T
- microSD slot
- 40-pin GPIO expansion header
- 12V DC

Radxa CM3 needs to mount on top of this IO board in order to create
complete Radxa CM3 IO board platform.

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

Reviewed-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: Marius Durbaca <mariusd84@gmail.com>
8 months agouboot-rockchip: add Radxa CM3 IO board support
Marius Durbaca [Tue, 20 Feb 2024 14:33:11 +0000 (14:33 +0000)]
uboot-rockchip: add Radxa CM3 IO board support

Add support for the Radxa CM3 IO board.

Reviewed-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: Marius Durbaca <mariusd84@gmail.com>
8 months agorkbin: add rk3566 atf/tpl blobs
Marius Durbaca [Mon, 19 Feb 2024 18:33:24 +0000 (18:33 +0000)]
rkbin: add rk3566 atf/tpl blobs

Currently there are no atf/tpl blobs for rk3566 SoCs
so this commit adds the prebuilt firmware from the vendor.

Signed-off-by: Marius Durbaca <mariusd84@gmail.com>
8 months agomac80211: add AQL support for broadcast/multicast packets
Felix Fietkau [Fri, 9 Feb 2024 19:47:39 +0000 (20:47 +0100)]
mac80211: add AQL support for broadcast/multicast packets

Should improve performance/reliability with lots of mcast packets

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 months agomac80211: update to 6.6.15
Robert Marko [Sun, 4 Feb 2024 12:24:29 +0000 (13:24 +0100)]
mac80211: update to 6.6.15

Update backports to the latest 6.6 point release.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 months agogeneric: replace simple AQR hack patch with upstream version
Christian Marangi [Thu, 15 Feb 2024 20:23:38 +0000 (21:23 +0100)]
generic: replace simple AQR hack patch with upstream version

Simple AQR hack patch has been merged upstream, hence we can drop it from
hack directory and move it to backport.

The patch for 5.15 are correctly reworked to align to outdated API.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
8 months agobuild: don't drop 'user' flag when using the ImageBuilder
Daniel Golle [Tue, 20 Feb 2024 21:14:03 +0000 (21:14 +0000)]
build: don't drop 'user' flag when using the ImageBuilder

Commit be9023ed43 ("build: fix opkg flags in rootfs") introduced a
call to 'awk' which removes the 'user' flag from all installed
packages in the opkg status file. While is is somehow desireable when
building images directly within the buildroot, when using the
ImageBuilder dropping the 'user' flag means loosing information about
a package being deliberately selected or just implicitely pulled as a
dependency. And that then break tools like 'auc' which request only
packages having the 'user' flag from the asu server, resulting in
broken images being delivered to users.

Restore the original behavior in case of an image being created using
the ImageBuilder.

Fixes: be9023ed43 ("build: fix opkg flags in rootfs")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agobuild: add explicit --no-show-signature for git
Oto Šťáva [Fri, 16 Feb 2024 15:28:10 +0000 (16:28 +0100)]
build: add explicit --no-show-signature for git

When `log.showSignature` is set, it causes the `SOURCE_DATE_EPOCH` to
include a textual signature description on OpenPGP-signed commits,
because Git prints the description into stdout. This then causes some
scripts to fail because they cannot parse the date from the variable.

Adding an explicit `--no-show-signature` prevents the signatures from
being displayed even when one has Git configured to show them by
default, fixing the scripts.

Signed-off-by: Oto Šťáva <oto.stava@gmail.com>
8 months agomediatek: filogic: fix mt7981 DT nodenames
Rafał Miłecki [Tue, 20 Feb 2024 11:00:34 +0000 (12:00 +0100)]
mediatek: filogic: fix mt7981 DT nodenames

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 months agomediatek: filogic: improve mt7981 DT coding style
Rafał Miłecki [Tue, 20 Feb 2024 10:49:26 +0000 (11:49 +0100)]
mediatek: filogic: improve mt7981 DT coding style

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 months agomediatek: filogic: reorder mt7981 DT properties
Rafał Miłecki [Tue, 20 Feb 2024 10:44:24 +0000 (11:44 +0100)]
mediatek: filogic: reorder mt7981 DT properties

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 months agomediatek: filogic: reorder mt7981 DT SoC reg-based nodes
Rafał Miłecki [Tue, 20 Feb 2024 10:21:42 +0000 (11:21 +0100)]
mediatek: filogic: reorder mt7981 DT SoC reg-based nodes

Follow upstream Linux kernel guidelines:
https://www.kernel.org/doc/html/next/devicetree/bindings/dts-coding-style.html#order-of-nodes

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 months agomediatek: filogic: reorder mt7981 DT name-based nodes
Rafał Miłecki [Tue, 20 Feb 2024 09:42:40 +0000 (10:42 +0100)]
mediatek: filogic: reorder mt7981 DT name-based nodes

Follow upstream Linux kernel guidelines:
https://www.kernel.org/doc/html/next/devicetree/bindings/dts-coding-style.html#order-of-nodes

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 months agogeneric: 6.1: add missing symbol for EN8811H PHY driver
Robert Marko [Mon, 19 Feb 2024 20:38:40 +0000 (21:38 +0100)]
generic: 6.1: add missing symbol for EN8811H PHY driver

Disable Airoha EN8811H PHY driver by default to avoid individual targets having to
disable it.

Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agorockchip: add NanoPi R4S Enterprise Edition build
Tianling Shen [Sat, 17 Feb 2024 05:54:36 +0000 (13:54 +0800)]
rockchip: add NanoPi R4S Enterprise Edition build

FriendlyElec renamed the NanoPi R4S board with EEPROM (mac address)
to "enterprise" edition, and it was added as a "new" board in upstream
kernel.

This patch switched to use that upstreamed dts and removed local
EEPROM patch.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
8 months agoath79: update WA/XC devices UBNT_VERSION to 8.7.4
Martin Garbe [Tue, 13 Feb 2024 06:49:05 +0000 (07:49 +0100)]
ath79: update WA/XC devices UBNT_VERSION to 8.7.4

Ubiquiti WA devices with newer hw version (sold 2023)
require UBNT_VERSION to be at least 8.7.4, otherwise
the image is rejected.

For consistency, also increase version number for XC devices.

Signed-off-by: Martin Garbe <monomartin@opennet-initiative.de>
8 months agorockchip: add NanoPi R2C Plus support
Tianling Shen [Fri, 16 Feb 2024 06:34:40 +0000 (14:34 +0800)]
rockchip: add NanoPi R2C Plus support

The NanoPi R2C Plus is a small variant of NanoPi R2C with a on-board
eMMC flash (8G) included.

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

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
8 months agouboot-rockchip: add NanoPi R2C Plus support
Tianling Shen [Fri, 16 Feb 2024 06:33:49 +0000 (14:33 +0800)]
uboot-rockchip: add NanoPi R2C Plus support

Add support for the FriendlyARM NanoPi R2C Plus.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
8 months agoqualcommax: backport more changes for ipq6018 and ipq8074
Chukun Pan [Mon, 15 Jan 2024 15:28:13 +0000 (23:28 +0800)]
qualcommax: backport more changes for ipq6018 and ipq8074

 - Mark patches as upstream
 - Backport more upstream changes
 - Handle conflicts and refresh patches

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
8 months agobase-files: sysupgrade: include uci-defaults script disabling services
Rafał Miłecki [Wed, 14 Feb 2024 15:05:19 +0000 (16:05 +0100)]
base-files: sysupgrade: include uci-defaults script disabling services

Disabled services should be kept disabled after sysupgrade. This can be
easily handled using a proper uci-defaults script.

Extend sysupgrade to check for disabled services, generate uci-defaults
script disabling them and include it in backup.

Cc: Christian Marangi <ansuelsmth@gmail.com>
Cc: Jo-Philipp Wich <jo@mein.io>
Cc: Jonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Jo-Philipp Wich <jo@mein.io>
8 months agobase-files: sysupgrade: always setup overlay when creating backup
Rafał Miłecki [Tue, 13 Feb 2024 21:10:37 +0000 (22:10 +0100)]
base-files: sysupgrade: always setup overlay when creating backup

Setting overlay while creating backup allows including extra files in
archive without actually writing them to flash. Right now this feature
is limited to /etc/backup/ directory and is used only for including
installed_packages.txt.

Extend this solution to make it more generic:
1. Always mount overlay while creating backup
2. Overlay whole / to don't limit it to /etc/backup/

This allows including any additional files in backups and adding more
sysupgrade features.

Cc: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Cc: Christian Marangi <ansuelsmth@gmail.com>
Cc: Jo-Philipp Wich <jo@mein.io>
Cc: Jonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 months agobase-files: sysupgrade: always cleanup after backups
Luiz Angelo Daros de Luca [Thu, 20 Oct 2022 02:27:52 +0000 (23:27 -0300)]
base-files: sysupgrade: always cleanup after backups

When tar was failing, it was exiting immediately. Some files and the
tmpfs mount (-k) would remain breaking the next backup attempt.

Also remove redundant $? from exit builtin call as exit already returns
the last command exit code when called.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
8 months agobase-files: sysupgrade: do not hide tar errors
Luiz Angelo Daros de Luca [Thu, 20 Oct 2022 02:12:49 +0000 (23:12 -0300)]
base-files: sysupgrade: do not hide tar errors

tar stderr was probably discarded only to remove this message:

  tar: removing leading '/' from member names

However, together with that, any other error would also be discarded.
It is easier to fix that allowing the error message to be printed.

In sysupgrade, the backup file list only uses absolute paths. That way,
the solution is to remove the leading '/' from all files (sed) and chdir
to / (option -C /)

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
8 months agomediatek: filogic: move mt7981 on-SoC blocks to "soc" node in DT
Rafał Miłecki [Mon, 19 Feb 2024 05:36:37 +0000 (06:36 +0100)]
mediatek: filogic: move mt7981 on-SoC blocks to "soc" node in DT

It's a standard way of grouping on-SoC hardware blocks and this matches
upstream DTS.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 months agomediatek: filogic: fix nvmem cell names of the GL.iNet MT-2500
Daniel Golle [Sun, 18 Feb 2024 05:02:38 +0000 (05:02 +0000)]
mediatek: filogic: fix nvmem cell names of the GL.iNet MT-2500

Fix style of nvmem cell names in the device tree of the GL.iNet MT-2500.

Fixes: 49ed52b862 ("mediatek: filogic: convert GL.iNet MT-2500 to use NVMEM-on-MMC)"
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agolinux-firmware: intel: add BE200 wifi firmware
Janusz Dziedzic [Thu, 1 Feb 2024 08:37:54 +0000 (09:37 +0100)]
linux-firmware: intel: add BE200 wifi firmware

Add option to install Intel BE200 firmware
required by iwlwifi driver and Wifi7 hardware.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
8 months agoimx: remove 5.15 support
Koen Vandeputte [Tue, 13 Feb 2024 10:18:16 +0000 (11:18 +0100)]
imx: remove 5.15 support

Drop all 5.15 files as 6.1 is the default now

Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
8 months agoimx: switch to kernel 6.1
Koen Vandeputte [Tue, 13 Feb 2024 10:18:03 +0000 (11:18 +0100)]
imx: switch to kernel 6.1

I have this kernel running for weeks some
on a lot of boards in multiple scenarios

Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
8 months agokernel: bump 6.1 to 6.1.78
John Audia [Fri, 16 Feb 2024 21:57:53 +0000 (16:57 -0500)]
kernel: bump 6.1 to 6.1.78

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

Manually rebased:
bcm27xx/patches-6.1/950-0865-usb-dwc3-Set-DMA-and-coherent-masks-early.patch
bcm27xx/patches-6.1/950-0124-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch

All other patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
8 months agomvebu: drop kernel 5.15 config and patches
Stefan Kalscheuer [Sat, 17 Feb 2024 16:59:08 +0000 (17:59 +0100)]
mvebu: drop kernel 5.15 config and patches

With default now being at 6.1 we can remove all 5.15 components.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
8 months agomvebu: switch to kernel 6.1
Stefan Kalscheuer [Sat, 17 Feb 2024 16:55:43 +0000 (17:55 +0100)]
mvebu: switch to kernel 6.1

After a few months of testing it's time to move to 6.1 by default.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
8 months agoca-certificates: update to version 20240203
Seo Suchan [Sat, 17 Feb 2024 23:58:54 +0000 (08:58 +0900)]
ca-certificates: update to version 20240203

Update Mozilla certificate authority bundle to version 2.64

Signed-off-by: Seo Suchan <tjtncks@gmail.com>
8 months agorealtek: fix Netgear GS110TPP OEM install
Bjørn Mork [Sat, 17 Feb 2024 14:03:40 +0000 (15:03 +0100)]
realtek: fix Netgear GS110TPP OEM install

Recent OEM firmware versions test the version number embedded in the uimage
"name" header field. The exact restricton is unknown, but "7.0.8.4" seems
to be the lowest number accepted on a GS110TPPv1 which already has that
version or higher.

A "9.9.9.9" version is accepted as valid by the GS110TPPv1 OEM firmware,
and considered both unique enough to identify an OpenWrt image and
moderately future proof against OEM version bumps.

This change is also boot tested on a GS108Tv3 with

 "BOOT Loader Version 1.0.0.2 (2018-08-31 17:05:26 UTC)"

to verify that it doesn't break boot on older hardware.

Link: https://forum.openwrt.org/t/72510/58
Signed-off-by: Bjørn Mork <bjorn@mork.no>
8 months agomediatek: filogic: convert GL.iNet MT-2500 to use NVMEM-on-MMC
Daniel Golle [Sat, 17 Feb 2024 22:22:28 +0000 (22:22 +0000)]
mediatek: filogic: convert GL.iNet MT-2500 to use NVMEM-on-MMC

Use nvmem-layout in device tree instead of extracting MAC addresses
in userspace.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agomediatek: mt7981: remove inaccurate compatible strings
Daniel Golle [Sun, 18 Feb 2024 03:13:23 +0000 (03:13 +0000)]
mediatek: mt7981: remove inaccurate compatible strings

Remove more inaccurate compatible strings from various clock controllers
of the MT7981 SoC.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agomediatek: mt7981: prevent system freezes on boot
Daniel Golle [Sun, 18 Feb 2024 03:12:01 +0000 (03:12 +0000)]
mediatek: mt7981: prevent system freezes on boot

Import patch to make sure SGM_REG_SEL clock is always enabled as it
seems that more registers than just SGMIISYS0 and SGMIISYS1 are
depending on that clock being enabled.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agomediatek: filogic: convert GL.iNet MT-6000 to NVMEM-on-MMC
Daniel Golle [Sat, 17 Feb 2024 22:14:01 +0000 (22:14 +0000)]
mediatek: filogic: convert GL.iNet MT-6000 to NVMEM-on-MMC

Now that we can reference MMC partitions in device tree, use that
to get rid of Wi-Fi EEPROM and MAC address setup in userspace.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agokernel: nvmem: correctly assign fwnode to MMC block device
Daniel Golle [Sun, 18 Feb 2024 01:02:46 +0000 (01:02 +0000)]
kernel: nvmem: correctly assign fwnode to MMC block device

Use device_set_node to make sure OF node gets assigned on block
devices to be used as NVMEM providers. While block partitions were
already working fine as NVMEM providers, bare block devices such as
mmcblk0boot1 will not work without this change.

Fixes: fc153aa8d9 ("kernel: import pending patches adding support for NVMEM on UBI and MMC")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agoqualcommax: ipq807x: wax630: correct UNIPHY2 MAC mode
Robert Marko [Sat, 17 Feb 2024 16:44:20 +0000 (17:44 +0100)]
qualcommax: ipq807x: wax630: correct UNIPHY2 MAC mode

UNIPHY2 on the WAX630 is connected to a QCA8081 PHY which is only 2.5G and
it does not support using USXGMII at all but rather only SGMII or SGMII+.

Tested-by: Kristian Skramstad <kristian+github@83.no>
Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agomediatek: dts: mt7981: fix ethsys clock compatible
Daniel Golle [Sat, 17 Feb 2024 17:54:05 +0000 (17:54 +0000)]
mediatek: dts: mt7981: fix ethsys clock compatible

Remove inaccurate compatible string 'mediatek,mt7986-ethsys' which
results in the wrong clock driver probing on MT7981 with Linux 6.1 and
ends up freezing the system once WED is used.

Fixes: da970d63fb ("mediatek: switch to Linux version 6.1")
Reported-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 months agomediatek: filogic: replace built-in Aquantia driver with module
Rafał Miłecki [Wed, 17 Jan 2024 21:20:15 +0000 (22:20 +0100)]
mediatek: filogic: replace built-in Aquantia driver with module

Some Aquantia PHYs (e.g. AQR113C) require firmware to be uploaded by
host system. With built-in drivers this doesn't work in OpenWrt /
embeddded as filesystem isn't available during PHY probe. That results
in delays like:
[    1.588068] Aquantia AQR113C mdio-bus:00: Falling back to sysfs fallback for: Rhe-05.06-Candidate9-AQR_Mediatek_23B_P5_ID45824_LCLVER1.cld
[   64.526387] Aquantia AQR113C mdio-bus:00: failed to find FW file Rhe-05.06-Candidate9-AQR_Mediatek_23B_P5_ID45824_LCLVER1.cld (-110)

Switch to module to postpone PHY probe to init state.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 months agoqualcommax: ipq807x: correct PHY mode for AQR
Robert Marko [Sat, 17 Feb 2024 16:39:22 +0000 (17:39 +0100)]
qualcommax: ipq807x: correct PHY mode for AQR

Interfaces that have AQR-s attached to them are using USXGMII and not just
the default SGMII.
This was fine until SSDK added some sanity checking and now on Qnap 301W it
would fail with:
[   24.740197] nss-dp 3a001800.dp5 10g-1 (uninitialized): failed to connect to phy device
[   24.740264] nss-dp: probe of 3a001800.dp5 failed with error -14

Since this is not Qnap 301W specific lets fix it subtarget wide by
declaring the correct PHY mode for 10G AQR-s.

Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agoqualcommax: ipq807x: 301w: correct PHY mode for AQR
Robert Marko [Sat, 17 Feb 2024 12:41:36 +0000 (13:41 +0100)]
qualcommax: ipq807x: 301w: correct PHY mode for AQR

Interfaces that have AQR-s attached to them are using USXGMII and not just
the default SGMII.
This was fine until SSDK added some sanity checking and now on Qnap 301W it
would fail with:
[   24.740197] nss-dp 3a001800.dp5 10g-1 (uninitialized): failed to connect to phy device
[   24.740264] nss-dp: probe of 3a001800.dp5 failed with error -14

So, lets fix 10G AQR ports by declaring the correct PHY mode.

Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agomediatek: mt7622: skip build also for Xiaomi AX6S
Daniel Golle [Sat, 17 Feb 2024 14:22:31 +0000 (14:22 +0000)]
mediatek: mt7622: skip build also for Xiaomi AX6S

Also here build fails due to increased kernel size.

Fixes: da970d63fb ("mediatek: switch to Linux version 6.1")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
9 months agobuild: align SOURCE path for build system and SDK
Paul Spooren [Mon, 12 Feb 2024 15:59:50 +0000 (16:59 +0100)]
build: align SOURCE path for build system and SDK

Building a package in the build system or the SDK results in different
values for the `SOURCE` property, it's either `packages/<package name>`
or `feeds/base/<package name>`. The reason is that the SDK handles
`openwrt.git` as an external feed called while the build system contains
the *base* packages directly.

Since packages created with either method are (ideally) the same (bit
for bit), align the content of SOURCE. To do so this commit creates a
symlink from `feeds/base` to `$(TOPDIR)/package` and adopts the SOURCE
when building from inside the build system.

Signed-off-by: Paul Spooren <mail@aparcar.org>
9 months agowifi-scripts: fix FILS AKM selection with EAP-192
Eneas U de Queiroz [Sat, 3 Feb 2024 19:33:14 +0000 (16:33 -0300)]
wifi-scripts: fix FILS AKM selection with EAP-192

Fix netifd hostapd.sh selection of FILS-SHA384 algorithm with eap-192.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
9 months agomediatek: mt7622: skip build for MT7622 rfb1 (UBI)
Daniel Golle [Sat, 17 Feb 2024 04:26:00 +0000 (04:26 +0000)]
mediatek: mt7622: skip build for MT7622 rfb1 (UBI)

Due to increased kernel size the build currently fails if including
the MT7622 rfb1 (UBI). Skip it for now until there is a better
solution (such as replacing the bootloader and changing the flash
layout).

Fixes: da970d63fb ("mediatek: switch to Linux version 6.1")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
9 months agomediatek: filogic: bpi-r3-mini: include kmod-phy-airoha-en8811h
Daniel Golle [Sat, 17 Feb 2024 01:23:34 +0000 (01:23 +0000)]
mediatek: filogic: bpi-r3-mini: include kmod-phy-airoha-en8811h

Include the needed Ethernet PHY driver module for the BananaPi R3 mini.

Fixes: b03d3644cf ("mediatek: filogic: add BananaPi BPi-R3 mini")
Reported-by: BPI forum user nezar_taima
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
9 months agolua5.3: backport CVE fix
Rosen Penev [Sun, 11 Feb 2024 02:13:10 +0000 (18:13 -0800)]
lua5.3: backport CVE fix

Also refreshed some patches

Signed-off-by: Rosen Penev <rosenp@gmail.com>
9 months agolua: fix CVE-2014-5461
Rosen Penev [Sun, 11 Feb 2024 23:06:44 +0000 (15:06 -0800)]
lua: fix CVE-2014-5461

Patch taken from Debian.

Refresh patches

Signed-off-by: Rosen Penev <rosenp@gmail.com>
9 months agoimages: append to existing image with ubinize-image build cmd
Daniel Golle [Fri, 16 Feb 2024 13:55:12 +0000 (13:55 +0000)]
images: append to existing image with ubinize-image build cmd

Let ubinize-image append the ubinized image to the existing image
instead of replacing it.

Fixes: 6c17d71973 ("scripts: ubinize-image.sh: support static volumes, make size optional")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
9 months agomediatek: filogic: bpi-r3-mini: fix power on M.2 slot
Tianling Shen [Fri, 16 Feb 2024 05:37:17 +0000 (13:37 +0800)]
mediatek: filogic: bpi-r3-mini: fix power on M.2 slot

One of the pins requiered by M.2 slot is conflict with spi1,
however, spi1 seems unused so simply disable it for now, this
matches the factory behavior [1].

1. https://github.com/BPI-SINOVOIP/BPI-R3MINI-OPENWRT-V21.02.3/commit/9bd78779f267a21c04c5bb4d16c32e83aae8d1d3

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
9 months agomediatek: filogic: bpi-r3-mini: bind WLAN LED-s to phy*-ap0
Tianling Shen [Fri, 16 Feb 2024 05:29:44 +0000 (13:29 +0800)]
mediatek: filogic: bpi-r3-mini: bind WLAN LED-s to phy*-ap0

For showing wlan status.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
9 months agomediatek: filogic: bpi-r3-mini: convert to new LED color/function format
Tianling Shen [Fri, 16 Feb 2024 05:26:51 +0000 (13:26 +0800)]
mediatek: filogic: bpi-r3-mini: convert to new LED color/function format

Conversion to new LED color/function format and drop label format.

This was needed previously when the new format wasn't supported by
leds.sh functions script. Now that is supported this property can be
removed in favor of the new format.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
9 months agouboot-mediatek: bpi-r3-mini: fix typo in bootmenu
Daniel Golle [Fri, 16 Feb 2024 05:47:53 +0000 (05:47 +0000)]
uboot-mediatek: bpi-r3-mini: fix typo in bootmenu

Fix typo in eMMC bootmenu.

Fixes: bc25519f98 ("uboot-mediatek: add builds for BananaPi BPi-R3 mini")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
9 months agoath79: generic: fix the alphabetical order in 02_network
Foica David [Wed, 14 Feb 2024 21:32:27 +0000 (23:32 +0200)]
ath79: generic: fix the alphabetical order in 02_network

This commit fixes the alphabetical order in 02_network.
The 2 deco devices in ath79_setup_interfaces() were in the wrong place.

Signed-off-by: Foica David <superh552@gmail.com>
9 months agoqualcommax: AW1000: add qca8081 PHY LED configuration
Chukun Pan [Tue, 30 Jan 2024 15:25:27 +0000 (23:25 +0800)]
qualcommax: AW1000: add qca8081 PHY LED configuration

Since we can configure the PHY LED of the qca8081,
add a configuration for this device.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Robert Marko <robimarko@gmail.com>