openwrt/staging/dangole.git
18 months agoipq807x: use updated CPUFreq NVMEM support
Robert Marko [Wed, 7 Jun 2023 11:16:32 +0000 (13:16 +0200)]
ipq807x: use updated CPUFreq NVMEM support

Most of the CPUFreq NVMEM patches have been upstreamed in an improved way.
IPQ8074 support itself is being reviewed upstream currently.

Upstreamed patches have been moved to generic backports so that ipq806x can
use them as well, so lets just use the latest version of IPQ8074 support
that is being reviewed upstream.

Runtime tested on Qnap 301W (IPQ8072A) and Xiaomi AX3600 (IPQ8071A).

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agogeneric: 6.1: backport Qualcomm CPUFreq NVMEM changes
Robert Marko [Wed, 7 Jun 2023 11:12:26 +0000 (13:12 +0200)]
generic: 6.1: backport Qualcomm CPUFreq NVMEM changes

Currently, IPQ807x is using CPUFreq NVMEM for dealing with different SoC
SKU-s having different frequency limits, and we are keeping the patches
for it in ipq807x target.

However, we managed to upstream a big cleanup of the driver in order to
make it possible for other SMEM based targets to be added to CPUFreq NVMEM.

IPQ806x will be using CPUFreq NVMEM and depends on these changes as well,
so lets put them in generic backport to avoid code duplication.

This replaces the older patches in ipq807x.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agokernel: ltq-ptm: do not write directly to dev->addr
Aleksander Jan Bajkowski [Sat, 6 May 2023 21:14:16 +0000 (23:14 +0200)]
kernel: ltq-ptm: do not write directly to dev->addr

One is never to write to dev->addr directly. In 6.1 it will be a const and
with the newly enabled WERROR, we get a failing grade.

Lets fix this ahead of time.

Ref: https://github.com/torvalds/linux/commit/adeef3e32146a8d2a73c399dc6f5d76a449131b1
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
18 months agokernel: bump 6.1 to 6.1.32
Robert Marko [Tue, 6 Jun 2023 09:36:06 +0000 (11:36 +0200)]
kernel: bump 6.1 to 6.1.32

Removed upstreamed:
generic-backport/610-v6.3-net-page_pool-use-in_softirq-instead.patch[1]

All other patches automatically rebased.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/net?h=v6.1.32&id=7dccd5fa7edb9562da61af820bb9d0346447baf1

Build system: x86_64/Fedora 38
Build-tested: ipq807x/Dynalink DL-WRX36
Runtime-tested: ipq807x/Dynalink DL-WRX36

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agoipq807x: mark MDT loader fix as backport
Robert Marko [Tue, 6 Jun 2023 10:25:27 +0000 (12:25 +0200)]
ipq807x: mark MDT loader fix as backport

MDT loader fix for remoteproc was already merged, so mark it as a backport
with the future 6.5 kernel version.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agoipq807x: refresh kernel config
Robert Marko [Tue, 6 Jun 2023 10:22:50 +0000 (12:22 +0200)]
ipq807x: refresh kernel config

Refresh the kernel config as multiple options were disabled in the generic
config since 6.1 was added to ipq807x.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agoipq807x: renumber upstreamed patches
Robert Marko [Tue, 6 Jun 2023 10:18:37 +0000 (12:18 +0200)]
ipq807x: renumber upstreamed patches

We are running out of 00xx numbers to put backports into, so lets just
renumber all of the upstreamed patches back to 0000 and onwards.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agomediatek: use DEVICE_DTC_FLAGS and drop DTC_FLAGS where not needed
Daniel Golle [Tue, 6 Jun 2023 12:05:50 +0000 (13:05 +0100)]
mediatek: use DEVICE_DTC_FLAGS and drop DTC_FLAGS where not needed

The MT7986 RFB was intended to use device tree overlays and for that
reason modified DTC_FLAGS. zyxel_ex5601-t0-stock later on probably
copied it from there. Both boards do not actually use device tree
overlays, so remove setting DTC_FLAGS from both.

The BPi-R3 does use device tree overlays, use DEVICE_DTC_FLAGS to give
it an extra 4kb of padding for overlays to be applied.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agomediatek: use DEVICE_DTC_FLAGS for BPi-R64
Daniel Golle [Tue, 6 Jun 2023 12:04:08 +0000 (13:04 +0100)]
mediatek: use DEVICE_DTC_FLAGS for BPi-R64

Make sure there is an extra 4kb of padding to apply device tree overlays
on the BPi-R64.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agoimage: introduce DEVICE_DTC_FLAGS and DEVICE_DTCO_FLAGS
Daniel Golle [Tue, 6 Jun 2023 12:01:15 +0000 (13:01 +0100)]
image: introduce DEVICE_DTC_FLAGS and DEVICE_DTCO_FLAGS

Handle compiling device tree overlay blobs separate to allow for
overlays being compiled with different parameters, mostly to safe
space.
Allow defining DEVICE_DTC_FLAGS and DEVICE_DTCO_FLAGS as per-device
parameters to be passed to dtc. Previously some boards directly used
DTC_FLAGS in their build recipe which then also affected other boards.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agogeneric: backport initial LEDs hw control support
Christian Marangi [Sun, 4 Jun 2023 02:26:59 +0000 (04:26 +0200)]
generic: backport initial LEDs hw control support

Backport initial LEDs hw control support. Currently this is limited to
only rx/tx and link events for the netdev trigger but the API got
accepted and the additional modes are working on and will be backported
later.

Refresh every patch and add the additional config flag for QCA8K new
LEDs support.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agomediatek: set new compat version if booted on R64 and R3
Daniel Golle [Tue, 6 Jun 2023 00:14:27 +0000 (01:14 +0100)]
mediatek: set new compat version if booted on R64 and R3

If the board comes up with OpenWrt that means that the bootloader is
recent enough and knows about the new device tree overlays.

Using /etc/board.d/ is not enough in this case because it doesn't
overwrite existing configuration which may exist (and is fine to exist)
if the user updated with 'sysupgrade -F *.itb' and has kept
configuration. They would still need to manually set compat_version
even though the fact that the bootloader env has been updated can be
implied by the fact that the system has started.

Hence we can always set compat_version=1.1 for those two boards using
uci-defaults.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agomediatek: sync MT7986 device trees with upstream
Daniel Golle [Sun, 4 Jun 2023 14:56:15 +0000 (15:56 +0100)]
mediatek: sync MT7986 device trees with upstream

Sync device tree files for MT7986 boards with what landed in upstream
Linux tree to easy maintainance and also allow for a smooth update to
Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agomediatek: use updated device tree overlay mechanism for BPi-R64
Daniel Golle [Sun, 4 Jun 2023 18:55:11 +0000 (19:55 +0100)]
mediatek: use updated device tree overlay mechanism for BPi-R64

Use new device tree overlay mechanism for the BananaPi BPi-R64 board.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agouboot-mediatek: adapt BPi-R3 and BPi-R64 to new device tree overlay
Daniel Golle [Sun, 4 Jun 2023 17:55:17 +0000 (18:55 +0100)]
uboot-mediatek: adapt BPi-R3 and BPi-R64 to new device tree overlay

Update bootloader environment for BPi-R3 and BPi-R64 to adapt to new
device tree overlay mechanism now that support for multiple device
tree overlays has been added.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agogeneric: use only first element in bootconf for uImage.FIT
Daniel Golle [Sun, 4 Jun 2023 17:21:29 +0000 (18:21 +0100)]
generic: use only first element in bootconf for uImage.FIT

Now that it is possible to load several device tree overlays by
appending their config names to bootconf the uImage.FIT partition
parser need to discard everything after the first '#' character in
bootconf when looking up the config node to be used.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agoimage: improve uImage.FIT device tree overlay support
Daniel Golle [Sun, 4 Jun 2023 14:57:25 +0000 (15:57 +0100)]
image: improve uImage.FIT device tree overlay support

Instead of generating full config nodes incl. kernel, generate minimal
config nodes for device tree overlays to be applied to the main config.
In this way, multiple device tree overlays can be applied more easily.
While at it change filenames to upstream style, ie. use dtso and dtbo
suffix for device tree overlays.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agomediatek: convert mt7986a-zyxel-ex5601-t0-stock.dts to UNIX
Daniel Golle [Sun, 4 Jun 2023 15:05:29 +0000 (16:05 +0100)]
mediatek: convert mt7986a-zyxel-ex5601-t0-stock.dts to UNIX

The device tree file was in DOS format (CR-LF). Convert it to UNIX style.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agoRevert "ipq807x: add initial support for prpl Foundation Haze board"
Petr Štetiar [Mon, 5 Jun 2023 09:45:30 +0000 (11:45 +0200)]
Revert "ipq807x: add initial support for prpl Foundation Haze board"

This reverts commit 48603a271e6ff9e5cd851e873429893115e00c94 as this
was commited by accident, its still work in progress.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
18 months agoRevert "ipq-wifi: add board files for prpl Foundation Haze board"
Petr Štetiar [Mon, 5 Jun 2023 09:45:27 +0000 (11:45 +0200)]
Revert "ipq-wifi: add board files for prpl Foundation Haze board"

This reverts commit 6845c53ec3bb25dbbb0e8bbcf435fc380502fc56.  as this
was commited by accident, its still work in progress.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
18 months agoRevert "WIP: ipq-wifi: use my fork temporarily until upstreamed"
Petr Štetiar [Mon, 5 Jun 2023 09:45:24 +0000 (11:45 +0200)]
Revert "WIP: ipq-wifi: use my fork temporarily until upstreamed"

This reverts commit 1bad93c42669061b0248ca5cff1d83e399a2ef1a as this was
commited by accident, its still work in progress.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
18 months agoRevert "ath11k-firmware: update to WLAN.HK.2.9.0.1-01713-QCAHKSWPL_SILICONZ-1"
Robert Marko [Mon, 5 Jun 2023 08:52:55 +0000 (10:52 +0200)]
Revert "ath11k-firmware: update to WLAN.HK.2.9.0.1-01713-QCAHKSWPL_SILICONZ-1"

This reverts commit 5d2de0055504727503a050731c3ca8c75b51f185.

I received multiple reports that in various configurations this FW version
is not stable and crashes, so lets revert to 01385 revision which works.

Fixes #12815
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [fixes tag]
18 months agoramips: fix lzma-loader for ASIARF boards
Daniel Danzberger [Fri, 2 Jun 2023 17:36:28 +0000 (19:36 +0200)]
ramips: fix lzma-loader for ASIARF boards

This fixes a well known "LZMA ERROR 1" error, reported previously on
numerous of similar devices.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
18 months agosdk: Expose CCACHE_DIR option
Jeffery To [Mon, 5 Jun 2023 04:57:51 +0000 (12:57 +0800)]
sdk: Expose CCACHE_DIR option

As the CCACHE option is already exposed, it would be helpful to also
make the ccache directory easily customizable.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
18 months agotools/coreutils: rename list of installed programs
Michael Pratt [Tue, 30 May 2023 09:22:54 +0000 (05:22 -0400)]
tools/coreutils: rename list of installed programs

Rename the list of programs installed by coreutils
to PKG_PROGRAMS, which will create a stampfile for each
through a new feature in host-build.mk.

Also, cleanup a bit to save lines
regarding the usage of this list.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
18 months agotools/findutils: define list of installed programs
Michael Pratt [Tue, 30 May 2023 09:43:00 +0000 (05:43 -0400)]
tools/findutils: define list of installed programs

Define the variable PKG_PROGRAMS for the list
of programs installed by findutils,
which will create a stampfile for each
through a new feature in host-build.mk.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
18 months agohost-build: add support for a stampfile per installed binary
Michael Pratt [Tue, 30 May 2023 11:20:19 +0000 (07:20 -0400)]
host-build: add support for a stampfile per installed binary

Some individual build items install a group of programs
instead of a program matching the name of the build item.

Add support for installing stampfiles for each of the
programs installed by that build item,
which will allow more control and awareness
of what is installed by the rest of the build system,
if, for example, prereq symlink checks are looking
for the same program which is built already.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
18 months agoprereq-build: replace relative symlinks only if broken
Michael Pratt [Mon, 29 May 2023 09:38:33 +0000 (05:38 -0400)]
prereq-build: replace relative symlinks only if broken

Some programs installed to staging_dir/host/bin
also install some symlinks to itself
for an alternative name.

Some of those new symlinks are overwriting
symlinks that were installed by prereq stage.

If prereq stage were to somehow be run again,
it should not be overwriting symlinks
that point to programs that are already built.

To filter that out, catch all symlinks
after first catching all symlinks
that have an absolute target
after all other cases in the case statement,
make sure it is not broken, and if so exit successfully.

Suggested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
18 months agoprereq-build: do not replace binaries with symlinks
Michael Pratt [Sat, 27 May 2023 21:11:47 +0000 (17:11 -0400)]
prereq-build: do not replace binaries with symlinks

Some programs, like bash and patch, are checked by prereq stage
and have a symlink installed, but then is later built from source.

Now that the prereq-build checks are not successful
just by finding the file alone, it is possible for
a new symlink to overwrite the installed binary.

If a normal file is found in staging_dir/host/bin,
let the check look for the associated stampfile, and if found,
skip creation of a symlink and exit successfully.

Suggested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
18 months agoRevert "prereq: SetupHostCommand: fix wrong check result"
Michael Pratt [Thu, 25 May 2023 07:00:57 +0000 (03:00 -0400)]
Revert "prereq: SetupHostCommand: fix wrong check result"

This reverts commit 7855378fcd7ed7cb0a223238a99bac0b8e46c380.

The return "exit 1" was intentional and actually just
makes the symlink checks much more strict.

This new level of strictness added to the checks revealed
what was a confusing regression with prereq stage that
already existed but was not presenting itself
because of the simple way that checks used to be done before.

Either way, reverting to "exit 0" was a nice workaround
until the true root cause was discovered, so as to not interfere
with others' pull requests and builds in the meantime.

It turns out that this problem was the inconsistent value of $PATH
between different commands within the SetupHostCommand recipe,
now fixed in the parent commit, using the variable created
in the parent of the parent commit.

Ref: f75204036c ("prereq-build: allow host command symlinks to update")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
18 months agoprereq-build: fix inconsistent value of $PATH
Michael Pratt [Thu, 25 May 2023 06:31:52 +0000 (02:31 -0400)]
prereq-build: fix inconsistent value of $PATH

In the recipe SetupHostCommand for checking
and creating symlinks, $PATH was only overridden
for one of several commands.

This causes the symlinks to be included
in the paths to pick a program from
when the check was repeated, because
staging_dir/host/bin was included in $PATH,
but only *sometimes*.

When the check ran again, the command succeded
with a $PATH including the symlink,
(eval "$$$$$$$$cmd")
while the path to the program was evaluated
with a $PATH NOT including the symlink,
(bin=...)
causing the symlink to be relinked incorrectly,
instead of passing as exactly the same.

Coincidentally, this was only a problem
if the symlink targeted the alternative
program with a different name.

By overriding the value of $PATH at the invocation of Make,
it will apply to the entire environment of the checks.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
18 months agotreewide: add ORIG_PATH variable
Michael Pratt [Thu, 25 May 2023 06:31:17 +0000 (02:31 -0400)]
treewide: add ORIG_PATH variable

Add a variable that stores the original value of $PATH
in the host system's shell, before Make alters it.

This can be useful for when it is necessary
to ignore symlinks and programs made by the build system.

Define this new variable before all instances of
'export PATH:=' or similar.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
18 months agoWIP: ipq-wifi: use my fork temporarily until upstreamed
Petr Štetiar [Tue, 30 May 2023 13:36:00 +0000 (15:36 +0200)]
WIP: ipq-wifi: use my fork temporarily until upstreamed

Signed-off-by: Petr Štetiar <ynezz@true.cz>
18 months agoipq-wifi: add board files for prpl Foundation Haze board
Petr Štetiar [Tue, 30 May 2023 09:07:29 +0000 (11:07 +0200)]
ipq-wifi: add board files for prpl Foundation Haze board

QSDK based factory firmware was setting following board_ids in DTS:

 ath11k_pci 0001:01:00.0: chip_id 0x0 chip_family 0x0 board_id 0xa4 soc_id 0xffffffff
 ath11k c000000.wifi1: chip_id 0x0 chip_family 0x0 board_id 0x294 soc_id 0xffffffff

Thus board-prpl_haze.qcn9074` was extracted from `bus=...qmi-board-id=164.bin`
file and `board-prpl_haze.ipq8074` from `bus=...qmi-board-id=660.bin` file.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
18 months agoipq807x: add initial support for prpl Foundation Haze board
Petr Štetiar [Mon, 29 May 2023 20:11:45 +0000 (22:11 +0200)]
ipq807x: add initial support for prpl Foundation Haze board

Haze is prpl Foundation's reference board (WNC LVRP).

Board info:

 - IPQ8072A SoC
 - 2 GiB RAM
 - 4 GiB eMMC
 - 8MiB SPI NOR (MX25U6435F)

 - 3x 1GigE ports (QCA8075)
 - 1x 10GigE port (AQR113C)
 - 1x SFP cage

 - WiFi 6GHz 160MHz (QCN9074)
 - WiFi 5GHz 80+80MHz (QCN5054)
 - WiFi 2.4G (QCN5024)

 - ARM Standard 20-pin 2.54mm/0.1" JTAG (1V8 !!!)
 - Bluetooth v5.0 + EDR with integrated Class 1 PA (CYW20704)
 - 1x M.2 B-key socket with PCIe 3.0
 - 1x USB 3.0 port
 - UART 4-pin 3V3(arrow),RX,TX,GND (115200 8N1)
 - Reset and WPS buttons

Flashing instructions:

 1. From U-Boot boot OpenWrt using initramfs image:

    IPQ807x# tftpboot openwrt-ipq807x-generic-prpl_haze-initramfs-uImage.itb && bootm

 2. In OpenWrt running from initramfs execute sysupgrade:

    root@OpenWrt:/# sysupgrade -n /tmp/openwrt-ipq807x-generic-prpl_haze-squashfs-sysupgrade.bin

Work in progress/known issues:

 * SFP feature not implemented/tested
 * M.2 feature not implemented/tested
 * Bluetooth feature not implemented/tested
 * 6GHz wireless should be working, but not tested
 * MAC address assigments for LAN interfaces

Signed-off-by: Petr Štetiar <ynezz@true.cz>
18 months agoipq807x: image: factor out common eMMC bits
Petr Štetiar [Tue, 30 May 2023 14:36:05 +0000 (16:36 +0200)]
ipq807x: image: factor out common eMMC bits

For better maintainability and reusability.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
18 months agoipq807x: image: cleanup unused variables
Petr Štetiar [Tue, 30 May 2023 14:31:39 +0000 (16:31 +0200)]
ipq807x: image: cleanup unused variables

BLOCKSIZE and PAGESIZE seems to be unused on qnap_301w and zyxel_nbg7815
device which use eMMC storage.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
18 months agoqca-nss-dp: fix oops in nss_dp_probe
Petr Štetiar [Mon, 29 May 2023 17:27:15 +0000 (19:27 +0200)]
qca-nss-dp: fix oops in nss_dp_probe

Currently kernel crashes when of_phy_connect has issues:

 Unable to handle kernel access to user memory outside uaccess routines at virtual address 0000000000000308
 ...
 pc : phy_attached_print+0x28/0x1b0
 lr : phy_attached_info+0x14/0x20
 ...
 Call trace:
  phy_attached_print+0x28/0x1b0
  phy_attached_info+0x14/0x20
  nss_dp_adjust_link+0x544/0x6c4 [qca_nss_dp]

of_phy_connect returns either pointer or NULL, so can't be checked with
IS_ERR macro.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
18 months agolibubox: update to the latest version
Felix Fietkau [Wed, 24 May 2023 08:21:23 +0000 (10:21 +0200)]
libubox: update to the latest version

b09b316aeaf6 blobmsg: add blobmsg_parse_attr function
eac92a4d5d82 blobmsg: add blobmsg_parse_array_attr
ef5e8e38bd38 usock: fix poll return code check
6fc29d1c4292 jshn.sh: Add pretty-printing to json_dump
5893cf78da40 blobmsg: Don't do at run-time what can be done at compile-time
362951a2d96e uloop: fix uloop_run_timeout
75a3b870cace uloop: add support for integrating with a different event loop

Signed-off-by: Felix Fietkau <nbd@nbd.name>
18 months agonetifd: update to the latest version
Felix Fietkau [Sun, 4 Jun 2023 16:37:21 +0000 (18:37 +0200)]
netifd: update to the latest version

ec9dba721245 system-linux: fix memory leak in system_bridge_vlan_check

Signed-off-by: Felix Fietkau <nbd@nbd.name>
18 months agounetd: update to the latest version
Felix Fietkau [Sun, 4 Jun 2023 14:54:19 +0000 (16:54 +0200)]
unetd: update to the latest version

412d03012f13 network: prevent adding endpoint routes for addresses on the network
faaf9cee6ef4 utils: fix ipv4 checksum issue
0e1c2fad3540 pex-msg: fix memory leak on fread fail in pex_msg_update_request_init
51be0ed659d0 host: fix crash parsing gateway when no endpoint is specified
ca17601dc24e wg-linux: add support for splitting netlink messages for allowed ips
7d3986b7a5a2 wg-linux: increase default messages size

Signed-off-by: Felix Fietkau <nbd@nbd.name>
18 months agomac80211: ath11k: sync with ath-next
Robert Marko [Fri, 2 Jun 2023 12:12:01 +0000 (14:12 +0200)]
mac80211: ath11k: sync with ath-next

Synchronize the ath11k backports with the current ath-next tree.

This introduces support for MBSSID and EMA, adds factory test mode and
some new HTT stats.

Tested-by: Francisco G Luna <frangonlun@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agomac80211: backport EMA beacon support
Robert Marko [Fri, 2 Jun 2023 12:08:31 +0000 (14:08 +0200)]
mac80211: backport EMA beacon support

Backport EMA beacon support from kernel 6.4.
It is required for MBSSID/EMA suport in ath11k that will follow.

Tested-by: Francisco G Luna <frangonlun@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agoath11k-firmware: update to WLAN.HK.2.9.0.1-01713-QCAHKSWPL_SILICONZ-1
Robert Marko [Fri, 2 Jun 2023 09:30:11 +0000 (11:30 +0200)]
ath11k-firmware: update to WLAN.HK.2.9.0.1-01713-QCAHKSWPL_SILICONZ-1

QCA released a point update for the 2.9.0.1 firmware, so lets update to it.

Runtime tested on Dynalink DL-WRX36.

Tested-by: Francisco G Luna <frangonlun@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agoipq807x: remove 5.15 support
Robert Marko [Sat, 3 Jun 2023 16:10:03 +0000 (18:10 +0200)]
ipq807x: remove 5.15 support

Now that 6.1 is the default kernel, there is no reason to keep 5.15 around
as I dont plan to maintain it anymore so lets remove it.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agoipq807x: switch to kernel 6.1
Robert Marko [Sat, 3 Jun 2023 16:08:03 +0000 (18:08 +0200)]
ipq807x: switch to kernel 6.1

Now that 6.1 kernel is working fine on ipq807x , lets switch to 6.1 as the
default kernel as its increasingly hard to keep backporting upstreamed
changes to 5.15.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agoopenssl: fix uci config for built-in engines
Tianling Shen [Thu, 1 Jun 2023 07:22:26 +0000 (15:22 +0800)]
openssl: fix uci config for built-in engines

Built-in engine configs are added in libopenssl-conf/install stage
already, postinst/add_engine_config is just duplicating them, and
due to the lack of `config` header it results a broken uci config:

> uci: Parse error (invalid command) at line 3, byte 0

```
config engine 'devcrypto'
        option enabled '1'
engine 'devcrypto'
        option enabled '1'
        option builtin '1'
```

Add `builtin` option in libopenssl-conf/install stage and remove
duplicate engine configuration in postinst/add_engine_config to
fix this issue.

Fixes: 0b70d55a64c39d ("openssl: make UCI config aware of built-in engines")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
18 months agox86/64: Enable IOMMU_V2 support for later CPUs
Philip Prindeville [Wed, 17 May 2023 23:12:18 +0000 (17:12 -0600)]
x86/64: Enable IOMMU_V2 support for later CPUs

Support newer IOMMU_V2 on AMD platforms, useful for DPDK and KVM.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
18 months agokernel: Backport mvneta crash fix to 5.15
Marek Behún [Wed, 12 Apr 2023 11:01:25 +0000 (13:01 +0200)]
kernel: Backport mvneta crash fix to 5.15

Backport Russell King's series [1]
  net: mvneta: reduce size of TSO header allocation
to pending-5.15 to fix random crashes on Turris Omnia.

This also backports two patches that are dependencies to this series:
  net: mvneta: Delete unused variable
  net: mvneta: fix potential double-frees in mvneta_txq_sw_deinit()

[1] https://lore.kernel.org/netdev/ZCsbJ4nG+So%2Fn9qY@shell.armlinux.org.uk/

Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (squashed)
18 months agorealtek: eth: Do not write directly to dev->addr
Olliver Schinagl [Wed, 24 May 2023 10:58:37 +0000 (12:58 +0200)]
realtek: eth: Do not write directly to dev->addr

One is never to write to dev->addr directly. In 6.1 it will be a const and
with the newly enabled WERROR, we get a failing grade.

Lets fix this ahead of time.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
18 months agorealtek: Add missing headers
Olliver Schinagl [Thu, 25 May 2023 11:38:47 +0000 (13:38 +0200)]
realtek: Add missing headers

We are missing a bunch of headers, which trigger errors on 6.1, probably
due to changed header-in-header dependencies. Best add them now.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
18 months agoramips: tplink,mr600v2: fix image generation for sysupgrade image
Andreas Böhler [Sun, 2 Apr 2023 08:40:47 +0000 (10:40 +0200)]
ramips: tplink,mr600v2: fix image generation for sysupgrade image

The MR600v2 does not find its rootfs if it is neither directly after the
kernel or aligned to an erase block boundary (64k).

This aligns the rootfs to 0x10000 allowing the device to boot again. Based
on investigation by forum user relghuar.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
18 months agonetifd: Fix PKG_MIRROR_HASH
Hauke Mehrtens [Sat, 3 Jun 2023 12:37:37 +0000 (14:37 +0200)]
netifd: Fix PKG_MIRROR_HASH

Fix the PKG_MIRROR_HASH value for netifd.

Fixes: d2ecaaca3404 ("netifd: update to version 2023-05-31")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
18 months agonetfilter: fix typo in kmod-nft-dup-inet
Kevin Darbyshire-Bryant [Mon, 29 May 2023 17:17:38 +0000 (18:17 +0100)]
netfilter: fix typo in kmod-nft-dup-inet

Fix typo of 'family' in a7e9445975

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
18 months agovalgrind: update to 3.21.0
Hauke Mehrtens [Wed, 31 May 2023 20:51:12 +0000 (22:51 +0200)]
valgrind: update to 3.21.0

Release Notes:
https://valgrind.org/docs/manual/dist.news.html

This improves support for the memory allocator used in musl libc 1.2.2
and later which is currently used by OpenWrt.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
18 months agokernel: bump 6.1 to 6.1.31
Robert Marko [Wed, 31 May 2023 19:02:52 +0000 (21:02 +0200)]
kernel: bump 6.1 to 6.1.31

All patches automatically rebased.

Build system: x86_64/Fedora 38
Build-tested: ipq807x/Qnap 301W, ipq807x/Dynalink DL-WRX36
Run-tested: ipq807x/Qnap 301W, ipq807x/Dynalink DL-WRX36

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agogeneric: b53: rename exported symbols to avoid upstream conflict
Robert Marko [Fri, 2 Jun 2023 10:27:19 +0000 (12:27 +0200)]
generic: b53: rename exported symbols to avoid upstream conflict

Upstream DSA driver is exporting symbols with the same name as our
downstream swconfig driver, so lets rename the downstream symbols to make
them unique and avoid the conflict on 6.1 kernel.

Without this change, building 6.1 with kmod-switch-bcm53xx would conflict
with the B53 DSA driver and CI would fail.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agokselftests-bpf: add kernel BPF tests
Tony Ambardar [Mon, 17 May 2021 18:57:40 +0000 (11:57 -0700)]
kselftests-bpf: add kernel BPF tests

Build and package kernel self-tests used for BPF testing, program and JIT
development. This package, together with the existing 'kmod-bpf-test', was
extensively used for past upstream Linux JIT submissions [1].

Currently this includes only 'test_verifier'; building 'test_progs' will
fail due to known endian limitations with bpftool skeletons.

[1]:https://lore.kernel.org/bpf/cover.1633392335.git.Tony.Ambardar@gmail.com

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
18 months agokernel: backport libcap workaround for BPF selftests
Tony Ambardar [Tue, 29 Nov 2022 04:43:19 +0000 (20:43 -0800)]
kernel: backport libcap workaround for BPF selftests

Recent libcap versions (>= 2.60) cause problems with BPF kselftests, so
backport an upstream patch that replaces libcap and drops the dependency.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
18 months agobase-files: enable BPF JIT kallsyms by default
Tony Ambardar [Fri, 26 May 2023 08:41:18 +0000 (01:41 -0700)]
base-files: enable BPF JIT kallsyms by default

Set net.core.bpf_jit_kallsyms=1 in /etc/sysctl.d/10-default.conf.

For privileged users, this exports addresses of JIT-compiled programs to
appear in /proc/kallsyms when present, allowing their use for debugging
and in traces.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
18 months agomediatek: use existing I2C clock names
Daniel Golle [Thu, 1 Jun 2023 09:32:19 +0000 (10:32 +0100)]
mediatek: use existing I2C clock names

PCK and MCK should really be P=PMIC and M=MEM, which means that they
should effectively be CLK_PMIC and CLK_ARB.

Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agomediatek: use cpufreq fix suggested by MediaTek
Daniel Golle [Fri, 26 May 2023 12:31:26 +0000 (13:31 +0100)]
mediatek: use cpufreq fix suggested by MediaTek

Use suggested fix for mediatek-cpufreq, patch will also be sent
upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agoarmvirt: switch to kernel 6.1
Mathew McBride [Thu, 1 Jun 2023 05:55:22 +0000 (05:55 +0000)]
armvirt: switch to kernel 6.1

The EFI implementation changes have only been applied
to 6.1, so switch armvirt over to it.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agokernel: kmod-amazon-ena: move to top level netdevices
Mathew McBride [Wed, 5 Oct 2022 01:40:22 +0000 (12:40 +1100)]
kernel: kmod-amazon-ena: move to top level netdevices

The Amazon ENA network devices are also used on the
AWS Arm (Graviton) instance types, so move it from
the x86-only module file to the top level netdevices.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoarmvirt: 64: disable CONFIG_SMC91X
Mathew McBride [Mon, 13 Feb 2023 06:51:26 +0000 (06:51 +0000)]
armvirt: 64: disable CONFIG_SMC91X

The SMC91X family is a ISA-age Ethernet controller.
I'm not particularly sure what it's doing in armvirt/64,
as it's unlikely there is a QEMU or real hardware configuration
that exists with it.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoarmvirt: base-files: add tty0 to inittab
Mathew McBride [Mon, 5 Sep 2022 06:56:49 +0000 (16:56 +1000)]
armvirt: base-files: add tty0 to inittab

tty0 is the default console for devices with screens/framebuffers.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoarmvirt: config changes required for framebuffer console
Mathew McBride [Mon, 5 Sep 2022 06:55:02 +0000 (16:55 +1000)]
armvirt: config changes required for framebuffer console

These Kconfig options are required to get a screen console
working with the VMware Fusion ARM (Apple Silicon) preview.
They are likely to be the same for other Arm standard
"desktop" hardware that may emerge.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoarmvirt: package and select Rockchip DWMAC Ethernet driver
Mathew McBride [Tue, 18 Apr 2023 03:34:23 +0000 (03:34 +0000)]
armvirt: package and select Rockchip DWMAC Ethernet driver

For devices that implement the "rockchip,*-gmac" compatible controller,
including:
- RK3328
- RK3399
- RK3568
- RK3588
- PX30

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoarmvirt: 64: add Allwinner A3/A83T/A64 (sun8i family) Ethernet
Mathew McBride [Mon, 20 Mar 2023 02:53:31 +0000 (02:53 +0000)]
armvirt: 64: add Allwinner A3/A83T/A64 (sun8i family) Ethernet

Add support for the dwmac (stmmac) variant used by Allwinner
Arm64 boards.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agokernel: add mdio-bus-mux support
Mathew McBride [Mon, 20 Mar 2023 04:16:04 +0000 (04:16 +0000)]
kernel: add mdio-bus-mux support

The MDIO bus multiplexing framework is used by some drivers
such as dwmac-sun8i.

As this is a per-driver requirement, set it to be hidden in the menu.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoarmvirt: 64: add Marvell (formerly Cavium) ThunderX series network driver
Mathew McBride [Sat, 11 Feb 2023 03:58:09 +0000 (03:58 +0000)]
armvirt: 64: add Marvell (formerly Cavium) ThunderX series network driver

Based on working configuration supplied by Anton Antonov.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoarmvirt: 64: Add storage support for qemu-sbsa platform
Anton Antonov [Thu, 22 Dec 2022 12:01:59 +0000 (12:01 +0000)]
armvirt: 64: Add storage support for qemu-sbsa platform

Enable SATA support, which is used by the Server Base
System Architecture reference board[1].

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Mathew McBride <matt@traverse.com.au>
[1] - https://qemu.readthedocs.io/en/latest/system/arm/sbsa.html

18 months agoarmvirt: 64: Add NXP i.MX 8M Mini/Nano/Quad/Plus EVK support
Anton Antonov [Tue, 30 May 2023 02:55:16 +0000 (02:55 +0000)]
armvirt: 64: Add NXP i.MX 8M Mini/Nano/Quad/Plus EVK support

Also includes Advantech RSB-3720 (iMX8 Plus) support.

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Mathew McBride <matt@traverse.com.au>
[Re-sort into kernel config, move network into modules]

18 months agoarmvirt: 64: add support for other SystemReady-compatible vendors
Mathew McBride [Fri, 15 Jul 2022 02:38:02 +0000 (02:38 +0000)]
armvirt: 64: add support for other SystemReady-compatible vendors

These changes are to support other vendors that have SystemReady/EFI
support, including:
* Marvell Armada
** (This is speculative as I don't have a machine of my own to test)
* Amazon Graviton (tested bare-metal and virtualized instances)
* VMware (Fusion for ARM Mac preview)
* NXP/Freescale (Layerscape series not already selected)
* HiSilicon
* Allwinner/sunxi
* Rockchip (untested, options taken from arm64 defconfig)

To give an idea of the hardware certified for SystemReady,
see
https://www.arm.com/architecture/system-architectures/systemready-certification-program/ir
and
https://www.arm.com/architecture/system-architectures/systemready-certification-program/es

Other vendors that _should_ work include Marvell Octeon 10
and Ampere. I understand these systems should work
"out of the box" in ACPI mode but may require other drivers
(e.g PCIe NICs and storage controllers).

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoarmvirt: add SFP support patches for NXP Layerscape DPAA2 platforms
Mathew McBride [Fri, 2 Jun 2023 04:14:14 +0000 (04:14 +0000)]
armvirt: add SFP support patches for NXP Layerscape DPAA2 platforms

This series resolves a long term issue with Phylink and SFPs on
DPAA2 hardware (LS1088,LS2088,LX2160) where a locking problem
prevented the system from rebooting. Patches solving this
issue existed prior to 6.2 but were not accepted upstream.

See the original series on patchwork:
https://patchwork.kernel.org/project/netdevbpf/cover/20221129141221.872653-1-vladimir.oltean@nxp.com/

And this thread on the Traverse forum:
https://forum.traverse.com.au/t/reboot-command-regression-from-5-10-to-5-15-kernel/133/12

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoarmvirt: add options and driver modules for NXP Layerscape DPAA2 platform
Mathew McBride [Wed, 31 May 2023 05:47:41 +0000 (05:47 +0000)]
armvirt: add options and driver modules for NXP Layerscape DPAA2 platform

Tested with a Traverse Technologies Ten64 (LS1088A) board.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoarmvirt: add ACPI support
Mathew McBride [Thu, 9 Jun 2022 04:51:59 +0000 (04:51 +0000)]
armvirt: add ACPI support

ACPI support is required for Arm 'SystemReady' server and workstation
systems (and as an option on embedded platforms).

These config changes allow OpenWrt to boot in a QEMU virtual machine
with a UEFI/EDKII 'BIOS', but with no other hardware enabled yet.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agobuild: enable vmdk/vmware images for arm64 target
Mathew McBride [Wed, 12 Jan 2022 05:53:55 +0000 (05:53 +0000)]
build: enable vmdk/vmware images for arm64 target

This is useful for VMware's ARM64 products, e.g Fusion for M1/ARM Macs.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agobuild: use 128MiB as the boot/kernel partition size on armvirt target
Mathew McBride [Tue, 1 Jun 2021 01:48:25 +0000 (01:48 +0000)]
build: use 128MiB as the boot/kernel partition size on armvirt target

The nominal partition type for EFI boot partitions is FAT32,
which has a minimum size of 32MiB on a 512-byte-sector block device.

To ensure that the boot partition is created as FAT32 set a size
well above this minimum.

A useful discussion about EFI partition sizes can be found here:
https://superuser.com/questions/1310927/what-is-the-absolute-minimum-size-a-uefi-system-partition-can-be

I have found 128MiB works pretty consistently across both
tools (mkfs.fat) and firmwares (EDKII)

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoarmvirt: remove model name override
Mathew McBride [Mon, 24 Jan 2022 23:16:56 +0000 (23:16 +0000)]
armvirt: remove model name override

Now that armvirt has been expanded to boot on more generic
ARM machines, remove the board and model name override.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoarmvirt: set kernel partition as the EFI system partition
Mathew McBride [Thu, 20 Apr 2023 06:38:22 +0000 (06:38 +0000)]
armvirt: set kernel partition as the EFI system partition

U-Boot with EFI boot manager functionality will store
EFI boot order data on the ESP in the ubootefi.var file.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoscripts: gen_image_generic: allow the partition types to be set
Mathew McBride [Thu, 20 Apr 2023 06:36:50 +0000 (06:36 +0000)]
scripts: gen_image_generic: allow the partition types to be set

The use case for this is to set the kernel partition as the
EFI system partition. Versions of U-Boot with the
EFI boot manager (eficonfig and efidebug commands) will
store their boot order data on the ESP.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agogrub2: enable EFI for armvirt
Mathew McBride [Wed, 24 Feb 2021 04:53:40 +0000 (04:53 +0000)]
grub2: enable EFI for armvirt

This adds a separate package for EFI on Arm SystemReady
compatible machines. 32-bit Arm UEFI is supported as well.

It is very similar to x86-64 EFI setup, without the
need for BIOS backward compatibility and slightly
different default modules.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoarmvirt: update README with new image names
Mathew McBride [Wed, 19 Jan 2022 03:24:45 +0000 (03:24 +0000)]
armvirt: update README with new image names

The introduction of EFI support has changed how armvirt
images are generated. The kernel and filesystem binaries
can still be used as before with QEMU directly.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoarmvirt: disable LD dead code elimination on ARM32
Mathew McBride [Wed, 28 Sep 2022 05:47:30 +0000 (15:47 +1000)]
armvirt: disable LD dead code elimination on ARM32

This interferes with the generation of the EFI stub section for
ARM32. As this target is not size constrained, disable the dead code
data elimination hack.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agoarmvirt: add EFI support
Mathew McBride [Wed, 19 Jan 2022 02:25:23 +0000 (02:25 +0000)]
armvirt: add EFI support

EFI booting is used on newer machines compatible with the
Arm SystemReady specifications.

This commit restructures armvirt into a more 'generic'
target similar to x86.

See https://github.com/openwrt/openwrt/pull/4956
for a history of this port.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
18 months agokernel: Set CONFIG_FRAME_WARN depending on target
Hauke Mehrtens [Tue, 30 May 2023 18:21:43 +0000 (20:21 +0200)]
kernel: Set CONFIG_FRAME_WARN depending on target

This set the CONFIG_FRAME_WARN option depending on some target settings.
It will use the default from the upstream kernel and not the hard coded
value of 1024 now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
18 months agoipq40xx: convert Buffalo WTR-M2133HP to DSA
Yanase Yuki [Wed, 31 May 2023 07:41:59 +0000 (16:41 +0900)]
ipq40xx: convert Buffalo WTR-M2133HP to DSA

This commit convert WTR-M2133HP to DSA setup.

Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp>
18 months agofirmware-utils: add missing build dependencies
Tianling Shen [Thu, 1 Jun 2023 09:35:16 +0000 (17:35 +0800)]
firmware-utils: add missing build dependencies

Fixes the following build error:

```
CMake Error at CMakeLists.txt:9 (MESSAGE):
  Unable to find zlib library.
CMake Error at CMakeLists.txt:13 (MESSAGE):
  Unable to find OpenSSL librry.
```

Fixes: 24d6abe2d7cd8b ("firmware-utils: new package replacing otrx")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
18 months agomvebu: remove hack for Turris Omnia legacy U-Boot
Klaus Kudielka [Sun, 14 Aug 2022 12:17:19 +0000 (14:17 +0200)]
mvebu: remove hack for Turris Omnia legacy U-Boot

The omnia-medkit (only useful for installation with U-Boot
2015.10-rc2) is not being built anymore.

Now we can be reasonably sure, that there won't be first-time OpenWrt
boots with that U-Boot version, and can get rid of a rather ugly hack.

Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
18 months agomvebu: stop building omnia-medkit
Klaus Kudielka [Sat, 26 Feb 2022 08:37:26 +0000 (09:37 +0100)]
mvebu: stop building omnia-medkit

Since August 2022, users of very old Turris Omnias have been
encouraged to update U-Boot before OpenWrt installation [1].
The omnia-medkit (only useful for installation with
U-Boot 2015.10-rc2) is not needed anymore.

[1] https://openwrt.org/toh/turris/turris_omnia#installation

Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
18 months agogemini: Bump to kernel v6.1
Linus Walleij [Wed, 31 May 2023 21:21:08 +0000 (23:21 +0200)]
gemini: Bump to kernel v6.1

This bumps the Gemini kernel to use v6.1. While there is no
reason to stay with v5.15, I personally use newer upstream
kernels constantly and they are tested and work well. OpenWrt's
6.1 needs more time until it can be switched.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
18 months agogemini: Create a config for kernel v6.1
Linus Walleij [Wed, 31 May 2023 21:21:06 +0000 (23:21 +0200)]
gemini: Create a config for kernel v6.1

This creates a config for the v6.1 kernel for Gemini.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
18 months agogemini: Add kernel v6.1 patches
Linus Walleij [Wed, 31 May 2023 21:21:05 +0000 (23:21 +0200)]
gemini: Add kernel v6.1 patches

This adds a bunch of patches for the v6.1 Gemini kernel.

For v5.15 this was down to a single upstream patch, but for
kernel v6.2 I reworked the USB code for FOTG210, so instead of
carrying over the half-baked and incomplete patch from v5.15
I just backported all the v6.2 patches, 31 in total, as it
creates full device USB mode for e.g. D-Link DNS-313.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
18 months agokernel: Package the new FOTG210 module properly
Linus Walleij [Wed, 31 May 2023 21:21:07 +0000 (23:21 +0200)]
kernel: Package the new FOTG210 module properly

When using the Gemini, we apply patches that create a single
module that support both host and device mode these days.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(move module to gemini target, keep both 6.1+2-ish + 5.15 module
CONFIG and files around until 5.15 is dropped)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
18 months agoapm821xx: put crypto4xx into crypto subsection
Christian Lamparter [Wed, 31 May 2023 12:15:56 +0000 (14:15 +0200)]
apm821xx: put crypto4xx into crypto subsection

module is only useful for apm821xx targets, so
limit visability to just this target.

Fixes: 55fbcad20a2d ("apm821xx: make crypto4xx as a standalone module")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
18 months agoipq806x: use new package name for NEC WG2600HP3
Yanase Yuki [Wed, 31 May 2023 07:28:31 +0000 (16:28 +0900)]
ipq806x: use new package name for NEC WG2600HP3

commit 0c45ad41e15e2255 changes ipq806x usb kmod name
from usb-phy-qcom-dwc3 to phy-qcom-ipq806x-usb, so
use new name.

Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp>
18 months agoCI: label-kernel: support compile testing kernel version and all target
Christian Marangi [Wed, 31 May 2023 15:40:11 +0000 (17:40 +0200)]
CI: label-kernel: support compile testing kernel version and all target

Add support to label-kernel for compiling testing kernel version and
check patches. To trigger this special build appent :testing to the
normal label.
Example:

- ci:kernel:ipq806x:generic:testing

Test will fail if the requested target doesn't have a defined kernel
testing version.

Also add support for testing all target and subtarget. To trigger this
some special pattern are added:
- ci:kernel:all:all
  Trigger test for all target and subtarget

- ci:kernel:all:first
  Trigger test for all target and the first subtarget in alphabetical
  order for the target.

With these special case :testing can also be used and every target and
subtarget that supports kernel testing version will be selected:
- ci:kernel:all:all:testing
  Trigger test for all target and subtarget that have a kernel testing
  version defined.

- ci:kernel:all:first:testing
  Trigger test for all target and the first subtarget in alphabetical
  order for the target that, if they have a kernel testing version
  defined.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoipq807x: 6.1: fix I/O WRITE_ZEROES errors on some eMMC devices
Robert Marko [Tue, 30 May 2023 21:38:56 +0000 (23:38 +0200)]
ipq807x: 6.1: fix I/O WRITE_ZEROES errors on some eMMC devices

Linux 5.19 added a feature where if there is TRIM support being advertised
on eMMC kernel will use TRIM to offload erasing to zero.

However, like always there are eMMC IC-s that advertise TRIM and kind of
work but trying to use TRIM for offloading will cause I/O errors like:
[   18.085950] I/O error, dev loop0, sector 596 op 0x9:(WRITE_ZEROES) flags 0x800 phys_seg 0 prio class 2

So, lets utilize the kernel MMC quirks DB to disable TRIM for eMMC models
that are known to cause this.

This will fix the WRITE_ZEROES error on:
Qnap 301W which uses Micron MTFC4GACAJCN-1M
Zyxel NBG7815 which uses Kingston EMMC04G-M627

Tested-By: Enrico Mioso <mrkiko.rs@gmail.com> # NBG7815
Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agoselinux-policy: update to 1.2.5
Linhui Liu [Sat, 27 May 2023 05:13:25 +0000 (13:13 +0800)]
selinux-policy: update to 1.2.5

30d503a uci jsonfilter: pipe and leak
e13cb64 rpcd leds
144781f jsonfilter, luci, ubus
1210762 rpcd and all agents get fd's leaked
ab9227c rpcd
2f99e0e luci rpcd
b43aaf3 rpcd (enable/disable services) luci peeraddr
f20f03e rpcd
7bc74f6 rpcd reads all subj state and luci-bwc leaks
9634b17 adds inotify perms to anon_inode
3d3c17c adds bare anon_inode (linux 5.15)
7104b20 dnsmasq and luci
0de2c66 luci,rpcd, ucode, wpad
14f5cf9 luci and ucode
e3ce84c rpcd, ucode and cgiio loose ends
96a2401 misc updates
9fe0490 initscript: remove redundant rules
71bd77e allow all init scripts to log to logd
f697331 sandbox: make ttydev handling more robust
a471877 simplify pty tty console access
f738984 sandbox: also remove TIOSCTI from all ttydevs

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>