openwrt/staging/wigyori.git
5 months agoqca-ssdk: fix compiling for ipq60xx
Robert Marko [Sun, 23 Jun 2024 15:24:57 +0000 (17:24 +0200)]
qca-ssdk: fix compiling for ipq60xx

Trying to compile for ipq60xx will fail with:
ERROR: modpost: "qca808x_phy_reset" [build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq60xx/qca-ssdk-2024.06.13~c451136b/qca-ssdk.ko] undefined!

So, lets fix this by disabling Manhattan switch and PHY support as this is
the new 2.5G quad port switch that is not present on ipq60xx boards.

Fixes: 87a45ea43207 ("kernel: qca-ssdk: update 12.5 to 2024-06-13")
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agokernel: qca-ssdk: update 12.5 to 2024-06-13
Kristian Skramstad [Fri, 21 Jun 2024 22:00:15 +0000 (00:00 +0200)]
kernel: qca-ssdk: update 12.5 to 2024-06-13

There are some new commits, so refresh and update patches.
Some build warnings have been fixed upstream too.

Add backport target/linux/generic/backport-6.6/722-v6.10-dt-bindings-arm-qcom-ids-Add-SoC-ID-for-IPQ5321.patch.

Removed upstream:
[-] qca-ssdk/patches/101-hsl_phy-add-support-for-detection-PSGMII-PHY-mode.patch
[-] qca-ssdk/patches/201-fix-compile-warnings.patch

List of changes:
2024-04-16  -c451136b-  qca-ssdk: strip MRPPE code
2024-06-05  -f455a820-  [qca-ssdk]: fix enum-int-mismatch warnings
2024-05-31  -bbfc0fa9-  Merge "[qca-ssdk]: update eee status of phydev"
2024-05-31  -adbe9dc5-  Merge "[qca-ssdk]: support psgmii and uqsxgmii mode of kernel"
2024-05-31  -d06ca777-  Merge "[qca-ssdk]: fix 5G issue with the AQR FW that use 5gbaser for 5G speed"
2024-05-31  -c6f539a5-  Merge "qca-ssdk: support mrppe pktedit padding functions"
2024-04-29  -c321e2a9-  qca-ssdk: support mrppe pktedit padding functions
2024-05-24  -ee6e201e-  qca-ssdk: Fix the big endian compile error
2024-05-15  -8c116bb9-  [qca-ssdk]: update eee status of phydev
2024-05-20  -f0341a2c-  Merge "qca-ssdk: Enable igmp for PPE MINI profile"
2024-05-16  -44a0ce93-  qca-ssdk: Enable igmp for PPE MINI profile
2024-05-15  -8b91bbf6-  [qca-ssdk]: support psgmii and uqsxgmii mode of kernel
2024-05-14  -7eec1658-  [qca-ssdk]: fix 5G issue with the AQR FW that use 5gbaser for 5G speed
2024-05-12  -b9f5ea0e-  [qca-ssdk]: ethtool support, do not change wake-up timer when the requested timer is 0
2024-05-09  -5e2c15ed-  Merge "[qca-ssdk]: remove check when mht clock enable"
2024-05-09  -a1563b90-  Merge "[qca-ssdk] support new sku IPQ5321"
2024-04-23  -f04b7680-  [qca-ssdk]: show unknown status when link down
2024-03-22  -33b91b30-  [qca-ssdk]: remove check when mht clock enable
2024-04-29  -b6362f2b-  Merge "qca-ssdk:fix bug in marina nptv6 iid cal"
2024-04-29  -097033ae-  Merge "[qca-ssdk] support cypress uniphy0 connecting MHT switch port0"
2024-04-24  -d45560fd-  qca-ssdk:fix bug in marina nptv6 iid cal
2024-04-24  -7d7a42af-  qca-ssdk: enable policer counter on low memory profile
2024-04-18  -e36cf6ea-  Merge "[qca-ssdk]: change portvlan egress mode initial value as untouched"
2024-04-18  -27817881-  Merge "[qca-ssdk]: update the aqr phy supported ability"
2024-04-18  -5a3a693c-  Merge "qca-ssdk:support marina nptv6"
2024-04-16  -129fe9b3-  Merge "qca-ssdk: support tunnel fields and innner fields inverse"
2024-01-09  -fc8f6abd-  qca-ssdk:support marina nptv6

Signed-off-by: Kristian Skramstad <kristian+github@83.no>
Link: https://github.com/openwrt/openwrt/pull/15771
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agokernel: bump 6.1 to 6.1.95
Zxl hhyccc [Sat, 22 Jun 2024 05:50:31 +0000 (13:50 +0800)]
kernel: bump 6.1 to 6.1.95

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

Removed upstreamed:
generic/pending-6.1/779-net-vxlan-don-t-learn-non-unicast-L2-destinations.patch
reference:
This patch can be removed. It will never return false. And the upstream commit should fix the same issue:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.95&id=a31d0e5deb1abe7c57c6457ae2502f278063126e

All other patches automatically rebased.

Build system: Kirkwood bcm53xx

Signed-off-by: Zxl hhyccc <zxlhhy@gmail.com>
5 months agoarmsr: add realtek and smsc ethernet phy drivers to the default image
Mathew McBride [Tue, 28 May 2024 23:09:17 +0000 (09:09 +1000)]
armsr: add realtek and smsc ethernet phy drivers to the default image

This adds two more common PHY brands to the image.
Realtek is used on the Google Coral "Phanbell" board (i.MX8MQ).
SMSC has been used on various Raspberry Pi boards.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
5 months agoarmsr: armv8: enable NXP i.MX8MQ/P USB phy
Mathew McBride [Tue, 28 May 2024 23:04:13 +0000 (09:04 +1000)]
armsr: armv8: enable NXP i.MX8MQ/P USB phy

Support for 'fsl,imx8mq-usb-phy' is needed for USB to work
on NXP i.MX8MQ and i.MX8MP platforms.

Tested with a Google Coral "Phanbell" board.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
5 months agoarmsr: enable framebuffer emulation for virtio-gpu/drm displays
Mathew McBride [Sun, 26 May 2024 04:12:58 +0000 (14:12 +1000)]
armsr: enable framebuffer emulation for virtio-gpu/drm displays

This was discovered when trying to run OpenWrt on Hetzner Cloud's
Arm-based instances.

Hetzner uses QEMU/KVM with virtio-gpu as the main display device,
together with an ACPI firmware. This was not displaying a console
previously.

This setup can be emulated by qemu using options below:
qemu-system-aarch64 \
    -machine virt \
    -bios QEMU_EFI.fd \
    -device virtio-gpu \
    -usb \
    -device qemu-xhci,id=xhci \
    -device usb-tablet,bus=xhci.0 \
    -device usb-kbd,bus=xhci.0 \
    -vnc :0

Signed-off-by: Mathew McBride <matt@traverse.com.au>
5 months agokernel/armsr: disable NXP i.MX9 PMU related option
Mathew McBride [Sun, 17 Mar 2024 23:51:21 +0000 (10:51 +1100)]
kernel/armsr: disable NXP i.MX9 PMU related option

This PMU (performance management unit) related kernel option
can appear under certain kernel configurations (such as
KVM being enabled).

Disable them, as we do with other PMU-related options.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
5 months agokernel: crypto: remove FCRYPT from miscellany
Nathaniel Wesley Filardo [Thu, 20 Jun 2024 14:15:50 +0000 (15:15 +0100)]
kernel: crypto: remove FCRYPT from miscellany

It has its own dedicated knob

Signed-off-by: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15761
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agokernel: catch up rxrpc
Nathaniel Wesley Filardo [Thu, 20 Jun 2024 14:15:41 +0000 (15:15 +0100)]
kernel: catch up rxrpc

New dependencies required for the module to be useful, and correct IPv6 support

Signed-off-by: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15761
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agouml: fix glibc-static check with GCC14
Robert Marko [Sat, 22 Jun 2024 19:57:23 +0000 (21:57 +0200)]
uml: fix glibc-static check with GCC14

Running the glibc-static check with GCC14 as the host compiler will fail:
Please install a static glibc package. (Missing libutil.a, librt.a or libpthread.a)

However, this error will get printed even with the required static
libraries installed when GCC14 is used.

Manually running the check exposes the real error:
<stdin>: In function ‘main’:
<stdin>:1:45: error: implicit declaration of function ‘timer_gettime’ [-Wimplicit-function-declaration]

GCC14 now errors on implicit declarations by default, so lets add the
required time.h header to fix compilation and thus the check.

Link: https://github.com/openwrt/openwrt/pull/15778
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/fakeroot: fix check for whether to wrap time64 functions
Michael Pratt [Sat, 22 Jun 2024 04:58:39 +0000 (00:58 -0400)]
tools/fakeroot: fix check for whether to wrap time64 functions

Fakeroot uses an egrep configure check to look for the string "time64"
within a preprocessed include of the sys/stat.h header
in order to decide whether or not to create declarations
and internal functions used for wrapping the native functions
stat64_time64 fstat64_time64 lstat64_time64 and fstatat64_time64.

On specific older versions of glibc these functions are not included,
but there are some references to "time64" unrelated to functions,
like aliasing the time64_t typedef to the standard time_t typedef
when the size of a word is 64 bits or defining it if not.

In this case, a grep for "stat64"
of the preprocessed sys/stat.h header matches nothing,
however, the grep for "time64" in the configure check
of the preprocessed sys/stat.h header matches a line
that has nothing to do with the functions
that will be wrapped as a result of successful matching.

  __extension__ typedef __int64_t __time64_t;

This causes the attempt to wrap the functions to occur,
which fails due to some of the corresponding macros being empty
since the native declarations they are based on do not exist,
causing a common error claiming that a part of the syntax is missing.

  error: expected '=', ',', ';', 'asm' or '__attribute__' before ...

Fix this by making the testing regular expression more complex
in order to match actual function names ending in "_time64"
with or without a set of preceding underscores, but none after.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15773
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agokernel: bump 6.6 to 6.6.35
John Audia [Fri, 21 Jun 2024 14:02:58 +0000 (10:02 -0400)]
kernel: bump 6.6 to 6.6.35

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

Removed upstreamed:
bcm27xx/patches-6.6/950-1135-ax25-Fix-refcount-imbalance-on-inbound-connections.patch[1]

Removed no longer needed:
generic/pending-6.6/779-net-vxlan-don-t-learn-non-unicast-L2-destinations.patch[2]

All other patches automatically rebased.

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

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.35&id=52100fd74ad07b53a4666feafff1cd11436362d3
2. As suggested by @DragonBluep, "This patch can be removed. It will never return false. And the upstream commit should fix the same issue: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?h=v6.6.35&id=924f7bbfc5cfd029e417c56357ca01eae681fba6"

Signed-off-by: John Audia <therealgraysky@proton.me>
5 months agoopenssl: conditionally disable engine section
Sean Khan [Sun, 9 Jun 2024 01:02:30 +0000 (21:02 -0400)]
openssl: conditionally disable engine section

Currently, the build option to enable/disable engine support isn't
reflected in the final '/etc/ssl/openssl.cnf' config. It assumes `engines`
is always enabled, producing an error whenever running any
commands in openssl util or programs that explicitly use settings
from '/etc/ssl/openssl.cnf'.

```
➤ openssl version
FATAL: Startup failure (dev note: apps_startup()) for openssl
307D1EA97F000000:error:12800067:lib(37):dlfcn_load:reason(103):crypto/dso/dso_dlfcn.c:118:filename(libengines.so):
Error loading shared library libengines.so: No such file or directory
307D1EA97F000000:error:12800067:lib(37):DSO_load:reason(103):crypto/dso/dso_lib.c:152:
307D1EA97F000000:error:0700006E:lib(14):module_load_dso:reason(110):crypto/conf/conf_mod.c:321:module=engines, path=engines
307D1EA97F000000:error:07000071:lib(14):module_run:reason(113):crypto/conf/conf_mod.c:266:module=engines
```

Build should check for the `CONFIG_OPENSSL_ENGINE` option, and comment out `engines`
if not explicitly enabled.

Example:
```
[openssl_init]
providers = provider_sect
```

After this change, openssl util works correctly.

```
➤ openssl version
OpenSSL 3.0.14 4 Jun 2024 (Library: OpenSSL 3.0.14 4 Jun 2024)
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/15661
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoimx: 6.6: add upstream patches for imx8m{m,n,p} venice
Tim Harvey [Tue, 21 May 2024 19:18:50 +0000 (12:18 -0700)]
imx: 6.6: add upstream patches for imx8m{m,n,p} venice

Add a set of upstream patches for the imx8m{m,n,p} based Venice
boards.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/15736
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoimx: coretexa53: fix network configuration for GW74xx
Tim Harvey [Tue, 21 May 2024 18:44:34 +0000 (11:44 -0700)]
imx: coretexa53: fix network configuration for GW74xx

The GW74xx's first RJ45 is eth0 which should be the WAN adapter, not
eth1 which is the CPU uplink port to the switch.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/15736
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agowifi-scripts: ensure get_freq returns int (iw-6.9)
Sean Khan [Sat, 22 Jun 2024 00:01:22 +0000 (20:01 -0400)]
wifi-scripts: ensure get_freq returns int (iw-6.9)

With `iw` version 6.9 frequencies are now being reported as float,
which is incompatible with wpa_supplicant's config option 'frequency'
which expects an integer.

iwinfo phy0 info output:

Version: 5.19
```
Frequencies:
  * 5180 MHz [36] (30.0 dBm)
  * 5200 MHz [40] (30.0 dBm)
  * 5220 MHz [44] (30.0 dBm)
  * 5240 MHz [48] (30.0 dBm)
  * 5260 MHz [52] (24.0 dBm)
  * 5280 MHz [56] (24.0 dBm)
  * 5300 MHz [60] (24.0 dBm)
  * 5320 MHz [64] (24.0 dBm)
  * 5500 MHz [100] (24.0 dBm)
  * 5520 MHz [104] (24.0 dBm)
  * 5540 MHz [108] (24.0 dBm)
  * 5560 MHz [112] (24.0 dBm)
  * 5580 MHz [116] (24.0 dBm)
  * 5600 MHz [120] (24.0 dBm)
  * 5620 MHz [124] (24.0 dBm)
  * 5640 MHz [128] (24.0 dBm)
  * 5660 MHz [132] (24.0 dBm)
  * 5680 MHz [136] (24.0 dBm)
  * 5700 MHz [140] (24.0 dBm)
  * 5720 MHz [144] (24.0 dBm)
  * 5745 MHz [149] (30.0 dBm)
  * 5765 MHz [153] (30.0 dBm)
  * 5785 MHz [157] (30.0 dBm)
  * 5805 MHz [161] (30.0 dBm)
  * 5825 MHz [165] (30.0 dBm)
  * 5845 MHz [169] (disabled)
  * 5865 MHz [173] (disabled)
  * 5885 MHz [177] (disabled)
```

Version: 6.9
```
Frequencies:
  * 5180.0 MHz [36] (30.0 dBm)
  * 5200.0 MHz [40] (30.0 dBm)
  * 5220.0 MHz [44] (30.0 dBm)
  * 5240.0 MHz [48] (30.0 dBm)
  * 5260.0 MHz [52] (24.0 dBm)
  * 5280.0 MHz [56] (24.0 dBm)
  * 5300.0 MHz [60] (24.0 dBm)
  * 5320.0 MHz [64] (24.0 dBm)
  * 5500.0 MHz [100] (24.0 dBm)
  * 5520.0 MHz [104] (24.0 dBm)
  * 5540.0 MHz [108] (24.0 dBm)
  * 5560.0 MHz [112] (24.0 dBm)
  * 5580.0 MHz [116] (24.0 dBm)
  * 5600.0 MHz [120] (24.0 dBm)
  * 5620.0 MHz [124] (24.0 dBm)
  * 5640.0 MHz [128] (24.0 dBm)
  * 5660.0 MHz [132] (24.0 dBm)
  * 5680.0 MHz [136] (24.0 dBm)
  * 5700.0 MHz [140] (24.0 dBm)
  * 5720.0 MHz [144] (24.0 dBm)
  * 5745.0 MHz [149] (30.0 dBm)
  * 5765.0 MHz [153] (30.0 dBm)
  * 5785.0 MHz [157] (30.0 dBm)
  * 5805.0 MHz [161] (30.0 dBm)
  * 5825.0 MHz [165] (30.0 dBm)
  * 5845.0 MHz [169] (disabled)
  * 5865.0 MHz [173] (disabled)
  * 5885.0 MHz [177] (disabled)
```

Error reported from wpa_supplicant
```console
Fri Jun 21 14:07:22 2024 daemon.err wpa_supplicant[2866]: Line 10: invalid number "5320.0"
Fri Jun 21 14:07:22 2024 daemon.err wpa_supplicant[2866]: Line 10: failed to parse frequency '5320.0'.
Fri Jun 21 14:07:22 2024 daemon.err wpa_supplicant[2866]: Line 16: failed to parse network block.
Fri Jun 21 14:07:22 2024 daemon.err wpa_supplicant[2866]: Failed to read or parse configuration '/var/run/wpa_supplicant-phy1-mesh0.conf'.
```

This affects mesh, adhoc, and client-mode WDS.

Until hostapd/wpa_supplicant is updated (or patched) to support float
frequencies, ensure `get_freq` prints out an integer.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/15770
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoqoriq: use 6.1 by default and drop 5.15
Robert Marko [Fri, 21 Jun 2024 11:41:33 +0000 (13:41 +0200)]
qoriq: use 6.1 by default and drop 5.15

qoriq has had kernel 6.1 as testing for 2 months now, so lets default to
it and drop 5.15 support.

Link: https://github.com/openwrt/openwrt/pull/15767
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools: firmware-utils: update to Git HEAD (2024-06-20)
Christian Marangi [Fri, 21 Jun 2024 11:34:32 +0000 (13:34 +0200)]
tools: firmware-utils: update to Git HEAD (2024-06-20)

224d497dd94f srec2bin: drop unused "dum" variable
6777b2d51961 uimage_sgehdr: use "char" type for header struct strings
81db3025aac5 uimage_sgehdr: drop unused "ltmp" variable
bd7fcc74b43e pc1crypt: make decrypt/encrypt functions take void * as argument
6ac44974185a linksys: add magic header generation tool for e8350 v1

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agowifi-scripts: rewrite wifi detect code in ucode
Felix Fietkau [Tue, 11 Jun 2024 15:29:22 +0000 (17:29 +0200)]
wifi-scripts: rewrite wifi detect code in ucode

Rely entirely on /etc/board.json instead of screen scraping iw cli output

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agowifi-scripts: add default channel to board.json in wifi-detect.uc
Felix Fietkau [Tue, 11 Jun 2024 09:34:27 +0000 (11:34 +0200)]
wifi-scripts: add default channel to board.json in wifi-detect.uc

Preparation for avoiding iw calls in /lib/wifi/mac80211.sh

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agoucode: update to Git HEAD (2024-06-18)
Felix Fietkau [Wed, 19 Jun 2024 11:50:21 +0000 (13:50 +0200)]
ucode: update to Git HEAD (2024-06-18)

8cf816d615fd socket: fix potential memory leak in connect()
8f5f231d66cd socket: optimize poll() argument handling
36f106056069 socket: remove wrong documentation fragment
525fca224012 socket: uv_to_sockaddr(): fix length calculation for AF_UNIX addresses
3938645ad9e3 socket: support IPv6 addresses in struct conversion routines
3a586dc7ddbe socket: improve uc_socket_connect() behavior
7b269f1cd3d2 socket: improve uc_socket_listen() behavior
fc6f2b89febf socket: handle further socket option value types
d6f25797dad1 socket: add IPv6 socket options
7611487b9a05 socket: implement recvmsg(), sendmsg() and cmsg support
d2e44bfa8b54 core-lib: improved documentation
e0bab40c8578 fs: add truncate() file method
5d305cfb2ab7 fs: add lock() file method
8b0318f7fabe lib: introduce zlib library

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agoiw: update to version 6.9
Felix Fietkau [Mon, 10 Jun 2024 18:50:38 +0000 (20:50 +0200)]
iw: update to version 6.9

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agohostapd: use strdup on string passed to hostapd_add_iface
Felix Fietkau [Fri, 14 Jun 2024 12:17:57 +0000 (14:17 +0200)]
hostapd: use strdup on string passed to hostapd_add_iface

The data is modified within hostapd_add_iface

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agohostapd: fix crash on interface setup failure
Felix Fietkau [Fri, 14 Jun 2024 12:43:39 +0000 (14:43 +0200)]
hostapd: fix crash on interface setup failure

Add a missing NULL pointer check when deleting beacons

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agofirmware-utils: update to Git HEAD (2024-06-20)
Christian Marangi [Thu, 20 Jun 2024 21:22:01 +0000 (23:22 +0200)]
firmware-utils: update to Git HEAD (2024-06-20)

224d497dd94f srec2bin: drop unused "dum" variable
6777b2d51961 uimage_sgehdr: use "char" type for header struct strings
81db3025aac5 uimage_sgehdr: drop unused "ltmp" variable
bd7fcc74b43e pc1crypt: make decrypt/encrypt functions take void * as argument
6ac44974185a linksys: add magic header generation tool for e8350 v1

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agogeneric: platform/mikrotik: add NVMEM layout driver
Robert Marko [Sun, 9 Jun 2024 10:14:25 +0000 (12:14 +0200)]
generic: platform/mikrotik: add NVMEM layout driver

Currently, information from MikroTik hard_config is only available via
sysfs, meaning that we have to rely on userspace to for example setup MACs.

So, lets provide a basic NVMEM layout based driver to expose the same cells
as sysfs driver exposes.

Do note that the we dont extract the WLAN caldata and BDF-s at this point.

Reviewed-by: Thibaut VARÈNE <hacks@slashdirt.org>
Link: https://github.com/openwrt/openwrt/pull/15665
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agogeneric: platform/mikrotik: move hard config tag ID-s to a header
Robert Marko [Mon, 10 Jun 2024 10:20:11 +0000 (12:20 +0200)]
generic: platform/mikrotik: move hard config tag ID-s to a header

Move the hard config tag ID-s to a separate header so they can be reused
by the NVMEM driver as well.

Link: https://github.com/openwrt/openwrt/pull/15665
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools: util-linux: update to v2.40.1
Thomas Weißschuh [Sun, 16 Jun 2024 20:59:29 +0000 (22:59 +0200)]
tools: util-linux: update to v2.40.1

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

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
5 months agoutil-linux: update to v2.40.1
Thomas Weißschuh [Sun, 16 Jun 2024 20:55:41 +0000 (22:55 +0200)]
util-linux: update to v2.40.1

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

Remove upstreamed:
001-meson-properly-handle-gettext-non-existence.patch

New:
0001-meson-Fix-build-python-option.patch

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
5 months agoath79: trim useless package kmod-leds-reset for some devices
Shiji Yang [Wed, 19 Jun 2024 10:53:01 +0000 (10:53 +0000)]
ath79: trim useless package kmod-leds-reset for some devices

Only NETGEAR WNDR3x00 series devices have reset controller LED.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agoath79: disable unnecessary driver CONFIG_LEDS_RESET
Shiji Yang [Wed, 19 Jun 2024 10:52:37 +0000 (10:52 +0000)]
ath79: disable unnecessary driver CONFIG_LEDS_RESET

This driver has already been packed as a software package. There is
no need to build it into the kernel.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agoath79: add back usb LED label for NETGEAR WNDR3x00 devices
Shiji Yang [Wed, 19 Jun 2024 10:52:03 +0000 (10:52 +0000)]
ath79: add back usb LED label for NETGEAR WNDR3x00 devices

The "reset-leds" driver does not support parsing color and function
properties.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agobcm27xx: fix malformed upstream arm64 DT patch
Álvaro Fernández Rojas [Wed, 19 Jun 2024 18:17:44 +0000 (20:17 +0200)]
bcm27xx: fix malformed upstream arm64 DT patch

This patch was causing buildbot issues when copying arm64 DT files since
bcm283x-rpi-csi1-2lane.dtsi and bcm283x-rpi-lan7515.dtsi were linked to
"../../../../arm/boot/dts/" instead of "../../../../arm/boot/dts/broadcom".
These files aren't needed, so let's remove them instead of fixing them.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15762
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoapk: limit CONFIG_IPK_FILES_CHECKSUMS config to OPKG
Christian Marangi [Thu, 20 Jun 2024 03:51:07 +0000 (05:51 +0200)]
apk: limit CONFIG_IPK_FILES_CHECKSUMS config to OPKG

Limit CONFIG_IPK_FILES_CHECKSUMS config to OPKG as APK have different
way to validate package integrity (apk audit)

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoRevert "apk: limit CONFIG_IPK_FILES_CHECKSUMS config to OPKG"
Christian Marangi [Thu, 20 Jun 2024 03:49:21 +0000 (05:49 +0200)]
Revert "apk: limit CONFIG_IPK_FILES_CHECKSUMS config to OPKG"

This reverts commit 25bbefcdd9424ed1b6ef35a39e84420fc4cce322.

Only the Config-build.in change needed to be merged and this contains
leftover from previous revision of the feature.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoath79: ag71xx: support probe defferal for getting MAC address
Robert Marko [Wed, 19 Jun 2024 09:26:47 +0000 (11:26 +0200)]
ath79: ag71xx: support probe defferal for getting MAC address

Currently, of_get_ethdev_address() return is checked for any return error
code which means that trying to get the MAC from NVMEM cells that is backed
by MTD will fail if it was not probed before ag71xx.

So, lets check the return error code for EPROBE_DEFER and defer the ag71xx
probe in that case until the underlying NVMEM device is live.

Link: https://github.com/openwrt/openwrt/pull/15752
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoipq40xx: net/ipqess: fix outbound port tag computation
Matthias Schiffer [Wed, 19 Jun 2024 23:05:51 +0000 (01:05 +0200)]
ipq40xx: net/ipqess: fix outbound port tag computation

Since the introduction of out-of-band tagging, writing the outbound tag
had been completely broken: First, in place of a port mask containing
the port number, just the port number itself was set in the register
value. Just after that, the full port mask 0x3e (all 5 external ports)
was set unconditionally.

This remained unnoticed because the switch would then use the FDB to
decide where to send unicast packets; broadcast and multicast packets
were however sent to every port.

Fix the port tag computation and only use the full port mask as a
fallback for non-DSA mode, as it was done in the older driver patches
used on Linux 5.15.

Fixes: cd9c7211241e ("ipq40xx: 6.1: use latest DSA and ethernet patches")
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agokernel: bump 6.1 to 6.1.94
Zxl hhyccc [Mon, 17 Jun 2024 16:04:43 +0000 (00:04 +0800)]
kernel: bump 6.1 to 6.1.94
https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.94

All other patches automatically rebased.

Build system: Kirkwood bcm53xx

Signed-off-by: Zxl hhyccc <zxlhhy@gmail.com>
5 months agolantiq: fix pci driver once again
Martin Schiller [Mon, 17 Jun 2024 06:27:59 +0000 (08:27 +0200)]
lantiq: fix pci driver once again

In my previous attempt to solve the PCI problems for the lantiq targets,
I did not pay attention to the fact that the original accesses to the
GPIO took place in RAW mode. As a result, the polarity defined in the
device trees (apart from the initial value) was irrelevant.

In addition, the expected name of the GPIO in the dts has changed due to
the upstream change and therefore no RESET is currently performed.

As discussed in [1] on the linux-mips mailing list, we will now adapt
the dts files accordingly instead of patching the driver:

- dts property will be renamed to "reset-gpios"
- Polarity is set to "GPIO_ACTIVE_LOW".

I have verified this with a TP-Link TD-W8980. The PCI device is now
recognized by the system.

[1] https://patchwork.kernel.org/project/linux-mips/patch/20240607090400.1816612-1-ms@dev.tdt.de/

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Tested-by: Aleksander Jan Bajkowski <olek2@wp.pl> # Tested on AVM 7330 (ar9)
Link: https://github.com/openwrt/openwrt/pull/15731
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agogeneric: backport pending driver for Winchip CH348 USB serial
Daniel Golle [Mon, 17 Jun 2024 14:31:12 +0000 (15:31 +0100)]
generic: backport pending driver for Winchip CH348 USB serial

Import patch and package kernel module for Winchip CH348
USB-to-8x-UART chip.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agogeneric: 6.6: mt7530: add support for bridge port isolation
Daniel Golle [Wed, 19 Jun 2024 12:33:23 +0000 (13:33 +0100)]
generic: 6.6: mt7530: add support for bridge port isolation

Import patches accepted upstream introducing port isolation feature
on MT7530 switches:
  - [net-next,v3,1/2] net: dsa: mt7530: factor out bridge join/leave logic
    https://git.kernel.org/netdev/net-next/c/c25c961fc7f3
  - [net-next,v3,2/2] net: dsa: mt7530: add support for bridge port isolation
    https://git.kernel.org/netdev/net-next/c/3d49ee2127c2

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agokernel: bump 6.6 to 6.6.34
John Audia [Wed, 19 Jun 2024 11:56:04 +0000 (07:56 -0400)]
kernel: bump 6.6 to 6.6.34

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

Removed upstreamed:
backport-6.6/701-v6.8-net-sfp-bus-fix-SFP-mode-detect-from-bitrate.patch[1]

All other patches automatically rebased.

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

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.34&id=9399baa02e4b7f101c39fdbc4d681d54bca4465b

Signed-off-by: John Audia <therealgraysky@proton.me>
5 months agomac80211: backport upstream patch for tim->virtual_map flex array warn
Christian Marangi [Wed, 19 Jun 2024 16:03:01 +0000 (18:03 +0200)]
mac80211: backport upstream patch for tim->virtual_map flex array warn

Backport upstream patch for tim->virtual_map flex array warning for
invalid write.

This has been notice with the bump of ath10k-ct to version 6.7.

Link: https://github.com/openwrt/openwrt/pull/15760
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agobcm27xx: base-files: diag: fix LEDs
Álvaro Fernández Rojas [Wed, 19 Jun 2024 18:03:29 +0000 (20:03 +0200)]
bcm27xx: base-files: diag: fix LEDs

At some point RPi LEDs were renamed from led0/led1 to PWR/ACT.
This patch fixes this and also automatically detects the status_led without
relying on board_name.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agobcm27xx: drop kernel 6.1 support
Álvaro Fernández Rojas [Tue, 18 Jun 2024 20:10:25 +0000 (22:10 +0200)]
bcm27xx: drop kernel 6.1 support

kernel 6.1 can be dropped since 6.6 is the default kernel.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agobcm27xx: switch default kernel to 6.6
Álvaro Fernández Rojas [Tue, 18 Jun 2024 20:04:57 +0000 (22:04 +0200)]
bcm27xx: switch default kernel to 6.6

Update default kernel version to 6.6 for the Raspberry Pi devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agotarget.mk: improve handling of default enabled SECCOMP
Christian Marangi [Wed, 19 Jun 2024 14:19:10 +0000 (16:19 +0200)]
target.mk: improve handling of default enabled SECCOMP

Handling default packages selection is really problematic and error
prone. In all the changes, the SECCOMP config is enabled by default if
supported by the target.

This is problematic for the scenario of the first .config creation where
this option will be enabled by default but the package default are
already being parsed.

This cause the reparsing of the default package on the next command and
the "outdated config" error. To better handle this special case, add
additiona logic to match the dependency in the config and check if
CONFIG_SECCOMP should be enabled by default in the scenario where a
.config needs to be init and doesn't exist.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoscripts/download.pl: fix broken link for KERNEL projects
Christian Marangi [Wed, 19 Jun 2024 12:30:06 +0000 (14:30 +0200)]
scripts/download.pl: fix broken link for KERNEL projects

Fix broken link generation for KERNEL projects.

Using $1 in projectsmirrors sub was still referencing the caller $1
instead of the remaining args of projectsmirrors sub.

Use shift and put the second arg of projectsmirrors sub in $append to
correctly handle the sub args.

Fixes: 465cf358881c ("scripts/download.pl: detach mirror URLs from script file")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agobase-files: migrate old UCI network sections defining bridges
Rafał Miłecki [Tue, 18 May 2021 21:41:33 +0000 (23:41 +0200)]
base-files: migrate old UCI network sections defining bridges

Old "interface" sections for bridges were mixing layer 2 and layer 3.
That syntax got deprecated and UCI section "device" is used for bridge
configuration now.

Backward compatibility may be dropped from netifd soon now so migrate
old configs using uci-defaults script.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 months agoath79: mikrotik: set compat version for NAND devices
Robert Marko [Wed, 19 Jun 2024 10:15:16 +0000 (12:15 +0200)]
ath79: mikrotik: set compat version for NAND devices

Currently, trying to upgrade on a MikroTik NAND device will force you to
use sysupgrade -n due to:
upgrade: The device is supported, but the config is incompatible to the new image (1.0->1.1). Please upgrade without keeping config (sysupgrade -n).
upgrade: NAND images switched to yafut. If running older image, reinstall from initramfs.

So instead of having users manually set the new compat version lets do
what other targets do and set it for all NAND devices after good boot.

Link: https://github.com/openwrt/openwrt/pull/15754
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/coreutils: ignore gnulib changes to fcntl.h
Michael Pratt [Fri, 14 Jun 2024 07:58:19 +0000 (03:58 -0400)]
tools/coreutils: ignore gnulib changes to fcntl.h

As a side-effect to adding a gnulib module for posix_fallocate(),
there are changes to the input file for fcntl.h which
are not handled here since autoreconf is not ran.

Skip updating the fcntl.h header from gnulib
and use the version shipped with the release.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/elfutils: add more pkg-config library info
Michael Pratt [Tue, 18 Jun 2024 04:01:31 +0000 (00:01 -0400)]
tools/elfutils: add more pkg-config library info

In order for linking the static libraries from elfutils to work,
other libraries need to be included to handle the references
to functions made in the library's objects that are not included
as they would already be if the library was a shared object instead.

A shared object library stores this list of libraries when it was made,
so that the dynamic linker can refer to that list at runtime,
but a static library has no such functionality so the list of libraries
for missing functions must be included at link time.

This information was already added to the pc file for libelf
using the definitions in src/Makefile.am,
so extend this to the rest of the pc files in the project.

For situations where the libraries may be used
without pkg-config setting the flags and library list,
this patch and the pc files can serve as a quick reference.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/elfutils: use weak alias over no alias for macOS
Michael Pratt [Tue, 11 Jun 2024 03:59:10 +0000 (23:59 -0400)]
tools/elfutils: use weak alias over no alias for macOS

Clang has support for weak aliases
despite no support for strong aliases,
but it only works with the #pragma directive.

Implementing weak aliases instead of none
is likely a more upstream-friendly solution
for supporting building on other platforms.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/elfutils: split upstreamable parts of portability patch
Michael Pratt [Sat, 18 May 2024 03:21:42 +0000 (23:21 -0400)]
tools/elfutils: split upstreamable parts of portability patch

The addition of LT_INIT as well as the adjustment of
the BUILD_STATIC and addition of the BUILD_SHARED conditionals
and their usage to block building of shared objects
and adjust the variables for building static libraries
is potentially upstream-friendly.

The use of a manifest file to keep a list
of the objects in each library instead of calling ar
is also potentially upstream-friendly.

Separate these changes from the macOS-specific hacks.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/elfutils: use conditional to block build of shared objects
Michael Pratt [Sat, 18 May 2024 01:23:33 +0000 (21:23 -0400)]
tools/elfutils: use conditional to block build of shared objects

Add a potentially upstream-friendly conditional
using the libtool configure variable "enable_shared"
in order to block building and installing of shared objects
and adjust the build of static libraries
instead of directly patching lines in or out.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/elfutils: do not use ar to list library objects
Michael Pratt [Thu, 13 Jun 2024 19:40:57 +0000 (15:40 -0400)]
tools/elfutils: do not use ar to list library objects

The use of ar to list the archive members in a library
in order to include them in another library is not portable.

On BSD and macOS, ar will also list
the special archive member "__.SYMDEF"
which is not a compiled object, rather it is
part of the metadata prepended to the library by ranlib.

Fix this by writing the list of unique objects used
to create the library into a separate "manifest" file
when the library is created, which will be read later
when the Makefiles of other subdirectories are ran.

Extend this to all other libraries whether or not they are linked
to another library for a shared object that is installed
so that it is possible for any of the libraries
to be statically built with more objects.

The use of the wildcard function to ignore the
special archive members which are only metadata
is no longer needed to prevent build errors.

Not using the wildcard function is preferred,
since errors should be caught during the build
instead of when linking something else or at runtime.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/elfutils: do not use libtool for all subdirectories
Michael Pratt [Sat, 18 May 2024 00:11:58 +0000 (20:11 -0400)]
tools/elfutils: do not use libtool for all subdirectories

Importing gnulib in order to have a local portable library
to link against for missing functions currently requires
using libtool to produce the libgnu.la library.

Ideally, linking would be simple if the rest of the libraries
built by elfutils were also built using libtool, as linking
them together would not require any manipulations of library paths.

However, upstream elfutils does not support building the libraries
statically with libtool, so using libtool comes at the cost
of creating a huge patch to introduce that functionality.

For building on macOS, it turns out that libgnu.la is only needed
for building the binaries, and that just one or two objects from libgnu
are needed to build the libraries, so in this case, it would be simple
to add the specific non-libtool-wrapped library and objects
to the link paths as needed, rather than use libtool to link
the libtool wrappers, which greatly reduces the need to patch.

Not using libtool also makes the original Makefile definitions for LIBADD
once again be the right ones to use. However, to be portable,
for libdw the wildcard function needs to be used in order to exclude
special archive members like "__.SYMDEF" which are not compiled objects
because some BSD-like versions of ar include that metadata in the list,
or because the library included may have objects from another subdirectory.
Also, the rest of the subdirectories have custom "LDLIBS" variables
meant for building shared objects only, so define the LIBADD variables
with objects from those existing definitions so that when building only
the static versions of the libraries, those objects can still be included.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/elfutils: use gnulib module for posix_fallocate()
Michael Pratt [Mon, 10 Jun 2024 18:43:04 +0000 (14:43 -0400)]
tools/elfutils: use gnulib module for posix_fallocate()

The version of posix_fallocate() patched into elfutils
for macOS using code from Mozilla is now patched into gnulib.

Import the fallocate-posix module and always link
the corresponding object to libraries whenever it is built.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/gnulib: add fallocate-posix module
Michael Pratt [Mon, 10 Jun 2024 08:04:41 +0000 (04:04 -0400)]
tools/gnulib: add fallocate-posix module

Add a module to gnulib to support posix_fallocate()
for macOS and other systems that are missing it.

Apple-specific code is sourced from Mozilla,
and the rest from glibc, both licensed under LGPL.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/elfutils: simplify portability patch
Michael Pratt [Sat, 18 May 2024 03:47:54 +0000 (23:47 -0400)]
tools/elfutils: simplify portability patch

Several changes to the elfutils source files
made during the process of figuring out how to
successfully build elfutils on macOS
turn out to not be necessary to do so,
and were most likely leftover bits during testing.

Remove the line changes that are not needed
and add some line changes to adapt to sources as is:

 - Remove now unnecessary bump to autoconf version prereq
 - AC_CONFIG_MACRO_DIRS is not necessary to define
   as ACLOCAL_AMFLAGS is already defined in Makefiles
 - let libtool "enable_static" variable also decide the value
   of the local conditional BUILD_STATIC
 - override configure variables instead of removing
   checks for libraries or additions to LDFLAGS
 - only exclude "hidden" attribute for macOS instead of deleting
 - preserve original list of sources to build for libelf
 - use openwrt Makefile to add gnulib headers
 - use openwrt Makefile to add LIBADD variables
 - remove deletion of variables and rules for shared objects
 - prefer recursively expanded variables over muliple renames
   each time that a word is added to its value
 - remove changes to subdirectories that are not built
   and remove changes to target files of those subdirectories
 - prefer basic text rename over variables in cases where
   there would be no line number difference
 - give LT_INIT forced default values that match upstream
 - move gl_EARLY and gl_INIT down relative to compiler checks
 - reorganize some line changes to save some lines

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/gnulib: ignore AC_PREREQ error if actual version passes
Michael Pratt [Sun, 19 May 2024 23:33:13 +0000 (19:33 -0400)]
tools/gnulib: ignore AC_PREREQ error if actual version passes

The gnulib-tool script is written to have a fatal error
whenever the minimum required version of autoconf
for the project that gnulib is being imported into
as defined in configure.ac was less than
the minimum required version required by gnulib.

However, none of this matters if the version of autoconf
that we use is newer than both requirements.

Instead, use functions from the bootstrap script
to check for the version of autoconf being used
and print a warning whenever this case occurs.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/gnulib: allow forced exclusion of functions after configure
Michael Pratt [Sat, 8 Jun 2024 03:52:56 +0000 (23:52 -0400)]
tools/gnulib: allow forced exclusion of functions after configure

Overriding variables used in both the macros and the headers
like setting REPLACE_FCNTL to 0 while invoking Make causes the
function aliases like rpl_fcntl() to not be defined,
however the object may still be built with the fnctl() function.

Usually this is enough for building while avoiding
the need to link the resulting libgnu library
to every single other build target for a project
in order to include the gnulib copy of the function,
because in these cases we don't care which version
of the function is used.

However for functions like fcntl() this doesn't work
as it is designed to use either the alias or standard declaration
from gnulib headers in order to be
a wrapper for the native host copy of fcntl()
by containing recursive calls to fcntl() within itself
after undefining the gnulib function declaration.

Overriding the variables used by the header when invoking Make
causes the header's declarations to be blocked,
and this results in the gnulib version of fcntl()
to call itself recursively and indefinitely
leading to segmentation faults.

Fix this by using macros defined with those variables
in order to exclude the function during preprocessing.

While at it, do the same for reallocarray()
so that the configure option --avoid=reallocarray
and Make variable REPLACE_REALLOCARRAY set to 0
would have a similar effect.

In the future this patch can be expanded to include
more functions and some version of this may be upstreamable.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobcm27xx: add support for RPI A, A+, 3A+, Zero2 and Zero2W
Dave Brand [Sat, 13 Apr 2024 19:36:07 +0000 (15:36 -0400)]
bcm27xx: add support for RPI A, A+, 3A+, Zero2 and Zero2W

These devices were already supported. I merely added missing entries to:
1. make them easier to locate in firmware selector
2. allow firmware upgrades to proceed without dire warnings

Sample dire warning contains:
    upgrade: Device raspberrypi,model-zero-2-w not supported by this image
    upgrade: Supported devices: rpi-3-b rpi-3-b-plus rpi-zero-2 \
      raspberrypi,2-model-b-rev2 raspberrypi,3-model-b \
      raspberrypi,3-model-b-plus raspberrypi,3-compute-module \
      raspberrypi,compute-module-3 raspberrypi,model-zero-2

With this patch, the firmware upgrade proceeds normally.

Signed-off-by: Dave Brand <dbrand666@users.noreply.github.com>
5 months agobase-files: migrate old UCI network bridge ports syntax
Rafał Miłecki [Sat, 15 May 2021 21:04:35 +0000 (23:04 +0200)]
base-files: migrate old UCI network bridge ports syntax

netifd supports more accurate "ports" option (instead of "ifname") for
years now. Relevant changes were even backported to OpenWrt 21.02. Add
uci-defaults script that translates config files using deprecated
syntax.

Identical commit f716c30241d5 ended up reverted back in 2021 by
80be798d4a4f due to breaking downgrades. With 19.07 support ended it
should no longer be an issue.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 months agotools/fakeroot: update to 1.33
Christian Marangi [Tue, 18 Jun 2024 15:02:54 +0000 (17:02 +0200)]
tools/fakeroot: update to 1.33

fakeroot (1.33-1) unstable; urgency=medium

  * New upstream version.
    - Patch from Samuel Thibault to add renameat2 support.
      closes: #1061257.

 -- Clint Adams <clint@debian.org>  Sun, 21 Jan 2024 11:56:06 -0500

fakeroot (1.32.2-1) unstable; urgency=medium

  * New upstream version.
    - Romanian man page translation from Remus-Gabriel Chelu.
      closes: #1055386.
    - patch from Rudi Heitbaum to add missing wrapped.h dependency.
      closes: #1041674.

 -- Clint Adams <clint@debian.org>  Mon, 06 Nov 2023 07:15:47 -0500

fakeroot (1.32.1-1) unstable; urgency=medium

  * New upstream version.
  * Updated German translation from Chris Leick.  closes: #1032206.
  * Patch from John Paul Adrian Glaubitz to add build profile to
    allow bootstrapping.  closes: #1040828.

 -- Clint Adams <clint@debian.org>  Wed, 12 Jul 2023 09:59:17 -0400

fakeroot (1.32-1) unstable; urgency=medium

  * New upstream version.

 -- Clint Adams <clint@debian.org>  Mon, 10 Jul 2023 09:14:43 -0400

fakeroot (1.31-1) unstable; urgency=medium

  * New upstream version.
    - patch from Johannes Schauer Marin Rodrigues to not use
      temporary file in chown test.  closes: #1026132.

 -- Clint Adams <clint@debian.org>  Mon, 06 Feb 2023 10:12:11 -0500

fakeroot (1.30.1-1) unstable; urgency=medium

  * New upstream version.
    - fixes and extends time64 support to fstatat64.
      closes: #1023286.

 -- Clint Adams <clint@debian.org>  Thu, 03 Nov 2022 15:04:55 -0400

fakeroot (1.30-1) unstable; urgency=medium

  * New upstream version.
    - tries to cope with time64 on 32-bit architectures.
      closes: #1023286.
  * Drop kludge for glibc 2.33.

 -- Clint Adams <clint@debian.org>  Wed, 02 Nov 2022 20:17:56 -0400

Link: https://github.com/openwrt/openwrt/pull/15746
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoramips: Fix DOS line endings
Hauke Mehrtens [Mon, 17 Jun 2024 20:57:02 +0000 (22:57 +0200)]
ramips: Fix DOS line endings

Convert line endings from DOS to Unix using dos2unix.

Fixes: 2da2705a441a ("ramips: add support for WINSTARS WS-WN536P3")
Fixes: 5560791bbd6d ("ramips: add support for OpenFi 5Pro Travel Router")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agoscripts/download.pl: detach mirror URLs from script file
Christian Marangi [Tue, 18 Jun 2024 14:09:30 +0000 (16:09 +0200)]
scripts/download.pl: detach mirror URLs from script file

Detach URL from download script to make it easier to change and update
the URLs.

The mirror list is moved to a JSON file in the scripts directory called
projectsmirrors.json.

Link: https://github.com/openwrt/openwrt/pull/15745
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agotools: tar: update to 1.35
Robert Marko [Tue, 18 Jun 2024 11:32:31 +0000 (13:32 +0200)]
tools: tar: update to 1.35

Instead of backporting select 1.35 fixes to make tar work for us, lets
update to 1.35 now that we have identified the upstream fix for macOS.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15743
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agobcm27xx: remove 6.6 CONFIG_ARCH_BCM_63XX symbol
Álvaro Fernández Rojas [Tue, 18 Jun 2024 19:04:22 +0000 (21:04 +0200)]
bcm27xx: remove 6.6 CONFIG_ARCH_BCM_63XX symbol

This symbol was removed upstream, but it was present on bcm27xx due to a
malformed upstream RPi patch.

Fixes: 8c405cdcccad ("bcm27xx: add 6.6 kernel patches")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agobcm27xx: enable 6.6 testing kernel
Álvaro Fernández Rojas [Fri, 10 May 2024 16:49:13 +0000 (18:49 +0200)]
bcm27xx: enable 6.6 testing kernel

The bcm27xx now supports 6.6 kernel as testing.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agobcm27xx: refresh 6.6 kernel config files
Álvaro Fernández Rojas [Fri, 10 May 2024 11:19:19 +0000 (13:19 +0200)]
bcm27xx: refresh 6.6 kernel config files

Refresh config for kernel 6.6 and add missing symbols.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agobcm27xx: add 6.6 kernel patches
Álvaro Fernández Rojas [Fri, 10 May 2024 11:19:19 +0000 (13:19 +0200)]
bcm27xx: add 6.6 kernel patches

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

Some patches needed rebasing and, as usual, the applied and reverted, wireless
drivers, Github workflows, READMEs and defconfigs patches were removed.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agobcm27xx: copy kernel config from 6.1 to 6.6
Álvaro Fernández Rojas [Fri, 10 May 2024 12:50:19 +0000 (14:50 +0200)]
bcm27xx: copy kernel config from 6.1 to 6.6

This is preparation for 6.6 kernel support. Copying files makes it easier to
track their git history.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agogeneric: replace spi Silicon Labs patch with upstream version
Mieczyslaw Nalewaj [Mon, 17 Jun 2024 23:43:47 +0000 (01:43 +0200)]
generic: replace spi Silicon Labs patch with upstream version

Replace Silicon Labs patch with upstream version as they got merged in
kernel 6.3.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
[ rework commit title and description, use better patch ]
Link: https://github.com/openwrt/openwrt/pull/15300
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoath10k-ct: bump to version 6.7
Christian Marangi [Mon, 17 Jun 2024 17:00:05 +0000 (19:00 +0200)]
ath10k-ct: bump to version 6.7

Bump ath10k-ct to version 6.7.

Drop patch 100 that got merged upstream.

Link: https://github.com/openwrt/openwrt/pull/15735
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agomac80211: backport RX timestamp flags patch
Christian Marangi [Mon, 17 Jun 2024 16:56:53 +0000 (18:56 +0200)]
mac80211: backport RX timestamp flags patch

Backport RX timestamp flags patch needed for ath10k-ct to compile with
newer versions.

Link: https://github.com/openwrt/openwrt/pull/15735
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoath10k-ct: replace LEDs patch with upstream patch
Christian Marangi [Mon, 17 Jun 2024 16:36:58 +0000 (18:36 +0200)]
ath10k-ct: replace LEDs patch with upstream patch

LEDs support for ath10k has finally merged upstream hence replace it
with the upstream version.

Link: https://github.com/openwrt/openwrt/pull/15735
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agomac80211: ath10k: replace LEDs patch with upstream patch
Christian Marangi [Mon, 17 Jun 2024 16:23:44 +0000 (18:23 +0200)]
mac80211: ath10k: replace LEDs patch with upstream patch

LEDs support for ath10k has finally merged upstream hence replace it
with the upstream version.

Link: https://github.com/openwrt/openwrt/pull/15735
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agomvebu: uDPU/eDPU: mount F2FS with ZSTD compression
Robert Marko [Wed, 3 Jan 2024 12:25:04 +0000 (13:25 +0100)]
mvebu: uDPU/eDPU: mount F2FS with ZSTD compression

Now that we can pass the desired compression via cmdline, pass ZSTD as the
desired compression algorithm for F2FS.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
5 months agomvebu: uDPU/eDPU: mount misc partition with ZSTD compression
Robert Marko [Mon, 10 Jul 2023 11:43:51 +0000 (13:43 +0200)]
mvebu: uDPU/eDPU: mount misc partition with ZSTD compression

F2FS requires the compression algorith to be passed as argument while
mounting, so lets do so for the misc partition.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
5 months agomvebu: uDPU/eDPU: format F2FS partitons with compression support
Robert Marko [Mon, 10 Jul 2023 11:40:26 +0000 (13:40 +0200)]
mvebu: uDPU/eDPU: format F2FS partitons with compression support

In order to prolong the eMMC life and utilize ZSTD compression on Methode
devices, we must format the F2FS rootfs and misc partition with xattr and
compression support feature flags first.

This will only happen if partitions are broken currently, but later
commits will add support to convert existing boards to use compression.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
5 months agomvebu: cortexa53: include mkfs.f2fs and fdisk for sysupgrade
Robert Marko [Mon, 10 Jul 2023 11:37:42 +0000 (13:37 +0200)]
mvebu: cortexa53: include mkfs.f2fs and fdisk for sysupgrade

Methode devices require mkfs.f2fs in order to format rootfs and misc
partitions if they have not already been formatted.
fdisk is required if partition table got broke so it can be regenerated.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
5 months agomvebu: cortexa53: enable F2FS ZSTD compression support
Robert Marko [Tue, 27 Jun 2023 08:26:06 +0000 (10:26 +0200)]
mvebu: cortexa53: enable F2FS ZSTD compression support

We would love to utilize ZSTD compression support in F2FS on the
Methode euroDPU so lets enable the required kernel support.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
5 months agoRevert "mac80211: ath10k: replace LEDs patch with upstream patch"
Christian Marangi [Mon, 17 Jun 2024 16:33:19 +0000 (18:33 +0200)]
Revert "mac80211: ath10k: replace LEDs patch with upstream patch"

This reverts commit dc9c5d1ee72564d97b7d76ab4db239e038916d31.

Additional file for ath10k-ct slipped in, revert for a better version
pushed later.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agomac80211: ath10k: replace LEDs patch with upstream patch
Christian Marangi [Mon, 17 Jun 2024 16:23:44 +0000 (18:23 +0200)]
mac80211: ath10k: replace LEDs patch with upstream patch

LEDs support for ath10k has finally merged upstream hence replace it
with the upstream version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agobuild: include tests/Makefile if available
Paul Spooren [Thu, 6 Jun 2024 17:28:52 +0000 (19:28 +0200)]
build: include tests/Makefile if available

Testing OpenWrt is important, and there is a test suite in the making.
For maximum convenience and minimal CI over-usage, make it simple to run
tests locally. The main Makefile now attempts to include
`tests/Makefile` and silently fails if it doesn't.

While the test suite[1] is still young, it provides good examples of how
to test things around OpenWrt: starting with shell scripts using
`bats`[2], followed by QEMU tests, and finally real device tests using
LabGrid[3]. This could lead to the creation of the best OpenWrt version
yet.

Please consult the `openwrt-tests.git` README.md for details on the
setup. Once installed you may run commands like the following:

* make tests/shell  # run shell tests
* make tests/x86-64 # run  and test x86/64 in QEMU

[1]: http://github.com/aparcar/openwrt-tests/
[2]: https://bats-core.readthedocs.io
[3]: https://labgrid.readthedocs.io

Signed-off-by: Paul Spooren <mail@aparcar.org>
Link: https://github.com/openwrt/openwrt/pull/15647
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agogeneric: 6.6: refresh patches
Daniel Golle [Mon, 17 Jun 2024 14:02:38 +0000 (15:02 +0100)]
generic: 6.6: refresh patches

Refresh patches as line numbers changed with newer upstream version
since original backport PR was opened.

Fixes: a5c095c453 ("generic: 6.6: replace (broken) downstream patch with upstream solution")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agobpf: also include toolchain standard header as system header
Christian Marangi [Sun, 5 May 2024 15:48:31 +0000 (17:48 +0200)]
bpf: also include toolchain standard header as system header

Also include toolchain standard header as system header. These are
required by xdp-tools that try to include stddef.h and stdbool.h for
some tools. These header are usually in /lib/gcc/../include but musl
also have some special variant in /include.

To fix compilation of xdp-tools, also include these standard header.
These header should follow ISO C standard and should not introduce
regression in bpf tools making them specific to an arch.

Link: https://github.com/openwrt/openwrt/pull/15390
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agobase-files: fix ipcalc bound calculation for /31 prefix
Leon M. Busch-George [Thu, 9 May 2024 09:32:26 +0000 (11:32 +0200)]
base-files: fix ipcalc bound calculation for /31 prefix

A small regress from the translation to shell.
Fixes #12921, originally fixed in #12925 (Github).

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Link: https://github.com/openwrt/openwrt/pull/15430
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agogeneric: 6.6: replace (broken) downstream patch with upstream solution
Daniel Golle [Thu, 30 May 2024 11:33:37 +0000 (12:33 +0100)]
generic: 6.6: replace (broken) downstream patch with upstream solution

Our downstream patch "net/core: add optional threading for backlog processing"
has been broken with the switch to Linux 6.6.
Replace it by backporting the now available upstream solution.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://github.com/openwrt/openwrt/pull/15592
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoxdp-tools: update to v1.4.2
Konstantin Demin [Thu, 13 Jun 2024 18:00:31 +0000 (21:00 +0300)]
xdp-tools: update to v1.4.2

- release notes:
  https://github.com/xdp-project/xdp-tools/releases/tag/v1.4.2
- patches rebased manually:
  - 010-configure-respect-LDFLAGS.patch

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15705
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoscripts/ext-toolchain: add missing libc library specs
Christian Marangi [Mon, 17 Jun 2024 11:19:52 +0000 (13:19 +0200)]
scripts/ext-toolchain: add missing libc library specs

Add missing libc library spec that weren't added to the ext-toolchain
script when the library were introduced in the packages libs toolchain
Makefile.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agolibquadmath: Add libquadmath to the toolchain
Carlos Miguel Ferreira [Wed, 12 Jun 2024 00:20:59 +0000 (01:20 +0100)]
libquadmath: Add libquadmath to the toolchain

This commit makes the libquadmath library available to the GCC
toolchain. This library is important for libraries such as
Boost.charconv

Signed-off-by: Carlos Miguel Ferreira <carlosmf.pt@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15637
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agouml: drop 6.1 kernel support files
Christian Lamparter [Sun, 2 Jun 2024 13:58:40 +0000 (15:58 +0200)]
uml: drop 6.1 kernel support files

Drop config+patches for kernel 6.1.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15713
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agouml: switch to 6.6 kernel
Christian Lamparter [Sun, 2 Jun 2024 13:56:56 +0000 (15:56 +0200)]
uml: switch to 6.6 kernel

Switch the uml target to kernel 6.6.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15713
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agouml: define "generic" subtarget
Christian Lamparter [Fri, 14 Jun 2024 15:05:47 +0000 (17:05 +0200)]
uml: define "generic" subtarget

UML didn't have a subtarget defined.

While this compiled fine, the patch caused funny filenames
for the generated files to appear:
 - "openwrt-uml--vmlinux"
 - "openwrt-uml--squashfs.img"
 - "openwrt-uml--ext4.img"
 - ...

since "generic" is implied anyway, let's just set it.

Fixes: d997477775bf ("treewide: remove implicit SUBTARGET")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15713
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoapm821xx: drop 6.1 kernel support files
Christian Lamparter [Sun, 2 Jun 2024 14:03:26 +0000 (16:03 +0200)]
apm821xx: drop 6.1 kernel support files

Drop config+patches for kernel 6.1.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15721
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoapm821xx: switch to 6.6 kernel
Christian Lamparter [Sun, 2 Jun 2024 14:01:04 +0000 (16:01 +0200)]
apm821xx: switch to 6.6 kernel

Switch the apm821xx targets to kernel 6.6.
no complains received.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15721
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agotreewide: gpio to gpios
Rosen Penev [Mon, 10 Jun 2024 23:49:29 +0000 (16:49 -0700)]
treewide: gpio to gpios

gpio is deprecated. Found with dtc's -Wdeprecated_gpio_property

Used git grep -E $'\tgpio = <' to make the changes.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15681
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoqualcommax: ipq807x: use ath11k_patch_mac for SXK80
Andrew Smith [Tue, 28 May 2024 08:35:28 +0000 (09:35 +0100)]
qualcommax: ipq807x: use ath11k_patch_mac for SXK80

Use ath11k_patch_mac and ath11k_set_macflag functions for SXK80

Signed-off-by: Andrew Smith <gul.code@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/15732
Signed-off-by: Robert Marko <robimarko@gmail.com>