Commit Graph

66801 Commits

Author SHA1 Message Date
Jonas Jelonek
56a71f3c82 realtek: pcs: move polarity into SerDes struct
As a first real usage of the new SerDes struct, move the polarity
configuration there. It was previously located in the global rtpcs_ctrl
struct as an array, indexed by SerDes id. Because this is per-SerDes
information, the new SerDes struct is the correct place to live in.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21146
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 13:37:32 +01:00
Jonas Jelonek
18eea05483 realtek: pcs: drop unneeded SerDes number range checks
By using references to pre-initiated SerDes instances instead of plain
SerDes number, there is no need to check for the range anymore in
various places. During driver/pcs init it is ensured that only valid
SerDes will reach the configuration functions.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21146
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 13:37:32 +01:00
Jonas Jelonek
d8dd8bd88f realtek: pcs: make use of SerDes struct in set_autoneg
Also switch set_autoneg (and related helper rtpcs_sds_modify) to the
SerDes struct instead of the plain SerDes id by using just the reference
to the SerDes instance instead of (ctrl, sds_id) tuple. This completes
the transition.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21146
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 13:37:32 +01:00
Jonas Jelonek
1fccb0eb16 realtek: pcs: make use of SerDes struct in SerDes setup
Make use of the previously added SerDes struct in SerDes setup and all
functions in its call path by removing (ctrl, sds_num) being passed to
every function call and instead just pass the reference to the
corresponding SerDes instance.

Various SerDes calculations for even, odd and neighbor are unified by
switching to previously introduced helpers.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21146
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 13:37:32 +01:00
Jonas Jelonek
4d9400f86b realtek: pcs: switch to id from SerDes struct
Drop usage of the to-be-phased-out SerDes id stored in rtpcs_link and
use the reference to the SerDes instance to use the embedded id in
rtpcs_serdes instead.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21146
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 13:37:32 +01:00
Jonas Jelonek
69bbcc685b realtek: pcs: assign SerDes reference upon PCS creation
Upon creation of a phylink_pcs instance by calling rtpcs_create, assign
a reference to the corresponding SerDes to the link structure. In the
next step, this should be used everywhere instead of the plain SerDes
number.

Rename the field used to hold the SerDes number from 'sds' to 'sds_num'
and name the new field 'sds' to make clear what is what.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21146
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 13:37:32 +01:00
Jonas Jelonek
232c1fb14a realtek: pcs: add helpers for even, odd, neighbor SerDes
Add dedicated helpers to get references to even, odd and neigbor SerDes
if needed. This should replace the various calculations scattered
throughout the code, providing a unified way to work with adjacent
SerDes.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21146
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 13:37:32 +01:00
Jonas Jelonek
6b3f8fb16f realtek: pcs: add separate SerDes struct
Add a separate structure for a SerDes. This is needed to appropriately
store per-SerDes information, which in turn is needed for future work.
Additionally, it's intended to reduce boilerplate and several
inconsistencies.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21146
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 13:37:32 +01:00
Jonas Jelonek
6cf33aacfe realtek: pcs: use per-variant SerDes count
Use a separate configuration field for the number of SerDes for each
variant of the Realtek Otto family. Add this field to the config
structure, assign it and use it during driver probe. This narrows
possible error cases and is needed for upcoming extensions.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21146
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 13:37:32 +01:00
Jonas Jelonek
a4d6e10bf2 realtek: pcs: add dedicated enum for SerDes modes
The Realtek SerDes mode capabilities do not map 1:1 to the
PHY_INTERFACE_MODE_* modes used in the kernel and passed to the PCS.
For example, some PHY chips use the proprietary XSGMII mode for which
there isn't an equivalent in the kernel, or HSGMII.

In the past, this led to problems and confusion using kernel's XGMII to
handle the XSGMII mode, and needed a downstream patch for HSGMII. They
have been solved/worked around for now, but XSGMII is currently not
implemented at all. And who knows what might come in the future.

To make our life easier, introduce a dedicated internal representation
of SerDes modes which differs from kernel's PHY_INTERFACE_MODE_*. This
allows us to map "external" modes to different internal modes as needed
instead of carrying the PHY_INTERFACE_MODE_* through the whole SerDes
configuration code. The PCS driver needs to map PHY_INTERFACE_MODE_* to
RTPCS_SDS_MODE_* in pcs_config, and the latter should be used as the
only one.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21146
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 13:37:31 +01:00
Jonas Jelonek
decc4f6ba8 realtek: pcs: rtl930x: drop unused and broken function
Drop the unused and broken function rtpcs_930x_sds_clock_wait from the
PCS driver. The proper working variant is already some lines above and
called rtpcs_930x_sds_wait_clock_ready.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21146
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 13:37:31 +01:00
Jonas Jelonek
a58e41e522 realtek: pcs: drop PCS creation without SerDes ref
Since the beginning, the PCS driver had the ability to call its
rtpcs_create without a reference to a valid PCS node. A comment in the
code mentions that this is done for RTL838X and its built-in octa-PHY
which is connected directly instead of via a SerDes. Further
explanations are not provided.

Drop this ability and make the rtpcs_create call in the dsa driver
conditional. As the built-in PHY of RTL838X isn't attached to a SerDes,
there is no obvious point of having the PCS driver in that chain. The
ports are marked as internal and have no pcs-handle, thus no phylink_pcs
instance should be created.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21146
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 13:37:31 +01:00
Jonas Jelonek
8e4730fd60 realtek: mdio-serdes: improve debugfs creation
Commit 3c073b5cb2 cleaned up the debugfs creation in
mdio-realtek-otto-serdes driver to not explicitly check if the root
directory already exists. This is fine because kernel handles the case
properly so there's no need to check anymore.

However, this pollutes the boot log with:
[..] debugfs: 'realtek_otto_serdes' already exists in '/'
[..] debugfs: 'realtek_otto_serdes' already exists in '/'
[..] debugfs: 'realtek_otto_serdes' already exists in '/'
[..] debugfs: 'realtek_otto_serdes' already exists in '/'
[..] debugfs: 'realtek_otto_serdes' already exists in '/'
[..] debugfs: 'realtek_otto_serdes' already exists in '/'
[..] debugfs: 'realtek_otto_serdes' already exists in '/'
[..] debugfs: 'realtek_otto_serdes' already exists in '/'
[..] debugfs: 'realtek_otto_serdes' already exists in '/'
[..] debugfs: 'realtek_otto_serdes' already exists in '/'
[..] debugfs: 'realtek_otto_serdes' already exists in '/'

Now, the root directory creation is attempted multiple times, causing
the kernel to print an error message because the directory already
exists.

Fix this by moving the SerDes loop into rtsds_debug_init and only try
to create the root debugfs directory once.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21179
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 13:11:34 +01:00
Christoph Krapp
3045f205b3 ipq40xx: convert Orbi led labels to function/color
The eight leds controlled by the LED controller are RGB leds themselves
but are flashing white by default. The color part is controlled by GPIOs
53 (green), 54 (red), 57 (blue) and 60 (white).
Therefore define the led nodes of the controller as white instead of RBG
as well as backlight as their function.

Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20877
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 10:29:33 +01:00
Christoph Krapp
f0909f7a05 ipq40xx: fix second 5ghz radio on Netgear RBx40
When support was added for the RBR40 and RBS40 it was assumed that they
also share the same second 5ghz wifi chip as their bigger siblings.
Turns out that instead of QCA9984 (RBx50, SRx60) these devices use
QCA9886 like the RBx20 devices to.
They also load different boardfiles for the IPQ4019 chip.

This moves the wifi nodes from the orbi.dtsi to each device dts file and
change the RBx40 boardfile variants.

Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20877
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 10:29:33 +01:00
Christoph Krapp
e9d6015bef ipq-wifi: add entry for Netgear RBK40
Add boardfile override packages for Netgear RBK40 devices.

Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20877
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 10:29:33 +01:00
Christoph Krapp
0f0f578d0a ipq40xx: fix Netgear RBR40 wan mac
The WAN port currently has the same MAC set as all the other LAN ports.
Fix this by adding the missing case in ipq40xx_setup_macs().

Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20877
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 10:29:32 +01:00
Christoph Krapp
314dbb7fec ipq40xx: split orbi devices in router and satellite
Netgear Orbi devices are split into router and satellite units. Even
though the hardware is mostly the same, the network configuration is
different. Router units have a designated WAN port while satellite units
have all available ports labeled as "Ethernet".
This splits the device trees into both unit types and adjusts the port
labels.

Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20877
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 10:29:32 +01:00
Robert Marko
4e688db5a8 ipq-wifi: update to Git HEAD (2025-12-16)
10eddd6f1cba qca4019: qca9888: add bdfs for Netgear RBK40

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 10:27:47 +01:00
Christoph Krapp
f0c5348775 qualcommax: ipq807x: use ascii-env driver for Linksys MX4200v1
Just like it has already been changed for v2, use the ascii-eq-delim-env
driver to extract the label mac from the devinfo partition.

Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20732
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-16 10:22:33 +01:00
Mario Andrés Pérez
d871e95e7f sunxi: image: sync target profiles names with DT compatible
Following up with errors reported in the ASU repo, these bananapi cases
do not match the DT compatible "bpi", sync with dts sources.
Also some profiles were overwriting SUPPORTED_DEVICES.
Sysupgrade would be failing in SUPPORTED_DEVICES check since
the DT compatible(/tmp/sysinfo/board_name) is not in SUPPORTED_DEVICES.
This should also fix errors when using ASU sysupgrade clients.
- Sync profile makefile target names with DT compatibles.
- Fix overwrites of SUPPORTED_DEVICES instead of appending.
- Adapt the uboot-sunxi profiles accordingly.
*bpi-p2-zero dts is still not upstream.

V2:
- Include fixes for arm926ejs(ARM926EJ-S) subtarget (LicheePi Nano and
PopStick v1.1) (profile rename for correct default SUPPORTED_DEVICES)

Fixes: https://forum.openwrt.org/t/luci-attended-sysupgrade-support-thread/230552/246
Fixes: https://github.com/openwrt/asu/issues/486
Fixes: https://github.com/openwrt/asu/issues/524
Fixes: 9aa66b8ce7 "sunxi: add support for Banana Pi M2 Berry"
Fixes: d5f615bf2a "sunxi: add support for Sinovoip Banana Pi M2 Plus"
Fixes: 3819c1638a "sunxi: Add support for Banana Pi M2 Ultra"
Fixes: 6bf8193b25 "sunxi: add support for Bananapi P2 Zero"
Fixes: 80edfaf675 "sunxi: add support for Banana Pi M3"
Fixes: 3c24a1d423 "sunxi: add support for NanoPi NEO Plus2 board"
Fixes: a689307c97 "sunxi: build image/uboot for the NanoPi NEO2"
Fixes: fde68cb809 "sunxi: add support for FriendlyARM NanoPi R1S H5"
Fixes: 3ec468ff4f "sunxi: add F1C100 (arm926ej-s) support"

Signed-off-by: Mario Andrés Pérez <mapb_@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21095
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-16 01:44:34 +01:00
Karsten Sperling
63bf77b801 scripts,ipkg-build: Fix error message for invalid package name
Use the correct variable ($pkg instead of $name) in the error message.

Signed-off-by: Karsten Sperling <ksperling@apple.com>
Link: https://github.com/openwrt/openwrt/pull/20077
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-16 01:39:54 +01:00
Hauke Mehrtens
5b0617ae1f libcap: Revert "libcap: update to 2.77"
This reverts commit c25265953b.

Linking of libpsx.so from libcap 2.77 fails on powerpc 464fp. Revert
back to the older version which works.

Bug report: https://bugzilla.kernel.org/show_bug.cgi?id=220860
Fixes: c25265953b ("libcap: update to 2.77")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-16 01:24:47 +01:00
Martin Nadvornik
e5cd6461c9 mediatek: fix IPv4 address missing on interface in failsafe mode for cudy ap3000-v1
cudy ap3000-v1 did not work correctly in failsafe mode
because the address 192.168.1.1 was missing on the eth0 inteface.
it was reachable via it's IPv6 link-local address however.
this commit fixes the issue.

Fixes: https://github.com/openwrt/openwrt/issues/20750
Signed-off-by: Martin Nadvornik <martin.nadvornik@gmx.at>
Link: https://github.com/openwrt/openwrt/pull/21172
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-16 00:17:32 +01:00
Rany Hany
36da03a6c1 wifi-scripts: ucode: improve formatting of expected throughput
Convert to MBit/s like all other fields and specify the unit.
Most users probably aren't aware that this is in kilobits/s.

Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/20567
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-15 12:39:14 +01:00
Rany Hany
1ead4e6e16 wifi-scripts: add support for using list for iface in wifi-station/vlan
This is a trivial change to allow users to use 'list' on iface.
Old wifi-scripts already implements this, so this just ensures
that shell-based and ucode wifi-scripts are on-par with each other.

Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/20977
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-15 12:30:15 +01:00
Rany Hany
211b11a56e wifi-scripts: fix broken match all case for wifi-vlan
When iface is omitted, wifi-vlan will apply to all interfaces.
However, netifd.set_vlan call is not successful as it assumes
that every wifi-vlan section corresponds to one VIF.

For this reason in the wifi-vlan case (cur_type == "vlan")
we create a composite key in the form `${vif.name}/${vlan.name}`
allowing the same vlan section to correspond to multiple VAPs.
`/` was decided as a delimiter as it is an invalid character
for a network interface name and UCI identifier; so it is
impossible for it to cause conflicts.

It was verified that the `ubus call network.wireless status`
works as expected with this change. Moreover, wifi-station
is not susceptible to this problem.

This also means that it is now possible for wifi-vlan
to support `list` iface similar to old shell-based wifi-scripts.
This will be done in a follow-up commit.

Fixes: 98435a37a7 ("wifi-scripts: iface should be optional in wifi-vlan definition")
Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/20977
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-15 12:30:15 +01:00
Robert Marko
b4bc9ed318 ipq-wifi: update to Git HEAD (2025-12-15)
c6202981872e ipq5018: use correct board for GL-iNet B3000 IPQ5018 radio
ec72376cadf1 qca4019: Add Meraki Underdog
059b7114c77b ipq6018: add tp-link eap620hd v2

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-15 09:55:56 +01:00
Shiji Yang
852d17ed82 kernel: rtl836x: remove legacy platform_data support
There are no platform_data based devices using it anymore. Also move
header files to the driver folder.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21138
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-15 09:31:20 +01:00
Markus Stockhausen
a4011797c2 realtek: use devm_kzalloc() for serdes debugfs setup
This will free memory automatically during driver unloading.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21157
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-15 09:29:17 +01:00
Markus Stockhausen
3c073b5cb2 realtek: cleanup debugfs creation in serdes driver
debugfs_create_dir() has a proper logic to handle existing directories.
Skip the manual test. Additionally quit early if directory creation fails.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21157
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-15 09:29:17 +01:00
Markus Stockhausen
dcbc8722e9 realtek: simplify backing serdes calculation
Calculating the backing serdes of a given frontend serdes does
not need any info about the control structure. Drop the reference.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21157
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-15 09:29:17 +01:00
Álvaro Fernández Rojas
ff4546093e odhcpd: update to Git HEAD (2025-12-13)
cf51aeb93220 odhcpd: fix captive_portal_uri reset
e8b7fdea8d5e dhcpv4: fix DNS server option
b84553e496a3 router: Modify relayed RA PIO P flag according to interface policy
da3e2a9829cc router: Modify relayed RA PIO A flags according to interface policy
bad7138b70f0 README.md: update dhcp ubus events

ca00527e5f...cf51aeb932

Also remove duplicated /usr/share/libubox/jshn.sh include.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-12-13 13:01:45 +01:00
David Woodhouse
24b8db118b image: add CONFIG_EXTRA_IMAGE_NAME
This allows an optional tag to be put in the .config file which is
included in the filename of the resulting images, so it's easier to
build images with different functionality for the same target hardware.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Link: https://github.com/openwrt/openwrt/pull/20984
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2025-12-12 22:06:06 +00:00
Paul Donald
b15628ec80 apk: bump to 3.0.2
We drop patch 0020-apk-fix-compile: integrated at source.
Compressed help now functions normally.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21127
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-12 13:59:39 +01:00
David Härdeman
52fa3728e5 base-files: always generate default DUID
The previous logic was copied from 12_network-generate-ula, but fails to
account for upgrades where the "auto" value isn't set (it is set by
base-files/files/bin/config_generate). Fix this to always set the
default duid if it isn't set.

Also, rename the file to better reflect what it does.

Closes: #21029
Fixes: a660a076db ("base-files: generate a global DHCP DUID")
Link: https://github.com/openwrt/openwrt/pull/21118
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [fixes,closes tag]
2025-12-11 06:39:34 +00:00
Shiji Yang
86bd55c4fd bcm27xx: fix patch wrong CRLF line-ending
Use Unix LF style instead of Windows CRLF style.

Fixes: 738876e76b ("kernel: bump 6.12 to 6.12.58")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20973
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-11 00:26:37 +01:00
Chukun Pan
bb2d9c1a65 arm-trusted-firmware-mediatek: remove DDR combo for MT7987
The DRAM_USE_COMB option is only valid for the MT7988. There
is no DRAM type selection for the MT7987, so remove it.

Fixes: de8fc8b ("arm-trusted-firmware-mediatek: add builds for MT7987")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/21000
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-11 00:00:51 +01:00
Chukun Pan
f037a2e8bb arm-trusted-firmware-mediatek: add MT7987 DDR4 4BG images
Add the DDR4_4BG_MODE option, which supports 4GB DDR4 RAM
for the MT7987 and 8GB DDR4 RAM for the MT7988. If this mode
is not enabled, bl2 can only recognize half the size of RAM.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/21000
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-11 00:00:51 +01:00
Chukun Pan
3b14ace444 arm-trusted-firmware-mediatek: add MT7981 sdmmc images
Add bl2 images for mt7981 sdmmc ddr4 devices.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/21000
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-11 00:00:50 +01:00
Chukun Pan
69918d1e0b arm-trusted-firmware-mediatek: rearrange some images
Rearrange some images to maintain consistency.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/21000
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-11 00:00:50 +01:00
Qingfang Deng
8b05db405b kernel: add network teaming modules
Teaming is a link aggregation implementation similar to bonding, but
it's configured by a userspace program.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21120
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-10 23:54:39 +01:00
Shine
be7aa5bda4 mpc85xx: add support for Watchguard Firebox T10-W, T15(-W)
This commit adds support for the Watchguard Firebox models
T10-W, T15 and T15-W.

CPU:      Freescale P1010
RAM:      512MB (T10) / 1024MB (T15)
Flash:    1MB SPI-NOR, 512MB NAND (T10) / 1024MB NAND (T15)
WiFi:     802.11abgn 2T2R AR9582 based Mini-PCIe card (-W models only)
Ethernet: 3x GBE (via AR8033 PHY)
LEDs:     7x hard-wired (6x LAN, 1x Power)
          4x GPIO single-colored (Attn/Status/Mode/Failover)
          1x GPIO dual-colored (2.4/5G WiFi, -W models only)
Serial:   RJ45, Cisco pinout, 115200/8N1
Other:    Battery backed RTC
          Atmel TPM 1.2 chip (unsupported)

Based on 35f6d79, which introduced Watchguard Firebox T10 support.

The T10 and T15 are identical hardware, with the exception of the T15
having twice the flash and RAM size.

The T10-W and T15-W models have their Mini-PCIe slot populated with an ath9
(AR9582) based WiFi card. The slot is either unpopulated or empty for
non-WiFi models. All required drivers are present by default on the mpc85xx
target, so T10/T10-W resp. T15/T15-W can use the same OpenWrt image.

This commit also introduces the zImage loader from 7d768a9 to boot the
kernel. This is required, since the U-Boot version used in these devices
appears to have a hard limit of 16MB for the kernel size it can handle. The
current kernel size is around 17MB, though, due to kernel page alignment
required for memory protection.

Installation (replaces previous instructions for T10):

1. If the U-Boot password is known, proceed with step 2.

   If the U-Boot password is unknown, dump the NOR flash using a SPI
   programmer and patch the unknown password to a known one. You can use
   blocktrron's Python script:

   https://github.com/blocktrron/t10-uboot-patcher/

   This script will patch the password to '1234' (without quotes).

   Alternatively, you can search for the hashed password in the NOR dump
   yourself and overwrite it with a known one. The SHA1 hash is:

   E597301A1D89FF3F6D318DBF4DBA0A5ABC5ECBEA

   Write the patched NOR dump back to the device.

2. Connect the device via serial cable, power it on and interrupt
   the boot process by pressing Ctrl+C. Enter the U-Boot password to access
   the CLI.

3. (Optional) Populate the uboot-env partition by entering:

   saveenv

   This will allow you to use uboot-envtools from within OpenWrt later,
   e.g. to increase the loadable kernel size.

   The default loadable kernel size is 5MB, the compressed kernel size at
   the time of this commit is 3.1MB.

4. Serve the initramfs OpenWrt image from a TFTP server at 10.0.1.13/24,
   connected to eth0 (WAN) of the device. File name must be 'uImage'. Boot
   with:

   tftpboot; bootm;

   Make sure to use the correct image for your device (T10 resp. T15)!

5. After booting, connect to OpenWrt on eth1 (LAN) via SSH. Verify
   that the UBI partiton is mtd7, format it and install the sysupgrade
   image.

   $ cat /proc/mtd
   $ ubiformat /dev/mtd7 -y
   $ sysupgrade -n <path to sysupgrade.bin>

6. The device should now boot OpenWrt from NAND flash. Enjoy.

Back to stock:

Use the vendor recovery procedure.

Stock recovery might also be necessary in case you have accidentally used
the fw_setenv command from within OpenWrt without using saveenv in U-Boot
first.

In order to use the vendor firmware recovery procedure, the NAND partitions
mtd3 to mtd6 must remain intact. Make sure not to overwrite them, or keep
dumps of them for later recovery.

Signed-off-by: Shine <4c.fce2@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16776
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-10 23:48:48 +01:00
Shine
15ef024805 mpc85xx: p1010: use common DTSI for Watchguard Firebox T1X
In preparation of adding support for additional Watchguard Firebox devices
based on Freescale P1010, introduce a common DTSI.

Signed-off-by: Shine <4c.fce2@proton.me>
Link: https://github.com/openwrt/openwrt/pull/16776
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-10 23:48:48 +01:00
Hauke Mehrtens
e40ca676ee ucode: update to Git HEAD (2025-12-01)
afe4be60628a lib/fs: fix return value for flush
5f08ecf8e372 lib/uloop: fix return value doc for run()
1affe484f302 lib/uloop: pass eof and error to cb
559860cbd76d lib: introduce io library
ef07e2448a56 vm: optimize string+string concat with ucv_string_alloc

Changes: 48ed18d253...f7c2b97a82

Backport PR to fix compilation with Ubuntu 18.04:
https://github.com/jow-/ucode/pull/355

Link: https://github.com/openwrt/openwrt/pull/21100
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-10 23:38:08 +01:00
Nick Hainke
c25265953b libcap: update to 2.77
Update to latest release.

Add patch `003-Revert-libcap-Add-build-ldflags-to-_makenames-rule.patch`
to fix errors in the form of:
```
/usr/bin/ld.bfd: /external-toolchain/openwrt-toolchain-x86-64_gcc-14.3.0_musl.Linux-x86_64/toolchain-x86_64_gcc-14.3.0_musl/lib/libc.a(__stack_chk_fail.o): relocation R_X86_64_32 against symbol `__stack_chk_guard' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld.bfd: /external-toolchain/openwrt-toolchain-x86-64_gcc-14.3.0_musl.Linux-x86_64/toolchain-x86_64_gcc-14.3.0_musl/lib/libc.a(strerror.o): relocation R_X86_64_32 against `.rodata.errmsgstr' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld.bfd: /external-toolchain/openwrt-toolchain-x86-64_gcc-14.3.0_musl.Linux-x86_64/toolchain-x86_64_gcc-14.3.0_musl/lib/libc.a(realloc.o): relocation R_X86_64_32S against hidden symbol `__malloc_size_classes' can not be used when making a PIE object
/usr/bin/ld.bfd: /external-toolchain/openwrt-toolchain-x86-64_gcc-14.3.0_musl.Linux-x86_64/toolchain-x86_64_gcc-14.3.0_musl/lib/libc.a(__stdout_write.o): relocation R_X86_64_32S against hidden symbol `__stdio_write' can not be used when making a PIE object
/usr/bin/ld.bfd: /external-toolchain/openwrt-toolchain-x86-64_gcc-14.3.0_musl.Linux-x86_64/toolchain-x86_64_gcc-14.3.0_musl/lib/libc.a(ofl.o): relocation R_X86_64_32 against `.bss.ofl_lock' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld.bfd: /external-toolchain/openwrt-toolchain-x86-64_gcc-14.3.0_musl.Linux-x86_64/toolchain-x86_64_gcc-14.3.0_musl/lib/libc.a(stderr.o): warning: relocation against `__stderr_FILE' in read-only section `.rodata.stderr'
/usr/bin/ld.bfd: /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x12): undefined reference to `__libc_csu_fini'
/usr/bin/ld.bfd: (.text+0x19): undefined reference to `__libc_csu_init'
collect2: error: ld returned 1 exit status
```

Changes: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/diff/?id=v1.2.77&id2=v1.2.69&dt=2

The apk size did not increase much:
Old size for armsr/armv8:
 16245 libcap-2.69-r1.apk

new size for armsr/armv8:
 16315 libcap-2.77-r1.apk

Signed-off-by: Nick Hainke <vincent@systemli.org>
Link: https://github.com/openwrt/openwrt/pull/20881
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-10 23:31:38 +01:00
Hauke Mehrtens
afdbdbae3b bridger: update to Git HEAD (2025-10-23)
856921fb2062 nl: improve polling
a40cb7994e92 nl: handle netlink socket buffer overflow
9fc2bc3e3d4d bpf: skip all multicast packets

Changes: 95125f0b0b...9fc2bc3e3d

Link: https://github.com/openwrt/openwrt/pull/21104
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-10 23:29:24 +01:00
Hauke Mehrtens
367d8b2115 nftables: update to version 1.1.6
Announcement: https://lwn.net/Articles/1049470/
Changes: https://git.netfilter.org/nftables/diff/?id=v1.1.6&id2=v1.1.5&dt=2

The apk size did not increase much:
Old size for armsr/armv8:
318457 nftables-json-1.1.5-r1.apk

new size for armsr/armv8:
327941 nftables-json-1.1.6-r1.apk

Link: https://github.com/openwrt/openwrt/pull/21096
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-10 23:26:39 +01:00
Hauke Mehrtens
f26294f161 libnftnl: update to version 1.3.1
Announcement: https://lwn.net/Articles/1049279/
Changes: https://git.netfilter.org/libnftnl/diff/?id=libnftnl-1.3.1&id2=libnftnl-1.3.0&dt=2

The apk size did not increase much:
Old size for armsr/armv8:
 62606 libnftnl11-1.3.0-r1.apk

new size for armsr/armv8:
 64212 libnftnl11-1.3.1-r1.apk

Link: https://github.com/openwrt/openwrt/pull/21096
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-10 23:26:31 +01:00
Hauke Mehrtens
4e06003d06 libnl: update to version 3.12
Changes: https://github.com/thom311/libnl/compare/libnl3_11_0...libnl3_12_0

The apk size did not increase much:
Old size for armsr/armv8:
   767 libnl200-3.11.0-r1.apk
 13480 libnl-cli200-3.11.0-r1.apk
 44511 libnl-core200-3.11.0-r1.apk
  9101 libnl-genl200-3.11.0-r1.apk
 32485 libnl-nf200-3.11.0-r1.apk
185723 libnl-route200-3.11.0-r1.apk

new size for armsr/armv8:
   764 libnl200-3.12.0-r1.apk
 13471 libnl-cli200-3.12.0-r1.apk
 45031 libnl-core200-3.12.0-r1.apk
  9098 libnl-genl200-3.12.0-r1.apk
 32479 libnl-nf200-3.12.0-r1.apk
193131 libnl-route200-3.12.0-r1.apk

Link: https://github.com/openwrt/openwrt/pull/21097
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-10 23:24:22 +01:00