Rosen Penev [Tue, 12 Aug 2025 18:22:27 +0000 (11:22 -0700)]
mpc85xx: tl-wdr4900: add back 5ghz LED
In the conversion to dts, qca,led-pin was used for both interfaces.
Unfortunately, it's mutually exclusive with gpio-controller which made
it not do anything.
b3e3c05 client: don't send stray EOF chunk on connection timeout fad0d05 proc: inhibit chunked transfer encoding on existing TEs or known length 3d6f01b file: prevent writes beyond end of uh_buf on enumerating directories c7294e7 client: reject requests with multiple content-lengths and/or TEs 7e64e8b client: Allow sending content in DONE state
The bootup of the armsr target sometimes failed like this:
```
[ 0.762283] NET: Registered PF_INET6 protocol family
[ 0.791987] workqueue: Failed to create a worker thread: -EAGAIN
[ 0.801986] workqueue: Failed to create a rescuer kthread for wq "mld": -EAGAIN
[ 0.964017] NET: Unregistered PF_INET6 protocol family
```
Increase the maximum number of threads the kernel allows.
tegra: bring back workaround for spurious interrupts
Unfortunately they still apear with prolonged serial console usage.
While it's not common to use serial console past initial setup, alas
when the condition is hit the console is almost unusable.
toolchain: glibc: Update glibc 2.38 to recent HEAD
f510d75ff7 nscd: Use time_t for return type of addgetnetgrentX 5aa4bb67b9 resolv: Fix some unaligned accesses in resolver [BZ #30750] 249646f12b Force DT_RPATH for --enable-hardcoded-path-in-tests 697ab62d11 i386: Disable Intel Xeon Phi tests for GCC 15 and above (BZ 31782) c8cb4d2b86 misc: Add support for Linux uio.h RWF_NOAPPEND flag 712453634c s390x: Fix segfault in wcsncmp [BZ #31934] 7bfc35959d nptl: fix potential merge of __rseq_* relro symbols d9d019d674 elf: Make dl-rseq-symbols Linux only bb30bd2162 Linux: Make __rseq_size useful for feature detection (bug 31965) dc512364e8 resolv: Allow short error responses to match any query (bug 31890) 6cad0f543c resolv: Do not wait for non-existing second DNS response after error (bug 30081) 1bed6acf50 resolv: Track single-request fallback via _res._flags (bug 31476) 0301637b99 linux: Update the mremap C implementation [BZ #31968] f0e2114535 mremap: Update manual entry 6bb75212e6 Add mremap tests 3ac7ba61d2 Update syscall lists for Linux 6.5 9184c13681 resolv: Fix tst-resolv-short-response for older GCC (bug 32042) 059f82c3b9 Fix name space violation in fortify wrappers (bug 32052) c005d1bd6f x86: Fix bug in strchrnul-evex512 [BZ #32078] 28f358bc42 support: Add FAIL test failure helper 99ffa84bdc stdio-common: Add test for vfscanf with matches longer than INT_MAX [BZ #27650] 87a1968a72 Make tst-ungetc use libsupport 804d3c8db7 ungetc: Fix uninitialized read when putting into unused streams [BZ #27821] b9f72bd5de ungetc: Fix backup buffer leak on program exit [BZ #27821] 15ca66303f posix: Use <support/check.h> facilities in tst-truncate and tst-truncate64 f30501ca75 nptl: Use <support/check.h> facilities in tst-setuid3 370be85892 libio: Attempt wide backup free only for non-legacy code 4dd8641461 Add crt1-2.0.o for glibc 2.0 compatibility tests fa4ad10406 elf: Change ldconfig auxcache magic number (bug 32231) 9423cc5387 nptl: initialize rseq area prior to registration 37ded328c4 nptl: initialize cpu_id_start prior to rseq registration cf06772360 x86: Avoid integer truncation with large cache sizes (bug 32470) 5c9be512ee x86_64: Sort fpu/multiarch/Makefile 49016f2190 x86_64: Add log2 with FMA b2a45f1eee x86_64: Add expm1 with FMA c92946d9b2 x86_64: Add log1p with FMA 58822f954f x86: Check the lower byte of EAX of CPUID leaf 2 [BZ #30643] 7772f9358c elf: Fix slow tls access after dlopen [BZ #19924] 5a64f93365 x86: Only align destination to 1x VEC_SIZE in memset 4x loop 0d14bf0754 sysdeps/x86/Makefile: Split and sort tests dc1762113d x86_64: Fix missing wcsncat function definition without multiarch (x86-64-v4) 04b8d48432 x86: Improve large memset perf with non-temporal stores [RHEL-29312] 12fec8aae5 x86/string: Fixup alignment of main loop in str{n}cmp-evex [BZ #32212] 48642ef1a5 elf: Avoid some free (NULL) calls in _dl_update_slotinfo 549e7f7c5a elf: Support recursive use of dynamic TLS in interposed malloc c32fd59314 Fix underallocation of abort_msg_s struct (CVE-2025-0395) 650a0aaaff stdlib: Test using setenv with updated environ [BZ #32588] f984e2d7e8 assert: Add test for CVE-2025-0395 9ca74b8ad1 AArch64: Improve generic strlen 95aa21432c AArch64: Optimize memset 5fe151d86a AArch64: Remove zva_128 from memset 3de5112326 math: Improve layout of expf data 52c2b1556f AArch64: Add SVE memset 097299ffa9 AArch64: Use prefer_sve_ifuncs for SVE memset 5a08d049dc math: Improve layout of exp/exp10 data 3be3728df2 elf: Ignore LD_LIBRARY_PATH and debug env var for setuid for static 454f24e981 support: Use const char * argument in support_capture_subprogram_self_sgid 4335cd9b58 support: Add support_record_failure_barrier 31fa0f73e2 elf: Test case for bug 32976 (CVE-2025-4802) ca41fe44a5 x86_64: Fix typo in ifunc-impl-list.c. ca7e32d024 elf: Fix subprocess status handling for tst-dlopen-sgid (bug 32987) 81f58dd9b7 support: Pick group in support_capture_subprogram_self_sgid if UID == 0 5a6276d97a Fix error reporting (false negatives) in SGID tests 1a0d73a625 pthreads NPTL: lost wakeup fix 2 b5c4727e59 nptl: Update comments and indentation for new condvar implementation 1fa5e51897 nptl: Remove unnecessary catch-all-wake in condvar group switch 44eaf0615d nptl: Remove unnecessary quadruple check in pthread_cond_wait 7625579f11 nptl: Remove g_refs from condition variables 6bac834c5a nptl: Use a single loop in pthread_cond_wait instaed of a nested loop 5765653697 nptl: Fix indentation 8899e89b29 nptl: rename __condvar_quiesce_and_switch_g1 39a80f4035 nptl: Use all of g1_start and g_signals 51210d6496 nptl: PTHREAD_COND_INITIALIZER compatibility with pre-2.41 versions (bug 32786) 879f0ee122 malloc: add indirection for malloc(-like) functions in tests [BZ #32366] a637f2c42f malloc: obscure calloc use in tst-calloc 21019afe65 malloc: cleanup casts in tst-calloc 6a52d5cab0 posix: Fix double-free after allocation failure in regcomp (bug 33185)
6953f19 wireless-regdb: Update regulatory info for Indonesia (ID) for 2025 2e8214e wireless-regdb: Permit 320 MHz bandwidth in 6 GHz band for GB a94f685 wireless-regdb: Update regulatory info for Egypt (EG) for 2024 7628ce2 wireless-regdb: Update regulatory rules for Brazil (BR) on 6GHz 4411b39 wireless-regdb: Update regulatory info for Vietnam (VN) for 2025 490f136 wireless-regdb: Update regulatory info for Estonia (EE) for 2024 c56c663 wireless-regdb: update regulatory rules for Paraguay (PY) on 6 GHz for 2025 5a8ced5 wireless-regdb: Update regulatory info for CEPT countries for 6GHz listed by WiFi Alliance 5fd8ee3 wireless-regdb: update regulatory rules for Bosnia and Herzegovina (BA) for 6 GHz e05260a wireless-regdb: update regulatory database based on preceding changes
Petr Štetiar [Mon, 9 Jun 2025 15:44:44 +0000 (15:44 +0000)]
busybox: fix login applet on selinux
Currently the system boots up, but is unusable because pressing enter
does not provide login with error:
login: can't get SID for root
This is happenning, because login.c passes the Linux username directly
to get_default_context(), while libselinux expects an SELinux user
identity, causing the call to fail for users without a matching SELinux
name (e.g., root) and aborting login on SELinux-enabled systems.
Leo Barsky [Thu, 24 Jul 2025 12:12:33 +0000 (12:12 +0000)]
kernel: bump 6.6 to 6.6.100
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.100
Manually refreshed:
823-v6.12-0003-nvmem-layouts-add-U-Boot-env-layout.patch
All other patches auto-refreshed.
Felix Fietkau [Wed, 23 Jul 2025 09:53:02 +0000 (11:53 +0200)]
udebug: update to Git HEAD (2025-07-23)
5d10084ea885 lib-ucode.c: add #define _GNU_SOURCE a95364b41d52 udebug-cli: fix terminating uloop c00eb9b685a8 ucode: use FILE handle for pcap output 4265167cb6e8 ucode: add error reporting to pcap_write 4a908ee731a6 udebug-cli: stop event loop on write failure 6e04f4187231 ucode: use ucv_resource_create_ex for remote rings c297f04e1852 ucode: drop use ucv_resource_create f207d37a1055 ucode: add support for specifying ring format 98683a94bcdd ucode: support appending array data, similar to socket.send() a7ecd483ed38 ucode: allow calling udebug.init() multiple times d4a4c788c416 ucode: fix allocation size of local ring meta 184706abaf50 ucode: add timestamp argument to foreach() 8442c948c193 ucode: add function for getting ring information f4958a4c591a ucode: add const entries for enum udebug_format 14d4fec36993 udebug-cli: add logstream command 6ed8536142bb ucode: fix entries/size confusion
Felix Fietkau [Tue, 22 Jul 2025 09:58:15 +0000 (11:58 +0200)]
toolchain/gcc: prevent the use of LDRD/STRD on ARMv5TE
These instructions are for 64-bit load/store. On ARMv5TE, the CPU
requires addresses to be aligned to 64-bit. When misaligned, behavior is
undefined (effectively either loads the same word twice on LDRD, or
corrupts surrounding memory on STRD).
On ARMv6 and newer, unaligned access is safe.
Removing these instructions for ARMv5TE is necessary, because GCC
ignores alignment information in pointers and does unsafe optimizations
that have shown up as bugs in various places.
This patch was originally added more than 11 years ago in commit b050f87d13b5,
but got lost 6 years ago, when gcc 9.1 was added in 88c07c655262.
This primarily affects the kirkwood and ixp4xx targets
**Huasifei WH3000 Pro**
Portable Wi-Fi 6 travel router based on MediaTek MT7981A SoC. MT7981B+MT7976CN+RTL8221B Dual Core 1.3GHZ with 5G modems module and PWM Fan.
**Specifications**
SoC: Filogic 820 MT7981A (1.3GHz)
RAM: DDR4 1GB
Flash: eMMC 8GB
WiFi: 2.4GHz and 5GHz with 3 antennas
Ethernet:
1x WAN (10/100/1000M)
1x LAN (10/100/1000/2500M)
USB: 1x USB 3.0 port
Two buttons: power/reset and mode (BTN_0)
LEDS: blue, red, blue+red=pink
UART: 3.3V, TX, RX, GND / 115200 8N1
**Installation via U-Boot rescue**
1. Set static IP 192.168.1.2 on your computer and default route as 192.168.1.1
2. Connect to the WAN port and hold the reset button while booting the device.
3. Wait for the LED to blink 5 times, and release the reset button.
4. Open U-boot web page on your browser at http://192.168.1.1
5. Select the OpenWRT sysupgrade image, upload it, and start the upgrade.
6. Wait for the router to flash the new firmware.
7. Wait for the router to reboot itself.
**Installation via sysupgrade**
Just flash sysupgrade file via [LuCI upgrade page](http://192.168.1.1/cgi-bin/luci/admin/system/flash) without saving the settings.
**Installation via SSH**
Upload the file to the router `/tmp` directory, `ssh root@192.168.1.1` and issue a command:
```
sysupgrade -n /tmp/openwrt-mediatek-filogic-huasifei_wh3000-pro-squashfs-sysupgrade.bin
```
**Factory MAC**
You can find your Factory MAC which is mentioned on the box at `/dev/mmcblck0p2` partition `factory` starting from `0x4`
```
dd if=/dev/mmcblk0p2 bs=1 skip=4 count=6 | hexdump -C
```
Fixed `green` to `blue` LED in dts, added `SUPPORTED_DEVICES += huasifei,fudy-pro` - to make sysupgrade compatible with factory QWRT/Lede fork firmware.
MAC address
-----------
+-----------+-------------------+-----------+
| Interface | MAC | Algorithm |
+-----------+-------------------+-----------+
| WLAN 2.4G | B0:38:6C:xx:xx:xx | label |
| WLAN 5G | B2:38:6C:4x:xx:xx | |
| WAN | B0:38:6C:xx:xx:xx | label + 1 |
| LAN | B0:38:6C:xx:xx:xx | label + 3 |
+-----------+-------------------+-----------+
The WLAN 2.4G MAC address was found in 'Factory' partition, 0x4
Installation
------------
1. Download the *initramfs-kernel.bin file from the OpenWrt website
2. Attach UART to the router, and interrupt the boot process by pressing '0'
If you successfully interrupt the boot process, a terminal prompt
name should look like this:
MT7981>
3. Connect the router(LAN port) to the PC
4. Assign the PC IP address: 192.168.0.100/24
5. Load and run the *initramfs-kernel.bin:
tftpboot 0x46000000 initramfs-kernel.bin
bootm
6. Upload the OpenWrt *squashfs-sysupgrade.bin to the router
7. Run 'sysupgrade -n' with the sysupgrade OpenWrt image
Tim Harvey [Wed, 16 Jul 2025 16:09:34 +0000 (09:09 -0700)]
uboot-envtools: add support for Gateworks venice
Add uboot-envtools support for Gateworks venice boards based on i.MX8M
SoC's (imx_cortexa53) which boot from and store their U-Boot env on
eMMC boot0 hardware partition.
Felix Fietkau [Tue, 1 Jul 2025 18:48:14 +0000 (20:48 +0200)]
ubus: update to Git HEAD (2025-07-02)
27839f854a58 ubusd: make txq_len field signed b35b2bc63e8e ubusd: treat EACCES on write like EAGAIN 713e9d19b2b6 ubusd: retry write on EINTR 8bb523ab20e0 ubusd: fix txq_len accounting b1b783c74742 ubusd: add another tx attempt on enqueueing the first message for a client 5952b48e251c ubusd: do not call socket callback from ubus_msg_send
Mbed TLS 3.6 is a long-term support (LTS) branch. It will be supported with bug-fixes and security fixes until at least March 2027.
Security Advisories
For full details, please see the following links:
Race condition in AESNI support detection [1]
Heap buffer under-read when parsing PEM-encrypted material [2]
Unchecked return value in LMS verification allows signature bypass [3]
Out-of-bounds read in mbedtls_lms_import_public_key() [4]
Timing side-channel in block cipher decryption with PKCS#7 padding [5]
NULL pointer dereference after using mbedtls_asn1_store_named_data() [6]
Misleading memory management in mbedtls_x509_string_to_names() [7]
Installation:
Cudy has distributed intermediate firmware to make installation easier
1. Go to [Cudy CN official website](https://www.cudy.com/zh-cn/pages/download-center/tr3000-1-0) and download the intermediate firmware
2. Upgrade the intermediate firmware on the page
3. Visit the intermediate firmware 192.168.1.1 webpage and use the sysupgrade image to update
other:
If you fail to flash the device, you can use TFTP to flash back to the original firmware.
1. Ask Cudy CN official customer service for the original firmware
2. With the router off, press the RESET button. While the router is turning on, the button should continue to be pressed for at least 5 seconds.
3. A u-boot shell will automatically open.
4. Connect to LAN and set your IP to 192.168.1.88/24. Configure a TFTP server and an recovery.bin firmware file.
Valeriy Manzhos [Sun, 15 Jun 2025 10:08:29 +0000 (13:08 +0300)]
ath79: enable USB by default on hAP ac
Due to a bug, USB is not powered on after boot on hAP ac.
This prevents extroot configurations from working as overlayfs is mounted
before USB device can be powered on. This commit fixes this by enabling USB
in devicetree.
Related discussion links:
- https://forum.openwrt.org/t/usb-power-is-off-on-boot/229007
---
Extroot configuration requires the USB to be powered on before
preinit_main/80_mount_root. Probably the simplest approach is to enable
it in the devicetree. Another approach would be to add a script into
/lib/preinit that will power on USB via /sys/class/gpio/usb-power/value
E.g.
cat /lib/preinit/79_power_on_usb
do_power_on_usb(){
echo '1' > /sys/class/gpio/usb-power/value
}
boot_hook_add preinit_main do_power_on_usb
Tianling Shen [Thu, 19 Jun 2025 14:16:34 +0000 (22:16 +0800)]
mediatek: add ubootmod layout for cudy tr3000 v1
This allows us to use the full size of nand, which increases ubi size
from 64M to 122.25M.
If you are at factory firmware, please refer commit 63b8d98dd0d2 ("mediatek: add support for Cudy TR3000 v1")
to boot into OpenWrt initramfs (stock layout).
Flash instructions:
1. Login into the device and backup everything, especially 'Factory' part.
1. Unlock mtd partitions:
opkg update && opkg install kmod-mtd-rw
insmod mtd-rw i_want_a_brick=1
3. Write new BL2 and FIP
mtd write openwrt-mediatek-filogic-cudy_tr3000-v1-ubootmod-preloader.bin BL2
mtd write openwrt-mediatek-filogic-cudy_tr3000-v1-ubootmod-bl31-uboot.fip FIP
4. Set static IP on your PC:
IP 192.168.1.254/24, GW 192.168.1.1
5. Serve OpenWrt initramfs image using TFTP server.
6. Cut off the power and re-engage, wait for TFTP recovery to complete.
7. After OpenWrt has booted, perform sysupgrade.
Marius Durbaca [Tue, 22 Oct 2024 13:15:57 +0000 (16:15 +0300)]
mediatek: add support for Zbtlink ZBT-Z8102AX v2
Specifications:
SoC: MediaTek MT7981B
RAM: 1024MiB
Flash: SPI-NAND 128 MiB
Switch: 1 WAN, 4 LAN (Gigabit)
USB: two M.2 slots for 5G modems via USB 3.0 hub, external USB 3.0 port
Buttons: Reset, Mesh
Power: DC 12V 1A
WiFi: MT7976CN
UART: 115200n8
UART Layout:
VCC-RX-TX-GND
Installation:
1. Power down the router and hold in the Reset button.
2. While holding in the button power up the router again.
3. Hold the button in for 10 seconds and then release.
4. Use your browser to go to 192.168.1.1
5. If you see a GUI that is for flashing firmware then you have the V2 model.
If there is no GUI and the router continues to boot up normally
you have the V1 model.
6. Now use the V2 sysugrade file.
Note: Recovery GUI it can be used to recover from an incorrect firmware flash.
Based on patches adding support for this device by Yannick Chabanois (openmptcprouter)
and Dairyman (ofmodemsandmen)
Tim Harvey [Thu, 19 Jun 2025 21:32:11 +0000 (14:32 -0700)]
imx: venice: add dt overlay support
Enable DT overlay support:
- add dt-overlay to board features
- add DEVICE_DTS_OVERLAYS
- update the boot script to resize before applying each overlay
Tim Harvey [Thu, 19 Jun 2025 23:58:11 +0000 (16:58 -0700)]
imx: kernel: backport additional upstream patches
Backport some additional upstream patches to resolves some issues when using
dt overlays on gw72xx-0x and gw73xx-0x:
- 6.13-arm64-dts-imx8mm-venice-gw73xx-remove-compatible-in-overlay-files.patch
- 6.12-arm64-dts-imx8mm-venice-gw72xx-remove-compatible-in-overlay-files.patch
ramips: mt7621: include uboot-envtools in some missed devices
Add uboot-envtools (removing -uboot-envtools) to devices which were
missed in the commit 79bd017 ("ramips: mt7621: add uboot-envtools to
all devices")
- Mi Router 3G
- Mi Router AC2100
While at here remove two redundant entries from devices which were added
just after the referenced commit 79bd017 and did not account for the
new DEFAULT_PACKAGES member:
Josef Schlehofer [Fri, 13 Jun 2025 14:32:45 +0000 (16:32 +0200)]
perf: disable slang support
libs/slang2 is getting picked up from the packages feed, if the slang2
is compiled first and then if you try to compile perf, it fails
due to unmet dependency.
Fixes:
Package perf is missing dependencies for the following libraries:
libslang.so.2
MAC Addresses in OEM firmware:
- There is one on the label, e.g. AA:BB:CC:DD:EE:FF
- WLAN (2.4G) uses the same as on the label
- WLAN (5G) is the one on the label but
- first byte (e.g. AA) + 2
- fourth byte (e.g. DD) - 0x40
- WAN is the one on the label + 1
- LAN is the one on the label
MAC Addresses in OpenWrt:
- Same handling as in WR3000s is used
GPIO:
- 2 Buttons (all low active):
- WPS on GPIO 0
- Reset on GPIO 1
- 6 LEDs (all low active):
- Power: Blue on GPIO 8, no red LED
- WPS: Blue on GPIO 10, Red on GPIO 4
- Internet: Blue on GPIO 11, no red LED
- LAN: Blue on GPIO 9, Red on GPIO 5
- WiFi 2.4G: Blue on GPIO 6, no red LED
- WiFi 5G: Blue on GPIO 7, no red LED
Disassembly:
- Remove the 4 screws at the bottom of the case
- Cover is clipped to the bottom part of the case with clips in the front and the back
UART:
- UART pins are accessible on the bottom of the board
- The connector with the square shape is TX
- Pins: [ ] TX, ( ) RX, ( ) GND, ( ) VCC
- Settings: 115200 8N1 3.3V
Migration to OpenWrt via OEM firmware:
- There should be a migration image available from Cudy as soon as there is official OpenWrt support
- Download the migration image via OEM web interface
- After flashing, OpenWrt is accessible via 192.168.1.1
- Flash the official OpenWrt image
Migration to OpenWrt using TFTP:
- Connect UART as described above
- Press the reset button while powering on the device
- U-Boot will now try to load a recovery.bin via TFTP, this must be ignored
- After detecting a timeout, the U-Boot console is available via UART
- Set up a TFTP server on IP 192.168.1.88 and connect it to one of the LAN ports
- Provide the initramfs image via TFTP as cudy3000e.bin
- Run the following command in U-Boot: tftpboot 0x46000000 cudy3000e.bin; bootm 0x46000000
- OpenWrt initramfs image is now booting and accessible via 192.168.1.1
- Flash the sysupgrade image
Revert back to OEM:
- Set up a TFTP server on IP 192.168.1.88 and connect it to one of the LAN ports
- Provide the Cudy firmware via TFTP as recovery.bin
- Press the reset button while powering on the device
- Recovery process will start now
- After recovery is done, the OEM firmware is available at 192.168.10.1 again
Roland Reinl [Sun, 27 Apr 2025 11:43:40 +0000 (13:43 +0200)]
mediatek: Create common DTSI for WR3000H and WR3000S
This change moves common elements of the WR3000H and the WR3000S to mt7981b-cudy-wr3000-nand.dtsi.
This will simplify adding of new similar devices, for exapmle WR3000E.
mediatek: filogic: fix 2.5G phy compatible for WR3000H
Following the initial support of the Cudy WR3000H with PHY C22 for the 2.5G WAN
interface, several improvements fixing issues with RealTek RTL8221B PHYs have
been merged.
Therefore we can now bring the DT in line with other equipment and declare the
2.5G WAN PHY as C45.
The manufacturer Cudy usually releases signed openwrt firmware, to
facilitate the migration from the proprietary version to the official
versions of openwrt. In contact with the manufacturer tells me that only
releases the firmware of the WR3000H if and only if
there is an official version. With this proposal I pretend to have an
initial operative version so that they do their part, and facilitate to
the users the possibility of using openwrt. In the present state, it is
only possible to use this firmware by uploading and installing it with
UART connection.
AX3000 2.5G Dual Band Wi-Fi 6 Mesh Router (WR3000H)
MAC:
LAN MAC: label mac
WAN MAC: label mac + 1
2.4G MAC: label mac
5G MAC: label mac + 1 with LA bit set
Installation
------------
1. Connect to the serial port as described in the "Hardware" section.
2. Power on the device + press reset pin. Keep pressing reset pin to
enter the U-Boot shell (The recovery.bin image load process must fail).
3. Download the OpenWrt initramfs image. Place it on an TFTP server
connected to the Cudy LAN ports. Make sure the server is reachable at
192.168.1.88. Rename the image to "cudy3000h.bin"
5. IMPORTANT: Make backup from original firmware. System -> Backup
/Flash Firmware -> Save mtdblock contents. All mtdblock one by one,
keep unaltered (BL2, u-boot-env, Factory, bdinfo, FIP, and ubi).
6. Transfer the OpenWrt sysupgrade image to the device using scp.
Install with sysupgrade.
Warning for BL2 and U-BOOT developers
-------------------------------------
The nand partition layout from vendor is slightly diferent from "standard".
The FIP partition starts at 0x3c0000 be carefull with BL2 to BL31.
The UBI partition start at 0x5c0000 be carefull.
DO NOT OVERWRITE bdinfo partition it contains hardware MAC definition
Layout is start-end (not start size)
- 0x000000000000-0x000007800000 : "nmbm0"
- 0x000000000000-0x000000100000 : "bl2"
- 0x000000100000-0x000000180000 : "u-boot-env"
- 0x000000180000-0x000000380000 : "factory"
- 0x000000380000-0x0000003c0000 : "bdinfo"
- 0x0000003c0000-0x0000005c0000 : "fip"
- 0x0000005c0000-0x0000045c0000 : "ubi"
ALLWAYS for U-BOOT operations check this
setenv mtdids nmbm0=nmbm0
setenv mtdparts nmbm0:1024k(bl2),512k(u-boot-env),2048k(factory),256k(bdinfo),2048k(fip),65536k(ubi)
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
Stijn Tintel [Mon, 24 Mar 2025 22:20:32 +0000 (00:20 +0200)]
include/trusted-firmware-a.mk: support LTS releases
TF-A LTS releases have an lts- prefix in their version tag. Introduce a
PKG_LTS variable to support these.
As the non-LTS tarbals do not contain the version prefix in the
directory, we need different PKG_BUILD_DIR for each variant:
➜ tar --list --file dl/trusted-firmware-a-v2.12.tar.gz | head -n1
trusted-firmware-a-2.12/
➜ tar --list --file dl/trusted-firmware-a-lts-v2.12.1.tar.gz | head -n1
trusted-firmware-a-lts-v2.12.1/
Multiple users have reported a regression [1] in OpenWRT 24.10 with the
ramips/mt7621 target, which has the MT7530 PHYs: the Ethernet link is
periodically going down for a brief period of time:
mt7530-mdio mdio-bus:1f lan1: Link is Down
br-lan: port 1(lan1) entered disabled state
mt7530-mdio mdio-bus:1f lan1: Link is Up - 1Gbps/Full - flow control rx/tx
The symptoms stop after disabling EEE and it was reported by Mediatek in
2021 that EEE is unstable for the MT7530 PHYs [2]:
> EEE of the 10-year-old MT7530 internal gephy has many IOT problems, so
> it is recommended to disable its EEE.
EEE is enabled by default for these devices in OpenWRT 24.10 whereas in the
previous version (OpenWRT 23.05, Linux 5.15) it was not. It was determined
that in Linux 6.6, the PHY driver tries to disable EEE in
mtk_gephy_config_init() in drivers/net/phy/mediatek-ge.c, but this is later
overridden by a subsequent execution of the genphy_c45_write_eee_adv()
function, which enables every EEE mode supported.
The best way forward for now seems to be to mark EEE as broken directly in
the devicetree, which affects the genphy_c45_write_eee_adv() function.
There are some devices, like GnuBee GB-PC2, that define additional PHYs,
for example ethernet-phy@5 or ethernet-phy@7. As reported by Chester A.
Unal, these are not MT7530 PHYs and they are not affected.
This would need to be cherrypicked for the OpenWRT 24.10 branch.
Robert Marko [Sat, 7 Jun 2025 09:53:48 +0000 (11:53 +0200)]
netifd: update to Git HEAD (2025-05-23)
61ae5732adea iprule: amend ipproto netlink nla_put_u32 to nla_put_u8 d610d68c71b8 device: add support for configuring vrf a1b6386a20a6 device: fix bonding primary port selection e8bbf246ce2e system-linux: fix sysfs name for all_ports_active flag 723c699e84f4 Restore disable_ipv6 sysctl after removing a device from bridge or bond d476e18e8d43 iprule: resolve ipproto by name 7901e66c5f27 netifd: iprule add sport and dport
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
Nick Hainke [Fri, 13 Jun 2025 12:32:47 +0000 (14:32 +0200)]
ipq-wifi: add missing dependency on TARGET_ath79
A previous commit backported the ipq-wifi update to fix support for the
TP-Link Archer C6 v2 by adding the device to the package. However, it
missed adding the required TARGET_ath79 dependency, causing the
ipq-tplink_archer-c6-v2 build to fail.
The dependency was previously added in commit 4990ce613b7d ("ipq-wifi:
update to 2024-02-17") when several ath79 devices were introduced.
However, since this backport only fixes support for the Archer C6 v2, it
is not feasible to backport all related changes. Therefore, this commit
adds only the missing dependency to resolve the build issue without
pulling in unrelated updates.
Fixes: 0c43acc349a7 ("ipq-wifi: update to Git HEAD (2025-05-30)") Signed-off-by: Nick Hainke <vincent@systemli.org> Link: https://github.com/openwrt/openwrt/pull/19120 Signed-off-by: Robert Marko <robimarko@gmail.com>
Felix Fietkau [Sun, 11 May 2025 13:25:54 +0000 (15:25 +0200)]
ucode: update to Git HEAD (2025-05-11)
567207a9bf16 fs: implement fileno() on directory handles eb1d93235509 fs: support passing directory handle or fd in chdir() 38a2254337f1 build: detect whether toolchain employs default source fortification 6eddfc9dff17 resolv: fix fd leak in send_queries 3d36856b2dc5 uci: fix memory leak on cursor() error aafde95f1ecf uci: add cursor() flags argument d8cebc5a6bfd Revert "WIP: lib: support map() over objects" 2599cf80736b zlib: incorporate latest PR changes 830f316a7e49 socker: let sock.peercred() clear error on success 4cbac141406e types: rename u64_to_constant flag to ext_flag d802fe5da5cd types: add support for resources with embedded data/values 71b4fdc6f60b types: add support for setting resource persistent flag 141f799eba08 uloop: use container_of instead of direct pointer casts 1396f8f2988d uloop: use uc_fn_thisval 9a121fc7440c uloop: drop object_registry 11b804d97086 socket: do not clear last_error in socket.error() d5b3a9dc1091 socket: add strerror() method
Fixes: https://github.com/jow-/ucode/issues/285 Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 2a9316fbfb6e123e0d2672a9726dc752c7f6dbdd)
The ENC28J60 is a 10 Mbps half-duplex Ethernet controller interfaced via SPI.
It achieves real-world bandwidth up to 5Mbit/s on devices like the RPi Zero due
to SPI limits.
Commonly used with Raspberry Pi Zero boards for wired network connectivity.
Georgi Valkov [Mon, 14 Apr 2025 13:07:25 +0000 (16:07 +0300)]
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:
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
Georgi Valkov [Mon, 14 Apr 2025 12:28:23 +0000 (15:28 +0300)]
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:
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
Eric Fahlgren [Fri, 6 Jun 2025 23:43:27 +0000 (16:43 -0700)]
package: rework contents of package index.json
Rework the generation of the index.json version of the package
indexes to match the original intent (i.e., for use by the ASU
server and other downstream projects). The current file contains
package names that have ABI versioning, making them unusable by ASU,
so we now remove the ABI suffixes.
Also adds a 'version' field to the json, so downstream utilities
can detect the new semantics of the package name fields.
Paul Donald [Wed, 26 Mar 2025 17:43:45 +0000 (18:43 +0100)]
lldpd: enable hardware inventory information (TLV) management
lldpd can send several hardware inventory TLV fields. Extend the init
script to provide these when the existing flag 'lldpmed_no_inventory' is
disabled. Five new methods provide default values for some of them,
taken from /etc/os-release and /etc/board.json.
There is no homogeneous method to determine the hardware serial number,
so it can be provided manually, as can asset ID.
Note: properties >= 32 characters are truncated at send time (by lldpd),
and some (Cisco) equipment displays junk after strings >= 32 characters.
So truncate to 31.
Tested on: 24.10.0 (known compatible with 22 and 23 also)
Since the early beginning of the Realtek DSA driver there is an uncovered
locking issue between the standard (parent) mdio bus and the DSA (child)
mdio bus. This comes from the fact that the DSA bus simply links to the
parent read and write functions and calls them directly. This leads to
the following lock issue.
- Child bus calls phy_read/write functions and uses its internal lock
- Parent bus calls phy_read/write functions and uses its internal lock
It becomes clear that critical section can be accessed twice without
knowing that a operation from the other bus is currently active. This
can lead to critical malfunctions because the mdio driver needs a lot of
internal magic to get page selection done right. Effects are:
- The original page is lost after a phy_write/read_paged() call
- dmesg like "Realtek RTL8218B (external) rtl838x slave mii-0:00:
Expected external RTL8218B, found PHY-ID 6b23"
Other DSA drivers simply use the read/write functions from the parent bus
and thus avoid locking issues. Do it the same way.
realtek: refactor net rx interrupt handler rtl83xx_net_irq()
Cleanup the code of the RTL83xx packet receive interrupt handler. Not
only for better readability but to avoid inconsistencies and stalls on
the RTL839x targets.
The current implementation seems to come from the GPL source code.
Calling the existing cleanup() function inside the interrupt context
without any locks conflicts with SMP & NAPI polling and makes things
worse instead of giving any benefit. Simply ignore RX buffer overruns
and let the device handle packet dropping itself.
The RTL8214FC currently uses generic PHY functions. That makes it look like a copper
device. Switching to/from fibre works fortunately but the autonegotiation handling
still works on MII_LPA (PHY register 5) as if a copper link is used. Fix that by
- advertising a superset of TP/FIBRE features
- using clause 37 functions when on fibre
Additionally enhance the code of the driver to assist further development.
- log the speed of the inserted module to detect wrongly inserted 10gbase-r modules
- order phy driver functions alphabetically (keep match/name on top)
- remove genphy_loopback as the kernel uses it if not provided
Remark! The driver internally uses PORT_MII for the TP port. Align with that and
report MII to ethtool instead of TP. Other drivers do the same and it can be
changed in the future if needed.
The Arcadyan WE410443 is a WiFi AC access point distributed by various ISPs
under various names, including KPN SuperWifi and BT Whole Home Wi-Fi. It
features one ethernet port, dual MT7615N radios and four internal antennas.
Installation:
The bootloader is locked with a password, so the image needs to be written
directly to the SPI flash chip. To do this, you need to open up the case,
remove the heatsink and connect the flash chip to a Raspberry Pi. Use the
following connections:
You can solder wires to the flash chip, or use a SOIC16 clip. More details on
the Raspberry Pi and SPI chip pinouts are available on the wiki [1]
When you have the Raspberry Pi connected to the flash chip, boot your Pi and
follow the instructions:
1) Make sure your Pi has SPI enabled with sudo raspi-config
Antti Seppälä [Sat, 10 May 2025 10:54:56 +0000 (13:54 +0300)]
qmi: increase SIM power-cycle timeouts
Some modems and SIM cards take a bit longer to initialize after UIM has been
powered off. Waiting too little time can cause the qmi protocol to end up
in a loop repeatedly power-cycling the SIM card.
Avoid that by
a) increasing the time we unconditionally sleep after --uim-power-on
b) increasing the time we allow uqmi to wait for response for --uim-get-sim-state