realtek: mdio: RTL838x: move functions over to bus
The mdio bus functions are still split between ethernet and dsa driver.
Before moving everthing out to a separate mdio driver we decided to
collect everything in the ethernet driver with the rtmdio prefix.
Take over the remaining RTL838x functions.
Remark: This is more or less a copy/paste with function renaming. As
there are still some consumers in the DSA driver the definitions and
inclusions must be flipped.
Michael Pratt [Sat, 31 May 2025 18:08:53 +0000 (14:08 -0400)]
gnulib-l10n: add package
This package is a supplement for part of gettext
that uses gnulib sources, and includes the localizations
for messages specifically in gnulib files.
This is being added as a separate package
instead of a build target of gnulib
because that method of acquiring the localizations
requires the use of gettext and would be a reverse dependency.
Michael Pratt [Sat, 31 May 2025 06:47:11 +0000 (02:47 -0400)]
tools/gnulib: backport patches for gettext
The latest versions of gettext rely on several changes to gnulib
including both changes to modules and new modules
and some previously gettext specific code being moved to gnulib.
Backport these changes in order to allow updating gettext
while using the local gnulib copy of sources.
Michael Pratt [Sat, 7 Jun 2025 04:48:20 +0000 (00:48 -0400)]
tools/gnulib: update to branch stable-202501
Move to the June 2025 update of the first 2025 stable branch
in order to better support updating gettext to the latest versions.
More instances of blocking the defining of functions
that use reallocarray() is needed for portability with macOS
as more similar functions have been added.
And one instance is removed as the function was removed.
Refer to a previous commit to explain the need for this.
Ref: 5ade7ee60 ("tools/gnulib: add macros to skip reallocarray() functions") Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Wed, 25 Sep 2024 08:28:41 +0000 (04:28 -0400)]
tools/elfutils: enable parallel building
There are multiple subdirectories for elfutils
and more than one is not dependent on another,
so enabling parallel building can save time
if multiple cores are available.
The change in build time for the package
is as much as 20% when cores are not in use by other jobs.
Michael Pratt [Mon, 21 Oct 2024 13:47:25 +0000 (09:47 -0400)]
tools/elfutils: update MIPS support patches
The original patch series partially added by commit f97da2c61 ("tools/elfutils: add missing MIPS reloc support")
now has a v3 which has half of it's commits accepted.
To prepare for updating to the new release,
use the new series that includes backports.
Tested-by: Tony Ambardar <itugrok@yahoo.com> Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Tue, 24 Sep 2024 22:50:15 +0000 (18:50 -0400)]
tools/elfutils: add maintainer-clean to clean target
Use the clean recipe during build, so that files already
generated by the bootstrapping within the release are removed
before the bootstrap script is run again.
Automake with modified rules must be ran
in order to generate a Makefile that does delete itself or libtool.
In order to enable rules for building what is removed,
maintainer mode is required for configuring.
Building from tracked sources only with maintainer mode
requires a lexical analyzer, so add dependency for bison.
Override an automake variable "am__CONFIG_DISTCLEAN_FILES"
in order to prevent removing config.status and other configure files
so that configure stage does not need to be ran twice.
The function obstack_printf() is not present on macOS,
so use the available gnulib module and their dependencies.
Many more modules from gnulib are now needed,
and some replacements of some functions must be skipped
to prevent build errors at link time.
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Sun, 20 Oct 2024 11:49:50 +0000 (07:49 -0400)]
tools/elfutils: replace dependency hack with upstream include path fix
In order to solve the problem of the possibility that
the "stack" binary is incorrectly included as a header
while the compiler looks for the standard C++ header "stack",
a workaround forcing a dependency between building "stack"
and the C++ program was introduced.
This upstream fix uses the compiler "-iquote" option
in order to avoid looking for standard headers
in the current working directory
and blocks the default inclusion of "-I ."
to the compiler flags.
The upstream fix happens to be incomplete,
so add an extra patch to fix an additional instance
and then remove the workaround.
Also, adjust the way DEFAULT_INCLUDES is overridden
in the build Makefile by using the "-iquote" option
in the same manner in order to remove all instances
of the default inclusion for the current directory.
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Sun, 6 Oct 2024 08:23:10 +0000 (04:23 -0400)]
tools/automake: do not delete libtool in clean targets
For the building of some packages, it is helpful
to completely clean the packaged release copy of the source,
however this usually deletes libtool if used,
otherwise causing the need to run the bootstrap script twice.
Not deleting libtool allows compilation to continue directly
after cleaning pre-generated files in the package distribution.
Michael Pratt [Fri, 27 Sep 2024 04:20:38 +0000 (00:20 -0400)]
tools: require coreutils to build util-linux
The install stage of util-linux uses the install utility
with GNU options which is provided to macOS by coreutils.
Before, Make coincidentally built them in the right order,
this makes the prerequisite explicit.
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Fri, 27 Sep 2024 05:18:03 +0000 (01:18 -0400)]
tools: require coreutils to build findutils
The install stage of findutils uses the install utility
with GNU options which is provided to macOS by coreutils.
Before, Make coincidentally built them in the right order,
this makes the prerequisite explicit.
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Fri, 27 Sep 2024 03:20:38 +0000 (23:20 -0400)]
tools: require coreutils to build elfutils
The version of the rmdir utility in macOS is POSIX-only
while elfutils uses the GNU extended options while building.
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Thu, 3 Oct 2024 05:06:04 +0000 (01:06 -0400)]
tools: build coreutils for development targets
Include the coreutils utilities required for macOS
and other non-GNU friendly OSs to products like the SDK.
This also allows manually building coreutils on Linux
without having to manually edit this Makefile.
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Thu, 3 Oct 2024 04:57:29 +0000 (00:57 -0400)]
prereq: prefer existing built coreutils as symlink target
For the utilities provided by coreutils
but required before coreutils is built,
if coreutils is actually built already, prefer a symlink to
the built versions instead of the host machine's version.
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Thu, 3 Oct 2024 04:49:10 +0000 (00:49 -0400)]
prereq: add support for creating relative symlinks
For targets that install symlinks, like coreutils,
if the links happen to be deleted, let prereq stage
be capable of creating them again with a relative path.
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Fri, 27 Sep 2024 03:17:41 +0000 (23:17 -0400)]
tools/coreutils: provide the rmdir utility
Use the rmdir utility provided by GNU coreutils for macOS
in order to be able to use the option "--ignore-fail-on-non-empty".
Some other tools such as elfutils use this while building.
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Mon, 30 Sep 2024 07:55:14 +0000 (03:55 -0400)]
tools/coreutils: replace symlinks to build prerequisites
Before building, symlinks are made from existing utilities
on the host machine, because they are necessary before
coreutils can be built.
Instead of leaving these utilities as symlinks,
replace them with the copy provided by the coreutils build
in order to increase version control for these utilities
and to have a real copy for targets like the SDK.
The utilities required before building and provided by coreutils are
cp, install, realpath, seq, and stat.
Let all of the utilities be installed with the "g" prefix,
then, existing symlinks named without the "g" prefix are safely replaced
with a new symlink using the coreutils version of `ln` just built
in order to prevent an inconsistent state of the file
since these utilities must always be available.
While at it, sort the list alphabetically.
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Mon, 30 Sep 2024 19:59:06 +0000 (15:59 -0400)]
tools/coreutils: disable uninstall target
GNU coreutils is a unique case where we require
some of the utilities on the host machine
before anything is built.
The prerequisite is handled by symlinks to the host binaries
in the staging directory that are installed
by the build system and that are expected to remain
as long as the corresponding stampfile exists.
Because the binaries built by coreutils
will replace the symlinks, the uninstall target
will actually delete the symlinks
long before the build finishes whenever it is ran.
This can cause the utilities to be temporarily missing
from the controlled part of the shell's PATH,
so disable the removal of the coreutils utilities.
The appropriate way to clear all of the programs and links
would be `make dirclean`.
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Fri, 27 Sep 2024 03:30:51 +0000 (23:30 -0400)]
tools/coreutils: add maintainer-clean to clean target
Use the clean recipe during build, so that files already
generated by the bootstrapping within the release are removed
before the bootstrap script is run again.
Automake with modified rules must be ran
in order to generate a Makefile that does not delete itself.
Override an automake variable "am__CONFIG_DISTCLEAN_FILES"
in order to prevent removing config.status and other configure files
so that configure stage does not need to be ran twice.
Redefine MAINTAINERCLEANFILES with Make functions
to avoid deleting the targets of gettext and gperf rules.
In order to prevent an inconsistent state of `install`
since this utility must always be available as a prerequisite,
do not allow it to be removed.
Instead of preventing the removal of the config.h header,
the Makefile supports regenerating it quickly.
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Sun, 6 Oct 2024 08:13:16 +0000 (04:13 -0400)]
tools/coreutils: use automake during bootstrap
This was previously not possible because
part of the source code for coreutils in the form of
extra gnulib modules was missing from the release distribution.
Now that the local modules from coreutils source
is included in coreutils releases,
the bootstrap script can be ran without skipping
automake in the autoreconf stage after importing modules
by using fake paths to each autotools program,
and instead use the real paths to our modified autotools.
Because we do not require tools for building documentation,
continue to fake the paths to autopoint and gtkdocize.
Remove the skipping of imports of some source files
which is no longer necessary.
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Tue, 6 May 2025 18:54:55 +0000 (14:54 -0400)]
tools/coreutils: update to 9.6
Update to the next stable release.
Prevent the need for gperf to build
gperf based headers due to new gnulib versions
by skipping replacement of gperf files.
Without Automake, there are some
existing macro conflicts
due to the new version of gnulib,
causing build errors with some source files,
so skip those file replacements.
Michael Pratt [Thu, 15 May 2025 18:02:02 +0000 (14:02 -0400)]
tools/coreutils: do not require gettext or gperf
The bootstrap configuration is set to require
gettext and gperf for regenerating documentation and headers.
However, these steps are skipped in favor
of not building documentation and using existing headers.
Michael Pratt [Tue, 8 Oct 2024 10:55:47 +0000 (06:55 -0400)]
tools/automake: control all cleaning with clean variables
Automake previously makes rules for the target maintainer-clean
to remove both the contents of MAINTAINERCLEANFILES and BUILT_SOURCES.
In order to have finer control over what is removed,
let there only be a rule for deleting MAINTAINERCLEANFILES,
and set MAINTAINERCLEANFILES to a default value of BUILT_SOURCES
if only conditional or missing, and append BUILT_SOURCES if user-defined.
In order to maintain conditional values for MAINTAINERCLEANFILES
while keeping a default value, change the behavior of automake
to output unconditional definitions before conditions.
Michael Pratt [Mon, 23 Sep 2024 03:38:21 +0000 (23:38 -0400)]
tools/libtool: add maintainer-clean to clean target
Use the clean recipe during build, so that files already
generated by the bootstrapping within the release are removed
before the bootstrap script is run again.
Override an automake variable "am__CONFIG_DISTCLEAN_FILES"
and related variables for their dependencies
in order to prevent removing config.status and other configure files
so that configure stage does not need to be ran twice.
Automake with modified rules must be ran
in order to generate a Makefile that does not delete itself.
Michael Pratt [Fri, 4 Oct 2024 05:25:13 +0000 (01:25 -0400)]
tools/automake: do not delete Makefile in clean targets
For the building of some packages, it is sometimes helpful
to completely clean the packaged release copy of the source,
however this usually both requires and deletes the Makefile,
causing the need to run the configure stage twice.
Not deleting the Makefile allows compilation to continue directly
after cleaning pre-generated files in the package distribution.
Michael Pratt [Tue, 8 Jul 2025 18:57:58 +0000 (14:57 -0400)]
tools/gnulib: use git archive as download source
Snapshot downloads, whether from GNU cgit or GNU gitweb,
are becoming more unreliable and unstable.
Use the GNU gnulib git repository server for downloads
because GNU has disabled cgit server snapshots due to performance issues.
Other possible options include GNU gitweb snapshot or a git bundle download
but these methods either may also have similar performance issues
or require additions to the build system to handle the method
beyond the previous commit.
In case snapshots are to be used again for build tools in the future,
the previous commit reduces the tarball generation attempts
for the original source of snapshots in order to reduce server impact.
A conversation regarding server performance issues and alternatives is linked.
Michael Pratt [Sat, 31 May 2025 18:00:45 +0000 (14:00 -0400)]
download: add support for gitweb snapshots
When downloading a snapshot archive from gitweb,
the filename is not part of the URL,
and adding the filename to the URL causes errors.
The gitweb API exclusively uses query parameters
instead of paths in order to execute snapshot downloads.
Add a condition to the Perl download script
that removes the filename if the relevant
query parameter matches in the URL.
Also, to reduce server load of the original sources
try the Openwrt CDN servers first for these downloads.
Even though snapshot downloads are not ideal
due to the impact on the source's server health,
they are better for download performance than using git only.
Therefore, attempting it last will reduce the impact
and thus encourage maintainers to keep the option enabled.
This change is partly inspired by a conversation linked below
about snapshot downloads and server performance issues
which led to the feature being disabled for a particular server.
Michael Pratt [Sat, 31 May 2025 18:07:05 +0000 (14:07 -0400)]
tools/gnulib: use exact directory copy for install
The python implementation of gnulib-tool
uses a hidden file as the independent main function.
A copy with glob ('*') does not include hidden files
at the top level directory, so use whole directory copy
instead and remove the patch for a non-hidden python file.
Ensure the directory does not already exist
by attempting uninstall first to remove it
and by not using "install" to create a directory.
Rename the clean target to uninstall, as it handles
the staging directory and not the build directory.
Michael Pratt [Tue, 6 May 2025 17:57:24 +0000 (13:57 -0400)]
tools/gnulib: update to branch stable-202407
Bump to the next stable branch with the May 2025 update.
Add a patch to compensate for gnulib-tool being further split up
into independent shell and python implementations
by using a non-hidden version of the main.py file.
Add a patch for the python implementation of gnulib-tool
in order to ignore the required version of autoconf in configure.ac
being lower than the required version of autoconf for gnulib
if the version that is being run exceeds the required version for both,
and adjust existing autoconf version shell script patch to new filename.
Backport a patch for a change in function naming convention
for forward compatibility with tool releases after this stable branch.
Michael Pratt [Sun, 11 May 2025 16:23:17 +0000 (12:23 -0400)]
tools/automake: hardcode portable location for Perl
The latest automake version 1.17 includes a restriction against whitespace
for the configure variable $PERL, which is set to "/usr/bin/env perl"
for portability reasons with products like the SDK.
Instead of waiting until the next version of automake is released
for this error to be converted to a warning,
set the shebang of automake and aclocal manually with a patch.
In past git history, these lines have been patched before,
but only to remove the "-w" flag in favor of setting global warnings
in the script itself so that env does not strip the option.
The other purposes of Perl during building can use
the static staging directory path without any limitations.
Also, the configure variable "am_cv_prog_PERL_ithreads"
for the detection of Perl threads support
has been removed since 2013 in favor of dynamic runtime detection.
Remove our manual setting of this variable value as it has no effect.
Ref: 1ef07eee4 ("automake: forcibly disable perl ithreads support")
Ref: 182626687 ("ithreads: use runtime (not configure time) detection of perl threads") # automake.git
Ref: f6c581cc3 ("automake: portability fixes")
Ref: 87f3365d9 ("Revert "tools/automake: bump to 1.17"") Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Thu, 3 Jul 2025 19:09:25 +0000 (15:09 -0400)]
tools/util-linux: include macOS system uuid header
The type definition of uuid_string_t and possibly other details
used by macOS SDKs like XCode is missing from util-linux.
Headers on macOS have a different inclusion guard
compared to the unique util-linux "_UL" prefix.
This uuid.h header is guaranteed to be present since macOS 10.8 and iOS 6
even without the presence of XCode or other SDKs on the system,
so adding an include_next directive is safe after checking for clang.
Michael Pratt [Tue, 24 Jun 2025 19:35:33 +0000 (15:35 -0400)]
tools/bc: let getopt() prototype be defined normally
Add a patch in order to remove an obsolete workaround
that is currently causing issues on some macOS systems.
Add patch:
- 000-getopt-prototype.patch
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Michael Pratt [Tue, 24 Jun 2025 18:23:49 +0000 (14:23 -0400)]
tools/bc: remove useless patch
The remaining changes in this patch to the configure script
has no effect at all since autoreconf is used with bc
and the recent update to bc removed the need to patch
the original set of changes in order to fix building.
Remove the patch.
Removed:
- 002-fix-libmath.patch
Fixes: abd424c3e ("tools/bc: update to 1.08.1") Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently the SerDes driven SFP ports give strange ethtool readings
on RTL83xx devices. Especially duplex and speed are shown even if
no link is up and running. That leads to confusion because the MAC
reports arbitrary values.
Enhance the readout by refactoring the pcs_get_state() function.
Calculate speed/duplex/pause only if link is detected. Additionally
add reporting of 10G for SFP+ on RTL839x.
ethtool for empty SFP cage before/after
root@OpenWrt:~# ethtool lan9
Settings for lan9:
Supported ports: [ MII ]
Supported link modes: 1000baseT/Full
1000baseKX/Full
1000baseX/Full
1000baseT1/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 1000baseT/Full
1000baseKX/Full
1000baseX/Full
1000baseT1/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 10Mb/s
Duplex: Half
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Link detected: no
root@OpenWrt:~# ethtool lan9
Settings for lan9:
Supported ports: [ MII ]
Supported link modes: 1000baseT/Full
1000baseKX/Full
1000baseX/Full
1000baseT1/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 1000baseT/Full
1000baseKX/Full
1000baseX/Full
1000baseT1/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: Unknown!
Duplex: Unknown! (255)
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Link detected: no
ethtool with inserted but NOT connected 1G module before/after
root@OpenWrt:~# ethtool lan9
Settings for lan9:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseX/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 1000baseX/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Link detected: no
root@OpenWrt:~# ethtool lan9
Settings for lan9:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseX/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 1000baseX/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: Unknown!
Duplex: Unknown! (255)
Port: FIBRE
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Link detected: no
The kmod-rpi-panel-attiny-regulator and kmod-rpi-panel-7inch-touchscreen
are included in target modules.mk file, they should also depend on the target,
otherwise they can be selected from every target.
Fix the AutoProbe for panel-raspberrypi-touchscreen too.
The kmod-imx2-wdt, kmod-imx7-ulp-wdt and kmod-wdt-sp805 are included in
target modules.mk file, they should also depend on the target, otherwise
they can be selected from every target.
The nfs_layout_flexfiles.ko and nfs_layout_nfsv41_files.ko file are
build automatically when CONFIG_NFS_V4_1 is selected, we can not
deactivate them. Pack them into the NFS package too. I do not know if we
should also load them automatically.
Leo Barsky [Thu, 24 Jul 2025 12:12:33 +0000 (12:12 +0000)]
kernel: bump 6.6 to 6.6.100
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.100
Manually refreshed:
823-v6.12-0003-nvmem-layouts-add-U-Boot-env-layout.patch
All other patches auto-refreshed.
tools: firmware-utils: update to Git HEAD (2025-07-24)
075cdc0 iptime-crc32: add support for ipTIME AX3000Q 48ababa iptime-crc32: add support for ipTIME AX3000SM f29de74 iptime-crc32: Add device support for ipTIME AX6000M
Eric Fahlgren [Thu, 24 Jul 2025 17:09:04 +0000 (10:09 -0700)]
build: call ipkg-remove using xargs if #args>=512
The wildcard call to clean up luci package (luci*) can pick up over
2,300 files when the full tree is built. Running make package/luci/clean
or a second run of make package/luci/compile would fail with an
'Argument list too long' error.
To avoid that, a maybe_use_xargs function was created that runs the
command straight as usual if the number of arguments is < 512, or saves
the list in a temporary file and feeds it to xargs otherwise.
This is an update to current file names and resubmission of
https://lists.openwrt.org/pipermail/openwrt-devel/2020-February/027525.html
Fixes: https://github.com/openwrt/openwrt/issues/19510 Fixes: https://github.com/openwrt/luci/issues/7869 Authored-by: Eneas U de Queiroz <cotequeiroz@gmail.com> Signed-off-by: Kuan-Yi Li <kyli@abysm.org> Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com> Link: https://github.com/openwrt/openwrt/pull/19516 Signed-off-by: Nick Hainke <vincent@systemli.org>
On some devices (like ZyXEL GS1920) the phys are not initialized and patched
by the bootloader. This is done through the vendor SDK when the software
starts. To make these devices usable too, provide the most basic setup
sequence for the RTL8218B.
realtek: dsa: relax capability checks for 2.5G modes
The driver currently uses two checks to verify the capabilities. These
are ..._phylink_get_caps() and ..._pcs_validate(). For RTL930x these
must allow 2.5G modes. Enhance that as follows:
Add 2500BASEX to phylink_get_caps(). Sort the interfaces alphabetically
and rename the function to the new prefix. IMPORTANT REMARK! Until now
this function allowed the XGMII mode (10G only parallel interface) that
was somehow mixed with the Realtek proprietary mode XSGMII (10G SGMII).
Remove it to avoid further confusion.
Looking upstream pcs_validate() is used less and less. There are only
2 consumers left in 6.16 and the calling location reads:
/* Validate the link parameters with the PCS */
if (pcs->ops->pcs_validate) {
ret = pcs->ops->pcs_validate(pcs, supported, state);
if (ret < 0 || phylink_is_empty_linkmode(supported))
return -EINVAL;
/* Ensure the advertising mask is a subset of the
* supported mask.
*/
linkmode_and(state->advertising, state->advertising,
supported);
}
There is no need for this additional check. Drop the functions.
Tested-by: Jan Hoffmann <jan@3e8.eu> Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Link: https://github.com/openwrt/openwrt/pull/19429 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Fallback to default mbedtls configurations in case of the package is
not configured. It is possible for some reasons it get built even if
it's unselected because of build system bugs or other build-only
dependencies. In this case current behavior will comment out all
necessary configurations and lead build errors.
Fixes: 5359639c2b74 ("mbedtls: Apply configuration in Configure instead of Prepare") Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> Link: https://github.com/openwrt/openwrt/pull/19495 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Felix Fietkau [Wed, 23 Jul 2025 09:53:02 +0000 (11:53 +0200)]
udebug: update to Git HEAD (2025-07-23)
5d10084ea885 lib-ucode.c: add #define _GNU_SOURCE a95364b41d52 udebug-cli: fix terminating uloop c00eb9b685a8 ucode: use FILE handle for pcap output 4265167cb6e8 ucode: add error reporting to pcap_write 4a908ee731a6 udebug-cli: stop event loop on write failure 6e04f4187231 ucode: use ucv_resource_create_ex for remote rings c297f04e1852 ucode: drop use ucv_resource_create f207d37a1055 ucode: add support for specifying ring format 98683a94bcdd ucode: support appending array data, similar to socket.send() a7ecd483ed38 ucode: allow calling udebug.init() multiple times d4a4c788c416 ucode: fix allocation size of local ring meta 184706abaf50 ucode: add timestamp argument to foreach() 8442c948c193 ucode: add function for getting ring information f4958a4c591a ucode: add const entries for enum udebug_format 14d4fec36993 udebug-cli: add logstream command 6ed8536142bb ucode: fix entries/size confusion
Felix Fietkau [Tue, 22 Jul 2025 09:58:15 +0000 (11:58 +0200)]
toolchain/gcc: prevent the use of LDRD/STRD on ARMv5TE
These instructions are for 64-bit load/store. On ARMv5TE, the CPU
requires addresses to be aligned to 64-bit. When misaligned, behavior is
undefined (effectively either loads the same word twice on LDRD, or
corrupts surrounding memory on STRD).
On ARMv6 and newer, unaligned access is safe.
Removing these instructions for ARMv5TE is necessary, because GCC
ignores alignment information in pointers and does unsafe optimizations
that have shown up as bugs in various places.
This patch was originally added more than 11 years ago in commit b050f87d13b5,
but got lost 6 years ago, when gcc 9.1 was added in 88c07c655262.
This primarily affects the kirkwood and ixp4xx targets
Marcin FM [Wed, 16 Jul 2025 10:43:12 +0000 (12:43 +0200)]
ramips: EAP615-Wall v1: fix bootloop by reducing LZMA dictionary
Fix bootloop on TP-Link EAP615-Wall v1 by reducing LZMA dictionary
size. Before this patch and after an upgrade to kernel 6.12 this
device couldn't boot a kernel because of an error: "lzma compressed:
uncompress error 1".
I have chosen -d22 as dictionary size as suggested by @namiltd.
The usual sizes for problematic devices are -d16, -d20, -d22. I
have confirmed with my tests that this device can boot with a value
up to -d27, but there is no size benefit from values above -d21,
therefore -d22 is good enough.
See also: https://github.com/openwrt/openwrt/issues/19403
MAC address
-----------
+-----------+-------------------+-----------------------+
| Interface | MAC | Algorithm |
+-----------+-------------------+-----------------------+
| WLAN 2.4G | B0:38:6C:48:xx:xx | label |
| WLAN 5G | B2:38:6C:48:xx:xx | label with LA Bit Set |
| WAN | B0:38:6C:48:xx:xx | label + 1 |
| LAN | B0:38:6C:48:xx:xx | label + 3 |
+-----------+-------------------+-----------------------+
The WLAN 2.4G MAC was found in 'Factory' partition, 0x4
Installation
------------
1. Download the OEM recovery software from the manufacturer's website
2. Download the *squashfs-factory.bin file from the OpenWrt website
3. Press a reset button, and power up the router(keep pressing the reset button)
4. Wait more than 10 seconds until the CPU LED stop blinking
5. Connect the router(LAN port) to the PC
6. Replace a file in the OEM recovery software with the file from step 2
7. Run the OEM recovery software and follow the instructions
8. Wait for the router to boot from *squashfs-factory.bin
[ Alexander Kanavin ]
* update-ca-certificates: add a --sysroot option
[ Julien Cristau ]
* Update Mozilla certificate authority bundle to version 2.74.
The following certificate authorities were added (+):
+ D-TRUST BR Root CA 2 2023
+ D-TRUST EV Root CA 2 2023
The following certificate authorities were removed (-):
- Entrust Root Certification Authority - G4
- SecureSign RootCA11
- Security Communication RootCA3
- SwissSign Silver CA - G2
rockchip: fix eMMC corruption on NanoPC-T6 with A3A444 chips
Some NanoPC-T6 boards with A3A444 eMMC chips experience I/O errors and
corruption when using HS400 mode. Downgrade to HS200 mode to ensure
stable operation.
6953f19 wireless-regdb: Update regulatory info for Indonesia (ID) for 2025 2e8214e wireless-regdb: Permit 320 MHz bandwidth in 6 GHz band for GB a94f685 wireless-regdb: Update regulatory info for Egypt (EG) for 2024 7628ce2 wireless-regdb: Update regulatory rules for Brazil (BR) on 6GHz 4411b39 wireless-regdb: Update regulatory info for Vietnam (VN) for 2025 490f136 wireless-regdb: Update regulatory info for Estonia (EE) for 2024 c56c663 wireless-regdb: update regulatory rules for Paraguay (PY) on 6 GHz for 2025 5a8ced5 wireless-regdb: Update regulatory info for CEPT countries for 6GHz listed by WiFi Alliance 5fd8ee3 wireless-regdb: update regulatory rules for Bosnia and Herzegovina (BA) for 6 GHz e05260a wireless-regdb: update regulatory database based on preceding changes
Note inspiration for this script to give credit where it's due
There is some confusion in the Git log of this file. Specifically,
the commit message on 7b7f1702 incorrectly indicates that there was
"potential fear" about copyright infringement.
Upon review of this situation, there is, in my opinion, no concern of
copyright infringement here. This is not legal advice; it is my
opinion based of years of work on copyright policy for FOSS.
However, Elliott Mitchell's idea was obviously helpful as inspiration
in writing this script and deserves credit. Ideas alone, however,
are not to my knowledge copyrightable anywhere in the world.
Signed-off-by: Bradley M. Kuhn <bkuhn@sfconservancy.org>
Daniel Golle [Mon, 21 Jul 2025 13:22:20 +0000 (14:22 +0100)]
mediatek: disable MediaTek SoC Information (mtk-socinfo) driver
With the switch to Linux 6.12 this driver was enabled by accident.
However, it doesn't support any of the router SoCs but is meant to be
used only by the smartphone, tablet and chromebook SoCs.
Disable the driver again to silence a kernel error logline during boot.
1. Boot WRC-X3000GS3 in router mode normally
2. Access to the WebUI ("http://192.168.2.1/") on the device and open
the firmware update page ("ファームウェア更新")
3. Select the OpenWrt factory.bin image and click apply ("適用") button
4. Wait ~120 seconds to complete flashing
Switching to the stock firmware:
1. Load the elecom.sh script
. /lib/upgrade/elecom.sh
2. Check the current index of firmware partition
mstc_rw_bootnum
3. Set the bootnum to opposite value between 1 and 2
mstc_rw_bootnum <value>
example:
- step2 returned "1": mstc_rw_bootnum 2
- step2 returned "2": mstc_rw_bootnum 1
4. Reboot
Notes:
- ELECOM sells (or sold) multiple models as AX3000 class with different
hardwares:
Add new mtdsplit parser "mstc-boot" for the devices manufactured by MSTC
(Mitra Star Technology Corp.). This is necessary to handle dual-boot on
those devices.
This parser splits kernel+rootfs or only rootfs(or UBI) based on the
image in the firmware partition or pre-defined partitions in dts, and
"bootnum" value in the "persist" (or "working") partition.
Note: "bootnum" is used for switching active firmware partitions on the
devices manufactured by MSTC and '1' or '2' are used on most
devices. But some devices use '0' or '1'. (example: I-O DATA
WN-DEAX1800GR)
Sequence:
1. obtain "bootnum" value
2. child nodes exsist (regardless of bootnum)
-> fixed partitions
(active parts : without bootnum (ex.: "kernel", "rootfs")
inactive parts: with bootnum (ex.: "kernel2", "rootfs2"))
3. current partition is active (dt bootnum == mtd bootnum)
-> image-based partitions
Device Tree:
- common
- mstc,bootnum : "bootnum" value for the mtd partition (0/1/2)
- mstc,persist : phandle of "persist" partition containing "bootnum"
value
- fixed partitions
- #address-cells: indicate cell count of address of child nodes (1)
- #size-cells : indicate cell count of size of child nodes (1)
- (child nodes) : define the child partitions
- reg : define the offset and size
- label-base : define the base name of the partition
- (example) : base:"kernel"->"kernel"(active)/"kernel2"(inactive)
Shiji Yang [Wed, 18 Jun 2025 11:50:39 +0000 (19:50 +0800)]
ipq40xx: migrate wifi configuration device paths for 6.12 kernel
The device tree PCIe host node name has been changed in the new
6.12 kernel[1]. Hence we have to update the wifi device path to
make sure it can work properly.
This script is based on:
target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate