openwrt/staging/stintel.git
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 months agokernel: qca-ssdk: set OF node for the SFP PHY
Robert Marko [Sun, 25 Jun 2023 09:29:24 +0000 (11:29 +0200)]
kernel: qca-ssdk: set OF node for the SFP PHY

Currently, SSDK is creating a fake SFP PHY which has no OF node populated,
thus making it impossible to pass it to NSS-DP so port can actually work.

We eliminated QCA-s connecting of the PHY by manually creating a string
and then matching by name and instead only support passing the PHY as
phandle via phy-handle.

So, lets just use the switch port node to which the SFP is connected to
anyway and set it as the PHY device OF node so we can pass it to NSS-DP.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoimage: exclude initramfs-images dependency with IB
Christian Marangi [Tue, 9 Jul 2024 02:41:21 +0000 (04:41 +0200)]
image: exclude initramfs-images dependency with IB

Exclude initramfs-images dependency with IB as the target is not defined
in such context.

Fixes: cc6a0abcabf7 ("image: make images and artifacts dependent of initramfs")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agotools: util-linux: disable NLS again
Robert Marko [Mon, 8 Jul 2024 18:47:01 +0000 (20:47 +0200)]
tools: util-linux: disable NLS again

It seems that util-linux enables NLS support by default, this worked for
almost all platforms except for macOS on x86 where it seems that libintl is
preinstalled and thus it will link against gettext with libintl for NLS
support.

This would the later cause e2fsprogs and mtd-utils to fail:
Undefined symbols for architecture x86_64:
  "_libintl_gettext", referenced from:
      _random_tell_source in libuuid.a[13](libuuid_la-randutils.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Issue appeared after I converted the tool to use --disable-all-programs and
accidentally dropped the --disable-nls from the args.

Fixes: 54115ec22d15 ("tools: util-linux: use --disable-all-programs")
Link: https://github.com/openwrt/openwrt/pull/15909
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoqualcommax: ipq807x: fix build error with no initramfs for RAX120v2
Christian Marangi [Mon, 8 Jul 2024 11:21:13 +0000 (13:21 +0200)]
qualcommax: ipq807x: fix build error with no initramfs for RAX120v2

Exclude additional initramfs image for Netgear RAX120v2 when no
initramfs image are compiled to fix build error.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoimage: make images and artifacts dependent of initramfs
Christian Marangi [Mon, 8 Jul 2024 11:10:52 +0000 (13:10 +0200)]
image: make images and artifacts dependent of initramfs

There is currently a BIG bug in how the images dependency is handled and
recent Per Device Rootfs made this more clear and less statistical.

There is currently no dependency between images/artifacts build with
initramfs build. This cause whatever additional image that depends on an
initramfs image to fail as it might happen that image and initramfs
build are called at the same time and the additional image is called
before initramfs build has finished.

Each image-command assume the source image to be taken from the /bin
directory but that is only copied from the /tmp directory only at the
end of the process.

Artifacts currently depends on image with the use of the
BOARD-NAME-images Makefile target, but this is not the case for
initramfs that also define a -images Makefile target but that is not
accounted in images (that might depend on some initramfs images)

To actually fix this, introduce a new Makefile target, -initramfs-images
and make image and artifacts build to depend on this. Since initramfs
images are optional, this dependency is actived only when initramfs
image are built.

With this change we correctly enforce the build order:
- Initramfs Images (optional)
- Images
- Artifacts

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: aldo fix CopyImage for Separate Initramfs
Christian Marangi [Sun, 7 Jul 2024 17:28:35 +0000 (19:28 +0200)]
kernel: aldo fix CopyImage for Separate Initramfs

Also fix CopyImage for Separate Initramfs with Per Device Rootfs.

Fixes: 7bffb3f72bbf ("kernel: fix CopyImage function with Per Device Rootfs")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: fix x86 compilation on macOS
Robert Marko [Mon, 8 Jul 2024 07:46:02 +0000 (09:46 +0200)]
kernel: fix x86 compilation on macOS

Trying to compile x86 or x86_64 on macOS will fail with:
openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.36/tools/include/linux/rbtree.h:21:10: fatal error: 'linux/stddef.h' file not found

After some digging, it seems that we dropped the old 212-tools_portability
patch when 6.6 x86 support was added, then Felix added back some parts of
it in ("kernel: fix tools build breakage on macos with x86") but trying to
build x86 kernels will still fail.

So, lets add more of the required changes from the 212-tools_portability
patch so that x86 kernels build on macOS.

Fixes: 69b145188f1a ("generic: 6.6: Removal of tools_portability.patch already included in kernel 6.6")
Link: https://github.com/openwrt/openwrt/pull/15904
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoreadline: fix pkgconfig usage
Rosen Penev [Thu, 4 Jul 2024 19:12:33 +0000 (12:12 -0700)]
readline: fix pkgconfig usage

ncurses is built with wide support enabled, which enables libncursesw.
The problem is, the ncurses build system only supplies ncursesw or
ncurses.pc but not both. The other problem is, the readline build tests
for libncurses before the w variant, making its pc file unusable as
there is no ncurses.pc file to satisfy the Required: ncurses section.

Just override the library.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15864
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoncurses: enable pc files in the host build
Rosen Penev [Thu, 4 Jul 2024 00:53:36 +0000 (17:53 -0700)]
ncurses: enable pc files in the host build

Needed for things such as readline that depend on ncurses.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15864
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/elfutils: simplify and cleanup Makefile
Michael Pratt [Thu, 20 Jun 2024 05:28:00 +0000 (01:28 -0400)]
tools/elfutils: simplify and cleanup Makefile

After changes to default host build recipes
and default variable definitions,
several custom definitions can be removed,
and the gnulib recipes replaced
with hooks to common recipes.

Also remove leftover PKG_INSTALL
which has no effect for host builds.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15853
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobuild: let HOST_CXXFLAGS default to HOST_CFLAGS
Michael Pratt [Thu, 20 Jun 2024 05:10:21 +0000 (01:10 -0400)]
build: let HOST_CXXFLAGS default to HOST_CFLAGS

Usage of g++ should mimic the usage of gcc,
otherwise, part of a binary or library may have
optimizations and part of it may not,
unbeknownst to the users or developers working on a build.
This can lead to some features like, for example, FORTIFY_SOURCE,
to have less of an effect or even cause a build error on some hosts.

Therefore, let HOST_CXXFLAGS default to HOST_CFLAGS.

Fixes: 87d489f67 ("build: add HOST_CXXFLAGS for host build")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15853
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobuild: add default host build recipes for gnulib
Michael Pratt [Thu, 20 Jun 2024 04:55:58 +0000 (00:55 -0400)]
build: add default host build recipes for gnulib

Add generic recipes for incorporating gnulib into a build
for simplification and readability of the individual build Makefile.

Recipes for configuring and installing are purposefully missing
since "configuring" gnulib is done with standard autoreconf
and gnulib is not a final build target meant for installing.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15853
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobuild: add support for PKG_SUBDIRS variable
Michael Pratt [Thu, 20 Jun 2024 04:23:39 +0000 (00:23 -0400)]
build: add support for PKG_SUBDIRS variable

Add support for overriding the SUBDIRS variable while invoking Make
by defining it after Make in the command line.

This is useful for builds that have previously patched out
the building of certain subdirectories in projects
that use recursive and independent Makefiles,
for example, to block the building of docs or test suites.

The wildcard function is used in the case of there being
subdirectories within any of the subdirectories,
for example, in the building of gengetopt,
in order to avoid the problem where Make will attempt
to execute a Makefile in a subdirectory that does not exist
within the subdirectory it is currently running from
because it really exists at the top-level, or one that exists
within one of the subdirectories when ran from top-level.
There are also cases where the Makefiles in the subdirectories
have the recursive building rules even though there are no more
subdirectories beyond that point, for example, with gnulib.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15853
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/elfutils: remove header symlink between subdirectories
Michael Pratt [Wed, 15 May 2024 23:43:00 +0000 (19:43 -0400)]
tools/elfutils: remove header symlink between subdirectories

Replace the symlink in the build recipe for gnulib
with an extra include path flag in CPPFLAGS to the lib subdirectory
so that it is the last in the order of include paths,
and use a quote escape to make the flag a literal string
in order to use Make variables within it.

The original reason this is necessary is because the config.h header
provided by the project at the top-level build directory
calls another header eu-config.h
which is stored in the lib subdirectory instead of the top-level,
and building the gnulib library requires the config.h header.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15853
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agokernel: bump 6.1 to 6.1.97
Zxl hhyccc [Fri, 5 Jul 2024 18:29:52 +0000 (02:29 +0800)]
kernel: bump 6.1 to 6.1.97

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

All patches automatically rebased.

Build system: Kirkwood bcm53xx

Signed-off-by: Zxl hhyccc <zxlhhy@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15883
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agoprocd: bump to git HEAD
Daniel Golle [Sun, 7 Jul 2024 20:25:22 +0000 (21:25 +0100)]
procd: bump to git HEAD

 f230c11 utils: use strlcpy when appropriate
 a8cf548 jail: fix copy & paste error in parseOCIlinux()
 1e411a5 utils: get_cmdline_val: add missing error check

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agokernel: fix CopyImage function with Per Device Rootfs
Christian Marangi [Sun, 7 Jul 2024 16:24:24 +0000 (18:24 +0200)]
kernel: fix CopyImage function with Per Device Rootfs

Some target define custom kernel images with KERNEL_INITRAMFS_NAME to
reference .elf variant of vmlinux.

With Per Device Rootfs, the expected format is
image.suffix.extension.ROOTFS_ID, while in CopyImage we are currently
generating images with image.suffix.ROOTFS_ID.extension making some
target failing.

Fix CopyImage function to correctly follow the expected pattern.

Fixes: 97fd059e7e6a ("image: respect TARGET_PER_DEVICE_ROOTFS for initramfs")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agomediatek: fit: fix use of uninitialized variable
Qingfang Deng [Fri, 28 Jun 2024 09:01:00 +0000 (17:01 +0800)]
mediatek: fit: fix use of uninitialized variable

When building the kernel with -Wmaybe-uninitialized, GCC reports this
warning:

block/partitions/fit.c: In function 'parse_fit_partitions':
block/partitions/fit.c:164:3: warning: 'images' may be used uninitialized in this function [-Wmaybe-uninitialized]
  164 |   printk(KERN_ERR "FIT: Cannot find %s node: %d\n", FIT_CONFS_PATH, images);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It appears to be a copy paste error. It's the "config" variable that is
supposed to be printed.

Fixes: e6aac8d98f56 ("image: add support for building FIT image with filesystem")
Signed-off-by: Qingfang Deng <qingfang.deng@siflower.com.cn>
5 months agokernel: mtdsplit: fix fit rootfs_data split
Chuanhong Guo [Fri, 28 Jun 2024 08:31:59 +0000 (16:31 +0800)]
kernel: mtdsplit: fix fit rootfs_data split

fit size should be rounded up instead of rounding down first and adding
a block. Otherwise the calculated size is one block more than needed
when fit size is exactly multiples of one block size.

Fixes: 9a863f803ec1 ("kernel: mtdsplit: add support for FIT image")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Qingfang Deng <qingfang.deng@siflower.com.cn>
5 months agolantiq: replace gswip patches with upstream version
Martin Schiller [Wed, 26 Jun 2024 08:39:18 +0000 (10:39 +0200)]
lantiq: replace gswip patches with upstream version

Replace recently added patches with version accepted upstream.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agolantiq: remove 6.1 kernel support
Martin Schiller [Wed, 26 Jun 2024 08:18:27 +0000 (10:18 +0200)]
lantiq: remove 6.1 kernel support

Since 6.6 is now default, drop 6.1 support.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agolantiq: switch to kernel 6.6
Martin Schiller [Wed, 26 Jun 2024 08:16:31 +0000 (10:16 +0200)]
lantiq: switch to kernel 6.6

Let's switch the lantiq target to use kernel 6.6 by default.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agogeneric: 6.6: backport fix for broken cmdline "nosmp" and "maxcpus=0"
Martin Schiller [Mon, 1 Jul 2024 09:41:36 +0000 (11:41 +0200)]
generic: 6.6: backport fix for broken cmdline "nosmp" and "maxcpus=0"

This backports the fix for the broken "nosmp" and "maxcpus=0" cmdline
params.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agokernel: ltq-adsl: fix enum missmatch on linux 6.6
Martin Schiller [Tue, 2 Jul 2024 07:34:37 +0000 (09:34 +0200)]
kernel: ltq-adsl: fix enum missmatch on linux 6.6

Convert DSL_XTUDir_t to DSL_AccessDir_t to get rid of enum-conversion
warning.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agoltq-tapi: fix build with Linux 6.6
Daniel Golle [Fri, 28 Jun 2024 02:06:08 +0000 (03:06 +0100)]
ltq-tapi: fix build with Linux 6.6

Satisfy compiler expectations in a hell of typedef's and get rid of
system-wide workqueue flush. Results in warning-free compile of the TAPI
driver also with Linux 6.6.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agolantiq: remove 5.15 kernel support
Martin Schiller [Wed, 26 Jun 2024 08:14:49 +0000 (10:14 +0200)]
lantiq: remove 5.15 kernel support

Since 6.1 is now default, drop 5.15 support.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agokernel: skip rebuilding kernel with ROOTFS_INITRAMFS_SEPARATE
Christian Marangi [Sat, 6 Jul 2024 11:40:40 +0000 (13:40 +0200)]
kernel: skip rebuilding kernel with ROOTFS_INITRAMFS_SEPARATE

With PER_DEVICE_ROOTFS, rebuilding kernel is needed to embed the cpio
image in the kernel image. With ROOTFS_INITRAMFS_SEPARATE, the cpio
image is external hence we can reuse the same kernel image without
rebuilding it.

Link: https://github.com/openwrt/openwrt/pull/12959
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoimage: respect TARGET_PER_DEVICE_ROOTFS for initramfs fit command
Christian Marangi [Fri, 5 Jul 2024 16:17:44 +0000 (18:17 +0200)]
image: respect TARGET_PER_DEVICE_ROOTFS for initramfs fit command

Fit command makes use of CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE as the
cpio is provided externally and is not embedded in the kernel image.

As done with embedded cpio, also handle PER_DEVICE_ROOTFS by generating
a cpio for each rootfs and reference them by the ROOTFS_ID generated
previously. The generated cpio are placed in the linux directory + the
package ID.

Link: https://github.com/openwrt/openwrt/pull/12959
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoimage: respect TARGET_PER_DEVICE_ROOTFS for initramfs
Luiz Angelo Daros de Luca [Wed, 21 Jun 2023 23:02:47 +0000 (20:02 -0300)]
image: respect TARGET_PER_DEVICE_ROOTFS for initramfs

Initramfs images were using a common rootfs (TARGET_DIR) for all
devices, ignoring TARGET_PER_DEVICE_ROOTFS. If a single device required
a package to build a functional initramfs image, it should be included
by default for all devices or that device should be isolated into a new
subtarget. Now the initramfs will be built using the target-specific

Implementing Per Device Rootfs for Initramfs is not trivial as the
rootfs needs to be embedded in the kernel image. The kernel supports an
option to define the initramfs location and the image generation for the
kernel can't be run in parallel as other checks are done to config and
other arch dependent files.

To handle this, we prepare a config for each rootfs and we generate the
images under lock to prevent problem with parallel execution.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
[ rework implementation for locking support ]
Link: https://github.com/openwrt/openwrt/pull/12959
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: simplify SetInitramfs compression ALGO config setup
Christian Marangi [Fri, 5 Jul 2024 12:58:20 +0000 (14:58 +0200)]
kernel: simplify SetInitramfs compression ALGO config setup

Simplify SetInitramfs compression ALGO config setup by using Makefile
foreach.
While at it also make it more readable.

Link: https://github.com/openwrt/openwrt/pull/12959
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: make LINUX_DIR configurable for SetInitramfs functions
Christian Marangi [Fri, 5 Jul 2024 12:37:18 +0000 (14:37 +0200)]
kernel: make LINUX_DIR configurable for SetInitramfs functions

Rework SetInitramfs functions to take a second arg to define the
location of the .config. This is needed in preparation for PER_ROOTFS
Initramfs support as we will prepare .config in dedicated directory and
use them only later when the image is actually built.

Link: https://github.com/openwrt/openwrt/pull/12959
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: allow different TARGET_DIR for initramfs
Luiz Angelo Daros de Luca [Thu, 3 Aug 2023 22:05:13 +0000 (19:05 -0300)]
kernel: allow different TARGET_DIR for initramfs

Allow Kernel/CompileImage/Initramfs to use a different rootfs location.
If the additional arg is not defined, TARGET_DIR is used by default.

This allows the caller to customize the kernel initramfs for different
rootfs.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
[ simplify commit and rework commit description ]
Link: https://github.com/openwrt/openwrt/pull/12959
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agogeneric: 6.6: mtk_eth_soc: add support for flow-control settings
Daniel Golle [Thu, 4 Jul 2024 01:19:01 +0000 (02:19 +0100)]
generic: 6.6: mtk_eth_soc: add support for flow-control settings

Add patch implementing operations to get and set flow-control link
parameters of mtk_eth_soc via ethtool.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agogeneric: 6.6: mtk_eth_soc: import accepted patches
Daniel Golle [Sat, 6 Jul 2024 03:02:31 +0000 (04:02 +0100)]
generic: 6.6: mtk_eth_soc: import accepted patches

Import two imported patches accepted upstream.
Move from pending:
 - net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops

Initial import:
 - net: ethernet: mtk_ppe: Change PPE entries number to 16K

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agobcm27xx: update to latest RPi patches
Álvaro Fernández Rojas [Wed, 3 Jul 2024 18:30:59 +0000 (20:30 +0200)]
bcm27xx: update to latest RPi patches

The patches were generated from the RPi repo with the following command:
git format-patch v6.6.36..rpi-6.6.y

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agomediatek: filogic: openwrt,one: remove unneeded caldata extraction
Daniel Golle [Fri, 5 Jul 2024 02:50:52 +0000 (03:50 +0100)]
mediatek: filogic: openwrt,one: remove unneeded caldata extraction

WiFi calibration data is already obtained via in-kernel NVMEM framework.
There is no need to also do so in userspace.

Fixes: dd58ad968a ("mediatek/filogic: add OpenWrt One support")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agomediatek: filogic: add missing ';;' in /etc/board.d/01_leds
Daniel Golle [Fri, 5 Jul 2024 02:48:12 +0000 (03:48 +0100)]
mediatek: filogic: add missing ';;' in /etc/board.d/01_leds

Add missing ';;' to terminate switch-case script generating
board-specific LED configuration defaults.

Fixes: c71b68acdd ("mediatek: filogic: add Adtran SmartRG Mount Stuart series")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agoramips: gpio: convert to the generic GPIO driver
Shiji Yang [Fri, 28 Jun 2024 07:36:13 +0000 (15:36 +0800)]
ramips: gpio: convert to the generic GPIO driver

Drop most of the code in favor of the generic MMIO GPIO driver.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agoramips: gpio: use devm_platform_ioremap_resource()
Shiji Yang [Fri, 28 Jun 2024 07:36:13 +0000 (15:36 +0800)]
ramips: gpio: use devm_platform_ioremap_resource()

Simplify the code.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agoramips: gpio: remove header "gpio.h"
Shiji Yang [Fri, 28 Jun 2024 07:36:13 +0000 (15:36 +0800)]
ramips: gpio: remove header "gpio.h"

There are no source files using it.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agoramips: gpio: always use dynamic GPIO numberspace base
Shiji Yang [Fri, 28 Jun 2024 07:36:13 +0000 (15:36 +0800)]
ramips: gpio: always use dynamic GPIO numberspace base

The new numberspace base starts from 512 instead of 0. The number
base seems come from the kernel symbol CONFIG_GPIOLIB_FASTPATH_LIMIT.

Suppress warning:

gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agoramips: mt7621: fix GPIO switch pin number
Shiji Yang [Fri, 28 Jun 2024 07:36:13 +0000 (15:36 +0800)]
ramips: mt7621: fix GPIO switch pin number

The numberspace base has been changed since 6.6 kernel:

chip_num   chip0   chip1   chip2 (32 gpios per bank)
old base    480     448     416
new base    512     544     576

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agomediatek: filogic: add support for TP-LINK RE6000XD
Dirk Buchwalder [Fri, 17 May 2024 15:33:00 +0000 (17:33 +0200)]
mediatek: filogic: add support for TP-LINK RE6000XD

This commit adds support for TP-LINK RE6000XD.
The device is quite similar to the Mercusys MR90X V1,
except only 3 LAN ports and more LEDs.
So thanks to csharper2005 for doing all the groundwork.

Device specification
--------------------
SoC Type:   MediaTek MT7986BLA, Cortex-A53, 64-bit
RAM:        MediaTek MT7986BLA (512MB)
Flash:      SPI NAND GigaDevice (128 MB)
Ethernet:   MediaTek MT7531AE + 2.5GbE MaxLinear GPY211C0VC (SLNW8)
Ethernet:   1x2.5Gbe (LAN3 2.5Gbps), 2xGbE (LAN 1Gbps, LAN1,
            LAN2)
WLAN 2g:    MediaTek MT7975N, b/g/n/ax, MIMO 4x4
WLAN 5g:    MediaTek MT7975P(N), a/n/ac/ax, MIMO 4x4
LEDs:       8 LEDs, 1 status blue, 2x WIFI blue, 2x signal
    blue/red, 3 LAN blue gpio-controlled
Button:     2 (Reset, WPS)
USB ports:  No
Power:      12 VDC, 2 A
Connector:  Barrel
Bootloader: Main U-Boot - U-Boot 2022.01-rc4. Additionally, ubi0
            partition contain "seconduboot" (also U-Boot 2022.01-rc4)

Serial console (UART), unpopulated
---------------------
                            V
+-------+-------+-------+-------+
| +3.3V |  GND  |  TX   |  RX   |
+---+---+-------+-------+-------+
    |
    +--- Don't connect

Disassemble: rm the 2 screws at the bottom and the one at the backside.
            un-clip the case starting at the edge above the LEDs.

Installation (UART)
-------------------
1. Place OpenWrt initramfs image on tftp server with IP 192.168.1.2
2. Attach UART, switch on the router and interrupt the boot process by
   pressing 'Ctrl-C'
3. Load and run OpenWrt initramfs image:
      tftpboot openwrt-mediatek-filogic-tplink_re6000xd-initramfs-kernel.bin bootm
4. Run 'sysupgrade -n' with the sysupgrade OpenWrt image

Notice: while I was successfull at activating ssh (as described
        here:
        https://www.lisenet.com/2023/gaining-ssh-access-to-tp-link-re200-wi-fi-range-extender/)

        Unfortunately I haven't found the correct root password.
        Looks like they are using a static password
        (md5crypt, salt + 21 characters) that is not the web
        interface admin password.

        The TP-LINK RE900XD looks like the very same device,
        according to the pictures and the firmware.
        But I haven't checked if the OpenWrt firmware works as well
        on that device.

        The second ubi partition (ubi1) is empty and there is no known
        dual-partition mechanism, neither in u-boot nor in the stock firmware.

Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
5 months agokernel: bump 6.6 to 6.6.36
John Audia [Thu, 27 Jun 2024 17:56:04 +0000 (13:56 -0400)]
kernel: bump 6.6 to 6.6.36

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

Manually rebased:
        generic/hack-6.6/765-mxl-gpy-control-LED-reg-from-DT.patch
        bcm27xx/patches-6.6/950-0536-dmaengine-dw-axi-dmac-Fixes-for-RP1.patch

Removed upstreamed:
bmips/patches-6.6/010-v6.10-mips-bmips-BCM6358-make-sure-CBR-is-correctly-set.patch[1]

All other patches automatically rebased.

1. https://github.com/openwrt/openwrt/commit/7c9644a7b5e557f05b818296287cdebdd38f1097

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>
5 months agokernel: bump 6.1 to 6.1.96
Zxl hhyccc [Thu, 27 Jun 2024 15:13:11 +0000 (23:13 +0800)]
kernel: bump 6.1 to 6.1.96

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

Manually rebased:
generic/hack-6.1/765-mxl-gpy-control-LED-reg-from-DT.patch
reference:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/net/phy/mxl-gpy.c?h=v6.1.96&id=5bd1b7ab6ae5799c136e4319d8644c5ff9c71757

generic: Fix spelling in dmesg output during boot when using the fitblk driver.

generic/pending-6.1/510-block-add-uImage.FIT-subimage-block-driver.patch

All other patches automatically rebased.

Build system: Kirkwood bcm53xx

Signed-off-by: Zxl hhyccc <zxlhhy@gmail.com>
5 months agouboot-rockchip: Update to 2024.07
Tianling Shen [Wed, 3 Jul 2024 10:41:10 +0000 (18:41 +0800)]
uboot-rockchip: Update to 2024.07

Re-enable FIT signature verification since we switched to use hyphen
for node name separators in commit 2b133ab19cd5 ("scripts: use sep-char for hash nodes").

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
5 months agouboot-envtools: update to U-Boot release v2024.07
Shiji Yang [Thu, 4 Jul 2024 10:39:35 +0000 (18:39 +0800)]
uboot-envtools: update to U-Boot release v2024.07

Remove upstreamed patches:
010-fw_env-fix-reading-NVMEM-device-s-compatible-value.patch
[commit f29c5ca33df4c77b9af2cbfb7ed90bf336613522]

011-fw_env-keep-calling-read-until-whole-flash-block-is-.patch
[commit 9e3003f79d168eac7ee65cd457e3904e2fb4eea8]

012-fw_env-autodetect-NAND-erase-size-and-env-sectors.patch
[commit d73a6641868029b5cae53ed00c5766921c9d8b1f]

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agotools: mkimage: update to U-Boot release v2024.07
Shiji Yang [Thu, 4 Jul 2024 10:39:35 +0000 (18:39 +0800)]
tools: mkimage: update to U-Boot release v2024.07

Update to latest version.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agobcm47xx: drop 6.1 support
Mieczyslaw Nalewaj [Mon, 17 Jun 2024 05:57:59 +0000 (07:57 +0200)]
bcm47xx: drop 6.1 support

Drop configs, files and patches for Linux 6.1.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15635
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobcm47xx: use kernel 6.6 by default
Mieczyslaw Nalewaj [Wed, 5 Jun 2024 16:25:59 +0000 (18:25 +0200)]
bcm47xx: use kernel 6.6 by default

Switch to Linux kernel version 6.6.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15635
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobcm47xx: remove old cache aliasing patches
Mieczyslaw Nalewaj [Tue, 2 Jul 2024 17:31:42 +0000 (19:31 +0200)]
bcm47xx: remove old cache aliasing patches

Remove patches related to some ancient cache aliasing bugs that were fixed in earlier versions and are no longer relevant to us.

Co-authored-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15635
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agogeneric: gpio: fix broken GPIO for big endian CPUs
Shiji Yang [Thu, 4 Jul 2024 10:35:50 +0000 (18:35 +0800)]
generic: gpio: fix broken GPIO for big endian CPUs

Align the "bgpio_bits" with the data bus width.

Fixes: https://github.com/openwrt/openwrt/issues/15739
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Suggested-By: Mark Mentovai <mark@mentovai.com>
Tested-by: Lóránd Horváth <lorand.horvath82@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15784
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoath79: suppress GPIO static base allocation warning
Shiji Yang [Thu, 4 Jul 2024 10:35:50 +0000 (18:35 +0800)]
ath79: suppress GPIO static base allocation warning

Silence ath79 GPIO driver warning by setting GPIO numberspace base
dynamically. This patch also reorganize and fix the GPIO numbers on
6.6 kernel. The new gpio chip base number algorithm:

gpiochip    ath79-SOC    ath9k-0       ath9k-1
base           512      512+ngpios   512+ngpios+10

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/15784
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoath79: fix 5GHz External Antenna A GPIO for BSAP-1840
Shiji Yang [Thu, 4 Jul 2024 10:35:50 +0000 (18:35 +0800)]
ath79: fix 5GHz External Antenna A GPIO for BSAP-1840

Each ath9k device only has 10 gpios. ath9k-0 gpio number range is
502-511, and ath9k-1 gpio number range is 492-501. So "5GHz External
Antenna A" gpio line number should be 492 instead of 489.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/15784
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoath79: correct dts ngpios properties
Shiji Yang [Thu, 4 Jul 2024 10:35:50 +0000 (18:35 +0800)]
ath79: correct dts ngpios properties

SoC Model GPIO number

ar7100 12
ar7240 18(unknown, default)
ar7241 20
ar7242 18
ar9132 22(unknown, default)
ar9331 30
ar934x 23
qca953x 18
qca955x 24
qca956x 23

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/15784
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agouboot-rockchip: use u-boot-rockchip.bin
FUKAUMI Naoki [Wed, 3 Jul 2024 09:02:32 +0000 (18:02 +0900)]
uboot-rockchip: use u-boot-rockchip.bin

use u-boot-rockchip.bin to copy SPL/TPL/U-Boot to the image.

since binman was used in mainline u-boot for rockchip, we can use
u-boot-rockchip.bin instead of idbloader.img and u-boot.itb.

Reviewed-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://github.com/openwrt/openwrt/pull/15815
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoipq40xx: add BDFs for Linksys WHW03 V1
Rodrigo Balerdi [Sun, 30 Jun 2024 22:45:43 +0000 (19:45 -0300)]
ipq40xx: add BDFs for Linksys WHW03 V1

BDFs come from latest firmware, version 1.1.19.209880 (2022-06-20):
- /lib/firmware/IPQ4019/v1/FCC/boardData_1_0_IPQ4019_DK04_2G.bin
- /lib/firmware/IPQ4019/v1/FCC/boardData_1_0_IPQ4019_DK04_5G.bin
- /lib/firmware/QCA9888/v1/FCC/boardData_2_0_QCA9888_5G_Y9690_SBS_HB.bin

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15844
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoipq-wifi: update to Git HEAD (2024-06-30)
Rodrigo Balerdi [Sun, 30 Jun 2024 22:23:52 +0000 (19:23 -0300)]
ipq-wifi: update to Git HEAD (2024-06-30)

f54581d ipq6018: add BDF for Edgecore EAP101
6df42f9 ipq40xx: add BDFs for Linksys WHW03 V1
e82cba7 ipq8074: add TP-Link EAP660 HD v1 BDF

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15844
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobcm27xx: base-files: diag: improve LEDs behaviour
Álvaro Fernández Rojas [Wed, 3 Jul 2024 18:56:56 +0000 (20:56 +0200)]
bcm27xx: base-files: diag: improve LEDs behaviour

As reported in https://github.com/openwrt/openwrt/issues/15834 using the PWR
LED for indicating diag status is confusing since this is usually used for
power supply failures on RPi devices.
This commit uses ACT LED for diag status and restores it to mmc activity.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agokernel: Add kmod-sctp-diag
Hauke Mehrtens [Sat, 29 Jun 2024 16:28:40 +0000 (18:28 +0200)]
kernel: Add kmod-sctp-diag

Package the sctp_diag.ko file which already gets build when kmod-sctp
and kmod-inet-diag are selected.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/15833
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: Add kmod-mfd
Hauke Mehrtens [Sat, 29 Jun 2024 16:23:13 +0000 (18:23 +0200)]
kernel: Add kmod-mfd

Package the mfd-core.ko kernel module. It is selected by the
kmod-hwmon-gsc already.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/15833
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: Add mtd_nandbiterrs.ko to kmod-mtdtests
Hauke Mehrtens [Sat, 29 Jun 2024 16:01:56 +0000 (18:01 +0200)]
kernel: Add mtd_nandbiterrs.ko to kmod-mtdtests

The mtd_nandbiterrs.ko kernel module was added with kernel 3.7. We
should package it like the other test modules.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/15833
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>