Robert Marko [Wed, 30 Apr 2025 09:53:45 +0000 (11:53 +0200)]
ead: fix compilation with GCC14
Trying to compile EAD with now default GCC14 will fail due to now erroring
out on implicit int type as well as implicit function declarations.
Due to this, the packaged configure script will fail on the simple compiler
test as the generated test uses main loop with an implicit int type.
So, instead of patching multiple test cases in the shipped configure script
for tinysrp lets run autoreconf on it so its regenerated.
We also need to pass -Wno-error=implicit-function-declaration as there are
multiple instances of tinysrp code relying on implicit function declarations.
Scott Mercer [Mon, 21 Apr 2025 15:23:07 +0000 (11:23 -0400)]
package: basefiles: add oem image dectection to fwtool.sh
with more new device, now able to flash oem
images from luci, fwtools erroneously marks
firmware as incompatible and does not warn
across keeping configs during update.
this patch aims to add both oem detection
and a warning msg advising firmware is compatible
(OpenWrt -> OEM) but configuration is not
tested on ipq5018: gl-b3000
Signed-off-by: Scott Mercer <TheRootEd24@gmail.com>
package: basefiles: add oem image dectection to fwtool
some new devices are now able to flash oem
images from luci, fwtools erroneously marks
firmware as incompatible and does not warn
of keeping configs during update for this condition.
this patch aims to add both oem detection
and trigger the existing warning msg, advising firmware is compatible
(OpenWrt -> OEM) but configuration is not
George Moussalem [Tue, 29 Apr 2025 13:24:46 +0000 (17:24 +0400)]
qualcommax: ipq50xx: fix GE_PHY and Uniphy resets
Fix the resets of the GE_PHY and Uniphy found on the IPQ5018 SoC.
Bitmasks are used to perform multiple resets simultaneously, including
the RX and TX clocks. This enables the Uniphy to properly shift between
SGMII/1G and SGMII+/2.5G modes.
While at it, properly reorder the patches, and rename some to follow
naming standards.
Felix Fietkau [Wed, 30 Apr 2025 08:40:38 +0000 (10:40 +0200)]
ucode-mod-uline: fix crash on cleanup
- only run a single poll in the uloop_fd cb to avoid use-after-free on close
- delete the uloop_fd on close
- when calling into ucode, fetch the vm pointer before the call in order
to avoid accessing the stale uline context
generic: drop extra-old-deprecated pending fix patch for sch codel
Patch 620-net_sched-codel-do-not-defer-queue-length-update.patch is
actually an ancient patch that somehow manage to be ported for 7 solid
years.
This comes from [1] where a fix patch was proposed. Nobody notice that
the proposed patch was actually rejected upstream in favor of [2]. And
the upstream fix patch is present in kernel from version 4.18.
This means that we were actually fixing for a non existant bug and maybe
introducing regression down the line.
Drop the patch for good as we already have a fix for it in flace for a
long time.
George Moussalem [Tue, 29 Apr 2025 10:32:20 +0000 (14:32 +0400)]
qualcommax: ipq50xx: fix ipq5018 GE PHY and tidy up mdio nodes
As part of the previous commit to add the #clock-cells property to the
GE PHY, the PHY was inadvertently moved under the second mdio node in
the dtsi, and therefore broke the init sequence as the driver was trying
to use the wrong mdio bus to set the init values (ex. DAC, MSE, and AZ).
So let's move it back under the right mdio node and, while at it, pad
the register addresses to 8 hex numbers and re-order properties in line
with Linux DTS coding standards.
Fixes: 6782d0e66fd607a3536d5fd94e998d2d700ffeaf Signed-off-by: George Moussalem <george.moussalem@outlook.com> Link: https://github.com/openwrt/openwrt/pull/18634 Signed-off-by: Robert Marko <robimarko@gmail.com>
Shiji Yang [Tue, 29 Apr 2025 10:16:29 +0000 (18:16 +0800)]
ramips: correct wifi driver packages for TP-Link MR200 v6
TP-Link Archer MR200 v6 uses the MT7613 wireless chip, hence
the default wifi driver packages should be kmod-mt7615e and
kmod-mt7663-firmware-ap.
Fixes: https://github.com/openwrt/openwrt/issues/18627 Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Link: https://github.com/openwrt/openwrt/pull/18633 Signed-off-by: Robert Marko <robimarko@gmail.com>
qualcommax: ipq50xx: drop unused factory.ubi for ELECOM WRC-X3000GS2
Drop the firmware image entry "factory.ubi" from IMAGES for ELECOM
WRC-X3000GS2.
`Device/UbiFit` is added in the early stage of working for adding
support of the device, but finally, only `KERNEL_IN_UBI` is neccesary
and factory.ubi is not. So `Device/UbiFit` should have been replaced
to `KERNEL_IN_UBI` but it was forgotten.
Fixes: 3b7d72bc2e ("qualcommax: add support for ELECOM WRC-X3000GS2") Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Link: https://github.com/openwrt/openwrt/pull/18611 Signed-off-by: Robert Marko <robimarko@gmail.com>
2. Connect the PC via LAN to one of the yellow router ports and wait
until your PC to get a DHCP lease.
3. Browse to http://192.168.50.1
4. If your router is brand new, finish the setup process and log into
the Web-UI.
5. Navigate to Administration -> Firmware Upgrade and upload the
downloaded OpenWrt image.
6. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device
using scp and install using sysupgrade.
$ sysupgrade -n <path-to-sysupgrade.bin>
-----------------------------------------------------------
TFTP Method
-----------------------------------------------------------
1. Download the OpenWrt initramfs image. Copy the image to a TFTP server
reachable at 192.168.1.70/24. Rename the image to rtax52.bin.
2. Connect the PC with TFTP server to the RT-AX52.
Set a static ip on the ethernet interface of your PC.
(ip address: 192.168.1.70, subnet mask:255.255.255.0)
Conect to the serial console,
interrupt the autoboot process by pressing '4' when prompted.
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>
---------------------------------------------------------------------------
Revert to stock firmware:
1: Download the rt-ax52 firmware from ASUS official website. Save
the firmware to tftp server directory and rename to RT-AX52.trx
2: Connect the PC with TFTP server to the RT-AX52.
Set a static ip on the ethernet interface of your PC.
(ip address: 192.168.1.70, subnet mask:255.255.255.0)
3: Conect to the serial console, power on again, interrupt the
autoboot process by pressing '4' when prompted.
$: ubi remove linux
$: ubi remove jffs2
$: ubi remove rootfs
$: ubi remove rootfs_data
$: ubi create linux 0x45fe000
$: reset
Then the dut will reboot,interrupt the autoboot process by
pressing '2' when prompted.
2: Load System code then write to Flash via TFTP.
Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N)
$: enter y
you will see the follow, type enter directly:
Input device IP (192.168.1.1) ==:
Input server IP (192.168.1.70) ==:
Input Linux Kernel filename (RT-AX52.trx) ==:
4: wait for the device run up
Based on support for ASUS RT-AX52 by liudongdongdong7397
and trx image generation by remittor
Signed-off-by: Christoph Krapp <achterin@gmail.com>
Add missing semicolon to the end of the property.
Remove whitespace while at it.
Fixes: 5a3b9d88f158 ("lantiq: Improve support for LED's fritz736x") Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> Link: https://github.com/openwrt/openwrt/pull/18594 Signed-off-by: Robert Marko <robimarko@gmail.com>
The GL-B3000 has a Winbond W25N01GW and the spare size (oobsize) of it
is 64. So the maximum available ECC strength with the qpic-snand driver
is 4 but not 8.
The "nand-ecc-strength" property was not used before the commit fc3ff2af0c ("qualcommax: allow overriding ECC strength for qpic-snand")
and calculated from the registered spare size in the Linux Kernel. As a
result, we had no issues on the GL-B3000 with the wrong ECC strength
value.
Fixes: 3307fe8ee4 ("qualcommax: ipq50xx: add support for GL.iNET GL-B3000") Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Link: https://github.com/openwrt/openwrt/pull/18595 Signed-off-by: Robert Marko <robimarko@gmail.com>
Daniel Golle [Thu, 24 Apr 2025 05:43:59 +0000 (06:43 +0100)]
uboot-tools: validate all uImage.FIT sub-images
uImage.FIT validation was restricted to certain sub-image types
which is problematic as it then won't validate eg. 'filesystem' type
subimages. Also prevent decompressing sub-images into a arbitrary
sized buffer just to then free that buffer -- there is not need to
do this and creating malicious compressed payloads which overflow the
buffer is too easy.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Robert Marko [Wed, 23 Apr 2025 12:18:48 +0000 (14:18 +0200)]
mold: dont allow on MacOS
Mold does not really work on MacOS, when attempting to use it for example
for ubus:
mold: get_self_path is not supportedcollect2: error: ld returned 1 exit status
Which was introduced by [1] so it seems that MacOS is not supported, so
lets make it non selectable when MacOS is the host.
In include/host-build.mk, HOST_BUILD_DIR is set by default value:
HOST_BUILD_DIR ?= $(BUILD_DIR_HOST)/$(PKG_NAME)
However the mold package has no PKG_NAME set at all. This means the
HOST_BUILD_DIR is identical to $(BUILD_DIR_HOST).
In the Host/Prepare stage, by default, the $(HOST_BUILD_DIR) will be
deleted at first unconditionally. Since HOST_BUILD_DIR is identical
to $(BUILD_DIR_HOST), the entire build_dir/toolchain-* directory will
be removed and this will cause build failure.
Pavel Kubelun [Wed, 16 Apr 2025 18:07:32 +0000 (21:07 +0300)]
kernel: r8125: disable ASPM
Disable ASPM support for this NIC, fixing strange behavior problems, such as
increased latency, strange uneven throughput, etc.
With this option disabled the NIC achieves stable performance.
Upsteam r8169 driver disables ASPM by default for this NIC.
This allows the network interface naming to be stable, free from any
possible interaction from external USB network devices that might
claim usb* interface names.
This allows the network interface naming to be stable, free from any
possible interaction from external USB network devices that might
claim usb* interface names.
This allows the network interface naming to be stable, free from any
possible interaction from external USB network devices that might
claim usb* interface names.
This allows the network interface naming to be stable, free from any
possible interaction from external USB network devices that might
claim usb* interface names.
This allows the network interface naming to be stable, free from any
possible interaction from external USB network devices that might
claim usb* interface names.
Based on support from edimax_ew-7476rpc/edimax_ew-747x
and netgear_ex3700/netgear_ex3x00_ex61xx
Notes:
- ATM there is no known way to revert to stock firmware
Flash instruction:
The only known way to flash OpenWrt image is to use tftp in U-Boot, with the
aid of a serial adapter for U-Boot console access:
1. Open the device and connect to the serial port. The device is very similar
to Edimax 7476RPC. See https://openwrt.org/toh/edimax/ew-7476rpc. No VCC!
2. Configure PC with static IP 192.168.1.2/24 and tftp server and
connect PC to device using an ethernet cable.
3. Power on the device and, on the serial console, as soon as U-Boot starts
loading, press "2" to interrupt loading.
4. Enter device ip address 192.168.1.1, PC ip address 192.168.1.2
and the firmware filename placed on the TFTP server.
5. Device will download file from server, write it to flash and reboot.
INAGAKI Hiroshi [Mon, 10 Feb 2025 15:34:29 +0000 (00:34 +0900)]
qualcommax: add support for ELECOM WRC-X3000GS2
ELECOM WRC-X3000GS2 is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based on
IPQ5018.
Specification:
- SoC : Qualcomm IPQ5018
- RAM : DDR3 256 MiB (Zentel A3T2GF40CBF-HP)
- Flash : SPI-NAND 128 MiB (Macronix MX35UF1G24AD-Z4I)
- WLAN : 2.4/5 GHz 2T2R
- 2.4 GHz : Qualcomm IPQ5018 (SoC)
- 5 GHz : Qualcomm Atheros QCN6102
- Ethernet : 5x 10/100/1000 Mbps
- wan (phy) : Qualcomm IPQ5018 (SoC)
- lan (switch) : Qualcomm Atheros QCA8337
- LEDs/Keys (GPIO): 8x/3x
- UART : through-hole on PCB, 4pins near the barcode
- assignment : 3.3V, TX, RX, NC, GND from the barcode side
- settings : 115200n8
- Power : 12 VDC, 1 A (Max. 11.5W)
Flash instruction using initramfs-factory.bin image:
1. Boot WRC-X3000GS2 normally with router mode
2. Access to the WebUI ("http://192.168.2.1/") on the device and open
the firmware update page ("ファームウェア更新")
3. Select the OpenWrt factory.bin image and click apply ("適用") button
4. Wait ~120 seconds to complete flashing
- All Wi-Fi related peripherals are disabled.
This device has only 256 MiB RAM and it's too few for ath11k. To
prevent OOM when using LuCI or other softwares, disable Wi-Fi related
peripherals in device tree at the moment.
- This device has a Macronix MX35UF1G24AD SPI-NAND chip registered as
oobsize=128 in Linux Kernel. But using BCH8 breaks I/O on the chip
with the following errors, so this support uses BCH4 instead.
root@OpenWrt:~# strings /dev/mtdblock10
[26427.133154] mtdblock: MTD device '0:appsblenv' is NAND, please consider using UBI block devices instead.
[26427.134125] I/O error, dev mtdblock10, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 2
[26427.142240] I/O error, dev mtdblock10, sector 8 op 0x0:(READ) flags 0x80700 phys_seg 3 prio class 2
[26427.151427] I/O error, dev mtdblock10, sector 16 op 0x0:(READ) flags 0x80700 phys_seg 2 prio class 2
[26427.160440] I/O error, dev mtdblock10, sector 24 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
[26427.169619] I/O error, dev mtdblock10, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[26427.178083] Buffer I/O error on dev mtdblock10, logical block 0, async page read
Notes:
- This device has dual-boot feature and it's managed by the index in the
0:bootconfig and 0:bootconfig1 partitions.
kernel: move kernel version files to linux/generic directory
To further improve cleanup and maintenance usage, move the kernel
version files to target/linux/generic directory. This permits to self
contain any change to the specific generic directory instead of having
to bload the include directory of periodic changes.
In kernel-version.mk we now use GENERIC_PLATFORM_DIR provided by
target.mk. To make this work, we need to move the inclusion of
kernel-version.mk in target.mk right after GENERIC_PLATFORM_DIR is
defined.
This also comes to permit downstream project to provide a custom generic
directory and specify the kernel version complete of the hash and the
minor version without having to affect other feeds.
In such case both generic and the target directory are provided as feeds
and OpenWrt reference these specific one instead of the generic one.
For downstream it's still suggested and preferable to all match the
shipped generic kernel minor version but this change permits to at least
enforce good practice instead of having to bloat OpenWrt include file of
all kind of downstream changes (making porting to OpenWrt mainline even
more difficult)
This issue was introduced in v6.6.69 with the following backport:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=36a6e8aeae4a41767bb59f56b100c8cc9ffae2cb
jonathan brophy [Wed, 2 Apr 2025 10:43:43 +0000 (23:43 +1300)]
Qualcommax: IPQ807x: Add support for TP-Link Deco X80-5G
The TP-link Deco X80-5G is a AX WIFI router with a single 1G (LAN) and 1 2.5G (WAN) port with a built in Quectel 5G modem.
Specifications:
Architecture ARMv8-A (aarch64 Cortex A53, 4 cores)
Vendor Qualcomm
Bootloader U-Boot (2016)
System-On-Chip Qualcomm IPQ8074A (Networking Pro 1210 platform)
CPU/Speed 2.2GHZ
Flash-Chip ESMT F59D1G81MB-45TI 1G-bit NAND
Flash MB 128MB (1Gbit)
RAM-chip 2* ESMT M15T4G16256A-DEBG2G 2Gb DDR3L (32bit)
RAM MB 512MB (4Gbit)
WLan System-On-Chip (5g) Qualcomm QCN5054
WLan Front end modules (5g) 8* Qorvo QPF4588
WLAN (5G) A/N/AC/AX
WLAN Antenna (int) 8* (4 shared with 2.5G)
WLan System-On-Chip (2.4G) Qualcomm QCN5024
WLan Front end modules (2.4G) 4* Skyworks SKY85340-11
WLAN (2.4G) B/G/N/AX
WLAN Antenna (int) 4* (shared with 5g)
Eithernet-phy (1Gbit) Qualcomm (Atheros) AR8033-AL1A
Ethernet (1Gbit) 1*
Eithernet-phy (2.5Gbit) Qualcomm QCA8081
Ethernet (2.5Gbit) 1*
Switch Embedded in the SOC?
Serial 1.8v 8n1 (testpoints)
Modem System-On-Chip Qualcomm 5G RG50xQ (Snapdragon X55 platform)
5G modem capability 5000Mbps down 900Mbps up
5G modem bands N1/N3/N5/N7/N8/N20/N28/N38/N40/N41/N77/N78/N79
4G modem capability 4.5G LTE-Advanced Pro (Cat20 down 2Gbps) (Cat18 up 200Mbps)
4G modem FDD bands B1/B3/B5/B7/B8/B18/B19/B20/B26/B28
4G modem TDD bands B34/B38/B39/B40/B41/B42/B43
Modem antenna (int) 8* (5G/4G use)
Modem antenna (ext) 2* SMA connectors (5G/4G use)
SIM type 1* Nano SIM
Telephony 1* POTS RJ11
(see wiki for more info:)
https://openwrt.org/inbox/toh/tp-link/x80-5g_v1
Notes:
Installation Instructions:
Between antennas 7 and 8 on the PCB with the RGB harness there are three test pads labelled TP1 TP2 and TP3 connections are as follows:
|TP2|-- RX
|TP1|-- TX
|TP3|-- GND
RX requires an external pullup to operate somewhere around 5 K ohm but your luck may vary the Uart is 1.8v
Set a static IP and set up a tftpserver and terminal.
power the router and quickly type the magic string “tpl” and press enter to break into u-boot
in the shell set the environment variables to enable tftp booting
setenv ipaddr (routerIP)
setenv serverip (server IP)
load you initramfs:
tftpboot 0x44000000 (serverIP):openwrt-qualcommax-ipq807x-tplink_x80-5g-initramfs-uImage.itb
boot your initramfs
bootm
upload your factory image to /tmp
format and install the factory image:
ubiformat /dev/mtd12 -y -f /tmp/openwrt-qualcommax-ipq807x-tplink_x80-5g-squashfs-factory.ubi
Note as this device swaps root partitions upon update your boot partition may be set as mtd13
Update script to mount factory tplink partition's for MAC recovery and device data.
Capture Labelmac from Factory_data partition.
Patch LAN from Labelmac.
Patch ART from Labelmac.
Set GPIO to make modem operational from boot.
GPIO fan tables work like the stock device with three fan maps high active idle with a top fan speed of 6800 RPM.
High temp 70 deg speeds 6-8
Active temp 50 deg speeds 2-5
low temp 25 degree speed 0-1
- 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.
Antonio Flores [Mon, 21 Apr 2025 14:14:54 +0000 (10:14 -0400)]
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 https://github.com/torvalds/linux/commit/95147bb42bc163866fc103c957820345fefa96cd
Scott Mercer [Mon, 21 Apr 2025 17:12:37 +0000 (13:12 -0400)]
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: 3307fe8ee4cf ("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>
Russell Senior [Wed, 2 Apr 2025 12:47:29 +0000 (05:47 -0700)]
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
Daniel Golle [Sat, 29 Mar 2025 05:09:09 +0000 (05:09 +0000)]
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>
Daniel Golle [Sun, 30 Mar 2025 23:32:50 +0000 (00:32 +0100)]
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>
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.
George Moussalem [Sun, 20 Apr 2025 11:22:09 +0000 (15:22 +0400)]
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])
Scott Mercer [Mon, 21 Apr 2025 09:38:14 +0000 (05:38 -0400)]
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: 3307fe8ee4cf ("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>
Olgun Demir [Sun, 20 Apr 2025 05:04:33 +0000 (07:04 +0200)]
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
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.
Thomas Richard [Wed, 15 Jan 2025 07:28:47 +0000 (08:28 +0100)]
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.
Georgi Valkov [Fri, 18 Apr 2025 13:37:33 +0000 (16:37 +0300)]
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.
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>