63709 Commits

Author SHA1 Message Date
Georgi Valkov
d3bb23946e toolchain: gcc: fix build error with Xcode 16.3
Some checks failed
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Waiting to run
Build host tools / Build host tools for linux and macos based systems (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Xcode 16.3 defines TARGET_OS_MAC, it was not defined in prior versions.
zutil.h conditionally defines fdopen as NULL when this macro is defined,
resulting in the following build error:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: e>
  318 | FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
      |          ^
./zutil.h:147:33: note: expanded from macro 'fdopen'
  147 | #        define fdopen(fd,mode) NULL /* No fdopen() */

In Xcode 16.2 and earlier, TARGET_OS_MAC was not defined so this entire
block was ignored, gcc and gdb used to compile and work fine.

This may have been used for compatibility with older versions of macOS,
but is no longer needed. By pure luck, the build worked fine for a long
time, because it did not properly detect macOS.
Fixed by removing the check for TARGET_OS_MAC.

Note that since Xcode 16.3, an entire set of TARGET_OS macros
are now defined, most of which are set to 0:
TARGET_OS_LINUX 0
TARGET_OS_MAC 1
TARGET_OS_OSX 1

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18467
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-16 14:38:34 +02:00
Georgi Valkov
dfb8115d0c toolchain: gdb: fix build error with Xcode 16.3
Xcode 16.3 defines TARGET_OS_MAC, it was not defined in prior versions.
zutil.h conditionally defines fdopen as NULL when this macro is defined,
resulting in the following build error:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: error: expected identifier or '('
  318 | FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
      |          ^
./zutil.h:147:33: note: expanded from macro 'fdopen'
  147 | #        define fdopen(fd,mode) NULL /* No fdopen() */

In Xcode 16.2 and earlier, TARGET_OS_MAC was not defined so this entire
block was ignored, gcc and gdb used to compile and work fine.

This may have been used for compatibility with older versions of macOS,
but is no longer needed. By pure luck, the build worked fine for a long
time, because it did not properly detect macOS.
Fixed by removing the check for TARGET_OS_MAC.

Note that since Xcode 16.3, an entire set of TARGET_OS macros
are now defined, most of which are set to 0:
TARGET_OS_LINUX 0
TARGET_OS_MAC 1
TARGET_OS_OSX 1

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18467
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-16 14:38:34 +02:00
Robert Marko
8c141e53d7 tools: m4: set -std=gnu17
Fedora 42 updated to GCC15 which now defaults to GNU23 as the default
instead of GNU17[1], and this breaks m4 compilation.

Its been reported upstream [2], so until its fixed lets simply set C
language version back to GNU17.

[1] https://gcc.gnu.org/gcc-15/porting_to.html#c23
[2] https://savannah.gnu.org/support/?111150

Link: https://github.com/openwrt/openwrt/pull/18505
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-16 13:52:33 +02:00
Christian Marangi
71446d8052
generic: fix broken ARM gc sections patch
Some checks failed
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build Kernel / Build all affected Kernels (push) Has been cancelled
Upstream version of ARM gc sections skip eeping some section. It was
reported some kernel load hang hence restore what we original did and
introduce a new patch that add the additional entry on top of the
upstream version.

Fixes: #18500
Fixes: 7843f21c5120 ("generic: replace ARM gc sections patch with upstream version")
Tested-by: Stefan Kalscheuer <stefan@stklcode.de> (Turris Omnia)
Link: https://github.com/openwrt/openwrt/pull/18503
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-16 00:43:34 +02:00
Christian Marangi
87cb0446b7
generic: fix broken TCP fraglist GRO patch
Some regression were reported with the backported upstream version. Old
kernel require an additional flush in some case and this was handled in
the old downstream patch.

Reintroduce the flush to fix the regression and refresh affected patch.

Fixes: f63d64ede06b ("generic: move patch from pending to backport")
Link: https://github.com/openwrt/openwrt/pull/18501
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-15 23:26:50 +02:00
Christian Marangi
f98ee3bbab
generic: drop redundant ATS SFP GT-T quirk patch
The ATS SFP GT-T quirk patch was backported to stable kernel 6.6 but
was not notice while bumping the kernel version as they listed the quirk
at the bottom of the SFP quirk table while our hack patch put it at the
top.

With migrating to the upstream version, the duplication was made more
apparent.

Drop the double entry for the SFP module as it's already there and not
needed and refresh patches.

Link: https://github.com/openwrt/openwrt/pull/18484
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-15 23:24:30 +02:00
Robert Marko
e17cbd0488 ipq-wifi: update to Git HEAD (2025-04-15)
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
953ce37a3191 ipq40xx: Add TP-Link Deco M5 BDF
f818835c7633 ipq5018: add BDF for GL.iNET GL-B3000 Add IPQ5018 BDF for GL.iNET GL-B3000.
38a18dc26c9b qcn6122: add BDF for GL.iNET GL-B3000 Add QCN6122 BDF for GL.iNET GL-B3000.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-15 13:50:33 +02:00
Chukun Pan
e086bb951c kernel: add missing submenu for diag modules
Some checks failed
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build Kernel / Build all affected Kernels (push) Has been cancelled
The submenu of two diag modules is missing, fix it.

Fixes: 65de1e0 ("kernel: add missing symbols for lxc")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/18480
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-14 11:01:25 +02:00
Christian Marangi
bed637d9d3
armsr: drop GC sections ARMv7 patch
Drop GC sections ARMv7 patch as the new upstream version already handle
it by disabling the config in the specific EFI boot stub driver.

Link: https://github.com/openwrt/openwrt/pull/18464
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-14 10:28:50 +02:00
Christian Marangi
7843f21c51
generic: replace ARM gc sections patch with upstream version
Replace ARM gc sections patch with upstream version. It seems this
feature is finally supported upstream with some minor difference.

In theory the upstream version should cut even more stuff, this really
needs to be evaluated if it's OK also to handle regression with the
kernel 6.12 update.

Link: https://github.com/openwrt/openwrt/pull/18464
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-14 10:28:49 +02:00
Christian Marangi
ff802ccc44
generic: replace SFP ignore TX FAULT with upstream version
Replace SFP ignore TX FAULT with upstream version by backporting the 2
related upstream patch. Refresh SFP affected patch.

Link: https://github.com/openwrt/openwrt/pull/18464
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-14 10:28:49 +02:00
Christian Marangi
f63d64ede0
generic: move patch from pending to backport
Move all patch that got merged upstream from pending to backport and add
related tag. This is to make it easier to update to kernel 6.12.

Patch 680 required some special care as the upstream version had to be
split in a series of 6 patch.

Referesh all affected patch.

Link: https://github.com/openwrt/openwrt/pull/18464
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-14 10:28:48 +02:00
Rudy Andram
b0d43be2f3 dnsmasq: bump release to 2.91
Some checks failed
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
updated 200-ubus_dns.patch
all remaining patches not required

Changelog for version 2.91 - https://thekelleys.org.uk/dnsmasq/CHANGELOG

version 2.91
	Fix spurious "resource limit exceeded messages". Thanks to
	Dominik Derigs for the bug report.

	Fix out-of-bounds heap read in order_qsort().
	We only need to order two server records on the ->serial field.
	Literal address records are smaller and don't have
	this field and don't need to be ordered on it.
	To actually provoke this bug seems to need the same server-literal
	to be repeated twice, e.g., --address=/a/1.1.1.1 --address-/a/1.1.1.1
	which is clearly rare in the wild, but if it did exist it could
	provoke a SIGSEGV. Thanks to Daniel Rhea for fuzzing this one.

	Fix buffer overflow when configured lease-change script name
	is too long.
	Thanks to Daniel Rhea for finding this one.

	Improve behaviour in the face of non-responsive upstream TCP DNS
	servers. Without shorter timeouts, clients are blocked for too long
	and fail with their own timeouts.

	Set --fast-dns-retries by default when doing DNSSEC. A single
	downstream query can trigger many upstream queries. On an
	unreliable network, there may not be enough downstream retries
	to ensure that all these queries complete.

	Improve behaviour in the face of truncated answers to queries
	for DNSSEC records. Getting these answers by TCP doesn't now
	involve a faked truncated answer to the downstream client to
	force it to move to TCP. This improves performance and robustness
	in the face of broken clients which can't fall back to TCP.

	No longer remove data from truncated upstream answers. If an
	upstream replies with a truncated answer, but the answer has some
	RRs included, return those RRs, rather than returning and
	empty answer.

	Fix handling of EDNS0 UDP packet sizes.
	When talking upstream we always add a pseudo header, and set the
        UDP packet size to --edns-packet-max. Answering queries from
	downstream, we get the answer (either from upstream or local
	data) If local data won't fit the advertised size (or 512 if
	there's not an EDNS0 header) return truncated. If upstream
        returns truncated, do likewise. If upstream is OK, but the
	answer is too big for downstream, truncate the answer.

	Modify the behaviour of --synth-domain for IPv6.
	When deriving a domain name from an IPv6 address, an address
	such as 1234:: would become 1234--.example.com, which is
	not legal in IDNA2008. Stop using the :: compression method,
	so 1234:: becomes
	1234-0000-0000-0000-0000-0000-0000-0000.example.com

	Fix broken dhcp-relay on *BSD. Thanks to Harold for finding
	this problem.

	Add --dhcp-option-pxe config. This acts almost exactly like
	--dhcp-option except that the defined option is only sent when
	replying to PXE clients. More importantly, these options are sent
	in reply PXE clients when dnsmasq in acting in PXE proxy mode. In
	PXE proxy mode, the set of options sent is defined by the PXE standard
	and the normal set of options is not sent. This config allows arbitrary
	options in PXE-proxy replies. A typical use-case is to send option
	175 to iPXE. Thanks to Jason Berry for finding the requirement for
	this.

	Support PXE proxy-DHCP and DHCP-relay at the same time.
        When using PXE proxy-DHCP, dnsmasq supplies PXE information to
        the client, which also talks to another "normal" DHCP server
        for address allocation and similar. The normal DHCP server may
        be on the local network, but it may also be remote, and accessed via
        a DHCP relay. This change allows dnsmasq to act as both a
        PXE proxy-DHCP server AND a DHCP relay for the same network.

	Fix erroneous "DNSSEC validated" state with non-DNSSEC
	upstream servers.  Thanks to Dominik Derigs for the bug report.

	Handle queries with EDNS client subnet fields better. If dnsmasq
	is configured to add an EDNS client subnet to a query, it is careful
	to suppress use of the cache, since a cached answer may not be valid
	for a query with a different client subnet. Extend this behaviour
	to queries which arrive a dnsmasq already carrying an EDNS client
	subnet.

	Handle DS queries to auth zones. When dnsmasq is configured to
	act as an authoritative server and has an authoritative zone
	configured, and receives a query for that zone _as_forwarder_
	it answers the query directly rather than forwarding it. This
	doesn't affect the answer, but it saves dnsmasq forwarding the
	query to the recursor upstream, which then bounces it back to dnsmasq
	in auth mode. The exception should be when the query is for the root
	of zone, for a DS RR. The answer to that has to come from the parent,
	via the recursor, and will typically be a proof-of-non-existence
	since dnsmasq doesn't support signed zones. This patch suppresses
	local answers and forces forwarding to the upstream recursor for such
	queries. It stops breakage when a DNSSEC validating client makes
	queries to dnsmasq acting as forwarder for a zone for which it is
	authoritative.

	Implement "DNS-0x20 encoding", for extra protection against
	reply-spoof attacks. Since DNS queries are case-insensitive,
	it's possible to randomly flip the case of letters in a query
	and still get the correct answer back.
	This adds an extra dimension for a cache-poisoning attacker
	to guess when sending replies in-the-blind since it's expected
	that the legitimate answer will have the same  pattern of upper
	and lower case as the query, so any replies which don't can be
	ignored as malicious. The amount of extra entropy clearly depends
	on the number of a-z and A-Z characters in the query, and this
	implementation puts a hard limit of 32 bits to make resource
	allocation easy. This about doubles entropy over the standard
	random ID and random port combination. This technique can interact
	badly with rare broken DNS servers which don't preserve the case
	of the query in their reply. The first time a reply is returned
	which matches the query in all respects except case, a warning
	will be logged. In this release, 0x020-encoding is default-off
	and must be explicitly enabled with --do-0x20-encoding. In future
	releases it may default on. You can avoid a future release
	changing the behaviour of an installation with --no-x20-encode.

	Fix a long-standing problem when two queries which are identical
	in every repect _except_ case, get combined by dnsmasq. If
	dnsmasq gets eg, two queries for example.com and Example.com
	in quick succession it will get the answer for example.com from
	upstream and send that answer to both requestors. This means that
	the query for Example.com will get an answer for example.com, and
	in the modern DNS, that answer may not be accepted.

Signed-off-by: Rudy Andram <rmandrad@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18357
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-13 21:29:46 +02:00
Hannu Nyman
c79572210f ca-certificates: Update to 20241223
Update ca-certificates to version 20241223

  * Update Mozilla certificate authority bundle to version 2.70.
    The following certificate authorities were added (+):
    + Telekom Security TLS ECC Root 2020
    + Telekom Security TLS RSA Root 2023
    + FIRMAPROFESIONAL CA ROOT-A WEB
    + TWCA CYBER Root CA
    + SecureSign Root CA12
    + SecureSign Root CA14
    + SecureSign Root CA15
    The following certificate authorities were removed (-):
    - Security Communication Root CA (closes: #1063093)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/18468
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-13 18:37:16 +02:00
INAGAKI Hiroshi
10a674d277 ath79: fix initramfs execution for NEC Aterm devices
Fix execution of initramfs image on NEC Aterm devices by increasing
available memory for lzma extraction of lzma-loader.

The size of initramfs image of v24.10.0 exceeds available memory
(LZMA_TEXT_START - LOADADDR) and loader data running at LZMA_TEXT_START
will be overwritten by extracted data. As a result, LZMA extraction will
be broken and stuck (or unexpectedly reset).
Fix that issue by setting higher LZMA_TEXT_START address to increase
available memory for LZMA extraction by lzma-loader.

log (v24.10.0):

boot> tftpd
tftpd start 192.168.0.1
boot> start tftp load openwrt-24.10.0-ath79-generic-ne
end tftp load length = 6569768
start memory load ...
memory load complete
  begin  : 0x80040000
  length : 6567044
  startup: 0x80040000

boot> boot
begin  : 0x80040000
length : 6567044
startup: 0x80040000
option: 0x0
NEC Aterm series (QCA9558)

Calibrating SGMII
SGMII cal value = 0xe

Configuring SGMII force mode
  SGMII_CONFIG : 0x000000a2
  MR_AN_CONTROL: 0x00008140
  MR_AN_CONTROL: 0x00000140

OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Decompressing kernel... [:<syntax:value>]');retu  <--- (stuck)
IPL:SOFT-RESET                    <--- (reset by WDT)
memory test ... ok
flinstall OK

boot version: 1.0.0
...

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18476
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-13 16:54:48 +02:00
Zoltan HERPAI
143569c2ed include: move generic riscv64 ISA to rv64gc
The current CFLAGS (rv64imafdc) for the riscv64 targets do not contain
the full generic compute extension (g), as that also includes the
zicsr and zifencei extensions/instructions. Rename the default ISA to
'generic' to add distinction to the current binaries (although it's very
minimal), and use rv64gc for CFLAGS.

This is also a prep step for the upcoming gcv (vector-extension supporting)
targets like the Spacemit K1, and the thead-cores like the TH1520.

Compile-tested: all riscv64 targets
Runtime-tested:
 - SiFive Unleashed (FU540)
 - SiFive Unmatched (FU740)
 - Nezha D1 (D1)
 - VisionFive2 (JH7110)

Link: https://github.com/openwrt/openwrt/pull/18094
Tested-by: Chuanhong Guo <gch981213@gmail.com> # siflower target
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2025-04-13 16:43:31 +02:00
Robert Marko
8cb7919a13 layerscape: armv7: drop skipped packages
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Now that all packages that relied on the skip mechanism are selected
via BUILD_DEVICES or by defaulting for the subtarget drop them from
individual DEVICE_PACKAGES so that Image Builder works again for armv7.

Fixes: #18411
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-13 11:25:14 +02:00
Robert Marko
598a0556b7 ls-rcw: select by default for layerscape/armv7
Currently, ls-rcw package is being included in the individual
profile DEVICE_PACKAGES but using the feature that allows skipping their
inclusion in the end image package list if prefixed with a tilde(~) which
was added in:
377b66990b97 ("build: introduce support to declare skip package")

But it not added to Image Builder so currently trying to build layerscape
device images in Image Builder will fail with:
ERROR: '~ls-rcw' is not a valid world dependency, format is name(@tag)([<>~=]version)

So, instead of having to rely on support for skipping package installation
and declaring the ls-rcw package in DEVICE_PACKAGES lets select it when
layerscape/armv7 target is selected.

Fixes: #18411
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-13 11:25:14 +02:00
Robert Marko
c04eaad12a layerscape: armv8_64b: drop skipped packages
Now that all packages that relied on the skip mechanism are selected
via BUILD_DEVICES or by defaulting for the subtarget drop them from
individual DEVICE_PACKAGES so that Image Builder works again for armv8_64b.

Fixes: #18412
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-13 11:25:14 +02:00
Robert Marko
8a28ddafe7 ls-ddr-phy: select by default for layerscape/armv8_64b
Currently, ls-ddr-phy package is being included in the individual
profile DEVICE_PACKAGES but using the feature that allows skipping their
inclusion in the end image package list if prefixed with a tilde(~) which
was added in:
377b66990b97 ("build: introduce support to declare skip package")

But it not added to Image Builder so currently trying to build layerscape
device images in Image Builder will fail with:
ERROR: '~ls-ddr-phy' is not a valid world dependency, format is name(@tag)([<>~=]version)

So, instead of having to rely on support for skipping package installation
and declaring the ls-ddr-phy package in DEVICE_PACKAGES lets select it when
layerscape/armv8_64b target is selected.

Fixes: #18412
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-13 11:25:14 +02:00
Robert Marko
84437eeec0 ls-dpl: select by default for layerscape/armv8_64b
Currently, ls-dpl package is being included in the individual
profile DEVICE_PACKAGES but using the feature that allows skipping their
inclusion in the end image package list if prefixed with a tilde(~) which
was added in:
377b66990b97 ("build: introduce support to declare skip package")

But it not added to Image Builder so currently trying to build layerscape
device images in Image Builder will fail with:
ERROR: '~ls-dpl' is not a valid world dependency, format is name(@tag)([<>~=]version)

So, instead of having to rely on support for skipping package installation
and declaring the ls-dpl package in DEVICE_PACKAGES lets select it when
layerscape/armv8_64b target is selected.

Fixes: #18412
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-13 11:25:14 +02:00
Robert Marko
2fb3efda0a ls-mc: select by default for layerscape/armv8_64b
Currently, ls-mc package is being included in the individual
profile DEVICE_PACKAGES but using the feature that allows skipping their
inclusion in the end image package list if prefixed with a tilde(~) which
was added in:
377b66990b97 ("build: introduce support to declare skip package")

But it not added to Image Builder so currently trying to build layerscape
device images in Image Builder will fail with:
ERROR: '~ls-mc' is not a valid world dependency, format is name(@tag)([<>~=]version)

So, instead of having to rely on support for skipping package installation
and declaring the ls-mc package in DEVICE_PACKAGES lets select it when
layerscape/armv8_64b target is selected.

Fixes: #18412
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-13 11:25:14 +02:00
Robert Marko
22f02beaab fman-ucode: select by default for layerscape/armv8_64b
Currently, fman-ucode package is being included in the individual
profile DEVICE_PACKAGES but using the feature that allows skipping their
inclusion in the end image package list if prefixed with a tilde(~) which
was added in:
377b66990b97 ("build: introduce support to declare skip package")

But it not added to Image Builder so currently trying to build layerscape
device images in Image Builder will fail with:
ERROR: '~fman-ucode' is not a valid world dependency, format is name(@tag)([<>~=]version)

So, instead of having to rely on support for skipping package installation
and declaring the fman-ucode package in DEVICE_PACKAGES lets select it when
layerscape/armv8_64b target is selected.

Fixes: #18412
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-13 11:25:14 +02:00
Robert Marko
03ab770da5 tfa-layerscape: set BUILD_DEVICES
Currently, tfa-layerscape packages are being included in the individual
profile DEVICE_PACKAGES but using the feature that allows skipping their
inclusion in the end image package list if prefixed with a tilde(~) which
was added in:
377b66990b97 ("build: introduce support to declare skip package")

But it not added to Image Builder so currently trying to build layerscape
device images in Image Builder will fail with:
ERROR: '~trusted-firmware-a-ls1012a-frdm' is not a valid world dependency, format is name(@tag)([<>~=]version)

So, instead of having to rely on support for skipping package installation
and declaring the individual TFA packages in DEVICE_PACKAGES we can just
do what other targets do and set BUILD_DEVICES so that TFA packages are
automatically set.

Fixes: #18412
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-13 11:25:14 +02:00
Robert Marko
4a7de50769 bcm63xx-cfe: install into image staging dir
Currently, bcm63xx-cfe is being installed into kernel build dir, however
that does not work for Image Builder as only certain artifacts from kernel
build dir are included in Image Builder.

So, simply install bcm63xx-cfe into image staging dir so its artifacts can
be used in Image Builder as well.

Fixes: #18408
Fixes: #18409
Link: https://github.com/openwrt/openwrt/pull/18463
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-13 10:44:19 +02:00
FUKAUMI Naoki
6690f551c8 rockchip: Add support for Radxa ROCK 4SE
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
The Radxa ROCK 4SE[1] is a single board computer using the Rockchip
RK3399-T.

Hardware
--------

- Dual-core Cortex-A72 and quad-core Cortex-A53 CPU
- Mali-T860MP4 GPU
- LPDDR4 4GB RAM
- M.2 M Key slot (PCIe 2.1 x4)
- eMMC connector
- microSD card slot
- Wi-Fi 5 (not supported)
- Gigabit Ethernet with PoE support (additional PoE HAT required)
- USB 3.0 Type-A OTG port
- USB 3.0 Type-A HOST port
- 2x USB 2.0 Type-A HOST ports
- USB Type-C power port (5V only)
- 40 Pin GPIO header

[1] https://radxa.com/products/rock4/4se

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

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://github.com/openwrt/openwrt/pull/17554
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-13 00:35:46 +02:00
FUKAUMI Naoki
18925614c0 rockchip: Add support for Radxa ROCK 4C+
The Radxa ROCK 4C+[1] is a single board computer with dual HDMI using
the Rockchip RK3399-T.

Hardware
--------

- Dual-core Cortex-A72 and quad-core Cortex-A53 CPU
- Mali-T860MP4 GPU
- LPDDR4 4GB RAM
- eMMC connector
- microSD card slot
- Wi-Fi 5 (not supported)
- Gigabit Ethernet with PoE support (additional PoE HAT required)
- USB 3.0 Type-A OTG port
- USB 3.0 Type-A HOST port
- 2x USB 2.0 Type-A HOST ports
- USB Type-C power port (5V only)
- 40 Pin GPIO header

[1] https://radxa.com/products/rock4/4cp

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

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://github.com/openwrt/openwrt/pull/17554
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-13 00:35:46 +02:00
Schneider Azima
7921e48d43 mediatek: add support for Mercusys MR80X v3
This commit adds support for Mercusys MR80X(EU) v3 router.

Device specification:
 - SoC: Mediatek MT7981b, Cortex-A53, 64-bit
 - RAM: 512MB
 - Flash: SPI NAND GigaDevice GD5F1GQ5UEYIGY (128 MB)
 - Ethernet: 4x 100/1000 Mbps LAN1,LAN2,LAN3 & WAN
 - Wireless: 2.4GHz (802.11 b/g/n/ax)
 - Wireless: 5GHz (802.11 a/n/ac/ax)
 - LEDs: 1 orange and 1 green status LEDs, 4 green gpio-controlled LEDs
   on ethernet ports
 - Buttons: 1 (Reset)
 - Bootloader: Main U-Boot - U-Boot 2022.01-rc4. Additionally, both UBI
   slots contain "seconduboot" (also U-Boot 2022.01-rc4)

Installation (UART):
 - Place OpenWrt initramfs-kernel image on tftp server with IP 192.168.1.2
 - Attach UART, switch on the router and interrupt the boot process by
   pressing 'Ctrl-C'.
 - Set the uboot environment for startup.
   setenv tp_boot_idx 0; setenv bootcmd bootm 0x46000000; saveenv
   If the bootarg is set to boot from ubi1, also change it to ubi0.
 - Load and run OpenWrt initramfs image.
   setenv serverip 192.168.1.2; setenv ipaddr 192.168.1.1; tftpboot initramfs-kernel.bin; bootm
 - Browse IP 192.168.1.1, upload the 'sysupgrade' image and do upgrade.

Recovery:
 - Press Reset button and power on the router.
 - Navigate to U-Boot recovery web server (http://192.168.1.1/) and
   upload the OEM firmware.

Stock layout:
0x000000000000-0x000000200000 : "boot"
0x000000200000-0x000000300000 : "u-boot-env"
0x000000300000-0x000003500000 : "ubi0"
0x000003500000-0x000006700000 : "ubi1"
0x000006700000-0x000006f00000 : "userconfig"
0x000006f00000-0x000007300000 : "tp_data"

ubi0/ubi1 format:
U-Boot at boot checks that all volumes are in place:
+-------------------------------+
| Volume Name: uboot   Vol ID: 0|
| Volume Name: kernel  Vol ID: 1|
| Volume Name: rootfs  Vol ID: 2|
+-------------------------------+

MAC addresses:
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| label   | 94:0C:xx:xx:xx:12 | label     |
| WAN     | 94:0C:xx:xx:xx:13 | label+1   |
| LAN     | 94:0C:xx:xx:xx:12 | label     |
| WLAN 2g | 94:0C:xx:xx:xx:11 | label-1   |
| WLAN 5g | 94:0C:xx:xx:xx:10 | label-2   |
+---------+-------------------+-----------+
label MAC address was found in UBI partition "tp_data", file
"default-mac".

Signed-off-by: Schneider Azima <Schneider-Azima12@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/18181
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-12 23:50:27 +02:00
John Audia
66b5ed7a4e kernel: bump 6.6 to 6.6.87
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build host tools / Build host tools for linux and macos based systems (push) Waiting to run
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.87

Manually rebased:
	generic-hack/781-usb-net-rndis-support-asr.patch

All other patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18457
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-12 23:31:39 +02:00
Mantas Pucka
6bbf4a540d
wifi-scripts: add hotplug handler for slow-to-initialize ath12k radios
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Some ath12k radios can take long time to initialize and register a
phy. This can cause netifd to fail to detect them during initial scan.
To address this issue, a hotplug script has been added to retry
configuration once they have registered their phy.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-12 10:38:54 +02:00
Mantas Pucka
de205366a2
linux-firmware: ath12k: package firmware for QCN9274
Package wireless firmware for Qualcomm QCN9274.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-12 10:38:54 +02:00
Mantas Pucka
9e3a2466f6
mac80211: ath12k: add patches for 160MHz support
Add series enabling 160MHz channels on ath12k

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-12 10:38:53 +02:00
Mantas Pucka
49e6e1daf4
mac80211: ath12k: fix wideband operation on QCN9274
Add patches to enable QCN9274 radios that support both 5GHz and 6GHz
bands.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-12 10:38:53 +02:00
Mantas Pucka
c1acef2e0c
mac80211: ath12k: support fetching regdb from board-2.bin
In board-2.bin available at linux-firmare regdb is stored with
board-id=255. This change is needed to properly use it.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-12 10:38:52 +02:00
Mantas Pucka
2de5564f7d
qualcommbe: ipq95xx: pcs: fix USXGMII link-up failure
USXGMII link-up may fail due to too short delay after PLL reset.
Increase the delay to fix this.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-12 10:38:52 +02:00
Mantas Pucka
cd1acb9db5
qualcommbe: ipq95xx: pcs: support 2.5G PHY
Fixes to PCS driver to support 2.5G PHY

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-12 10:38:51 +02:00
Mantas Pucka
e46bc86df7
qualcommbe: ipq95xx: nsscc: fix port5 clock parent
Fix incorrect port5 clock management

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-12 10:38:50 +02:00
Mantas Pucka
baf7be6705
qualcommbe: ipq95xx: add bus clock for NSSCC
Missing bus clock prevent access to NSSCC registers and thus it is
impossible change clock configuration, when ethernet connection speed
changes.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-12 10:38:50 +02:00
Mantas Pucka
7450f993e8
qualcommbe: ipq95xx: fix PCIe operation
Add patches that fix:
 * Wrong MSI interrups for PCIe3
 * Hang during reboot due to stopped clocks

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-12 10:38:49 +02:00
Paul Donald
412c850f07 lldpd: enable hardware inventory information (TLV) management
Some checks failed
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
lldpd can send several hardware inventory TLV fields. Extend the init
script to provide these when the existing flag 'lldpmed_no_inventory' is
disabled. Five new methods provide default values for some of them,
taken from /etc/os-release and /etc/board.json.

There is no homogeneous method to determine the hardware serial number,
so it can be provided manually, as can asset ID.

Note: properties >= 32 characters are truncated at send time (by lldpd),
and some (Cisco) equipment displays junk after strings >= 32 characters.
So truncate to 31.

Tested on: 24.10.0 (known compatible with 22 and 23 also)

===
Example
===

The following lldpd config lines:

 configure inventory hardware-revision "v0"
 configure inventory software-revision "r28427-6df0e3d02a"
 configure inventory firmware-revision "OpenWrt 24.10.0"
 configure inventory serial-number "ABCDEF-123456"
 configure inventory manufacturer "glinet"
 configure inventory model "GL.iNet GL-MT6000"
 # 32 characters:
 configure inventory asset "abcdefghijklmnopqrstuvwxyz 12345"

Produce the following TLV (decoded by Wireshark):

Telecommunications Industry Association TR-41 Committee - Inventory - Hardware Revision
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0000 0110 = TLV Length: 6
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Hardware Revision (0x05)
    Hardware Revision: v0
Telecommunications Industry Association TR-41 Committee - Inventory - Firmware Revision
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0001 0011 = TLV Length: 19
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Firmware Revision (0x06)
    Firmware Revision: OpenWrt 24.10.0
Telecommunications Industry Association TR-41 Committee - Inventory - Software Revision
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0001 0101 = TLV Length: 21
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Software Revision (0x07)
    Software Revision: r28427-6df0e3d02a
Telecommunications Industry Association TR-41 Committee - Inventory - Serial Number
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0001 0100 = TLV Length: 20
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Serial Number (0x08)
    Serial Number: ABCDEF-123456
Telecommunications Industry Association TR-41 Committee - Inventory - Manufacturer Name
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0000 1010 = TLV Length: 10
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Manufacturer Name (0x09)
    Manufacturer Name: glinet
Telecommunications Industry Association TR-41 Committee - Inventory - Model Name
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0001 0101 = TLV Length: 21
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Model Name (0x0a)
    Model Name: GL.iNet GL-MT6000
Telecommunications Industry Association TR-41 Committee - Inventory - Asset ID
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0010 0011 = TLV Length: 35
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Asset ID (0x0b)
    Asset ID: abcdefghijklmnopqrstuvwxyz 1234

The Cisco DUT displays:

Hardware Revision: 	v0
Firmware Revision: 	OpenWrt 24.10.0
Software Revision: 	r28427-6df0e3d02a
Serial Number:  ABCDEF-123456
Manufacturer Name: 	glinet
Model Name: 	GL.iNet GL-MT6000
Asset ID: 	abcdefghijklmnopqrstuvwxyz 1234

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18354
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-11 22:51:06 +02:00
Christian Marangi
b68173500a
ath10k-ct: partially revert removal of 003 patch
Partially revert removal of 003 patch to fix compilation error with
kernel 6.6.

In 6.6 .remove still require int and .remove_new needs to be used.

Fixes: bfb106e8ae73 ("mac80211: backport API change for sta rate control update")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-11 21:40:31 +02:00
Christian Marangi
473cfb4ff5
generic: fix kernel warning no previous prototype for ...
It seems new kernel version introduced -Wmissing-prototypes. This new
warning reported drivers that define non static function that are used
statically in the driver.

Fix this by declaring making those function actually static if not
defined in any header and not used outside of the single driver.

Co-authored-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18455
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-11 20:34:24 +02:00
Christian Marangi
0b5650f767
generic: add missing of.h header to ar8327
It seems new kernel linux version reorganized the header include and now
of.h needs to be explicitly included. This should have been done from
when the driver was introduced.

Add the missing of.h header to fix compilation error in later kernel
version.

Co-authored-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18455
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-11 20:34:24 +02:00
Felix Fietkau
f8ed36f0d7 unetmsg: allow communication between hosts if no service is defined
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Simplifies unet setup

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-04-11 13:02:31 +02:00
Christian Marangi
f212e8b39f
ubootenv-nvram: convert driver to .remove_new
Convert driver to .remove_new in preparation for kernel 6.12 support.

Link: https://github.com/openwrt/openwrt/pull/18454
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-11 11:21:20 +02:00
Christian Marangi
83286b911e
ltq-ptm: convert driver to .remove_new
Convert driver to .remove_new in preparation for kernel 6.12 support.

Link: https://github.com/openwrt/openwrt/pull/18454
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-11 11:21:20 +02:00
Christian Marangi
0432866d1f
ltq-deu: convert driver to .remove_new
Convert driver to .remove_new in preparation for kernel 6.12 support.

Link: https://github.com/openwrt/openwrt/pull/18454
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-11 11:21:19 +02:00
Christian Marangi
fac3d99732
ltq-atm: convert driver to .remove_new
Convert driver to .remove_new in preparation for kernel 6.12 support.

Link: https://github.com/openwrt/openwrt/pull/18454
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-11 11:21:19 +02:00
Christian Marangi
bd532bd48e
ltq-adsl-mei: convert driver to .remove_new
Convert driver to .remove_new in preparation for kernel 6.12 support.

Link: https://github.com/openwrt/openwrt/pull/18454
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-11 11:21:19 +02:00
Christian Marangi
6651efa4ff
gpio-button-hotplug: convert to .remove_new
Convert package to .remove_new in preparation for kernel 6.12 support.

Link: https://github.com/openwrt/openwrt/pull/18454
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-11 11:21:18 +02:00