Goetz Goerisch [Mon, 24 Nov 2025 07:56:28 +0000 (08:56 +0100)]
odhcpd: update to Git HEAD (2025-11-23)
8a8bb3c1a673 src: consolidate and improve fallthrough 8ffe79e3f086 src: improve attributes 0a4d4e11c91c odhcpd: simplify signal handling 6af938921628 odhcpd: make ubus optional at runtime 7313ba262b76 odhcpd: update devel-build.sh 038a7bbfc30d dhcpv4: simplify random address selection 8c574bd2fe62 dhcpv6: prevent network loop scenario 76b2d00ee5f0 router: Modify relayed RA PIO L and RA M/O flags according to interface policy d236b2e0c53e github: ci: add MIPS64, PowerPC64 and RISCV64 d1500bb5d64d all: implement RFC8910 captive portal (CP) option 9830e5e2bf37 all: implement RFC8910 captive portal (CP) option for DHCPv4 9b9ea96ca90e statefiles: fix off-by-one-bug c10784ece29c dhcpv4: replace ToS precedence 24f013500691 dhcvp4: use tmp fd in dhcpv4_setup_interface() 3c32b27d8bab dhcpv4: simplify error handling in dhcpv4_setup_interface() 5b7cfef774fb dhcpv4: define val where it is used in dhcpv4_setup_interface() b0739f23c310 dhcpv4: add BPF to dhcpv4_setup_interface() 650a5df88eba ndp: correctness fix for BPF filter
tools: mtd-utils: fix patch 110 for musl
This patch is introducing the same header that the other patch
001-ubifs-utils-link-libmissing.a-in-case-execinfo.h-isn.patch
is guarding against missing in musl libc. We need to
mimic that.
1. Power on FWF-30E and interrupt to show bootmenu
2. Call "[I]: System information." -> "[S]: Set serial port baudrate."
and set baudrate to 9600 bps
3. Call "[R]: Review TFTP parameters.", check TFTP parameters and
connect computer to "Image download port" in the parameters
4. Prepare TFTP server with the parameters obtained above
5. Rename OpenWrt initramfs image to "image.out" and put to TFTP
directory
6. Call "[T]: Initiate TFTP firmware transfer." to download initramfs
image from TFTP server
7. Type "r" key when the following message is showed, to boot initramfs
image without flashing to spi-nor flash
"Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?"
8. On initramfs image, backup mtd if needed
minimum:
- "firmware-info"
- "kernel"
- "rootfs"
9. On initramfs image, upload sysupgrade image to the device and perform
sysupgrade
10. Wait ~200 seconds to complete flashing and rebooting.
If the device is booted with stock firmware, login to bootmenu and
call "[B]: Boot with backup firmware and set as default." to set the
first OS image as default and boot it.
Notes:
- Both colors of Bi-color LEDs on the front panel cannot be turned on at
the same time.
- "PWR" and "Logo" LEDs are connected to power source directly.
- The following partitions are added for OpenWrt.
These partitions are contained in "uboot" partition (0x0-0x1fffff) on
stock firmware.
(eth0): 70:4C:A5:xx:xx:42 (board-info, 0xd880 (hex))
WAN : 70:4C:A5:xx:xx:43
LAN 1 : 70:4C:A5:xx:xx:44
LAN 2 : 70:4C:A5:xx:xx:45
LAN 3 : 70:4C:A5:xx:xx:46
LAN 4 : 70:4C:A5:xx:xx:47
Andreas Gnau [Wed, 8 Oct 2025 21:00:44 +0000 (23:00 +0200)]
base-files: board_detect: make resilient against power-cuts
If board_detect is interrupted by cutting power on first boot,
board.json might only be half-way written and the file will not be
written again correctly on subsequent boots.
Write to a temporary file first, then rename. Since a rename on the same
file system is an atomic operation, it ensures that either
/etc/board.json does not exist or that the complete file exists.
* SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well
defined.
* SC2086 (info): Double quote to prevent globbing and word splitting.
* SC2091 (warning): Remove surrounding $() to avoid executing output
(or use eval if intentional).
kirkwood: add aliases and new partition for support D-Link DNS-325 A1
- Added fan0 alias
- Implemented LED aliases and thermal zones
- Restructured partitions: u-boot, u-boot-env, ubi
Signed-off-by: Konstantin Meshkov <skyline@mail.ru>
[ improve commit title ] Link: https://github.com/openwrt/openwrt/pull/17924 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
The D-Link DNS-325 A1 is NAS with 2x HDD (3.5 inch) bays, 1x 10/100/1000Base-T port and 1x USB 2.0 port
Device specification:
SoC: Marvell 88F6281-A1 1.2 GHz
RAM: 256 MB (2xSEC K4T1G084QF-HCF7:128Mx8 @400 CL6)
Flash: 128 MB (SAMSUNG 946 K9F1G08U0B PCB0)
SATA: 2x internal SATA II drives
Ethernet: 1x Gigabit (Marvell 88E1116R-NNC1)
LED: 7x (white: Power, white/red: Right SATA Activity, USB Activity, Left SATA Activity)
Key: 3x (Power, Reset, USB Copy/Unmount)
Serial: 5 pin header (RXD,GAP,3.3V,GND,TXD), (115200,8,N,1), 3.3V TTL
USB ports: 1x USB 2.0
Flash instruction:
NOTE: this process uses a serial connection. It will upgrade the bootloader and reset the bootloader environment variables
USB flash stick setup
Format to FAT32 without mbr
Copy these files to USB flash stick: dlink_dns-325-a1-initramfs-uImage dlink_dns-325-a1-squashfs-factory.bin dlink_dns-325-a1-squashfs-sysupgrade.bin u-boot.kwb (from u-boot-dns325 directory)
NAS setup
Connect LAN cable between router and NAS device
Connetc USB flash stick to NAS device
Connect serial to NAS device
Boot from new u-boot and install it
$ kwboot -p -b u-boot.kwb -B115200 -t /dev/ttyUSB0
Power on NAS
After download copleted and booted NAS device with new u-boot stop in bootloader by pressing any key
=> usb start
=> fatload usb 0 0x1000000 /u-boot.kwb
=> nand erase.part u-boot
=> nand write 0x1000000 u-boot ${filesize}
=> reset
Update MAC address in u-boot env
Stop in bootloader by pressing any key
Get your MAC address from label on chassis
=> setenv ethaddr XX:XX:XX:XX:XX:XX
=> saveenv
Install OpenWrt by flashing factory image from u-boot
=> usb start
=> fatload usb 0 0x1000000 /dlink_dns-325-a1-squashfs-factory.bin
=> nand erase.part ubi
=> nand write 0x1000000 ubi ${filesize}
=> reset
Based-on: #9296 Signed-off-by: Konstantin Meshkov <skyline@mail.ru>
[ refresh uboot patches ] Link: https://github.com/openwrt/openwrt/pull/17924 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Rany Hany [Sat, 8 Nov 2025 16:14:22 +0000 (16:14 +0000)]
wifi-scripts: ucode: fix bug moving to empty wifi-station config
When transitioning from a config with one or more wifi-stations, to a configuration
that has no wifi-station; the file would not be empty/reset and the old wifi-station
entries would remain.
This is because iface_wpa_stations and iface_sae_stations return early if there
are no wifi-stations present, which is an incorrect behavior as it causes the
file to actually have old entries.
'sae_password_file' and 'wpa_psk_file' are also set by default inside
of iface_auth_type to same path as the one used by wifi-station, so it
is indeed going to be set in the config and would contain the old
entries.
This happens with reload and wifi restart. So the only solution
would be to manually remove the file.
Rany Hany [Sun, 16 Nov 2025 14:37:49 +0000 (14:37 +0000)]
wifi-scripts: iface should be optional in wifi-station definition
Similar to "wifi-scripts: iface should be optional in wifi-vlan definition"
(98435a3), wifi-station iface should also be optional. By default, it is
supposed to match all interfaces if omitted.
Fixes: https://github.com/openwrt/openwrt/issues/20705 Signed-off-by: Rany Hany <rany_hany@riseup.net> Link: https://github.com/openwrt/openwrt/pull/20694 Signed-off-by: Robert Marko <robimarko@gmail.com>
Rany Hany [Mon, 24 Nov 2025 15:00:57 +0000 (15:00 +0000)]
wifi-scripts: ucode: fix wifi-vlan "network" option not working
The call to netifd.set_vlan(...) had an incorrect argument
order. It should be (interface, ifname, vlan) not
(interface, vlan, ifname). This prevented wifi-vlan's
"network" option from working as netifd was not able
to find the wifi-vlan section.
Fixes: https://github.com/openwrt/openwrt/issues/20705 Fixes: https://github.com/openwrt/openwrt/issues/20911 Signed-off-by: Rany Hany <rany_hany@riseup.net> Link: https://github.com/openwrt/openwrt/pull/20918 Signed-off-by: Robert Marko <robimarko@gmail.com>
This device has one USB2.0 port, plus ethernet, 2x wifi, ethernet, xPON
and VoIP.
Installation instructions: (Assuming root shell via SSH or serial)
1. Place OpenWrt TRX file on a USB stick formatted VFAT
2. Plug in the stick to the modem
3. Type: mtd write -f -e tclinux /mnt/usb2_sda1/<name of file>.trx tclinux
At this point, both OpenWrt and the vendor OS will be installed
because the device has space for two operating systems. Switch the OS
to boot to OpenWrt:
WARNING: While you can install with SSH alone, you need serial to use
OpenWrt on EcoNet devices because the Ethernet driver has not yet been
developed.
Rany Hany [Sun, 23 Nov 2025 23:21:29 +0000 (23:21 +0000)]
wifi-scripts: ucode: add missing config.auth_type assignment for psk2
This ends up breaking wifi-station and wifi-vlan as it depends on
config.auth_type being either psk or psk-sae. When set to psk2,
this would be unset causing that feature to not work.
See discussion in https://github.com/openwrt/openwrt/issues/20705#issuecomment-3568446006
Sven Eckelmann [Sun, 23 Nov 2025 16:31:35 +0000 (17:31 +0100)]
realtek: Fix alignment of parameters
The parameters must be aligned based on the last opened parenthesis
(+1). If this not a multiple of the tab size (8) then the rest
alignment must be done using spaces.
Sven Eckelmann [Sun, 23 Nov 2025 16:16:04 +0000 (17:16 +0100)]
realtek: Switch to kernel integer types
uint(8|16|32|64)_t and int(8|16|32|64)_t types should not be used in
kernel code. The shorter s(8|16|32|64) and u(8|16|32|64) or the
endianness specific versions (le*, be*) must be used instead.
Sven Eckelmann [Sun, 23 Nov 2025 16:03:03 +0000 (17:03 +0100)]
realtek: Use short name for "unsigned long int"
It is preferred in the Linux kernel to use the short type name
"unsigned long" instead of "unsigned long int". The same is true
for short and the signed version of the types.
Sven Eckelmann [Sun, 23 Nov 2025 16:01:34 +0000 (17:01 +0100)]
realtek: Keep return statements on new line
It is not allowed in the Linux kernel to have the condition and
the actual statement(s) on the same line. This is required to
make it easier to identify the body of an if/do/while/for/..
Sven Eckelmann [Sun, 23 Nov 2025 15:57:21 +0000 (16:57 +0100)]
realtek: Fix spaces around braces, ops and keywords
The Linux kernel coding style has strict rules when spaces must be
added around operations or after keywords. The whole list is to
complex to summarize it here but can be found at
https://www.kernel.org/doc/html/v6.17/process/coding-style.html
Sven Eckelmann [Sun, 23 Nov 2025 15:50:29 +0000 (16:50 +0100)]
realtek: Clean up global array definitions
Global array initialization must have the open brace on the first
line and the next lines must be intended by one level. The closing
brace must be one a separate line.
Sven Eckelmann [Sun, 23 Nov 2025 14:25:05 +0000 (15:25 +0100)]
realtek: pcs: Fix overflow in rtpcs_930x_sds_clock_wait
It can happen that the calculation `start + (HZ / 1000) * timeout`
overflows `unsigned long`. This must be handled correctly to avoid too long
waits. Luckily, the `time_before()` helper already does this.
Sven Eckelmann [Sun, 23 Nov 2025 14:17:52 +0000 (15:17 +0100)]
realtek: pcs: Reduce nesting during calibration
It is preferred in the kernel to have less nesting of scopes. More common
is to perform pre-condition checks (like error handlers) and then react to
them.
Sven Eckelmann [Sun, 23 Nov 2025 13:54:27 +0000 (14:54 +0100)]
realtek: pcs: Drop return on end of void functions
There is nothing to return from a void function. And it doesn't change the
execution flow. The return at the end of a void function is therefore just
a NOP.
Sven Eckelmann [Sun, 23 Nov 2025 13:44:11 +0000 (14:44 +0100)]
realtek: Avoid line continuations in quoted strings
It is preferred to have the whole quoted string on a single line to make it
easier to find these lines in the source code (while grep'ing). And since
these quotes are inside a string, they will also add unwanted whitespaces.
At the same time, add the missing newine at the end of the `pr_debug`
lines.
Sven Eckelmann [Sun, 23 Nov 2025 13:31:12 +0000 (14:31 +0100)]
realtek: mdio: Drop extern declaration for internal function
There is no external component using these functions and these functions
are local to the current translation unit. These functions can therefore be
declared static.
The currently unused *_field functions were kept because they might be used
in the future.
Sven Eckelmann [Sun, 23 Nov 2025 13:12:52 +0000 (14:12 +0100)]
realtek: Keep extern declaration in headers
The common declarations should not be spread around in different source
files but kept inside the header files. This is unfortunately currently not
the best place to store them because soc_info is actually from non-DSA
code. But it is at least better than having them in diffent source files.
Sven Eckelmann [Sun, 23 Nov 2025 12:23:52 +0000 (13:23 +0100)]
realtek: Fix block comment style
In net code, it is preferred to have block comments which
* either are one line: `/* ... */`
* multiple lines with:
- starting with the first comment line directly: `/* ...`
- each line is intended with the first asterisk: ` * ...`
- the last line is just the end of the comment: ` */`
Sven Eckelmann [Sun, 23 Nov 2025 11:49:24 +0000 (12:49 +0100)]
realtek: Remove extern from function declarations
In contrast to variables, functions don't need extern declarations. It is
also preferred in the kernel not to use extern in front of function
declarations.
The extern+static parts in clk-rtl83xx.c were skipped because they are a
little bit unexpected ("extern *_dram_set_rate" are never used, "static
_sram_set_rate" are used but should from the C code perspective always be
NULL). This is left for an interested reader with the correct test HW and
some interests to dig in the code from commit 4850bd887c3a ("realtek: add
RTL83XX clock driver") for the *_dram_set_rate -> *_sram_set_rate
relocation and how these SRAM function pointers are set in this translation
unit.
Sven Eckelmann [Sun, 23 Nov 2025 11:43:28 +0000 (12:43 +0100)]
realtek: Enclose complex macros in parentheses
The macros will be inserted as is by the pre-compiler into places which
uses them. This can cause weird effects because this can break the syntax
or the ordering of operations. Just adding parentheses can avoid a lot of
these unexpected effects.
(for even more complex, multi-expression macros, `do {...} while (0)` is
required).
Sven Eckelmann [Mon, 24 Nov 2025 07:54:30 +0000 (08:54 +0100)]
realtek: dsa: Build check size of drop counter names
The commit 1cfd45ae0bad ("realtek: Add debugfs support for RTL9300") caused
previously an out of bounds access on the array holding the names of drop
counters (and incorrect names in the output) fur RTL839x because of a
missing comma. To avoid such situation in the future, calculate the size of
the array during compilation. And to ensure that this count matches the
actual number of counters in HW, compare this number during compile time
with the expected value.
Suggested-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Sven Eckelmann <sven@narfation.org> Link: https://github.com/openwrt/openwrt/pull/20905 Signed-off-by: Robert Marko <robimarko@gmail.com>
Sven Eckelmann [Sun, 23 Nov 2025 14:42:20 +0000 (15:42 +0100)]
realtek: dsa: rtl839x: Fix incorrect drop counter names
The counter names "CFM" and "VLAN_IGR_FLTR" were not separated by a comma
in the `rtl839x_drop_cntr` array. As result, these two headers were merged
to a single header "CFMVLAN_IGR_FLTR" and everything after that was shifted
by one. The last name (for the 45th counter) was also not defined and was
therefore accessing data outside the array.
Fixes: 1cfd45ae0bad ("realtek: Add debugfs support for RTL9300") Signed-off-by: Sven Eckelmann <sven@narfation.org> Link: https://github.com/openwrt/openwrt/pull/20905 Signed-off-by: Robert Marko <robimarko@gmail.com>
Jan Hoffmann [Thu, 20 Nov 2025 17:24:44 +0000 (18:24 +0100)]
mediatek: filogic: add factory image for Asus TUF-AX4200
The initramfs.trx image can be flashed from the web interface of factory
firmware.
Unfortunately, the default boot command of the bootloader does not load
the ramdisk in the FIT image. This means that the image can only be
built when the option TARGET_ROOTFS_INITRAMFS_SEPARATE is disabled.
Tested with firmware 3.0.0.4.388_33965 (U-Boot 2022.10 / 2.0.0.5).
1. Download the OpenWrt initramfs image. Copy the image to a TFTP server
2. Connect the TFTP server to the EAX17. Conect to the serial console,
interrupt the autoboot process by pressing '0' when prompted.
3. Download & Boot the OpenWrt initramfs image.
$ tftpboot openwrt.bin
$ bootm
4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device
using scp and install using sysupgrade.