Commit Graph

65071 Commits

Author SHA1 Message Date
df3164f205 tools: mtools: update to 4.0.49
Changelog:
- 4.0.45: https://lists.gnu.org/archive/html/info-gnu/2024-09/msg00010.html
- 4.0.46: https://lists.gnu.org/archive/html/info-gnu/2024-11/msg00003.html
- 4.0.47: https://lists.gnu.org/archive/html/info-gnu/2025-01/msg00010.html
- 4.0.48: https://lists.gnu.org/archive/html/info-gnu/2025-02/msg00008.html
- 4.0.49: https://lists.gnu.org/archive/html/info-gnu/2025-06/msg00004.html

Link: https://github.com/openwrt/openwrt/pull/19561
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-07-28 00:52:47 +02:00
ed7d62caf2 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: 4d2ab97fad.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.

Signed-off-by: Andrew LaMarche <andrewjlamarche@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17137
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 18:50:03 +02:00
6fa1775348 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.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/19475
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 18:24:50 +02:00
4f716eb43a apm821xx: sata: refresh config
ran with make kernel_oldconfig

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19481
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 18:22:31 +02:00
4e92e34244 apm821xx: run through kernel_oldconfig
IDPF goes away and some rust symbol appears.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19481
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 18:22:31 +02:00
3d8a13413f apm821xx: fix sata config
The initial + looks like a copy/paste error.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19481
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 18:22:31 +02:00
423ed9fc5a tools: bash: update to 5.3
Changelog:
https://www.mail-archive.com/bug-bash@gnu.org/msg34422.html

Link: https://github.com/openwrt/openwrt/pull/19546
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-07-27 18:10:46 +02:00
11aa0fc6fb 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.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/19492
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 18:08:44 +02:00
fbf991544f tools: fakeroot: update to 1.37.1.2
There are no patches that need to be refreshed.

Changelog:
https://salsa.debian.org/clint/fakeroot/-/blob/debian/1.37.1.2-1/debian/changelog?ref_type=tags

Link: https://github.com/openwrt/openwrt/pull/19545
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-07-27 18:07:16 +02:00
97dc9f8dbf mbedtls: Expose MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED config option
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.

Signed-off-by: Karsten Sperling <ksperling@apple.com>
Link: https://github.com/openwrt/openwrt/pull/19489
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 17:59:34 +02:00
0e4a69e340 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

Signed-off-by: Donghyun Ko <nyankosoftware@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19497
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 17:20:04 +02:00
ec69736270 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.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/18415
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 16:46:20 +02:00
fa63a5365e 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.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/18415
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 16:46:20 +02:00
e27e695978 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).

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/18415
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 16:46:19 +02:00
831c1cd864 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.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/18415
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 16:46:19 +02:00
c2066fcb95 gemini: Remove kmod-md-multipath dependency
kmod-md-multipath was removed in kernel 6.12, remove the dependency here
too.

This fixes the build of the gemini target.

Fixes: d12a603de5 ("kernel: kmod-md-multipath: Depend on kernel 6.6")
Link: https://github.com/openwrt/openwrt/pull/19532
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 01:35:36 +02:00
4e49710211 kernel: kmod-drm-imx-hdmi: Fix kmod-drm-display-helper dependency
Select the kmod-drm-display-helper package instead of depending on it.
kmod-drm-display-helper is hidden now, so the user can not manually
select it.

This fixes the build of the imx target.

Fixes: 8bcc6d1894 ("kernel: kmod-drm-display-helper: Mark hidden")
Link: https://github.com/openwrt/openwrt/pull/19532
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 01:35:36 +02:00
e8a27c4196 kernel: kmod-crypto-lib-aescfb: Remove package
kmod-crypto-lib-aescfb is marked hidden and not selected by any other
package, it can not be build.

The Kconfig option in the kernel has no title, so it can not be
selected, it is only selected by CONFIG_TCG_TPM2_HMAC in the kernel.

Fixes: ef2310b031 ("kernel: modules: update dependency for kmod-tpm")
Fixes: aa51a1c13a ("kernel: kmod-crypto-lib-aescfb: Mark hidden")
Link: https://github.com/openwrt/openwrt/pull/19532
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-27 01:35:36 +02:00
098e98dd4d selinux-policy: update version to v2.8.2
Changes since v2.6:

a3383be configgenerate
8d04a3b adds modemnodedev and deletes cdcserialtermdev
77b52c4 README
3b8e1dc README
356211b README: add note about possible regression since selinux 3.6
171a3cc iwinfo
16ae0c1 haproxy
78bcb69 dufsysagent fix
6d88ac5 dufs fixes filecon
c9aa6cd adds dufs
5f15774 net: clean up
02c8e76 unneeded sys.moduleload calls
6334366 README: todo /usr/bin/fit_check_sign
12b659f README: add reminder on polvers
3e93844 related to bpi-r4 Linux 6.12
449cb74 sysagent: use logintermdev (no differences)
20ad31d unlabeled/invalid: these are relative to .
9c85622 iproute2sysagent: ss
c2a7863 README
6d7ad1c adds swaptools swapfile
5b69b63 rpcd related to luci mount tab
afeee67 hotplugcall: iwinfo
6ca7996 adds ttyGS0 tty login serial
f8b2fba wget: read shouldnt be needed
e2faf89 bmon adds ~/.bmonrc
5ede79b adds seccompconffile
3034b20 some comments
9b4b44e loginsysagent: loose end
fe0973c README
ea06908 loginsysagent
2405c46 loginsysagent
9413988 loginsysagent: adds skel for wrapper retry
22929cb Revert "login.cil: skel for login.sh wrapper"
fbcccf4 login.cil: skel for login.sh wrapper
1addde4 Revert "iproute2 ip protocol not supported"
f38fd20 iproute2 ip protocol not supported
5abde97 openssl for openssl s_client -connect ip:port
642ddd9 ttyd
be00125 iproute2 ip
1fbba89 iproute2 ip
342c981 no cap_userns
d241cfb iproute2 ip netns related
6778504 iproute2 ip netns related
491d3c4 iproute2 ip
d2dce16 iproute ip
8b43b1c iproute2 ip basic netns support
107e63f iproute2 ip
1b39905 README: looks like this is a no-go
b081dba acme note about expected removal of /tmp/run/acme/lock
4df51dd haproxy
ee825c8 coreutils: these dont have busybox equivalent
46f4a8b Revert "ucode: needed for custom rules in /etc/nftables.d"
048337a ucode: needed for custom rules in /etc/nftables.d
76b5a69 haproxy pid file
c90f840 openssl s_client -connect
dbbe475 haproxy local logging
7f58831 haproxy /etc/haproxy for stuff like proxy maps
050afc7 acmesysagent
031e0f3 README
2acf047 haproxy and iproute2
c5d1ce4 README
b9304a5 haproxy whitespace
b07c524 adds haproxy and iproute2 ss rules
9bc53b1 acme
6031379 openssl
8d6aaba adds sysfsutils skel
fc24d0c README
12cc1d4 openssl
79cf372 apk leaks memfd
9912075 adds socat dataexecfile
011bf9a adds wget (consolidate uclient-fetch)
0ba70c0 adds ftp reserved ports
5b35e96 README
bd02d73 README
4f6895f netifd comment fix
bd46c1f coreutils
ad13688 dnsmasq: more robust filecon
d5d6dd3 README
74f73d1 fwtool: do_stage2: online sysupgrade sdcard
8251117 README
badfb57 iw/tmux socket creation is implied in macros
5663f89 iwsysagent and readme
6815a6c README
bde5a56 README
6b89f0a hotplug and netif unconfined.exec.file underline "trusted"
862da9b unknown netifd protocols with netif.unconfined.exec.file

Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [package hash fix]
Link: https://github.com/openwrt/openwrt/pull/19080
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-26 18:22:30 +02:00
5809bfaaac 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.

Fixes: #19075
Upstream-Status: Submitted [https://lists.busybox.net/pipermail/busybox/2025-April/091407.html]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Link: https://github.com/openwrt/openwrt/pull/19080
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-26 18:22:30 +02:00
e805d8bac9 image: also show GRUB options for EROFS
f7fa414d3b 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.

Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/19501
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-26 18:02:31 +02:00
aeaa61517b 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.

[1] https://cgit.git.savannah.gnu.org/cgit/automake.git/commit/?id=9b92240af4a8f7a3050c13adec367cf48e9ce063

Fixes: d7d0205940 ("tools/automake: update to 1.18")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-07-26 17:09:19 +02:00
21d3722c40 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

[   21.736246] rcu: INFO: rcu_sched self-detected stall on CPU
[   21.736246] rcu: INFO: rcu_sched self-detected stall on CPU
[   21.748594] rcu:     1-....: (2100 ticks this GP) idle=064c/1/0x40000002 softirq=7/7 fqs=1050
[   21.748594] rcu:     1-....: (2100 ticks this GP) idle=064c/1/0x40000002 softirq=7/7 fqs=1050
[   21.766871] rcu:     (t=2102 jiffies g=-1187 q=25 ncpus=2)
[   21.766871] rcu:     (t=2102 jiffies g=-1187 q=25 ncpus=2)
[   21.778429] CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.39 #482
[   21.778429] CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.39 #482
[   21.778461] Hardware name: Zyxel GS1900-48
[   21.778461] Hardware name: Zyxel GS1900-48
...
[   21.779757] [<8029b968>] jent_measure_jitter+0xc8/0x10c
[   21.779757] [<8029b968>] jent_measure_jitter+0xc8/0x10c
[   21.779779] [<8029b9e8>] jent_gen_entropy+0x3c/0xb0
[   21.779779] [<8029b9e8>] jent_gen_entropy+0x3c/0xb0
[   21.779800] [<8029bcc0>] jent_entropy_collector_alloc+0x104/0x118
[   21.779800] [<8029bcc0>] jent_entropy_collector_alloc+0x104/0x118
[   21.779822] [<8029bd6c>] jent_entropy_init+0x4c/0x2ec
[   21.779822] [<8029bd6c>] jent_entropy_init+0x4c/0x2ec
[   21.779844] [<8086f184>] jent_mod_init+0x58/0xac
[   21.779844] [<8086f184>] jent_mod_init+0x58/0xac
[   21.779865] [<80100200>] do_one_initcall+0x70/0x250
[   21.779865] [<80100200>] do_one_initcall+0x70/0x250
[   21.779883] [<8085c018>] kernel_init_freeable+0x1f0/0x280
[   21.779883] [<8085c018>] kernel_init_freeable+0x1f0/0x280
[   21.779905] [<8067cba4>] kernel_init+0x20/0xb0
[   21.779905] [<8067cba4>] kernel_init+0x20/0xb0
[   21.779926] [<80101158>] ret_from_kernel_thread+0x14/0x1c
[   21.779926] [<80101158>] ret_from_kernel_thread+0x14/0x1c

This bit of entropy is helpful on these low end devices. Reenable the
counter and simply disable the interrupt.

Fixes: b7aab19585 ("realtek: SMP handling of R4K timer interrupts")
Reported-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19499
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-26 15:51:23 +02:00
a3bfb67072 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.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19484
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-26 15:46:31 +02:00
6e8042ed97 mediatek: add missing #address/size-cells for ELECOM WRC-X3000GS3
Add missing `#address-cells = <1>;` and `#size-cells = <0>;` properties
to `&eth` and `&wifi` nodes to resolve the following warnings.

```
../dts/mt7981b-elecom-wrc-x3000gs3.dts:114.3-13: Warning (reg_format): /soc/ethernet@15100000/mac@0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
../dts/mt7981b-elecom-wrc-x3000gs3.dts:129.3-13: Warning (reg_format): /soc/ethernet@15100000/mac@1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
../dts/mt7981b-elecom-wrc-x3000gs3.dts:372.3-13: Warning (reg_format): /soc/wifi@18000000/band@0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
../dts/mt7981b-elecom-wrc-x3000gs3.dts:378.3-13: Warning (reg_format): /soc/wifi@18000000/band@1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
../dts/mt7981b-elecom-wrc-x3000gs3.dts:112.15-125.4: Warning (avoid_default_addr_size): /soc/ethernet@15100000/mac@0: Relying on default #address-cells value
../dts/mt7981b-elecom-wrc-x3000gs3.dts:112.15-125.4: Warning (avoid_default_addr_size): /soc/ethernet@15100000/mac@0: Relying on default #size-cells value
../dts/mt7981b-elecom-wrc-x3000gs3.dts:127.15-136.4: Warning (avoid_default_addr_size): /soc/ethernet@15100000/mac@1: Relying on default #address-cells value
../dts/mt7981b-elecom-wrc-x3000gs3.dts:127.15-136.4: Warning (avoid_default_addr_size): /soc/ethernet@15100000/mac@1: Relying on default #size-cells value
../dts/mt7981b-elecom-wrc-x3000gs3.dts:371.9-375.4: Warning (avoid_default_addr_size): /soc/wifi@18000000/band@0: Relying on default #address-cells value
../dts/mt7981b-elecom-wrc-x3000gs3.dts:371.9-375.4: Warning (avoid_default_addr_size): /soc/wifi@18000000/band@0: Relying on default #size-cells value
../dts/mt7981b-elecom-wrc-x3000gs3.dts:377.9-381.4: Warning (avoid_default_addr_size): /soc/wifi@18000000/band@1: Relying on default #address-cells value
../dts/mt7981b-elecom-wrc-x3000gs3.dts:377.9-381.4: Warning (avoid_default_addr_size): /soc/wifi@18000000/band@1: Relying on default #size-cells value
```

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19530
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-26 15:41:23 +02:00
d7d0205940 tools/automake: update to 1.18
Update to the latest stable release
with the new API versions for binaries.

The temporary patching of shebangs is no longer necessary
since the whitespace check has been changed to a warning.

Part of a patch was upstreamed and therefore removed.

Manually adjusted patch:
 - 000-relocatable.patch
 - 101-do-not-require-files.patch

All other patches are automatically refreshed.

Link: https://lists.gnu.org/archive/html/autotools-announce/2025-05/msg00001.html
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-07-26 14:38:09 +02:00
da541f7acd gettext-full: update to 0.24.1
Update to a newer bugfix release of gettext.
Include gnulib-l10n as a new dependency.

All patches are automatically refreshed.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-07-26 14:38:09 +02:00
246eba7528 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.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-07-26 14:38:09 +02:00
1a253a2bb5 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.

Add patch:
 - 640-mem-hash-map.patch
 - 645-next-prime.patch
 - 646-hashcode-string.patch
 - 647-hashkey-string.patch
 - 650-package-version.patch
 - 651-package-version-simplify.patch
 - 652-package-version-simplify-further.patch
 - 653-package-version-warning.patch
 - 660-version-stamp.patch
 - 689-vc-mtime.patch
 - 755-clean-temp-hashkey.patch
 - 795-string-desc-rename-functions.patch
 - 796-vc-mtime-less-read.patch
 - 797-vc-mtime-add-api.patch
 - 798-vc-mtime-add-api.patch
 - 799-vc-mtime-old-git.patch
 - 900-str_startswith-module.patch
 - 901-str_endswith-module.patch

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-07-26 14:38:09 +02:00
d19f8bc199 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.

Manually adjusted patch:
 - 150-portable-tdestroy.patch
 - 160-flag-reallocarray.patch
 - 200-force-disable-after-configure.patch

Removed upstreamed patch:
 - 500-acl-function-name.patch

All other patches are automatically refreshed.

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>
2025-07-26 14:38:09 +02:00
92d10e2cdf nftables: remove usage of autoreconf
The usage of automake is left over
after the patch which required it was removed
since the new configure option
"--without-cli" was added to upstream.

Remove the usage of autotools to save build time.

Ref: 72e6e0b85 ("nftables: introduce experimental nftables")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-07-26 14:38:09 +02:00
0b4ebe5dd3 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.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-07-26 14:38:09 +02:00
abf243eae8 tools/elfutils: update to 0.192
Update to the next release.

Removed upstream patch:
 - 000-backport-iquote-include.patch
 - 010-backport-mips-support-reloc.patch
 - 014-backport-mips-support-stack.patch
 - 015-backport-mips-support-regs.patch
 - 095-src-unused-variable.patch
 - 096-lib-config_h.patch
 - 097-libcpu-config_h.patch
 - 098-libdw-maintainer-clean.patch
 - 099-remove-unlocked-stdio.patch

Manually adjusted patch:
 - 012-backport-mips-support-readelf.patch
 - 013-backport-mips-support-elflint.patch
 - 101-shared-conditional.patch

All other patches are automatically refreshed.

Link: https://sourceware.org/pipermail/elfutils-devel/2024q4/007540.html
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>
2025-07-26 14:38:09 +02:00
5bb84fb53b 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.

Manually adjusted patch:
 - 010-backport-mips-support-reloc.patch

Add patch:
 - 011-backport-mips-support-strip.patch
 - 012-backport-mips-support-readelf.patch
 - 013-backport-mips-support-elflint.patch
 - 014-backport-mips-support-stack.patch
 - 015-backport-mips-support-regs.patch

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>
2025-07-26 14:38:08 +02:00
c83941d288 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>
2025-07-26 14:38:08 +02:00
c16ed51e06 tools/elfutils: backport version 0.192 portability patches
These patches will be present in version 0.192 release.

Include them before the update
to support changes before updating
and in order to have a more organized git history.

Manually refreshed patch:
 - 110-objects-manifest.patch

Add patch:
 - 095-src-unused-variable.patch
 - 096-lib-config_h.patch
 - 097-libcpu-config_h.patch
 - 098-libdw-maintainer-clean.patch
 - 099-remove-unlocked-stdio.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>
2025-07-26 14:38:08 +02:00
8f920d2f94 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>
2025-07-26 14:38:08 +02:00
30105c77ef 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.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-07-26 14:38:08 +02:00
7a8fd73548 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>
2025-07-26 14:38:08 +02:00
405652469f 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>
2025-07-26 14:38:08 +02:00
e776c9fe4e 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>
2025-07-26 14:38:08 +02:00
f7fd8303be 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>
2025-07-26 14:38:08 +02:00
f197b5827a 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>
2025-07-26 14:38:08 +02:00
660e398f92 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>
2025-07-26 14:38:08 +02:00
90262c6f6e 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>
2025-07-26 14:38:08 +02:00
b8c0ed4692 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>
2025-07-26 14:38:08 +02:00
5c832d7833 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>
2025-07-26 14:38:08 +02:00
6a3cfeb4a6 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>
2025-07-26 14:38:08 +02:00
26f8a3874b 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>
2025-07-26 14:38:08 +02:00
199afe9ef7 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.

All patches are automatically refreshed.

Link: https://lists.gnu.org/archive/html/coreutils/2025-01/msg00049.html
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>
2025-07-26 14:38:08 +02:00