Commit graph

63755 commits

Author SHA1 Message Date
Robert Marko
269f251ba6 tools: xz: update to 5.8.1
5.8.1 (2025-04-03)

    * Multithreaded .xz decoder (lzma_stream_decoder_mt()):

        - Fix a bug that could at least result in a crash with
          invalid input. (CVE-2025-31115)

        - Fix a performance bug: Only one thread was used if the whole
          input file was provided at once to lzma_code(), the output
          buffer was big enough, timeout was disabled, and LZMA_FINISH
          was used. There are no bug reports about this, thus it's
          possible that no real-world application was affected.

    * Avoid <stdalign.h> even with C11/C17 compilers. This fixes the
      build with Oracle Developer Studio 12.6 on Solaris 10 when the
      compiler is in C11 mode (the header doesn't exist).

    * Autotools: Restore compatibility with GNU make versions older
      than 4.0 by creating the package using GNU gettext 0.23.1
      infrastructure instead of 0.24.

    * Update Croatian translation.

Link: https://github.com/openwrt/openwrt/pull/18558
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-22 13:20:05 +02:00
Antonio Flores
5c83301107 rockchip: fix the SD card detection on NanoPi R6C/R6S
This patch backport a fix for the SD card detection on NanoPi R6c/R6S
from upstream commit 95147bb42b

Signed-off-by: Antonio Flores <antflores627@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18553
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-22 11:00:17 +02:00
Scott Mercer
320cdff263 qualcommax: ipq5018: gl-b3000: fix rootfs_size in bootscript
rootfs_size was being set after the bootscript was already copied
to KDIR_TMP/ this was sneaky because it only affected the initial
compile. All subsequent compiles the rootfs_size is correct before
the copy is made and the bug goes un discovered. Hence the reason I
missed it during testing.

this patch fixes the issue and also refactors the
make recipe to update rootfs_size after the copy
is made, and updates the copy exclusively.

Fixes: 3307fe8ee4 ("qualcommax: ipq50xx: add support for GL.iNET GL-B3000")

Signed-off-by: Scott Mercer <TheRootEd24@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18556
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-21 23:56:38 +02:00
Russell Senior
f45df2167b tools/patch: bump version to v2.8
drop upstream patches

  $ git log --no-merges --oneline v2.7.6..v2.8
  48ceda8 Version 2.8
  b3d0c93 Regression in commit abe92e8010ab affecting MariaDB tests
  29fced6 Count traditional diff pattern lines correctly
  b5d2124 patch: fix --no-backup-if-mismatch regression
  86ac7e2 Fix dodgy assert with side-effects in insert_cached_dirfd
  7d87652 Declare an expected test failure on Haiku.
  86baf97 build: update gnulib submodule to latest
  1ba2c1b Fix two test failures on Haiku.
  1da6bf8 Check for newlines only when creating a file name
  30ee610 Gnulib renamed some modules
  6dbc381 maint: update bootstrap from gnulib
  05ac924 build: update gnulib submodule to latest
  95e0092 maint: make update-copyright
  5bac274 Set --no-backup-if-mismatch when in --posix mode
  910fecf Add missing feature tests to the test suite
  be8b3c6 Disable release-prep
  c61485b Fix "make release" to handle alpha releases
  499916f Add announce-gen module for "make release"
  adb1ebc Pacify gcc -fsanitize=address
  6bdae94 Fix memory leak when malformed unidiff patch
  72a146c Port to clang address sanitizer
  e2e6820 Refactor argc+argv processing
  606c091 Omit needless get_some_switches code
  ee3cc40 Revert "Remove obsolete require_gnu_diff function"
  8cae4fc Remove obsolete require_gnu_diff function
  164b529 savebuf can return a null pointer
  91c1e4f Spelling fixes
  a03e1ba Port other reject-format test to non-GNU diff
  9ba5eb0 Don’t be fooled by NUL bytes in diff directives
  79dd5e7 Don’t be fooled by "\000" in file name
  8492a6a Port to quasi-GNU diff
  f6f2c6f In previous patch, make w_q static
  0525681 Pacify -Wunterminated-string-initialization
  301411d Spelling fixes
  4615206 Remove double semicolon
  923e0ef Prefer angle bracket headers
  5d17ca0 Update more old copyright notices
  5f4edd3 Simplify memory allocation of files to delete
  802511c Report patch read errors more immediately
  a93b50d Port fflush usage to OpenBSD 7.5
  55e224b Update old copyright notices
  33a7fd8 Fix gl_gcc_warnings typo in ‘configure’
  2313b37 build: update gnulib submodule to latest
  37fec39 Remove some dependencies no longer needed
  cc87173 Update NEWS as per recent changes
  7887622 Update POSIX citations
  18f4dd6 Use “Gruenbacher” in international contexts
  638675c Adjust libs to match recent Gnulib
  53400a1 Pacify clang -Wbitwise-conditional-parentheses
  e8e1bcb Remove “support” for nested critical sections
  b963510 Simplify critical section code in util fns
  85949fb Shrink critical sections
  448ff9b Defer signals by hand with sigatomic_t
  b95a603 output_file_later avoid a malloc+free pair
  2663228 Defend against closed stdin/stdout/stderr
  fc77964 Stop using Gnulib ‘execute’ module
  470699c Move defer_signals up
  f696e4e Make sigs, NUM_SIGS local
  4d3a4ab Rename block_signals
  b3bb925 Trade a bit of space for time in parse_c_string
  070d859 Allocate first patchbuf statically
  f46a90f Use bigger buffer size by default
  2e64cfd Preinitialize fatal_act.sa_hander
  45de0d9 Prefer EXIT_SUCCESS etc. to literal integers
  82c4940 Fix some signal handling races
  eceea61 Fix --set-utc TZ setting
  9c55d3f Improve logic for when rename removes source
  61c72f0 Fix signal race when renaming file
  705c9bc Simplify traverse_another_path via last_component
  77f21a6 Stop using Gnulib dirname module
  fe8ffd9 Fix implausible overflow when reading symlinks
  5e84bda Access checks should use effective, not real
  8d4ca49 Don’t assume AT_FDCWD != -1
  fe5d4a0 Copy input to output attributes via fd if possible
  ca4c431 Simplify timestamp epoch checking
  0ad4347 Check for ftello failures
  c49a16d Remove format_linenum
  22efdee Fix "with multiple words" line number
  5a70a1b Drop Plan B
  c0d465f Prefer ximemdup0 to xmemdup0
  b91aab2 Refactor ifetch API
  55c8a5c Do not attempt huge I/Os
  e0e121e Use outfd when setting file attributes
  241e57e Don’t assume Linux-like S_IFREG
  0f8c628 Use STDOUT_FILENO etc
  f2c3676 Fix unlikely glitch with ed diffs
  cec6407 Use fds to copy attrs in create_backup_copy
  6b7b01b Be more careful about (time_t) -1
  0433553 X == -1 → X < 0
  0a66dee Let set_file_attributes use fds not names
  36ff2c9 Port to narrow unsigned uid_t
  3951496 Check for output errors more systematically
  6429630 Report input error right away
  03cb187 Simplify EOF testing
  cc7cde7 Prefer other types to ‘int’
  4c6650b Detect unlikely integer overflow in size calcs
  abe92e8 Prefer idx_t, ptrdiff_t to lin
  30449e2 Fix compatibility issue with blanks in patches
  9228a8c pch_swap return type cleanup
  c1c438d Fix unlikely int overflow in hunk counts
  5d3f41f Use char for char in plan_a
  fb056f2 Cache cwd_is_root dev, ino
  84b5f34 Avoid ‘unsigned’ in safe.c
  d2e113e Simplify get_sha1
  f73718b Avoid casts in patch.c
  79eef3e Prefer idx_t in util.c
  11588d0 Prefer idx_t in pch.c
  e16037d Prefer idx_t in patch.c
  388926f Prefer idx_t in list.h
  3582fdb Prefer idx_t in inp.c
  4a47c00 build: update gnulib submodule to latest
  4f8c4b8 Don’t limit strip counts etc. to INT_MAX
  0a810b6 Fix unlikely integer overflows in patch.c
  bac3b6d Fix unlikely integer overflows in pch.c
  8fb784b Fix unlikely integer overflows in inp.c
  e10f3ca Promote minmax.h to common.h
  57e2165 Avoid some memory allocation by not using ‘const’
  eb18b39 Remove unnecessary char * casts in inp.c
  d60cb72 Pacify gcc -Wunused-parameter when !USE_XATTR
  05ef886 Pacify gcc -Wunused-parameter when !USE_XATTR
  1f8d192 maint: stop using alloca
  ba92722 Don’t assume O_RDONLY == 0
  0f98e03 Avoid syscall when nested signal block
  1235ccc Add signal comment
  43ee674 build: update gnulib submodule to latest
  e381947 Update NEWS, README-prereq
  2c2a83b Omit _Noreturn when easy
  a13c2ea Replace __attribute__ with attribute.h
  6eb2d13 Switch from ctype.h to c-ctype.h
  d1a6847 Simplify warning configuration
  d6631b3 Prefer ATTRIBUTE_* to _GL_ATTRIBUTE_*
  bc6899d Pacify gcc -Wno-unused-parameter
  da25985 Improve ‘git diff’ output if desired
  248ef13 Prefer strerror to perror
  6cb321a A bit more long-string fixing
  47bc09d Prefer nullptr to NULL
  7608746 More fixing of printing of very long strings
  323da0d Don’t assume string sizes fit in int when printing
  53d1014 Avoid fprintf INT_MAX overflow when merging
  59681c8 Avoid sprintf INT_MAX overflow
  4278b91 Reject output file names containing '\n'
  34b45bc Update man page a bit.
  d18c05d Update copyright notices
  af828e5 Fix some races involving signals
  b3a6c95 Don’t attempt to remove files we didn’t create
  9abc949 Omit goto in try_safe_open
  90e62d5 Pacify clang re obsolete O_CREAT test
  2b87c1e Allow nested block/unblock of signals
  7aa1c3b Adjust to new Gnulib bootstrap post imports
  99c0c0b maint: remove generated file lib/Makefile.am
  1c087d6 Rely on Gnulib inttypes module
  7214f8d Update main locals more consistently
  6785b2c Use struct outfile * in function args
  72d7ed0 Refactor temp names into struct
  abf6fb1 Simplify by using Gnulib sigaction
  d3816ac Avoid unnecessary freeing in output_files
  346d3ac Clean up cleanup
  ff2317b Port better to GNU/Hurd
  c2d9792 Don’t say empty backups are unreadable
  8c27a03 Spelling fixes
  d46d729 Change manywarnings usage to be more like coreutils
  924698b Pacify clang, which dislikes n + "y"
  8939519 Pacify -Wstrict-overflow in pch.c
  531cc2b Pacify -Wsuggest-attribute=format in util.c
  ff13fea Port to non-VLA C compilers
  3d5c0d1 Rename vars to pacify gcc -Wshadow
  56788ce Stop including stdbool.h
  c10da77 Recommend 64-bit time_t on 32-bit platforms
  1e21767 Remove pch_sha1
  39005cf Move skip_spaces
  755712d Remove pch_timestamp function
  04f0eeb Prefer extern inline to static inline for list.h
  f06c123 maint: pacify gcc 14 -Wcast-align
  aab6e7b maint: pacify -Wanalyzer-null-argument
  d1d32c9 maint: work around GCC bug 109839
  7575694 maint: pacify gcc -Wmissing-variable-declarations
  8f78b09 maint: pacify gcc -Winline
  bb841fd maint: port _FORTIFY_SOURCE to Ubuntu
  4887683 maint: assume STDC_HEADERS
  5b8ecde maint: spruce up our .m4 files a bit
  009a424 maint: omit obsolete macro calls
  299167f maint: simplify .gitignore
  3ec44a4 build: update gnulib submodule to latest
  68cb529 build: update gnulib submodule to latest
  f144b35 build: Enable the 'subdir-objects' Automake option.
  faafc79 build: update gnulib submodule to latest
  c835ecc Pass the correct stat to backup files
  24f81be maint: modernize README-{hacking,prereq}
  7623b2d Fix test for presence of BASH_LINENO[0]
  0993940 gnulib: update to latest
  78ed9de Add missing-section tests to context-format test case
  76e7758 Fix failed assertion 'outstate->after_newline'
  15b158d Avoid invalid memory access in context format diffs
  dce4683 Don't follow symlinks unless --follow-symlinks is given
  61d7788 Don't crash when RLIMIT_NOFILE is set to RLIM_INFINITY
  b7b028a Abort when cleaning up fails
  a5b442c Skip "ed" test when the ed utility is not installed
  2b584ae Improve support for memory leak detection
  9c98635 Fix swapping fake lines in pch_swap
  ff81775 Make the (debug & 2) output more useful
  369dccc Don't leak temporary file on failed multi-file ed-style patch
  1959988 Don't leak temporary file on failed ed-style patch
  f322a7e Request 'alloca' module from gnulib.
  458ac51 Fix 'ed-style' test failure.
  1e9104c Fix check of return value of fwrite().
  ae81be0 maint: avoid warnings from GCC8
  2a32bf0 Minor cleanups in do_ed_script
  ff1d3a6 Use gnulib execute module
  3fcd042 Invoke ed directly instead of using the shell
  123eaff Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)
  b5a91a0 Allow input files to be missing for ed-style patches
  f290f48 Fix segfault with mangled rename patch
  074e239 Test suite: fix Korn shell incompatibility
  f6bc5b1 Test suite compatibility fixes
  3bbebbb Avoid set_file_attributes sign conversion warnings

Signed-off-by: Russell Senior <russell@personaltelco.net>
Link: https://github.com/openwrt/openwrt/pull/18479
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-21 23:55:59 +02:00
Daniel Golle
493b0cd817 mediatek: mt7623: validate uImage.FIT
Validate the uImage.FIT instead of only checking the image magic.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-04-21 19:04:45 +01:00
Daniel Golle
7ea0f647b9 mediatek: mt7622: validate uImage.FIT
Validate the uImage.FIT instead of only checking the image magic.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-04-21 19:03:58 +01:00
Daniel Golle
29ec74b8c7 treewide: validate unified uImage.FIT images before flashing
Prevent flashing truncated or otherwise corrupted uImage.FIT images
by verifying checksums and hashes of all sub-images before flashing
using the newly packaged fit_check_sign tool.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-04-21 16:12:42 +01:00
Daniel Golle
5175d0a623 base-files: allow platform_check_image to prevent --force
Introduce special handling for return code 74 (EBADMSG) of
platform_check_image which will mark the image as broken and hence
not allow the user to override the check using the --force option.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-04-21 16:12:42 +01:00
Daniel Golle
370a9d5586 mediatek: filogic: add missing boards to platform_check_image
Add all boards using uImage.FIT to platform_check_image() case section
making sure we are dealing with a FIT image.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-04-21 16:12:42 +01:00
Robert Marko
e567f7b617 apk: backport fix for GCC15 with LTO
APK is currently broken when built with GCC15 and LTO as it will then hang
indefinitevely on the package/install step.

Luckily, upstream was able to find the issue and fix it, so lets backport
the fix as GCC15 is the default compiler on Fedora 42(And soon more distros)

Link: https://github.com/openwrt/openwrt/pull/18549
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-21 14:21:10 +02:00
Sam Hegarty
c592afed4d rockchip: explicitly specify pine64_rockpro64 supported devices
The board name that goes into /etc/board.json and is used by sysupgrade
for image verifications gets determined by the below command:

  `strings /proc/device-tree/compatible | head -1`

as per package/base-files/files/lib/preinit/02_sysinfo

On more recent firmware version for the Pine64 RockPro64 v2.1 devices the
first entry is 'pine64,rockpro64-v2.1' however the metadata in the
sysupgrade image only specifies 'pine64,rockpro64' as supported and image
verification will fail.

This change makes it so the image metadata will contain both
'pine64,rockpro64' and 'pine64,rockpro64-v2.1' allowing image verification
to pass on both older and more recent firmware versions.

Signed-off-by: Sam Hegarty <hegarty.sam@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18542
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-21 13:53:07 +02:00
George Moussalem
6782d0e66f arm64: dts: qcom: ipq5018: add #clock-cells to GE Phy
The IPQ5018 GE Phy driver registers two fixed rate clocks which are
passed on to the GCC which gatekeeps and passes them back to the phy.
Fix 'bad phandle' warning and tell consumer (GCC) how many cells to
expect when compiling.

Warning (clocks_property): /soc@0/clock-controller@1800000: Missing property '#clock-cells' in node /soc@0/mdio@88000/ethernet-phy@7 or bad phandle (referred from clocks[5])

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18548
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-21 13:04:09 +02:00
Scott Mercer
97f09fa25e qualcommax: ipq5018: gl-b3000: fix uboot support
The bootscript parameter in gl-qsdk-factory.sh was moved
from arg[4] to arg[2] (1 based index) This patch reflects
these changes

Fixes: 3307fe8ee4 ("qualcommax: ipq50xx: add support for GL.iNET GL-B3000")
Signed-off-by: Scott Mercer <TheRootEd24@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18547
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-21 11:49:51 +02:00
Olgun Demir
c3b8108a2b ramips: Add support for Xiaomi MiWiFi 3A
The Xiaomi MiWiFi 3A wireless router has a similar system architecture as the Xiaomi Mi 4A router, which is already officially supported by OpenWrt.

Product website: https://www.mi.com/miwifi3a

Device specification
--------------------
SoC:      MT7628AN MIPS_24KEc @ 580 MHz 2.4G-bgn 2x2
WiFi:     MT7612EN 5G-an, ac 80 MHz 2T2R
Flash:    16 MB
DRAM:     64 MB
Switch:   MT7628AN (integrated in SoC)
Ethernet: 1 x 10 /100 Mbps
USB:      None
Antennas: 2 x 2,4 GHz and 2 x 5 GHz (all are external and non-detachable)
LEDs:     blue/red/amber
Buttons:  Reset
Serial:   115200,8n1

MAC addresses as verified by OEM firmware:
------------------------------------------
use address source
LAN *:DD factory 0x28
WAN *:DD factory 0x28
2g *:DE factory 0x4
5g *:DF factory 0x8004

OEM firmware uses VLAN's to create the network interface for WAN and LAN.

Bootloader info:
----------------
The stock bootloader uses a "Dual ROM Partition System".
OS1 is a deep copy of OS2.
The bootloader starts OS2 by default.
To force start OS1 it is needed to set "flag_try_sys2_failed=1".

How to install:
---------------
1- Use OpenWRTInvasion to gain Telnet, SSH and FTP access: https://github.com/acecilia/OpenWRTInvasion
[IP: 192.168.31.1 | Username: root | Password: root | FTP-Port: 21]
2- Connect to router using telnet or ssh.
3- Backup all partitions. Use command "dd if=/dev/mtd0 of=/tmp/mtd0". Copy /tmp/mtd0 to computer using ftp.
4- Copy openwrt-ramips-mt76x8-xiaomi_miwifi-3a-squashfs-sysupgrade.bin to /tmp in router using ftp.
5- Enable UART access and change start image to OS1.

nvram set uart_en=1
nvram set flag_last_success=1
nvram set boot_wait=on
nvram set flag_try_sys2_failed=1
nvram commit

6- Erase OS1 & OS2 and install OpenWrt

mtd erase OS1
mtd erase OS2
mtd -r write /tmp/openwrt-ramips-mt76x8-xiaomi_miwifi-3a-squashfs-sysupgrade.bin OS1

Credits:
--------
This PR is based on the work of Zehao Zhang (Github: @ZZH-Finalize) that he had published in the PR: #15698

Signed-off-by: Olgun Demir <olgun.demir@mail.com.tr>
Link: https://github.com/openwrt/openwrt/pull/18427
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-20 21:50:22 +02:00
Mieczyslaw Nalewaj
b96e790419 util-linux: add include linux/unistd.h patch
If SYS_statmount/SYS_listmount is not provided by the libc,
util-linux will fall back to __NR_statmount/__NR_listmount from the
kernel UAPI headers.
However it is not guaranteed that these symbols are actually visible in
mount-api-utils.

Include linux/unistd.h which provides syscall numbers.
While this header is specific to Linux, the code is already using
linux/mount.h.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18539
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-20 18:33:54 +02:00
David Bauer
9099721fb4 uqmi: update to latest HEAD
a933061 uqmi nas: fix incorrect parameter order

Signed-off-by: David Bauer <mail@david-bauer.net>
2025-04-20 17:04:19 +02:00
David Bauer
387b49d89a netifd dhcp: send DHCP client ID by default
Some ISPs require the client ID to be set in the DHCP and DHCPv6
requests. OpenWrt sets the client id for IPv6 but not for IPv4 by
default.

Align this behavior between DHCPv4 and DHCPv6.

ISPs that require this measure are Deutsche Glasfaser as well as some
Entega connections.

Signed-off-by: David Bauer <mail@david-bauer.net>
2025-04-20 17:04:08 +02:00
Scott Mercer
3307fe8ee4 qualcommax: ipq50xx: add support for GL.iNET GL-B3000
Add support for GL.iNET (AX3000) B3000.

Speficiations:
* SoC: Qualcomm IPQ5018 (64-bit dual-core ARM Cortex-A53 @ 1.0Ghz)
* Memory: Winbond W634GU6NQB-11 (512 MiB DDR3-933)
* Serial Port: 3v3 TTL 115200n8
* Wi-Fi: IPQ5018 (2x2 2.4 Ghz 802.11b/g/n/ax)
* Wi-Fi: QCN6102 (2x2:2 5 Ghz 802.11an/ac/ax)
* Ethernet: IPQ5018 integrated virtual switch connected to an external
            QCA8337 switch (3 Ports 10/100/1000 GBASE-T)
* Flash: Winbond W25N01GWZEIG (128 MiB)
* LEDs: 1x single-color blue LED (GPIO 24 Active High)
        1x single-color white LED (GPIO 23 Active High)
* Buttons: 1x Reset (GPIO 27 Active Low)

Flash Instructions:

*** The .img files are now universal ! ***

Openwrt		--> openwrt-qualcommax-ipq50xx-glinet_gl-b3000-squashfs-factory.img

GL.iNet OEM	--> openwrt-b3000-4.5.18-0731-1722397535.img

Either file can be flashed, in any of the available upgrade options, in both Firmwares.

Pick a file .. pick a method .. and SEND IT !!

Signed-off-by: Scott Mercer <TheRootEd24@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17903
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-20 16:11:29 +02:00
Thomas Richard
963d320086 stm32: Add kmod-stm32-thermal
This adds the Thermal framework support for STM32MP157.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-19 18:41:29 +02:00
Thomas Richard
7ad335e56e stm32: sort kernel module packages in alphabetical order
In modules.mk, sort packages in alphabetical order.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-19 18:41:26 +02:00
Thomas Richard
ef38ea7e34 stm32: add missing SUBMENU for kmod-phy-stm32-usbphyc and kmod-stm32-timers
Move kmod-phy-stm32-usbphyc in the "USB Support" menu and kmod-stm32-timers
in "Other modules" menu.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-19 18:41:23 +02:00
Thomas Richard
19d5619479 stm32: add STM32MP157C-DK2 support
Add STM32MP157C-DK2 support. This profile also supports the STM32MP157F-DK2
board. The only difference between these two boards is the CPU frequency
(650MHz for 157C and 800MHz for 157F).

A SCMI variant is available. With this variant the reset and clock
resources are provided by OP-TEE and the associated SCMI services.
It is the configuration recommended by STMicroelectronics, with secured
system resources.

The specifications bellow only list supported features.

Specifications
--------------

SOC: STM32MP157C
RAM: 512 MiB
Storage: SD Card
Ethernet: 1x 1 Gbps
Wireless: 2.4GHz Cypress CYW43455 (802.11b/g/n)
LEDs: Heartbeat (Blue)
USB: 4x 2.0 Type-A

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-19 18:41:19 +02:00
Thomas Richard
2076f44134 murata-nvram: add symlink for STM32MP157C-DK2
The nvram file is generic for all stm32 boards, add a symlink for
STM32MP157C-DK2 and the SCMI variant.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-19 18:41:16 +02:00
Thomas Richard
af585cfcfe arm-trusted-firmware-stm32: add STM32MP157C-DK2 support
Add entry for STM32MP157C-DK2 and the SCMI variant.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-19 18:41:13 +02:00
Thomas Richard
01fc5fadab uboot-stm32: add STM32MP157C-DK2 support
Add entry for STM32MP157C-DK2 and the SCMI variant.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-19 18:41:08 +02:00
Thomas Richard
755e35f5bd optee-os-stm32: add STM32MP157C-DK2 support
Add entry for STM32MP157C-DK2 and the SCMI variant.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-19 18:40:58 +02:00
Mieczyslaw Nalewaj
355866fc11
generic: move TCP fraglist GRO patch to separate file in pending
Patch 87cb0446b7 also applies to higher kernel versions.
To apply to them it has been moved to a separate file in pending.

Fixes: 87cb0446b7 ("generic: fix broken TCP fraglist GRO patch")
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18511
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-19 13:20:45 +02:00
Georgi Valkov
b77e6cd627 generic: fix PATH_MAX macro redefined in exec-cmd.c on macOS 15.4
Fix an error while building target/linux x64 on macOS 15.4 host,
due to the PATH_MAX macro being redefined:

mkdir -p /Volumes/test/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.86/tools/objtool && make O=/Volumes/test/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.86 subdir=tools/objtool --no-print-directory -C objtool
exec-cmd.c:15:9: error: 'PATH_MAX' macro redefined [-Werror,-Wmacro-redefined]
   15 | #define PATH_MAX        4096
      |         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/syslimits.h:103:9: note: previous definition is here
  103 | #define PATH_MAX                 1024   /* max bytes in pathname */
      |         ^

exec-cmd.c is compiled as part of objtool to run on the host, and
therefore host headers are used, where PATH_MAX is already defined.
Using an old OpenWRT snapshot from 2025-02-16, where linux-6.6.77
used to build correctly, does not help. Reverting from Xcode 16.3 to
16.2 does not help either.

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18530
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-19 12:05:42 +02:00
Mantas Pucka
8ffb3b2829 mac80211: ath12k: fix regdb parsing for 6GHz
Add backport patch that fixes ath12k regdomain parsing failure in
6GHz band triggered by the latest regdb/board-2.bin update.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18512
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-18 17:51:45 +02:00
Mantas Pucka
903566c2d6 mac80211: refresh patches
Previous commits missed some refreshing

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18512
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-18 17:51:45 +02:00
Robert Marko
891c8244f2 jsonfilter: update to Git HEAD (2025-04-18)
8a86fb78235b build: set GNU17 for lemon compilation

Link: https://github.com/openwrt/openwrt/pull/18525
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-18 17:50:26 +02:00
Thomas Weißschuh
447cd674b9 util-linux: update to v2.41
Release Notes:
	https://www.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41-ReleaseNotes

New:
	0001-meson-add-feature-for-translated-documentation.patch
	0001-meson-remove-tinfo-dependency-from-more.patch

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Link: https://github.com/openwrt/openwrt/pull/18493
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-18 17:23:42 +02:00
Thomas Weißschuh
7bbb78c622 tools: util-linux: update to v2.41
Release Notes:
	https://www.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41-ReleaseNotes

Remove upstreamed:
	0001-hexdump-allow-enabling-with-disable-all-programs.patch
	110-pkgconfig-static.patch

Refresh:
	101-macos-weak-aliases.patch

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Link: https://github.com/openwrt/openwrt/pull/18493
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-18 17:23:42 +02:00
Sebastian Schaper
907cb88e10 mediatek: filogic: add support for WAVLINK WL-WN573HX3
The WL-WN573HX3 is an AX3000 outdoor Access Point by WAVLINK,
also sold in Europe as 7Links WLR-1300 (ZX-5612).

Specifications:

- MT7981B + MT7976 AX3000 2x2 DBDC (160 MHz)
- 16 MiB SPI NOR, 256 MiB RAM
- Gigabit ethernet port, 802.3af PoE
- IP67 outdoor case for wall or pole mounting with
    four single band RP-SMA fiberglass antennas (8 dBi)

Installation:

- OEM Web UI is at 192.168.30.1 which will forward to
    http://netlogin.link (using a captive portal)
- login with default password `admin`
- skip setup wizard by navigating directly to
    http://netlogin.link/html/meshUpgrade.html
- upload WN573HX3-sysupgrade.bin
- reset to factory defaults to discard OEM UCI settings

MAC address assignment:

LAN         80:xx:xx:76:xx:25  hw 0x44e
WLAN 2.4G   80:xx:xx:76:xx:27  factory 0x04 (label MAC)
WLAN 5G	    82:xx:xx:46:xx:27
pair key    8a:xx:xx:76:xx:27  also on label, not used by OpenWrt

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
2025-04-18 14:00:39 +02:00
Simonas Tamošaitis
1227e5f54f ramips: mt76x8: add support for Teltonika RUT200
Specification:
SoC: MediaTek MT7628AN
RAM: 128 MB EtronTech EM68C16CWQG-25IH
Flash: 16MB Winbond W25Q128 SPI
Switch: MediaTek MT7628AN, 2 ports 100 Mbps
WiFi: MediaTek MT7628AN 2.4 GHz 802.11n
Modem: Quectel EC200A 4G, cat 4
GPIO:
  - 1 button (Reset)
  - 8 LEDs (2G, 3G, 4G, RSSI 1,2,3,4,5)
  - 2 Modem control (power button, reset)
  - 1 Digital input
  - 1 Digital output

Flashing via OEM WebUI:
1. Download the firmware image *-squashfs-factory.bin
2. Upload firmware image via OEM WebUI firmware update, do not keep settings

To revert back to OEM firmware:
https://wiki.teltonika-networks.com/view/Bootloader_menu

To enable mobile data connection send command to modem:
  echo -ne 'AT+QNETDEVCTL=3,1\r\n' > /dev/ttyUSB2

Create DHCP interface with usb0 device.

Signed-off-by: Simonas Tamošaitis <simsasss@gmail.com>
2025-04-18 14:00:39 +02:00
Simonas Tamošaitis
11189ee7fb ramips: mt76x8: add support for Teltonika RUT241
Specification:
SoC: MediaTek MT7628AN
RAM: 128 MB EtronTech EM68C16CWQG-25IH
Flash: 16MB Winbond W25Q128 SPI
Switch: MediaTek MT7628AN, 2 ports 100 Mbps
WiFi: MediaTek MT7628AN 2.4 GHz 802.11n
Modem: MeigLink SLM750 4G, cat 4
GPIO:
 - 1 button (Reset)
 - 8 LEDs (2G, 3G, 4G, RSSI 1,2,3,4,5)
 - 2 Modem control (power button, reset)
 - 1 Digital input
 - 1 Digital output

Flashing via OEM WebUI:
1. Download the firmware image *-squashfs-factory.bin
2. Upload firmware image via OEM WebUI firmware update, do not keep settings

To revert back to OEM firmware:
https://wiki.teltonika-networks.com/view/Bootloader_menu

Signed-off-by: Simonas Tamošaitis <simsasss@gmail.com>
2025-04-18 14:00:39 +02:00
David Bauer
0ee1ede25a build: include size-limits to device-metadata
Include the image and kernel size limitations defined for each device to
the device metadata JSON.

These informations are only added if defined.

Signed-off-by: David Bauer <mail@david-bauer.net>
2025-04-18 14:00:39 +02:00
Rick Mac Gillis
775523f628 ramips: add support for Mofi 5500
Specifications:

SoC: Mediatek MT7621AT (880 MHz MIPS dual-core, quad-thread, CPU)
512 Megabyte DDR3 SDRAM
32 Megabyte NOR Flash
4 Gigabit RJ45 PoE ports
2 MT7615N wifi chips (2.4GHz and 5GHz)
2 USB ports (1xUSB2 and 1xUSB3 - GL3510 chip)
RJ45 RS232 port on front panel (Max3232 chip)
2x mPCIe 2.0 slots for 4G/5G cards
2x SIM slot
1x SDCard Slot
Power via DC12V
4x Cell Antennae
4x Wifi Antennae

MAC Address Locations:
Purpose	Ex.		Partition	Offset
2.4 Ghz	*:01	factory		0x4
5 GHz	*:02	factory		0x8004
LAN		*:03	factory		0xe000
WAN		*:04	factory		0xe006

MAC address prefix E4:3A:65 is registered to MofiNetwork Inc
and used as the prefix for all MAC addresses.

Manual: https://mofinetwork.com/files/MoFi_Network_MOFI5500_5GXeLTE_EM7690_SPECS.pdf
WiFi chip specs: https://www.mediatek.com/products/broadband-wifi/mt7615
CPU chip specs: https://www.mediatek.com/products/home-networking/mt7621
Teardown Pictures: https://fccid.io/2AE6X-MOFI5500/Internal-Photos/Internal-Photos-5591739

Installation:

Update Mofi 5500 to at least stock firmware version 4.8.6. (Available on the Mofi website.)
Previous versions are untested in the upgrade process. Log into the LuCI web interface,
usually at 192.168.10.1 and visit the 'System->Backup/Flash Firmware' page.
Upload and flash the firmware as usual.

Note to Maintainers: Do not remove SUPPORTED_DEVICES from the Makefile!
The customized Mofi version of OpenWRT (stock firmware) expects to see mofi5500 as the device
name. The stock firmware does not allow for forcing an installation.
Without this line, users cannot upload the new firmware through the stock Mofi firmware.

This device uses cell modems that could use QMI or MBIM.
Add LuCI Modem Manager to allow people to use these. Also, if they have
two cell network cards, ethernet, USB, or other kinds of networks, they may wish
to use MWAN3 to allow failover amongst their networks.

Please compile it with mwan3 for multiple WAN connections.

Co-authored-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Rick Mac Gillis <noreply@rickmacgillis.com>
2025-04-18 13:56:26 +02:00
Robert Marko
ffaaae4320 uboot-tools: remove uneeded syncconfig
During envtools conversion to the generic uboot-tools package, a syncconfig
call was added to the configure step which was previously not there.

We received multiple spourious reports that now envtools were failing to
build [1], but it was not reproducible.

However, it seems that this could easily be reproduced on MacOS 15 and
somehow that syncconfig call is breaking build by Makefile.autoconf not
being executed and thus no "include/config.h" is generated.

So, since this call was not previously there and U-Boot will actually do
syncconfig on its own when needed lets drop it.

[1] 293d5f1366 (commitcomment-154347516)

Link: https://github.com/openwrt/openwrt/pull/18515
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-18 13:22:12 +02:00
Robert Marko
e6c6351976 uboot-tools: Honor the global verbose flag
Look for OPENWRT_VERBOSE and pass it down to the U-Boot so we actually
get verbose build info when needed for debugging.

Link: https://github.com/openwrt/openwrt/pull/18515
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-18 13:22:12 +02:00
Robert Marko
a06ed856bb gdb: update to 16.2
See news file for changes:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob_plain;f=gdb/NEWS;hb=gdb-16.2-release

It fixes compilation with GCC15.

Link: https://github.com/openwrt/openwrt/pull/18519
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-18 02:10:48 +02:00
Jakub Łabuz
2eb7e4bf61 comgt-ncm: fix modem manufacturer detection
Fix an issue where NCM interface initialization fails because of wrong
modem manufacturer detection.

gcom call returns an output with Windows-style line breaks (containing \r)
what makes awk call return empty or malformed manufacturer name. Changing
awk RS variable to handle both \n and \r\n as line break fixes this issue.

Fixes #17448 and #17998 GitHub issues.

Signed-off-by: Jakub Łabuz <jakub@labuz.dev>
Link: https://github.com/openwrt/openwrt/pull/18460
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-18 01:37:48 +02:00
INAGAKI Hiroshi
5d26507a73 uboot-ath79: update to v2025.04
Update uboot-ath79 package to v2025.04 for ath79 devices.

Additionally, new "CONFIG_NO_NET" option was introduced and replaced
disabled CONFIG_NET option ("# CONFIG_NET is not set"). So replace
that old options in the NEC Aterm devices as well.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18475
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-17 19:15:42 +02:00
Robert Marko
31800db91d tools: gmp: fix compilation with GCC15
Fedora 42 updated to GCC15 which now defaults to GNU23 as the default
instead of GNU17[1], and this breaks GMP compilation by failing to find
a working compiler test.

Its been fixed upstream [2][3], so backport the fix to fix GCC15 compilation.

[1] https://gcc.gnu.org/gcc-15/porting_to.html#c23
[2] https://gmplib.org/repo/gmp/rev/8e7bb4ae7a18
[3] https://gmplib.org/repo/gmp/rev/d66d66d82dbb

Link: https://github.com/openwrt/openwrt/pull/18506
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-17 16:29:18 +02:00
Robert Marko
f165dd2f78 tools: elfutils: set -std=gnu17
Fedora 42 updated to GCC15 which now defaults to GNU23 as the default
instead of GNU17[1], and this breaks m4 compilation.

This looks like a gnulib issue, so until that is updated/fixed
lets simply set C language version back to GNU17.

[1] https://gcc.gnu.org/gcc-15/porting_to.html#c23

Link: https://github.com/openwrt/openwrt/pull/18506
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-17 16:29:18 +02:00
Robert Marko
c5041094ba tools: cpio: fix compilation with GCC15
Fedora 42 updated to GCC15 which now defaults to GNU23 as the default
instead of GNU17[1], and this breaks cpio compilation.

Its been reported upstream [2], so import the patch attached to the bug
report that fixes compilation with GCC15.

[1] https://gcc.gnu.org/gcc-15/porting_to.html#c23
[2] https://savannah.gnu.org/bugs/?66297

Link: https://github.com/openwrt/openwrt/pull/18506
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-17 16:29:18 +02:00
Georgi Valkov
d3bb23946e toolchain: gcc: fix build error with Xcode 16.3
Xcode 16.3 defines TARGET_OS_MAC, it was not defined in prior versions.
zutil.h conditionally defines fdopen as NULL when this macro is defined,
resulting in the following build error:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: e>
  318 | FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
      |          ^
./zutil.h:147:33: note: expanded from macro 'fdopen'
  147 | #        define fdopen(fd,mode) NULL /* No fdopen() */

In Xcode 16.2 and earlier, TARGET_OS_MAC was not defined so this entire
block was ignored, gcc and gdb used to compile and work fine.

This may have been used for compatibility with older versions of macOS,
but is no longer needed. By pure luck, the build worked fine for a long
time, because it did not properly detect macOS.
Fixed by removing the check for TARGET_OS_MAC.

Note that since Xcode 16.3, an entire set of TARGET_OS macros
are now defined, most of which are set to 0:
TARGET_OS_LINUX 0
TARGET_OS_MAC 1
TARGET_OS_OSX 1

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18467
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-16 14:38:34 +02:00
Georgi Valkov
dfb8115d0c toolchain: gdb: fix build error with Xcode 16.3
Xcode 16.3 defines TARGET_OS_MAC, it was not defined in prior versions.
zutil.h conditionally defines fdopen as NULL when this macro is defined,
resulting in the following build error:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: error: expected identifier or '('
  318 | FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
      |          ^
./zutil.h:147:33: note: expanded from macro 'fdopen'
  147 | #        define fdopen(fd,mode) NULL /* No fdopen() */

In Xcode 16.2 and earlier, TARGET_OS_MAC was not defined so this entire
block was ignored, gcc and gdb used to compile and work fine.

This may have been used for compatibility with older versions of macOS,
but is no longer needed. By pure luck, the build worked fine for a long
time, because it did not properly detect macOS.
Fixed by removing the check for TARGET_OS_MAC.

Note that since Xcode 16.3, an entire set of TARGET_OS macros
are now defined, most of which are set to 0:
TARGET_OS_LINUX 0
TARGET_OS_MAC 1
TARGET_OS_OSX 1

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18467
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-16 14:38:34 +02:00
Robert Marko
8c141e53d7 tools: m4: set -std=gnu17
Fedora 42 updated to GCC15 which now defaults to GNU23 as the default
instead of GNU17[1], and this breaks m4 compilation.

Its been reported upstream [2], so until its fixed lets simply set C
language version back to GNU17.

[1] https://gcc.gnu.org/gcc-15/porting_to.html#c23
[2] https://savannah.gnu.org/support/?111150

Link: https://github.com/openwrt/openwrt/pull/18505
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-16 13:52:33 +02:00
Christian Marangi
71446d8052
generic: fix broken ARM gc sections patch
Upstream version of ARM gc sections skip eeping some section. It was
reported some kernel load hang hence restore what we original did and
introduce a new patch that add the additional entry on top of the
upstream version.

Fixes: #18500
Fixes: 7843f21c51 ("generic: replace ARM gc sections patch with upstream version")
Tested-by: Stefan Kalscheuer <stefan@stklcode.de> (Turris Omnia)
Link: https://github.com/openwrt/openwrt/pull/18503
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-16 00:43:34 +02:00