Commit Graph
24805 Commits
Author SHA1 Message Date
Hauke Mehrtens 18a969c475 hostapd: restore Link Measurement Report handling
The ubus notification for link measurements was added by replacing the
call to hostapd_handle_link_mesr_report() instead of adding to it, so
upstream's handler lost its only caller and is compiled out as dead
code, which the build shows as:

  src/ap/rrm.c:354:13: warning: 'hostapd_handle_link_mesr_report'
  defined but not used [-Wunused-function]

As a result nothing clears hapd->link_mesr_req_active or cancels
hostapd_link_mesr_rep_timeout_handler() when a report arrives, so a
REQ_LINK_MEASUREMENT issued over the control interface always ends in a
timeout even though the report was received, and the LINK-MSR-RESP-RX
event carrying the report is never emitted.

Call both handlers, which is how the ubus hook for beacon reports a few
lines above is wired up too.

Fixes: f6445cfa1a ("hostapd: add ubus link-measurements notifications")
Assisted-by: Claude:claude-opus-5
Link: https://github.com/openwrt/openwrt/pull/25242
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-09-24 21:20:58 +02:00
Hauke Mehrtens 73e10e7432 hostapd: free the APuP peer when no AID is available
apup_process_beacon() adds the peer with ap_sta_add() and only asks for
an AID with hostapd_get_aid() further down. When that fails the function
returns without undoing anything, leaving the station in hapd->sta_list
with WLAN_STA_AUTH set but with no AID, no WLAN_STA_ASSOC and no WDS
interface. The driver entry added by the preceding hostapd_sta_add() and
the hapd->num_sta reference are leaked as well.

The leftover entry is then found by the ap_get_sta() check at the top of
the function, so every later beacon from that BSSID returns early and
the peer can never be set up again until hostapd is restarted.

Release the half-initialised station with ap_free_sta(), which removes
the driver entry, cancels the inactivity timer registered by
ap_sta_add(), unlinks it from the list and drops the counters.

Fixes: e80520197c ("hostapd: Add support for APuP")
Assisted-by: Claude:claude-opus-5
Link: https://github.com/openwrt/openwrt/pull/25242
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-09-24 21:20:58 +02:00
Hauke Mehrtens d6c5598e2f hostapd: fix NULL pointer dereference in APuP beacon handling
apup_process_beacon() dereferenced the return value of ap_sta_add()
without checking it. ap_sta_add() returns NULL when the station table is
full, when the allocation fails or when accounting_sta_get_id() fails,
so the following read of sta_ret->aid dereferences NULL.

The station table filling up is remotely triggerable. Beacons reach
handle_beacon() on every softmac driver, because hostapd subscribes to
them per wiphy with NL80211_CMD_REGISTER_BEACONS when it starts the AP.
An adjacent station can therefore beacon the target's SSID from
successive spoofed BSSIDs, each of which is added as an APuP peer, until
max_num_sta is reached and hostapd crashes.

CONFIG_APUP=y is set unconditionally in DRIVER_MAKEOPTS, so the code is
compiled into every wpad variant, but the call is gated on
hapd->conf->apup at runtime and wifi-scripts defaults apup to 0. Only
configurations that opt into APuP are affected.

Reported-by: JuliusBairaktaris
Fixes: e80520197c ("hostapd: Add support for APuP")
Assisted-by: Claude:claude-opus-5
Link: https://github.com/openwrt/openwrt/pull/25242
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-09-24 21:20:50 +02:00
Paul Spooren e2aa1d7596 apex: take the build date from SOURCE_DATE_EPOCH
The APEX boot loader embeds the time of the build in its version
banner, which makes the Iomega NAS100D factory image differ between
builds:

  -compiled for OpenWrt NAS100D/BE on 2026.Sep.23-04:17:21
  +compiled for OpenWrt NAS100D/BE on 2026.Sep.23-11:06:03

APEX sets BUILDDATE with $(shell date) in its top level Makefile. Pass
BUILDDATE on the command line, formatted from SOURCE_DATE_EPOCH in UTC
and the C locale, which overrides it for all sub-makes.

Link: https://github.com/openwrt/openwrt/pull/25354
Signed-off-by: Paul Spooren <mail@aparcar.org>
2026-09-24 17:23:08 +02:00
Simon Polack e14c703225 linux-firmware: add rtl8261c-firmware package
The realtek PHY driver requests rtl_nic/rtl8261c.bin for the RTL8261C.
The blob has been in linux-firmware since 2026-05-28 and is present in
the 20260910 tarball already used here, but it is not matched by any of
the r8169-firmware globs, so nothing installs it today.

The RTL8261D handled by the same phy_driver entry needs no firmware, so
this stays a standalone package rather than a kmod-phy-realtek
dependency, which would pull the blob onto every board with any Realtek
PHY.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Simon Polack <spolack+git@mailbox.org>
Link: https://github.com/openwrt/openwrt/pull/25092
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
2026-09-24 09:33:31 +02:00
Tianling Shen da415b6a69 valgrind: fix ARMv7 detection on AArch64
The mvebu target enables CONFIG_CPU_V7 even for AArch64 subtargets,
which also causes CONFIG_arm_v7 to be set. This makes Valgrind use
the ARMv7 configure host triplet on AArch64, breaking the build.

Only apply the ARMv7 host override when ARCH is arm.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/25346
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-23 17:02:01 +02:00
Robert Marko 1f89cfd701 boot: uboot-microchipsw: use mainline U-Boot
Use mainline U-Boot with pending patches for LAN969x instead of the
old vendor U-Boot.

Both existing boards are supported.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-09-23 15:09:08 +02:00
Fredrik Hallin 19ff245b92 comgt: add ncm support for Fibocom FG621-EA modem
Add a vendor profile for Fibocom modems so that proto ncm can drive them.
Without it ncm.sh reports UNSUPPORTED_MODEM, as the manufacturer string
returned by AT+CGMI has no matching key in ncm.json.

The FG621-EA is used in the ASUS 4G-AX56 and the TP-Link TL-MR500 v1. The
profile keys off the manufacturer string rather than any particular board,
so it applies to Fibocom NCM modems generally.

ncm.json is installed by comgt-ncm, so bump PKG_RELEASE to make sure
existing installations pick up the new vendor profile on upgrade.

This change originates from PR #19793 by kddred, open in draft since
August 2025 without review. The original commit is authored and signed
off with a GitHub noreply address, which the commit formality check
rejects, so it could not be carried unmodified, and kddred has not been
active since August 2025. Authorship is reassigned for that reason alone;
the work is theirs. Happy to restore the original authorship if a usable
address becomes available.

Tested on an ASUS 4G-AX56 (HW rev A1) on both main and openwrt-25.12.

Link: https://github.com/openwrt/openwrt/pull/19793
Signed-off-by: Fredrik Hallin <fredappsdev@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24974
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
2026-09-22 23:07:48 +02:00
Daniel Golle 56d9cd66a8 procd: update to git HEAD of 2026-09-22
Various bug fixes and container runtime improvements.

Fixes: #25277 (at least)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-09-22 19:01:07 +01:00
Robert Marko b24e433864 boot: arm-trusted-firmware-microchipsw: convert FWU scripts to Python
Currently, we depend on building the host Ruby support just for the two
FWU scripts that are written in Ruby.

Use Codex 5.6 to convert the scripts to Python and drop Ruby dependency.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-09-22 19:37:55 +02:00
Robert Marko d15fd263f7 boot: arm-trusted-firmware-microchipsw: update to v2.8.17-mchp4
Microchip has fixed various issues since the last update, so update TF-A.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-09-22 19:37:55 +02:00
John Crispin b1aa81b442 uboot-lantiq: use a reproducible build timestamp
u-boot 2013.10 builds timestamp_autogenerated.h with a bare date call, so
U_BOOT_DATE and U_BOOT_TIME hold the wall clock and the banner of every
image changes on each build:

  U-Boot 2013.10-openwrt4 (Sep 21 2026 - 20:47:50) ARV7506PW11

Add a patch that uses SOURCE_DATE_EPOCH when the environment provides it,
which the build already exports, and keeps the wall clock otherwise. Later
u-boot versions do the same in their own timestamp rule, which is why only
this package needs the change.

Found with two lantiq/xway trees whose directory names differ in length.
Three bytes of u-boot.bin differed, all inside the banner. After the
change the three u-boot images of arv7506pw11 are identical in both trees
and the banner follows the source date.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:46:30 +02:00
John Crispin 661d6963df lantiq: keep build paths out of the TAPI and VMMC modules
configure.in of drv_tapi and drv_vmmc compiles the whole configure command
line into the module. drv_tapi_linux.c prints it through a proc file. The
command line holds the absolute paths of the build machine, among them
--enable-kernelbuild, --with-ifxos-incl, --enable-tapiincl, CPPFLAGS and
LDFLAGS, so the module depends on the directory it was built in.

Measured in the published snapshot modules of lantiq/xway: drv_tapi.ko and
drv_vmmc.ko both hold
--enable-kernelbuild=/builder/shared-workdir/build/build_dir/...
The existing 020-not-leak-cflags.patch covers the Kbuild CFLAGS, not this
string.

Drop every argument that holds a path and keep the feature flags. The loop
repeats the idiom the file already uses for CONFIGURE_OPTIONS.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:46:30 +02:00
John Crispin 03ffe29cdf uboot-mediatek: use a reproducible build timestamp for MT7621
mtk_image_set_mt7621_header() reads the wall clock and writes it to the
timestamp of the legacy image header, so the MT7621 boot loader image
differs on every build.

Add a patch that uses imagetool_get_source_date(), which the other image
tools already use, and keep the wall clock as the fallback.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:46:30 +02:00
John Crispin 3a33c694aa uboot-mxs: use a reproducible build timestamp
mkimage -T mxsimage builds u-boot.sb. sb_get_timestamp() reads the wall
clock and sb_prefill_image_header() writes it to the boot image header.
The header digest covers that field, so the sdcard images of mxs differ on
every build.

Add a patch that uses imagetool_get_source_date(), which the other image
tools already use, and keep the wall clock as the fallback.

Tested with the mxsimage configuration of u-boot. Two images are identical
with the same SOURCE_DATE_EPOCH, differ with different values, and still
differ when the variable is not set.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:46:30 +02:00
John Crispin e923974fc1 apk: use deterministic ECDSA signatures
The host apk signs with LibreSSL, which uses a random ECDSA nonce. A
package that is signed again has different bytes and often a different
size, even if its content did not change. The rootfs records the
package size in /lib/apk/db/installed, so a rebuild of one package
changes all images.

Add a patch that derives the nonce as specified in RFC 6979. Signed
packages and images are now identical after a rebuild.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:46:30 +02:00
John Crispin 48c1e36bf2 package: reuse the rootfs if its inputs did not change
The rootfs is installed from scratch on every build: apk add, then the
post-install and init scripts of every package, one after the other.
This takes about 1.5 s, even if no package changed.

Build a key from the package index, which holds a hash of every
package, the install list, .config, SOURCE_DATE_EPOCH, the files
overlay, apk, tar, gzip and the Makefiles that create the rootfs. Save
a copy of the rootfs with the key, and restore it from the copy if the
key did not change. Later build steps modify the rootfs, so it is
always restored from the copy and never reused in place.

prepare_rootfs runs tar and gzip over the apk script archive, so the
key holds those two host tools as well. With mklibs it also runs
rstrip.sh, which the key then holds too.

The install list now holds the base-files, libc and kernel versions
too, so that the key can use it. Only the APK path uses the cache.

The copy costs disk: the build directory carries the root filesystem
twice, once as root and root.orig and once in the cache.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:18:58 +02:00
John Crispin 8d25643025 build: merge the packages only when the set of packages changed
package/merge deletes the symlink farm of every built package and creates
it again on every build. package/merge-index then reads all of those
packages to create the index. With two thousand packages both steps take a
third of a second, and the cost grows with the size of the configuration.

Record the name, the size and the timestamp of every package file. Skip
both steps while that list is unchanged and the index is present. A rebuild
of the symlinks drops the index, so merge-index creates it again.

This takes the time of package/install on an unchanged tree from 1.05 s to
0.60 s for the OpenWrt One.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:18:58 +02:00
John Crispin 3054effc90 build: rebuild the package index only when a package changed
package/index runs apk mkndx and make-index-json.py over every package
on each build, which takes 1.2 s of a no-op build of this tree with 1258
packages. The result depends only on the package files.

Skip the pass while packages.adb and index.json exist and no package
file, and no directory, is newer than index.json. The directory covers a
package that was added or removed, because neither changes a file that
is left. The comparison uses index.json rather than packages.adb,
because apk mkndx writes packages.adb through a rename, which sets the
mtime of the directory to that of the file it wrote. The directory would
then tie with packages.adb and the skip would rest on the two comparing
equal. index.json is written after it, so the directory is older.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:18:58 +02:00
John Crispin bc2e85eb8d build: clean the package root dir only if the packages can have changed
The stamp of package/cleanup depends on tmp/.build, which is touched on
every make call, so every build deletes $(STAGING_DIR_ROOT) and every
package copies its files into it again, one after the other under a
lock. With all packages selected, this takes 5 s of a build that has
nothing to do, most of it in the 1102 kmods of package/kernel/linux.

Only clean it if .config, the package metadata or a file below package/
changed since the last cleanup. An edit of the source in a build
directory alone does not clean it, so a file that such an edit removes
from a package stays until then. make package/cleanup cleans it at any
time.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:18:58 +02:00
John Crispin bb332115ba package: build mtd-utils, libsepol and libselinux in parallel
A package builds with -j1 unless it sets PKG_BUILD_PARALLEL, and 171 of
the 220 packages do not set it. These three gain the most from the job
server on a cold build of this tree:

  mtd-utils   24.77 s -> 6.43 s
  libsepol    17.99 s -> 2.18 s
  libselinux   7.82 s -> 1.89 s

mtd-utils runs while nothing else does, so its 18 s count against the
wall clock in full.

Each one builds three times out of three with the job server, and each
build writes a tree that is identical to the one a serial build writes.
nftables gains as well, 17.9 s to 13.0 s, but it is left alone: its
build directory differs between two serial builds, so the check that
covers the other three says nothing about it.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:18:58 +02:00
John Crispin b8d8bb9ba3 gettext-full: enable parallel builds again
Commit 30fb675847 ("gettext-full: disable parallel compilation")
disabled parallel builds of gettext 0.21, as they failed with make -j12.

With gettext 0.24.2, the host and the target build passed four times
each with make -j24, and libintl-full does not change. The host build
takes 172 s instead of 231 s, and the target build 142 s instead of
214 s. With all packages selected, both are on the longest chain of a
clean build.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:18:58 +02:00
John Crispin b029d56e0b hostapd: build the variants in parallel
The variants only write to their own build directories. The packages
without a variant are only built by the first variant.

With all packages selected, a clean build of the 31 variants takes 46 s
instead of 114 s, and the packages do not change. Together with the
commit that lists every build variant only once, a build that has
nothing to do takes 17 s instead of 33 s, as the variants were the
longest chain of it.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:18:58 +02:00
John Crispin b8d89de6e0 mediatek: build the boot loader variants in parallel
The variants of arm-trusted-firmware-mediatek and uboot-mediatek only
write to their own build directories and to files in the staging and
bin directories that have the variant in their name.

For the OpenWrt One, a clean build of the 9 TF-A variants takes 2 s
instead of 11 s, and of the 2 U-Boot variants 12 s instead of 21 s.
The images do not change.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:18:58 +02:00
John Crispin df6a1c978b uboot-mediatek: compress BL31 in the build directory
With FIP_COMPRESS set, the fip step compresses the BL31 image next to
the original in the staging directory. All U-Boot variants for the same
SoC, boot device and DRAM type write the same file.

Write the compressed BL31 to the build directory of the variant instead.
The fip does not change.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:18:58 +02:00
John Crispin fbd3048f21 lantiq: pass the kernel make flags to three module packages
ltq-adsl-mei and ltq-deu call make directly after a cd into the kernel
directory, and ltq-ifxos builds its module through autotools. None of them
pass KERNEL_MAKE_FLAGS, so the module compile runs without the
-ffile-prefix-map that iremap adds. WARN_ON_ONCE() in check_copy_size()
expands to warn_slowpath_fmt(__FILE__, ...), so the absolute build path
lands in the .ko.

Measured on the published snapshot packages of lantiq/xway and
xrx200_legacy:
- drv_mei_cpe.ko holds
  /builder/shared-workdir/build/build_dir/target-mips_24kc_musl/linux-lantiq_xway/linux-6.18.52/include/linux/ucopysize.h
- drv_ifxos.ko holds the same path for linux-lantiq_xrx200_legacy
- ltq_atm_danube.ko, built with the flags, holds no such string

The module size follows the length of the build path, so the apk record
and every image that carries the module differ between two builds in
different directories.

ltq_deu_vr9.ko holds no such string today, but the package has the same
defect.

Pass the flags in the same way as ltq-atm and ltq-vdsl-vr9-mei already do.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:18:58 +02:00
John Crispin bda729e82f uboot-envtools: remove stray output from the boot log
/etc/uci-defaults/30_uboot-envtools runs in preinit, before the board
file is generated. Two of its helpers write to the console:

* uci batch prints the name of every anonymous section that "add"
  creates, and nothing redirects stdout.
* grep -q hides a match, but it still reports a file that does not
  exist. /etc/fw_env.config is absent until the first append creates it.

On the first boot after a flash this puts three lines on the console:

    cfg016cb7
    cfg026cb7
    grep: /etc/fw_env.config: No such file or directory

Redirect the batch output and add -s to the grep.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:18:58 +02:00
John Crispin 111e92cce0 xdp-tools: find the arch headers of the toolchain for the BPF programs
The configure script of xdp-tools sets ARCH_INCLUDES only from the
multiarch directory of a native compiler. For a cross compiler it stays
empty, and clang takes <linux/types.h> for the BPF programs from
/usr/include of the host. On hosts that have <asm/types.h> only in the
multiarch directory, such as Debian without gcc-multilib, the build
fails:

  /usr/include/linux/types.h:5:10: fatal error: 'asm/types.h' file not found

Add the include directories of the toolchain with -idirafter. They are
searched after the headers of xdp-tools and of the system, as the
multiarch directory of a native build, so they do not replace the Linux
headers that xdp-tools ships. The target compiler already has them as
system directories.

The configure script also tests for bpftool with the bash redirection &>.
/bin/sh may be dash, which runs the command in the background instead, so
configure drops a working bpftool and takes the output of whereis. Add a
second patch that uses >/dev/null 2>&1, which every shell supports.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:18:58 +02:00
John Crispin 468176411c uboot-mediatek: rebuild the fip if BL31 changed
The fip contains BL31 from trusted-firmware-a, but the U-Boot build does
not depend on it. After a rebuild of trusted-firmware-a, the fip and the
images that contain it keep the old BL31.

Make the build stamp depend on the BL31 image.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:18:58 +02:00
Stefan Reisinger d9fcbfc585 uboot-envtools: fix BPI-R2 boot device
Resolve the production partition through fit.sh so the generated
environment configuration uses the actual MMC block device.

Migrate legacy /dev/p1 device fields in place while preserving custom
geometry, additional entries, and unrelated configurations.

Fixes: de2df0f2c5 ("base-files: remove fitblk_get_bootdev() from /lib/upgrade/common.sh")
Signed-off-by: Stefan Reisinger <dev@stefan-reisinger.at>
Link: https://github.com/openwrt/openwrt/pull/25197
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-19 12:02:31 +02:00
Daniel Golle 95f9a0f3aa procd: fix procd-ujail build on ARMv4
The new seccomp rework broke builds on ARMv4 which doesn't have Thumb
support. Fix it.

 c230ad87 jail: skip Thumb injection on cores without Thumb state

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-09-19 09:42:56 +01:00
Dharmik Parmar 4b3e132fb0 procd: make ujail package nonshared
procd-ujail is not selected on targets without the required kernel
namespace support, but its shared architecture package can still be
installed there.

When the package is carried across an upgrade or installed later, jailed
services fail to start because clone() returns EINVAL.

Keep procd-ujail in target-specific package repositories so it is not
offered on incompatible targets.

Fixes: #22428
Signed-off-by: Dharmik Parmar <dharmikparmar2004@yahoo.com>
2026-09-18 16:08:57 +01:00
Daniel Golle ee526dbf01 procd: update to git HEAD of 2026-09-13
Various fixes and improvements in procd/ujail/uxc to better support
the use of ujail and uxc as container runtime environments, now
compliant with the OCI run-time spec version 1.3.0.

Also brings basic udebug tracing support and replaces the seccomp
preload libraries with a ucode implementation: procd-seccomp ships
trace2seccomp plus its utrace and seccomp-trace aliases and needs only
ucode and its fs module, while the OCI seccomp code now links into
ujail. uxc installs the new uxc-net and uxc-stack helpers and depends
on the ucode modules they use, and on odhcpd, which serves RA, DHCPv6
and DHCPv4 on container networks.

Adjacent changes in firewall4, netifd and odhcpd still have to find
their way into the tree for dynamically addressed native uxc
containers to be fully functional.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-09-18 16:03:13 +01:00
Carlo Szelinsky fb75b12593 comgt: ncm: allow model specific ncm.json profiles
The ncm.json entry is picked from AT+CGMI alone, so every modem from a
vendor has to share one dialect. That does not hold for Quectel: the
EG060W answers "operation not supported" to AT+QICSGP on context 1, the
attached default bearer, while EC25/EG25 need AT+QICSGP because it is
what carries username, password and auth.

Read AT+CGMM as well and prefer a "<manufacturer>-<model>" entry, falling
back to the plain manufacturer entry, so existing profiles behave exactly
as before. The region suffix is dropped, EG060W-EAAA becomes eg060w.
json_is_a() is used rather than a bare json_select() so a modem without a
model specific entry does not log a warning.

Add quectel-eg060w, which configures the context with AT+CGDCONT.

Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Tested-by: Fredrik Hallin <fredappsdev@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24689
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
2026-09-17 18:19:17 +02:00
Carlo Szelinsky a4575808af comgt: ncm: wait for the data link to settle before configuring it
Some modems raise carrier as soon as the data call is enabled and drop it
again briefly while the connection is finalised. On a Quectel EG060W the drop
is about a second long and lands about two seconds after AT+QNETDEVCTL, with
no configuration command involved at all. Not every modem does it: a Fibocom
FG621-EA sampled at ~90 Hz over three cycles never dropped carrier.

netifd turns that transient into a permanent failure: the DHCP sub-interface
is dynamic and created only once during setup, and a dynamic interface is
removed on carrier loss (IFC_REMOVE in interface_check_state()), so nothing
ever recreates it. udhcpc is usually still sending discovers when the drop
kills it, and the interface is left with no address and no route. If the drop
lands after a lease was granted the lease is stale instead, and a renew does
not recover that either because it unicasts to a server that no longer exists.

Wait for the carrier to stay up for a few seconds before handing the interface
to netifd, so the drop falls outside the window netifd is watching.
directip.sh already waits for carrier for the same class of reason ("wait for
carrier to avoid firmware stability bugs") and qmi.sh sleeps unconditionally
while waiting for registration; unlike those this is tunable, and linksettle 0
keeps the previous behaviour.

The wait gives up after three times linksettle, floored at 30s so it always
outlasts the settle window, and continues anyway. Profiles that only reach
data state at finalize, further down, have nothing to wait for here and skip
it; mtk1 is marked with linkatfinalize for that.

Measured on an EG060W (Cudy LT700 Outdoor), three runs each: with linksettle 0
udhcpc never obtains a lease, the dynamic interface is torn down and the link
stays dead; with the 3s default the lease, route and traffic come up every
time, and netifd logs no carrier loss at all.

On a modem without the drop the wait only adds linksettle seconds to the
bring-up (14s vs 17s on the FG621-EA). It stays on by default anyway: a missed
drop leaves the link permanently dead rather than slow, and it is not known in
advance which modems do it. linksettle 0 turns it off where it is not needed.

Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Tested-by: Fredrik Hallin <fredappsdev@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24689
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
2026-09-17 18:19:17 +02:00
Carlo Szelinsky d0df2ab604 comgt: ncm: strip CR when detecting the modem on teardown
proto_ncm_setup() parses the AT+CGMI reply with RS='\r?\n',
proto_ncm_teardown() does not. The manufacturer ends up as "quectel\r",
json_select fails with "Unsupported modem" and teardown returns before
sending the disconnect command, leaving the data call up on the modem.

A blank CRLF line hits the same path: \r is not whitespace for the
default FS, so a record holding only \r still has NF == 1 and is taken
as the manufacturer.

This affects every vendor whose reply is a single token. "zte" comes out
the same either way, its reply is "ZTE INCORPORATED" so the CR sits past
$1.

Note that teardown now reaches the disconnect command on modems where it
silently never did, so those commands actually get sent on ifdown.

Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/24689
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
2026-09-17 18:19:16 +02:00
Eric Fahlgren 0ab0a1d669 busybox: enable shell history reverse search
Following on from e23b37b, it makes sense to also enable searching
the history rather that just relying on up and down arrow while
scanning the results.

On both x86 and ath79, busybox binary is ~4.2k bigger.  The resulting
x86 .apk is 447 bytes bigger and mips_24kc .apk is 324 bytes bigger.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23953
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-16 18:44:26 +02:00
Rosen Penev b7d0a5ce14 gpio-button-hotplug: gate off gpio_request_one
Upstream is working towards making GPIOLIB_LEGACY optional. Get ahead of
that by gating off such code as is done upstream.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24985
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
2026-09-16 10:22:06 +02:00
Daniel Golle 75ccc4822b mac80211: bump PKG_RELEASE
Dropping the rt2x00 MTD EEPROM patch changes the modules the package
builds, so bump the release for users to receive the update.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-09-15 18:03:36 +01:00
Daniel Golle 2bbdbb8b43 mac80211: rt2x00: add missing patch headers
Eight of the rt2x00 patches either carry no From/Date/Subject header at
all or lack the leading "From <sha> Mon Sep 17 00:00:00 2001" line, so
"git am" cannot apply them and the contribution checks reject them. Take
the author, date and subject of each from the commit which first added
it to this tree.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-09-15 18:03:36 +01:00
Daniel Golle 8f071273d7 mac80211: rt2x00: drop MTD EEPROM loading
No device tree uses ralink,mtd-eeprom any more, and since the move from
rt2x00eeprom.c into rt2800lib.c the code is guarded by SOC_RT288X and
SOC_RT305X, so it was compiled out on the only two boards that still
asked for it and dead everywhere else. It also lost its
<linux/mtd/mtd.h> include in that move, which breaks the rt305x build
with implicit declarations of get_mtd_device_nm(), mtd_read() and
put_mtd_device(). Drop the patch; nvmem cells cover every remaining
user.

Fixes: bf44cb5fb0 ("mac80211: update to version 7.2")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-09-15 18:03:36 +01:00
Daniel Golle 1f7eb34c53 odhcpd: make the full variant displace odhcpd-ipv6only
Both variants install the same files, so selecting both breaks image
assembly. Let odhcpd provide odhcpd-ipv6only and mark the latter
DEFAULT_VARIANT: the generated conflict demotes odhcpd-ipv6only when
odhcpd is selected, and under apk the versioned provide enforces a
single instance. Imagebuilder users pass -odhcpd-ipv6only alongside
odhcpd.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-09-15 17:40:48 +01:00
Zoltan HERPAI 980becf1da imx: add support for Olimex i.MX8MP-SOM-EVB
This adds support for an i.MX8-based system-on-module + EVB board.

CPU:      NXP i.MX8MP @ 1600MHz (quad-core A53)
Memory:   4Gb
PCI:      1x PCIe M.2 2280 slot
Ethernet: 2x GE with Micrel PHY (no MAC in EEPROM)
USB:      2x 3.0
UART:     separate UARTs for the A53 and the M7 cores
Storage:  microSD slot, eMMC headers
Misc:     2KByte EEPROM (at24), audio via ES8328 (unsupported), 2x CAN, HDMI
Power:    5VDC

 - Patches refreshed as required
 - The cortexa53 subtarget selects Micrel PHY from now on
 - u-boot added for the board

Installation:
  Use the standard installation to an SD-card by writing out the
  squashfs image (openwrt-imx-cortexa53-olimex_imx8mp-som-squashfs-img.gz)
  to it.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2026-09-15 18:32:14 +02:00
Zoltan HERPAI 11c64908c1 uboot-mxs: bump to 2026.04
Compile-tested: all mxs boards
Runtime-tested: Olinuxino Micro, I2SE Duckbill

While at it, rework the Duckbill series to compile on 2026.04.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2026-09-14 22:11:20 +02:00
Daniel Golle 10f6f2a4a2 kernel: restrict media tuner modules to kernel 6.18
The media tuner packages set CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y but hang
off kmod-i2c-core rather than kmod-dvb-core, so commit ccbdf20984
("kernel: restrict DVB and rc-core modules to kernel 6.18") left them
selectable on kernel 6.12. They open the digital TV menus on their own,
target/linux/generic/config-6.12 has no answer for the symbols that
become visible and syncconfig stops waiting for input. Restrict them
the same way until config-6.12 answers those symbols.

Fixes: 1560c75fa2 ("kernel: add initial DVB support")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-09-14 08:55:29 +01:00
Daniel Golle 5ad29919a7 uboot-zynq: disable mkeficapsule host tool
Since the bump to 2026.04, tools/Kconfig defaults TOOLS_MKEFICAPSULE to
y whenever EFI_LOADER is set, which the Zynq configs enable. The host
tool includes <gnutls/gnutls.h>, which the build system does not
provide, so the package fails to compile. Disable the tool, as the
other U-Boot packages carrying an EFI_LOADER config already do.

Fixes: d51c611e71 ("uboot-zynq: bump to 2026.04")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-09-14 08:55:29 +01:00
Daniel Golle e8d18579c1 uboot-sifiveu: disable mkeficapsule host tool
Since the bump to 2026.04, tools/Kconfig defaults TOOLS_MKEFICAPSULE to
y whenever EFI_LOADER is set, which both SiFive configs enable. The host
tool includes <gnutls/gnutls.h>, which the build system does not provide,
so the package fails to compile. Disable the tool, as the other U-Boot
packages carrying an EFI_LOADER config already do.

Fixes: 5b2c9ce8bf ("uboot-sifiveu: bump to 2026.04")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-09-14 01:00:47 +01:00
Daniel Golle ccbdf20984 kernel: restrict DVB and rc-core modules to kernel 6.18
The new DVB and remote controller packages are kernel version agnostic,
but the media symbols they make reachable were only answered in
target/linux/generic/config-6.18. On the targets still building kernel
6.12 the buildbot selects the packages through CONFIG_ALL_KMODS,
kconfig has no answer for the newly visible symbols and syncconfig
stops waiting for input.

Restrict the three packages the others hang off. Everything DVB
depends on kmod-dvb-core and kmod-video-em28xx-dvb follows
kmod-video-em28xx, while kmod-rc-core is a root of its own: RC_DEVICES
opens the remote controller menu with no DVB package involved.

Fixes: 1560c75fa2 ("kernel: add initial DVB support")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-09-14 00:57:56 +01:00
Daniel Golle dcb999c297 build: track target modules.mk in the kernel package scan
The kernel package lists $(SUBTARGET_MODULES) among its SCAN_DEPS, but
scan.mk takes that line as text and expands it in its own context,
where the variable does not exist. The per-target modules.mk files
therefore never invalidate the kernel package metadata, and an edited
or newly added modules.mk only takes effect after removing tmp/. Name
the files with wildcards that scan.mk can expand itself.

Fixes: 3a8825ad6a ("build: fix issues with targets installed via feeds")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-09-13 20:51:22 +01:00
Daniel Golle 80aff3586b libusb: drop libatomic dependency
The configure script links libatomic whenever the compiler cannot
inline 64-bit atomic builtins, but libusb only uses word-sized atomics
and never imports a symbol from it. Tell configure that
__atomic_fetch_add_4 needs no library and remove the dependency.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-09-13 20:46:35 +01:00