openwrt/staging/linusw.git
7 months agoscripts/kernel_bump: Allow bumping sub-targets
Olliver Schinagl [Mon, 18 Mar 2024 12:40:50 +0000 (13:40 +0100)]
scripts/kernel_bump: Allow bumping sub-targets

Some targets may need to bump specific sub-targets only. So lets offer
this as an option.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
7 months agoscripts/kernel_bump: Use the git index to find the needed config files
Olliver Schinagl [Mon, 18 Mar 2024 12:28:11 +0000 (13:28 +0100)]
scripts/kernel_bump: Use the git index to find the needed config files

The current solution using `find` introduces a racecondition, where `find`
and `git mv` get in each others way. While this could be fixed with
more-utils sponge command (or even sort -u) to buffer the output of
find.

However, a much better approach, is to query the git index directly,
which will not change, and is far more accurate.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
7 months agoscripts/kernel_bump: Use git to obtain the list of files
Olliver Schinagl [Mon, 18 Mar 2024 12:24:12 +0000 (13:24 +0100)]
scripts/kernel_bump: Use git to obtain the list of files

Instead of looping of a directory to find directories related to kernel
changes, use the git index instead.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
7 months agoscripts/kernel_bump: Allow for migrating only configuration files
Olliver Schinagl [Mon, 18 Mar 2024 12:10:31 +0000 (13:10 +0100)]
scripts/kernel_bump: Allow for migrating only configuration files

In some cases, we want to only migrate configuration files, e.g. if the
kernel was bumped already. Lets add a flag for this case to offer
flexibility. By default we will migrate configuration flags as before.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
7 months agoscripts/kernel_bump: Run script relative to the script dir
Olliver Schinagl [Thu, 21 Mar 2024 09:27:44 +0000 (10:27 +0100)]
scripts/kernel_bump: Run script relative to the script dir

Determine the target directory based on the script location, which might
work better in some cases, but at least also allows the script to be ran
from with any location in the OpenWRT repository.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
7 months agoscripts/kernel_bump: Do no run on dirty repositories
Olliver Schinagl [Mon, 18 Mar 2024 12:09:23 +0000 (13:09 +0100)]
scripts/kernel_bump: Do no run on dirty repositories

We want to avoid starting a process when we know it will fail later.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
7 months agoscripts/kernel_bump: Improve omitted version error
Olliver Schinagl [Thu, 21 Mar 2024 08:41:54 +0000 (09:41 +0100)]
scripts/kernel_bump: Improve omitted version error

If a version string was not supplied, we currently print an empty
string. We can do better here. Also by popular demand, print the usage
information in case of error.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
7 months agoscripts/kernel_bump: Always drop v prefix
Olliver Schinagl [Fri, 22 Mar 2024 07:38:02 +0000 (08:38 +0100)]
scripts/kernel_bump: Always drop v prefix

Naivly and lazyly the leading v was only dropped from optarg, not from any
environment variable.

Lets do this properly and ensure a leading 'v' is always dropped.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
7 months agoscripts/kernel_bump: Drop unused function
Olliver Schinagl [Mon, 18 Mar 2024 12:08:44 +0000 (13:08 +0100)]
scripts/kernel_bump: Drop unused function

No need to keep unused empty functions. A left over from early development.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
7 months agoscripts/kernel_bump: Avoid potential copyright claim
Olliver Schinagl [Sun, 17 Mar 2024 07:46:08 +0000 (08:46 +0100)]
scripts/kernel_bump: Avoid potential copyright claim

Due to potential fears of copyright infringement noted by Elliott
Mitchell [0], rewrite our message to belong to OpenWRT.

Note, AI was used to aid in construction of this sentence.

[0]: https://lists.openwrt.org/pipermail/openwrt-devel/2024-March/042422.html

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
7 months agomediatek: mt7622: rtl8367c: source code spell fixes
Paul Donald [Wed, 3 Apr 2024 15:07:06 +0000 (17:07 +0200)]
mediatek: mt7622: rtl8367c: source code spell fixes

Improves indexing and searches

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
7 months agomediatek: mt7622: rtl8367c: source comment fixes
Paul Donald [Wed, 3 Apr 2024 16:04:40 +0000 (18:04 +0200)]
mediatek: mt7622: rtl8367c: source comment fixes

Fix also some Chinese -> UTF8 encoding problems

Improves indexing and searches

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
7 months agomediatek: mt7622: rtl8367c: source comment fixes
Paul Donald [Wed, 3 Apr 2024 15:55:15 +0000 (17:55 +0200)]
mediatek: mt7622: rtl8367c: source comment fixes

Fix also some Chinese GB18030 -> UTF-8 encoding problems

(translated the Chinese strings to English):
修改 -> modification
port8~port10的设置在另外一个register ->
 port8~port10 setup is done in a separate register

You are in the correct (UTF-8) encoding when you see:
 * $Date: 2017-03-08 15:13:58 +0800 (週三, 08 三月 2017) $
e.g. week 3, 08 third month, 2017
But not if you see:
 * $Date: 2017-03-08 15:13:58 +0800 (閫变笁, 08 涓夋湀 2017) $

rtl8367c/rtl8367c_asicdrv_lut.c should be read as UTF-8, despite having
some earlier Chinese text lost to GB18030 encoding.

Improves indexing and searches

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
7 months agomediatek: mt7622: rtl8367c: source comment fixes
Paul Donald [Wed, 3 Apr 2024 15:23:16 +0000 (17:23 +0200)]
mediatek: mt7622: rtl8367c: source comment fixes

Fix also some Chinese -> UTF8 encoding problems

Improves indexing and searches

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
7 months agomediatek: mt7622: rtl8367c: source comment fixes
Paul Donald [Wed, 3 Apr 2024 14:10:55 +0000 (16:10 +0200)]
mediatek: mt7622: rtl8367c: source comment fixes

Improves indexing and searches

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
7 months agolldpd: make management address advertisement controllable
Paul Donald [Tue, 2 Apr 2024 11:43:03 +0000 (13:43 +0200)]
lldpd: make management address advertisement controllable

Defaults to off.

Available from >= 0.7.15

These are sent in TLV

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
7 months agolldpd: make capabilities advertisement controllable
Paul Donald [Wed, 3 Apr 2024 12:06:29 +0000 (14:06 +0200)]
lldpd: make capabilities advertisement controllable

Defaults to off.

Only available from >= 1.0.15

These capabilities are sent in TLV.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
7 months agoqualcommax: enhance smp_affinity (log, uci, syntax)
Sean Khan [Tue, 9 Apr 2024 03:11:37 +0000 (23:11 -0400)]
qualcommax: enhance smp_affinity (log, uci, syntax)

1.) Changed logic of `set_affinity` to now use physical cores rather than
    knowing the bitmask. Rather than having to know a bitmask, users can
    provide a numerical instance of one or more CPU cores
    (numbered 0-63).

    This is done via function `cpus_to_bitmask`.

    Functions Added:

    a.) bitmask_to_cpus - Takes a bitmask of CPUs and returns a
         list of CPU numbers. (i.e. `bitmask_to_cpus "f"` -> 0,1,2,3)

    b.) cpus_to_bitmask - Takes a comma/space or range list of CPUs and returns
         a bitmask.

         Example:
         `cpus_to_bitmask "2,3"`     -> c
         `cpus_to_bitmask "0,1,2,3"` -> f
         `cpus_to_bitmask "1,3"`     -> a

         With or without quotes
         `cpus_to_bitmask "1 3"`     -> a
         `cpus_to_bitmask  1 3`      -> a

2.) Added UCI options:

    enable     - to enable/disable the script from running.   [default 1 (on)]
    enable_log - to enable/disable logging output to `logger`.[default 1 (on)]

    Log output:
```
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(87) reo2host-destination-ring1    to CPU 0
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(88) reo2host-destination-ring2    to CPU 1
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(89) reo2host-destination-ring3    to CPU 2
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(90) reo2host-destination-ring4    to CPU 3
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(79) wbm2host-tx-completions-ring1 to CPU 1
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(83) wbm2host-tx-completions-ring2 to CPU 2
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(85) wbm2host-tx-completions-ring3 to CPU 3
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(73) ppdu-end-interrupts-mac1      to CPU 1
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(77) ppdu-end-interrupts-mac2      to CPU 2
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(75) ppdu-end-interrupts-mac3      to CPU 3
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(32) edma_txcmpl                   to CPU 3
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(33) edma_rxfill                   to CPU 3
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(35) edma_rxdesc                   to CPU 3
    Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(36) edma_misc                     to CPU 3
```

    Output of `/proc/interrupts`:
```
 69:          0          0          0          0 GIC-0 209 Edge      rxdma2host-destination-ring-mac1
 70:          0          0          0          0 GIC-0 211 Edge      rxdma2host-destination-ring-mac3
 71:          0          0          0          0 GIC-0 210 Edge      rxdma2host-destination-ring-mac2
 72:       2435          0          0          0 GIC-0 321 Edge      reo2host-status
 73:     268427       8011          0          0 GIC-0 261 Edge      ppdu-end-interrupts-mac1
 74:          2          0          0          0 GIC-0 255 Edge      rxdma2host-monitor-status-ring-mac1
 75:     176169          0          4      10035 GIC-0 263 Edge      ppdu-end-interrupts-mac3
 76:          2          0          0          0 GIC-0 260 Edge      rxdma2host-monitor-status-ring-mac3
 77:          0          0          0          0 GIC-0 262 Edge      ppdu-end-interrupts-mac2
 78:          0          0          0          0 GIC-0 256 Edge      rxdma2host-monitor-status-ring-mac2
 79:       3428       3123          0          0 GIC-0 189 Edge      wbm2host-tx-completions-ring1
 80:          0          0          0          0 GIC-0 323 Edge      reo2ost-exception
 81:        178          0          0          0 GIC-0 322 Edge      wbm2host-rx-release
 82:          0          0          0          0 GIC-0 212 Edge      host2rxdma-host-buf-ring-mac1
 83:       6524          0      13712          0 GIC-0 190 Edge      wbm2host-tx-completions-ring2
 84:          4          0          0          0 GIC-0 235 Edge      host2rxdma-host-buf-ring-mac3
 85:        560          0          0       1979 GIC-0 191 Edge      wbm2host-tx-completions-ring3
 86:          0          0          0          0 GIC-0 215 Edge      host2rxdma-host-buf-ring-mac2
 87:       4520          0          0          0 GIC-0 267 Edge      reo2host-destination-ring1
 88:       2231       2811          0          0 GIC-0 268 Edge      reo2host-destination-ring2
 89:       2180          0       2512          0 GIC-0 271 Edge      reo2host-destination-ring3
 90:       1990          0          0       2321 GIC-0 320 Edge      reo2host-destination-ring4
```

3.) Added `uci-defaults` script `15_smp_affinity` to configure defaults
    options on first boot.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
7 months agolldpd: note about capabilities
Paul Donald [Tue, 2 Apr 2024 11:42:35 +0000 (13:42 +0200)]
lldpd: note about capabilities

only available from >= 1.0.15

Comments are useful. Apparently this config parameter was committed when
openwrt used an older version of lldpd which did not yet support it.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
7 months agolldpd: fix restart
Paul Donald [Tue, 2 Apr 2024 11:42:20 +0000 (13:42 +0200)]
lldpd: fix restart

Redirection broke in 5364fe0f01ca ("lldpd: shellcheck fixes")

redirects to /dev/null shall be handled correctly (i.e. last).

This fixes these errors on `/etc/init.d/lldpd reload`:

2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null`
2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null`
2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null`
2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null`

Tested-on: 22.03.6
Fixes: 5364fe0f01ca ("lldpd: shellcheck fixes")
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
[ improve commit description, add fixes tag ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
7 months agopackage: kernel: leds-gca230718: fix build with Linux 6.6
Daniel Golle [Fri, 12 Apr 2024 01:02:36 +0000 (02:02 +0100)]
package: kernel: leds-gca230718: fix build with Linux 6.6

Starting with Linux 6.3 the .probe call no longer got the id parameter,
see also commit torvalds/linux@03c835f498b5
("i2c: Switch .probe() to not take an id parameter").

As the parameter is anyway unused by the driver, drop it when
building the GCA230718 LED driver for newer kernels.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 months agoqualcommax: drop 6.1 support
Robert Marko [Thu, 11 Apr 2024 15:26:47 +0000 (17:26 +0200)]
qualcommax: drop 6.1 support

We have defaulted to 6.6 for a while so its time to completely drop 6.1
so new devices dont have to include patches for 6.1.

Signed-off-by: Robert Marko <robimarko@gmail.com>
7 months agomediatek: filogic: add support for Edgecore EAP111
Robert Marko [Sat, 23 Mar 2024 19:03:34 +0000 (20:03 +0100)]
mediatek: filogic: add support for Edgecore EAP111

HW specifications:
* Mediatek MT7981A
* 256MB SPI-NAND
* 512MB DRAM
* Uplink: 1 x 10/100/1000Base-T Ethernet, Auto MDIX, RJ-45 with 802.3at
PoE (Built-in GBe PHY)
* LAN: 1 x 10/100/1000Base-T Ethernet, Auto MDIX, RJ-45 (Airoha EN8801SC)
* 1 Tricolor LED
* Reset button
* 12V/2.0A DC input

Installation:
Board comes with OpenWifi/TIP which is OpenWrt based, so sysupgrade can
be used directly over SSH.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
7 months agomediatek: add Airoha EN8801SC PHY driver
Robert Marko [Thu, 11 Apr 2024 11:09:56 +0000 (13:09 +0200)]
mediatek: add Airoha EN8801SC PHY driver

Airoha EN8801SC PHY is a gigabit PHY used on Edgecore EAP111 so, include
the MTK driver with some cleanups.

Unfortunatelly, there is no specification sheet nor datasheet available
in order to demistify the magic PBUS writes and work on upstreaming
this driver.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
7 months agogeneric: 6.1, 6.6: import two pending patches for mt7530 DSA driver
Daniel Golle [Wed, 10 Apr 2024 14:53:11 +0000 (15:53 +0100)]
generic: 6.1, 6.6: import two pending patches for mt7530 DSA driver

First patch allows to inquire and modify Energy-Efficient-Ethernet
(EEE) settings via ethtool and thereby override the default setting of
a board done via bootstrap pins.

The second patch fixes a long-standing issue with STP (and similar
protocols) when using boards (or SoCs) governed by the mt7530 DSA
driver.

Both patches could also be (dirty-)applied to Linux 5.15, but I'd
rather just wait for that to happen via linux-stable to avoid the
mess.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 months agogeneric: 6.6: sync mt7530 DSA driver with upstream
Daniel Golle [Wed, 10 Apr 2024 14:14:32 +0000 (15:14 +0100)]
generic: 6.6: sync mt7530 DSA driver with upstream

Backport lots upstream changes, many of them fixes, for the mt7530 DSA
driver, similar to how it was done for Linux 6.1 in the previous commit.

The remaining differences compared to the upstream driver are only
the 'slave' -> 'user', 'master' -> 'conduit' language change in DSA
and the rename of 'struct ethtool_eee' to 'struct ethtool_keee' as
well as tree-wide replacement of ethtool_sprintf with ethtool_puts,
all of them do not have any functional impact.

Apart from some minor bug fixes and style improvements the switch
should now behave more conformant when it comes to link-local frames,
and we will again be able to cleanly pick patches from upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 months agogeneric: 6.1: sync mt7530 DSA driver with upstream
Daniel Golle [Tue, 9 Apr 2024 22:33:05 +0000 (23:33 +0100)]
generic: 6.1: sync mt7530 DSA driver with upstream

Backport lots upstream changes, many of them fixes, for the mt7530 DSA
driver. Some of them may or may not find they way into Linux 6.1
stable, some certainly won't because they are fixes for backported
commits which aren't even present in Linux 6.1 upstream.

Apart from adding new patches, also remove mutated patch
723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
which should never have been added for Linux 6.1 -- it was applied
already upstream but coincidentally would fuzzy-apply in the wrong
place as well (for MT7530 instead of MT7531). While that didn't really
hurt anyone it is just unneeded.

The other deleted patch
795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
has been replaced by an equivalent commit with a more complete patch
description by upstream maintainer Arınç Ünal.

The remaining differences compared to the upstream driver are:
 * C22/C45 MDIO ops aren't split
   Upstream did that, backporting it would require making changes to
   *all* DSA drivers
 * 'slave' -> 'user', 'master' -> 'conduit' language change in DSA
 * support for selecting preferred CPU port on MT7531
   Also this would require too many DSA framework changes potentially
   affecting other devices. If we ever really use Linux 6.1 in a
   release (I hope not) we can still reconsider to make the effort to
   backport that.

In addition to some minor bug fixes and style improvements the switch
should now behave more conformant when it comes to link-local frames,
and we will again be able to cleanly pick patches from upstream.

MAINTAIERS NOTE:
Three patches are already part of Linux stable and should be removed with
the next minor kernel version bump:
789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch
789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch
789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 months agokernel: add kmod-hwmon-emc2305 support
Oleg S [Sun, 24 Mar 2024 18:26:08 +0000 (21:26 +0300)]
kernel: add kmod-hwmon-emc2305 support

This module supports the Microchip Technology Inc (SMSC)
EMC2301/EMC2302/EMC2303/EMC2305 fan speed PWM controller chips.

Signed-off-by: Oleg S <remittor@gmail.com>
7 months agoucode: update to Git HEAD (2024-04-07)
Felix Fietkau [Tue, 9 Apr 2024 09:21:39 +0000 (11:21 +0200)]
ucode: update to Git HEAD (2024-04-07)

1220992631d5 ubus: automatically clear error information
d6fd94014eea uci: automatically clear error information
99837f280b61 uloop: automatically clear error information
be767ae197ba vm: rework `in` operator semantics
4ade84e8fb81 ubus: add explicit support for deferring incoming requests

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 months agoconfig: fix CONFIG_GDB appearing in main menuconfig menu
Robert Marko [Mon, 8 Apr 2024 20:05:19 +0000 (22:05 +0200)]
config: fix CONFIG_GDB appearing in main menuconfig menu

I noticed that CONFIG_GDB was suddenly appearing in the main menuconfig
menu despite the fact that it should be visible only when TOOLCHAINOPTS
is selected and under a dedicated menu.

After some trial and error, it seems that this was caused by the recent
addition of GCC_USE_DEFAULT_VERSION, and after even more trial and error
it gets fixed as soon GCC_USE_DEFAULT_VERSION is placed after GCC_VERSION.

So, lets simply put GCC_USE_DEFAULT_VERSION after GCC_VERSION.

Fixes: 501ef81040ba ("config: select KERNEL_WERROR if building with default GCC version")
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 months agogeneric: add missing patch headers
Daniel Golle [Tue, 9 Apr 2024 16:39:46 +0000 (17:39 +0100)]
generic: add missing patch headers

Make sure all patches can be applied to a git tree using 'git am'
by adding missing patch headers where needed.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 months agotools: zstd: dont override CLI max level
Robert Marko [Mon, 8 Apr 2024 16:35:45 +0000 (18:35 +0200)]
tools: zstd: dont override CLI max level

Now that instead of relying on env variables for the GH download script
invoking ZSTD tarball compression it passes the full arguments via tar -I
we can drop the CLI max compression level override.

Signed-off-by: Robert Marko <robimarko@gmail.com>
7 months agoscripts/dl_github_archive: use tar -I for ZSTD
Robert Marko [Mon, 8 Apr 2024 16:38:51 +0000 (18:38 +0200)]
scripts/dl_github_archive: use tar -I for ZSTD

Instead of relying on env variables for setting the ZSTD compression
configuration we can simply do what we do for IB, SDK and the rest and
use tar -I to pass "zstd -T0 --ultra -20" directly.

This makes it rather clear what is being done and allows to drop the
zstd CLI max level override as its usually capped at level 19.

Signed-off-by: Robert Marko <robimarko@gmail.com>
7 months agomediatek: filogic: switch TP-LINK XDR series to fitblk
Daniel Golle [Fri, 23 Feb 2024 16:03:00 +0000 (16:03 +0000)]
mediatek: filogic: switch TP-LINK XDR series to fitblk

Instead of using the deprecated FIT partition parser, use the new
fitblk driver instead.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 months agomvebu: puzzle-m90x: wipe rootfs_data on sysupgrade
Daniel Golle [Tue, 9 Jan 2024 19:54:51 +0000 (19:54 +0000)]
mvebu: puzzle-m90x: wipe rootfs_data on sysupgrade

The sysupgrade formware of the Puzzle series is a slightly strange
dual-boot approach while remaining compatible with Marvell's SDK
firmware upgrade binary format -- which happens to be a full-disk
image with GPT partition table. Hence that /lib/upgrade/emmc-puzzle.sh
script is like an exotic disease which results from those decisions,
and as we also want to somehow stay compatible with the IEI-World
stock firmware we got to use it in that same way (we are not
compatible with the QNAP-branded identical hardware device anyway).

Currently, on sysupgrade the result is that one ends up with the old
content of rootfs_data (a GPT partition on those devices) as nothing
ever wipes or in any way re-creates the filesystem there. As a simple
work-around, let's kill the filesystem on rootfs_data so fstools
re-formats it on the next boot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 months agosdk: include lib/crtsavres.o for powerpc main
Robert Marko [Mon, 8 Apr 2024 15:52:22 +0000 (17:52 +0200)]
sdk: include lib/crtsavres.o for powerpc

Trying to link certain kernel modules like dahdi-linux when building with
the OpenWrt SDK will fail with:
openwrt-sdk-apm821xx-sata_gcc-13.2.0_musl.Linux-x86_64/staging_dir/toolchain-powerpc_464fp_gcc-13.2.0_musl/bin/powerpc-openwrt-linux-musl-ld: cannot find arch/powerpc/lib/crtsavres.o: No such file or directory

Previously this worked with the PowerPC SDK since we carried a hack that
was passing --save-restore-funcs to module LDFLAGS so the linker provided
the required functions automatically as without --save-restore-funcs it
doesnt do so automatically on relocatable links and as a sideffect did not
require the kernel provided crtsaves.o to link against.

Now that hack has been removed as upstream kernel now compiles crtsaves.o
by default so it can be linked against but its not included in the SDK.

So, lets include lib/crtsavres.o when SDK is generated for PowerPC.

Fixes: 99c9d8abd677 ("kernel: bump 5.15 to 5.15.148")
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 months agoqualcommax: Skip compiling unnecessary dtbs
Sean Khan [Mon, 8 Apr 2024 20:24:12 +0000 (16:24 -0400)]
qualcommax: Skip compiling unnecessary dtbs

Currently the compile phase of the kernel builds `Image dtbs modules`.
However, none of the dtbs that get built are used for the final image.

This ends up unnecessarily taking CPU cycles and produces a lot of
`WARNINGS` that can lead users to believe there's cause for concern. I
believe the same principle can be applied to other targets.

```
DTC     arch/arm64/boot/dts/qcom/msm8996-mtp.dtb
arch/arm64/boot/dts/qcom/msm8996.dtsi:2954.36-2962.5: Warning (clocks_property):
/soc/clock-controller@6400000: Missing property '#clock-cells' in node
/soc/mailbox@9820000 or bad phandle (referred from clocks[2])

DTC     arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-dora.dtb
arch/arm64/boot/dts/qcom/msm8996.dtsi:2954.36-2962.5: Warning (clocks_property):
/soc/clock-controller@6400000: Missing property '#clock-cells' in node
/soc/mailbox@9820000 or bad phandle (referred from clocks[2])

DTC     arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-kagura.dtb
arch/arm64/boot/dts/qcom/msm8996.dtsi:2954.36-2962.5: Warning (clocks_property):
/soc/clock-controller@6400000: Missing property '#clock-cells' in node
/soc/mailbox@9820000 or bad phandle (referred from clocks[2])

DTC     arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-keyaki.dtb
arch/arm64/boot/dts/qcom/msm8996.dtsi:2954.36-2962.5: Warning (clocks_property):
/soc/clock-controller@6400000: Missing property '#clock-cells' in node
/soc/mailbox@9820000 or bad phandle (referred from clocks[2])

DTC     arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dtb
arch/arm64/boot/dts/qcom/msm8996.dtsi:2954.36-2962.5: Warning (clocks_property):
/soc/clock-controller@6400000: Missing property '#clock-cells' in node
/soc/mailbox@9820000 or bad phandle (referred from clocks[2])

DTC     arch/arm64/boot/dts/qcom/msm8996-xiaomi-natrium.dtb
arch/arm64/boot/dts/qcom/msm8996.dtsi:2954.36-2962.5: Warning (clocks_property):
/soc/clock-controller@6400000: Missing property '#clock-cells' in node
/soc/mailbox@9820000 or bad phandle (referred from clocks[2])

DTC     arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dtb
arch/arm64/boot/dts/qcom/msm8996.dtsi:2954.36-2962.5: Warning (clocks_property):
/soc/clock-controller@6400000: Missing property '#clock-cells' in node
/soc/mailbox@9820000 or bad phandle (referred from clocks[2])
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
7 months agotreewide: remove implicit SUBTARGET
Paul Spooren [Mon, 8 Apr 2024 06:05:29 +0000 (08:05 +0200)]
treewide: remove implicit SUBTARGET

Historically it's possible to leave the `SUBTARGETS` undefined and
automatically fallback to a "generic" subtarget. This however breaks
various downstream scripts which may have expectations around filenames:

While some targets with an explicit generic subtarget contain `generic`
in the filenames of artifacts, implicit "subtargets" don't.

Right now this breaks the CI[1], possibly also scripts using the ImageBuilders.

This commit removes all code that support implicit handling of
subtargets and instead requires every target to define "SUBTARGETS".

[1]: https://github.com/openwrt/openwrt/actions/runs/8592821105/job/23548273630

Signed-off-by: Paul Spooren <mail@aparcar.org>
7 months agod1: define subtarget specifically
Paul Spooren [Mon, 8 Apr 2024 05:54:45 +0000 (07:54 +0200)]
d1: define subtarget specifically

Historically it's possible to leave the `SUBTARGETS` undefined and
automatically fallback to a "generic" subtarget. This however breaks
various downstream scripts which may have expectations around filenames:

While some targets with an explicit generic subtarget contain `generic`
in the filenames of artifacts, implicit "subtargets" don't.

Right now this breaks the CI[1], possibly also scripts using the ImageBuilders.

Do to the D1 target what's done to other target, explicitly define the
"generic" subtarget.

[1]: https://github.com/openwrt/openwrt/actions/runs/8592821105/job/23548273630

Signed-off-by: Paul Spooren <mail@aparcar.org>
7 months agorealtek: add support for switch Zyxel GS1900-24EP
Mirko Vogt [Fri, 5 Apr 2024 15:31:03 +0000 (15:31 +0000)]
realtek: add support for switch Zyxel GS1900-24EP

This device is very similar to the GS1900-24E switch (added in b515ad1),
except that the first 12 of 24 ethernet ports are capable of PoE and the
physical jacks are in the right order - unlike for the GS1900-24E, where
even and uneven ports are flipped (up <-> down on panel).

Zyxel version code for this device (-24EP) is: ABTO

Signed-off-by: Mirko Vogt <mirko-openwrt@nanl.de>
7 months agoconfig: select KERNEL_WERROR if building with default GCC version
Daniel Golle [Sun, 7 Apr 2024 18:50:04 +0000 (19:50 +0100)]
config: select KERNEL_WERROR if building with default GCC version

At the moment we have to manually follow the default GCC version
also in config/Config-kernel.in. This tends to be forgotten at GCC
version bumps (just happened when switching from version 12 to 13).
Instead, introduce a hidden Kconfig symbol which implies KERNEL_WERROR
in toolchain/gcc/Config.in where it is visible for developers changing
the default version.

Also remove the explicit default on BUILDBOT to avoid a circular
dependency and also because buildbots anyway implicitly always select
the default GCC version.

Reference: https://github.com/openwrt/openwrt/pull/15064
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 months agouclient: update to Git HEAD (2024-04-05)
Felix Fietkau [Sun, 7 Apr 2024 09:15:23 +0000 (11:15 +0200)]
uclient: update to Git HEAD (2024-04-05)

e209a4ced1d8 add strdupa macro for compatibility
af1962b9a609 uclient: add helper function for getting ustream-ssl context/ops
488f1d52cfd2 http: add helper function for checking redirect status
b6e5548a3ecc uclient: defer read notifications to uloop timer
352fb3eeb408 http: call ustream_poll if not enough read data is available
e611e6d0ff0b add ucode binding
ddb18d265757 uclient: add function for getting the amount of pending read/write data
980220ad1762 ucode: fix a few ucode binding issues
6c16331e4bf5 ucode: add support for using a prototype for cb, pass it to callbacks

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 months agobcm27xx: bcm2712: backport RP1 interrupt affinity
Álvaro Fernández Rojas [Sat, 6 Apr 2024 15:56:37 +0000 (17:56 +0200)]
bcm27xx: bcm2712: backport RP1 interrupt affinity

Support for setting the CPU affinity on RP1 has been added to RPi linux v6.6

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 months agobcm27xx: update 6.1 patches from RPi foundation
Álvaro Fernández Rojas [Sat, 6 Apr 2024 15:30:49 +0000 (17:30 +0200)]
bcm27xx: update 6.1 patches from RPi foundation

Sync 6.1 patches with the RPi foundation.
Since rpi-6.6.y is now the main branch of the RPi foundation, there won't be
any new patches for linux 6.1.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 months agobase-files: minor fix to mmc_get_mac_ascii function
Rodrigo Balerdi [Sat, 6 Apr 2024 06:18:00 +0000 (03:18 -0300)]
base-files: minor fix to mmc_get_mac_ascii function

This is mostly a cosmetic cleanup. The absence of
the return statement was not causing any problems.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
7 months agoustream-ssl: update to Git HEAD (2024-04-07)
Felix Fietkau [Sun, 7 Apr 2024 16:55:14 +0000 (18:55 +0200)]
ustream-ssl: update to Git HEAD (2024-04-07)

7621339d7694 mbedtls: fix build on non-linux systems
268050964b08 ustream-mbedtls: add missing psa_crypto_init call
956fba242ac0 add callbacks for debug messages
9fdf3fb87af5 mbedtls: add TLS 1.3 ciphers
28c4c1e6471b mbedtls: disable TLS 1.3 in client mode when skipping verification
d61493a44204 mbedtls: add missing ifdef for build with disabled debug

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 months agoat91bootstrap: update PKG_MIRROR_HASH to zstd for v3 at91bootstrap
Robert Marko [Sun, 7 Apr 2024 12:44:46 +0000 (14:44 +0200)]
at91bootstrap: update PKG_MIRROR_HASH to zstd for v3 at91bootstrap

So, when updating the hash for at91bootstrap it was done via CHECK_ALL=1
so that updated the PKG_MIRROR_HASH for the main v4 version hash, but
at91bootstrap checkout version depends on the subtarget as well.

Choosing to build for sam9x will change the at91bootstrap version to v3
and this hash was not refreshed thus causing the CI to fail.

Fixes: 6918c637b797 ("treewide: package: update missed hashes after switch to ZSTD")
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 months agogeneric: backport at803x kernel panic fix
Christian Marangi [Sun, 7 Apr 2024 14:52:48 +0000 (16:52 +0200)]
generic: backport at803x kernel panic fix

Backport at803x kernel panic fix merged upstream for kernel 6.1 and 6.6.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
7 months agotreewide: package: update missed hashes after switch to ZSTD
Robert Marko [Sun, 7 Apr 2024 10:29:11 +0000 (12:29 +0200)]
treewide: package: update missed hashes after switch to ZSTD

With the switch to ZSTD for git clone packaging, hashes have changed so
fixup remaining package hashes that were missed in the inital update.

Fixes: b3c1c57 ("treewide: update PKG_MIRROR_HASH to zst")
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 months agogeneric: 6.6: backport arm64 swiotlb default size reduction
Robert Marko [Sat, 6 Apr 2024 21:08:03 +0000 (23:08 +0200)]
generic: 6.6: backport arm64 swiotlb default size reduction

Kernel 6.6 added dynamic SWIOTLB allocation, but with it also started
allocating 64MB of the SWIOTLB bounce buffer by default which is quite a
lot of memory on most OpenWrt devices.

Luckily in kernel 6.7 arm64 received an optimization that reduces that
default size to 1MB per 1GB of RAM if certain criteria was met.

So in order to reclaim back 63MB of RAM which brought some ipq807x devices
close to OOM under load lets backport the upstream commit.

Signed-off-by: Robert Marko <robimarko@gmail.com>
7 months agonu801: update PKG_MIRROR_HASH to zst
Robert Marko [Sun, 7 Apr 2024 09:49:53 +0000 (11:49 +0200)]
nu801: update PKG_MIRROR_HASH to zst

When using zst instead of xz, the hash changes.
This was missed in the initial treewide updated.

Fixes: b3c1c57a35a0 ("treewide: update PKG_MIRROR_HASH to zst")
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 months agox86: geode: 6.6: add missing kernel options
Mieczyslaw Nalewaj [Sat, 6 Apr 2024 15:18:46 +0000 (17:18 +0200)]
x86: geode: 6.6: add missing kernel options

Add options removed by `make kernel_oldconfig CONFIG_TARGET=subtarget', missing which causes compilation to stop and cause an error.

Fixes: 2a86425de107 ("x86: 6.6: refresh kernel config")
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
7 months agowifi-scripts: fix creation of IBSS in legacy (non-HT) mode
Alexandru Gagniuc [Wed, 3 Apr 2024 19:32:08 +0000 (14:32 -0500)]
wifi-scripts: fix creation of IBSS in legacy (non-HT) mode

When an IBBS interface is configured for IBSS legacy mode, wdev.htmode
is empty. This is empty string results in an empty positional argument
to the "ibbs join" command, for example:

    iw dev phy0-ibss0 ibss join crymesh 2412 '' fixed-freq beacon-interval 100

This empty argument is interpreted as an invalid HT mode by 'iw',
causing the entire command to fail and print a "usage" message:

    daemon.notice netifd: radio0 (4527): Usage:    iw [options] \
        dev <devname> ibss join <SSID> <freq in MHz> ...

Although nobody will ever need more than 640K of IBSS, explicitly use
"NOHT" if an HT mode is not given. This fixes the problem.

Fixes: e56c5f7b276a ("hostapd: add ucode support, use ucode for the main ubus object")
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [extend to cover more cases]
7 months agoscripts: add .tar.zst to dl_cleanup extensions
Stijn Tintel [Sat, 6 Apr 2024 14:02:28 +0000 (17:02 +0300)]
scripts: add .tar.zst to dl_cleanup extensions

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 months agotools: zstd: add patch fixing wrong generated .pc with lib-mt
Christian Marangi [Sat, 6 Apr 2024 12:58:48 +0000 (14:58 +0200)]
tools: zstd: add patch fixing wrong generated .pc with lib-mt

The current .pc generated by make build system for zstd is wrong and
always assume a single-threaded library is used.

This wasn't the case for the meson build system that used his own logic
to generate the pkg-config file.

Add a patch to fix this by introducing install-mt-pc make target to
generate the correct pkg-config gile.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
7 months agoRevert "tools/mkimage: update to v2024.04"
Nick Hainke [Sat, 6 Apr 2024 12:49:54 +0000 (14:49 +0200)]
Revert "tools/mkimage: update to v2024.04"

This reverts commit 8d934c11968de49ad17bc62366a88230e47b4f56.

The update seems to be causing issues that need to be further
explored [0]. Let's revert it.

[0] - https://github.com/openwrt/openwrt/pull/15078

Signed-off-by: Nick Hainke <vincent@systemli.org>
7 months agotools: zstd: install headers as well
Robert Marko [Sat, 6 Apr 2024 10:05:56 +0000 (12:05 +0200)]
tools: zstd: install headers as well

We forgot to make sure install-includes is called for the libzstd in
order for it to install the required headers.

Fixes: 4b920e799fba ("tools: zstd: convert to make and drop meson dependency")
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 months agotreewide: update PKG_MIRROR_HASH to zst
Paul Spooren [Mon, 25 Mar 2024 09:03:26 +0000 (10:03 +0100)]
treewide: update PKG_MIRROR_HASH to zst

When using zst instead of xz, the hash changes. This commit fixes the
hash for packages and tools in core.

Signed-off-by: Paul Spooren <mail@aparcar.org>
7 months agotools: prefer gz or bz2 tarballs
Robert Marko [Wed, 3 Apr 2024 17:12:57 +0000 (19:12 +0200)]
tools: prefer gz or bz2 tarballs

In the light of recent XZ events, and fundamental XZ issues lets work on
moving away from using XZ.

So, use gz compressed tarballs as sources whenever possible.

dwarves only offers bz2 compressed tarballs, so use those as size
difference is minor compared to XZ.

Signed-off-by: Robert Marko <robimarko@gmail.com>
dwarves

7 months agotools: libdeflate: fetch source as tarball
Robert Marko [Thu, 4 Apr 2024 09:14:55 +0000 (11:14 +0200)]
tools: libdeflate: fetch source as tarball

libdeflate is currently intentionally being fetched via GIT.

However, with the move to using ZSTD to compress the cloned GIT repo
tarballs it means that we would first need to compile ZSTD.
But that means that we need to be able to unpack gzipped tarballs first
which we currently do by using libdeflate-gzip.
So, in order to do so lets fetch libdeflate as a tarball, use gzip to
extract it and then use libdeflate as regular for all other tools.

Signed-off-by: Robert Marko <robimarko@gmail.com>
7 months agotools: rework tools-core dependecies
Rosen Penev [Wed, 3 Apr 2024 19:17:21 +0000 (12:17 -0700)]
tools: rework tools-core dependecies

ZSTD and libdeflate do not depend on SED nor flock, so instead of the whole
for loop that will filter 2 out of 4 core packages just specify that patch
and tar depend on sed explicitly.

ZSTD now depends on libdeflate since libdeflate-gzip will then be used to
unpack ZSTD as well as most tool archives.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 months agotools: make zstd tool core and xz tool non-core
Christian Marangi [Tue, 2 Apr 2024 23:10:01 +0000 (01:10 +0200)]
tools: make zstd tool core and xz tool non-core

Make zstd tool core and xz tool non-core since zstd is the new default
for compression format.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
7 months agotools: zstd: dont override ZSTD_LEGACY_SUPPORT
Robert Marko [Fri, 5 Apr 2024 13:44:40 +0000 (15:44 +0200)]
tools: zstd: dont override ZSTD_LEGACY_SUPPORT

We dont really have a reason to deviate from the upstream default for
ZSTD_LEGACY_SUPPORT value of 5, as it will save a bit of space but
prevent decompressing data compressed with legacy ZSTD versions.

Signed-off-by: Robert Marko <robimarko@gmail.com>
7 months agotools: zstd: override max safe compression level
Christian Marangi [Fri, 5 Apr 2024 12:29:50 +0000 (14:29 +0200)]
tools: zstd: override max safe compression level

ZTSD limits the safe compression level to a max of 19 as 20 to 22 cause
increased RAM usage. Higher levels require --ultra arg passed.

There isn't currently a way to set --ultra using ENV options similar to
ZSTD_CLEVEL and ZSTD_CLEVEL is limited to 19.

To fix this, we can increase the max safe compression level by providing
a custom ZSTDCLI_CLEVEL_MAX value with CFLAGS.

The max safe level is increased to 20.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
7 months agotools: zstd: convert to make and drop meson dependency
Christian Marangi [Tue, 2 Apr 2024 23:07:14 +0000 (01:07 +0200)]
tools: zstd: convert to make and drop meson dependency

Convert to make and drop meson dependency since it's not a core tools
and can't depend on advanced build system like cmake or meson.

On top of this make is the official build support and cmake/meson are
supported by 3rd parties.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
7 months agoinclude/download.mk: switch to zst compression
Paul Spooren [Mon, 25 Mar 2024 08:56:18 +0000 (09:56 +0100)]
include/download.mk: switch to zst compression

The compression is faster to (un)pack files, make use of it.

Also add a new build prerequirement, the `zstd` to (un)pack files.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[ improve commit title ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
7 months agoscripts/dl_github_archive: add support for packing zstd archive
Christian Marangi [Mon, 25 Mar 2024 10:00:38 +0000 (11:00 +0100)]
scripts/dl_github_archive: add support for packing zstd archive

Add support for packing .zst archive when creating Github mirror tar.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
7 months agoinclude/download.mk: handle .gitattributes rules on rawgit method
Christian Marangi [Fri, 5 Apr 2024 12:22:18 +0000 (14:22 +0200)]
include/download.mk: handle .gitattributes rules on rawgit method

This fix a long lasting bug/inconsistency with rawgit method and
dl_github_archive script.

The dl_github_archive script works by using the github generated tar.gz
instead of cloning and checkout and the tar.gz is generated by using git
archive command that parse and apply .gitattributes rules.

rawgit command never handled .gitattributes and instead made a simple git
clone and checkout causing the inconsistency.

To fix the inconsistency, add extra steps to call git archive command
and generate an intermediate tar to apply .gitattributes rules.

Also for git log format, Github shorthash length is 8 instead of the
default 7, also apply this locally for each cloned repo to produce
consistent tar.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
7 months agotools/mkimage: update to v2024.04
Nick Hainke [Fri, 5 Apr 2024 10:18:41 +0000 (12:18 +0200)]
tools/mkimage: update to v2024.04

Update to latest version.

Refresh patches:
- 030-allow-to-use-different-magic.patch
- 095-tools-disable-TOOLS_FIT_FULL_CHECK.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
7 months agokernel: bump 6.6 to 6.6.25
John Audia [Thu, 4 Apr 2024 19:16:38 +0000 (15:16 -0400)]
kernel: bump 6.6 to 6.6.25

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.25

All patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, flogic/glinet_gl-mt6000
Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, flogic/glinet_gl-mt6000

Signed-off-by: John Audia <therealgraysky@proton.me>
7 months agokernel: bump 6.6 to 6.6.24
John Audia [Wed, 3 Apr 2024 19:06:44 +0000 (15:06 -0400)]
kernel: bump 6.6 to 6.6.24

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.24

Removed upstreamed:
generic/backport-6.6/838-v6.9-leds-trigger-netdev-Fix-kernel-panic-on-interface-re.patch[1]
generic/backport-6.6/981-mtd-spinand-Add-support-for-5-byte-IDs.patch[2]
mediatek/patches-6.6/831-thermal-drivers-mediatek-Fix-control-buffer-enablement-on-MT7896.patch[3]

Removed:
ipq40xx/patches-6.6/110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch[4]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.24&id=10f2af1af8ab8a7064f193446abd5579d3def7e3
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.24&id=9c74507e6c4382d12a5e418742b81fd441f03313
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.24&id=fe750e2744428be6aec7395b13df3b34381ce6b6
4. Acknowledgment to @DragonBlurp for pointing out the redundancy of this patch. https://github.com/openwrt/openwrt/commit/dd78a59cd7b029560b33cb3ac0e1aa8b747bd807

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
7 months agoipq806x: 6.6: refresh patches
Mieczyslaw Nalewaj [Fri, 5 Apr 2024 12:58:33 +0000 (14:58 +0200)]
ipq806x: 6.6: refresh patches

Refresh patches for kernel 6.6.23 with make target/linux/refresh.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
7 months agopistachio: add 6.1 testing kernel
Zoltan HERPAI [Tue, 19 Mar 2024 22:31:47 +0000 (23:31 +0100)]
pistachio: add 6.1 testing kernel

Configure 6.1 as testing kernel.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
7 months agopistachio: refresh 6.1 config
Zoltan HERPAI [Tue, 19 Mar 2024 22:31:10 +0000 (23:31 +0100)]
pistachio: refresh 6.1 config

Kernel config needs to be refreshed after copy from 5.15.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
7 months agopistachio: update and extend 6.1 patches
Zoltan HERPAI [Tue, 19 Mar 2024 22:28:53 +0000 (23:28 +0100)]
pistachio: update and extend 6.1 patches

Add:
110-pwm-img-fix-clock-lookup.patch
 - patch to fix a clock lookup issue from upstream
Update:
401-mtd-nor-support-mtd-name-from-device-tree.patch
 - mtd-name lookup hack to reflect the updated spi_nor_scan function

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
7 months agopistachio: copy config and patches of 5.15 to 6.1
Zoltan HERPAI [Tue, 19 Mar 2024 22:27:08 +0000 (23:27 +0100)]
pistachio: copy config and patches of 5.15 to 6.1

Simple copy of config and patches.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
7 months agogettext-full: link libiconv when building host pkg
Yanase Yuki [Thu, 7 Mar 2024 08:31:34 +0000 (17:31 +0900)]
gettext-full: link libiconv when building host pkg

On Fedora 40 system, some compile error happens when
building iconv-ostream.c. Linking to libiconv-full
fixes this.

Signed-off-by: Yanase Yuki <dev@zpc.st>
7 months agohostapd: fix Config.in dependencies
Felix Fietkau [Fri, 5 Apr 2024 12:54:16 +0000 (14:54 +0200)]
hostapd: fix Config.in dependencies

hostapd packages were accidentally left out. Clean up this mess by
changing the dependencies to hostapd-common

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 months agoipq40xx: 6.6: remove redundant patch
Mieczyslaw Nalewaj [Thu, 4 Apr 2024 22:26:16 +0000 (00:26 +0200)]
ipq40xx: 6.6: remove redundant patch

Remove file 110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch redundand after adding 440-mtd-don-t-look-for-OTP-legacy-NVMEM-cells-if-proper-.patch in dd78a59

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
7 months agokirkwood: 6.6: refresh patches
Mieczyslaw Nalewaj [Thu, 4 Apr 2024 20:46:01 +0000 (22:46 +0200)]
kirkwood: 6.6: refresh patches

Refresh patches for kernel 6.6.23 with make target/linux/refresh.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
7 months agoapm821xx: restore 6.1 config+patches
Christian Lamparter [Sat, 23 Mar 2024 09:33:47 +0000 (10:33 +0100)]
apm821xx: restore 6.1 config+patches

simply attached previous versions of the
config-6.1 and patches-6.1 directory.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 months agoapm821xx: add 6.6 testing kernel
Christian Lamparter [Sat, 23 Mar 2024 09:32:14 +0000 (10:32 +0100)]
apm821xx: add 6.6 testing kernel

refreshed kernel config + patches

otherwise same as 6.1/5.15.

Tested on: WNDAP620, WNDAP660, MyBook Live Single, MR24, MX60, WNDR4700
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 months agoapm821xx: prepare WNDR4700 for 6.6 - add preliminary u-boot-env access
Christian Lamparter [Sat, 23 Mar 2024 10:26:23 +0000 (11:26 +0100)]
apm821xx: prepare WNDR4700 for 6.6 - add preliminary u-boot-env access

With the default BUILD_BOT configuration on a linux 6.6 kernel,
the WNDR4700's kernel no longer fits into the alloted ~3.5MiB,
even with LZMA compression.

Bigger kernels are possible, but there's a problem with Netgear's
"bootcmd":

> if loadn_dniimg 0 0x180000 0x4e0000 && chk_dniimg 0x4e0000; then nand read 0x800000 0x180000 0x20000;bootm 0x500000 - 0x800040;else fw_recovery; fi"

This loads the dni-image starting offset 0x180000 from the NAND
flash (which is the DTB partition) to 0x4e0000 in the RAM. It then
checks whenever the provided image is "valid". If it is then it
reads the DTB again to 0x800000 in the RAM and starts the extraction
and boot process. (If the image wasn't valid then it starts the
automated firmware recovery).

The issues here are that first: the kernel image gets "squeezed"
between 0x500040 and 0x7fffff... And second, the decompressor
only has area 0x0 - 0x500000 for decompression.

Hence the image now requires to update the bootcmd by providing
new values (which have been successfully tested with the original
Netgear WNDR4700 v1.0.0.56 firmware) for the RAM locations and
make full use of the fact that loadn_dniimg loads the DTB as well.

This needs to be done only once. Just connect a serial adapter to
interface with uboot and overwrite (and save) the new bootcmd.

WARNING: The serial port needs a TTL/RS-232 3.3v level converter!

Steps:
 0. Power-off the WNDR4700
 1. Connect the serial interface (you need to open the WNDR4700)
 2. Power-up the WNDR4700
 3. Monitor the boot-sequence and hit "Enter"-key when it says:

  "Hit any key to stop autoboot" (Be quick, you have a ~2 second window)

 4. in the Prompt enter the following commands (copy & paste)

 setenv bootcmd "if loadn_dniimg 0 0x180000 0xce0000 && chk_dniimg 0xce0000; then bootm 0xd00000 - 0xce0040;else fw_recovery; fi"
 saveenv
 run bootcmd

Note: This new bootcmd will also unbrick devices that were bricked
by the bigger 4.19-6.1 kernels.

Note2: This method was tested with a WNDR4700. A big kernel with most
debug features enabled on v6.6.22 measured 4.30 MiB when compressed
with lzma. The uncompressed kernel is 12.34 MiB. This is over the 3 MiB,
the device reserves for the kernel... But it booted! For bigger kernels,
the device needs repartitioning of the the ubi partition due to the
kernel+dtb not fitting into the partition.

Note3: For initramfs development. I would advice to load the initramfs
images to 0x800000 (or higher). i.e.: tftp 800000 wndr4700.bin

Note4: the fw_recovery uboot command to transfer the factory image to
the flash still works.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 months agoramips: 6.6: set testing kernel
Mieczyslaw Nalewaj [Wed, 13 Mar 2024 01:15:14 +0000 (02:15 +0100)]
ramips: 6.6: set testing kernel

Allow selecting 6.6 as testing kernel on ramips.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
7 months agoramips: 6.6: refresh kernel config
Mieczyslaw Nalewaj [Mon, 1 Apr 2024 14:56:34 +0000 (16:56 +0200)]
ramips: 6.6: refresh kernel config

Refresh kernel config.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
7 months agoramips: adjusted pinctrl-aw9523 for kernel 6.6
Mieczyslaw Nalewaj [Fri, 15 Mar 2024 08:08:09 +0000 (09:08 +0100)]
ramips: adjusted pinctrl-aw9523 for kernel 6.6

Compatiblity with kernel 6.6 for Awinic AW9523B i2c pin controller driver.
It follows the kernel patch: i2c: Drop legacy callback .probe_new() (https://github.com/torvalds/linux/commit/5eb1e6e459cfa025f79c43014f66ff62a55542f1)
and kernel patch: gpiolib: Get rid of not used of_node member (https://github.com/torvalds/linux/commit/70d0fc4288dabd65025fde7774b4f9262afa9034)

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
7 months agoramips: mt7620: alignment with updated snd_soc_dai_driver structure
Mieczyslaw Nalewaj [Fri, 15 Mar 2024 07:27:14 +0000 (08:27 +0100)]
ramips: mt7620: alignment with updated snd_soc_dai_driver structure

Fix error: 'struct snd_soc_dai_driver' has no member named 'remove'
It follows the kernel patch: ASoC: soc-dai.h: remove unused call back functions (https://github.com/torvalds/linux/commit/446b31e894935ebbcf84302061a4e0e2efb2368f)

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
7 months agogeneric: fix detect_memory_region() function
Shiji Yang [Wed, 13 Mar 2024 19:39:01 +0000 (03:39 +0800)]
generic: fix detect_memory_region() function

This patch fixes the broken detect_memory_region() function on
6.6 kernel.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
7 months agoramips: 6.6: fix net drivers compatibility
Mieczyslaw Nalewaj [Wed, 13 Mar 2024 01:24:11 +0000 (02:24 +0100)]
ramips: 6.6: fix net drivers compatibility

Fix compatibility of ralink net drivers with kernel 6.6.
It follows the kernel patch: u64_stats: Streamline the implementation (https://github.com/torvalds/linux/commit/44b0c2957adc62b86fcd51adeaf8e993171b)

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
7 months agoramips: 6.6: refresh patches
Mieczyslaw Nalewaj [Thu, 14 Mar 2024 22:27:46 +0000 (23:27 +0100)]
ramips: 6.6: refresh patches

Refresh kernel patches.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
7 months agoramips: 6.6: remove old patches
Mieczyslaw Nalewaj [Wed, 13 Mar 2024 01:02:58 +0000 (02:02 +0100)]
ramips: 6.6: remove old patches

Remove patches for old kernel.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
7 months agokernel/ramips: Restore kernel files for v6.1
Mieczyslaw Nalewaj [Sun, 17 Mar 2024 17:11:29 +0000 (18:11 +0100)]
kernel/ramips: Restore kernel files for v6.1

This is an automatically generated commit which aids following Kernel patch history,
as git will see the move and copy as a rename thus defeating the purpose.

See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
for the original discussion.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
7 months agokernel/ramips: Create kernel files for v6.6 (from v6.1)
Mieczyslaw Nalewaj [Sun, 17 Mar 2024 17:11:22 +0000 (18:11 +0100)]
kernel/ramips: Create kernel files for v6.6 (from v6.1)

This is an automatically generated commit.

During a `git bisect` session, `git bisect --skip` is recommended.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
7 months agokernel/ramips: Restore kernel patches for v6.1
Mieczyslaw Nalewaj [Sat, 16 Mar 2024 11:00:20 +0000 (12:00 +0100)]
kernel/ramips: Restore kernel patches for v6.1

This is an automatically generated commit which aids following Kernel patch history,
as git will see the move and copy as a rename thus defeating the purpose.

See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
for the original discussion.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
7 months agokernel/ramips: Create kernel patches for v6.6 (from v6.1)
Mieczyslaw Nalewaj [Sat, 16 Mar 2024 10:58:22 +0000 (11:58 +0100)]
kernel/ramips: Create kernel patches for v6.6 (from v6.1)

This is an automatically generated commit.

During a `git bisect` session, `git bisect --skip` is recommended.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
7 months agolibubox: fix PKG_MIRROR_HASH of 2024-03-29
Paul Spooren [Thu, 4 Apr 2024 20:39:27 +0000 (22:39 +0200)]
libubox: fix PKG_MIRROR_HASH of 2024-03-29

The PKG_MIRROR_HASH was wrong (again), likely due to an old set of tools
which did not contain the downgrade of xz.

Ref 2070049 unetd: fix PKG_MIRROR_HASH
Fix 89c594e libubox: update to Git HEAD (2024-03-29)"

Signed-off-by: Paul Spooren <mail@aparcar.org>
7 months agokirkwood: add 6.6 kernel as testing version
Pawel Dembicki [Thu, 14 Mar 2024 13:41:56 +0000 (14:41 +0100)]
kirkwood: add 6.6 kernel as testing version

This patch introduce kernel 6.6 for kirkwood target as testing version.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
7 months agokirkwood: split files into 6.1 and 6.6 version
Pawel Dembicki [Fri, 15 Mar 2024 10:54:41 +0000 (11:54 +0100)]
kirkwood: split files into 6.1 and 6.6 version

Upstream change location of kirkwood dts files.
Split downstream files location for better upstream follow.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
7 months agokirkwood: kernel: refresh 6.6 config
Pawel Dembicki [Thu, 14 Mar 2024 13:41:11 +0000 (14:41 +0100)]
kirkwood: kernel: refresh 6.6 config

Done by 'make kernel_oldconfig'.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
7 months agokirkwood: refresh 6.6 patches
Pawel Dembicki [Thu, 14 Mar 2024 13:37:55 +0000 (14:37 +0100)]
kirkwood: refresh 6.6 patches

Removed upstream merged:
002-6.2-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch
003-6.5-ARM-dts-kirkwood-Add-Endian-4i-Edge-200-board.patch
004-6.4-ARM-dts-kirkwood-Add-missing-phy-mode-and-fixed-link.patch
005-6.7-net-dsa-mv88e6xxx-fix-marvell-6350-switch-probing.patch

Manually refreshed:
100-ib62x0.patch
101-iconnect.patch
102-dockstar.patch
103-iomega-ix2-200.patch
105-linksys-viper-dts.patch
106-goflexnet.patch
107-01-zyxel-nsa3x0-common-nand-partitions.patch
107-03-nsa325.patch
109-pogoplug_v4.patch
110-pogo_e02.patch
111-l-50.patch
112-sheevaplug.patch
113-readynas_duo_v2.patch
114-ctera-c-200-v1.patch
115-nsa310s.patch
116-4i-edge-200.patch
117-netgear_stora.patch
203-blackarmor-nas220.patch

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>