3d953628bf17 udebugd: add support for setting an override config
93f6df0240e5 udebug-cli: add support for overriding config on the command line
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Add support for the Texas Instruments BQ32000 I2C real-time clock chip.
Tested on a custom board based on Hi-Link HLK-7628N.
Signed-off-by: Ondrej Kolar <ondrej@kolarovo.cz>
Link: https://github.com/openwrt/openwrt/pull/19764
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Initialize data to {} if null before calling mac80211.sh
to avoid a confusing error message in the syslog.
Fixes: https://github.com/openwrt/openwrt/issues/14010
Signed-off-by: Tobias Waldvogel <tobias.waldvogel@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [cosmetic change]
f3fc0b760406 libuci: fix false positive warning on older gcc versions
9033e8c27253 blob: use blobmsg_parse_attr in __uci_blob_check_equal
Signed-off-by: Felix Fietkau <nbd@nbd.name>
The option iface should be optional according to the description
of /etc/config/wireless in order to avoid repeating the definition
for each virtual interface.
Signed-off-by: Tobias Waldvogel <tobias.waldvogel@gmail.com>
We are using upstream otto timer. Delete some downstream leftovers.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19769
Signed-off-by: Robert Marko <robimarko@gmail.com>
Drop our downstream driver in favor of an upstream existing driver which
is available starting from v6.13.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19736
Signed-off-by: Robert Marko <robimarko@gmail.com>
Adapt the device tree definitions of rtl93xx devices and the base dtsi
for rtl930x and rtl931x to match with what's expected by the recently
backported RTL9300 I2C driver.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19736
Signed-off-by: Robert Marko <robimarko@gmail.com>
Backport/add all patches for the upstream RTL9300 I2C driver.
The upstream driver was added in 6.13 and was heavily based on our
downstream driver except for how the multiplexing behaviour is handled.
This driver was working fine with basic SFP operation on RTL930x devices
but there was no support for RTL931x though.
Major advantage over our downstream driver is: The multiplexing
behaviour is handled completely by the driver. Thus, there's no need for
a separate rtl9300-mux driver as we had it downstream. Moreover, this
simplifies the DTS of affected devices a lot since we can now move the
controller definition - which is in the DTS of each device so far - to
the base DTSI.
Currently pending patches are also included because the progress on
getting this upstream seems really slow right now, albeit upstream
maintainers may require several changes to the current state.
These include:
- patches fixing several issues in the driver
- patches doing a refactoring of the driver and adding support for RTL931x
See the commit messages included in each patch to have details on the
changes.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19736
Signed-off-by: Robert Marko <robimarko@gmail.com>
In the conversion to dts, qca,led-pin was used for both interfaces.
Unfortunately, it's mutually exclusive with gpio-controller which made
it not do anything.
Fixes: 949e1a0 ("mpc85xx: tl-wdr4900: move platform code to dts")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19758
Signed-off-by: Robert Marko <robimarko@gmail.com>
843a736a4e26 ubus: fix type check in procd ubus data callback
94c3869941b0 interface: avoid memleaks on invalid interfaces
6ead304877ad global: use blobmsg_parse_attr
813b9882dbab config: add support for defining devices via procd data
575b04326e32 config: add support for defining interfaces via procd data
a0be934399cf examples: sync wireless.uc
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Modernize the target slightly to use kernel+dtb FIT images in all
subtargets. LZMA compression will be used for the cortexa53 devices,
and we'll stay conservative and use gzip for the cortexa7/a8 devices
due to performance differences.
Tested-on:
- Linksprite pcDuino v2 (cortexa8 / A10)
- Olinuxino Micro (cortexa7 / A20)
- Banana Pi M2 Berry (cortexa7 / V40)
- Banana Pi P2 Zero (cortexa7 / H2+)
- Xunlong Orange Pi 2 (cortexa7/ H3)
- OrangePi PC Zero 2 (cortexa53 / H616)
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Running the bootstrap script autogen.sh
handles the execution of autotools already,
so calling autoreconf before configure
makes this happen twice, which is unnecessary
and can lead to an occasional build problem.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/19748
Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently, the build system overrides the value of the CC variable
for actual compilation after configuring for target builds.
However, the configure script now modifies the CC variable
to include "-std=gnu23" when the test for C23 features is successful.
The configure script also tests for the ability to use alignof
without including the stdalign.h header, and only includes it if necessary.
The test in the configure script is being done with the C23 standard option
but the compilation is being done without the C23 standard option,
leading to an unusual build error where alignof() is not defined.
Resolving the conflict between the autoconf macros and the build system
causes several other packages to fail, so instead in the meantime,
force the use of C23 standard to compile as part of the new standard
includes alignof as a keyword to deprecate the stdalign.h macro.
Forcing use of the new standard is safe for target builds
as the toolchain is known to support the option
and is always within our scope of version control.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/19748
Signed-off-by: Robert Marko <robimarko@gmail.com>
Remove the needless restriction
for which auxillary files are installed.
This aligns the behavior of libtoolize
with the existing behavior of automake.
This can prevent the seemingly random error
if autoreconf happens to be ran multiple times:
configure: error: cannot find required auxiliary files: compile
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/19748
Signed-off-by: Robert Marko <robimarko@gmail.com>
The new "std-gnu23" module has the stated goal of:
"...to update the c99 module to depend on std-gnu23
instead of on std-gnu11, and to make std-gnu11 obsolete."
in upstream commit 8990abb50 ("std-gnu23: new module").
However, for now, it's design is optional, so that
definitions of the latest standard module overrides the former.
At some point, upstream gnulib will replace the dependency
instead of add it alongside the older one.
Because all macros are copied to the aclocal directory,
for complex projects, not including the module
may cause the macros to apply only to some subdirectories
rather than all of them and top-level together.
For projects that import source from local gnulib,
always include the std-gnu23.m4 macros for consistency.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/19748
Signed-off-by: Robert Marko <robimarko@gmail.com>
This fixes intermittent dmesg errors
"nss_port5_rx_clk_src: rcg didn't update its configuration."
Signed-off-by: Marko Mäkelä <marko.makela@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/19620
Signed-off-by: Robert Marko <robimarko@gmail.com>
While checking setup routines for stability and completeness,
random RTL838x SoC I/O areas were intentionally overwritten.
As soon as L2_CTRL_1->FAST_AGE_OUT is set to 1, the system
stalls during bootup. Analysis shows that it loops endlessly
in rtl838x_hw_stop()
/* Flush L2 address cache */
if (priv->family_id == RTL8380_FAMILY_ID) {
for (int i = 0; i <= priv->cpu_port; i++) {
sw_w32(1 << 26 | 1 << 23 | i << 5, priv->r->l2_tbl_flush_ctrl);
do { } while (sw_r32(priv->r->l2_tbl_flush_ctrl) & (1 << 26));
}
This is exactly the same logic as in the vendor GPL. There
are no hints about possible timeouts or issues. The reason is
still unclear. Nevertheless harden the function for further fuzzy
tests. Do this by resetting the configuration value to its SoC
default.
Additionally convert some shifts to BIT() for better readability.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19679
Signed-off-by: Robert Marko <robimarko@gmail.com>
Invalid hash was added during the 5.3 update and CI will fail since none
of the available sources has the tarball with incorrect hash.
Fixes: 423ed9fc5a ("tools: bash: update to 5.3")
Signed-off-by: Robert Marko <robimarko@gmail.com>
`loglevel=8` causes the kernel to output all logs, including debug logs, at boot time
It is enabled by default on the upstream eval board because it is aimed at developer debugging.
Most devices reference the eval board directly without modification, and the debug log should be hidden at release
Signed-off-by: Coia Prant <coiaprant@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19714
Signed-off-by: Robert Marko <robimarko@gmail.com>
The bootloader on these devices uses 0x81000000 as load address for the
compressed image. Since the kernel uses a load address 0x80100000, this
only leaves a space of 15 MiB for the uncompressed image. For larger
images, the compressed data starts to get overwritten, and at some point
the boot will fail:
## Booting image from partition ... 0
## Booting kernel from Legacy Image at 81000000 ...
Version: 9.9.9.9
Created: 2025-08-07 14:56:09 UTC
Data Size: 6756645 Bytes = 6.4 MB
Checksum ... OK
Uncompressing ... LZMA: uncompress or overwrite error 1 - must RESET board to recover
Currently, initramfs images with default config are already over the
limit. And while they still happen to work regardless, adding additional
packages easily pushes the size so much that the boot fails.
Fix this by switching to rt-loader (which relocates the data to the
upper end of the RAM before decompression). The switch includes regular
kernel images to avoid this becoming an issue again in the future.
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/19734
Signed-off-by: Robert Marko <robimarko@gmail.com>
2.42 has been the default for over a year. 2.44 is well tested by now. While at
it, drop support for 2.40, as it's over two years old.
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19547
Signed-off-by: Robert Marko <robimarko@gmail.com>
Once tested this will go upstream.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19468
Signed-off-by: Robert Marko <robimarko@gmail.com>
Previous implementation was directly copied from rtl930x and was not
working. Table field offsets are different between rlt931x and rtl930x
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19580
Signed-off-by: Robert Marko <robimarko@gmail.com>
Add usb_vbus ref to usb device.
Signed-off-by: Andrey Safonov <andrey.safonov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19698
Signed-off-by: Robert Marko <robimarko@gmail.com>
Add fixed regulator for M.2 slot for Bananapi BPI-RV2
Signed-off-by: Andrey Safonov <andrey.safonov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19697
Signed-off-by: Robert Marko <robimarko@gmail.com>
The .rma_bpdu_fld_pmask is not used anywhere in the code for RTL930x nor
RTL931x. But the RTL930x was still initializing this member. To avoid
problems in the future, simply initialize it also on RTL931x.
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19569
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Neither the RTL930x not the RT931x use the BPDU flooding mechanism which
was used for other SoCs. At the same time, the RTL931x must use the same
debugfs initialization function as RTL930x.
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19569
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit renames the network ports of the Minisforum MS-A2
Mini PC: the two 2.5G RJ45 ports are now named lan1 and lan2,
and the two 10G SFP+ ports sfp1 and sfp2.
All four ports are also added to the default lan interface.
--- Hardware Highlights ---
AMD Ryzen™ 9 9955HX/7945HX
Dual DDR5-5600MHz, up to 96GB
2x 10G SFP+, 2x 2.5G RJ45
WiFi 6E, Bluetooth 5.3
Built-in PCIe x16 Slot
Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/19689
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
OpenSSL 3.5.2 is a bug fix release:
This release incorporates the following bug fixes and mitigations:
Miscellaneous minor bug fixes.
The FIPS provider now performs a PCT on key import for RSA, EC and ECX.
This is mandated by FIPS 140-3 IG 10.3.A additional comment 1.
Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc (Intel N150 based box)
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/19725
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The RTL930x mdio functions are scattered around the code. Relocate
them to the bus (still inside the ethernet driver). With this change
the phy identification looks into the proper registers. The SerDes
phy identifier (register 2/3) must be changed.
Additionally provide a consistent SerDes register access through the
mdio bus. Until now when a SerDes directly drives a SFP module there
is no clear rule of how to handle its register set that consists of
two parts:
- c22 phy registers 0-15 live in the fiber page (2) of the SerDes
- other SerDes specific registers exist in pages before and after
The mdio bus and other SerDes functions are a wild mix of directly
looking into page 2 or just using self defined methods to access
data.
Adapt the bus to the new consistent phy interface that mixes the
SerDes register set like classic Realtek phys do it.
- Use register 31 as page select (already in the bus)
- Always keep the common registers 0-15 in place and read fiber page
- Map the SerDes internal registers into the upper vendor specific
registers 16-23 according to the page select register (31).
That gives a register mapping as follows:
+-----------------------+-----------------------+---------------+-------------+
| reg 0x00-0x0f | reg 0x10-0x17 | reg 0x18-0x1e | reg 0x1f |
+-----------------------+-----------------------+---------------+-------------+
| SerDes fiber page (3) | real SerDes registers | zero | SerDes page |
| registers 0 - 15 | in packages of 8 | | select reg |
+-----------------------+-----------------------+---------------+-------------+
Example to make it as clear as possible.
SerDes registers on a RTL930x show
Page / Reg | 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B ...
-------------+----------------------------------------------------------------
0 - SDS | 0C03 0F00 7060 7106 074D 0EBF 0F0F 0359 5248 0000 0F80 0000 ...
1 - SDS_EXT | 0000 0000 85FA 8C6D 5CCC 0000 20D8 0003 79AA 8C64 00C3 1482 ...
2 - FIB | 1140 6189 001C CA40 01A0 0000 0000 0004 0000 0000 0000 0000 ...
3 - FIB_EXT | 1140 6109 001C CA40 01A0 0000 0000 0004 0000 0000 0000 0000 ...
This translates to this phy layout
| SerDes fiber registers normal SerDes registers zero p.sel
Page / Reg | 0x00 0x01 0x02 0x03 ... 0x10 0x11 0x12 0x13 ... 0x18 ... 0x1f
-------------+---------------------------------------------------------------
0 | 1140 6189 001C CA40 ... 0C03 0F00 7060 7106 ... 0000 ... 0000
1 | 1140 6189 001C CA40 ... 5248 0000 0F80 0000 ... 0000 ... 0001
...
4 | 1140 6189 001C CA40 ... 0000 0000 85FA 8C6D ... 0000 ... 0004
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19692
Signed-off-by: Robert Marko <robimarko@gmail.com>
Some known RTL93xx devices like the Linksys LGS328C or LGS352C are
NAND based. These require additional drivers and packages (e.g. UBI).
The current subtargets are already taylored down for devices with
only 16MB flash. Adding features that are not used will only make
the storage situation more complicated.
Add two new subtargets for RTL93xx that include the basic NAND, UBI
and MTD features. To achieve this do the following:
- Create new subtarget folders
- Copy the existing config and makefiles over
- Add the basic additional features
- Mark them as SOURCE-ONLY
- Add empty image makefiles
- Remove unneded NAND/MTD features from existing configs
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19700
Signed-off-by: Robert Marko <robimarko@gmail.com>