Andrew LaMarche [Sun, 1 Dec 2024 15:29:48 +0000 (15:29 +0000)]
realtek: add support for Hasivo S1100W-8XGT-SE switch
This commit adds support for Hasivo S1100W-8XGT-SE switch.
Device specification
--------------------
SoC Type: RTL9303
RAM: Samsung K4B461646E-BYKO (512MB)
Flash: Fudan FM25Q128A (16 MB)
Ethernet: 8x 10G via 2x RTL8264 PHY
LEDs: 2 LEDs, 1 power green, 1 system green
Button: Reset
USB ports: None
Bootloader: Realtek U-Boot - U-Boot 2011.12.(3.6.6.55087) (Nov 13 2022 - 14:37:31)
Fan: 2 fans controlled by STC8G1K08 TSOP-20 microcontroller
Note: The fan appears to operate the same irrespective of the running
firmware. The STC9G1K08 is likely operating independently.
To explore the stock vendor firmware, there are 2 avenues to gain root
access. This is not necessary to install OpenWrt, but is here for
reference.
Root access via serial
----------------------
1. ctrl+t
2. password: switchrtk
3. press 's' for shell
Root access via SSH
-------------------
1. ctrl+t
2. password: switchrtk
3. sys command sh
4. log in with your username+password
5. ctrl+t
6. password: switchrtk
7. press 's' for shell
Credit to https://forum.openwrt.org/t/hasivo-switches/151758/174 for rooting instructions.
Installing OpenWrt
------------------
1. Connect to UART. UART requires soldering an RJ45 connector to the
console footprint on the board. The header is on the top right of
this image: https://forum.openwrt.org/uploads/default/original/3X/4/d/4d2ab97fad7e2c5b0a0bdca4de887918c6dcff97.jpeg
2. Set computer IP to 192.168.0.111.
3. Enter bootloader by pressing esc key during boot.
4. Enter password 'Hs2021cfgmg'.
5. Type 'XXXX'.
6. setenv bootcmd 'rtk network on; bootm 0xb4300000'
7. saveenv
8. rtk network on
9. tftpboot 0x84f00000 <openwrt-initramfs>
10. bootm 0x84f00000
Now you can copy over the sysupgrade image and install.
Credit to
https://forum.openwrt.org/t/hasivo-switches/151758/22?u=andrewjlamarche
for u-boot console access instructions.
Jan Hoffmann [Sun, 20 Jul 2025 17:07:29 +0000 (19:07 +0200)]
kernel: mtdsplit_h3c_vfs: return 0 for non-fatal errors
Since Linux 6.7, introduced with commit 5c2f7727d437 ("mtd: mtdpart:
check for subpartitions parsing result"), errors during subpartition
parsing cause all MTD partitions to be torn down.
Since the current mtdsplit driver for devices using H3C VFS returns
-EINVAL if it does not find a file system containing an OpenWrt image,
this makes initial installation of OpenWrt impossible.
Work around this by returning 0 when the file system contains unexpected
data. Also print a message in this case to show what is going on.
Andreas Gnau [Tue, 22 Jul 2025 09:12:08 +0000 (11:12 +0200)]
base-files: find_mmc_part: Silence error when no MMC exists
When running find_mmc_part on a system without MMC or when the given
root device does not exist, an error message is printed to stderr.
grep: /sys/block/mmcblk*/mmcblk*p*/uevent: No such file or directory
Silence this error message.
Since find_mmc_part is mostly used to get block devices of MMC
partitions and the negative result (partion not found) is checked for by
the caller, the error message can be silenced without causing any
negative impact.
This enables software that requires this cipher suite (e.g. OpenThread Border
Router) to be compiled against the shared library rather than a separate copy.
Donghyun Ko [Tue, 22 Jul 2025 17:20:27 +0000 (02:20 +0900)]
mediatek: add factory image for ipTIME AX3000SM
Adds the capability to flash the factory image using the OEM recovery
software, ipTIME Firmware Wizard(11ac).
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. Run the OEM recovery software and follow the instructions
7. Select the *squashfs-factory.bin file during the router recovery process
8. Wait for the router to boot from *squashfs-factory.bin
Jan Hoffmann [Tue, 29 Apr 2025 22:02:00 +0000 (00:02 +0200)]
realtek: implement polling for hardware counters
Maintain 64 bit counters by polling the hardware counters and adding up
the differences. Polling needs to happen just often enough to catch
every single overflow.
As we now have non-overflowing counters now, we can safely calculate
composite counters without getting weird results on overflow. Use this
to follow RFC 3635 more accurately by mapping the hardware counters to
the proper counters, while taking into account hardware quirks as best
as possible.
Jan Hoffmann [Fri, 25 Apr 2025 18:18:52 +0000 (20:18 +0200)]
realtek: implement get_stats64
By default, the network interface stats are based on software counters,
which only consider traffic from and to the CPU. Implementing the
get_stats64 method allows to report the full hardware counters instead.
Jan Hoffmann [Fri, 25 Apr 2025 18:10:36 +0000 (20:10 +0200)]
realtek: use more specific APIs for ethtool stats where possible
The kernel offers several alternatives to get_ethtool_stats which allow
to report some stats in a more structured way. Use them where possible.
Ideally, we should follow RFC 3635 to translate the hardware counters to
the supported frame and octet counters. However, this is not feasible,
as some of the counters are 32-bit only (so it would produce incorrect
results as soon as one of them overflows).
Jan Hoffmann [Fri, 4 Apr 2025 11:24:29 +0000 (13:24 +0200)]
realtek: fix ethtool stats for RTL839x and RTL930x
The MIB registers contain different stats depending on the SoC, and for
RTL930x some stats are in an additional register.
Create separate MIB descs for each SoC to implement this. Also make
reading 64-bit counters more robust, by protecting against an overflow
of the lower 32 bits during the read.
RTL931x remains unsupported, because it uses a table and thus requires
a separate implementation.
While we are at it, rename structs/functions to use the rtldsa prefix.
Petr Štetiar [Mon, 9 Jun 2025 15:44:44 +0000 (15:44 +0000)]
busybox: fix login applet on selinux
Currently the system boots up, but is unusable because pressing enter
does not provide login with error:
login: can't get SID for root
This is happenning, because login.c passes the Linux username directly
to get_default_context(), while libselinux expects an SELinux user
identity, causing the call to fail for users without a matching SELinux
name (e.g., root) and aborting login on SELinux-enabled systems.
Til Kaiser [Wed, 23 Jul 2025 08:08:38 +0000 (10:08 +0200)]
image: also show GRUB options for EROFS
f7fa414d3b4d967a7e40b162977f48e1be430c1c added support for
EROFS image generation. Generating combined GRUB images for
EROFS is possible, but currently hidden if neither ext4,
jffs2, or squashfs is selected.
This commit adds EROFS as a dependency to the GRUB options.
Robert Marko [Sat, 26 Jul 2025 15:06:16 +0000 (17:06 +0200)]
tools: automake: update to 1.18.1
automake update to 1.18 broke buildbots as we dont have makeinfo host tool
present, after investigation this was an automake regression that was fixed
in 1.18.1[1].
So, since 1.18.1 contains small number of fixes, update to it instead of
just backporting the single commit.
realtek: don't disable MIPS counter on secondary VPEs
After observation that timer interrupt 7 always fires on secondary VPEs
the counter was disabled in the startup code. This is a bad idea when
building the kernel with jitterentropy. To generate entropy it makes use
of function random_get_entropy(). On MIPS architecture this simply reads
the counter register on the current core. With a disabled counter it
always returns the same value and the entropy initialization stalls the
core if it runs on a secondary VPE. See backtrace
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.