Commit Graph

4620 Commits

Author SHA1 Message Date
VIKING
d5712c2a95 Merge branch 'master' 2025-12-14 20:13:14 +08:00
Tianling Shen
6723faf733
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-12-14 19:33:49 +08:00
David Woodhouse
24b8db118b
image: add CONFIG_EXTRA_IMAGE_NAME
This allows an optional tag to be put in the .config file which is
included in the filename of the resulting images, so it's easier to
build images with different functionality for the same target hardware.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Link: https://github.com/openwrt/openwrt/pull/20984
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2025-12-12 22:06:06 +00:00
VIKING
ea0456f350 Merge branch 'master' 2025-12-11 21:35:20 +08:00
Tianling Shen
589e0d8d4f
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-12-11 15:06:31 +08:00
Andreas Gnau
f3e4620f59
build: depend on tools/zstd for download
Downloading packages from git requires zstd to compress their tarballs.
Make sure that zstd from host tools is compiled when running make
download. Otherwise, either the download would fail because zstd is not
present or a random version from the host would be used leading to hash
mismatches.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/21125
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-12-10 19:04:44 +01:00
VIKING
56cbede117 Merge branch 'master' 2025-12-02 19:48:47 +08:00
Tianling Shen
1e5d7a4c7c
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-12-02 09:44:52 +08:00
Christian Marangi
4fd310a8d3
kernel: move .quilt_used to quilt.mk
Move .quilt_used from kernel-defaults.mk to quilt.mk.

This is done to be consistent with the parallel Build/Patch/Default and
Host/Patch/Default and permit better Quilt handling on any package that
might use Kernel/Patch/Default.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-27 20:26:37 +01:00
Christian Marangi
30a863bea0
Revert "kernel: move .quilt_used to quilt.mk"
This reverts commit 61bfcc4bd7.

The change was wrong as it was placed on the wrong define section.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-27 20:24:05 +01:00
Christian Marangi
61bfcc4bd7
kernel: move .quilt_used to quilt.mk
Move .quilt_used from kernel-defaults.mk to quilt.mk.

This is done to be consistent with the parallel Build/Patch/Default and
Host/Patch/Default and permit better Quilt handling on any package that
might use Kernel/Patch/Default.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-27 14:18:50 +01:00
VIKING
80034709a9 Merge branch 'master' 2025-11-25 21:04:25 +08:00
Tianling Shen
da0a9e8a80
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-11-25 19:23:24 +08:00
Jascha Sundaresan
46ab9f3f1c filogic: add support for Netgear EAX17
Hardware
--------

SOC:   MediaTek MT7981
RAM:   512MB DDR4
FLASH: 128MB SPI-NAND
WIFI:  Mediatek MT7915 (integrated) 2x2 802.11ax 2.4 / 5 GHz
ETH:   Mediatek MT7981 internal 1 GbE PHY
UART:  3V3 115200 8N1 (Pinout silkscreened / Do not connect VCC)

Installation
------------

1. Download the OpenWrt initramfs image. Copy the image to a TFTP server
2. Connect the TFTP server to the EAX17. Conect to the serial console,
   interrupt the autoboot process by pressing '0' when prompted.
3. Download & Boot the OpenWrt initramfs image.

   $ tftpboot openwrt.bin
   $ bootm

4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device
   using scp and install using sysupgrade.

   $ sysupgrade -n <path-to-sysupgrade.bin>

Signed-off-by: Jascha Sundaresan <flizarthanon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20354
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-24 00:57:19 +01:00
VIKING
7e1cc51890 Merge branch 'master' 2025-11-23 21:00:07 +08:00
Nick Hainke
557c174a3c toolchain: gcc: add fanalyzer config option
Add gcc config option for fanalyzer. As a result of this option, a static
analysis of the program flow is conducted, allowing interprocedural paths
to be identified and warnings to be issued if problems are identified.

Link: https://github.com/openwrt/openwrt/pull/12576
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-11-23 09:33:15 +01:00
Tianling Shen
0760f6f5ca
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-11-23 14:55:16 +08:00
Christian Marangi
f9802d70c6
package: drop creating spurious tmp directory in feed directory
In implementing APK support it seems a a leftover was never removed that
creates an unused tmp directory in the package feed directory.

Drop it as it's not used anywhere. What is actually needed is the
creation of the $$(PDIR_$(1)) directory for the feed package directory
in the bin/packages directory.

This was a side effect of using INSTALL_DIR on $$(PDIR_$(1))/tmp that
indirectly creates the $$(PDIR_$(1)) parent directory.

Fixes: d788ab376f ("build: add APK package build capabilities")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-22 10:01:55 +01:00
Christian Marangi
ed4aabf425
Revert "package: drop creating spurious tmp directory in feed directory"
This reverts commit cea8507dcc.

This actually cause package pack error on every package outside the
target directory.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-22 09:58:26 +01:00
Christian Marangi
cea8507dcc
package: drop creating spurious tmp directory in feed directory
In implementing APK support it seems a a leftover was never removed that
creates an unused tmp directory in the package feed directory.

Drop it as it's not used anywhere.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-21 23:34:02 +01:00
VIKING
1d7c43e707 Merge branch 'master' 2025-11-19 22:49:34 +08:00
Tianling Shen
f847612aa7
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-11-19 22:41:54 +08:00
Robert Marko
f4ff823435 include: rootfs: fix APK compressed scripts tarball support
APK will generate the compressed scripts.tar by default, however we rely
on using TAR support for updating the tarball on the fly and this does not
work when tarball is compressed and will cause the following errors:
staging_dir/host/bin/tar: Cannot update compressed archives
Try /staging_dir/host/bin/tar --help' or
staging_dir/host/bin/tar --usage' for more information.

So, lets simply decompress the scripts.tar.gz before usage and then
compress it after we are done.

Fixes: 5d85657f6d ("apk-tools: implement compression of on-device scripts.tar")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-19 13:51:04 +01:00
Hauke Mehrtens
a2a78c04f8 build: Add support for linking with DT_RELR
This adds the -Wl,-z,pack-relative-relocs linking options.
This reduces the size of some binaries.

This is only supported on i386, x86_64, aarch64 and loongarch64 in
binutils. This feature is not support for MIPS.

musl libc supports it since version 1.2.4 .
glibc supports it since vesion 2.36.
binutils ld supports it since version 2.38 for x86 and since version
2.43 for LoongArch.

This reduces the size of the armsr default root file system from
5,262,198 bytes to 5,200,950 bytes by 61,248 bytes.

Link: https://github.com/openwrt/openwrt/pull/20679
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-18 23:17:09 +01:00
Eric Fahlgren
5d85657f6d apk-tools: implement compression of on-device scripts.tar
Default behavior for apk was to create an uncompressed scripts.tar
file.  Due to the structure of tar files, with fixed block
size and null padding, this file becomes very large on OpenWrt
installations where there are typically two scripts per package.
This could cause the raw tar file to easily grow to over 500KB,
whereas the compressed file is generally around 20-30KB.

When stored in the /rom partition of a squashfs device, the file
is compressed and this is not an issue.  But, as soon as you add
or delete a package, the scripts.tar file is fully expanded into
the /overlay partition and can cause issues on small-flash devices.

This issue was addressed in an upstream commit by detecting
whether the scripts.tar file is compressed (its name must be
exactly 'scripts.tar.gz'), and then retaining that compression by
reading/writing the file using a compressed stream.

This commit applies a cherrypicked patch for the upstream commit, and
compresses the scripts.tar during construction of the device rootfs.

Fixes: https://github.com/openwrt/openwrt/issues/17108
Link: 012cdcfdf9
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20795
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-18 17:25:06 +01:00
VIKING
0c8c8a18a8 Merge branch 'master' 2025-11-12 21:45:18 +08:00
Tianling Shen
2048a2e8ac
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-11-12 21:36:37 +08:00
VIKING
75fa41f09c Merge branch 'master' 2025-11-12 20:13:18 +08:00
Kacper Ludwinski
ba041eb451
prereq-build: add Python 3.13 support
Add support for Python version 3.13 to include/prereq-build.mk.
One of the reasons for this change is that
Ubuntu 25.04 ships with Python 3.13 as default version.
Let's support it.

Signed-off-by: Kacper Ludwinski <kacper@ludwinski.dev>
Link: https://github.com/openwrt/openwrt/pull/20735
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-12 12:11:15 +01:00
Christian Marangi
b29cf08a1e
openssl: add MODULES_DIR MACRO for provider
Add MODULES_DIR MACRO for provider useful if the relevant package
require to define the default OpenSSL MODULES_PATH.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-11 23:58:54 +01:00
Tianling Shen
45e69ca242
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-11-11 19:19:09 +08:00
Andy Chiang
631d535282 toplevel.mk: use relative path for feeds/base symlink
Currently, feeds/base is created as an absolute symlink to $(TOPDIR)/package.
If the OpenWrt source tree is copied to another location for building (while keeping the old tree), the symlink will still point to the package directory in the old tree.
Using a relative symlink ensures that feeds/base always points to the package directory within the current OpenWrt source tree, improving portability and avoiding incorrect links.

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20297
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-10 15:20:34 +01:00
VIKING
50a736246a Merge branch 'master' 2025-11-08 09:36:40 +08:00
Tianling Shen
ca38cca007
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-11-07 22:48:46 +08:00
Matthias Franck
2df73702c5 include: download.mk: do not check PKG_MIRROR_HASH when set to "skip"
In commit 042996b46b compilation of git repos is made to fail when PKG_MIRROR_HASH is not correct.

It looks like it was forgotten that in openwrt there is a posibility to set the PKG_MIRROR_HASH to "skip".
In this case the hash check should not be performed and compilation should continue as expected.

This is especially very usefull when doing local testing and development with git repos.

Signed-off-by: Matthias Franck <matthias.franck@softathome.com>
Link: https://github.com/openwrt/openwrt/pull/20655
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-07 12:25:42 +01:00
Eneas U de Queiroz
e495645135
cmake: set CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
According to CMake documentation[1]:

  [CMAKE_FIND_ROOT_PATH] is a list of directories that contain the
  target environment.

  [CMAKE_FIND_ROOT_PATH_MODE_PROGRAM] sets the default behavior for the
  find_program command.

  In most cases, find_program is used to search for an executable which
  will then be executed, e.g. using execute_process or
  add_custom_command. So in most cases an executable from the build host
  is required, so setting CMAKE_FIND_ROOT_PATH_MODE_PROGRAM to NEVER is
  normally preferred.

Since CMAKE_FIND_ROOT_PATH is set to the target staging dir, and the
toolchain root dir, it will find target programs before the host ones.

An example of this problem is if you try to build antiblock from the
packages feed after llvm from the video feeds is built.  Antiblock will
search for clang-format, pickup the target version, and fail to build.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>

[1] https://cmake.org/cmake/help/book/mastering-cmake/chapter/Cross%20Compiling%20With%20CMake.html
Link: https://github.com/openwrt/openwrt/pull/20656

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-05 16:57:51 +01:00
VIKING
7dd9f09f85 Merge branch 'master' 2025-10-27 22:20:49 +08:00
Tianling Shen
14d864fd72
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-10-27 19:48:10 +08:00
Hauke Mehrtens
93f86627c4 build: Add _FORTIFY_SOURCE=3 support
Add support for _FORTIFY_SOURCE level 3.

This is supported with glibc and with musl libc.

Link: https://github.com/openwrt/openwrt/pull/20313
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-26 01:43:01 +02:00
VIKING
3371d51102 Merge branch 'master' 2025-10-25 07:52:49 +08:00
Tianling Shen
92a28f826d
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-10-25 01:49:15 +08:00
Christian Marangi
5a42ed1138
image: move mkits.sh outside lock section
As mkits.sh only generates the relevant DTS for mkimage and is
specific for the building image, we can move it outside the locked
section as it doesn't do any operation that can be used concurrently by
others.

This won't have any real impact but clean the code making it clear what
needs to be protected and what can be executed concurrently.

Link: https://github.com/openwrt/openwrt/pull/20492
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-10-23 18:14:01 +02:00
Christian Marangi
c70894c855
scripts/mkits.sh: move out .pagesync generation for RootFS blob
It's expected the mkits.sh script to generate only the relevant DTS
entry and have all the blob already prepared to use for mkimage.

This is not the case for the RootFS case where the script generates a
.pagesync with the dd command.

To better handle this, drop the dd command and instead error out if the
.pagesync blob is not found if RootFS is used.

Adapt the generic fit build in image-commands.mk to call the dd for
.pagesync right before mkits.sh.

Link: https://github.com/openwrt/openwrt/pull/20492
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-10-23 18:14:01 +02:00
Christian Marangi
3de1bbd5ae
image: fix race between mkits.sh and mkimage in .itb squashfs generation
With further investigation it was found a race in generating .itb images
that include a RootFS caused by the mkits.sh and the mkimage.

Due to the fact that mkits.sh generates a .pagesync image of the passed
rootfs, it can happen that, concurrently, mkimage can be called at the
same time mkits.sh is creating another .pagesync for the same rootfs.

This cause mkimage to use an half made rootfs.pagesync creating a
corrupted image.

To address this, also protect the mkimage with the same lock used for
mkits.sh preventing any kind of concurrent usage/generation of the
rootfs.pagesync blob

Fixes: 52cc9d82f1 ("kernel: rework Initramfs locking logic")
Link: https://github.com/openwrt/openwrt/pull/20492
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-10-23 18:14:00 +02:00
VIKING
9ba8d83527 Merge branch 'master' 2025-10-21 23:20:11 +08:00
Tianling Shen
c876ca9e57
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-10-21 14:03:24 +08:00
Christian Marangi
330d17f52d
build: handle --root feeds script feature
Rework the package SOURCE entry handling to account for the --root feeds
script feature.

Move the SOURCE entry string manipulation logic outside package-defaults.mk
in package.mk and limit only to non DUMP scenario to not pollute the .mk
too much.

Restructure the previous logic and add a new additional condition.
If we detect the package comes from a feed, replace any feed path that
have the _root prefix to the feed name with the non-root variant (the
feeds script create a symbolic link to it) and point the package SOURCE
entry to what the symbolic link points to.

Example:
Feed link: feeds/base_root/package -> feeds/base
Package: feeds/base_root/package/system/uci -> feeds/base/system/uci

Link: https://github.com/openwrt/openwrt/pull/20459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-10-20 13:50:15 +02:00
Rosen Penev
df950f4cfd prereq: use staging_dir's compiler
Fixes compilation with missing OS GCC.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20350
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-20 00:55:06 +02:00
VIKINGYFY
b07db6763e Update Source 2025-10-18 21:42:37 +08:00
VIKING
c2d35fb587 Merge branch 'master' 2025-10-09 22:44:49 +08:00