openwrt/staging/rmilecki.git
20 months agoodhcp6c: add "verbose" option
Mark Mentovai [Fri, 11 Nov 2022 16:41:37 +0000 (11:41 -0500)]
odhcp6c: add "verbose" option

odhcp6c logs messages related to its activity when invoked with -v, but
there is no way to configure this from within OpenWrt. This adds a UCI
option to turn on odhcp6c logging, disabled by default. To enable, set,
for example, network.wan6.verbose = 1.

Signed-off-by: Mark Mentovai <mark@mentovai.com>
20 months agoimagebuilder: allow to specific ROOTFS_PARTSIZE
Paul Spooren [Sun, 12 Mar 2023 15:56:41 +0000 (16:56 +0100)]
imagebuilder: allow to specific ROOTFS_PARTSIZE

Setting this options modifies the rootfs size of created images. When
installing a large number of packages it may become necessary to
increase the size to have enough storage.

This option is only useful for supported devices, i.e. with an attached
SD Card or installed on a hard drive.

Signed-off-by: Paul Spooren <mail@aparcar.org>
20 months agorealtek: switch to Kernel 5.15 by default
Paul Spooren [Wed, 22 Feb 2023 19:04:03 +0000 (20:04 +0100)]
realtek: switch to Kernel 5.15 by default

Getting ready for the next release.

Tested-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Olliver Schinagl <oliver@schinagl.nl>
Tested-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Paul Spooren <mail@aparcar.org>
20 months agotools/libtool: bump to 2.4.7
Rosen Penev [Thu, 31 Mar 2022 23:13:17 +0000 (16:13 -0700)]
tools/libtool: bump to 2.4.7

Remove upstreamed patch and refresh others.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[rebased and refreshed patches again]
Signed-off-by: Michael Pratt <mcpratt@pm.me>
20 months agotools/libtool: bump to 2.4.6
Eneas U de Queiroz [Mon, 13 Sep 2021 21:08:55 +0000 (18:08 -0300)]
tools/libtool: bump to 2.4.6

This updates libtool to its current release, from 2015.  Current patches
were renumbered and given a description text.  The fix in
160-passthrough-ssp.patch is no longer needed.

A patch to speed up build was cherry-picked, and another openwrt
specific patch was needed to not use quotes in $(SHELL), to acommodate
our "SHELL=/usr/bin/env bash" usage.

The already present call to ./bootstrap ensures that generated files are
refreshed, so the patches are applied only to their sources.  Also, that
bootstrap call was adjusted to run at the appropriate time when QUILT=1.

References below are relevant commits to upstream libtool
regarding some of the changes to patches.

This commit is being reapplied after previous revertion, and after some editing.
The fix for the issue that prompted reverting is the parent of this commit.

Ref: 435cb8d71 ("libtoolize: simplify runtime by substituting pkgauxdir")
Ref: 3cf11cfe2 ("libtoolize: rewritten over funclib.sh instead of general.m4sh")
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
[refactored to simplify patch changes, expanded patches, added upstream references]
Signed-off-by: Michael Pratt <mcpratt@pm.me>
20 months agotools/libtool: fix hard-coded paths
Sebastian Kemper [Fri, 24 Sep 2021 12:28:20 +0000 (14:28 +0200)]
tools/libtool: fix hard-coded paths

libtoolize hardcodes some paths. This is fine when building libtool and
then using it (for example in OpenWrt's buildroot). But when using an
SDK the paths are most likely different.

For example, when building util-linux within an SDK we're greeted with
the following message:

  libtoolize: error: $pkgauxdir is not a directory: '/path/to/openwrt/staging_dir/host/share/libtool/build-aux'

This is because staging_dir/host/bin/libtoolize contains the following
hard-coded paths from when the SDK was built in the first place:

  prefix="/path/to/openwrt/staging_dir/host"
  datadir="/path/to/openwrt/staging_dir/host/share"
  pkgauxdir="/path/to/openwrt/staging_dir/host/share/libtool/build-aux"
  pkgltdldir="/path/to/openwrt/staging_dir/host/share/libtool"
  aclocaldir="/path/to/openwrt/staging_dir/host/share/aclocal"

This commits updates 000-relocatable.patch to correct the paths,
relative to "$STAGING_DIR_HOST".

Ref: 96e05e2e3 ("libtool: Revert "libtool: bump to 2.4.6"")
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
[adapted to older libtool version before bumping, use STAGING_DIR_HOST]
Signed-off-by: Michael Pratt <mcpratt@pm.me>
20 months agotools/libtool: add commit messages to patches
Michael Pratt [Thu, 9 Mar 2023 14:35:13 +0000 (09:35 -0500)]
tools/libtool: add commit messages to patches

Add commit messages to patches as intended
by the last bump to libtool which had to be reverted.

This allows for a cleaner diff later,
removing this clutter from the complex changes to patches
that are required to bump to the latest libtool version.

Ref: c377d874b ("libtool: bump to 2.4.6")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
20 months agotools/libtool: refresh patches
Michael Pratt [Thu, 9 Mar 2023 13:29:38 +0000 (08:29 -0500)]
tools/libtool: refresh patches

Preparation for bumping libtool several versions at once,
which includes some complex changes to patches.

Remove an empty line change from a patch.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
20 months agotools/automake: bump to 1.16.5
Michael Pratt [Mon, 1 Aug 2022 12:30:43 +0000 (08:30 -0400)]
tools/automake: bump to 1.16.5

Automake releases 1.16.2 to 1.16.5 are major releases,
the two before are minor releases.

The first patch needed rewriting, some lines moved
to be consistent with the same change upstream in other files.
This also simplifies the patch.

Second patch refreshed.

Links to changelogs in order, oldest to newest.

Link: https://lists.gnu.org/archive/html/info-gnu/2018-02/msg00008.html
Link: https://lists.gnu.org/archive/html/info-gnu/2018-03/msg00002.html
Link: https://lists.gnu.org/archive/html/info-gnu/2020-03/msg00009.html
Link: https://lists.gnu.org/archive/html/info-gnu/2020-11/msg00005.html
Link: https://lists.gnu.org/archive/html/info-gnu/2021-07/msg00013.html
Link: https://lists.gnu.org/archive/html/info-gnu/2021-10/msg00000.html
Signed-off-by: Michael Pratt <mcpratt@pm.me>
20 months agotools/autoconf: bump to 2.71
Michael Pratt [Mon, 1 Aug 2022 12:28:44 +0000 (08:28 -0400)]
tools/autoconf: bump to 2.71

Autoconf release 2.71 is a bugfix release of 2.70
Links provided are the changelog of 2.70 [1] [2]
and the announcement of 2.71 [3]

The first patch needed to be rewritten.
Some of the lines in the patch were moved
to be consistent with the same change added upstream
in other similar files.

Second and third patches are no longer needed,
Emacs can now be disabled at the configure stage,
and support for musl was added upstream.

The patch now causes help2man to be required
for installing man pages, but we don't need them.
There is no way to disable man pages build
with the configure script,
so use make to touch the files with the build target install-man1.

Link: https://lists.gnu.org/archive/html/autotools-announce/2020-12/msg00001.html
Link: https://lwn.net/Articles/839395
Link: https://lists.gnu.org/archive/html/info-gnu/2021-01/msg00017.html
Signed-off-by: Michael Pratt <mcpratt@pm.me>
20 months agotools/autoconf-archive: bump to 2022.09.03
Michael Pratt [Mon, 1 Aug 2022 12:29:29 +0000 (08:29 -0400)]
tools/autoconf-archive: bump to 2022.09.03

Changelog included in package.
Link to announcement.

Link: https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00004.html
Signed-off-by: Michael Pratt <mcpratt@pm.me>
20 months agotools/automake: use make variable to generate aclocal symlinks
Michael Pratt [Fri, 2 Sep 2022 18:51:48 +0000 (14:51 -0400)]
tools/automake: use make variable to generate aclocal symlinks

Instead of having a somewhat random list of aclocal symlinks
which are named with the API versioning scheme,
install a symlink for every API version since 1.11
(the first release after Automake was moved to git)
using the API version number from the version of automake
that is currently in openwrt.

Automake API versioning does not include the patch level number.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
20 months agotools/automake: clean up build recipes
Michael Pratt [Wed, 7 Sep 2022 14:45:43 +0000 (10:45 -0400)]
tools/automake: clean up build recipes

The configure option datarootdir
defaults to PREFIX/share.

The Host/Clean define should be Host/Uninstall
otherwise it is removing the build directory
before there is a chance to try "make uninstall"
in that directory.
Host/Clean/Default is no longer defined.

Consolidate the install stage with Host/Uninstall,
since it is essentially uninstalling before installing.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
20 months agotools/autoconf: clean up build recipes
Michael Pratt [Wed, 7 Sep 2022 14:06:15 +0000 (10:06 -0400)]
tools/autoconf: clean up build recipes

The configure option datarootdir
defaults to PREFIX/share.

The Host/Clean define should be Host/Uninstall
otherwise it is removing the build directory
before there is a chance to try "make uninstall"
in that directory.
Host/Clean/Default is no longer defined.

Use default build recipes defined in host-build.mk
instead of custom ones that are equivalent.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
20 months agotools/autoconf-archive: clean up build recipes
Michael Pratt [Wed, 7 Sep 2022 14:29:49 +0000 (10:29 -0400)]
tools/autoconf-archive: clean up build recipes

The configure option datarootdir
defaults to PREFIX/share.

The Host/Clean define should be Host/Uninstall
otherwise it is removing the build directory
before there is a chance to try "make uninstall"
in that directory.
Host/Clean/Default is no longer defined.

Use default build recipes defined in host-build.mk
instead of custom ones that are equivalent.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
20 months agobuild: disable automake dependency tracking
Michael Pratt [Thu, 25 Aug 2022 02:32:13 +0000 (22:32 -0400)]
build: disable automake dependency tracking

Recent versions of Automake
have changed dependency tracking significantly
(reference commit below)
causing breakage in some package builds
when using newer Automake with packages that need autoreconf
that were bootstrapped with an old version of Automake.

Those changes cause a great inconsistency between packages over time
where some packages may or may not use this feature,
and may or may not update the .ac and .am files
to work with the new methods.
This problem might exist in many packages
where autoreconf is not currently required,
but would cause build failure if autoreconf is used.

Fortunately, this feature is practically useless
for the purposes of Openwrt and the average developer,
so we can disable it.

GNU Automake manual states in part:

  "Because dependencies are only computed as a side-effect of compilation...
   no dependency information exists the first time a package is built...
   dependency tracking is completely useless for one-time builds..."

A nice side-effect is that build times are slightly faster.

Ref: 6a675ef17edf7109da189f5ae70e2dc6b7665896 (automake.git)
Signed-off-by: Michael Pratt <mcpratt@pm.me>
20 months agoath79: fix user LED glow on Mikrotik 911 Lite boards
Lech Perczak [Tue, 7 Mar 2023 00:14:05 +0000 (01:14 +0100)]
ath79: fix user LED glow on Mikrotik 911 Lite boards

GPIO3, to which the user LED is connected on RB911-Lite boards seems to
still sink current, even when driven high. Enabling open drain for this
pin fixes this behaviour and gets rid of the glow when LED is set to
off, so enable it.

Fixes: 43c7132bf8e7 ("ath79: add support for MikroTik RouterBOARD 911 Lite2/Lite5")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
20 months agoelfutils: update to 1.89
Nick Hainke [Sat, 4 Mar 2023 22:19:37 +0000 (23:19 +0100)]
elfutils: update to 1.89

Release Notes:
https://sourceware.org/pipermail/elfutils-devel/2023q1/006023.html

Refresh patch:
- 003-libintl-compatibility.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
20 months agotools/elfutils: update to 1.89
Nick Hainke [Sat, 4 Mar 2023 22:12:31 +0000 (23:12 +0100)]
tools/elfutils: update to 1.89

Release Notes:
https://sourceware.org/pipermail/elfutils-devel/2023q1/006023.html

Signed-off-by: Nick Hainke <vincent@systemli.org>
20 months agostrace: update to 6.2
Nick Hainke [Fri, 3 Mar 2023 12:32:36 +0000 (13:32 +0100)]
strace: update to 6.2

Release Notes:
https://github.com/strace/strace/releases/tag/v6.2

Signed-off-by: Nick Hainke <vincent@systemli.org>
20 months agoath79: refactor devolo WiFi pro image definitions
David Bauer [Tue, 16 Jun 2020 21:26:50 +0000 (23:26 +0200)]
ath79: refactor devolo WiFi pro image definitions

Reuse common parts for the devolo WiFi pro series. The series is
discontinued and we support all existing devices, so changes due to new
revisions or models are highly unlikely

Signed-off-by: David Bauer <mail@david-bauer.net>
20 months agokernel: modules: add missing kmod-mdio-devres for lan743x
Hauke Mehrtens [Fri, 10 Mar 2023 00:45:14 +0000 (01:45 +0100)]
kernel: modules: add missing kmod-mdio-devres for lan743x

This fixes a build problem on some targets.

Fixes: 3e9005546a ("kernel: modules: package Microchip LAN743x PCIe gigE driver")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
20 months agobinutils: Deactivate msgpack
Hauke Mehrtens [Wed, 8 Mar 2023 22:59:48 +0000 (23:59 +0100)]
binutils: Deactivate msgpack

Deactivate the msgpack option. The binutils build might detect the
libmsgpackc.so.2 library and will try to link against it, if it is not
explicitly deactivated.

This prevents the following build errors seen in the build bots.
Package binutils is missing dependencies for the following libraries:
libmsgpackc.so.2

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
20 months agobmips: dts: fix warnings
Álvaro Fernández Rojas [Thu, 9 Mar 2023 17:54:59 +0000 (18:54 +0100)]
bmips: dts: fix warnings

- Add missing interrupt-parent to ext_intc.
- Add missing #address-cells and #size-cells to gpio_cntl.
- Use proper gpio handle for gpios (ar-5315u).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
20 months agokernel: modules: add missing kmod-ptp for lan743x
Chuanhong Guo [Thu, 9 Mar 2023 09:24:43 +0000 (17:24 +0800)]
kernel: modules: add missing kmod-ptp for lan743x

Fixes: 3e9005546a ("kernel: modules: package Microchip LAN743x PCIe gigE driver")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
20 months agokernel: modules: package Microchip LAN743x PCIe gigE driver
Tim Harvey [Tue, 7 Mar 2023 21:41:13 +0000 (13:41 -0800)]
kernel: modules: package Microchip LAN743x PCIe gigE driver

Package the Microchip LAN743x PCIe gigE driver

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
20 months agomvebu: add support for Fortinet FortiGate 50E
INAGAKI Hiroshi [Wed, 8 Mar 2023 12:54:14 +0000 (21:54 +0900)]
mvebu: add support for Fortinet FortiGate 50E

Fortinet FortiGate 50E (FG-50E) is a UTM, based on Armada 385 (88F6820).

Specification:

- SoC          : Marvell Armada 385 88F6820
- RAM          : DDR3 2 GiB (4x Micron MT41K512M8DA-107, "D9SGQ")
- Flash        : SPI-NOR 128 MiB (Macronix MX66L1G45GMI-10G)
- Ethernet     : 7x 10/100/1000 Mbps
  - LAN 1-5    : Marvell 88E6176
  - WAN 1, 2   : Marvell 88E1512 (2x)
- LEDs/Keys    : 18x/1x
- UART         : "CONSOLE" port (RJ-45, RS-232C level)
  - port       : ttyS0
  - settings   : 9600bps 8n1
  - assignment : 1:NC , 2:NC , 3:TXD, 4:GND,
                 5:GND, 6:RXD, 7:NC , 8:NC
  - note       : compatible with Cisco console cable
- HW Monitoring: nuvoTon NCT7802Y
- Power        : 12 VDC, 2 A
  - plug       : Molex 5557-02R

Flash instruction using initramfs image:

1. Power on FG-50E and interrupt to show bootmenu
2. Call "[R]: Review TFTP parameters.", check TFTP parameters and
   connect computer to "Image download port" in the parameters
3. Prepare TFTP server with the parameters obtained above
4. Rename OpenWrt initramfs image to "image.out" and put to TFTP
   directory
5. Call "[T]: Initiate TFTP firmware transfer." to download initramfs
   image from TFTP server
6. 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]?"

7. On initramfs image, backup mtd if needed

   minimum:

   - "firmware-info"
   - "kernel"
   - "rootfs"

7. On initramfs image, upload sysupgrade image to the device and perform
   sysupgrade
8. 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:

- All "SPEED" LEDs(Green/Amber) of LAN and 1000M "SPEED" LEDs(Green) of
  WAN1/2 are connected to GPIO expander. There is no way to indicate
  link speed of networking device on Linux Kernel/OpenWrt, so those LEDs
  cannot be handled like stock firmware.
  On OpenWrt, use netdev(link) trigger instead.

- 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.

  - "firmware-info"
  - "dtb"
  - "u-boot-env"
  - "board-info"

Image header for bootmenu tftp:

  0x0 - 0xf  : ?
 0x10 - 0x2f : Image Name
 0x30 - 0x17f: ?
0x180 - 0x183: Kernel Offset*
0x184 - 0x187: Kernel Length*
0x188 - 0x18b: RootFS Offset (ext2)*
0x18c - 0x18f: RootFS Length (ext2)*
0x190 - 0x193: DTB Offset
0x194 - 0x197: DTB Length
0x198 - 0x19b: Data Offset (jffs2)
0x19c - 0x19f: Data Length (jffs2)
0x1a0 - 0x1ff: ?

*: required for initramfs image

MAC addresses:

(eth0): 70:4C:A5:xx:xx:7C (board-info, 0xd880 (hex))
WAN 1 : 70:4C:A5:xx:xx:7D
WAN 2 : 70:4C:A5:xx:xx:7E
LAN 1 : 70:4C:A5:xx:xx:7F
LAN 2 : 70:4C:A5:xx:xx:80
LAN 3 : 70:4C:A5:xx:xx:81
LAN 4 : 70:4C:A5:xx:xx:82
LAN 5 : 70:4C:A5:xx:xx:83

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
20 months agoramips: add support for SNR-CPE-ME2-SFP
Aleksey Nasibulin [Mon, 6 Mar 2023 10:49:33 +0000 (10:49 +0000)]
ramips: add support for SNR-CPE-ME2-SFP

SNR-CPE-ME2-SFP is a wireless router with SFP cage manufactured by SNR/NAG company.

Specification:
- SoC: MediaTek MT7621A
- CPU: 880MHz
- Flash: 16 MB (GD25Q127CSIG)
- RAM:  256 MB
- WLAN: 2.4 GHz, 5 GHz (MediaTek MT7615DN)
- Ethernet: 4x 10/100/1000 Mbps
- SFP cage (using RTL8211FS-CG)
- USB 3.0 port
- Power: 12 VDC, 2 A

Flash instruction via TFTP:
1. Boot SNR-CPE-ME2 to recovery mode
  (press reset button and power on device, hold button for ~10 seconds)
2. Send firmware via TFTP client:
 TFTP Server address: 192.168.1.1
 TFTP Client address: 192.168.1.131
3. Wait ~120 seconds to complete flashing
4. Do sysupgrade using web-interface

MAC Addresses(stock)
--------------------
+----------+------------------+-------------------+
| use      | address          | example           |
+----------+------------------+-------------------+
| Device   | label            | 6A:C4:DD:xx:xx:28 |
| Ethernet | + 1              | 6A:C4:DD:xx:xx:29 |
| 2g       | + 2              | 6A:C4:DD:xx:xx:2A |
| 5g       | + 3              | 6A:C4:DD:xx:xx:2B |
+----------+------------------+-------------------+

Notes:
- Reading sfp eeprom is not supported [1] (driver issue). Stock image has the same situation.

References:
1. https://forum.openwrt.org/t/mt7621-and-reading-sfp-eeprom/152249

Signed-off-by: Aleksey Nasibulin <alealexpro100@ya.ru>
20 months agoipq40xx: convert Netgear EX6100/EX6150 v2 to DSA
David Bauer [Mon, 6 Mar 2023 20:27:49 +0000 (21:27 +0100)]
ipq40xx: convert Netgear EX6100/EX6150 v2 to DSA

Signed-off-by: David Bauer <mail@david-bauer.net>
20 months agokernel: Fix perf build with binutils 2.40
Hauke Mehrtens [Mon, 6 Mar 2023 22:39:51 +0000 (23:39 +0100)]
kernel: Fix perf build with binutils 2.40

Backport patches from kernel 6.0 which are fixing building of perf with
binutils 2.40.

perf with kernel 5.10 is also not building but the backporting is more
complicated and only a few targets are still using kernel 5.10.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
20 months agoqosify: update to the latest version
Felix Fietkau [Tue, 7 Mar 2023 20:53:00 +0000 (21:53 +0100)]
qosify: update to the latest version

ca4509cf84d2 bpf: switch to using bpf_skb_utils.h
d064439009d0 qosify-bpf: skip unnecessary flow lookups
9c625ae96f2d map: fix deleting port based rules
9a47ea4b683d map: fix return code check for bpf_map_get_next_key calls

Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agompc85xx: add support for Watchguard Firebox T10
David Bauer [Sat, 18 Feb 2023 01:06:54 +0000 (02:06 +0100)]
mpc85xx: add support for Watchguard Firebox T10

Hardware
--------
SoC:    Freescale P1010
RAM:    512MB
FLASH:  1 MB SPI-NOR
        512 MB NAND
ETH:    3x Gigabite Ethernet (Atheros AR8033)
SERIAL: Cisco RJ-45 (115200 8N1)
RTC:    Battery-Backed RTC (I2C)

Installation
------------

1. Patch U-Boot by dumping the content of the SPI-Flash using a SPI
   programmer. The SHA1 hash for the U-Boot password is currently
   unknown.

   A tool for patching U-Boot is available at
   https://github.com/blocktrron/t10-uboot-patcher/

   You can also patch the unknown password yourself. The SHA1 hash is
   E597301A1D89FF3F6D318DBF4DBA0A5ABC5ECBEA

2. Interrupt the bootmenu by pressing CTRL+C. A password prompt appears.
   The patched password is '1234' (without quotation marks)

3. Download the OpenWrt initramfs image. Copy it to a TFTP server
   reachable at 10.0.1.13/24 and rename it to uImage.

4. Connect the TFTP server to ethernet port 0 of the Watchguard T10.

5. Download and boot the initramfs image by entering "tftpboot; bootm;"
   in U-Boot.

6. After OpenWrt booted, create a UBI volume on the old data partition.
   The "ubi" mtd partition should be mtd7, check this using

   $ cat /proc/mtd

   Create a UBI partition by executing

   $ ubiformat /dev/mtd7 -y

7. Increase the loadable kernel-size of U-Boot by executing

   $ fw_setenv SysAKernSize 800000

8. Transfer the OpenWrt sysupgrade image to the Watchguard T10 using
   scp. Install the image by using sysupgrade:

   $ sysupgrade -n <path-to-sysupgrade>

   Note: The LAN ports of the T10 are 1 & 2 while 0 is WAN. You might
   have to change the ethernet-port.

9. OpenWrt should now boot from the internal NAND. Enjoy.

Signed-off-by: David Bauer <mail@david-bauer.net>
20 months agohostapd: enable radius server support
Felix Fietkau [Tue, 7 Mar 2023 09:23:38 +0000 (10:23 +0100)]
hostapd: enable radius server support

This is useful in combination with the built-in eap server support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agohostapd: add missing return code for the bss_mgmt_enable ubus method
Felix Fietkau [Tue, 7 Mar 2023 09:23:17 +0000 (10:23 +0100)]
hostapd: add missing return code for the bss_mgmt_enable ubus method

Fixes bogus errors on ubus calls

Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agohostapd: add support for defining multiple acct/auth servers
Felix Fietkau [Thu, 2 Mar 2023 11:49:10 +0000 (12:49 +0100)]
hostapd: add support for defining multiple acct/auth servers

This allows adding backup servers, in case the primary ones fail.
Assume that port and shared secret are going to be the same.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agoat91: switch to Kernel 5.15 by default
Paul Spooren [Wed, 22 Feb 2023 18:40:20 +0000 (19:40 +0100)]
at91: switch to Kernel 5.15 by default

Getting ready for the next release.

Claudiu said:
> I tested v5.15 on all targets I have access to previously, when
> updating OpenWrt kernel for v5.15 and when preparing this PR. (#11918)

Signed-off-by: Paul Spooren <mail@aparcar.org>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
20 months agokernel: bump 5.10 to 5.10.172
John Audia [Fri, 3 Mar 2023 18:37:30 +0000 (13:37 -0500)]
kernel: bump 5.10 to 5.10.172

Removed upstreamed:
backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.171&id=3e4bbd1f38a8d35bd2d3aaffdb5f6ada546b669a

Signed-off-by: John Audia <therealgraysky@proton.me>
20 months agokernel: bump 5.10 to 5.10.170
John Audia [Mon, 27 Feb 2023 22:58:42 +0000 (17:58 -0500)]
kernel: bump 5.10 to 5.10.170

No patches modified for this bump

Signed-off-by: John Audia <therealgraysky@proton.me>
20 months agokernel: bump 5.10 to 5.10.169
John Audia [Sat, 25 Feb 2023 21:20:28 +0000 (16:20 -0500)]
kernel: bump 5.10 to 5.10.169

Manually rebased:
        backport-5.10/811-v6.1-0001-nvmem-core-Fix-memleak-in-nvmem_register.patch

Removed upstreamed:
        backport-5.10/811-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch[1]
patches-5.10/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch[2]

Add fix:
target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch[3]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.169&id=a19a0f67dbb89ad2bfc466f2003841acba645884
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.169&id=a5c51e0c3202820192db3f3809e072f3ca2b1177
3. https://lore.kernel.org/stable/20230227211548.13923-1-kuniyu@amazon.com

Signed-off-by: John Audia <therealgraysky@proton.me>
20 months agoopenssl: fix variable reference in conffiles
Eneas U de Queiroz [Mon, 6 Mar 2023 14:58:56 +0000 (11:58 -0300)]
openssl: fix variable reference in conffiles

Fix the trivial abscence of $() when assigning engine config files to
the main libopenssl-config package even if the corresponding engines
were not built into the main library.

This is mostly cosmetic, since scripts/ipkg-build tests the file's
presence before it is actually included in the package's conffiles.

Fixes: 30b0351039 "openssl: configure engine packages during install"
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
20 months agoopenssl: fix sysupgrade failure with devcrypto
Eneas U de Queiroz [Mon, 6 Mar 2023 14:58:56 +0000 (11:58 -0300)]
openssl: fix sysupgrade failure with devcrypto

The bump to 3.0.8 inadvertently removed patches that are needed here,
but were not adopted upstream.  The most important one changes the
default value of the DIGESTS setting from ALL to NONE.  The absence of
this patch causes a sysupgrade failure while the engine is in use with
digests enabled.  When this happens, the system fails to boot with a
kernel panic.

Also, explicitly set DIGESTS to NONE in the provided config file, and
change the default ciphers setting to disable ECB, which has been
recommended for a long time and may cause trouble with some apps.

The config file change by itself is not enough because the config file
may be preserved during sysupgrade.

For people affected by this bug:

You can either:
1. remove, the libopenssl-devcrypto package
2. disable the engine in /etc/config/openssl;
3. change /etc/ssl/engines.cnf.d/devcrypto.cnf to set DIGESTS=NONE;
4. update libopenssl-devcrypto to >=3.0.8-3

However, after doing any of the above, **you must reboot the device
before running sysupgrade** to ensure no running application is using
the engine.  Running `/etc/init.d/openssl restart` is not enough.

Fixes: 7e7e76afca "openssl: bump to 3.0.8"
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
20 months agobinutils: Update to version 2.40
Hauke Mehrtens [Sun, 26 Feb 2023 14:47:09 +0000 (15:47 +0100)]
binutils: Update to version 2.40

binutils 2.39: https://lists.gnu.org/archive/html/info-gnu/2022-08/msg00002.html
binutils 2.40: https://lists.gnu.org/archive/html/info-gnu/2023-01/msg00003.html

This version includes a new libsframe.so library, pack it into the
libbfd package as it is used by this library. Also deactivate some
optional configuration options for now.

An extra patch to fix compile problem in AARCH64 is added.
gprofng needs a C++ standard library, deactivate it for now.

Activate feature-disassembler-init-styled in bpftools too to fix
compilation with the updated binutils.

An bpftool version 7.0 or later is needed for binutils 2.39 and later.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
20 months agobpftool: Update to version 7.1.0
Hauke Mehrtens [Sat, 25 Feb 2023 21:21:15 +0000 (22:21 +0100)]
bpftool: Update to version 7.1.0

bpftool changelog: https://github.com/libbpf/bpftool/releases
libbpf changelog: https://github.com/libbpf/libbpf/releases

This updates the bfptool to version 7.1.0. This also includes an update
of the libbpf to version 1.1.

This also adds some new feature options and removes some old ones which
were also removed form the source code. zlib for example is now
mandatory.

Add -flto also to LD flags to make it really work.

Before this change bpftool was on a git commit between version 6.7 and
6.8 and libbpf was on a commit between version 0.7 and 0.8.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
20 months agomac80211: enable ATH9K_HWRNG
Rosen Penev [Wed, 15 Feb 2023 03:31:03 +0000 (19:31 -0800)]
mac80211: enable ATH9K_HWRNG

in kernel 5.17, fcd09c90c3c5254b18ef34e30c57c65d34290a84 integrated it
better with thee random framework.

Gives boot time randomness on supported devices.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
20 months agoksmbd: update to 3.4.7
Rosen Penev [Wed, 1 Feb 2023 22:50:22 +0000 (14:50 -0800)]
ksmbd: update to 3.4.7

Remove upstreamed patches.

Switch to normal tarballs. Codeload recently had a reproducibility issue.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
20 months agobcm47xx: Refresh patches
Hauke Mehrtens [Sun, 5 Mar 2023 17:42:49 +0000 (18:42 +0100)]
bcm47xx: Refresh patches

The kernel patches did not apply cleanly any more, refresh them
automatically.

Fixes: 26bc8f68767e ("generic: MIPS: Add barriers between dcache & icache flushes")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
20 months agosdk: expose PATENTED an NLS build options
Tomasz Maciej Nowak [Fri, 17 Feb 2023 13:21:01 +0000 (14:21 +0100)]
sdk: expose PATENTED an NLS build options

Some packages offer functionalities guarded by these options and it'll
be impossible to reach them without changing Config-build.in. So allow
to toggle these in more friendly way, by exposing them in configuration
menu.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
20 months agoRemove ccache wrappers
Paul Fertser [Fri, 20 Jan 2023 15:25:13 +0000 (18:25 +0300)]
Remove ccache wrappers

These wrappers are not needed as CC doesn't need to be a single word.

a53b084e497a9f1629a2caada833ebe14a6838b7 which introduced the wrappers
doesn't explain why they were really needed and why only for the target
and not for the host.

Moreover, name of the wrappers breaks a ccache assumption: since
v4.0-3-g6a92b4cd3a67 it has special handling for "chained" invocation
such as "ccache ccache gcc" where it skips all the "ccache*" names in
the middle and proceeds to run as if it was started as "ccache
gcc"[1][2].

This becomes important when a build system sees ccache in the PATH and
automatically enables it by prepending to CC. An example of such a
system would be autosetup as used by jimtcl. With the wrappers it breaks
as the command line ends up being just "ccache -Os..." because
"ccache_cc" gets skipped as it starts with "ccache".

[1] https://github.com/ccache/ccache/blob/master/src/ccache.cpp#L2105
[2] https://github.com/ccache/ccache/blob/master/src/Util.cpp#L802

Reported-by: Karl Palsson <karlp@etactica.com>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
20 months agokernel: set default for KERNEL_BPF_KPROBE_OVERRIDE
Stijn Tintel [Mon, 20 Feb 2023 14:00:54 +0000 (16:00 +0200)]
kernel: set default for KERNEL_BPF_KPROBE_OVERRIDE

Without the default value this still causes a missing symbol. Disable by
default as it depends on FUNCTION_ERROR_INJECTION, which is disabled in
the generic config and we don't have a build symbol to enable that.

Fixes: 500c37c56ff6 ("kernel: add missing symbol")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
20 months agomediatek: backport more WED upstream fixes
Felix Fietkau [Sun, 5 Mar 2023 16:25:34 +0000 (17:25 +0100)]
mediatek: backport more WED upstream fixes

Fixes hang if the WO firmware can't be loaded

Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agoipq806x: Add buttons to OnHub
Alan Luck [Sun, 26 Feb 2023 06:17:37 +0000 (22:17 -0800)]
ipq806x: Add buttons to OnHub

These are the factory reset button (external) and "developer mode"
button (hidden inside the case (ASUS) or under a screw in the base
(TP-Link)) found on the TP-Link and ASUS OnHub devices.

Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
[Brian: add description; factor out for both ASUS and TP-Link; use
existing pinmux definitions; add keycode for dev button]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
20 months agokernel: add kmod-hwmon-max6642 support
Tim Harvey [Tue, 28 Feb 2023 00:13:07 +0000 (16:13 -0800)]
kernel: add kmod-hwmon-max6642 support

Add package for Maxim MAX6642 i2c based temperature sensor.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
20 months agouci: update to git HEAD
Hauke Mehrtens [Sun, 5 Mar 2023 15:39:24 +0000 (16:39 +0100)]
uci: update to git HEAD

5de3871 cli: drop redundant uci_add_delta_path() call for -P
f49a2fd delta: simplify uci_load_delta() by using a helper
9b6605e uci: fix use-after-free uci_set on update option
b7ceda9 uci: maintain option position in uci_set
7e01d66 uci: optimize update option in uci_set
47697e6 uci: fix use-after-free uci_add_list
74f2797 uci: fix atomicity of uci_add_list
b2f3417 uci: maintain option position in uci_add_list
16e8a3b uci: fix memory leak uci_set on update section
ae61e1c uci: optimize update section in uci_set
04d0c46 uci: macro uci_alloc_element not in uci.h

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
20 months agoRevert "bmips: add missing switch cpu label"
Álvaro Fernández Rojas [Sun, 5 Mar 2023 10:51:46 +0000 (11:51 +0100)]
Revert "bmips: add missing switch cpu label"

This reverts commit dc0de05e10a9c6e1ef66ca2934e8a0ff0d488943.
As pointed out by @BKPepe and @arinc9 this was removed by 9df035b since it
isn't needed.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
20 months agomediatek: add missing DTS entries for WED on MT7986
Felix Fietkau [Sun, 5 Mar 2023 08:58:40 +0000 (09:58 +0100)]
mediatek: add missing DTS entries for WED on MT7986

Needed to support WLAN offloading

Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agokernel: backport upstream mtk_eth_soc fixes
Felix Fietkau [Sat, 4 Mar 2023 18:11:37 +0000 (19:11 +0100)]
kernel: backport upstream mtk_eth_soc fixes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agokernel: move accepted mtk_eth_soc patches to generic-backport
Felix Fietkau [Sat, 4 Mar 2023 16:57:46 +0000 (17:57 +0100)]
kernel: move accepted mtk_eth_soc patches to generic-backport

Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agodtc: update to 1.7.0
Nick Hainke [Wed, 1 Mar 2023 21:18:14 +0000 (22:18 +0100)]
dtc: update to 1.7.0

Changelog:
039a994 Bump version to v1.7.0
3f29d6d pylibfdt: add size_hint parameter for get_path
2022bb1 checks: Update #{size,address}-cells check for 'dma-ranges'
abbd523 pylibfdt: Work-around SWIG limitations with flexible arrays
a41509b libfdt: Replace deprecated 0-length arrays with proper flexible arrays
2cd89f8 dtc: Warning rather than error on possible truncation of cell values
55778a0 libfdt: tests: add get_next_tag_invalid_prop_len
7359034 libfdt: prevent integer overflow in fdt_next_tag
035fb90 libfdt: add fdt_get_property_by_offset_w helper
98a0700 Makefile: fix infinite recursion by dropping non-existent `%.output`
a036cc7 Makefile: limit make re-execution to avoid infinite spin
c6e9210 libdtc: remove duplicate judgments
e37c256 Don't generate erroneous fixups from reference to path
5045465 libfdt: Don't mask fdt_get_name() returned error
e64a204 manual.txt: Follow README.md and remove Jon
f508c83 Update README in MANIFEST.in and setup.py to README.md
c2ccf8a Add description of Signed-off-by lines
90b9d9d Split out information for contributors to CONTRIBUTING.md
0ee1d47 Remove Jon Loeliger from maintainers list
b33a73c Convert README to README.md
7ad6073 Allow static building with meson
fd9b8c9 Allow static building with make
fda71da libfdt: Handle failed get_name() on BEGIN_NODE
c7c7f17 Fix test script to run also on dash shell
01f23ff Add missing relref_merge test to meson test list
ed31080 pylibfdt: add FdtRo.get_path()
c001fc0 pylibfdt: fix swig build in install
26c54f8 tests: add test cases for label-relative path references
ec7986e dtc: introduce label relative path references
651410e util: introduce xstrndup helper
4048aed setup.py: fix out of tree build
ff5afb9 Handle integer overflow in check_property_phandle_args()
ca72944 README: Explain how to add a new API function
c0c2e11 Fix a UB when fdt_get_string return null
cd5f69c tests: setprop_inplace: use xstrdup instead of unchecked strdup
a04f690 pylibfdt: add Property.as_*int*_array()
8310271 pylibfdt: add Property.as_stringlist()
d152126 Fix Python crash on getprop deallocation
17739b7 Support 'r' format for printing raw bytes with fdtget
45f3d1a libfdt: overlay: make overlay_get_target() public
c19a4ba libfdt: fix an incorrect integer promotion
1cc41b1 pylibfdt: Add packaging metadata
db72398 README: Update pylibfdt install instructions
383e148 pylibfdt: fix with Python 3.10
23b56cb pylibfdt: Move setup.py to the top level
69a7607 pylibfdt: Split setup.py author name and email
0b106a7 pylibfdt: Use setuptools_scm for the version
c691776 pylibfdt: Use setuptools instead of distutils
5216f3f libfdt: Add static lib to meson build
4eda259 CI: Cirrus: bump used FreeBSD from 12.1 to 13.0
0a3a9d3 checks: Add an interrupt-map check
8fd2474 checks: Ensure '#interrupt-cells' only exists in interrupt providers
d8d1a9a checks: Drop interrupt provider '#address-cells' check
52a16fd checks: Make interrupt_provider check dependent on interrupts_extended_is_cell
37fd700 treesource: Maintain phandle label/path on output
e33ce1d flattree: Use '\n', not ';' to separate asm pseudo-ops
d24cc18 asm: Use assembler macros instead of cpp macros
ff3a30c asm: Use .asciz and .ascii instead of .string
5eb5927 fdtdump: fix -Werror=int-to-pointer-cast
0869f82 libfdt: Add ALIGNMENT error string
69595a1 checks: Fix bus-range check
72d09e2 Makefile: add -Wsign-compare to warning options
b587787 checks: Fix signedness comparisons warnings
69bed6c dtc: Wrap phandle validity check
9102211 fdtget: Fix signedness comparisons warnings
d966f08 tests: Fix signedness comparisons warnings
ecfb438 dtc: Fix signedness comparisons warnings: pointer diff
5bec74a dtc: Fix signedness comparisons warnings: reservednum
24e7f51 fdtdump: Fix signedness comparisons warnings

Remove upstreamed:
- 0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
20 months agomac80211: refresh patches
Nick Hainke [Wed, 1 Mar 2023 20:14:54 +0000 (21:14 +0100)]
mac80211: refresh patches

The last mac80211 commits did not refresh the patches.

Refresh:
- ath/402-ath_regd_optional.patch
- ath10k/080-ath10k_thermal_config.patch
- ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
- ath9k/551-ath9k_ubnt_uap_plus_hsr.patch
- rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
20 months agobmips: add missing switch cpu label
Álvaro Fernández Rojas [Sat, 4 Mar 2023 20:27:30 +0000 (21:27 +0100)]
bmips: add missing switch cpu label

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
20 months agobcm63xx: kernel: power cycle the bcm6358 USB PLL
Daniel González Cabanelas [Mon, 19 Dec 2022 14:25:30 +0000 (15:25 +0100)]
bcm63xx: kernel: power cycle the bcm6358 USB PLL

Some BCM6358 based boards may detect USB2.0 high speed devices as USB1.1
full speed. This is an old well known bug, but nobody cared about it. It
is quite random and hard to track.

With the latest versions of Openwrt, one user confirmed that the bug is
still there (tested router: HG556a).

Power cycle the USB PLL to fix it.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
20 months agobcm63xx: kernel: fix up bcm63268 roboswitch gpio registers
Daniel González Cabanelas [Mon, 19 Dec 2022 14:21:28 +0000 (15:21 +0100)]
bcm63xx: kernel: fix up bcm63268 roboswitch gpio registers

Some BCM63268 bootloaders may leave gpio registers, related to the
roboswitch, disabled before loading the OpenWrt firmware. As result of
this the switch won't work.

These registers, if not enabled, probably avoid forwarding packets.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
20 months agobcm63xx: drop kernel 5.10 support
Álvaro Fernández Rojas [Sat, 4 Mar 2023 18:47:06 +0000 (19:47 +0100)]
bcm63xx: drop kernel 5.10 support

Now that the target is on kernel 5.15 this is no longer needed.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
20 months agobcm63xx: switch to Kernel 5.15 by default
Paul Spooren [Wed, 22 Feb 2023 18:50:58 +0000 (19:50 +0100)]
bcm63xx: switch to Kernel 5.15 by default

Getting ready for the next release.

Signed-off-by: Paul Spooren <mail@aparcar.org>
20 months agobmips: check for DMA error when refilling Rx
Sieng-Piaw Liew [Tue, 19 Jul 2022 00:20:45 +0000 (08:20 +0800)]
bmips: check for DMA error when refilling Rx

dma_mapping_error() should be called as dma_map_single() could fail and
return error.

Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com>
20 months agobmips: fix Tx cleanup when NAPI poll budget is zero
Sieng-Piaw Liew [Fri, 8 Jul 2022 08:16:08 +0000 (16:16 +0800)]
bmips: fix Tx cleanup when NAPI poll budget is zero

NAPI poll() function may be passed a budget value of zero, i.e. during
netpoll, which isn't NAPI context.
Therefore, napi_consume_skb() must be given budget value instead of
!force to truly discern netpoll-like scenarios.

https://lore.kernel.org/netdev/20220707141056.2644-1-liew.s.piaw@gmail.com/t/#m470f5c20225e76fb08c44d6cfa2f1b739ffaaea4
Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com>
[improve code format]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
20 months agobmips: add BQL support
Sieng Piaw Liew [Wed, 29 Jun 2022 08:18:12 +0000 (16:18 +0800)]
bmips: add BQL support

Add Byte Queue Limits support to reduce/remove bufferbloat.

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
20 months agobmips: batch process eth_type_trans() in rx path
Sieng Piaw Liew [Wed, 29 Jun 2022 08:16:13 +0000 (16:16 +0800)]
bmips: batch process eth_type_trans() in rx path

Improve cache efficiency by running eth_type_trans() in its own loop.

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
20 months agobmips: batch process rx path
Sieng Piaw Liew [Wed, 29 Jun 2022 08:11:38 +0000 (16:11 +0800)]
bmips: batch process rx path

Use netif_receive_skb_list() to batch process rx skb. This improves
cache efficiency.

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
20 months agobmips: improve rx loop
Sieng Piaw Liew [Thu, 23 Jun 2022 06:48:42 +0000 (14:48 +0800)]
bmips: improve rx loop

Use existing rx processed count to track against budget, thereby making
budget decrement operation redundant.
rx_desc_count can be calculated outside the rx loop, making the loop a
bit smaller.

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
20 months agobmips: switch to napi_build_skb() to reuse skbuff_heads
Sieng Piaw Liew [Thu, 23 Jun 2022 04:49:28 +0000 (12:49 +0800)]
bmips: switch to napi_build_skb() to reuse skbuff_heads

napi_build_skb() reuses NAPI skbuff_head cache in order to save some
cycles on freeing/allocating skbuff_heads on every new rx or completed
tx.
Use napi_consume_skb() to feed the cache with skbuff_heads of completed
tx so it's never empty.

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
20 months agobmips: check NAPI context when refilling rx SKB
Sieng Piaw Liew [Thu, 23 Jun 2022 03:49:23 +0000 (11:49 +0800)]
bmips: check NAPI context when refilling rx SKB

Check if we're in NAPI context when refilling rx. Normally we're almost
always running in NAPI context. Dispatch to napi_alloc_frag() directly
instead of relying on netdev_alloc_frag() which does the same but with
the overhead of local_bh_disable/enable.

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
[improve code format]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
20 months agobmips: convert to build_skb()
Sieng Piaw Liew [Thu, 23 Jun 2022 03:16:47 +0000 (11:16 +0800)]
bmips: convert to build_skb()

We can increase the efficiency of rx path by using buffers to receive
packets then build SKBs around them just before passing into the network
stack. In contrast, preallocating SKBs too early reduces CPU cache
efficiency.
Performance is slightly increased but the changes allow more
potential optimizations.

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
[improve code format]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
20 months agobmips: use netdev_alloc_skb() for copybreak
Sieng Piaw Liew [Wed, 22 Jun 2022 05:22:17 +0000 (13:22 +0800)]
bmips: use netdev_alloc_skb() for copybreak

bmips is using Broadcom B53 DSA driver which means the ethernet driver
must compensate for 6 bytes tags from the internal switch.
This means using NET_IP_ALIGN actually misaligns the skb, lowering
performance significantly. Therefore napi_alloc_skb() which uses
NET_IP_ALIGN is changed to netdev_alloc_skb().
Performance in iperf3 is increased from ~47Mbps to 52Mbps.

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
20 months agoramips: mt7621: TP-Link EAP235/615-Wall: add poe passthrough gpio definitions
André Fonseca [Mon, 27 Feb 2023 11:58:08 +0000 (12:58 +0100)]
ramips: mt7621: TP-Link EAP235/615-Wall: add poe passthrough gpio definitions

Add the missing definitions for the PoE passthrough functionality.
The relevant pin is already being exported, but it is missing from
the initial board configuration file. With this change, the user is
now able to toggle the PoE passthorough functionality via the uci cli

Signed-off-by: André Fonseca <mail@andrefonseca.pt>
20 months agobpf-headers: fix package category
Chukun Pan [Sun, 12 Feb 2023 15:19:16 +0000 (23:19 +0800)]
bpf-headers: fix package category

This removes the non-selectable 'Kernel' item
when make menuconfig.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
20 months agouboot-mediatek: mark all packages as hidden
Felix Fietkau [Sat, 4 Mar 2023 15:26:54 +0000 (16:26 +0100)]
uboot-mediatek: mark all packages as hidden

They are enabled by selecting devices. Fixes build errors when enabling extra
devices without creating a new config from scratch.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agoramips: fix wrong pcie port number for Arcadyan WE420223-99
Mikhail Zhilkin [Sun, 26 Feb 2023 18:28:54 +0000 (18:28 +0000)]
ramips: fix wrong pcie port number for Arcadyan WE420223-99

Wrong pcie port number for WLAN causes missing 5g WLAN interface with 5.15
kernel on Arcadyan WE420223-99 (KPN Experia WiFi).

This changes port from pcie0 to pcie1.

[1.331556] mt7621-pci 1e140000.pcie: pcie0 no card, disable it (RST & CLK)
[1.345299] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[1.359116] mt7621-pci 1e140000.pcie: PCIE1 enabled

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
20 months agoramips: add support for D-Link Dir-853 A1
Hang Zhou [Sun, 26 Feb 2023 09:13:33 +0000 (20:13 +1100)]
ramips: add support for D-Link Dir-853 A1

Specifications:
* SoC: MT7621AT
* RAM: 256MB (NT5CC64M16GP-DI)
* Flash: 16MB NOR SPI flash (GD25Q127CSIG, using GD25Q128C driver)
* WiFi: MT7615DN (2.4GHz+5Ghz) with DBDC
* Ethernet: 4x1000M LAN, 1x 1000M WAN
* LEDs: Power Blue+Orange,Wan Blue+Orange,WPS Blue,"2.4G"Blue, "5G" Blue,
  USB Blue
* Buttons: Reset,WPS, Wifi
* Serial interface: on board but not populated, pinout (from the DC jack
side to the WAN port side) is "3.3V Input Output Gnd". Baud rate is 57600,
settings are 8 data bits, no parity bit, one stop bit, and no flow control.

Stock flash layout:
```
GD25Q128C(c8 40180000) (16384 Kbytes)
mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K)
.numeraseregions = 0
Creating 7 MTD partitions on "raspi":
0x000000000000-0x000001000000 : "ALL"
0x000000000000-0x000000030000 : "Bootloader"
0x000000030000-0x000000040000 : "Config"
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x000000060000 : "Config2"
0x000000060000-0x000000fb0000 : "Kernel"
0x000000fb0000-0x000001000000 : "Private"
```
The kernel partition will be replaced with the OpenWrt image, the other
partitions are left untouched.

"Config2" seems to be the config storage used by the stock firmware.

"Private" is a 320kB empty JFFS2 partition that comes with the stock
firmware. One can get a larger space for OpenWrt by merging it with
"Kernel".

OpenWrt flash layout:
```
0x000000000000-0x000000030000 : "u-boot"
0x000000030000-0x000000040000 : "u-boot-env"
0x000000040000-0x000000050000 : "factory"
0x000000050000-0x000000060000 : "config2_stock"
0x000000060000-0x000000fb0000 : "firmware"
0x000000fb0000-0x000001000000 : "private_stock"
```

The OpenWrt image must have 96 bytes of padding in the header.

MAC addresses on OEM firmware:
|       | location on the flash  | notes     |
|------ |----------------------- |---------- |
| lan (eth2)  | factory + 0xe000       | on label  |
| wan (eth3)  | factory + 0xe006       |           |
| 2.4g (rax0)  | not on flash           | lan + 1   |
| 5g (ra0)  | not on flash           | lan + 2   |

Mac addresses of the 2.4g and 5g interface are stored as ASCII strings in
the u-boot-env partition, but they are not used. OpenWrt calculates
Wifi Mac addresses based on the LAN Mac.

Flash and test instructions:
Flash the encrypted image (available in the OpenWrt forum) through the
stock D-Dink web interface.

1. Open the case, and solder the 4-pin header near the WAN port.
2. Connect it to a USB-UART TTL (3.3V) adapter, no need to connect VCC.
3. Open a terminal emulator (e.g. `screen /dev/ttyUSB0` on linux) with
the settings mentioned above.
4. Setup a TFTP server on your PC that can serve
`xxx-ramips-mt7621-dlink_dir-853-a1-initramfs-kernel.bin`.
5. Connect any LAN port to your PC and set a static IPv4 address to
192.168.0.101 (netmask 255.255.255.0).
6. Power on the device and keeps pressing 1 until you see the prompt.
7. Use default IP addresses and enter the file name accordingly, then hit
enter.
8. Wait until it boots to OpenWrt, the default IP address is 192.168.1.1,
you need to change your PC network adapter to use DHCP in order to access
LUCI.
9. So far, the OpenWrt runs in RAM and the flash contents are not touched.
You can try OpenWrt without having to overwrite the stock firmware, a
reboot clears all changes.
10. Optionally, backup the stock firmware (the "firmware" partition) in
Luci.
11. To permantly install OpenWrt to the device , click
on "System -> Backup/Flash Firmware" in Luci and flash
`xxx-ramips-mt7621-dlink_dir-853-a1-squashfs-sysupgrade.bin`

Known problems:
* WLAN0 defaults to 5G after a fresh installation, to enable 2.4G network,
you need to config it manually in LUCI.

* If you see jffs2 related warnings/errors after updating from the stock
web interface, you need to do a reset in LUCI. The error will be gone after
a cold reboot.

Signed-off-by: Hang Zhou <929513338qq@gmail.com>
20 months agoipq807x: don't generate factory.ubi for Buffalo WXR-5950AX12
INAGAKI Hiroshi [Sat, 25 Feb 2023 00:56:27 +0000 (09:56 +0900)]
ipq807x: don't generate factory.ubi for Buffalo WXR-5950AX12

On WXR-5950AX12, squashfs-factory.ubi is unnecessary for OpenWrt
installation and other purposes, so drop it from IMAGES and don't
generate to prevent confusion of users.

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
20 months agogeneric: MIPS: Add barriers between dcache & icache flushes
David Bauer [Thu, 2 Mar 2023 15:53:59 +0000 (16:53 +0100)]
generic: MIPS: Add barriers between dcache & icache flushes

This fixes spurious boot-errors with some ath79 MIPS 74Kc boards such
as the AC Lite as well as Archer C7 v2.

The missing barrier leads to the icache flush being executed before the
dcache writeback, which results in the CPU executing the dummy infinite
loop in tlbmiss_handler_setup_pgd.

Applying this patch from upstream ensures the dcache is written back
before flushing the icache.

Signed-off-by: David Bauer <mail@david-bauer.net>
20 months agokernel: bump 5.15 to 5.15.98
John Audia [Fri, 3 Mar 2023 18:39:04 +0000 (13:39 -0500)]
kernel: bump 5.15 to 5.15.98

Removed upstreamed:
backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.98&id=e7f460696340fe5caba5f21ddb262a44a2388af2

Build system: x86_64
Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
20 months agompc85xx: p2020: enable CONFIG_MAX63XX_WATCHDOG
Josef Schlehofer [Mon, 5 Sep 2022 14:36:26 +0000 (16:36 +0200)]
mpc85xx: p2020: enable CONFIG_MAX63XX_WATCHDOG

This enables CONFIG_MAX63XX_WATCHDOG [1], which can be used on P2020
RDB.

[1] https://cateee.net/lkddb/web-lkddb/MAX63XX_WATCHDOG.html

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
20 months agokernel: add support for max6370 watchdog via GPIO
Josef Schlehofer [Mon, 5 Sep 2022 12:54:44 +0000 (14:54 +0200)]
kernel: add support for max6370 watchdog via GPIO

This backports the third version [1], which is awaiting upstream merge. It
adds support for watchdog max6370, which is connected via GPIO. It
is useful primarily for P2020 RDB and Turris 1.x routers, which are
not yet supported.

[1] https://www.spinics.net/lists/linux-watchdog/msg23299.html

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
20 months agokernel: move CONFIG_PAGE_POOL to generic
Nick Hainke [Thu, 23 Feb 2023 10:45:52 +0000 (11:45 +0100)]
kernel: move CONFIG_PAGE_POOL to generic

Move "# CONFIG_PAGE_POOL is not set" to generic.

Suggested-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Nick Hainke <vincent@systemli.org>
20 months agomac80211: fix regression in sw a-msdu tx introduced in mesh improvement patches
Felix Fietkau [Fri, 3 Mar 2023 10:20:46 +0000 (11:20 +0100)]
mac80211: fix regression in sw a-msdu tx introduced in mesh improvement patches

Fixes: 6262d3eb068c ("mac80211: sync mesh fast xmit patch with upstream requested changes")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agobmips: loader-lzma: drop unused RAMSIZE parameter
Álvaro Fernández Rojas [Thu, 2 Mar 2023 17:32:29 +0000 (18:32 +0100)]
bmips: loader-lzma: drop unused RAMSIZE parameter

This parameter has never been used.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
20 months agobcm63xx: loader-lzma: drop unused RAMSIZE parameter
Álvaro Fernández Rojas [Thu, 2 Mar 2023 17:00:40 +0000 (18:00 +0100)]
bcm63xx: loader-lzma: drop unused RAMSIZE parameter

This parameter has never been used.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
20 months agofritz-tools: fix segfault in caldata-extract
David Bauer [Tue, 28 Feb 2023 18:53:44 +0000 (19:53 +0100)]
fritz-tools: fix segfault in caldata-extract

 * Fix incorrect error message in case input file opening fails
 * Don't close files in case the pointers are invalid

Signed-off-by: David Bauer <mail@david-bauer.net>
20 months agomac80211: add mesh fast-rx support
Felix Fietkau [Thu, 2 Mar 2023 13:03:47 +0000 (14:03 +0100)]
mac80211: add mesh fast-rx support

This helps bring down rx CPU usage by avoiding calls to the rx handlers in
the slow path. Supports forwarding and local rx, including A-MSDU.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agokernel: fix mtk dsa tag padding
Felix Fietkau [Thu, 2 Mar 2023 11:58:16 +0000 (12:58 +0100)]
kernel: fix mtk dsa tag padding

The padding intended to avoid corrupted non-zero padding payload was
accidentally adding too many padding bytes, tripping up some setups.
Fix this by using eth_skb_pad instead.
Fixes #11942.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agolinux-firmware: add mt7986 offload firmware
Felix Fietkau [Thu, 2 Mar 2023 10:24:15 +0000 (11:24 +0100)]
linux-firmware: add mt7986 offload firmware

This is needed for WED support on MT7986.
Enable it by default for the filogic subtarget.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agomt76: update to the latest version
Felix Fietkau [Wed, 1 Mar 2023 18:59:35 +0000 (19:59 +0100)]
mt76: update to the latest version

71d84bfb343e wifi: mt76: mt76x0u: report firmware version through ethtool
99d13130b517 wifi: mt76: support ww power config in dts node
09c614734880 Revert "wifi: mt76: mt7996: rely on mt76_connac2_mac_decode_he_radiotap"
e1c9c1cb50a8 mt76: mt7921: Let PCI core handle power state and use pm_sleep_ptr()
34064dbcd72a wifi: mt76: mt7921e: add pci .shutdown() support
18ccfa73a9e2 wifi: mt76: remove redundent MCU_UNI_CMD_* definitions
282845ce7f3d wifi: mt76: mt7921: fix wrong command to set STA channel
546934dacfd4 wifi: mt76: mt7921: fix PCI DMA hang after reboot
fc2ed0dfc5b0 wifi: mt76: mt7996: Remove unneeded semicolon
1b602db9c235 wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store()
ce2438aa616a wifi: mt76: mt7996: fix radiotap bitfield
17ec2146b8f0 wifi: mt76: dynamic channel bandwidth changes in AP mode
ab2d3650a456 wifi: mt76: mt7915: expose device tree match table
90d78253498e wifi: mt76: mt7915: add dev->hif2 support for mt7916 WED device
a69c34a60451 wifi: mt76: mt7915: rework init flow in mt7915_thermal_init()
39079b5e44a7 wifi: mt76: drop the incorrect scatter and gather frame
f9ca70d6367a wifi: mt76: mt7915: add back 160MHz channel width support for MT7915
eff7666e1aa4 wifi: mt76: handle failure of vzalloc in mt7615_coredump_work
920bc6e1fc8e wifi: mt76: do not run mt76_unregister_device() on unregistered hw
b0721b96927b wifi: mt76: connac: refresh tx session timer for WED device
c32d6d849c43 wifi: mt76: usb: fix use-after-free in mt76u_free_rx_queue

Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agomac80211: add patch for allowing the driver to refresh aggregation sessions
Felix Fietkau [Thu, 2 Mar 2023 10:18:14 +0000 (11:18 +0100)]
mac80211: add patch for allowing the driver to refresh aggregation sessions

Required by a mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agomac80211: backport upstream HE/VHT capability handling changes
Felix Fietkau [Wed, 1 Mar 2023 13:41:01 +0000 (14:41 +0100)]
mac80211: backport upstream HE/VHT capability handling changes

Will be required by an mt76 update at some point

Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 months agomac80211: sync mesh fast xmit patch with upstream requested changes
Felix Fietkau [Tue, 28 Feb 2023 10:05:48 +0000 (11:05 +0100)]
mac80211: sync mesh fast xmit patch with upstream requested changes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
21 months agotoolchain/binutils: switch to version 2.40 by default
Hauke Mehrtens [Mon, 20 Feb 2023 21:38:27 +0000 (22:38 +0100)]
toolchain/binutils: switch to version 2.40 by default

This was build tested with all core packages on all targets
successfully.

This was run tested on the following systems:
* lantiq/xrx200 musl
* x86/64 musl
* x86/64 glibc
* malta/be

The size of some of the initramfs images from lantiq/xrx increased by
240 bytes.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
21 months agotoolchain/binutils: backport stable patches
Hauke Mehrtens [Mon, 20 Feb 2023 21:35:50 +0000 (22:35 +0100)]
toolchain/binutils: backport stable patches

Add the patches with real changes from the binutils 2.40 stable branch.
I am not aware that we ran into any of these problems, but I think it is
better to take the existing stable patches.

They were exported like this:
git format-patch binutils-2_40...origin/binutils-2_40-branch
I removed the patches changing the version numbers and updating the
translations only.

I removed the following patches:
 *Automatic-date-updat*
 001-Re-enable-development.-Update-version-to-2.40.0.patch
 004-Updated-translations-for-the-gas-and-binutils-sub-di.patch
 015-Updated-Swedish-translation-for-the-binutils-sub-dir.patch
 027-Updated-Swedish-translation-for-the-binutils-sub-dir.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
21 months agokernel: fix hwmon-gsc driver
Tim Harvey [Tue, 28 Feb 2023 00:11:33 +0000 (16:11 -0800)]
kernel: fix hwmon-gsc driver

Fix hwmon-gsc driver by replacing out-of-tree hwmon-gsc driver with in-tree
driver that was merged in Linux v5.8:
 - remove the old out-of-tree module
 - add configuration for the in-tree modules

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
21 months agomt7621: move uboot-envtools to DEFAULT_PACKAGES
Bjørn Mork [Tue, 28 Feb 2023 11:39:36 +0000 (12:39 +0100)]
mt7621: move uboot-envtools to DEFAULT_PACKAGES

Several devices depend on fw_printenv during sysupgrade.  Make sure
it always is present in all images, including initramfs images built
by the buildbots.

Fixes: 2449a632084b ("ramips: mt7621: Add support for ZyXEL NR7101")
Signed-off-by: Bjørn Mork <bjorn@mork.no>