Update to a more recent stable release.
Most notably, this version includes
some fixes for building on an OS like Alpine.
This allows for the removal of hacks
that fixed building on Alpine,
but broke building on ARM archs.
Manually adjust:
- 7-zip-flags.patch
- 7-zip-musl.patch
Link: https://7-zip.org/history.txt
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15991
Signed-off-by: Robert Marko <robimarko@gmail.com>
Define the version in one variable,
and use Make functions to use variations of it elsewhere.
Correct the CPE ID.
Override the default tar directory flag
by adding a new value to the tar options
instead of defining the entire command.
Use variables for adjusting build recipes
instead of adding custom build recipes.
Remove unnecessary lines and add spacing.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15991
Signed-off-by: Robert Marko <robimarko@gmail.com>
0cfd1043e6c4 zytrx: add ZyXEL LTE7490-M904
3d09357fc7b5 asusuimage: new tool for creating TRX-images compatible with AsusWRT
f35781fcd2c3 asusuimage: fix compile error with old GCC release
Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
It seems that util-linux enables NLS support by default, this worked for
almost all platforms except for macOS on x86 where it seems that libintl is
preinstalled and thus it will link against gettext with libintl for NLS
support.
This would the later cause e2fsprogs and mtd-utils to fail:
Undefined symbols for architecture x86_64:
"_libintl_gettext", referenced from:
_random_tell_source in libuuid.a[13](libuuid_la-randutils.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Issue appeared after I converted the tool to use --disable-all-programs and
accidentally dropped the --disable-nls from the args.
Fixes: 54115ec22d ("tools: util-linux: use --disable-all-programs")
Link: https://github.com/openwrt/openwrt/pull/15909
Signed-off-by: Robert Marko <robimarko@gmail.com>
After changes to default host build recipes
and default variable definitions,
several custom definitions can be removed,
and the gnulib recipes replaced
with hooks to common recipes.
Also remove leftover PKG_INSTALL
which has no effect for host builds.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15853
Signed-off-by: Robert Marko <robimarko@gmail.com>
Replace the symlink in the build recipe for gnulib
with an extra include path flag in CPPFLAGS to the lib subdirectory
so that it is the last in the order of include paths,
and use a quote escape to make the flag a literal string
in order to use Make variables within it.
The original reason this is necessary is because the config.h header
provided by the project at the top-level build directory
calls another header eu-config.h
which is stored in the lib subdirectory instead of the top-level,
and building the gnulib library requires the config.h header.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15853
Signed-off-by: Robert Marko <robimarko@gmail.com>
We have to use curly braces on the exported STAGING_DIR_HOST env variable,
instead of evaluating it directly as we are not in Make but a separate
shell script.
Otherwise it would fail with:
staging_dir/host/bin/compile_et: line 6: STAGING_DIR_HOST: command not found
staging_dir/host/bin/mk_cmds: line 5: STAGING_DIR_HOST: command not found
And so when krb5 tries to build it will fail as compile_et and mk_cmds will
return an error.
Fixes: 55bda9863d ("tools/e2fsprogs: fix shell scripts under SDK")
Link: https://github.com/openwrt/openwrt/pull/15854
Signed-off-by: Robert Marko <robimarko@gmail.com>
Needed to fix users of libuuid.a as autoconf applies PIC to only shared
libraries by default.
Found when trying to build python3/host.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15852
Signed-off-by: Robert Marko <robimarko@gmail.com>
7c32295b00 exposed a problem where the SDK
builds these shell scripts with a nonsensical absolute path for the DIR
variable. Use sed to patch in $STAGING_DIR_HOST.
Also remove PKG_RELEASE as that is nonsensical for tools.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15841
Signed-off-by: Robert Marko <robimarko@gmail.com>
This was added to support building coreutils on host systems
that still only have 32-bit time support.
Because other tools now also require the flag for building
with 32-bit time when support for 64-bit time is not present,
this flag is now added to all host builds
on a variable basis using the same test before building,
so it can now be removed from specific tools.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15799
Signed-off-by: Robert Marko <robimarko@gmail.com>
Now that util-linux is building libuuid we can simply use that instead
of manually pointing to e2fsprogs libuuid so we can disable building
libuuid in e2fsprogs.
Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
There is no need to manually only remove 2 binaries during cleanup and
leave rest of the e2fsprogs installed stuff untouched, so instead use
make uninstall to do the cleanup.
Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
We are now using util-linux to provide libuuid so disable building it
in e2fsprogs and simply use the util-linux provided one.
Disabling libuuid removes the need for custom install recipe.
Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
util-linux usually provides libuuid, and is preffered by mtd-utils so lets
enable building libuuid so we can disable it later in e2fsprogs.
Only the static version of library is intentionally built.
Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
Instead of manually installing the binaries and removing them, we can now
simply rely on standard make install/uninstall as we are only building
tools we want to use.
This will be especially important when we start building libraries in
util-linux.
Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
util-linux supports passing --disable-all-programs configure flag to
disable building anything that isnt then manually enabled.
So, lets switch to using that instead of manually having to disable all
tools we dont need.
However, current drawback is that there is no upstream support for enabling
building hexdump so I included a patch that is pending upstream[0].
[0] https://github.com/util-linux/util-linux/pull/3101
Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
Passing --disable-tests does not do anything since upstream commit [0]
("Fix test binary installation") as that commit removed it since there is
already and existing --without-tests compile option to not compile
the tests at all as --disable-tests was just disabling their installation.
So, lets just pass --without-tests instead to disable test compilation.
[0] https://git.infraroot.at/mtd-utils.git/commit/?id=7170a28d46d5db1e7a9da24a5555a194a233ef0b
Fixes: 67efb6a661 ("tools: mtd-utils: Update to version 2.1.4")
Link: https://github.com/openwrt/openwrt/pull/15791
Signed-off-by: Robert Marko <robimarko@gmail.com>
Release notes:
https://lists.infradead.org/pipermail/linux-mtd/2024-March/104058.html
Manually refresh the portability and JFFS2 LZMA patches.
Since mtd-utils have converted most of the JFFS2 compressors to be compile
time configurable and manual refreshing of JFFS2 LZMA was needed I also
converted it to a compile time option and enabled the new --with-lzma
option.
Link: https://github.com/openwrt/openwrt/pull/15791
Signed-off-by: Robert Marko <robimarko@gmail.com>
Fakeroot uses an egrep configure check to look for the string "time64"
within a preprocessed include of the sys/stat.h header
in order to decide whether or not to create declarations
and internal functions used for wrapping the native functions
stat64_time64 fstat64_time64 lstat64_time64 and fstatat64_time64.
On specific older versions of glibc these functions are not included,
but there are some references to "time64" unrelated to functions,
like aliasing the time64_t typedef to the standard time_t typedef
when the size of a word is 64 bits or defining it if not.
In this case, a grep for "stat64"
of the preprocessed sys/stat.h header matches nothing,
however, the grep for "time64" in the configure check
of the preprocessed sys/stat.h header matches a line
that has nothing to do with the functions
that will be wrapped as a result of successful matching.
__extension__ typedef __int64_t __time64_t;
This causes the attempt to wrap the functions to occur,
which fails due to some of the corresponding macros being empty
since the native declarations they are based on do not exist,
causing a common error claiming that a part of the syntax is missing.
error: expected '=', ',', ';', 'asm' or '__attribute__' before ...
Fix this by making the testing regular expression more complex
in order to match actual function names ending in "_time64"
with or without a set of preceding underscores, but none after.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15773
Signed-off-by: Robert Marko <robimarko@gmail.com>
224d497dd94f srec2bin: drop unused "dum" variable
6777b2d51961 uimage_sgehdr: use "char" type for header struct strings
81db3025aac5 uimage_sgehdr: drop unused "ltmp" variable
bd7fcc74b43e pc1crypt: make decrypt/encrypt functions take void * as argument
6ac44974185a linksys: add magic header generation tool for e8350 v1
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
As a side-effect to adding a gnulib module for posix_fallocate(),
there are changes to the input file for fcntl.h which
are not handled here since autoreconf is not ran.
Skip updating the fcntl.h header from gnulib
and use the version shipped with the release.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
In order for linking the static libraries from elfutils to work,
other libraries need to be included to handle the references
to functions made in the library's objects that are not included
as they would already be if the library was a shared object instead.
A shared object library stores this list of libraries when it was made,
so that the dynamic linker can refer to that list at runtime,
but a static library has no such functionality so the list of libraries
for missing functions must be included at link time.
This information was already added to the pc file for libelf
using the definitions in src/Makefile.am,
so extend this to the rest of the pc files in the project.
For situations where the libraries may be used
without pkg-config setting the flags and library list,
this patch and the pc files can serve as a quick reference.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
Clang has support for weak aliases
despite no support for strong aliases,
but it only works with the #pragma directive.
Implementing weak aliases instead of none
is likely a more upstream-friendly solution
for supporting building on other platforms.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
The addition of LT_INIT as well as the adjustment of
the BUILD_STATIC and addition of the BUILD_SHARED conditionals
and their usage to block building of shared objects
and adjust the variables for building static libraries
is potentially upstream-friendly.
The use of a manifest file to keep a list
of the objects in each library instead of calling ar
is also potentially upstream-friendly.
Separate these changes from the macOS-specific hacks.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
Add a potentially upstream-friendly conditional
using the libtool configure variable "enable_shared"
in order to block building and installing of shared objects
and adjust the build of static libraries
instead of directly patching lines in or out.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
The use of ar to list the archive members in a library
in order to include them in another library is not portable.
On BSD and macOS, ar will also list
the special archive member "__.SYMDEF"
which is not a compiled object, rather it is
part of the metadata prepended to the library by ranlib.
Fix this by writing the list of unique objects used
to create the library into a separate "manifest" file
when the library is created, which will be read later
when the Makefiles of other subdirectories are ran.
Extend this to all other libraries whether or not they are linked
to another library for a shared object that is installed
so that it is possible for any of the libraries
to be statically built with more objects.
The use of the wildcard function to ignore the
special archive members which are only metadata
is no longer needed to prevent build errors.
Not using the wildcard function is preferred,
since errors should be caught during the build
instead of when linking something else or at runtime.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
Importing gnulib in order to have a local portable library
to link against for missing functions currently requires
using libtool to produce the libgnu.la library.
Ideally, linking would be simple if the rest of the libraries
built by elfutils were also built using libtool, as linking
them together would not require any manipulations of library paths.
However, upstream elfutils does not support building the libraries
statically with libtool, so using libtool comes at the cost
of creating a huge patch to introduce that functionality.
For building on macOS, it turns out that libgnu.la is only needed
for building the binaries, and that just one or two objects from libgnu
are needed to build the libraries, so in this case, it would be simple
to add the specific non-libtool-wrapped library and objects
to the link paths as needed, rather than use libtool to link
the libtool wrappers, which greatly reduces the need to patch.
Not using libtool also makes the original Makefile definitions for LIBADD
once again be the right ones to use. However, to be portable,
for libdw the wildcard function needs to be used in order to exclude
special archive members like "__.SYMDEF" which are not compiled objects
because some BSD-like versions of ar include that metadata in the list,
or because the library included may have objects from another subdirectory.
Also, the rest of the subdirectories have custom "LDLIBS" variables
meant for building shared objects only, so define the LIBADD variables
with objects from those existing definitions so that when building only
the static versions of the libraries, those objects can still be included.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
The version of posix_fallocate() patched into elfutils
for macOS using code from Mozilla is now patched into gnulib.
Import the fallocate-posix module and always link
the corresponding object to libraries whenever it is built.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
Add a module to gnulib to support posix_fallocate()
for macOS and other systems that are missing it.
Apple-specific code is sourced from Mozilla,
and the rest from glibc, both licensed under LGPL.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
Several changes to the elfutils source files
made during the process of figuring out how to
successfully build elfutils on macOS
turn out to not be necessary to do so,
and were most likely leftover bits during testing.
Remove the line changes that are not needed
and add some line changes to adapt to sources as is:
- Remove now unnecessary bump to autoconf version prereq
- AC_CONFIG_MACRO_DIRS is not necessary to define
as ACLOCAL_AMFLAGS is already defined in Makefiles
- let libtool "enable_static" variable also decide the value
of the local conditional BUILD_STATIC
- override configure variables instead of removing
checks for libraries or additions to LDFLAGS
- only exclude "hidden" attribute for macOS instead of deleting
- preserve original list of sources to build for libelf
- use openwrt Makefile to add gnulib headers
- use openwrt Makefile to add LIBADD variables
- remove deletion of variables and rules for shared objects
- prefer recursively expanded variables over muliple renames
each time that a word is added to its value
- remove changes to subdirectories that are not built
and remove changes to target files of those subdirectories
- prefer basic text rename over variables in cases where
there would be no line number difference
- give LT_INIT forced default values that match upstream
- move gl_EARLY and gl_INIT down relative to compiler checks
- reorganize some line changes to save some lines
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
The gnulib-tool script is written to have a fatal error
whenever the minimum required version of autoconf
for the project that gnulib is being imported into
as defined in configure.ac was less than
the minimum required version required by gnulib.
However, none of this matters if the version of autoconf
that we use is newer than both requirements.
Instead, use functions from the bootstrap script
to check for the version of autoconf being used
and print a warning whenever this case occurs.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
Overriding variables used in both the macros and the headers
like setting REPLACE_FCNTL to 0 while invoking Make causes the
function aliases like rpl_fcntl() to not be defined,
however the object may still be built with the fnctl() function.
Usually this is enough for building while avoiding
the need to link the resulting libgnu library
to every single other build target for a project
in order to include the gnulib copy of the function,
because in these cases we don't care which version
of the function is used.
However for functions like fcntl() this doesn't work
as it is designed to use either the alias or standard declaration
from gnulib headers in order to be
a wrapper for the native host copy of fcntl()
by containing recursive calls to fcntl() within itself
after undefining the gnulib function declaration.
Overriding the variables used by the header when invoking Make
causes the header's declarations to be blocked,
and this results in the gnulib version of fcntl()
to call itself recursively and indefinitely
leading to segmentation faults.
Fix this by using macros defined with those variables
in order to exclude the function during preprocessing.
While at it, do the same for reallocarray()
so that the configure option --avoid=reallocarray
and Make variable REPLACE_REALLOCARRAY set to 0
would have a similar effect.
In the future this patch can be expanded to include
more functions and some version of this may be upstreamable.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15690
Signed-off-by: Robert Marko <robimarko@gmail.com>
Instead of backporting select 1.35 fixes to make tar work for us, lets
update to 1.35 now that we have identified the upstream fix for macOS.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15743
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Backport an upstream patch series that adds backend elfutils support for
DWARF relocations in MIPS debug info. This support is needed by pahole to
generate BTF for modules in BTF-enabled kernel builds.
The problem first manifests as pahole warnings during build:
BTF [M] lib/libcrc32c.ko
die__process_unit: DW_TAG_compile_unit (0x11) @ <0x932d> not handled!
die__process_unit: tag not supported 0x11 (compile_unit)!
die__process: got compile_unit unexpected tag after DW_TAG_compile_unit!
die__process_unit: DW_TAG_compile_unit (0x11) @ <0x99a3> not handled!
die__process_unit: tag not supported 0x11 (compile_unit)!
die__process: got compile_unit unexpected tag after DW_TAG_compile_unit!
During system boot the problem then causes module loading failures, which
may result in many other runtime issues:
[ 13.169785] kmodloader: loading kernel modules from /etc/modules.d/*
[ ... ]
[ 17.422840] mac80211_hwsim: initializing netlink
[ 17.526518] PPP generic driver version 2.4.2
[ 17.550346] NET: Registered PF_PPPOX protocol family
[ 17.795353] kmodloader: 26 modules could not be probed
[ 17.796084] kmodloader: dependency not loaded nf_conntrack
[ 17.796737] kmodloader: - act_connmark - 1
[ 17.797402] kmodloader: dependency not loaded nf_conntrack
[ 17.798056] kmodloader: - act_ctinfo - 1
[ ... ]
Link: https://lore.kernel.org/bpf/ZlkoM6%2FPSxVcGM6X@kodidev-ubuntu/
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15697
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tar 1.34 ship an old version of paxlib with rtapelib.c that produce some
compilation warning. This library got updated in 1.35 but we still can't
use the new Tar version.
GCC 14 then made these compilarion warning errors.
Manually backport the fixes to rtapelib.c and patch the version shipped
in 1.34 to fix these compilation warning.
Fixes: #15692
Fixes: 2951e0a80e ("tools: tar: backport patches fixing broken --delete")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
In experimenting with --delete for APK handling, it was discovered that
--delete is broken and corrupts the TAR in some case.
This is fixed in version 1.35 but 1.35 introduce some problem with MacOS
making it difficult to bump. Backport the 2 required patches to fix this
problem so --delete is usable again.
Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Since the Yafut tool is now used for both updating the kernel on
MikroTik devices with NAND flash and preparing firmware images for
MikroTik devices with NOR flash, remove the kernel2minor utility from
the tree as it is no longer used for anything.
Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
Link: https://github.com/openwrt/openwrt/pull/13453
Signed-off-by: Robert Marko <robimarko@gmail.com>