The BPi-R4 Lite uses the same defaults like all other BananaPi boards
to store the bootloader environment on the boot media.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The BPi-R4 Lite is a WiFi-7 router board based on the MT7987 SoC.
Specification :
- SOC: Mediatek MT7987A (4x Cortex-A53
- RAM: 2GB
- Flash: 32MB SPI NOR, 256MB SPI NAND, 8GB eMMC
- Switch: MediaTek MT7531AE
- Ports : 4x LAN (1G), 1x SFP (via MT7531), 1x WAN (2.5G)
- Buttons : Reset & WPS/Mesh
- LEDs : Status (PWM), SFP
- USB: on-board VIA VL817 USB3.1/USB2.0 hub
* 1 - mPCIe B (SIM3)
* 2 - NGFF-KEYB (SIM1)
* 3 - USB-A connector
* 4 - mPCIe A (SIM4)
- mPCIe: 1x 8GT/s x2 or 2x 8GT/s x1 (configurable via bootloader)
- RTC: PCF8563
- mikroBUS socket with SPI, I2C and full UART
- on-board HT42B534 USB-to-serial for Type-C console port
- Power: USB Type-C PD 20V, or DC via barrel connector or JST-VH 3.96
Installation:
Uncompress *sdcard.img.gz and write to microSD card, eg. using 'dd'.
Use bootloader menu on the serial console to install SPI-NAND or SPI-NOR,
once installed to SPI-NAND you can use the bootloader menu to install to
eMMC. See instructions for BananaPi R3 for details.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The BPi R4 Lite can boot from microSD, SPI-NAND, SPI-NOR and eMMC.
Build menu-driven U-Boot for each storage option.
Provide options for installation from microSD to SPI-NAND and SPI-NOR,
and from SPI-NAND to eMMC (similar to BPi-R3).
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Import and clean DT and DT-overlay files from MediaTek's SDK to build
an image with various DT-overlays for the MT7987 reference board.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Import patches to use cpufreq voltage calibration data from the efuse on
MT7988, and add support for MT7987.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The MT7987 has two LVTS thermal sensors, one covering all CPU cores,
and one for the built-in 2.5GE PHY.
Add support for MT7987 to the LVTS thermal driver.
Thanks to Chad Monroe of Adtran for providing cleaned up patches for
Linux 6.6 which have been ported to Linux 6.12.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Compared to MT7988 (NETSYSv3) the Ethernet Frame Engine of MT7987
has been slighly updated (NETSYSv3.1), among other things the packet
scheduler (shaper) has apparently been reworked.
Import patches for basic support of the Ethernet Frame Engine of the
MT7987 SoC.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The MT7987 is mostly a stripped-down low-pin-count version of the
MT7988 without the 10GBit/s SerDes. Most existing drivers can be reused.
Import to-be-sent-upstream patches doing all the groundwork for
basic support for the MT7987 SoC, adding clk, pinctrl and pwm support.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Build the (upstream) configuration for the MT7987 reference board, and
enable support for DT-overlay application which will be necessary to
use the image for the MT7987 RFB generated in OpenWrt.
Adapt our downstream patches (generic reset button, rootdisk selection)
for MT7987 to prepare for real-world boards.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Build TF-A for the MediaTek MT7987 SoC family.
Add necessary downstream patches in preparation for the BananaPi R4 Lite,
which connects both flash chips to SPI2 and got broken MMC bus.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Currently the detection of external-data FIT images works by checking
if the FIT structure is more than 4 kiB. However, for boards with lots
of different DT-overlays and configurations the FIT structure can
exceed 4 kiB which results in the FIT splitter to fail detecting the
rootfs.
Increase the threshold for external-data FIT to 512 kiB as there aren't
any kernel images smaller than that, and FIT structure less than 512 kiB
will always be an external-data FIT.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Make functions in b53 static and add kernel
patch to fix prototype build errors
Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20653
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
After switching to the 6.12 kernel, time to remove 6.6 support.
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20614
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Linux 6.12 has been validated on Layerscape platforms, including NXP
reference boards and multiple custom designs. Tests covered system
boot, networking, storage, and common peripherals, with no regressions
observed.
Enable 6.12 as the default to continue broader testing and integration.
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20614
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
On the LS1012A-FRDM both PHY reset pins are tied to GPIO1_23.
Up to Linux 6.6, pinctrl did not touch this GPIO and the reset
line remained in the state set by U-Boot. Starting from 6.12,
the kernel requires explicit configuration of this pin, otherwise
the PHYs fail to be detected.
This adds a gpio-hog node to ensure the reset line stays asserted,
fixing PHY detection on boot.
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20614
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
warning print "ath11k c000000.wifi: failed to flush transmit queue 0"
is observed during busy times.
The mac80211 fallback implementation of `flush_sta` does not handle the per STA queues well.
This is fixed by providing a ath11k specific implementation of flush_sta telling the firmware to flush a given station.
The draining of the transmit queues should therefore stop correctly, even if new packets arrive in the mean time.
An upstream ath11k RFC is available at:
https://patchwork.kernel.org/project/linux-wireless/patch/GV1P250MB14333A5BF24623C4753A10E1E8E0A@GV1P250MB1433.EURP250.PROD.OUTLOOK.COM/
The patch was tested on a Xiaomi AX3600.
Signed-off-by: Florian Maurer <f.maurer@outlook.de>
Tested-by: Florian Maurer <f.maurer@outlook.de>
Co-authored-by: Benjamin Berg <benjamin@sipsolutions.net>
Tested-by: Flole <flole@flole.de>
Link: https://github.com/openwrt/openwrt/pull/20293
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Drop support for kernel 6.6 as now kernel 6.12 is set as default kernel
version.
Link: https://github.com/openwrt/openwrt/pull/20644
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Move the ipq806x target to kernel 6.12 by default as every kernel bump
problem has been handled.
Link: https://github.com/openwrt/openwrt/pull/20644
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
The Google OnHub doesn't init the SMEM in SBL causing the CPUFreq driver
to fail probe. This is caused by the fact that new CPUFreq driver makes
use of SMEM to identify the SoC variant and on Google OnHub this is not
available.
Backport patch to detect this state and fallback to compatible
matching fixing the CPUFreq driver.
Link: https://github.com/openwrt/openwrt/pull/20587
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Patch CMakeLists.txt for cmake 4.x compatibility.
New cmake versions require at least 3.5 as 'cmake_minimum_required'
in CMakeLists.txt. In future 3.10 will be required.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/20265
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Patch CMakeLists.txt in selected apps for cmake 4.x compatibility.
New cmake versions require at least 3.5 as 'cmake_minimum_required'
in CMakeLists.txt. In future 3.10 will be required.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/20265
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Patch CMakeLists.txt in selected apps for cmake 4.x compatibility.
New cmake versions require at least 3.5 as 'cmake_minimum_required'
in CMakeLists.txt. In future 3.10 will be required.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/20265
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Edit CMakeLists.txt to fulfill cmake 4.0 requirement that
cmake_minimum_required is now at least 3.5 and in future 3.10.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/20265
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Patch CMakeLists.txt to fulfill cmake 4.0 requirements
of cmake_minimum_required being at least 3.5 and in future 3.10.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/20265
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
d44af6dd8f4e dhcpv6: create struct dhcpv6_lease
4df45c8c3722 dhcpv4: create struct dhcpv4_lease
a6dccae41b60 odhcpd: struct lease -> struct lease_cfg
fc0abb66f122 dhcpv4: use leasetime from a->lease
74eeff193848 router: always use link-local src address for RAs
b9a071b8341f router: Rewrite the ingress MTU to one configured for the interface
1ef9e0e610d5 router: utilize interface ra_mtu for RA
1480c09ee0aa config: clamp ra_mtu to interface MTU, and default ra_mtu to interface MTU
ee4f0df6bd68 netlink: Store interface MTU at link change
d174e25e85a1 github: fix CI apt dependencies
8f393d55a76e odhcpd: more fixes for IID calculations
fc27940fe9...d44af6dd8f
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
b3e1db42b4db odhcp6c: fix safe interval processing to follow RFC 4862
63461f64d4c1 dhcpv6: always include IA_NA and IA_PD in Request message if requested
1051cabb4da3 dhcpv6: fix incorrect IA type being printed in syslog
c5237eabeb5c odhcp6c: prevent RELEASE at shutdown when -k is set
a01b1ff1e50f odhcp6c: fix client exiting if Renew and Rebind fails
4839bf6d0feb odhcp6c: implement RKAP: Reconfiguration Key Authentication Protocol
52a9a847def4 dhcpv6: fix solicit loop when server has no address available
7b1f67c23de6 ubus: implement ubus methods to force a Renew and Release
2b0e8f2d8541 ubus: implement retransmission configuration via ubus
8d89d373f360 odhcp6c: add failure when -E option is used without ubus support enabled
58f3c9eb1163 odhcp6c: add new argument option to disable script call
1048fc4fb622 reconfigure: move all configuration functions to a new file
93f056d3a1f2 reconfigure: implement DHCP reconfiguration
af669fb23cd3 dhcpv6: implement statistics for DHCPv6
3a1a599fecb7 ubus: implement UBus method to get state data immediately
44c50214997d ubus: emit UBus event on DHCP state changes
33b972bc526a ubus: connect to UBus backend
2f609f248faf odhcp6c: implement asynchronous handling for DHCPv6 State
6466314e7f62 odhcp6c: enable Non-Blocking DHCPv6 Socket
1df65f0caf46 dhcpv6: refactor dhcp_request Function
047c63a8156b dhcpv6: add t1 and t2 transmission
1b5f0c402bbf dscp: add option to set dscp value
96017df54d8f dhcpv6: fix wrong retransmission of DHCPv6 Solicit
b929fc8a1cfd odhcp6c: add a simple build script
adc651ffed55 cmake: make libubox mandatory
5182e2b696ef cmake: drop EXT_PREFIX_CLASS
8d052c52e18d cmake: disable pedantic
f2521b296b21 github: fix CI apt dependencies
77e1ae21e6...b3e1db42b4
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
If proto 'dhcpv6' is set for an interface, dynamic interfaces are created
for the protocols map, dslite or 464xlat if this netifd protocols are
installed and the interface option is not explicitly set to '0'.
The problem is that this option cannot be configured via LuCI, which means
that the dynamic protocols are started. In my case, that is the '464xlat'
'6in4' protocol. I see the follwing log messages continuously in the log as
I do not have a '464xlat' in my network.
Fri Aug 22 10:36:33 2025 daemon.notice netifd: Interface 'wan6_4' is now down
Fri Aug 22 10:36:33 2025 daemon.notice netifd: Interface 'wan6_4' is setting up now
Fri Aug 22 10:36:36 2025 daemon.notice netifd: Interface 'wan6_4' is now down
Fri Aug 22 10:36:36 2025 daemon.notice netifd: Interface 'wan6_4' is setting up now
To fix this by adding a new option to disable the dynamic interface creation
for '4in6' if needed. The option is named '4in6_dynamic' and is a boolean.
If the new option is 'true' (default) dynamic interfaces are create.
If the new option set to 'false' no dynamic 4in6 interface are created.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
The variable definitions are very confusing. Therefore, this commit groups
them together so that the line length is not exceeded.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This allow configuring the MTU of the ds-lite tunnel.
Updates #8190
Signed-off-by: Mateusz Poliwczak <mpoliwczak34@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20606
Signed-off-by: Robert Marko <robimarko@gmail.com>
This device is very similar to the already supported XGS1210-12 A1. For
now, only revision A1 is supported (not marked on the label).
Hardware:
- RTL9302B SoC
- 16 MiB NOR flash
- 128 MiB DDR3 SDRAM
- 8x 1G RJ45 (RTL8218D)
- 2x 2.5G RJ45 (2x RTL8226)
- 2x SFP+ (supporting 1G/2.5G/10G)
- 3.3V UART serial (115200 baud 8N1) on the right side of the case
(from bottom to top: GND, RX, TX, VCC)
It is originally an unmanaged switch, so there are a few differences:
- No reset button
- Different partition layout: There is some reserved space in the middle
of the flash which might be used by the bootloader for flash testing.
The remaining space in between is used for OpenWrt using mtd-concat.
The largest contiguous area is at the beginning, allowing a maximum
kernel size of 7 MiB.
- No individual MAC address: This device ships with an empty U-Boot
environment. When an OpenWrt squashfs image is booted for the first
time, a random MAC address will be written to the environment (but
only if the environment has been initialized from the bootloader
before and contains the default MAC address).
Steps to boot initramfs image via network:
- Configure a TFTP server to provide the OpenWrt initramfs image
- Connect to device using serial (see hardware information above)
- Power on the device and enter U-Boot using Esc when prompted
- Run the following commands (adjust as necessary):
# rtk network on
# tftpboot 0x84f00000 192.168.1.100:openwrt-xgs1010-initramfs.bin
# bootm
Installation on flash:
- Boot initramfs image as described above
- Now is a good time to create a backup of all flash partitions! You'll
need this if you want to revert to the unmanaged factory firmware at
some point.
- Use sysupgrade to install OpenWrt
- After restart enter U-Boot again and set the boot command:
# setenv bootcmd 'rtk network on; bootm 0xb4900000'
# saveenv
# run bootcmd
Note: The command "rtk network on" is only needed because the drivers
currently rely on some setup by the bootloader (without this the RJ45
ports don't work). If the drivers improve in the future, it should be
removed (i.e. change the boot command to "bootm 0xb4900000").
Reverting to factory firmware:
- Write back your backup of the firmware partition (or write just the
fwconcat1 partition, and erase the other two fwconcat partitions)
- Change the boot command back to "boota" (or just erase the u-boot-env
partition so the default gets used)
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/20469
Signed-off-by: Robert Marko <robimarko@gmail.com>
This is a preparation for adding support for XGS1010-12, which is almost
identical to XGS1210-12, with some small differences (partition layout,
missing reset key).
In addition to moving the common parts to a new file, also simplify the
definition of the 2.5G PHYs to reduce duplication. With this change, the
revision-specific files only have to specify the SMI addresses.
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/20469
Signed-off-by: Robert Marko <robimarko@gmail.com>
After having moved RTL93XX SerDes configuration from PHY to PCS driver,
the DSA driver doesn't need to know about SerDes explicitly anymore.
Although RTL83XX SerDes is still partly managed within the DSA driver,
it doesn't make use of the sds_num property/field. RTL93XX was the only
user of this right now.
Thus, we can just remove the remaining 'sds_num' code which doesn't
serve any purpose anymore.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20577
Signed-off-by: Robert Marko <robimarko@gmail.com>
RTL93XX SerDes is entirely managed through the PCS driver and not
treated as PHYs anymore. Thus, remove the leftovers from the DSA driver.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20577
Signed-off-by: Robert Marko <robimarko@gmail.com>
Drop the now unused SerDes code for RTL930X from rtl83xx-phy driver as
the SerDes is completely managed by the PCS driver.
This marks a breaking point because RTL930X SerDes is no longer treated
as a regular PHY device.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20577
Signed-off-by: Robert Marko <robimarko@gmail.com>
RTL93XX reached the point where the SerDes' are no longer treated as
regular PHYs. Instead, they are managed by the dedicated PCS driver.
Thus, all device tree definitions should follow this change.
Remove the pseudo-PHYs for the SerDes (so far usually defined with macro
INTERNAL_PHY) and corresponding 'phy-handle's from all SFP ports. This
removes a long-lasting confusion from our Realtek driver(s).
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20577
Signed-off-by: Robert Marko <robimarko@gmail.com>
When Realtek SerDes is completely handled by PCS, it is not treated as
a regular PHY anymore. Thus, we should be able to drop the currently
used pseudo-PHYs and phy-handles for ports which just use the SerDes as
PCS but have no PHY attached.
Allow to drop the phy-handle from switch port definitions if there is a
pcs-handle defined by relaxing several checks in the DSA driver.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20577
Signed-off-by: Robert Marko <robimarko@gmail.com>
Check for and handle an error which may be returned by rtpcs_create in
various cases.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20577
Signed-off-by: Robert Marko <robimarko@gmail.com>
The code to add bootstrapping for 10G-QXGMII on RTL930X broke the only
devices which are using 10G-QXGMII on RTL930X (Plasma Cloud PSX8+PSX10) in
OpenWrt. It is currently unknown what other changes are pending to get this
correctly working. But both the `rtpcs_930x_sds_usxgmii_config()` call and
the write of the "magic" SerDes values in the patching process break the
SerDes connected to the RTL8224 PHYs.
The Plasma Cloud PSX8+PSX10 devices get their RTL8224 and the 10G-QXGMII
SerDes bootstrapped directly by u-boot.
Fixes: dca20f91ea ("realtek: add serdes patch for 10G_QXGMII")
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20588
Signed-off-by: Robert Marko <robimarko@gmail.com>
Package driver for Broadcom V3D 3.x or newer GPUs.
SoCs supported include the BCM2711, BCM7268 and BCM7278.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Certain existing tooling, such as 'package-metadata.pl', are written
to accept the output of 'opkg list' with package manifest delimited
by '-'. The 'make-index-json.py --manifest' output was emulating
the 'apk list --manifest' format without the delimiting dash,
thus breaking these legacy tools.
We fix this by adding the dash to the manifest output, which allows
all existing tooling to process the output irrespective of whether
the build system uses opkg or apk.
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20094
Signed-off-by: Robert Marko <robimarko@gmail.com>
Align the sorting of cases with other targets.
Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20603
Signed-off-by: Robert Marko <robimarko@gmail.com>
Merge identical case in base-files.
Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20603
Signed-off-by: Robert Marko <robimarko@gmail.com>
This removes the obsolete trailing whitespaces from all base-files cases
to be in line with other targets.
Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20603
Signed-off-by: Robert Marko <robimarko@gmail.com>
Switch the mac lookup to NVMEM on UBI layout and add label-mac
Signed-off-by: Steffen Förster <nemesis@chemnitz.freifunk.net>
Link: https://github.com/openwrt/openwrt/pull/20612
Signed-off-by: Robert Marko <robimarko@gmail.com>
This allows wpa_supplicant to process pending netlink socket messages
first. Without this change, there is a race condition where the newly
created interface processes netlink events from the removal of the
previous interface.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This makes it possible to have more flexible control over the supplicant
without having to install wpa_cli.
Signed-off-by: Felix Fietkau <nbd@nbd.name>