567207a9bf16 fs: implement fileno() on directory handles
eb1d93235509 fs: support passing directory handle or fd in chdir()
38a2254337f1 build: detect whether toolchain employs default source fortification
6eddfc9dff17 resolv: fix fd leak in send_queries
3d36856b2dc5 uci: fix memory leak on cursor() error
aafde95f1ecf uci: add cursor() flags argument
d8cebc5a6bfd Revert "WIP: lib: support map() over objects"
2599cf80736b zlib: incorporate latest PR changes
830f316a7e49 socker: let sock.peercred() clear error on success
4cbac141406e types: rename u64_to_constant flag to ext_flag
d802fe5da5cd types: add support for resources with embedded data/values
71b4fdc6f60b types: add support for setting resource persistent flag
141f799eba08 uloop: use container_of instead of direct pointer casts
1396f8f2988d uloop: use uc_fn_thisval
9a121fc7440c uloop: drop object_registry
11b804d97086 socket: do not clear last_error in socket.error()
d5b3a9dc1091 socket: add strerror() method
Fixes: https://github.com/jow-/ucode/issues/285
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Found when building rockchip target (with kernel 6.12).
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18685
Signed-off-by: Robert Marko <robimarko@gmail.com>
Backport patches to support scans of WiFi 7 APs.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/18741
Signed-off-by: Robert Marko <robimarko@gmail.com>
Enable Device Provisioning Protocol (DPPv2) in hostapd
for the "full" build-variants.
DPPv2 currently does not compile with WolfSSL due to
missing PKCS7 and certificate support.
Link: https://github.com/openwrt/openwrt/pull/18485
Signed-off-by: Gustavo Bertoli <gubertoli@gmail.com>
This new version introduces many compilation error fixes for
the upcoming 6.12 kernel. Changelogs:
04923c5 "Fix build failures observed so far" - take three.
b4263cc "Fix build failures observed so far" - take two.
de595b4 Fix build failures observed so far
1c0066a Zero checksum handling for UDP4->UDP6
b42c37d Fix crash when viewing nat46 kernel module config
3a9f630 nat46-module: fix modpost warning
88b91ca gha: use checkout@v4 action instead of checkout@v2
84ba13a gha: enable github action on push/PR
f367088 fix the compilation error
03c14bf gha: clean-up the yaml definition
d964921 Create c-compile.yml
cb69317 "Add network namespace awareness to nat46" - take two.
8302f42 Revert "Add network namespace awareness to nat46"
91b8e68 Add network namespace awareness to nat46
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
This commit corrects led phy names. This has been discussed
at link [1] and corrected in the mediatek target in the
commit a51fd20e0d. Now it's time
to do the same thing in the lantiq target.
Link: https://github.com/openwrt/openwrt/pull/18265
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
This is the same hardware as the Cudy WR2100 that's
had support for some time now, just without the WLAN
hardware.
This PR is mostly copied from the commit that added
support for the WR2100, here: 3501db9
Specifications:
SoC: MT7621
CPU: 880 MHz
Flash: 16 MiB
RAM: 128 MiB
Ethernet: 5x Gbit ports
Installation:
There are two known options:
The Luci-based UI.
Press and hold the reset button during power up.
The router will request 'recovery.bin' from a TFTP server at
192.168.1.88.
Both options require a signed firmware binary.
A signed firmware can be found in GitHub PR #18532.
R4 & R5 need to be shorted (0-100Ω) for the UART to work.
Link: https://github.com/openwrt/openwrt/pull/18532
Signed-off-by: David DeGraw <degraw@fastmail.com>
Configure the i2c pins as GPIO outputs and use the i2c-gpio driver to
control the Semtech SX9512 touch controller.
This fixes spurious errors in i2c transactions even at 1kHz with the
native i2c driver.
leds green:wan: Setting an LED's brightness failed (-6)
Signed-off-by: David Bauer <mail@david-bauer.net>
Add the necessary package dependencies as well as device-tree properties
to support the touch-inputs as well as missing LEDs on the Genexis Pulse
EX400 range extender.
Signed-off-by: David Bauer <mail@david-bauer.net>
This driver is required for the touch-inputs as well as some LEDs on the
Genexis Pulse EX400.
The driver was also sent upstream. As the EX400 is currently the only
consumer, the driver is added target-specific for ramips.
Once the driver has been accepted upstream and is provided in a kernel
release used by OpenWrt, the package should be moved to the global input
drivers.
Link: https://www.spinics.net/lists/kernel/msg5669349.html
Signed-off-by: David Bauer <mail@david-bauer.net>
There's no need for it. Kernel update to 6.12 found that it now needs
linux/of.h explicitly included.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18763
Signed-off-by: Robert Marko <robimarko@gmail.com>
Given the description of the configuration option at its definition in
target/sdk/files/Config.in ("Compile packages with debugging info" and "Adds -g3
to the CFLAGS", the more appropriate CMAKE build type is `RelWithDebInfo` rather
than `Debug`.
Signed-off-by: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18709
Signed-off-by: Robert Marko <robimarko@gmail.com>
Specify 4-bit ECC strength instead of 8-bit, to resolve NAND I/O errors
on ELECOM WRC-X3000GS2.
ELECOM WRC-X3000GS2 has a Macronix MX35UF1G24AD SPI-NAND chip as a flash
storage. That chip is registered as a chip that has 128 bytes OOB and
requires 8-bit ECC, and described as the same in the Macronix's datasheet.
But on WRC-X3000GS2, 8-bit ECC breaks NAND I/O on mtdblock devices with
the following errors and 4-bit ECC needs to be used to resolve this issue.
current (ECC strength=8):
```
[ 1.401566] 0x000000480000-0x000000500000 : "0:appsblenv"
[ 1.407128] 1 fixed-partitions partitions found on MTD device 0:appsblenv
[ 1.410663] Creating 1 MTD partitions on "0:appsblenv":
[ 1.417359] 0x000000000000-0x000000040000 : "env-data"
[ 1.479865] u-boot-env-layout: probe of 79b0000.qpic-nand:flash@0:partitions:partition-0-appsblenv:partition@0:nvmem-layout failed with error -74
root@OpenWrt:~# strings /dev/mtdblock10
[ 55.693754] mtdblock: MTD device '0:appsblenv' is NAND, please consider using UBI block devices instead.
[ 55.694660] I/O error, dev mtdblock10, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 2
[ 55.703147] I/O error, dev mtdblock10, sector 8 op 0x0:(READ) flags 0x80700 phys_seg 3 prio class 2
[ 55.711884] I/O error, dev mtdblock10, sector 16 op 0x0:(READ) flags 0x80700 phys_seg 2 prio class 2
[ 55.720778] I/O error, dev mtdblock10, sector 24 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
[ 55.730310] I/O error, dev mtdblock10, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[ 55.738607] Buffer I/O error on dev mtdblock10, logical block 0, async page read
```
after fixing (ECC strength=4):
```
[ 1.402301] 0x000000480000-0x000000500000 : "0:appsblenv"
[ 1.407909] 1 fixed-partitions partitions found on MTD device 0:appsblenv
[ 1.411370] Creating 1 MTD partitions on "0:appsblenv":
[ 1.418075] 0x000000000000-0x000000040000 : "env-data"
(no error)
root@OpenWrt:~# strings /dev/mtdblock10
[ 39.131008] mtdblock: MTD device '0:appsblenv' is NAND, please consider using UBI block devices instead.
bootcmd=bootipq
baudrate=115200
wifi2=7C:F8:54:01:BD:F3
CRASH_COUNT=0
...
```
Fixes: 01b72ce61e ("qualcommax: ipq50xx: remove ECC user config from board files")
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18770
Signed-off-by: Robert Marko <robimarko@gmail.com>
Include <linux/of.h> instead of <linux/of_device.h>.
This problem arised when adding support for 6.12, but it can be fixed on
older kernels too.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
kmod-drm-rp1-dsi, kmod-drm-rp1-dpi and kmod-drm-rp1-vec should depend on
kmod-drm-dma-helper and kmod-drm-vram-helper in order to fix dependency errors
when all kernel modules are selected.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
When KERNEL_TRANSPARENT_HUGEPAGE is enabled, build fails due to
missing KERNEL_ARM64_CONTPTE.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
There are no supported devices on this sub-target. It can be
considered that it is still under development. Therefore,
there is no need to make the buildbot build it every day.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18757
Signed-off-by: Robert Marko <robimarko@gmail.com>
Instead of having to deal with patch files, lets use the newly made
OpenWrt GIT repo as the SSDK upstream[1].
All existing patches have been applied to the same source commit, so
there should be no intended changes.
[1] https://github.com/openwrt/qca-nss-dp.git
Signed-off-by: Robert Marko <robimarko@gmail.com>
Instead of having to deal with patch files, lets use the newly made
OpenWrt GIT repo as the SSDK upstream[1].
All existing patches have been applied to the same source commit, so
there should be no intended changes.
[1] https://github.com/openwrt/qca-ssdk.git
Signed-off-by: Robert Marko <robimarko@gmail.com>
This problem arised when adding support for 6.12, but it should be fixed on
older kernels too.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
These drivers should include <linux/platform_device.h>, but this wasn't an
issue on kernels < 6.12.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This sub-target is source only now. We don't need to disable build
for specific devices.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18745
Signed-off-by: Robert Marko <robimarko@gmail.com>
Due to RAM/ROM size limitations, this sub-target has been unable
to generate usable images for a long time. Mark them as source-only
to save some resource for the buildbot.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18745
Signed-off-by: Robert Marko <robimarko@gmail.com>
This sub-target is source only now. We don't need to disable build
for specific devices.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18745
Signed-off-by: Robert Marko <robimarko@gmail.com>
Due to RAM/ROM size limitations, this sub-target has been unable
to generate usable images for a long time. Mark them as source-only
to save some resource for the buildbot.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18745
Signed-off-by: Robert Marko <robimarko@gmail.com>
This sub-target is source only now. We don't need to disable build
for specific devices.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18745
Signed-off-by: Robert Marko <robimarko@gmail.com>
Due to RAM/ROM size limitations, this sub-target has been unable
to generate usable images for a long time. Mark them as source-only
to save some resource for the buildbot.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18745
Signed-off-by: Robert Marko <robimarko@gmail.com>
Device profiles that specify 'DEFAULT := n' are being included
in the imagebuilder metadata, specifically in .profiles.mk, even
though there is no kernel built for the device. This results in
'make info' showing the device as valid, but then 'make image
PROFILE=xxx' failing with 'No rule to make target xxx-kernel.bin ...'
We exclude these profiles from the imagebuilder, avoiding these
errors.
Fixes: https://github.com/openwrt/openwrt/issues/18410
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18748
Signed-off-by: Robert Marko <robimarko@gmail.com>
The RTL8214FC currently uses generic PHY functions. That makes it look like a copper
device. Switching to/from fibre works fortunately but the autonegotiation handling
still works on MII_LPA (PHY register 5) as if a copper link is used. Fix that by
- advertising a superset of TP/FIBRE features
- using clause 37 functions when on fibre
Additionally enhance the code of the driver to assist further development.
- log the speed of the inserted module to detect wrongly inserted 10gbase-r modules
- order phy driver functions alphabetically (keep match/name on top)
- remove genphy_loopback as the kernel uses it if not provided
Remark! The driver internally uses PORT_MII for the TP port. Align with that and
report MII to ethtool instead of TP. Other drivers do the same and it can be
changed in the future if needed.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18724
Signed-off-by: Robert Marko <robimarko@gmail.com>
Commit 7db0748b7b ("kernel: modules: split package fs-fscache") modified
the KCONFIG section of KernelPackage/fs-netfs but missed to add a
backslash to escape a linebreak. Add it now.
Fixes: 7db0748b7b ("kernel: modules: split package fs-fscache")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reduces boot time by 3s on a freshly installed image. This device
has a large flash and the gain can be higher with more packages
installed. According to the datasheet, this is the maximum frequency
supported by the Micron and Macronix chips that are installed in
these devices. Tested on three units over a two month period.
Before:
$ dd if=/dev/mtd5 of=/dev/null bs=10M count=1 status=progress
1+0 records in
1+0 records out
10485760 bytes (10 MB, 10 MiB) copied, 1.51901 s, 6.9 MB/s
After:
$ dd if=/dev/mtd5 of=/dev/null bs=10M count=1 status=progress
1+0 records in
1+0 records out
10485760 bytes (10 MB, 10 MiB) copied, 0.899474 s, 11.7 MB/s
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/18694
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Mikrotik RouterBOARD 2011 series are AR9344-based wired routers, with
optional 2,4GHz 802.11n 2x2:2 Wi-Fi radio, with desktop or rack-mount
capability, featuring 5 gigabit Ethernet ports and 5 fast Ethernet
ports. Different variants of the board are supported using a single
image.
Bare-bones RouterBOARD 2011LS is supported using the same image.
Specification:
- Power: 10-28V input via 5,5/2,1 DC barrel jack, or terminal block on
some boards
- CPU: AR9344 at 600 to 750MHz (configurable)
- RAM: 128MB (64MB in early versions) DDR2
- Flash: 128MB (64MB in early versions) NAND flash
- Gigabit Ethernet: 5 ports via AR8327 switch (eth1 to eth5)
- Fast Ethernet: 5 ports via AR9344 built-in switch (eth6 to eth10)
- SFP: single port through AR8327 switch (SGMII at port 6)
- PoE in: passive input up to 28V at eth1
- PoE out: passive output up to 28V at eth10
- USB: optional micro-AB host port or type-A host port
- Console: optional Cisco-style RS232 console at the back of the device,
on budget devices available as 3.3V UART via testpoints
- LCD: 2" touchscreen-equipped LCD (unsupported)
Installation:
- perform TFTP boot of initramfs image as for netinstall procedure
typical for Mikrotik devices
- when initramfs image boots, use sysupgrade to perform final
installation.
If upgrading from ar71xx, clean installation should be performed, as the
devices now uses yafut to handle kernel image.
TODO:
- 64MB NAND variant using K9F1208U0C isn't yet supported, because it
needs disabling subpage write support for that chip. A proper solution
would be to fix that in kernel, but I don't have this variant to test
with currently.
- The same is true for GD9FU1G8F3A NAND, which isn't ONFI compliant and
needs definition in kernel for proper geometry.
- SFP port probes over I²C and gigabit link is possible, but currently
the drivers lack support of handling link status information to
userspace, including swconfig. Link will appear as always up.
Currently, link status logging can detect something, but status both
for ports 0 and 6 is logged simultaneously,
but "swconfig dev switch0 show" will always show link up on port 6.
- Not yet fully known connection to display and touch panel, but some
documentation is available (seemingly connected via SPI, according to
Mikrotik's open source code at [1])
[1] https://github.com/robimarko/routeros-GPL
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17617
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Passing QMP pipe clocks was upstreamed, but it requires conversion single
QMP node, so backport both of those instead of our downstream patch.
Signed-off-by: Robert Marko <robimarko@gmail.com>