From ed3f84e091a29ccf743b8d28db12dc443c3c6dbe Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Mon, 3 Nov 2025 17:03:07 -0300 Subject: [PATCH 01/27] wifi-scripts: ucode: fix hostapd_bss_options The raw option inside 'config wifi-iface' is called hostapd_bss_options, not hostapd_options. Signed-off-by: Eneas U de Queiroz Link: https://github.com/openwrt/openwrt/pull/20657 Signed-off-by: Christian Marangi --- .../config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc index 6c2309e626..f35761c616 100644 --- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc +++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc @@ -502,7 +502,7 @@ export function generate(interface, data, config, vlans, stas, phy_features) { } /* raw options */ - for (let raw in config.hostapd_options) + for (let raw in config.hostapd_bss_options) append_raw(raw); if (config.mlo) { From f84371ddb5163f38bd0a5fb390522455cbff7cec Mon Sep 17 00:00:00 2001 From: Harshal Gohel Date: Mon, 14 Apr 2025 13:16:47 +0000 Subject: [PATCH 02/27] realtek: rtl930x: Add support for Plasma Cloud MCX3 Media Converter The Plasma Cloud MCX3 Media Converter is a 3 port multi-GBit switch with 2x 10/100/1000/2500BaseT Ethernet ports and 1x SFP+ module slot. Hardware: - RTL9302C SoC - Macronix MX25L25645G (32MB flash) - Winbond W632GU6rB-11 (256MB DDR3 SDRAM) - RTL8224 4x 10m/100m/1/2.5 Gigabit PHY - IC+ IP802AR POE+ PSE controller The media converter is powered by 54 Volts 1.2A barrel connector. The internal TTL serial connector can be used to access the terminal. Pins from 1: TX RX (unused) GND. Serial connection is via 115200 baud, 8N1. A reset button is accessible through a hole next to the SFP+ module slot. Installation ------------ * The device can be flashed by using sysupgrade command. Either from the original vendor firmware or using an initramfs (see "Debug") * Connect serial as per the layout above. Connection parameters: 115200 8N1 * The image must be copied using scp to /tmp of the device scp openwrt-realtek-rtl930x-plasmacloud_mcx3-squashfs-sysupgrade.bin root@[IP address of the device]:/tmp/ * start sysupgrade without saving the original vendor configuration sysupgrade -n /tmp/openwrt-realtek-rtl930x-plasmacloud_mcx3-squashfs-sysupgrade.bin Installation via u-boot ----------------------- If you have an TFTP server connected to the switch, it is possible to directly install the device using the factory image from u-boot # setup networking and IP of TFP server rtk network on setenv ipaddr 10.100.100.99 setenv serverip 10.100.100.20 # get factory image tftp 0x84000000 factory.bin # erase firmware partitions sf probe 0 sf erase 0x100000 0x01f00000 # write firmware to both partitions sf write ${fileaddr} 0x100000 ${filesize} sf write ${fileaddr} 0x1080000 ${filesize} # adjust the boot commands setenv bootargs "mtdparts=spi0.0:896k(u-boot),64k(u-boot-env),64k(u-boot-env2),15872k(inactive),15872k(firmware2)" setenv bootcmd "rtk init; bootm 0xb5080000" # restart reset Debug ----- * Connect serial as per the layout above. Connection parameters: 115200 8N1. * A tftp server is required, tftpd-hpa works well. * Power the device, at U-Boot start rapidly hit Esc key to stop autoboot * Enable network: rtk network on * Change ip address of device: setenv ipaddr 192.168.1.6 * Download initramfs from TFTP server: tftpboot 0x84000000 192.168.1.111:openwrt-realtek-rtl930x-plasmacloud_mcx3-initramfs-kernel.bin * Boot loaded file: bootm 0x84000000 Signed-off-by: Harshal Gohel Signed-off-by: Sven Eckelmann Link: https://github.com/openwrt/openwrt/pull/20625 Signed-off-by: Robert Marko --- .../realtek/base-files/etc/board.d/02_network | 1 + .../base-files/lib/upgrade/platform.sh | 1 + .../upgrade/upgrade_dualboot_plasmacloud.sh | 2 + .../realtek/dts/rtl9302_plasmacloud_mcx3.dts | 210 ++++++++++++++++++ target/linux/realtek/image/rtl930x.mk | 6 + 5 files changed, 220 insertions(+) create mode 100644 target/linux/realtek/dts/rtl9302_plasmacloud_mcx3.dts diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network index d5d60f6936..5a9757969a 100644 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -68,6 +68,7 @@ realtek_setup_macs() lan_mac_end=$(macaddr_add $lan_mac $((mac_count2-mac_count1))) ;; plasmacloud,esx28|\ + plasmacloud,mcx3|\ plasmacloud,psx8|\ plasmacloud,psx10|\ plasmacloud,psx28) diff --git a/target/linux/realtek/base-files/lib/upgrade/platform.sh b/target/linux/realtek/base-files/lib/upgrade/platform.sh index 3893aeffe7..b293a4d673 100644 --- a/target/linux/realtek/base-files/lib/upgrade/platform.sh +++ b/target/linux/realtek/base-files/lib/upgrade/platform.sh @@ -28,6 +28,7 @@ platform_do_upgrade() { case "$board" in plasmacloud,esx28|\ + plasmacloud,mcx3|\ plasmacloud,psx8|\ plasmacloud,psx10|\ plasmacloud,psx28) diff --git a/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh b/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh index e07c1d6330..14975dcfcd 100644 --- a/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh +++ b/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh @@ -4,6 +4,7 @@ set_boot_part() { local board=$(board_name) case "$board" in + plasmacloud,mcx3|\ plasmacloud,psx8|\ plasmacloud,psx10) if [ "$part_num" = "1" ]; then @@ -70,6 +71,7 @@ platform_do_upgrade_dualboot_plasmacloud() { # identify "inactive" slot id based on the expected partition id # of the primary ("firmware1") slot case "$(board_name)" in + plasmacloud,mcx3|\ plasmacloud,psx8|\ plasmacloud,psx10) primary_firmware_mtd=3 diff --git a/target/linux/realtek/dts/rtl9302_plasmacloud_mcx3.dts b/target/linux/realtek/dts/rtl9302_plasmacloud_mcx3.dts new file mode 100644 index 0000000000..36e017bc37 --- /dev/null +++ b/target/linux/realtek/dts/rtl9302_plasmacloud_mcx3.dts @@ -0,0 +1,210 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/dts-v1/; + +#include "rtl930x.dtsi" + +#include +#include +#include + +/ { + compatible = "plasmacloud,mcx3", "realtek,rtl9302-soc"; + model = "Plasma Cloud MCX3"; + + chosen { + /* get active mtdparts from u-boot */ + /delete-property/ bootargs; + }; + + aliases { + led-boot = &led_power; + led-running = &led_power; + led-failsafe = &led_power; + led-upgrade = &led_power; + label-mac-device = ðernet0; + }; + + memory@0 { + reg = <0x0 0x10000000>; + }; + + keys { + compatible = "gpio-keys"; + + mode { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + i2c0: i2c-gpio0 { + compatible = "i2c-gpio"; + #address-cells = <1>; + #size-cells = <0>; + + sda-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; + scl-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; + + i2c-gpio,delay-us = <5>; /* ~100 kHz */ + }; + + + sfp0: sfp-lan3 { + compatible = "sff,sfp"; + i2c-bus = <&i2c0>; + los-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio0 12 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio0 22 GPIO_ACTIVE_HIGH>; + }; + + leds { + compatible = "gpio-leds"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinmux_disable_sys_led>; + + led_power: led-0 { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + led-1 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + default-state = "on"; + linux,default-trigger = "heartbeat"; + }; + }; + + led_set@0 { + compatible = "realtek,rtl9300-leds"; + active-low; + + led_set0 = <(RTL93XX_LED_SET_10G | RTL93XX_LED_SET_5G | + RTL93XX_LED_SET_2P5G | RTL93XX_LED_SET_1G | + RTL93XX_LED_SET_100M | RTL93XX_LED_SET_10M | + RTL93XX_LED_SET_LINK | RTL93XX_LED_SET_ACT)>; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0xe0000>; + read-only; + }; + + partition@e0000 { + label = "u-boot-env"; + reg = <0xe0000 0x10000>; + + nvmem-layout { + compatible = "u-boot,env"; + + macaddr_ubootenv_ethaddr: ethaddr { + #nvmem-cell-cells = <1>; + }; + }; + }; + + partition@f0000 { + label = "u-boot-env2"; + reg = <0xf0000 0x10000>; + }; + + partition@100000 { + label = "firmware1"; + reg = <0x100000 0xf80000>; + compatible = "openwrt,uimage", "denx,uimage"; + openwrt,ih-magic = <0x93000000>; + }; + + partition@1080000 { + label = "firmware2"; + reg = <0x1080000 0xf80000>; + compatible = "openwrt,uimage", "denx,uimage"; + openwrt,ih-magic = <0x93000000>; + }; + }; + }; +}; + +ðernet0 { + nvmem-cells = <&macaddr_ubootenv_ethaddr 0>; + nvmem-cell-names = "mac-address"; +}; + +&mdio_bus0 { + /* External RTL8224 PHY */ + phy0: ethernet-phy@0 { + reg = <0>; + compatible = "ethernet-phy-ieee802.3-c45"; + rtl9300,smi-address = <0 0>; + }; + + phy1: ethernet-phy@1 { + reg = <1>; + compatible = "ethernet-phy-ieee802.3-c45"; + rtl9300,smi-address = <0 1>; + }; +}; + +&switch0 { + ports { + #address-cells = <1>; + #size-cells = <0>; + + SWITCH_PORT_SDS(0, 2, 2, 10g-qxgmii) + SWITCH_PORT_SDS(1, 1, 2, 10g-qxgmii) + + port@26 { + reg = <26>; + label = "lan3"; + pcs-handle = <&serdes8>; + phy-mode = "1000base-x"; + sfp = <&sfp0>; + led-set = <0>; + managed = "in-band-status"; + + nvmem-cells = <&macaddr_ubootenv_ethaddr 3>; + nvmem-cell-names = "mac-address"; + }; + + /* CPU-port */ + port@28 { + ethernet = <ðernet0>; + reg = <28>; + phy-mode = "internal"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; + +&port0 { + nvmem-cells = <&macaddr_ubootenv_ethaddr 2>; + nvmem-cell-names = "mac-address"; +}; + +&port1 { + nvmem-cells = <&macaddr_ubootenv_ethaddr 1>; + nvmem-cell-names = "mac-address"; +}; diff --git a/target/linux/realtek/image/rtl930x.mk b/target/linux/realtek/image/rtl930x.mk index b7df216fdb..038e232de7 100644 --- a/target/linux/realtek/image/rtl930x.mk +++ b/target/linux/realtek/image/rtl930x.mk @@ -30,6 +30,12 @@ define Device/plasmacloud-common IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata endef +define Device/plasmacloud_mcx3 + $(Device/plasmacloud-common) + DEVICE_MODEL := MCX3 +endef +TARGET_DEVICES += plasmacloud_mcx3 + define Device/plasmacloud_psx8 $(Device/plasmacloud-common) DEVICE_MODEL := PSX8 From bcdb29f78f5ee7a7f21c272f8273f1186028e78f Mon Sep 17 00:00:00 2001 From: Rany Hany Date: Thu, 30 Oct 2025 12:33:38 +0000 Subject: [PATCH 03/27] wifi-scripts: add na_mcast_to_ucast option As this is generally only useful with "proxy_arp" enabled, we default na_mcast_to_ucast to true if "proxy_arp" is already enabled. Signed-off-by: Rany Hany Link: https://github.com/openwrt/openwrt/pull/20596 Signed-off-by: Robert Marko --- .../files-ucode/usr/share/schema/wireless.wifi-iface.json | 4 ++++ .../wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc | 5 ++++- .../config/wifi-scripts/files/lib/netifd/hostapd.sh | 8 ++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json index 6cfc515460..ef44baa418 100644 --- a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json +++ b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json @@ -727,6 +727,10 @@ "type": "alias", "default": "multicast_to_unicast" }, + "na_mcast_to_ucast": { + "description": "IPv6 Neighbor Advertisement multicast-to-unicast conversion", + "type": "boolean" + }, "nas_identifier": { "description": "NAS-Identifier string for RADIUS messages", "type": "string" diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc index f35761c616..1c9d7ede42 100644 --- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc +++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc @@ -43,6 +43,9 @@ function iface_setup(config) { if (config.multicast_to_unicast || config.proxy_arp) config.ap_isolate = 1; + if (config.proxy_arp) + set_default(config, 'na_mcast_to_ucast', true); + append('bssid', config.macaddr); config.ssid2 = config.ssid; config.wmm_enabled = 1; @@ -56,7 +59,7 @@ function iface_setup(config) { 'wds_sta', 'wds_bridge', 'snoop_iface', 'vendor_elements', 'nas_identifier', 'radius_acct_interim_interval', 'ocv', 'multicast_to_unicast', 'preamble', 'proxy_arp', 'per_sta_vif', 'mbo', 'bss_transition', 'wnm_sleep_mode', 'wnm_sleep_mode_no_keys', 'qos_map_set', 'max_listen_int', - 'dtim_period', 'wmm_enabled', 'start_disabled', + 'dtim_period', 'wmm_enabled', 'start_disabled', 'na_mcast_to_ucast', ]); } diff --git a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh index c41efd4f60..622f8d5bca 100644 --- a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh +++ b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh @@ -383,7 +383,7 @@ hostapd_common_add_bss_config() { config_add_array airtime_sta_weight config_add_int airtime_bss_weight airtime_bss_limit - config_add_boolean multicast_to_unicast multicast_to_unicast_all proxy_arp per_sta_vif + config_add_boolean multicast_to_unicast multicast_to_unicast_all proxy_arp per_sta_vif na_mcast_to_ucast config_add_array hostapd_bss_options config_add_boolean default_disabled @@ -552,7 +552,7 @@ hostapd_set_bss_options() { bss_load_update_period chan_util_avg_period sae_require_mfp sae_pwe \ multi_ap multi_ap_backhaul_ssid multi_ap_backhaul_key skip_inactivity_poll \ ppsk airtime_bss_weight airtime_bss_limit airtime_sta_weight \ - multicast_to_unicast_all proxy_arp per_sta_vif \ + multicast_to_unicast_all proxy_arp per_sta_vif na_mcast_to_ucast \ eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id radius_server_clients radius_server_auth_port \ vendor_elements fils ocv apup rsn_override @@ -1159,6 +1159,10 @@ hostapd_set_bss_options() { set_default proxy_arp 0 if [ "$proxy_arp" -gt 0 ]; then append bss_conf "proxy_arp=$proxy_arp" "$N" + set_default na_mcast_to_ucast 1 + fi + if [ "$na_mcast_to_ucast" -gt 0 ]; then + append bss_conf "na_mcast_to_ucast=$na_mcast_to_ucast" "$N" fi set_default per_sta_vif 0 From 8e457b69a22d1334a51dccda9471cbc2e333b00d Mon Sep 17 00:00:00 2001 From: Rany Hany Date: Thu, 30 Oct 2025 12:43:14 +0000 Subject: [PATCH 04/27] wifi-scripts: add sae_track_password option This is useful if multiple passwords were specified without the use of a SAE password identifier. This is the only way to get multiple passwords for a single peer to work without resorting to password identifiers. Unfortunately, support for password identifiers is non-existent on Android and macOS; and possibly others. So this is the only option in that case. As an alternative, one could also continue to use WPA2-PSK instead as that could easily resort to a bruteforce approach without any complications. Signed-off-by: Rany Hany Link: https://github.com/openwrt/openwrt/pull/20597 Signed-off-by: Robert Marko --- .../files-ucode/usr/share/schema/wireless.wifi-iface.json | 4 ++++ .../wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc | 2 +- .../network/config/wifi-scripts/files/lib/netifd/hostapd.sh | 5 +++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json index ef44baa418..a46ecc1d0d 100644 --- a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json +++ b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json @@ -961,6 +961,10 @@ "description": "Require MFP for all associations using SAE", "type": "boolean" }, + "sae_track_password": { + "description": "Tracking of SAE password use", + "type": "number" + }, "server:host": { "type": "string" }, diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc index 1c9d7ede42..82ea4ba226 100644 --- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc +++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc @@ -170,7 +170,7 @@ function iface_auth_type(config) { } append_vars(config, [ - 'sae_require_mfp', 'sae_pwe', 'time_advertisement', 'time_zone', + 'sae_require_mfp', 'sae_pwe', 'sae_track_password', 'time_advertisement', 'time_zone', 'wpa_group_rekey', 'wpa_ptk_rekey', 'wpa_gmk_rekey', 'wpa_strict_rekey', 'macaddr_acl', 'wpa_psk_radius', 'wpa_psk', 'wpa_passphrase', 'wpa_psk_file', 'eapol_version', 'dynamic_vlan', 'radius_request_cui', 'eap_reauth_period', diff --git a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh index 622f8d5bca..13d96fe2cb 100644 --- a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh +++ b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh @@ -360,7 +360,7 @@ hostapd_common_add_bss_config() { config_add_array supported_rates config_add_boolean sae_require_mfp - config_add_int sae_pwe + config_add_int sae_pwe sae_track_password config_add_string 'owe_transition_bssid:macaddr' 'owe_transition_ssid:string' config_add_string owe_transition_ifname @@ -549,7 +549,7 @@ hostapd_set_bss_options() { macfilter ssid utf8_ssid uapsd hidden short_preamble rsn_preauth \ iapp_interface eapol_version dynamic_vlan ieee80211w nasid \ acct_secret acct_port acct_interval \ - bss_load_update_period chan_util_avg_period sae_require_mfp sae_pwe \ + bss_load_update_period chan_util_avg_period sae_require_mfp sae_pwe sae_track_password \ multi_ap multi_ap_backhaul_ssid multi_ap_backhaul_key skip_inactivity_poll \ ppsk airtime_bss_weight airtime_bss_limit airtime_sta_weight \ multicast_to_unicast_all proxy_arp per_sta_vif na_mcast_to_ucast \ @@ -645,6 +645,7 @@ hostapd_set_bss_options() { esac [ -n "$sae_require_mfp" ] && append bss_conf "sae_require_mfp=$sae_require_mfp" "$N" [ -n "$sae_pwe" ] && append bss_conf "sae_pwe=$sae_pwe" "$N" + [ -n "$sae_track_password" ] && append bss_conf "sae_track_password=$sae_track_password" "$N" local vlan_possible="" From 372fc5419cfe5ca81505ed9c81a01257644d80a5 Mon Sep 17 00:00:00 2001 From: Rany Hany Date: Mon, 27 Oct 2025 14:36:51 +0000 Subject: [PATCH 05/27] wifi-scripts: ucode: fix setting tx_queue_data2_burst in config Currently we unconditionally set it to 2.0 if 802.11ac and disregard what the user set. This sets it to 2.0 only as a default in case user didn't specify a tx_burst setting. Signed-off-by: Rany Hany Link: https://github.com/openwrt/openwrt/pull/20565 Signed-off-by: Robert Marko --- .../wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc index 840b13294d..80625f25a1 100644 --- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc +++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc @@ -303,7 +303,7 @@ function device_htmode_append(config) { config.short_gi_160 = 0; } - config.tx_queue_data2_burst = '2.0'; + set_default(config, 'tx_queue_data2_burst', '2.0'); let vht_capab = phy_capabilities.vht_capa; From b872421795737e2b8df404fd386b64d964fdd7f1 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 7 Nov 2025 11:43:37 -0800 Subject: [PATCH 06/27] tools/util-linux: remove automake dep In the conversion to meson, this was overlooked. Fixes e15d5cf7522e: ("tools/util-linux: build with meson") Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/20688 Signed-off-by: Robert Marko --- tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Makefile b/tools/Makefile index 9188622eb9..79d3954fef 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -133,7 +133,7 @@ $(curdir)/quilt/compile := $(curdir)/autoconf/compile $(curdir)/findutils/compil $(curdir)/sdcc/compile := $(curdir)/bison/compile $(curdir)/squashfs3-lzma/compile := $(curdir)/lzma-old/compile $(curdir)/squashfs4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile -$(curdir)/util-linux/compile := $(curdir)/bison/compile $(curdir)/automake/compile +$(curdir)/util-linux/compile := $(curdir)/bison/compile $(curdir)/meson/compile $(curdir)/yafut/compile := $(curdir)/cmake/compile ifneq ($(HOST_OS),Linux) From c996ae7602635cc66ca44f0c46d86beb34b7d530 Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Fri, 7 Nov 2025 20:45:32 +0100 Subject: [PATCH 07/27] libiwinfo: update to Git HEAD (2025-11-07) 40563018dc87 iwinfo: print HT operation only if present 5f4c213fc59f iwinfo: export HE and EHT operation in scan results Signed-off-by: Aleksander Jan Bajkowski Link: https://github.com/openwrt/openwrt/pull/20690 Signed-off-by: Hauke Mehrtens --- package/network/utils/iwinfo/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile index 8639ed4050..f287789b14 100644 --- a/package/network/utils/iwinfo/Makefile +++ b/package/network/utils/iwinfo/Makefile @@ -11,9 +11,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git -PKG_SOURCE_DATE:=2025-10-19 -PKG_SOURCE_VERSION:=904f114548bac1e21f49f0bf1e16ebd8ac907885 -PKG_MIRROR_HASH:=6d8e292beb2fffb10028cebb08247090272b1ad6381212b3fdc159cf5a7588f5 +PKG_SOURCE_DATE:=2025-11-07 +PKG_SOURCE_VERSION:=5f4c213fc59f1a82d9f0140642d668ae2969531b +PKG_MIRROR_HASH:=363e245821d9bc6ffe2cf20f4b51670f1f91928df22a2ffe73a06767f737fb6d PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 From 4c5df354df26396c58168cb9d0b3473561a28519 Mon Sep 17 00:00:00 2001 From: Rany Hany Date: Fri, 7 Nov 2025 20:51:57 +0000 Subject: [PATCH 08/27] wifi-scripts: ucode: add SAE support for wifi-station and PPSK This implements 65a1c666f2 ("hostapd: add SAE support for wifi-station and optimize PSK file creation") and 913368a2 ("hostapd: add support for SAE in PPSK option") for the ucode version as well. Signed-off-by: Rany Hany Link: https://github.com/openwrt/openwrt/pull/19965 Signed-off-by: Robert Marko --- .../usr/share/schema/wireless.wifi-iface.json | 4 ++ .../files-ucode/usr/share/ucode/wifi/ap.uc | 46 +++++++++++++++---- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json index a46ecc1d0d..54a02e8938 100644 --- a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json +++ b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json @@ -952,6 +952,10 @@ "description": "Use RSNE override IE WPA3 compatibility (0: disabled, 1: enabled, 2:force WPA2 for older devices)", "default": 1 }, + "sae_password_file": { + "description": "External file containing VLAN SAE MAC address triplets", + "type": "string" + }, "sae_pwe": { "description": "SAE mechanism for PWE derivation", "type": "number", diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc index 82ea4ba226..9c165063be 100644 --- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc +++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc @@ -85,7 +85,8 @@ function iface_auth_type(config) { if (config.auth_type in [ 'sae', 'owe', 'eap2', 'eap192' ]) { config.ieee80211w = 2; config.sae_require_mfp = 1; - config.sae_pwe = 2; + if (!config.ppsk) + config.sae_pwe = 2; } if (config.auth_type in [ 'psk-sae', 'eap-eap2' ]) { @@ -93,7 +94,8 @@ function iface_auth_type(config) { if (config.rsn_override) config.rsn_override_mfp = 2; config.sae_require_mfp = 1; - config.sae_pwe = 2; + if (!config.ppsk) + config.sae_pwe = 2; } if (config.own_ip_addr) @@ -121,20 +123,23 @@ function iface_auth_type(config) { config.vlan_possible = 1; config.wps_possible = 1; - if (config.auth_type == 'psk' && config.ppsk) { + if (config.ppsk) { iface_authentication_server(config); config.macaddr_acl = 2; config.wpa_psk_radius = 2; } else if (length(config.key) == 64) { config.wpa_psk = key; - } else if (length(config.key) >= 8) { + } else if (length(config.key) >= 8 && length(config.key) <= 63) { config.wpa_passphrase = config.key; - } else if (!config.wpa_psk_file) { + } else if (config.key) { netifd.setup_failed('INVALID_WPA_PSK'); } set_default(config, 'wpa_psk_file', `/var/run/hostapd-${config.ifname}.psk`); touch_file(config.wpa_psk_file); + + set_default(config, 'sae_password_file', `/var/run/hostapd-${config.ifname}.sae`); + touch_file(config.sae_password_file); break; case 'eap': @@ -170,7 +175,7 @@ function iface_auth_type(config) { } append_vars(config, [ - 'sae_require_mfp', 'sae_pwe', 'sae_track_password', 'time_advertisement', 'time_zone', + 'sae_require_mfp', 'sae_password_file', 'sae_pwe', 'sae_track_password', 'time_advertisement', 'time_zone', 'wpa_group_rekey', 'wpa_ptk_rekey', 'wpa_gmk_rekey', 'wpa_strict_rekey', 'macaddr_acl', 'wpa_psk_radius', 'wpa_psk', 'wpa_passphrase', 'wpa_psk_file', 'eapol_version', 'dynamic_vlan', 'radius_request_cui', 'eap_reauth_period', @@ -297,7 +302,7 @@ function iface_vlan(interface, config, vlans) { ]); } -function iface_stations(config, stas) { +function iface_wpa_stations(config, stas) { if (!length(stas)) return; @@ -316,6 +321,30 @@ function iface_stations(config, stas) { set_default(config, 'wpa_psk_file', path); } +function iface_sae_stations(config, stas) { + if (!length(stas)) + return; + + let path = `/var/run/hostapd-${config.ifname}.sae`; + + let file = fs.open(path, 'w'); + for (let k, sta in stas) + if (sta.config.mac && sta.config.key) { + let mac = sta.config.mac; + if (mac == '00:00:00:00:00:00') + mac = 'ff:ff:ff:ff:ff:ff'; + + let station = `${sta.config.key}|mac=${mac}`; + if (sta.config.vid) + station = station + `|vlanid=${sta.config.vid}`; + station = station + '\n'; + file.write(station); + } + file.close(); + + set_default(config, 'sae_password_file', path); +} + function iface_eap_server(config) { if (!config.eap_server) return; @@ -435,7 +464,8 @@ function iface_interworking(config) { export function generate(interface, data, config, vlans, stas, phy_features) { config.ctrl_interface = '/var/run/hostapd'; - iface_stations(config, stas); + iface_wpa_stations(config, stas); + iface_sae_stations(config, stas); config.start_disabled = data.ap_start_disabled; iface_setup(config); From 412bc7e1d884787ab81c26c751dca5c6c0f416a9 Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Fri, 7 Nov 2025 21:01:34 +0100 Subject: [PATCH 09/27] rpcd: update to Git HEAD (2025-11-07) 11e0bee504c6 file: use lstat for file list (instead of stat) to reveal links 917000075eb4 iwinfo: add he and eht operation info to wifi scan Signed-off-by: Aleksander Jan Bajkowski Link: https://github.com/openwrt/openwrt/pull/20692 Signed-off-by: Robert Marko --- package/system/rpcd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/rpcd/Makefile b/package/system/rpcd/Makefile index 87388bb670..dcd9948966 100644 --- a/package/system/rpcd/Makefile +++ b/package/system/rpcd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git -PKG_MIRROR_HASH:=9dfe55b9eee240916fe7a2f060280a610e4729b08effbb75089c5d29435c3bf1 -PKG_SOURCE_DATE:=2025-10-03 -PKG_SOURCE_VERSION:=cfb93f105ca2b5e81c5e489076f38d5786f346ea +PKG_MIRROR_HASH:=79a5e17e29396e98c2bb2b0004d370223628ee32dc033cb073a1115c5386f5aa +PKG_SOURCE_DATE:=2025-11-07 +PKG_SOURCE_VERSION:=917000075eb48c934f0a456be3b884758c376e0b PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC From 010575c617dfbbe533f19cf358871fe655e5534c Mon Sep 17 00:00:00 2001 From: "Alice H." Date: Sat, 8 Nov 2025 04:39:42 +0000 Subject: [PATCH 10/27] base-files: correct global DHCP DUID generation The old command generates an often incorrect variable length UUID instead of a fixed 16-octet hex string. Ref: https://datatracker.ietf.org/doc/html/rfc8415#section-11.5 Signed-off-by: Alice H. --- .../files/etc/uci-defaults/14_network-generate-clientid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/base-files/files/etc/uci-defaults/14_network-generate-clientid b/package/base-files/files/etc/uci-defaults/14_network-generate-clientid index 70da185c20..11806dd19c 100644 --- a/package/base-files/files/etc/uci-defaults/14_network-generate-clientid +++ b/package/base-files/files/etc/uci-defaults/14_network-generate-clientid @@ -2,7 +2,7 @@ uci -q batch <<-EOF >/dev/null # DUID-UUID - RFC6355 - set network.globals.dhcp_default_duid="$(hexdump -vn 16 -e '"0004" 2/2 "%x"' /dev/urandom)" + set network.globals.dhcp_default_duid="$(printf '%s%s' '0004' $(cat /proc/sys/kernel/random/uuid | sed -e 's/-//g'))" commit network EOF From b6d2ab85ef18b0929e31b8532d77762332e7d05f Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 8 Nov 2025 18:28:39 +0000 Subject: [PATCH 11/27] mediatek: remove non-existent package mt798x-2p5g-phy-firmware-internal Also the MT7987 RFB accidentally already set the not-yet-existing mt798x-2p5g-phy-firmware-internal package as one of the DEVICE_PACKAGES. This currently breaks the build, so remove it for now. Also remove stray 'blkid' package from DEVICE_PACKAGES which was accidentally copied from MediaTek's SDK. Fixes: 9de7189ed4 ("mediatek: build image for MT7987 RFB") Signed-off-by: Daniel Golle --- target/linux/mediatek/image/filogic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 1e774cc5c0..94a12cfa57 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -1702,7 +1702,7 @@ define Device/mediatek_mt7987a-rfb DEVICE_DTS_DIR := ../dts DEVICE_DTC_FLAGS := --pad 4096 DEVICE_DTS_LOADADDR := 0x4ff00000 - DEVICE_PACKAGES := mt798x-2p5g-phy-firmware-internal kmod-sfp blkid + DEVICE_PACKAGES := kmod-sfp KERNEL_LOADADDR := 0x40000000 KERNEL := kernel-bin | gzip KERNEL_INITRAMFS := kernel-bin | lzma | \ From b1255c4a3229255b0146e8966f02ba633ce04b95 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 26 Oct 2025 00:48:04 +0200 Subject: [PATCH 12/27] trace-cmd: Update to version 3.3.3 d1fac9ec trace-cmd record: Always disable func_stack_trace in tracecmd_disable_all_tracing() 75e3b868 trace-cmd: utest: include libgen.h for POSIX basename() 176bc1f1 trace-cmd record: Fix compression when files are greater than 2GB 9da3427e trace-cmd lib: Use proper printf format specifiers 5f20c477 trace-cmd: Version 3.3.1 39acb4cc trace-cmd list: Use tracefs_filter_functions() 4eef18ff trace-cmd show: Add --max_latency e4540079 trace-cmd list: Use tracefs_instances() to list instances 908d122e trace-cmd stat: Use tracefs_instances() instead of walking them cc6de736 trace-cmd reset: Bail out immediately if user provides an invalid option 3c4fd59b trace-cmd reset: Add option to preserve specific dynamic events 19ceba14 trace-cmd reset: Update man page for -k option bbea061f trace-cmd reset: Add bash tab completion for -B and -k 7f126040 trace-cmd utest: Add test cases for trace-cmd reset 5e8b3c16 trace-cmd lib: Prevent a memory leak in handle_options() 6295bcc1 trace-cmd record: Prevent a memory leak in show_error() 7abca575 trace-cmd lib: Check the return value of do_lseek() in trace_get_options() 22a1605c trace-cmd dump: Prevent buffer overrun in dump_clock() 52946308 trace-cmd record: Prevent memory leak in setup_network() 1b901134 trace-cmd lib: Prevent memory leak in tracecmd_create_event_hook() 59d2c3f9 trace-cmd mem: Prevent a memory leak in trace_mem() 969c36d2 trace-cmd record: Check the length of the protocol version received 201f95fd trace-cmd sqlhist: Fix missing initialization of a var f10d39b8 trace-cmd .gitignore: Ignore utest/trace-utest in git c76f2404 trace-cmd: Prevent buffer overflow in update_pid_filters() db45fec2 trace-cmd: libtracecmd: Rename private functions to fix static building d6cdfc23 trace-cmd: libtracecmd: Remove some unneeded line breaks d14d790a trace-cmd lib: Prevent a memory leak in tracecmd_tsync_with_guest() b948fbed trace-cmd lib: Prevent memory leak in tracecmd_msg_wait_for_cmd() a1b5eee6 trace-cmd sqlhist: Initialize name in trace_sqlhist() fee20bfb trace-cmd: Fix memory leak in stop_mapping_vcpus() 5f1eeba9 trace-cmd record: Fix stdin redirection to /dev/null a1b8a0f5 trace-cmd meson: Add options for doc and utest build 24eed8d8 trace-cmd lib: Prevent a leaked FD in __tracecmd_create_buffer_recorder() d6241881 trace-cmd sqlhist: Initialize err value to tracefs_sql() 179125a4 trace-cmd documentation: Fix typo in man of trace-cmd attach e81cd4e3 trace-cmd lib: Copy message buffer content in get_trace_req_args() b44a9a9f trace-cmd list: Check if any functions were found 9c44659e trace-cmd: Add trace-cmd set to bash completion (like start) f4ede17d trace-cmd list: Show events in bash completion 2149da9c trace-cmd: Add sqlhist to bash completion 477bf923 trace-cmd: Install completion script in /usr/share/bash-completion/completions 6448ea34 trace-cmd show: Update help message for --hist and --trigger options 2fbeb317 trace-cmd list: Show all functions that match string by default f339229f trace-cmd record: Fix compression on big-endian systems e57b3d3e libtracecmd: Add missing error handling to trace-compress.c b1db6f61 libtracecmd: Version 1.5.3 d0a17b4f trace-cmd: Version 3.3.2 24cdb0be trace-cmd completion: Fix trace-cmd report to show files 68bd953b trace-cmd: libtrace-cmd: Fix glob() return value checks 2d5c06e6 trace-cmd: record: Fix glob() return value checks 2c46eb6b trace-cmd split: Only open one file descriptor per CPU 9da7e594 trace-cmd: Version 3.3.3 Link: https://github.com/openwrt/openwrt/pull/20548 Signed-off-by: Hauke Mehrtens --- package/devel/trace-cmd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/devel/trace-cmd/Makefile b/package/devel/trace-cmd/Makefile index 22d37752e6..7fed80e2e4 100644 --- a/package/devel/trace-cmd/Makefile +++ b/package/devel/trace-cmd/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=trace-cmd -PKG_VERSION:=3.3 +PKG_VERSION:=3.3.3 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=$(PKG_NAME)-v$(PKG_VERSION) PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd -PKG_MIRROR_HASH:=7a4f9c3a18a01012cd76ab9a0a2c4447aed8293d005679d5228ef2aef243445c +PKG_MIRROR_HASH:=e20fa2cf177b62b756458cca708870d3e9e5586e7d1365b20e36512c487a1149 PKG_LICENSE:=GPL-2.0-only PKG_LICENSE_FILES:=COPYING From 7f989ecb0342701b928a1da03e6f475197ca4730 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 25 Oct 2025 22:49:02 +0200 Subject: [PATCH 13/27] toolchain: gdb: Update to version 16.3 This is a corrective release over GDB 16.2, fixing the following issues: PR symtab/32309 ([gdb/symtab, fission] gdb/dwarf2/read.h:289: internal-error: version: Assertion `m_dwarf_version != 0' failed) PR corefiles/32441 (gdb segfaults when generating a core file if target_fileio_read_alloc fails) PR tui/32623 (TUI console window doesn't update while inferior is running) PR corefiles/32634 ([gdb/corefiles] segfault in gdb.arch/i386-biarch-core.exp) PR backtrace/32757 ("Assertion `stashed' failed" when inline frame #0 is duplicated) PR tdep/32770 ([gdb/tdep, i386] FAIL: gdb.reverse/recvmsg-reverse.exp: continue to breakpoint: marker2) PR gdb/32775 ([AArch64] gdbserver crashes on SVE/SME-enabled systems) PR record/32784 ([gdb/record, aarch64] Stack smashing detected in aarch64_record_asimd_load_store) PR tui/32797 (Escape sequences to only reset foreground or background color to default fail) PR gdb/32828 (gstack regression: missing file names and line numbers) Link: https://github.com/openwrt/openwrt/pull/20543 Signed-off-by: Hauke Mehrtens --- toolchain/gdb/Makefile | 4 ++-- .../gdb/patches/130-fix-build-error-with-Xcode-16.3.patch | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile index c91bae5fe3..8d1a106c22 100644 --- a/toolchain/gdb/Makefile +++ b/toolchain/gdb/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gdb -PKG_VERSION:=16.2 +PKG_VERSION:=16.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gdb -PKG_HASH:=4002cb7f23f45c37c790536a13a720942ce4be0402d929c9085e92f10d480119 +PKG_HASH:=bcfcd095528a987917acf9fff3f1672181694926cc18d609c99d0042c00224c5 PKG_CPE_ID:=cpe:/a:gnu:gdb GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION) diff --git a/toolchain/gdb/patches/130-fix-build-error-with-Xcode-16.3.patch b/toolchain/gdb/patches/130-fix-build-error-with-Xcode-16.3.patch index 4f76ed3c89..dd2b63368e 100644 --- a/toolchain/gdb/patches/130-fix-build-error-with-Xcode-16.3.patch +++ b/toolchain/gdb/patches/130-fix-build-error-with-Xcode-16.3.patch @@ -34,11 +34,9 @@ Signed-off-by: Georgi Valkov zlib/zutil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/zlib/zutil.h b/zlib/zutil.h -index d9a20ae1bf4..183e51b96b6 100644 --- a/zlib/zutil.h +++ b/zlib/zutil.h -@@ -137,7 +137,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ +@@ -137,7 +137,7 @@ extern z_const char * const z_errmsg[10] # endif #endif @@ -47,6 +45,3 @@ index d9a20ae1bf4..183e51b96b6 100644 # define OS_CODE 7 # ifndef Z_SOLO # if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os --- -2.49.0 - From a646a8e3e8d2d8d93b3fb96b9dec3733833a3b3f Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 25 Oct 2025 22:49:53 +0200 Subject: [PATCH 14/27] gdb: Update to version 16.3 This is a corrective release over GDB 16.2, fixing the following issues: PR symtab/32309 ([gdb/symtab, fission] gdb/dwarf2/read.h:289: internal-error: version: Assertion `m_dwarf_version != 0' failed) PR corefiles/32441 (gdb segfaults when generating a core file if target_fileio_read_alloc fails) PR tui/32623 (TUI console window doesn't update while inferior is running) PR corefiles/32634 ([gdb/corefiles] segfault in gdb.arch/i386-biarch-core.exp) PR backtrace/32757 ("Assertion `stashed' failed" when inline frame #0 is duplicated) PR tdep/32770 ([gdb/tdep, i386] FAIL: gdb.reverse/recvmsg-reverse.exp: continue to breakpoint: marker2) PR gdb/32775 ([AArch64] gdbserver crashes on SVE/SME-enabled systems) PR record/32784 ([gdb/record, aarch64] Stack smashing detected in aarch64_record_asimd_load_store) PR tui/32797 (Escape sequences to only reset foreground or background color to default fail) PR gdb/32828 (gstack regression: missing file names and line numbers) Link: https://github.com/openwrt/openwrt/pull/20543 Signed-off-by: Hauke Mehrtens --- package/devel/gdb/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile index 9feb9ee0c4..6c45de0df9 100644 --- a/package/devel/gdb/Makefile +++ b/package/devel/gdb/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gdb -PKG_VERSION:=16.2 +PKG_VERSION:=16.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gdb -PKG_HASH:=4002cb7f23f45c37c790536a13a720942ce4be0402d929c9085e92f10d480119 +PKG_HASH:=bcfcd095528a987917acf9fff3f1672181694926cc18d609c99d0042c00224c5 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 From 52c0e90bdc8a6b487a322b8180b65d3b69fbb47b Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 25 Oct 2025 14:40:21 +0200 Subject: [PATCH 15/27] tools: mtd-utils: Update to version 2.3.0 See announcement mail for list of new features: https://lists.infradead.org/pipermail/linux-mtd/2025-February/108248.html The removed patch 100-sscanf_fix.patch was applied upstream, see: https://git.infradead.org/?p=mtd-utils.git;a=commitdiff;h=cba2d7875328b05a4a76f619de0ce7050f2df971 The patch 110-portability.patch was manually adapted. Cherry pick some upstream commits which fix build problems in some situations. Link: https://github.com/openwrt/openwrt/pull/20540 Signed-off-by: Hauke Mehrtens --- tools/mtd-utils/Makefile | 4 +- ...-libmissing.a-in-case-execinfo.h-isn.patch | 57 +++++++++ ...common-fix-memory-leak-in-devtable.c.patch | 32 +++++ ...prove-check-for-GCC-compiler-version.patch | 32 +++++ ...-ubifs-utils-ubifs.h-Include-fcntl.h.patch | 45 +++++++ ...ifs-utils-journal-Include-sys-stat.h.patch | 33 +++++ ...extract_files-Include-linux-limits.h.patch | 33 +++++ tools/mtd-utils/patches/100-sscanf_fix.patch | 11 -- tools/mtd-utils/patches/110-portability.patch | 115 ++++++++++-------- tools/mtd-utils/patches/130-lzma_jffs2.patch | 4 +- 10 files changed, 300 insertions(+), 66 deletions(-) create mode 100644 tools/mtd-utils/patches/001-ubifs-utils-link-libmissing.a-in-case-execinfo.h-isn.patch create mode 100644 tools/mtd-utils/patches/002-ubifs-utils-common-fix-memory-leak-in-devtable.c.patch create mode 100644 tools/mtd-utils/patches/004-Improve-check-for-GCC-compiler-version.patch create mode 100644 tools/mtd-utils/patches/005-ubifs-utils-ubifs.h-Include-fcntl.h.patch create mode 100644 tools/mtd-utils/patches/006-ubifs-utils-journal-Include-sys-stat.h.patch create mode 100644 tools/mtd-utils/patches/007-ubifs-utils-extract_files-Include-linux-limits.h.patch delete mode 100644 tools/mtd-utils/patches/100-sscanf_fix.patch diff --git a/tools/mtd-utils/Makefile b/tools/mtd-utils/Makefile index cf7081fb5a..b94b690dab 100644 --- a/tools/mtd-utils/Makefile +++ b/tools/mtd-utils/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mtd-utils -PKG_VERSION:=2.2.1 +PKG_VERSION:=2.3.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://infraroot.at/pub/mtd/ -PKG_HASH:=f7ae20b2eb79ee83441468f0b99d897024cd96ff853eea59106fb1952065c803 +PKG_HASH:=2db102908b232406ccb20719c0f43b61196aef4534493419fbf98a273c598c10 PKG_CPE_ID:=cpe:/a:mtd-utils_project:mtd-utils PKG_FIXUP:=autoreconf diff --git a/tools/mtd-utils/patches/001-ubifs-utils-link-libmissing.a-in-case-execinfo.h-isn.patch b/tools/mtd-utils/patches/001-ubifs-utils-link-libmissing.a-in-case-execinfo.h-isn.patch new file mode 100644 index 0000000000..e43e34f533 --- /dev/null +++ b/tools/mtd-utils/patches/001-ubifs-utils-link-libmissing.a-in-case-execinfo.h-isn.patch @@ -0,0 +1,57 @@ +From 8a83b306db64d6f60186d4396b0b770163b85b6e Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Wed, 26 Feb 2025 18:24:00 +0000 +Subject: ubifs-utils: link libmissing.a in case execinfo.h isn't present + +On musl execinfo.h doesn't exist, but ubifs-utils uses backtrace() when +reporting errors. This results in build failures under musl. + +Handily, libmissing.a already exists with a stub implementation of +backtrace(). + +Guard the execinfo.h include and if it isn't available instead include +libmissing.h, and link to libmissing.a to provide backtrace() if needed. + +Signed-off-by: Ross Burton +Reviewed-by: Zhihao Cheng +Signed-off-by: David Oberhollenzer +--- + ubifs-utils/Makemodule.am | 4 ++-- + ubifs-utils/common/defs.h | 5 ++++- + 2 files changed, 6 insertions(+), 3 deletions(-) + +--- a/ubifs-utils/Makemodule.am ++++ b/ubifs-utils/Makemodule.am +@@ -72,7 +72,7 @@ mkfs_ubifs_SOURCES = \ + ubifs-utils/mkfs.ubifs/mkfs.ubifs.c + + mkfs_ubifs_LDADD = libmtd.a libubi.a $(ZLIB_LIBS) $(LZO_LIBS) $(ZSTD_LIBS) $(UUID_LIBS) $(LIBSELINUX_LIBS) $(OPENSSL_LIBS) \ +- $(DUMP_STACK_LD) $(ASAN_LIBS) -lm -lpthread ++ $(DUMP_STACK_LD) $(ASAN_LIBS) -lm -lpthread libmissing.a + mkfs_ubifs_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS) $(ZSTD_CFLAGS) $(UUID_CFLAGS) $(LIBSELINUX_CFLAGS) \ + -I$(top_srcdir)/ubi-utils/include -I$(top_srcdir)/ubifs-utils/common -I $(top_srcdir)/ubifs-utils/libubifs + +@@ -90,7 +90,7 @@ fsck_ubifs_SOURCES = \ + ubifs-utils/fsck.ubifs/handle_disconnected.c + + fsck_ubifs_LDADD = libmtd.a libubi.a $(ZLIB_LIBS) $(LZO_LIBS) $(ZSTD_LIBS) $(UUID_LIBS) $(LIBSELINUX_LIBS) $(OPENSSL_LIBS) \ +- $(DUMP_STACK_LD) $(ASAN_LIBS) -lm -lpthread ++ $(DUMP_STACK_LD) $(ASAN_LIBS) -lm -lpthread libmissing.a + fsck_ubifs_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS) $(ZSTD_CFLAGS) $(UUID_CFLAGS) $(LIBSELINUX_CFLAGS) \ + -I$(top_srcdir)/ubi-utils/include -I$(top_srcdir)/ubifs-utils/common -I $(top_srcdir)/ubifs-utils/libubifs \ + -I$(top_srcdir)/ubifs-utils/fsck.ubifs +--- a/ubifs-utils/common/defs.h ++++ b/ubifs-utils/common/defs.h +@@ -13,8 +13,11 @@ + #include + #include + #include ++#if HAVE_EXECINFO_H + #include +- ++#else ++#include "libmissing.h" ++#endif + #include "ubifs.h" + + /* common.h requires the PROGRAM_NAME macro */ diff --git a/tools/mtd-utils/patches/002-ubifs-utils-common-fix-memory-leak-in-devtable.c.patch b/tools/mtd-utils/patches/002-ubifs-utils-common-fix-memory-leak-in-devtable.c.patch new file mode 100644 index 0000000000..4daaf45306 --- /dev/null +++ b/tools/mtd-utils/patches/002-ubifs-utils-common-fix-memory-leak-in-devtable.c.patch @@ -0,0 +1,32 @@ +From 2669111e3c60b8e146c174db5d2e7e9991f3dd87 Mon Sep 17 00:00:00 2001 +From: AntonMoryakov +Date: Thu, 24 Apr 2025 21:19:22 +0300 +Subject: ubifs-utils: common: fix memory leak in devtable.c + +Report of the static analyzer: +Dynamic memory, referenced by 'line', is allocated at devtable.c:356 +by calling function 'getline' and lost at devtable.c:388. +(line: while (getline(&line, &len, f) != -1) {) + +Correct explained: +Now line is freed in any exit scenario via out_close which eliminates this error. + +Triggers found by static analyzer Svace. + +Signed-off-by: Anton Moryakov +Signed-off-by: David Oberhollenzer +--- + ubifs-utils/common/devtable.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/ubifs-utils/common/devtable.c ++++ b/ubifs-utils/common/devtable.c +@@ -392,6 +392,7 @@ int parse_devtable(const char *tbl_file) + + out_close: + fclose(f); ++ free(line); + free_devtable_info(); + return -1; + } diff --git a/tools/mtd-utils/patches/004-Improve-check-for-GCC-compiler-version.patch b/tools/mtd-utils/patches/004-Improve-check-for-GCC-compiler-version.patch new file mode 100644 index 0000000000..5b1870b1c1 --- /dev/null +++ b/tools/mtd-utils/patches/004-Improve-check-for-GCC-compiler-version.patch @@ -0,0 +1,32 @@ +From ac0ab65ebcd7b11739986b81343457469fbb43b0 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 22 Mar 2025 21:01:32 -0700 +Subject: Improve check for GCC compiler version + +When using unreleased compiler has version like +15.0.1 and that test fails because __GNUC_MINOR__ < 1 +becomes true, therefore check for full version string +which is more rubust. + +Signed-off-by: Khem Raj +Signed-off-by: David Oberhollenzer +--- + ubifs-utils/common/atomic.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/ubifs-utils/common/atomic.h ++++ b/ubifs-utils/common/atomic.h +@@ -2,8 +2,12 @@ + #ifndef __ATOMIC_H__ + #define __ATOMIC_H__ + ++#define GCC_VERSION (__GNUC__ * 10000 \ ++ + __GNUC_MINOR__ * 100 \ ++ + __GNUC_PATCHLEVEL__) ++ + /* Check GCC version, just to be safe */ +-#if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC_MINOR__ < 1) ++#if GCC_VERSION < 40100 + # error atomic.h works only with GCC newer than version 4.1 + #endif /* GNUC >= 4.1 */ + diff --git a/tools/mtd-utils/patches/005-ubifs-utils-ubifs.h-Include-fcntl.h.patch b/tools/mtd-utils/patches/005-ubifs-utils-ubifs.h-Include-fcntl.h.patch new file mode 100644 index 0000000000..0bba423d7d --- /dev/null +++ b/tools/mtd-utils/patches/005-ubifs-utils-ubifs.h-Include-fcntl.h.patch @@ -0,0 +1,45 @@ +From 12bc9ad824bd8f18a5ec9c7154ad2374cf8c7ae3 Mon Sep 17 00:00:00 2001 +From: Fabio Estevam +Date: Wed, 19 Feb 2025 10:02:41 -0300 +Subject: ubifs-utils: ubifs.h: Include + +Include the header file to fix the following error +when building with musl: + +| In file included from ../git/ubifs-utils/common/compr.c:42: +| ../git/ubifs-utils/libubifs/ubifs.h:313:9: error: unknown type name 'loff_t'; did you mean 'off_t'? +| 313 | loff_t ui_size; +| | ^~~~~~ +| | off_t +| ../git/ubifs-utils/libubifs/ubifs.h:1341:9: error: unknown type name 'loff_t'; did you mean 'off_t'? +| 1341 | loff_t i_size; +| | ^~~~~~ +| | off_t +| ../git/ubifs-utils/libubifs/ubifs.h:1342:9: error: unknown type name 'loff_t'; did you mean 'off_t'? +| 1342 | loff_t d_size; +| | ^~~~~~ +| | off_t +| ../git/ubifs-utils/libubifs/ubifs.h:1899:44: error: unknown type name 'loff_t'; did you mean 'off_t'? +| 1899 | int deletion, loff_t new_size); +| | ^~~~~~ +| | off_t +| make: *** [Makefile:4878: ubifs-utils/common/mkfs_ubifs-compr.o] Error 1 + +Signed-off-by: Fabio Estevam +Reviewed-by: Zhihao Cheng +Reviewed-by: Khem Raj +Signed-off-by: David Oberhollenzer +--- + ubifs-utils/libubifs/ubifs.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/ubifs-utils/libubifs/ubifs.h ++++ b/ubifs-utils/libubifs/ubifs.h +@@ -11,6 +11,7 @@ + #ifndef __UBIFS_H__ + #define __UBIFS_H__ + ++#include + #include + + #include "linux_types.h" diff --git a/tools/mtd-utils/patches/006-ubifs-utils-journal-Include-sys-stat.h.patch b/tools/mtd-utils/patches/006-ubifs-utils-journal-Include-sys-stat.h.patch new file mode 100644 index 0000000000..b43cef8119 --- /dev/null +++ b/tools/mtd-utils/patches/006-ubifs-utils-journal-Include-sys-stat.h.patch @@ -0,0 +1,33 @@ +From 173f9714c8da1d685bfa951d43b9310d16bbab3c Mon Sep 17 00:00:00 2001 +From: Fabio Estevam +Date: Wed, 19 Feb 2025 10:02:42 -0300 +Subject: ubifs-utils: journal: Include + +Include the header file to fix the following error +when building with musl: + +| ../git/ubifs-utils/libubifs/journal.c: In function 'ubifs_get_dent_type': +| ../git/ubifs-utils/libubifs/journal.c:414:24: error: 'S_IFMT' undeclared (first use in this function) +| 414 | switch (mode & S_IFMT) { +| | ^~~~~~ +| ../git/ubifs-utils/libubifs/journal.c:414:24: note: each undeclared identifier is reported only once for each function it appears in +| ../git/ubifs-utils/libubifs/journal.c:415:14: error: 'S_IFREG' undeclared (first use in this function) +| 415 | case S_IFREG: + +Signed-off-by: Fabio Estevam +Reviewed-by: Zhihao Cheng +Signed-off-by: David Oberhollenzer +--- + ubifs-utils/libubifs/journal.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/ubifs-utils/libubifs/journal.c ++++ b/ubifs-utils/libubifs/journal.c +@@ -46,6 +46,7 @@ + * all the nodes. + */ + ++#include + #include "bitops.h" + #include "kmem.h" + #include "ubifs.h" diff --git a/tools/mtd-utils/patches/007-ubifs-utils-extract_files-Include-linux-limits.h.patch b/tools/mtd-utils/patches/007-ubifs-utils-extract_files-Include-linux-limits.h.patch new file mode 100644 index 0000000000..1e99ab6f94 --- /dev/null +++ b/tools/mtd-utils/patches/007-ubifs-utils-extract_files-Include-linux-limits.h.patch @@ -0,0 +1,33 @@ +From 77981a2888c711268b0e7f32af6af159c2288e23 Mon Sep 17 00:00:00 2001 +From: Fabio Estevam +Date: Wed, 19 Feb 2025 10:02:44 -0300 +Subject: ubifs-utils: extract_files: Include + +Include to fix the following build error when building +with musl: + +| ../git/ubifs-utils/fsck.ubifs/extract_files.c: In function 'parse_ino_node': +| ../git/ubifs-utils/fsck.ubifs/extract_files.c:144:47: error: 'XATTR_LIST_MAX' undeclared (first use in this function) +| 144 | if (ino_node->xnms + ino_node->xcnt > XATTR_LIST_MAX) { +| | ^~~~~~~~~~~~~~ +| ../git/ubifs-utils/fsck.ubifs/extract_files.c:144:47: note: each undeclared identifier is reported only once for each function it appears in +| make: *** [Makefile:4374: ubifs-utils/fsck.ubifs/fsck_ubifs-extract_files.o] Error 1 + +Signed-off-by: Fabio Estevam +Reviewed-by: Zhihao Cheng +Signed-off-by: David Oberhollenzer +--- + ubifs-utils/fsck.ubifs/extract_files.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/ubifs-utils/fsck.ubifs/extract_files.c ++++ b/ubifs-utils/fsck.ubifs/extract_files.c +@@ -10,6 +10,8 @@ + #include + #include + ++#include ++ + #include "linux_err.h" + #include "bitops.h" + #include "kmem.h" diff --git a/tools/mtd-utils/patches/100-sscanf_fix.patch b/tools/mtd-utils/patches/100-sscanf_fix.patch deleted file mode 100644 index a36be078d5..0000000000 --- a/tools/mtd-utils/patches/100-sscanf_fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/jffsX-utils/mkfs.jffs2.c -+++ b/jffsX-utils/mkfs.jffs2.c -@@ -428,7 +428,7 @@ static int interpret_table_entry(struct - - if (sscanf (line, "%" SCANF_PREFIX "s %c %lo %lu %lu %lu %lu %lu %lu %lu", - SCANF_STRING(name), &type, &mode, &uid, &gid, &major, &minor, -- &start, &increment, &count) < 0) -+ &start, &increment, &count) < 10) - { - return 1; - } diff --git a/tools/mtd-utils/patches/110-portability.patch b/tools/mtd-utils/patches/110-portability.patch index cf5f0c8d8e..cc4076acb1 100644 --- a/tools/mtd-utils/patches/110-portability.patch +++ b/tools/mtd-utils/patches/110-portability.patch @@ -48,12 +48,54 @@ /* The version of UBI images supported by this implementation */ #define UBI_VERSION 1 ---- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.h -+++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.h -@@ -32,7 +32,17 @@ - #include - #include - #include +--- a/ubifs-utils/common/compiler_attributes.h ++++ b/ubifs-utils/common/compiler_attributes.h +@@ -1,6 +1,8 @@ + #ifndef __COMPILER_ATTRIBUTES_H__ + #define __COMPILER_ATTRIBUTES_H__ + ++#include ++ + #if __has_attribute(__fallthrough__) + #define fallthrough __attribute__((__fallthrough__)) + #else +@@ -11,6 +13,7 @@ + #define __unused __attribute__((__unused__)) + #define __const __attribute__((__const__)) + #define __must_check __attribute__((__warn_unused_result__)) ++#define __always_inline inline __attribute__((__always_inline__)) + #ifndef __force + #define __force + #endif +--- a/ubifs-utils/common/linux_types.h ++++ b/ubifs-utils/common/linux_types.h +@@ -14,7 +14,11 @@ typedef __u16 u16; + typedef __u32 u32; + typedef __u64 u64; + ++#ifdef __linux__ + typedef __s64 time64_t; ++#else ++typedef int64_t time64_t; ++#endif + + struct qstr { + const char *name; +@@ -89,4 +93,8 @@ static inline int int_log2(unsigned int + #undef PAGE_SHIFT + #define PAGE_SHIFT (int_log2(PAGE_SIZE)) + ++#ifndef EUCLEAN ++#define EUCLEAN 117 /* Structure needs cleaning */ ++#endif ++ + #endif +--- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c ++++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c +@@ -29,7 +29,17 @@ + #include + #include + #include +#ifdef __linux__ #include +# if defined(__x86_64__) && defined(__ILP32__) @@ -65,12 +107,10 @@ +# endif +# define llseek lseek +#endif - - #include #include ---- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c -+++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c -@@ -1568,6 +1568,7 @@ static int add_inode(struct stat *st, in + #include + #include +@@ -1459,6 +1469,7 @@ static int add_inode(struct stat *st, in if (c->default_compr != UBIFS_COMPR_NONE) use_flags |= UBIFS_COMPR_FL; @@ -78,33 +118,33 @@ if (flags & FS_COMPR_FL) use_flags |= UBIFS_COMPR_FL; if (flags & FS_SYNC_FL) -@@ -1580,6 +1581,7 @@ static int add_inode(struct stat *st, in +@@ -1471,6 +1482,7 @@ static int add_inode(struct stat *st, in use_flags |= UBIFS_DIRSYNC_FL; if (fctx) use_flags |= UBIFS_CRYPT_FL; +#endif memset(ino, 0, UBIFS_INO_NODE_SZ); - ino_key_init(&key, inum); -@@ -1665,7 +1667,9 @@ static int add_dir_inode(const char *pat + ino_key_init(c, &key, inum); +@@ -1556,7 +1568,9 @@ static int add_dir_inode(const char *pat fd = dirfd(dir); if (fd == -1) - return sys_err_msg("dirfd failed"); + return sys_errmsg("dirfd failed"); +#ifndef NO_NATIVE_SUPPORT if (ioctl(fd, FS_IOC_GETFLAGS, &flags) == -1) +#endif flags = 0; } -@@ -1878,6 +1882,7 @@ static int add_file(const char *path_nam +@@ -1772,6 +1786,7 @@ static int add_file(const char *path_nam dn->ch.node_type = UBIFS_DATA_NODE; - key_write(&key, &dn->key); + key_write(c, &key, &dn->key); out_len = NODE_BUFFER_SIZE - UBIFS_DATA_NODE_SZ; +#ifndef NO_NATIVE_SUPPORT if (c->default_compr == UBIFS_COMPR_NONE && !c->encrypted && (flags & FS_COMPR_FL)) #ifdef WITH_LZO -@@ -1888,6 +1893,7 @@ static int add_file(const char *path_nam +@@ -1782,6 +1797,7 @@ static int add_file(const char *path_nam use_compr = UBIFS_COMPR_NONE; #endif else @@ -112,39 +152,16 @@ use_compr = c->default_compr; compr_type = compress_data(buf, bytes_read, &dn->data, &out_len, use_compr); -@@ -1947,7 +1953,9 @@ static int add_non_dir(const char *path_ +@@ -1841,7 +1857,9 @@ static int add_non_dir(const char *path_ if (fd == -1) - return sys_err_msg("failed to open file '%s'", + return sys_errmsg("failed to open file '%s'", path_name); +#ifndef NO_NATIVE_SUPPORT if (ioctl(fd, FS_IOC_GETFLAGS, &flags) == -1) +#endif flags = 0; if (close(fd) == -1) - return sys_err_msg("failed to close file '%s'", ---- a/ubifs-utils/mkfs.ubifs/devtable.c -+++ b/ubifs-utils/mkfs.ubifs/devtable.c -@@ -135,6 +135,7 @@ static int interpret_table_entry(const c - unsigned int mode = 0755, uid = 0, gid = 0, major = 0, minor = 0; - unsigned int start = 0, increment = 0, count = 0; - -+ buf[1023] = 0; - if (sscanf(line, "%1023s %c %o %u %u %u %u %u %u %u", - buf, &type, &mode, &uid, &gid, &major, &minor, - &start, &increment, &count) < 0) -@@ -145,10 +146,10 @@ static int interpret_table_entry(const c - buf, type, mode, uid, gid, major, minor, start, - increment, count); - -- len = strnlen(buf, 1024); -+ len = strlen(buf); - if (len == 0) - return err_msg("empty path"); -- if (len == 1024) -+ if (len == 1023) - return err_msg("too long path"); - - if (buf[0] != '/') + return sys_errmsg("failed to close file '%s'", --- a/include/common.h +++ b/include/common.h @@ -26,7 +26,6 @@ @@ -155,9 +172,9 @@ #include #include #include ---- a/include/mtd/ubifs-media.h -+++ b/include/mtd/ubifs-media.h -@@ -33,7 +33,15 @@ +--- a/ubifs-utils/libubifs/ubifs-media.h ++++ b/ubifs-utils/libubifs/ubifs-media.h +@@ -33,7 +33,11 @@ #ifndef __UBIFS_MEDIA_H__ #define __UBIFS_MEDIA_H__ @@ -165,10 +182,6 @@ #include +#else +#include -+typedef uint8_t __u8; -+typedef uint16_t __be16; -+typedef uint32_t __be32; -+typedef uint64_t __be64; +#endif /* UBIFS node magic number (must not have the padding byte first or last) */ diff --git a/tools/mtd-utils/patches/130-lzma_jffs2.patch b/tools/mtd-utils/patches/130-lzma_jffs2.patch index b03265a380..f4981cce0e 100644 --- a/tools/mtd-utils/patches/130-lzma_jffs2.patch +++ b/tools/mtd-utils/patches/130-lzma_jffs2.patch @@ -5055,7 +5055,7 @@ AC_ARG_WITH([selinux], [AS_HELP_STRING([--with-selinux], [Support for selinux extended attributes])], -@@ -269,6 +273,7 @@ fi +@@ -283,6 +287,7 @@ fi AM_CONDITIONAL([WITH_LZO], [test "x$with_lzo" = "xyes"]) AM_CONDITIONAL([WITH_ZLIB], [test "x$with_zlib" = "xyes"]) AM_CONDITIONAL([WITH_ZSTD], [test "x$with_zstd" = "xyes"]) @@ -5063,7 +5063,7 @@ AM_CONDITIONAL([WITH_XATTR], [test "x$with_xattr" = "xyes"]) AM_CONDITIONAL([WITH_SELINUX], [test "x$with_selinux" = "xyes"]) AM_CONDITIONAL([WITH_CRYPTO], [test "x$with_crypto" = "xyes"]) -@@ -313,6 +318,7 @@ AC_MSG_RESULT([ +@@ -339,6 +344,7 @@ AC_MSG_RESULT([ lzo support: ${with_lzo} zlib support: ${with_zlib} zstd support: ${with_zstd} From 6ad9daf99aef65919bd59aa4b094dbbf7b00cc8d Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 25 Oct 2025 15:50:36 +0200 Subject: [PATCH 16/27] mtd-utils: Update to version 2.3.0 See announcement mail for list of new features: https://lists.infradead.org/pipermail/linux-mtd/2025-February/108248.html Cherry pick some upstream commits which fix build problems in some situations. autoreconf fixup is needed now otherwise the build fails with: ``` mtd-utils-2.3.0/missing: line 81: automake-1.16: command not found ``` The code in tests/ubifs_tools-tests/Makemodule.am does not build because some test data is not packaged in the tar files, do not build code from this directory. The size increased only very little: 61498 bin/targets/ramips/mt7621/packages/nand-utils-2.3.0-r1.apk 101643 bin/targets/ramips/mt7621/packages/ubi-utils-2.3.0-r1.apk 61243 bin/targets/ramips/mt7621/packages/nand-utils-2.2.1-r1.apk 101291 bin/targets/ramips/mt7621/packages/ubi-utils-2.2.1-r1.apk Link: https://github.com/openwrt/openwrt/pull/20540 Signed-off-by: Hauke Mehrtens --- package/utils/mtd-utils/Makefile | 7 ++- ...-libmissing.a-in-case-execinfo.h-isn.patch | 57 +++++++++++++++++++ ...common-fix-memory-leak-in-devtable.c.patch | 32 +++++++++++ ...prove-check-for-GCC-compiler-version.patch | 32 +++++++++++ ...-ubifs-utils-ubifs.h-Include-fcntl.h.patch | 45 +++++++++++++++ ...ifs-utils-journal-Include-sys-stat.h.patch | 33 +++++++++++ ...extract_files-Include-linux-limits.h.patch | 33 +++++++++++ .../100-Remove-ubifs-test-builds.patch | 30 ++++++++++ 8 files changed, 267 insertions(+), 2 deletions(-) create mode 100644 package/utils/mtd-utils/patches/001-ubifs-utils-link-libmissing.a-in-case-execinfo.h-isn.patch create mode 100644 package/utils/mtd-utils/patches/002-ubifs-utils-common-fix-memory-leak-in-devtable.c.patch create mode 100644 package/utils/mtd-utils/patches/004-Improve-check-for-GCC-compiler-version.patch create mode 100644 package/utils/mtd-utils/patches/005-ubifs-utils-ubifs.h-Include-fcntl.h.patch create mode 100644 package/utils/mtd-utils/patches/006-ubifs-utils-journal-Include-sys-stat.h.patch create mode 100644 package/utils/mtd-utils/patches/007-ubifs-utils-extract_files-Include-linux-limits.h.patch create mode 100644 package/utils/mtd-utils/patches/100-Remove-ubifs-test-builds.patch diff --git a/package/utils/mtd-utils/Makefile b/package/utils/mtd-utils/Makefile index 0dc8831251..482785f2ad 100644 --- a/package/utils/mtd-utils/Makefile +++ b/package/utils/mtd-utils/Makefile @@ -8,18 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mtd-utils -PKG_VERSION:=2.2.1 +PKG_VERSION:=2.3.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://infraroot.at/pub/mtd/ -PKG_HASH:=f7ae20b2eb79ee83441468f0b99d897024cd96ff853eea59106fb1952065c803 +PKG_HASH:=2db102908b232406ccb20719c0f43b61196aef4534493419fbf98a273c598c10 PKG_INSTALL:=1 PKG_FLAGS:=nonshared PKG_BUILD_FLAGS:=gc-sections +PKG_FIXUP:=autoreconf + PKG_BUILD_DEPENDS:=util-linux PKG_LICENSE:=GPLv2 @@ -59,6 +61,7 @@ MAKE_FLAGS += LDLIBS+="$(LIBGCC_S)" CONFIGURE_ARGS += \ --enable-tests \ + --disable-unit-tests \ --without-crypto \ --without-xattr \ --without-zstd \ diff --git a/package/utils/mtd-utils/patches/001-ubifs-utils-link-libmissing.a-in-case-execinfo.h-isn.patch b/package/utils/mtd-utils/patches/001-ubifs-utils-link-libmissing.a-in-case-execinfo.h-isn.patch new file mode 100644 index 0000000000..e43e34f533 --- /dev/null +++ b/package/utils/mtd-utils/patches/001-ubifs-utils-link-libmissing.a-in-case-execinfo.h-isn.patch @@ -0,0 +1,57 @@ +From 8a83b306db64d6f60186d4396b0b770163b85b6e Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Wed, 26 Feb 2025 18:24:00 +0000 +Subject: ubifs-utils: link libmissing.a in case execinfo.h isn't present + +On musl execinfo.h doesn't exist, but ubifs-utils uses backtrace() when +reporting errors. This results in build failures under musl. + +Handily, libmissing.a already exists with a stub implementation of +backtrace(). + +Guard the execinfo.h include and if it isn't available instead include +libmissing.h, and link to libmissing.a to provide backtrace() if needed. + +Signed-off-by: Ross Burton +Reviewed-by: Zhihao Cheng +Signed-off-by: David Oberhollenzer +--- + ubifs-utils/Makemodule.am | 4 ++-- + ubifs-utils/common/defs.h | 5 ++++- + 2 files changed, 6 insertions(+), 3 deletions(-) + +--- a/ubifs-utils/Makemodule.am ++++ b/ubifs-utils/Makemodule.am +@@ -72,7 +72,7 @@ mkfs_ubifs_SOURCES = \ + ubifs-utils/mkfs.ubifs/mkfs.ubifs.c + + mkfs_ubifs_LDADD = libmtd.a libubi.a $(ZLIB_LIBS) $(LZO_LIBS) $(ZSTD_LIBS) $(UUID_LIBS) $(LIBSELINUX_LIBS) $(OPENSSL_LIBS) \ +- $(DUMP_STACK_LD) $(ASAN_LIBS) -lm -lpthread ++ $(DUMP_STACK_LD) $(ASAN_LIBS) -lm -lpthread libmissing.a + mkfs_ubifs_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS) $(ZSTD_CFLAGS) $(UUID_CFLAGS) $(LIBSELINUX_CFLAGS) \ + -I$(top_srcdir)/ubi-utils/include -I$(top_srcdir)/ubifs-utils/common -I $(top_srcdir)/ubifs-utils/libubifs + +@@ -90,7 +90,7 @@ fsck_ubifs_SOURCES = \ + ubifs-utils/fsck.ubifs/handle_disconnected.c + + fsck_ubifs_LDADD = libmtd.a libubi.a $(ZLIB_LIBS) $(LZO_LIBS) $(ZSTD_LIBS) $(UUID_LIBS) $(LIBSELINUX_LIBS) $(OPENSSL_LIBS) \ +- $(DUMP_STACK_LD) $(ASAN_LIBS) -lm -lpthread ++ $(DUMP_STACK_LD) $(ASAN_LIBS) -lm -lpthread libmissing.a + fsck_ubifs_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS) $(ZSTD_CFLAGS) $(UUID_CFLAGS) $(LIBSELINUX_CFLAGS) \ + -I$(top_srcdir)/ubi-utils/include -I$(top_srcdir)/ubifs-utils/common -I $(top_srcdir)/ubifs-utils/libubifs \ + -I$(top_srcdir)/ubifs-utils/fsck.ubifs +--- a/ubifs-utils/common/defs.h ++++ b/ubifs-utils/common/defs.h +@@ -13,8 +13,11 @@ + #include + #include + #include ++#if HAVE_EXECINFO_H + #include +- ++#else ++#include "libmissing.h" ++#endif + #include "ubifs.h" + + /* common.h requires the PROGRAM_NAME macro */ diff --git a/package/utils/mtd-utils/patches/002-ubifs-utils-common-fix-memory-leak-in-devtable.c.patch b/package/utils/mtd-utils/patches/002-ubifs-utils-common-fix-memory-leak-in-devtable.c.patch new file mode 100644 index 0000000000..4daaf45306 --- /dev/null +++ b/package/utils/mtd-utils/patches/002-ubifs-utils-common-fix-memory-leak-in-devtable.c.patch @@ -0,0 +1,32 @@ +From 2669111e3c60b8e146c174db5d2e7e9991f3dd87 Mon Sep 17 00:00:00 2001 +From: AntonMoryakov +Date: Thu, 24 Apr 2025 21:19:22 +0300 +Subject: ubifs-utils: common: fix memory leak in devtable.c + +Report of the static analyzer: +Dynamic memory, referenced by 'line', is allocated at devtable.c:356 +by calling function 'getline' and lost at devtable.c:388. +(line: while (getline(&line, &len, f) != -1) {) + +Correct explained: +Now line is freed in any exit scenario via out_close which eliminates this error. + +Triggers found by static analyzer Svace. + +Signed-off-by: Anton Moryakov +Signed-off-by: David Oberhollenzer +--- + ubifs-utils/common/devtable.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/ubifs-utils/common/devtable.c ++++ b/ubifs-utils/common/devtable.c +@@ -392,6 +392,7 @@ int parse_devtable(const char *tbl_file) + + out_close: + fclose(f); ++ free(line); + free_devtable_info(); + return -1; + } diff --git a/package/utils/mtd-utils/patches/004-Improve-check-for-GCC-compiler-version.patch b/package/utils/mtd-utils/patches/004-Improve-check-for-GCC-compiler-version.patch new file mode 100644 index 0000000000..5b1870b1c1 --- /dev/null +++ b/package/utils/mtd-utils/patches/004-Improve-check-for-GCC-compiler-version.patch @@ -0,0 +1,32 @@ +From ac0ab65ebcd7b11739986b81343457469fbb43b0 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 22 Mar 2025 21:01:32 -0700 +Subject: Improve check for GCC compiler version + +When using unreleased compiler has version like +15.0.1 and that test fails because __GNUC_MINOR__ < 1 +becomes true, therefore check for full version string +which is more rubust. + +Signed-off-by: Khem Raj +Signed-off-by: David Oberhollenzer +--- + ubifs-utils/common/atomic.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/ubifs-utils/common/atomic.h ++++ b/ubifs-utils/common/atomic.h +@@ -2,8 +2,12 @@ + #ifndef __ATOMIC_H__ + #define __ATOMIC_H__ + ++#define GCC_VERSION (__GNUC__ * 10000 \ ++ + __GNUC_MINOR__ * 100 \ ++ + __GNUC_PATCHLEVEL__) ++ + /* Check GCC version, just to be safe */ +-#if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC_MINOR__ < 1) ++#if GCC_VERSION < 40100 + # error atomic.h works only with GCC newer than version 4.1 + #endif /* GNUC >= 4.1 */ + diff --git a/package/utils/mtd-utils/patches/005-ubifs-utils-ubifs.h-Include-fcntl.h.patch b/package/utils/mtd-utils/patches/005-ubifs-utils-ubifs.h-Include-fcntl.h.patch new file mode 100644 index 0000000000..0bba423d7d --- /dev/null +++ b/package/utils/mtd-utils/patches/005-ubifs-utils-ubifs.h-Include-fcntl.h.patch @@ -0,0 +1,45 @@ +From 12bc9ad824bd8f18a5ec9c7154ad2374cf8c7ae3 Mon Sep 17 00:00:00 2001 +From: Fabio Estevam +Date: Wed, 19 Feb 2025 10:02:41 -0300 +Subject: ubifs-utils: ubifs.h: Include + +Include the header file to fix the following error +when building with musl: + +| In file included from ../git/ubifs-utils/common/compr.c:42: +| ../git/ubifs-utils/libubifs/ubifs.h:313:9: error: unknown type name 'loff_t'; did you mean 'off_t'? +| 313 | loff_t ui_size; +| | ^~~~~~ +| | off_t +| ../git/ubifs-utils/libubifs/ubifs.h:1341:9: error: unknown type name 'loff_t'; did you mean 'off_t'? +| 1341 | loff_t i_size; +| | ^~~~~~ +| | off_t +| ../git/ubifs-utils/libubifs/ubifs.h:1342:9: error: unknown type name 'loff_t'; did you mean 'off_t'? +| 1342 | loff_t d_size; +| | ^~~~~~ +| | off_t +| ../git/ubifs-utils/libubifs/ubifs.h:1899:44: error: unknown type name 'loff_t'; did you mean 'off_t'? +| 1899 | int deletion, loff_t new_size); +| | ^~~~~~ +| | off_t +| make: *** [Makefile:4878: ubifs-utils/common/mkfs_ubifs-compr.o] Error 1 + +Signed-off-by: Fabio Estevam +Reviewed-by: Zhihao Cheng +Reviewed-by: Khem Raj +Signed-off-by: David Oberhollenzer +--- + ubifs-utils/libubifs/ubifs.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/ubifs-utils/libubifs/ubifs.h ++++ b/ubifs-utils/libubifs/ubifs.h +@@ -11,6 +11,7 @@ + #ifndef __UBIFS_H__ + #define __UBIFS_H__ + ++#include + #include + + #include "linux_types.h" diff --git a/package/utils/mtd-utils/patches/006-ubifs-utils-journal-Include-sys-stat.h.patch b/package/utils/mtd-utils/patches/006-ubifs-utils-journal-Include-sys-stat.h.patch new file mode 100644 index 0000000000..b43cef8119 --- /dev/null +++ b/package/utils/mtd-utils/patches/006-ubifs-utils-journal-Include-sys-stat.h.patch @@ -0,0 +1,33 @@ +From 173f9714c8da1d685bfa951d43b9310d16bbab3c Mon Sep 17 00:00:00 2001 +From: Fabio Estevam +Date: Wed, 19 Feb 2025 10:02:42 -0300 +Subject: ubifs-utils: journal: Include + +Include the header file to fix the following error +when building with musl: + +| ../git/ubifs-utils/libubifs/journal.c: In function 'ubifs_get_dent_type': +| ../git/ubifs-utils/libubifs/journal.c:414:24: error: 'S_IFMT' undeclared (first use in this function) +| 414 | switch (mode & S_IFMT) { +| | ^~~~~~ +| ../git/ubifs-utils/libubifs/journal.c:414:24: note: each undeclared identifier is reported only once for each function it appears in +| ../git/ubifs-utils/libubifs/journal.c:415:14: error: 'S_IFREG' undeclared (first use in this function) +| 415 | case S_IFREG: + +Signed-off-by: Fabio Estevam +Reviewed-by: Zhihao Cheng +Signed-off-by: David Oberhollenzer +--- + ubifs-utils/libubifs/journal.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/ubifs-utils/libubifs/journal.c ++++ b/ubifs-utils/libubifs/journal.c +@@ -46,6 +46,7 @@ + * all the nodes. + */ + ++#include + #include "bitops.h" + #include "kmem.h" + #include "ubifs.h" diff --git a/package/utils/mtd-utils/patches/007-ubifs-utils-extract_files-Include-linux-limits.h.patch b/package/utils/mtd-utils/patches/007-ubifs-utils-extract_files-Include-linux-limits.h.patch new file mode 100644 index 0000000000..1e99ab6f94 --- /dev/null +++ b/package/utils/mtd-utils/patches/007-ubifs-utils-extract_files-Include-linux-limits.h.patch @@ -0,0 +1,33 @@ +From 77981a2888c711268b0e7f32af6af159c2288e23 Mon Sep 17 00:00:00 2001 +From: Fabio Estevam +Date: Wed, 19 Feb 2025 10:02:44 -0300 +Subject: ubifs-utils: extract_files: Include + +Include to fix the following build error when building +with musl: + +| ../git/ubifs-utils/fsck.ubifs/extract_files.c: In function 'parse_ino_node': +| ../git/ubifs-utils/fsck.ubifs/extract_files.c:144:47: error: 'XATTR_LIST_MAX' undeclared (first use in this function) +| 144 | if (ino_node->xnms + ino_node->xcnt > XATTR_LIST_MAX) { +| | ^~~~~~~~~~~~~~ +| ../git/ubifs-utils/fsck.ubifs/extract_files.c:144:47: note: each undeclared identifier is reported only once for each function it appears in +| make: *** [Makefile:4374: ubifs-utils/fsck.ubifs/fsck_ubifs-extract_files.o] Error 1 + +Signed-off-by: Fabio Estevam +Reviewed-by: Zhihao Cheng +Signed-off-by: David Oberhollenzer +--- + ubifs-utils/fsck.ubifs/extract_files.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/ubifs-utils/fsck.ubifs/extract_files.c ++++ b/ubifs-utils/fsck.ubifs/extract_files.c +@@ -10,6 +10,8 @@ + #include + #include + ++#include ++ + #include "linux_err.h" + #include "bitops.h" + #include "kmem.h" diff --git a/package/utils/mtd-utils/patches/100-Remove-ubifs-test-builds.patch b/package/utils/mtd-utils/patches/100-Remove-ubifs-test-builds.patch new file mode 100644 index 0000000000..222bf4bea4 --- /dev/null +++ b/package/utils/mtd-utils/patches/100-Remove-ubifs-test-builds.patch @@ -0,0 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Sat, 25 Oct 2025 15:38:31 +0200 +Subject: Remove ubifs test builds + +The build from the tar file fails with: +``` +make[3]: *** No rule to make target 'tests/ubifs_tools-tests/images/good.gz', needed by 'all-am'. Stop. +``` + +The tar does not contain the test data files. We do not need these +tests, just deactivate them. + +A new tar file created with this upstream fix should contain the missing +files: +https://patchwork.ozlabs.org/project/linux-mtd/patch/20250220112554.2150046-1-m.olbrich@pengutronix.de/ +--- + Makefile.am | 1 - + 1 file changed, 1 deletion(-) + +--- a/Makefile.am ++++ b/Makefile.am +@@ -64,7 +64,6 @@ include tests/jittertest/Makemodule.am + include tests/checkfs/Makemodule.am + include tests/fs-tests/Makemodule.am + include tests/mtd-tests/Makemodule.am +-include tests/ubifs_tools-tests/Makemodule.am + endif + + if UNIT_TESTS From 92f07864c1f29b39df73b0f3858c500a8d8fa931 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 26 Oct 2025 00:18:44 +0200 Subject: [PATCH 17/27] wolfssl: Update to version 5.8.2 This version fixes multiple security problems: CVE-2025-7395: Problem in certificate verification on Apple devices CVE-2025-7394: Predictable results from RAND_bytes() after fork call in OpenSSL compatibility layer CVE-2025-7396: Activate Curve25519 blinding support See Release notes: https://github.com/wolfSSL/wolfssl/releases/tag/v5.8.0-stable https://github.com/wolfSSL/wolfssl/releases/tag/v5.8.2-stable wolfSSL is now GPLv3 instead of GPLv2, see: https://github.com/wolfSSL/wolfssl/commit/629c5b4cf61ac717d40678b5cd65974b42077af6 The file size increased a bit: ``` 546060 bin/packages/mipsel_24kc/base/libwolfssl5.7.6.e624513f-5.7.6-r1.apk 560684 bin/packages/mipsel_24kc/base/libwolfssl5.8.2.e624513f-5.8.2-r1.apk ``` Link: https://github.com/openwrt/openwrt/pull/20547 Signed-off-by: Hauke Mehrtens --- package/libs/wolfssl/Makefile | 6 +++--- .../libs/wolfssl/patches/100-disable-hardening-check.patch | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index ee6baefddc..3a57123969 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wolfssl -PKG_VERSION:=5.7.6 +PKG_VERSION:=5.8.2 PKG_REAL_VERSION:=$(PKG_VERSION)-stable PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_REAL_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_REAL_VERSION) -PKG_HASH:=52b1e439e30d1ed8162a16308a8525a862183b67aa30373b11166ecbab000d63 +PKG_HASH:=3ef126e3466e2f8f6ebb62b916a7f8fb26c6709dbdf2b63a167759f2fdb53068 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_REAL_VERSION) @@ -22,7 +22,7 @@ PKG_FIXUP:=libtool libtool-abiver PKG_INSTALL:=1 PKG_BUILD_FLAGS:=no-mips16 lto PKG_BUILD_PARALLEL:=1 -PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=LICENSING COPYING PKG_MAINTAINER:=Eneas U de Queiroz PKG_CPE_ID:=cpe:/a:wolfssl:wolfssl diff --git a/package/libs/wolfssl/patches/100-disable-hardening-check.patch b/package/libs/wolfssl/patches/100-disable-hardening-check.patch index ab695d391d..ced7645164 100644 --- a/package/libs/wolfssl/patches/100-disable-hardening-check.patch +++ b/package/libs/wolfssl/patches/100-disable-hardening-check.patch @@ -1,6 +1,6 @@ --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h -@@ -3722,7 +3722,7 @@ extern void uITRON4_free(void *p) ; +@@ -3842,7 +3842,7 @@ extern void uITRON4_free(void *p) ; /* warning for not using harden build options (default with ./configure) */ /* do not warn if big integer support is disabled */ From b4a8ba2e88681af12287eea2d18c4f7de25e280e Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 25 Oct 2025 22:44:22 +0200 Subject: [PATCH 18/27] wireless-regdb: Update to version 2025.10.07 e51d568 wireless-regdb: update regulatory rules for Botswana (BW) for 2022 5afc632 wireless-regdb: update regulatory rules for Sint Marteen (SX) for 2018 b484a31 wireless-regdb: Update regulatory info including bandwidth for Costa Rica (CR) for 2023 39e5e04 wireless-regdb: Permit lower 6 GHz band for Kazakhstan (KZ) a827d3a wireless-regdb: update regulatory database based on preceding changes Link: https://github.com/openwrt/openwrt/pull/20544 Signed-off-by: Hauke Mehrtens --- package/firmware/wireless-regdb/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/firmware/wireless-regdb/Makefile b/package/firmware/wireless-regdb/Makefile index d45c95e5e3..25382eb656 100644 --- a/package/firmware/wireless-regdb/Makefile +++ b/package/firmware/wireless-regdb/Makefile @@ -1,14 +1,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wireless-regdb -PKG_VERSION:=2025.07.10 +PKG_VERSION:=2025.10.07 PKG_RELEASE:=1 PKG_LICENSE:=ISC PKG_LICENSE_FILES:=LICENSE PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/network/wireless-regdb/ -PKG_HASH:=a8340bcdcd1b5db6c79149879d122b170f3bb075381718d4f429ad831a6fa28d +PKG_HASH:=d4c872a44154604c869f5851f7d21d818d492835d370af7f58de8847973801c3 PKG_MAINTAINER:=Felix Fietkau From 6d04c7b6dc2d9ea5b278b5a6125df6652dbd09fb Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 25 Oct 2025 23:32:40 +0200 Subject: [PATCH 19/27] iproute2: Update to version 6.17 https://www.spinics.net/lists/netdev/msg1094722.html https://www.spinics.net/lists/netdev/msg1112693.html https://www.spinics.net/lists/netdev/msg1126307.html Only small size increases: ``` 42470 bin/packages/mipsel_24kc/base/devlink-6.17.0-r1.apk 7553 bin/packages/mipsel_24kc/base/genl-6.17.0-r1.apk 35340 bin/packages/mipsel_24kc/base/ip-bridge-6.17.0-r1.apk 195151 bin/packages/mipsel_24kc/base/ip-full-6.17.0-r1.apk 133690 bin/packages/mipsel_24kc/base/ip-tiny-6.17.0-r1.apk 12185 bin/packages/mipsel_24kc/base/nstat-6.17.0-r1.apk 21484 bin/packages/mipsel_24kc/base/rdma-6.17.0-r1.apk 40935 bin/packages/mipsel_24kc/base/ss-6.17.0-r1.apk 168132 bin/packages/mipsel_24kc/base/tc-bpf-6.17.0-r1.apk 169667 bin/packages/mipsel_24kc/base/tc-full-6.17.0-r1.apk 144693 bin/packages/mipsel_24kc/base/tc-tiny-6.17.0-r1.apk 41654 bin/packages/mipsel_24kc/base/devlink-6.14.0-r1.apk 7551 bin/packages/mipsel_24kc/base/genl-6.14.0-r1.apk 32847 bin/packages/mipsel_24kc/base/ip-bridge-6.14.0-r1.apk 194398 bin/packages/mipsel_24kc/base/ip-full-6.14.0-r1.apk 132656 bin/packages/mipsel_24kc/base/ip-tiny-6.14.0-r1.apk 12114 bin/packages/mipsel_24kc/base/nstat-6.14.0-r1.apk 21366 bin/packages/mipsel_24kc/base/rdma-6.14.0-r1.apk 40939 bin/packages/mipsel_24kc/base/ss-6.14.0-r1.apk 163878 bin/packages/mipsel_24kc/base/tc-bpf-6.14.0-r1.apk 165511 bin/packages/mipsel_24kc/base/tc-full-6.14.0-r1.apk 140497 bin/packages/mipsel_24kc/base/tc-tiny-6.14.0-r1.apk ``` Link: https://github.com/openwrt/openwrt/pull/20545 Signed-off-by: Hauke Mehrtens --- package/network/utils/iproute2/Makefile | 4 +-- ...ridge-avoid-redefinition-of-in6_addr.patch | 27 +++++++++++++++++++ .../patches/115-add-config-xtlibdir.patch | 2 +- .../utils/iproute2/patches/170-ip_tiny.patch | 2 +- .../patches/180-drop_FAILED_POLICY.patch | 2 +- .../patches/195-build_variant_ip_tc.patch | 2 +- 6 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 package/network/utils/iproute2/patches/001-lib-bridge-avoid-redefinition-of-in6_addr.patch diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 6b7dee71c9..1e02cd01b2 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=6.14.0 +PKG_VERSION:=6.17.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=a6d23588150096591c3d00fc27a324a82ee71d7a1a9eea78df5df17ad9b8461f +PKG_HASH:=9781e59410ab7dea8e9f79bb10ff1488e63d10fcbb70503b94426ba27a8e2dec PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iproute2/patches/001-lib-bridge-avoid-redefinition-of-in6_addr.patch b/package/network/utils/iproute2/patches/001-lib-bridge-avoid-redefinition-of-in6_addr.patch new file mode 100644 index 0000000000..166f15ccf4 --- /dev/null +++ b/package/network/utils/iproute2/patches/001-lib-bridge-avoid-redefinition-of-in6_addr.patch @@ -0,0 +1,27 @@ +From 7119f3736f689ab396ca4193ac593938affd55fa Mon Sep 17 00:00:00 2001 +From: Yureka +Date: Sun, 12 Oct 2025 14:39:47 +0200 +Subject: lib: bridge: avoid redefinition of in6_addr + +On musl libc, which does not use the kernel definitions of in6_addr, including +the libc headers after the kernel (UAPI) headers would cause a redefinition +error. The opposite order avoids the redefinition. + +Fixes: 9e89d5b94d749f37525cd8778311e1c9f28f172a +Signed-off-by: Yureka +--- + lib/bridge.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/lib/bridge.c ++++ b/lib/bridge.c +@@ -2,8 +2,8 @@ + + #include + +-#include "bridge.h" + #include "utils.h" ++#include "bridge.h" + + void bridge_print_vlan_flags(__u16 flags) + { diff --git a/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch b/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch index 38448e6cd6..d9f3069a95 100644 --- a/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch +++ b/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch @@ -1,6 +1,6 @@ --- a/tc/Makefile +++ b/tc/Makefile -@@ -107,6 +107,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR +@@ -108,6 +108,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR ifneq ($(IPT_LIB_DIR),) CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\" endif diff --git a/package/network/utils/iproute2/patches/170-ip_tiny.patch b/package/network/utils/iproute2/patches/170-ip_tiny.patch index fb95550630..37c5f41a9e 100644 --- a/package/network/utils/iproute2/patches/170-ip_tiny.patch +++ b/package/network/utils/iproute2/patches/170-ip_tiny.patch @@ -105,4 +105,4 @@ + UTILOBJ = utils.o utils_math.o rt_names.o ll_map.o ll_types.o ll_proto.o ll_addr.o \ inet_proto.o namespace.o json_writer.o json_print.o json_print_math.o \ - names.o color.o bpf_legacy.o bpf_glue.o exec.o fs.o cg_map.o ppp_proto.o + names.o color.o bpf_legacy.o bpf_glue.o exec.o fs.o cg_map.o \ diff --git a/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch b/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch index 9ce7dd9a13..a7b56feabd 100644 --- a/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch +++ b/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch @@ -31,7 +31,7 @@ Subject: [PATCH] add support for dropping with FAILED_POLICY if (!end || end == arg || *end || res > 255) --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/linux/rtnetlink.h -@@ -265,6 +265,7 @@ enum { +@@ -273,6 +273,7 @@ enum { RTN_THROW, /* Not in this table */ RTN_NAT, /* Translate this address */ RTN_XRESOLVE, /* Use external resolver */ diff --git a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch index 6ecf5568be..46a53d23e6 100644 --- a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch +++ b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch @@ -11,7 +11,7 @@ --- a/tc/Makefile +++ b/tc/Makefile -@@ -120,7 +120,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc +@@ -121,7 +121,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic $< -o $@ From 1a71840512bce1d2ff09118094594fed7675b261 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 25 Oct 2025 17:00:18 +0200 Subject: [PATCH 20/27] tools: e2fsprogs: Update to version 1.47.3 Changelog: https://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.47.3 Add patch to fix build on older Linux systems like Debian oldstable. Link: https://github.com/openwrt/openwrt/pull/20541 Signed-off-by: Hauke Mehrtens --- tools/e2fsprogs/Makefile | 4 +- ...de-Fix-compilation-again-kernel-5.12.patch | 72 +++++++++++++++++++ 2 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 tools/e2fsprogs/patches/001-create_inode-Fix-compilation-again-kernel-5.12.patch diff --git a/tools/e2fsprogs/Makefile b/tools/e2fsprogs/Makefile index 5deee08160..6b105ed9a8 100644 --- a/tools/e2fsprogs/Makefile +++ b/tools/e2fsprogs/Makefile @@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=e2fsprogs PKG_CPE_ID:=cpe:/a:e2fsprogs_project:e2fsprogs -PKG_VERSION:=1.47.2 -PKG_HASH:=08242e64ca0e8194d9c1caad49762b19209a06318199b63ce74ae4ef2d74e63c +PKG_VERSION:=1.47.3 +PKG_HASH:=857e6ef800feaa2bb4578fbc810214be5d3c88b072ea53c5384733a965737329 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/ diff --git a/tools/e2fsprogs/patches/001-create_inode-Fix-compilation-again-kernel-5.12.patch b/tools/e2fsprogs/patches/001-create_inode-Fix-compilation-again-kernel-5.12.patch new file mode 100644 index 0000000000..0f504d5cb4 --- /dev/null +++ b/tools/e2fsprogs/patches/001-create_inode-Fix-compilation-again-kernel-5.12.patch @@ -0,0 +1,72 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Sat, 25 Oct 2025 19:59:58 +0200 +Subject: create_inode: Fix compilation again kernel < 5.12 + +Copy the header definition from Linux kernel v5.12 to allow compilation +against kernel headers from an kernel older than v5.12. + +struct fsverity_descriptor was already added in kernel 5.11, compiling +against kernel 5.11 kernel headers could cause problems. + +Signed-off-by: Hauke Mehrtens +--- + misc/create_inode.c | 47 +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 47 insertions(+) + +--- a/misc/create_inode.c ++++ b/misc/create_inode.c +@@ -575,6 +575,53 @@ static inline off_t round_up(off_t n, of + return ((n - bias + (blksz - 1)) & ~(blksz - 1)) + bias; + } + ++#ifndef FS_IOC_READ_VERITY_METADATA ++ ++/* ++ * Struct containing a file's Merkle tree properties. The fs-verity file digest ++ * is the hash of this struct. A userspace program needs this struct only if it ++ * needs to compute fs-verity file digests itself, e.g. in order to sign files. ++ * It isn't needed just to enable fs-verity on a file. ++ * ++ * Note: when computing the file digest, 'sig_size' and 'signature' must be left ++ * zero and empty, respectively. These fields are present only because some ++ * filesystems reuse this struct as part of their on-disk format. ++ */ ++struct fsverity_descriptor { ++ __u8 version; /* must be 1 */ ++ __u8 hash_algorithm; /* Merkle tree hash algorithm */ ++ __u8 log_blocksize; /* log2 of size of data and tree blocks */ ++ __u8 salt_size; /* size of salt in bytes; 0 if none */ ++#ifdef __KERNEL__ ++ __le32 sig_size; ++#else ++ __le32 __reserved_0x04; /* must be 0 */ ++#endif ++ __le64 data_size; /* size of file the Merkle tree is built over */ ++ __u8 root_hash[64]; /* Merkle tree root hash */ ++ __u8 salt[32]; /* salt prepended to each hashed block */ ++ __u8 __reserved[144]; /* must be 0's */ ++#ifdef __KERNEL__ ++ __u8 signature[]; ++#endif ++}; ++ ++#define FS_VERITY_METADATA_TYPE_MERKLE_TREE 1 ++#define FS_VERITY_METADATA_TYPE_DESCRIPTOR 2 ++#define FS_VERITY_METADATA_TYPE_SIGNATURE 3 ++ ++struct fsverity_read_metadata_arg { ++ __u64 metadata_type; ++ __u64 offset; ++ __u64 length; ++ __u64 buf_ptr; ++ __u64 __reserved; ++}; ++ ++#define FS_IOC_READ_VERITY_METADATA \ ++ _IOWR('f', 135, struct fsverity_read_metadata_arg) ++#endif ++ + static errcode_t copy_fs_verity_data(ext2_file_t e2_file, ext2_off_t e2_offset, + int fd, uint64_t metadata_type, + __u32 *written) From 28aaaf3c8231abdcd9e0d5cb9392c3b061c54d5b Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 25 Oct 2025 17:00:55 +0200 Subject: [PATCH 21/27] e2fsprogs: Update to version 1.47.3 Changelog: https://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.47.3 The file sizes changed only a bit: ``` 8671 bin/packages/mipsel_24kc/base/badblocks-1.47.2-r1.apk 3449 bin/packages/mipsel_24kc/base/chattr-1.47.2-r1.apk 61629 bin/packages/mipsel_24kc/base/debugfs-1.47.2-r1.apk 8522 bin/packages/mipsel_24kc/base/dumpe2fs-1.47.2-r1.apk 4620 bin/packages/mipsel_24kc/base/e2freefrag-1.47.2-r1.apk 162458 bin/packages/mipsel_24kc/base/e2fsprogs-1.47.2-r1.apk 6837 bin/packages/mipsel_24kc/base/e4crypt-1.47.2-r1.apk 6143 bin/packages/mipsel_24kc/base/filefrag-1.47.2-r1.apk 4136 bin/packages/mipsel_24kc/base/libcomerr0-1.47.2-r1.apk 12083 bin/packages/mipsel_24kc/base/libe2p2-1.47.2-r1.apk 173855 bin/packages/mipsel_24kc/base/libext2fs2-1.47.2-r1.apk 8166 bin/packages/mipsel_24kc/base/libss2-1.47.2-r1.apk 2987 bin/packages/mipsel_24kc/base/lsattr-1.47.2-r1.apk 23203 bin/packages/mipsel_24kc/base/resize2fs-1.47.2-r1.apk 36232 bin/packages/mipsel_24kc/base/tune2fs-1.47.2-r1.apk 8671 bin/packages/mipsel_24kc/base/badblocks-1.47.3-r1.apk 3450 bin/packages/mipsel_24kc/base/chattr-1.47.3-r1.apk 61545 bin/packages/mipsel_24kc/base/debugfs-1.47.3-r1.apk 8519 bin/packages/mipsel_24kc/base/dumpe2fs-1.47.3-r1.apk 4630 bin/packages/mipsel_24kc/base/e2freefrag-1.47.3-r1.apk 161364 bin/packages/mipsel_24kc/base/e2fsprogs-1.47.3-r1.apk 6846 bin/packages/mipsel_24kc/base/e4crypt-1.47.3-r1.apk 6092 bin/packages/mipsel_24kc/base/filefrag-1.47.3-r1.apk 4135 bin/packages/mipsel_24kc/base/libcomerr0-1.47.3-r1.apk 12121 bin/packages/mipsel_24kc/base/libe2p2-1.47.3-r1.apk 175696 bin/packages/mipsel_24kc/base/libext2fs2-1.47.3-r1.apk 8166 bin/packages/mipsel_24kc/base/libss2-1.47.3-r1.apk 3001 bin/packages/mipsel_24kc/base/lsattr-1.47.3-r1.apk 23208 bin/packages/mipsel_24kc/base/resize2fs-1.47.3-r1.apk 36402 bin/packages/mipsel_24kc/base/tune2fs-1.47.3-r1.apk ``` Link: https://github.com/openwrt/openwrt/pull/20541 Signed-off-by: Hauke Mehrtens --- package/utils/e2fsprogs/Makefile | 4 ++-- ...igure-make-libmagic-optional-and-configurable.patch | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package/utils/e2fsprogs/Makefile b/package/utils/e2fsprogs/Makefile index 5bac11e7ca..3ceb7b5c84 100644 --- a/package/utils/e2fsprogs/Makefile +++ b/package/utils/e2fsprogs/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=e2fsprogs -PKG_VERSION:=1.47.2 +PKG_VERSION:=1.47.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/ -PKG_HASH:=08242e64ca0e8194d9c1caad49762b19209a06318199b63ce74ae4ef2d74e63c +PKG_HASH:=857e6ef800feaa2bb4578fbc810214be5d3c88b072ea53c5384733a965737329 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=NOTICE diff --git a/package/utils/e2fsprogs/patches/010-configure-make-libmagic-optional-and-configurable.patch b/package/utils/e2fsprogs/patches/010-configure-make-libmagic-optional-and-configurable.patch index 9b3c25f14c..9424cceca1 100644 --- a/package/utils/e2fsprogs/patches/010-configure-make-libmagic-optional-and-configurable.patch +++ b/package/utils/e2fsprogs/patches/010-configure-make-libmagic-optional-and-configurable.patch @@ -18,7 +18,7 @@ Signed-off-by: Christian Marangi --- a/configure +++ b/configure -@@ -930,6 +930,7 @@ enable_rpath +@@ -931,6 +931,7 @@ enable_rpath with_libiconv_prefix with_libintl_prefix enable_largefile @@ -26,7 +26,7 @@ Signed-off-by: Christian Marangi with_libarchive enable_fuse2fs enable_lto -@@ -1647,6 +1648,7 @@ Optional Packages: +@@ -1650,6 +1651,7 @@ Optional Packages: --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir @@ -34,7 +34,7 @@ Signed-off-by: Christian Marangi --without-libarchive disable use of libarchive --with-multiarch=ARCH specify the multiarch triplet --with-udev-rules-dir[=DIR] -@@ -13690,7 +13692,155 @@ then : +@@ -13736,7 +13738,155 @@ then : fi @@ -191,7 +191,7 @@ Signed-off-by: Christian Marangi printf %s "checking for magic_file in -lmagic... " >&6; } if test ${ac_cv_lib_magic_magic_file+y} then : -@@ -13728,17 +13878,39 @@ printf "%s\n" "$ac_cv_lib_magic_magic_fi +@@ -13774,17 +13924,39 @@ printf "%s\n" "$ac_cv_lib_magic_magic_fi if test "x$ac_cv_lib_magic_magic_file" = xyes then : MAGIC_LIB=-lmagic @@ -237,7 +237,7 @@ Signed-off-by: Christian Marangi --- a/configure.ac +++ b/configure.ac -@@ -1295,12 +1295,59 @@ SOCKET_LIB='' +@@ -1297,12 +1297,59 @@ SOCKET_LIB='' AC_CHECK_LIB(socket, socket, [SOCKET_LIB=-lsocket]) AC_SUBST(SOCKET_LIB) dnl From 6665089e94f357174722755ff278422e4037e62d Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 26 Oct 2025 00:02:12 +0200 Subject: [PATCH 22/27] tools: util-linux: Update to version 2.41.2 Changes: https://www.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41.2-ReleaseNotes Link: https://github.com/openwrt/openwrt/pull/20546 Signed-off-by: Hauke Mehrtens --- tools/util-linux/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/util-linux/Makefile b/tools/util-linux/Makefile index c9a4bbc34f..541487c85c 100644 --- a/tools/util-linux/Makefile +++ b/tools/util-linux/Makefile @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=util-linux -PKG_VERSION:=2.41.1 +PKG_VERSION:=2.41.2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.41 -PKG_HASH:=be9ad9a276f4305ab7dd2f5225c8be1ff54352f565ff4dede9628c1aaa7dec57 +PKG_HASH:=6062a1d89b571a61932e6fc0211f36060c4183568b81ee866cf363bce9f6583e PKG_CPE_ID:=cpe:/a:kernel:util-linux include $(INCLUDE_DIR)/host-build.mk From 0334564ea663174823547d751312843c52b33696 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 26 Oct 2025 00:03:29 +0200 Subject: [PATCH 23/27] util-linux: Update to version 2.41.2 Changes: https://www.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41.2-ReleaseNotes Link: https://github.com/openwrt/openwrt/pull/20546 Signed-off-by: Hauke Mehrtens --- package/utils/util-linux/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile index 52dca78e3d..c1061d42b8 100644 --- a/package/utils/util-linux/Makefile +++ b/package/utils/util-linux/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=util-linux -PKG_VERSION:=2.41.1 -PKG_RELEASE:=2 +PKG_VERSION:=2.41.2 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.41 -PKG_HASH:=be9ad9a276f4305ab7dd2f5225c8be1ff54352f565ff4dede9628c1aaa7dec57 +PKG_HASH:=6062a1d89b571a61932e6fc0211f36060c4183568b81ee866cf363bce9f6583e PKG_CPE_ID:=cpe:/a:kernel:util-linux From 5aab294726f35d8515945484cbee951655cdfe90 Mon Sep 17 00:00:00 2001 From: INAGAKI Hiroshi Date: Sat, 8 Nov 2025 14:35:30 +0900 Subject: [PATCH 24/27] kernel: generic: mtdsplit_seil: return 0 instead of -ENODEV Return 0 if the current mtd is inactive or no valid header/rootfs found, instead of -ENODEV. Linux Kernel 6.7 and later versions handle all errors returned by mtd parsers, including -ENODEV as error. So '0' needs to be returned if no child partitions were not parsed. Signed-off-by: INAGAKI Hiroshi Link: https://github.com/openwrt/openwrt/pull/20697 Signed-off-by: Hauke Mehrtens --- .../generic/files/drivers/mtd/mtdsplit/mtdsplit_seil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seil.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seil.c index e58bb49b23..97bee9d268 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seil.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seil.c @@ -112,7 +112,7 @@ static int mtdsplit_parse_seil_fw(struct mtd_info *master, u64 id; if (!seil_bootdev_is_active(np)) - return -ENODEV; + return 0; ret = of_property_read_u64(np, "iij,seil-id", &id); if (ret) { @@ -137,7 +137,7 @@ static int mtdsplit_parse_seil_fw(struct mtd_info *master, if (be64_to_cpu(header.id) != id || be32_to_cpu(header.vfmt) != SEIL_VFMT) { pr_debug("no valid seil image found in \"%s\"\n", master->name); - ret = -ENODEV; + ret = 0; goto err_free_parts; } @@ -154,7 +154,7 @@ static int mtdsplit_parse_seil_fw(struct mtd_info *master, if (ret || (master->size - rootfs_offset) == 0) { pr_debug("no rootfs after seil image in \"%s\"\n", master->name); - ret = -ENODEV; + ret = 0; goto err_free_parts; } From 5212866508a684adc6947cc8722137457b9e8106 Mon Sep 17 00:00:00 2001 From: John Audia Date: Sun, 26 Oct 2025 08:17:07 -0400 Subject: [PATCH 25/27] pcre2: bump to 10.47 Update to latest version. Changelog: https://github.com/PCRE2Project/pcre2/blob/pcre2-10.47/ChangeLog Tested with snort3, no regressions. Build system: x86/64 Build-tested: x86/64-glibc Run-tested: x86/64-glibc (Intel N150 based box) Signed-off-by: John Audia Link: https://github.com/openwrt/openwrt/pull/20554 Signed-off-by: Hauke Mehrtens --- package/libs/pcre2/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/libs/pcre2/Makefile b/package/libs/pcre2/Makefile index 81310d1bac..f170c527b5 100644 --- a/package/libs/pcre2/Makefile +++ b/package/libs/pcre2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pcre2 -PKG_VERSION:=10.46 +PKG_VERSION:=10.47 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/PCRE2Project/pcre2/releases/download/$(PKG_NAME)-$(PKG_VERSION) -PKG_HASH:=15fbc5aba6beee0b17aecb04602ae39432393aba1ebd8e39b7cabf7db883299f +PKG_HASH:=47fe8c99461250d42f89e6e8fdaeba9da057855d06eb7fc08d9ca03fd08d7bc7 PKG_MAINTAINER:=Shane Peelar PKG_LICENSE:=BSD-3-Clause From 71ebc54d2a73b0bd0a7d712d472df9c01ace74f2 Mon Sep 17 00:00:00 2001 From: Dirk Buchwalder Date: Fri, 10 Oct 2025 21:51:07 +0200 Subject: [PATCH 26/27] mediatek: filogic: add support for TP-LINK BE450 This commit adds support for TP-LINK BE450. Device specification -------------------- SoC Type: MediaTek MT7988D, Cortex-A73, 64-bit RAM: 512MB Flash: SPI NAND GigaDevice (128 MiB) Ethernet: MediaTek MT7531AE (3 Ports) + 2.5GbE (internal MT7988 phy) + 10GbE (RTL8261N) WLAN: MT7992 WLAN 2g: MediaTek MT7975N, b/g/n/ax/be, MIMO 4x4 WLAN 5g: MediaTek MT7979N, a/n/ac/ax/be, MIMO 4x4 LEDs: 8 LEDs, 1 status blue, 2x WIFI blue, 2x Internet blue/orange, 1 LAN blue, 1 usb blue, 1 wps blue, gpio-controlled Button: 2 (Reset, WPS) USB port: Yes Power: 12 VDC, 2 A Connector: Barrel Bootloader: Main U-Boot - U-Boot 2023.10-rc4. Additionally, ubi0 partition contain "seconduboot" (also U-Boot 2023.10-rc4) Serial console (UART), unpopulated, located near the power connector --------------------- heatsink | | | | | | +----+-----+------+-------+ +-----------------+ | | | TX | RX | GND | +3.3V | | power connector | +---+ +----+-----+------+-------+ +-----------------+ | Don't connect ----+ Disassemble: rm the 2 screws at the bottom and the one at the backside. un-clip the case starting at the edge above the LEDs. Installation (UART) ------------------- 1. Place OpenWrt initramfs image on tftp server with IP 192.168.1.2 2. Attach UART, switch on the router and interrupt the boot process by pressing 'Ctrl-C' 3. Load and run OpenWrt initramfs image: tftpboot 0x50000000 openwrt-mediatek-filogic-tplink_be450-initramfs-kernel.bin && bootm 0x50000000 4. Run 'sysupgrade -n' with the sysupgrade OpenWrt image Note: the 10GbE (RTL8261N) is only working if reverting this Realtek target specific commit: https://github.com/openwrt/openwrt/commit/b77fa45d1278443d534919598c0301719fed2784 The second ubi partition (ubi1) is empty and there is no known dual-partition mechanism, neither in u-boot nor in the stock firmware. NMBM is not used. Not Working: WED, if activated, MT7992 isn't recognized any more. Signed-off-by: Dirk Buchwalder Link: https://github.com/openwrt/openwrt/pull/20398 Signed-off-by: Hauke Mehrtens --- .../uboot-envtools/files/mediatek_filogic | 3 +- .../mediatek/dts/mt7988d-tplink-be450.dts | 409 ++++++++++++++++++ .../filogic/base-files/etc/board.d/01_leds | 5 + .../filogic/base-files/etc/board.d/02_network | 3 + .../etc/hotplug.d/firmware/11-mt76-caldata | 8 + .../etc/hotplug.d/ieee80211/11_fix_wifi_mac | 1 + .../base-files/lib/preinit/09_mount_cfg_part | 1 + .../base-files/lib/preinit/10_fix_eth_mac.sh | 5 + .../base-files/lib/upgrade/platform.sh | 1 + target/linux/mediatek/image/filogic.mk | 15 + 10 files changed, 450 insertions(+), 1 deletion(-) create mode 100644 target/linux/mediatek/dts/mt7988d-tplink-be450.dts diff --git a/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic index 3f7ab7ade2..909848744b 100644 --- a/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic @@ -127,7 +127,8 @@ smartrg,sdg-8733a|\ smartrg,sdg-8734) ubootenv_add_mmc "u-boot-env" "mmcblk0" "0x0" "0x8000" "0x8000" ;; -tplink,archer-ax80-v1) +tplink,archer-ax80-v1|\ +tplink,be450) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" "8" ;; ubnt,unifi-6-plus) diff --git a/target/linux/mediatek/dts/mt7988d-tplink-be450.dts b/target/linux/mediatek/dts/mt7988d-tplink-be450.dts new file mode 100644 index 0000000000..62218bf747 --- /dev/null +++ b/target/linux/mediatek/dts/mt7988d-tplink-be450.dts @@ -0,0 +1,409 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +/dts-v1/; + +#include "mt7988a.dtsi" +#include +#include +#include +#include +#include + +/ { + model = "TP-Link BE450"; + compatible = "tplink,be450", "mediatek,mt7988d"; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + aliases { + serial0 = &serial0; + label-mac-device = &gmac0; + led-boot = &led_status; + led-failsafe = &led_status; + led-running = &led_status; + led-upgrade = &led_status; + }; + + memory@40000000 { + reg = <0x0 0x40000000 0x0 0x40000000>; + device_type = "memory"; + }; + + cpus { + /delete-node/ cpu@3; + }; + + reg_1p8v: regulator-1p8v { + compatible = "regulator-fixed"; + regulator-name = "fixed-1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&button_pins>; + + reset { + label = "reset"; + linux,code = ; + gpios = <&pio 13 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "wps"; + linux,code = ; + gpios = <&pio 14 GPIO_ACTIVE_LOW>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + led-0 { + gpios = <&pio 21 GPIO_ACTIVE_HIGH>; + color = ; + function = LED_FUNCTION_WAN; + }; + + led-1 { + gpios = <&pio 28 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_WLAN_5GHZ; + }; + + led-2 { + gpios = <&pio 29 GPIO_ACTIVE_HIGH>; + color = ; + function = LED_FUNCTION_WLAN_2GHZ; + }; + + led_status: led-3 { + gpios = <&pio 30 GPIO_ACTIVE_HIGH>; + color = ; + function = LED_FUNCTION_STATUS; + panic-indicator; + }; + + led-4 { + gpios = <&pio 31 GPIO_ACTIVE_HIGH>; + color = ; + function = LED_FUNCTION_LAN; + }; + + led-5 { + gpios = <&pio 35 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_WPS; + }; + + led-6 { + gpios = <&pio 57 GPIO_ACTIVE_HIGH>; + color = ; + function = LED_FUNCTION_WAN; + }; + + led-7 { + gpios = <&pio 68 GPIO_ACTIVE_HIGH>; + color = ; + function = LED_FUNCTION_USB; + }; + }; +}; + +&cpu0 { + proc-supply = <&rt5190_buck3>; +}; + +&cpu1 { + proc-supply = <&rt5190_buck3>; +}; + +&cpu2 { + proc-supply = <&rt5190_buck3>; +}; + +&cci { + proc-supply = <&rt5190_buck3>; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_flash_pins>; + status = "okay"; + + spi_nand: spi_nand@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "spi-nand"; + + reg = <0>; + + spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>; + spi-cal-addrlen = <5>; + spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>; + spi-cal-datalen = <7>; + spi-cal-enable; + spi-cal-mode = "read-data"; + + spi-max-frequency = <52000000>; + spi-rx-bus-width = <4>; + spi-tx-bus-width = <4>; + + partitions: partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "boot"; + reg = <0x0 0x200000>; + read-only; + }; + + partition@200000 { + label = "u-boot-env"; + reg = <0x200000 0x100000>; + }; + + partition@300000 { + label = "ubi0"; + reg = <0x300000 0x3200000>; + }; + + partition@3500000 { + label = "ubi1"; + reg = <0x3500000 0x3200000>; + read-only; + }; + + partition@6700000 { + label = "userconfig"; + reg = <0x6700000 0x800000>; + read-only; + }; + + partition@6f00000 { + label = "tp_data"; + reg = <0x6f00000 0x800000>; + read-only; + }; + }; + }; +}; + +ð { + pinctrl-names = "default"; + pinctrl-0 = <&mdio0_pins>; + status = "okay"; +}; + +&gmac0 { + status = "okay"; +}; + +&gmac1 { + phy-mode = "internal"; + phy-connection-type = "internal"; + phy = <&int_2p5g_phy>; + status = "okay"; +}; + +&gmac2 { + phy-mode = "usxgmii"; + phy-connection-type = "usxgmii"; + phy = <&phy0>; + status = "okay"; +}; + +&gsw_phy3 { + status = "disabled"; +}; + +&mdio_bus { + phy0: ethernet-phy@0 { + /* RTL8261N */ + compatible = "ethernet-phy-ieee802.3-c45"; + reg = <0>; + + reset-gpios = <&pio 3 GPIO_ACTIVE_LOW>; + reset-assert-us = <100000>; + reset-deassert-us = <100000>; + }; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + status = "okay"; + + rt5190a_64: rt5190a@64 { + compatible = "richtek,rt5190a"; + reg = <0x64>; + /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/ + vin2-supply = <&rt5190_buck1>; + vin3-supply = <&rt5190_buck1>; + vin4-supply = <&rt5190_buck1>; + + regulators { + rt5190_buck1: buck1 { + regulator-name = "rt5190a-buck1"; + regulator-min-microvolt = <5090000>; + regulator-max-microvolt = <5090000>; + regulator-allowed-modes = + ; + regulator-boot-on; + regulator-always-on; + }; + + buck2 { + regulator-name = "vcore"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1400000>; + regulator-boot-on; + regulator-always-on; + }; + + rt5190_buck3: buck3 { + regulator-name = "vproc"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1400000>; + regulator-boot-on; + }; + + buck4 { + regulator-name = "rt5190a-buck4"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <850000>; + regulator-allowed-modes = + ; + regulator-boot-on; + regulator-always-on; + }; + + ldo { + regulator-name = "rt5190a-ldo"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-boot-on; + regulator-always-on; + }; + }; + }; +}; + +&pcie0 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie0_1_pins>; + reset-gpios = <&pio 7 GPIO_ACTIVE_LOW>; + status = "okay"; + + pcie@0,0 { + reg = <0x0000 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + + mt7996@0,0 { + reg = <0x0000 0 0 0 0>; + }; + }; +}; + +&pio { + button_pins: button-pins { + pins = "GPIO_RESET", "GPIO_WPS"; + bias-disable; /* bias-disable */ + }; + + mdio0_pins: mdio0-pins { + mux { + function = "eth"; + groups = "mdc_mdio0"; + }; + + conf { + groups = "mdc_mdio0"; + drive-strength = ; + }; + }; + + i2c0_pins: i2c0-pins-g0 { + mux { + function = "i2c"; + groups = "i2c0_1"; + }; + }; + + pcie0_1_pins: pcie0-pins-g1 { + mux { + function = "pcie"; + groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0"; + }; + }; + + spi0_flash_pins: spi0-pins { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + }; + + enable-usb-power { + gpio-hog; + gpios = <32 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "USB power"; + }; +}; + +&ssusb1 { + status = "okay"; +}; + +&switch { + status = "okay"; + + ports { + port@0 { + label = "lan3"; + }; + + port@1 { + label = "lan2"; + }; + + port@2 { + label = "lan1"; + }; + + port@3 { + status = "disabled"; + }; + }; +}; + +&tphy { + status = "okay"; +}; + +&serial0 { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index 6b5c92086c..549489766c 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -214,6 +214,11 @@ teltonika,rutc50) totolink,x6000r) ucidef_set_led_netdev "wan" "wan" "green:wan" "wan" "link tx rx" ;; +tplink,be450) + ucidef_set_led_netdev "br-lan" "lan" "blue:lan" "br-lan" "link tx rx" + ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan-2ghz" "phy0.0-ap0" + ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan-5ghz" "phy0.1-ap0" + ;; tplink,fr365-v1) ucidef_set_led_netdev "port2-green-act" "port-2" "green:port2_act" "port2" "link tx rx" ucidef_set_led_netdev "port1-green-act" "port-1" "green:sfp" "port1" "link tx rx" diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index ba1465d83d..2ce5eb0f8e 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -159,6 +159,9 @@ mediatek_setup_interfaces() tplink,archer-ax80-v1) ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" eth1 ;; + tplink,be450) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 eth2" eth1 + ;; tplink,re6000xd) ucidef_set_interface_lan "lan1 lan2 eth1" ;; diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata index c92b2926fe..d51661a60d 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata @@ -35,6 +35,14 @@ case "$FIRMWARE" in ;; esac ;; +"mediatek/mt7996/mt7992_eeprom.bin") + case "$board" in + tplink,be450) + ln -sf /tmp/tp_data/MT7992_EEPROM.bin \ + /lib/firmware/$FIRMWARE + ;; + esac + ;; *) exit 1 ;; diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index 0516889959..86e0a02932 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -156,6 +156,7 @@ case "$board" in ;; mercusys,mr90x-v1|\ tplink,archer-ax80-v1|\ + tplink,be450|\ tplink,re6000xd) addr=$(get_mac_binary "/tmp/tp_data/default-mac" 0) [ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress diff --git a/target/linux/mediatek/filogic/base-files/lib/preinit/09_mount_cfg_part b/target/linux/mediatek/filogic/base-files/lib/preinit/09_mount_cfg_part index 1ef2c7c267..49aeb39eec 100644 --- a/target/linux/mediatek/filogic/base-files/lib/preinit/09_mount_cfg_part +++ b/target/linux/mediatek/filogic/base-files/lib/preinit/09_mount_cfg_part @@ -16,6 +16,7 @@ preinit_mount_cfg_part() { mercusys,mr80x-v3|\ mercusys,mr90x-v1|\ tplink,archer-ax80-v1|\ + tplink,be450|\ tplink,re6000xd) mount_ubi_part "tp_data" "tp_data" ;; diff --git a/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh index f9401b0389..57414837cb 100644 --- a/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh +++ b/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh @@ -43,6 +43,11 @@ preinit_set_mac_address() { addr=$(get_mac_binary "/tmp/tp_data/default-mac" 0) ip link set dev eth1 address "$(macaddr_add $addr 1)" ;; + tplink,be450) + addr=$(get_mac_binary "/tmp/tp_data/default-mac" 0) + ip link set dev eth1 address "$(macaddr_add $addr 1)" + ip link set dev eth2 address "$(macaddr_add $addr 2)" + ;; tplink,fr365-v1) lan_mac=$(strings /dev/mtd11 | grep 'option macaddr' | awk -F"'" '{print $2}') wan_mac="$(macaddr_add $lan_mac 1)" diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index 71e99dc78f..e6e5d27233 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -182,6 +182,7 @@ platform_do_upgrade() { mercusys,mr80x-v3|\ mercusys,mr90x-v1|\ tplink,archer-ax80-v1|\ + tplink,be450|\ tplink,re6000xd) CI_UBIPART="ubi0" nand_do_upgrade "$1" diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 94a12cfa57..31b3ecaad6 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -2234,6 +2234,21 @@ define Device/tplink_archer-ax80-v1 endef TARGET_DEVICES += tplink_archer-ax80-v1 +define Device/tplink_be450 + DEVICE_VENDOR := TP-Link + DEVICE_MODEL := BE450 + DEVICE_DTS := mt7988d-tplink-be450 + DEVICE_DTS_DIR := ../dts + DEVICE_PACKAGES := kmod-mt7992-firmware kmod-usb3 \ + mt7988-2p5g-phy-firmware mt7988-wo-firmware + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k + PAGESIZE := 2048 + IMAGE_SIZE := 51200k + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef +TARGET_DEVICES += tplink_be450 + define Device/tplink_re6000xd DEVICE_VENDOR := TP-Link DEVICE_MODEL := RE6000XD From 231bbe528d3f6ae4a43117b38c41a2f62896ce4e Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sun, 9 Nov 2025 12:55:18 +0100 Subject: [PATCH 27/27] bcm53xx: use -ENOENT error for TRX parser workaround patch Change return value from -EINVAL to -ENOENT for the TRX parser workaround patch as it's better suited and it's the common exit error for parser failing parsing for expected condition (partition not init, zero partition found in the schema, magic values not matching) Also this is needed for a pending upstream patch that will permit parser to fail and be skipped for subpartitions only with the -ENOENT error. Signed-off-by: Christian Marangi --- ...140-mtd-parsers-trx-parse-firmware-MTD-partitions-only.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/bcm53xx/patches-6.6/140-mtd-parsers-trx-parse-firmware-MTD-partitions-only.patch b/target/linux/bcm53xx/patches-6.6/140-mtd-parsers-trx-parse-firmware-MTD-partitions-only.patch index e1933e75c7..dbf4569b4e 100644 --- a/target/linux/bcm53xx/patches-6.6/140-mtd-parsers-trx-parse-firmware-MTD-partitions-only.patch +++ b/target/linux/bcm53xx/patches-6.6/140-mtd-parsers-trx-parse-firmware-MTD-partitions-only.patch @@ -36,7 +36,7 @@ Signed-off-by: Rafał Miłecki + /* Don't parse any failsafe / backup partitions */ + if (strcmp(mtd->name, "firmware")) -+ return -EINVAL; ++ return -ENOENT; + parts = kcalloc(TRX_PARSER_MAX_PARTS, sizeof(struct mtd_partition), GFP_KERNEL);