Fixes arm64 build failures by replacing <linux/uio.h> with POSIX <sys/uio.h>
to avoid header redefinition conflicts.
gnulib's fcntl.h ends up including glibc's fcntl.h and fcntl-linux.h
which includes glibc's types/struct_iovec.h,
thats where the redefinition happens.
the lines that use <linux/uio.h> are antiquated and were never necessary.
it can be traced back to the original 2014 change that added the file with aarch64 support
in upstream commit 66637fa21044ac0058b25522f473669e73de328b
it was never necessary to use the linux header over the glibc headers,
as elfutils only needs the iovec struct and that struct was present since glibc 2.0 in the 1990s
Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24539
Signed-off-by: Robert Marko <robimarko@gmail.com>
Backport a patch that covers a build problem with latest glibc
being used as the host standard C library during tools build.
The C23 standard changes some functions that used to drop qualifiers
like "const" or "volatile" and are now forced to preserve them
in the return type based on the input type at all times.
Developers of glibc have responded by making these functions
into macros after they are declared with prototypes.
This is not compatible with the way gnulib is written,
so when the functions are redeclared in gnulib,
the preprocessor expands the _function name_ itself
as if it is a macro name, but not fully,
which results in unusual looking build errors,
e.g. the failed processing of keywords that were never written
and have no business being in a prototype, or,
as a keyword that is expected to be there and nearly guarenteed
to work but mysteriously is not working, displayed as:
"error: expected identifier or '(' before _____".
The backport patch introduces and implements a new macro
in order to prevent function names from being interpreted as macros,
by wrapping it in parentheses for C, or simply placing it back for C++
in the first stage of macro expansion which satisfies the goal
of no further expansion taking place during preprocessing.
Add an additional patch for the functions declared
in the fts header, as this bug also applies to them,
however, this was overlooked by upstream gnulib,
likely because the bug is not presenting as an error.
Yet another patch corrects the order between
specifiers and attributes in GCC syntax for header
lib/fts.in.h which can be blamed on an upstream commit.
Specifically, the throw() or noexcept() keywords
must be before attributes at the end of a declaration.
There are two headers, lib/cdefs.h and lib/getopt-ext.h
that already demonstrate the correct order which is very
strictly necessary in the latest version of GCC
when compiling C++ code, and acceptable for C code,
as the "__THROW" macro is simply another attribute in that case.
Added backport patch:
- 400-c23-qualifier-generic.patch
Added pending patch:
- 410-unmacro-fts-functions.patch
- 450-attribute-specifier-order.patch
Ref: 80e5de158316 ("fts: Improve GCC 11 allocation-deallocation checking.") # gnulib.git
Reported-by: Aditya Nugraha <vortexilation@gmail.com>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/24247
Signed-off-by: Robert Marko <robimarko@gmail.com>
Move to the July 2026 update of the last 2025 stable branch.
This branch includes many new modules and changes to modules
that were previously patched, so many patches are dropped.
Newer gnulib now also has a proper fts header
in the form of a template file for variable definitions
that are set during configuration,
however, it still ends up named with an underscore,
so the patch 120-unmangle-darwin-fts-h.patch
in order to resolve differences between macOS and standard
fts headers is rewritten to patch the new header include guard
and the fts module file in order to name it without an underscore.
Manually Adjusted Patch:
- 120-unmangle-darwin-fts-h.patch
All other patches are automatically refreshed.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/24247
Signed-off-by: Robert Marko <robimarko@gmail.com>
Now that cond.m4 is not being overwritten and is actively used,
make it less aggressive on encountering an undefined conditional
not set by a macro which is itself conditionally called,
where the condition is set to intentionally not trigger the macro.
This prevents the need to further patch a configure.ac file
to edit the improper usage of or remove a disabled macro
which triggers the error "conditional ___ is not defined..."
in the cases where autoreconf is still necessary for another reason,
or, if this is the only build issue,
autoreconf can now be used to avoid this.
Instead of erroring, align the behavior of AM_CONDITIONAL
closer to the gnulib variant gl_CONDITIONAL
which ignores and disables the conditional in this case.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/24362
Signed-off-by: Robert Marko <robimarko@gmail.com>
It was reported that cond.m4 in gnulib is a name clash with
cond.m4 provided by Automake, where they are for completely
different purposes instead of different versions of the same macros.
A quick survey of all the macro files in the build directory reveals that
this is the only case where the gnulib copy is signficantly smaller
than the rest of the copies of the same macro name
distributed in the rest of the build system,
and the only one that name clashes with Automake.
A previous fix added a prefix to all macros from gnulib,
but the name must match how it is described in the respective modules files
as a functional requirement to build certain tools for certain (older) hosts,
so patch the problematic module instead of renaming all macros from gnulib.
Ref: c820f097e0 ("tools: gnulib: install .m4 file with gl_ prefix")
Ref: 78a8cfb577 ("tools: gnulib: fix broken install of .m4 files")
Reported-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/24136
Signed-off-by: Robert Marko <robimarko@gmail.com>
Update to the latest version. There are no new changes here, just
to align with uboot-tools.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24124
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Changelog included in source tar.
Removed patches:
- 000-getopt-prototype.patch
- 001-getopt-declaration.patch
Both patch changes are included upstream in this version.
Link: https://github.com/openwrt/openwrt/pull/23911
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Fix declaration of getenv() in getopt.c
Backport from bc 1.08.2.
Signed-off-by: Shine <4c.fce2@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21957
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
rev22 has been ignored in fwsquash for the lack of supported binary blobs
containing the required firmware.
Now that fwcutter is able to parse the blob included in the gpl release
of dlink dsl 3580l, fwsquash need to keep the extracted files.
Signed-off-by: Alessio Ferri <alessio.ferri.3012@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23532
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
b43-tools introduced python 2 to python 3 conversion and added
support to extract ucode from a new blob
Signed-off-by: Alessio Ferri <alessio.ferri.3012@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23535
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Switch http:// (and redundant ftp://) PKG_SOURCE_URL entries to https://
across tools/ and package/. PKG_HASH alone does not protect against an
attacker tampering with insecure downloads when a maintainer regenerates
the hash via `make ... FIXUP=1`: HTTPS authenticates the upstream so the
captured hash reflects real upstream content.
In-place http -> https (HTTPS reachability verified per host):
- tools/elftosb, tools/lzop, tools/liblzo, tools/mpfr, tools/dosfstools,
tools/libressl, tools/xz
- package/libs/mpfr, package/libs/libmnl, package/libs/libnfnetlink
Replaced with @OPENWRT (HTTPS-only mirror) where the upstream HTTPS host
is dead or has a broken certificate:
- package/libs/popt (ftp.rpm.org cert mismatch)
- package/firmware/ixp4xx-microcode (was http://downloads.openwrt.org)
- package/boot/imx-bootlets (trabant.uid0.hu cert mismatch)
- package/boot/kobs-ng (freescale.com URL is dead, redirects to nxp.com root)
Dropped redundant ftp://ftp.denx.de fallback (https://ftp.denx.de is
already listed):
- package/boot/uboot-tools, tools/mkimage
Signed-off-by: Paul Spooren <mail@aparcar.org>
The defconfig file used to build tools is "tools-only_defconfig".
Though u-boot scripts can still automatically handle the old style
name for compatibility reason, it's better to use the correct name.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22844
Signed-off-by: Nick Hainke <vincent@systemli.org>
It doesn't make sence to build unused tools.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22844
Signed-off-by: Nick Hainke <vincent@systemli.org>
Update to the latest version and add missing 030 patch header.
Changelog:
22aa122eee0 mkimage: Add support for bundling TEE in mkimage -f auto
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22844
Signed-off-by: Nick Hainke <vincent@systemli.org>
When building on a host with e2fsprogs >= 1.47.0 installed, configure
detects the system libblkid probe API (blkid_probe_get_partitions etc.)
and sets ac_cv_lib_blkid_blkid_get_cache=yes. This causes plausible.c
to be compiled with HAVE_BLKID_PROBE_GET_PARTITIONS defined, but the
host build links against the internal blkid stub, resulting in:
plausible.c: error: unknown type name 'blkid_probe'
Override the configure cache variables to prevent detection of the
system libblkid probe API, ensuring the internal stub is used
consistently.
Signed-off-by: seuros <openwrt@seuros.com>
Link: https://github.com/openwrt/openwrt/pull/22368
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Release Notes:
https://github.com/madler/zlib/blob/v1.3.2/ChangeLog
We also switch package tarball source to GitHub repository releases
to avoid package hash mismatch after the zstd upgrade.
The 900-* patch was suppressed by the upstream commit 15ba5055a935
("CMake: Adapt pkgconfig-file to the GnuInstallDirs layout.")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21228
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
46f373b47f69 tplink-safeloader: add support for TP-Link Archer AX21 v4.6
7324b0ba8e05 tplink-safeloader: fix segfault when partition name is NULL
7593018845d8 asusuimage: Cleanup code and fix typo
caac8b133aca tplink-safeloader: fix soft_ver for Archer AX21
c0d7de851c9a ptgen: fix bug caused by not completely correct reverts
5b6ef84eaa74 ptgen: allow to specify index of gpt entries to be used
467685270cf0 ptgen: add an option to disable stub partition creation
a2c06c39b41b ptgen: add long option support
6a87eaf434cb ptgen: add support for marking multiple partitions as bootable
Fixes: https://github.com/openwrt/firmware-utils/issues/59
Signed-off-by: Robert Marko <robimarko@gmail.com>
Update cmake to version 4.2.3.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/22052
Signed-off-by: Robert Marko <robimarko@gmail.com>
Changelog: https://github.com/autotools-mirror/m4/blob/branch-1.4/NEWS
This update fixes a build error on my system:
./string.h:777:20: error: expected identifier or '(' before '_Generic'
777 | _GL_EXTERN_C void *memchr (const void *__s, int __c, size_t __n)
| ^~~~~~
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21987
Signed-off-by: Robert Marko <robimarko@gmail.com>