openwrt/staging/pepe2k.git
5 months agoqualcommax: ipq807x: add Asus RT-AX89X BX revision
Robert Marko [Sun, 11 Feb 2024 17:57:52 +0000 (18:57 +0100)]
qualcommax: ipq807x: add Asus RT-AX89X BX revision

This commit adds support for Asus RT-AX89X BX revision.

WARNING: Only the BX revision boards (So B1, B2 etc) are supported because
AX revision boards use IPQ8074 v1 SoC which is unsupported.

Specifications:
---------------
* CPU: Qualcomm IPQ8074A Quad core Cortex-A53 @ 2.2GHz
* RAM: 1024MB
* Storage: 256MB SLC NAND (Macronix MX30UF2G18AC)
* Ethernet:
* 5x 1G RJ45 ports via QCA8337 switch
* 3x 1G RJ45 ports via internal switch (QCA8075 PHY)
* 1x 10G RJ45 via internal switch (AQR113C PHY)
* 1x 10G SFP+ slot via internal switch
* WLAN:
* 2.4GHz 4x4
* 5GHz 8x8
* 8 external antennas
* USB: 2x USB 3.0 Type-A
* Buttons:
* Power switch
* WPS
* Reset
* Wireless ON/OFF
* LED ON/OFF
LED-s:
* Power
* Wi-Fi
* WAN
* 10G
* SFP+
Power:
* 19.5V via DC jack

Installation instructions:
--------------------------
1. Flash temporary OpenWrt initramfs:
* Flash openwrt-qualcommax-ipq807x-asus_rt-ax89x-initramfs-factory.trx
via the stock firmware.
Administration -> Firmware Upgrade -> Manual Firmware update (Upload)

After flashing the device will reboot with OpenWrt initramfs and it can
be accesed via any of the LAN ports via SSH with the usual OpenWrt
default credentials.

2. Sysupgrade from OpenWrt initramfs:
* Copy openwrt-qualcommax-ipq807x-asus_rt-ax89x-squashfs-sysupgrade.bin to
/tmp/openwrt-qualcommax-ipq807x-asus_rt-ax89x-squashfs-sysupgrade.bin of
the running initramfs image.
* Simply sysupgrade -n /tmp/openwrt-qualcommax-ipq807x-asus_rt-ax89x-squashfs-sysupgrade.bin

After flashing the device will reboot with OpenWrt initramfs and it can
be accesed via any of the LAN ports via SSH with the usual OpenWrt
default credentials.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools: firmware-utils: update to Git HEAD (2024-06-30)
Robert Marko [Sun, 30 Jun 2024 10:51:04 +0000 (12:51 +0200)]
tools: firmware-utils: update to Git HEAD (2024-06-30)

0cfd1043e6c4 zytrx: add ZyXEL LTE7490-M904
3d09357fc7b5 asusuimage: new tool for creating TRX-images compatible with AsusWRT
f35781fcd2c3 asusuimage: fix compile error with old GCC release

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoimage: add recipe for legacy multiple images
Robert Marko [Wed, 26 Jun 2024 16:52:29 +0000 (18:52 +0200)]
image: add recipe for legacy multiple images

Asus RT-AX89X has modded U-Boot that boots FIT images fine when manually
using bootm command, however once the image is flashed and device boots via
the default bootcmd it only supports booting via legacy images.

More precisely, it requires the "multi" image format with:
1. kernel
2. ramdisk
3. DTB

So, lets add a recipe based on the existing uImage one.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agogeneric: add fix for AQR113 PMD Global Transmit Disable bit
Robert Marko [Sun, 11 Feb 2024 17:56:54 +0000 (18:56 +0100)]
generic: add fix for AQR113 PMD Global Transmit Disable bit

PMD Global Transmit Disable bit should be cleared for normal operation.
This should be HW default, however I found that on Asus RT-AX89X that uses
AQR113C PHY and firmware 5.4 this bit is set by default.

With this bit set the AQR cannot achieve a link with its link-partner and
it took me multiple hours of digging through the vendor GPL source to find
this out, so lets always clear this bit during .config_init() to avoid a
situation like this in the future.

aqr107_wait_processor_intensive_op() is moved up because datasheet notes
that any changes to this bit are processor intensive.

This is a modified version of patch that got merged upstream as AQR113C
has a separate config_init() upstream.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agofirmware: ipq-wifi: add Asus RT-AX89X BDF
Robert Marko [Mon, 26 Jun 2023 10:09:16 +0000 (12:09 +0200)]
firmware: ipq-wifi: add Asus RT-AX89X BDF

Include the Asus RT-AX89X BDF.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoqualcommax: ipq807x: enable QCA83XX PHY driver
Robert Marko [Sat, 10 Feb 2024 19:40:37 +0000 (20:40 +0100)]
qualcommax: ipq807x: enable QCA83XX PHY driver

Asus RT-AX89X has an external QCA8337 switch that has built-in
internal ethernet PHY-s that are supported by the QCA83XX PHY driver so
lets enable it.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoqualcommax: ipq807x: enable qca8k driver
Robert Marko [Sat, 10 Feb 2024 11:35:05 +0000 (12:35 +0100)]
qualcommax: ipq807x: enable qca8k driver

Asus RT-AX89X has an Qualcomm QCA8337 switch used to provide additional
1G copper ports, so lets enable qca8k in order to utilize DSA instead of
relying on SSDK for it.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoqualcommax: ipq807x: enable GPIO bitbanged MDIO
Robert Marko [Sat, 10 Feb 2024 16:19:54 +0000 (17:19 +0100)]
qualcommax: ipq807x: enable GPIO bitbanged MDIO

Asus RT-AX89X is using GPIO bitbanged MDIO on newer HW revisions, so lets
enable it in kernel config.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoqualcommax: ipq8074-ess: move switch to ess-instance node
Robert Marko [Thu, 29 Jun 2023 18:18:10 +0000 (20:18 +0200)]
qualcommax: ipq8074-ess: move switch to ess-instance node

It seems that newer SSDK is now expecting the switch node to be a subnode
of "ess-instance" node which also contains "num_devices" as the number of
switches as you can also have external switches connected.

Asus RT-AX89X is even more peculiar as its bootloader has a hardcoded path
to enable if on that revision there is an AQR113 connected to port 6 of the
switch.

So, lets move the current switch node under ess-instance as otherwise it
seems that SSDK is having some issues parsing the UNIPHY mode properly as
I am getting the following:
[    6.981404] _adpt_hppe_instance1_mode_get[3275]:ERROR:port 6 doesn't support port_interface_mode 9

Which should not happen as that port has the mode set to 13.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agokernel: qca-ssdk: set OF node for the SFP PHY
Robert Marko [Sun, 25 Jun 2023 09:29:24 +0000 (11:29 +0200)]
kernel: qca-ssdk: set OF node for the SFP PHY

Currently, SSDK is creating a fake SFP PHY which has no OF node populated,
thus making it impossible to pass it to NSS-DP so port can actually work.

We eliminated QCA-s connecting of the PHY by manually creating a string
and then matching by name and instead only support passing the PHY as
phandle via phy-handle.

So, lets just use the switch port node to which the SFP is connected to
anyway and set it as the PHY device OF node so we can pass it to NSS-DP.

Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoimage: exclude initramfs-images dependency with IB
Christian Marangi [Tue, 9 Jul 2024 02:41:21 +0000 (04:41 +0200)]
image: exclude initramfs-images dependency with IB

Exclude initramfs-images dependency with IB as the target is not defined
in such context.

Fixes: cc6a0abcabf7 ("image: make images and artifacts dependent of initramfs")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agotools: util-linux: disable NLS again
Robert Marko [Mon, 8 Jul 2024 18:47:01 +0000 (20:47 +0200)]
tools: util-linux: disable NLS again

It seems that util-linux enables NLS support by default, this worked for
almost all platforms except for macOS on x86 where it seems that libintl is
preinstalled and thus it will link against gettext with libintl for NLS
support.

This would the later cause e2fsprogs and mtd-utils to fail:
Undefined symbols for architecture x86_64:
  "_libintl_gettext", referenced from:
      _random_tell_source in libuuid.a[13](libuuid_la-randutils.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Issue appeared after I converted the tool to use --disable-all-programs and
accidentally dropped the --disable-nls from the args.

Fixes: 54115ec22d15 ("tools: util-linux: use --disable-all-programs")
Link: https://github.com/openwrt/openwrt/pull/15909
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoqualcommax: ipq807x: fix build error with no initramfs for RAX120v2
Christian Marangi [Mon, 8 Jul 2024 11:21:13 +0000 (13:21 +0200)]
qualcommax: ipq807x: fix build error with no initramfs for RAX120v2

Exclude additional initramfs image for Netgear RAX120v2 when no
initramfs image are compiled to fix build error.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoimage: make images and artifacts dependent of initramfs
Christian Marangi [Mon, 8 Jul 2024 11:10:52 +0000 (13:10 +0200)]
image: make images and artifacts dependent of initramfs

There is currently a BIG bug in how the images dependency is handled and
recent Per Device Rootfs made this more clear and less statistical.

There is currently no dependency between images/artifacts build with
initramfs build. This cause whatever additional image that depends on an
initramfs image to fail as it might happen that image and initramfs
build are called at the same time and the additional image is called
before initramfs build has finished.

Each image-command assume the source image to be taken from the /bin
directory but that is only copied from the /tmp directory only at the
end of the process.

Artifacts currently depends on image with the use of the
BOARD-NAME-images Makefile target, but this is not the case for
initramfs that also define a -images Makefile target but that is not
accounted in images (that might depend on some initramfs images)

To actually fix this, introduce a new Makefile target, -initramfs-images
and make image and artifacts build to depend on this. Since initramfs
images are optional, this dependency is actived only when initramfs
image are built.

With this change we correctly enforce the build order:
- Initramfs Images (optional)
- Images
- Artifacts

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: aldo fix CopyImage for Separate Initramfs
Christian Marangi [Sun, 7 Jul 2024 17:28:35 +0000 (19:28 +0200)]
kernel: aldo fix CopyImage for Separate Initramfs

Also fix CopyImage for Separate Initramfs with Per Device Rootfs.

Fixes: 7bffb3f72bbf ("kernel: fix CopyImage function with Per Device Rootfs")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: fix x86 compilation on macOS
Robert Marko [Mon, 8 Jul 2024 07:46:02 +0000 (09:46 +0200)]
kernel: fix x86 compilation on macOS

Trying to compile x86 or x86_64 on macOS will fail with:
openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.36/tools/include/linux/rbtree.h:21:10: fatal error: 'linux/stddef.h' file not found

After some digging, it seems that we dropped the old 212-tools_portability
patch when 6.6 x86 support was added, then Felix added back some parts of
it in ("kernel: fix tools build breakage on macos with x86") but trying to
build x86 kernels will still fail.

So, lets add more of the required changes from the 212-tools_portability
patch so that x86 kernels build on macOS.

Fixes: 69b145188f1a ("generic: 6.6: Removal of tools_portability.patch already included in kernel 6.6")
Link: https://github.com/openwrt/openwrt/pull/15904
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoreadline: fix pkgconfig usage
Rosen Penev [Thu, 4 Jul 2024 19:12:33 +0000 (12:12 -0700)]
readline: fix pkgconfig usage

ncurses is built with wide support enabled, which enables libncursesw.
The problem is, the ncurses build system only supplies ncursesw or
ncurses.pc but not both. The other problem is, the readline build tests
for libncurses before the w variant, making its pc file unusable as
there is no ncurses.pc file to satisfy the Required: ncurses section.

Just override the library.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15864
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoncurses: enable pc files in the host build
Rosen Penev [Thu, 4 Jul 2024 00:53:36 +0000 (17:53 -0700)]
ncurses: enable pc files in the host build

Needed for things such as readline that depend on ncurses.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15864
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/elfutils: simplify and cleanup Makefile
Michael Pratt [Thu, 20 Jun 2024 05:28:00 +0000 (01:28 -0400)]
tools/elfutils: simplify and cleanup Makefile

After changes to default host build recipes
and default variable definitions,
several custom definitions can be removed,
and the gnulib recipes replaced
with hooks to common recipes.

Also remove leftover PKG_INSTALL
which has no effect for host builds.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15853
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobuild: let HOST_CXXFLAGS default to HOST_CFLAGS
Michael Pratt [Thu, 20 Jun 2024 05:10:21 +0000 (01:10 -0400)]
build: let HOST_CXXFLAGS default to HOST_CFLAGS

Usage of g++ should mimic the usage of gcc,
otherwise, part of a binary or library may have
optimizations and part of it may not,
unbeknownst to the users or developers working on a build.
This can lead to some features like, for example, FORTIFY_SOURCE,
to have less of an effect or even cause a build error on some hosts.

Therefore, let HOST_CXXFLAGS default to HOST_CFLAGS.

Fixes: 87d489f67 ("build: add HOST_CXXFLAGS for host build")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15853
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobuild: add default host build recipes for gnulib
Michael Pratt [Thu, 20 Jun 2024 04:55:58 +0000 (00:55 -0400)]
build: add default host build recipes for gnulib

Add generic recipes for incorporating gnulib into a build
for simplification and readability of the individual build Makefile.

Recipes for configuring and installing are purposefully missing
since "configuring" gnulib is done with standard autoreconf
and gnulib is not a final build target meant for installing.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15853
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobuild: add support for PKG_SUBDIRS variable
Michael Pratt [Thu, 20 Jun 2024 04:23:39 +0000 (00:23 -0400)]
build: add support for PKG_SUBDIRS variable

Add support for overriding the SUBDIRS variable while invoking Make
by defining it after Make in the command line.

This is useful for builds that have previously patched out
the building of certain subdirectories in projects
that use recursive and independent Makefiles,
for example, to block the building of docs or test suites.

The wildcard function is used in the case of there being
subdirectories within any of the subdirectories,
for example, in the building of gengetopt,
in order to avoid the problem where Make will attempt
to execute a Makefile in a subdirectory that does not exist
within the subdirectory it is currently running from
because it really exists at the top-level, or one that exists
within one of the subdirectories when ran from top-level.
There are also cases where the Makefiles in the subdirectories
have the recursive building rules even though there are no more
subdirectories beyond that point, for example, with gnulib.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15853
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/elfutils: remove header symlink between subdirectories
Michael Pratt [Wed, 15 May 2024 23:43:00 +0000 (19:43 -0400)]
tools/elfutils: remove header symlink between subdirectories

Replace the symlink in the build recipe for gnulib
with an extra include path flag in CPPFLAGS to the lib subdirectory
so that it is the last in the order of include paths,
and use a quote escape to make the flag a literal string
in order to use Make variables within it.

The original reason this is necessary is because the config.h header
provided by the project at the top-level build directory
calls another header eu-config.h
which is stored in the lib subdirectory instead of the top-level,
and building the gnulib library requires the config.h header.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15853
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agokernel: bump 6.1 to 6.1.97
Zxl hhyccc [Fri, 5 Jul 2024 18:29:52 +0000 (02:29 +0800)]
kernel: bump 6.1 to 6.1.97

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

All patches automatically rebased.

Build system: Kirkwood bcm53xx

Signed-off-by: Zxl hhyccc <zxlhhy@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15883
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agoprocd: bump to git HEAD
Daniel Golle [Sun, 7 Jul 2024 20:25:22 +0000 (21:25 +0100)]
procd: bump to git HEAD

 f230c11 utils: use strlcpy when appropriate
 a8cf548 jail: fix copy & paste error in parseOCIlinux()
 1e411a5 utils: get_cmdline_val: add missing error check

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agokernel: fix CopyImage function with Per Device Rootfs
Christian Marangi [Sun, 7 Jul 2024 16:24:24 +0000 (18:24 +0200)]
kernel: fix CopyImage function with Per Device Rootfs

Some target define custom kernel images with KERNEL_INITRAMFS_NAME to
reference .elf variant of vmlinux.

With Per Device Rootfs, the expected format is
image.suffix.extension.ROOTFS_ID, while in CopyImage we are currently
generating images with image.suffix.ROOTFS_ID.extension making some
target failing.

Fix CopyImage function to correctly follow the expected pattern.

Fixes: 97fd059e7e6a ("image: respect TARGET_PER_DEVICE_ROOTFS for initramfs")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agomediatek: fit: fix use of uninitialized variable
Qingfang Deng [Fri, 28 Jun 2024 09:01:00 +0000 (17:01 +0800)]
mediatek: fit: fix use of uninitialized variable

When building the kernel with -Wmaybe-uninitialized, GCC reports this
warning:

block/partitions/fit.c: In function 'parse_fit_partitions':
block/partitions/fit.c:164:3: warning: 'images' may be used uninitialized in this function [-Wmaybe-uninitialized]
  164 |   printk(KERN_ERR "FIT: Cannot find %s node: %d\n", FIT_CONFS_PATH, images);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It appears to be a copy paste error. It's the "config" variable that is
supposed to be printed.

Fixes: e6aac8d98f56 ("image: add support for building FIT image with filesystem")
Signed-off-by: Qingfang Deng <qingfang.deng@siflower.com.cn>
5 months agokernel: mtdsplit: fix fit rootfs_data split
Chuanhong Guo [Fri, 28 Jun 2024 08:31:59 +0000 (16:31 +0800)]
kernel: mtdsplit: fix fit rootfs_data split

fit size should be rounded up instead of rounding down first and adding
a block. Otherwise the calculated size is one block more than needed
when fit size is exactly multiples of one block size.

Fixes: 9a863f803ec1 ("kernel: mtdsplit: add support for FIT image")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Qingfang Deng <qingfang.deng@siflower.com.cn>
5 months agolantiq: replace gswip patches with upstream version
Martin Schiller [Wed, 26 Jun 2024 08:39:18 +0000 (10:39 +0200)]
lantiq: replace gswip patches with upstream version

Replace recently added patches with version accepted upstream.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agolantiq: remove 6.1 kernel support
Martin Schiller [Wed, 26 Jun 2024 08:18:27 +0000 (10:18 +0200)]
lantiq: remove 6.1 kernel support

Since 6.6 is now default, drop 6.1 support.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agolantiq: switch to kernel 6.6
Martin Schiller [Wed, 26 Jun 2024 08:16:31 +0000 (10:16 +0200)]
lantiq: switch to kernel 6.6

Let's switch the lantiq target to use kernel 6.6 by default.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agogeneric: 6.6: backport fix for broken cmdline "nosmp" and "maxcpus=0"
Martin Schiller [Mon, 1 Jul 2024 09:41:36 +0000 (11:41 +0200)]
generic: 6.6: backport fix for broken cmdline "nosmp" and "maxcpus=0"

This backports the fix for the broken "nosmp" and "maxcpus=0" cmdline
params.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agokernel: ltq-adsl: fix enum missmatch on linux 6.6
Martin Schiller [Tue, 2 Jul 2024 07:34:37 +0000 (09:34 +0200)]
kernel: ltq-adsl: fix enum missmatch on linux 6.6

Convert DSL_XTUDir_t to DSL_AccessDir_t to get rid of enum-conversion
warning.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agoltq-tapi: fix build with Linux 6.6
Daniel Golle [Fri, 28 Jun 2024 02:06:08 +0000 (03:06 +0100)]
ltq-tapi: fix build with Linux 6.6

Satisfy compiler expectations in a hell of typedef's and get rid of
system-wide workqueue flush. Results in warning-free compile of the TAPI
driver also with Linux 6.6.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agolantiq: remove 5.15 kernel support
Martin Schiller [Wed, 26 Jun 2024 08:14:49 +0000 (10:14 +0200)]
lantiq: remove 5.15 kernel support

Since 6.1 is now default, drop 5.15 support.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agokernel: skip rebuilding kernel with ROOTFS_INITRAMFS_SEPARATE
Christian Marangi [Sat, 6 Jul 2024 11:40:40 +0000 (13:40 +0200)]
kernel: skip rebuilding kernel with ROOTFS_INITRAMFS_SEPARATE

With PER_DEVICE_ROOTFS, rebuilding kernel is needed to embed the cpio
image in the kernel image. With ROOTFS_INITRAMFS_SEPARATE, the cpio
image is external hence we can reuse the same kernel image without
rebuilding it.

Link: https://github.com/openwrt/openwrt/pull/12959
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoimage: respect TARGET_PER_DEVICE_ROOTFS for initramfs fit command
Christian Marangi [Fri, 5 Jul 2024 16:17:44 +0000 (18:17 +0200)]
image: respect TARGET_PER_DEVICE_ROOTFS for initramfs fit command

Fit command makes use of CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE as the
cpio is provided externally and is not embedded in the kernel image.

As done with embedded cpio, also handle PER_DEVICE_ROOTFS by generating
a cpio for each rootfs and reference them by the ROOTFS_ID generated
previously. The generated cpio are placed in the linux directory + the
package ID.

Link: https://github.com/openwrt/openwrt/pull/12959
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoimage: respect TARGET_PER_DEVICE_ROOTFS for initramfs
Luiz Angelo Daros de Luca [Wed, 21 Jun 2023 23:02:47 +0000 (20:02 -0300)]
image: respect TARGET_PER_DEVICE_ROOTFS for initramfs

Initramfs images were using a common rootfs (TARGET_DIR) for all
devices, ignoring TARGET_PER_DEVICE_ROOTFS. If a single device required
a package to build a functional initramfs image, it should be included
by default for all devices or that device should be isolated into a new
subtarget. Now the initramfs will be built using the target-specific

Implementing Per Device Rootfs for Initramfs is not trivial as the
rootfs needs to be embedded in the kernel image. The kernel supports an
option to define the initramfs location and the image generation for the
kernel can't be run in parallel as other checks are done to config and
other arch dependent files.

To handle this, we prepare a config for each rootfs and we generate the
images under lock to prevent problem with parallel execution.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
[ rework implementation for locking support ]
Link: https://github.com/openwrt/openwrt/pull/12959
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: simplify SetInitramfs compression ALGO config setup
Christian Marangi [Fri, 5 Jul 2024 12:58:20 +0000 (14:58 +0200)]
kernel: simplify SetInitramfs compression ALGO config setup

Simplify SetInitramfs compression ALGO config setup by using Makefile
foreach.
While at it also make it more readable.

Link: https://github.com/openwrt/openwrt/pull/12959
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: make LINUX_DIR configurable for SetInitramfs functions
Christian Marangi [Fri, 5 Jul 2024 12:37:18 +0000 (14:37 +0200)]
kernel: make LINUX_DIR configurable for SetInitramfs functions

Rework SetInitramfs functions to take a second arg to define the
location of the .config. This is needed in preparation for PER_ROOTFS
Initramfs support as we will prepare .config in dedicated directory and
use them only later when the image is actually built.

Link: https://github.com/openwrt/openwrt/pull/12959
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: allow different TARGET_DIR for initramfs
Luiz Angelo Daros de Luca [Thu, 3 Aug 2023 22:05:13 +0000 (19:05 -0300)]
kernel: allow different TARGET_DIR for initramfs

Allow Kernel/CompileImage/Initramfs to use a different rootfs location.
If the additional arg is not defined, TARGET_DIR is used by default.

This allows the caller to customize the kernel initramfs for different
rootfs.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
[ simplify commit and rework commit description ]
Link: https://github.com/openwrt/openwrt/pull/12959
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agogeneric: 6.6: mtk_eth_soc: add support for flow-control settings
Daniel Golle [Thu, 4 Jul 2024 01:19:01 +0000 (02:19 +0100)]
generic: 6.6: mtk_eth_soc: add support for flow-control settings

Add patch implementing operations to get and set flow-control link
parameters of mtk_eth_soc via ethtool.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agogeneric: 6.6: mtk_eth_soc: import accepted patches
Daniel Golle [Sat, 6 Jul 2024 03:02:31 +0000 (04:02 +0100)]
generic: 6.6: mtk_eth_soc: import accepted patches

Import two imported patches accepted upstream.
Move from pending:
 - net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops

Initial import:
 - net: ethernet: mtk_ppe: Change PPE entries number to 16K

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agobcm27xx: update to latest RPi patches
Álvaro Fernández Rojas [Wed, 3 Jul 2024 18:30:59 +0000 (20:30 +0200)]
bcm27xx: update to latest RPi patches

The patches were generated from the RPi repo with the following command:
git format-patch v6.6.36..rpi-6.6.y

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agomediatek: filogic: openwrt,one: remove unneeded caldata extraction
Daniel Golle [Fri, 5 Jul 2024 02:50:52 +0000 (03:50 +0100)]
mediatek: filogic: openwrt,one: remove unneeded caldata extraction

WiFi calibration data is already obtained via in-kernel NVMEM framework.
There is no need to also do so in userspace.

Fixes: dd58ad968a ("mediatek/filogic: add OpenWrt One support")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agomediatek: filogic: add missing ';;' in /etc/board.d/01_leds
Daniel Golle [Fri, 5 Jul 2024 02:48:12 +0000 (03:48 +0100)]
mediatek: filogic: add missing ';;' in /etc/board.d/01_leds

Add missing ';;' to terminate switch-case script generating
board-specific LED configuration defaults.

Fixes: c71b68acdd ("mediatek: filogic: add Adtran SmartRG Mount Stuart series")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agoramips: gpio: convert to the generic GPIO driver
Shiji Yang [Fri, 28 Jun 2024 07:36:13 +0000 (15:36 +0800)]
ramips: gpio: convert to the generic GPIO driver

Drop most of the code in favor of the generic MMIO GPIO driver.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agoramips: gpio: use devm_platform_ioremap_resource()
Shiji Yang [Fri, 28 Jun 2024 07:36:13 +0000 (15:36 +0800)]
ramips: gpio: use devm_platform_ioremap_resource()

Simplify the code.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agoramips: gpio: remove header "gpio.h"
Shiji Yang [Fri, 28 Jun 2024 07:36:13 +0000 (15:36 +0800)]
ramips: gpio: remove header "gpio.h"

There are no source files using it.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agoramips: gpio: always use dynamic GPIO numberspace base
Shiji Yang [Fri, 28 Jun 2024 07:36:13 +0000 (15:36 +0800)]
ramips: gpio: always use dynamic GPIO numberspace base

The new numberspace base starts from 512 instead of 0. The number
base seems come from the kernel symbol CONFIG_GPIOLIB_FASTPATH_LIMIT.

Suppress warning:

gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agoramips: mt7621: fix GPIO switch pin number
Shiji Yang [Fri, 28 Jun 2024 07:36:13 +0000 (15:36 +0800)]
ramips: mt7621: fix GPIO switch pin number

The numberspace base has been changed since 6.6 kernel:

chip_num   chip0   chip1   chip2 (32 gpios per bank)
old base    480     448     416
new base    512     544     576

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agomediatek: filogic: add support for TP-LINK RE6000XD
Dirk Buchwalder [Fri, 17 May 2024 15:33:00 +0000 (17:33 +0200)]
mediatek: filogic: add support for TP-LINK RE6000XD

This commit adds support for TP-LINK RE6000XD.
The device is quite similar to the Mercusys MR90X V1,
except only 3 LAN ports and more LEDs.
So thanks to csharper2005 for doing all the groundwork.

Device specification
--------------------
SoC Type:   MediaTek MT7986BLA, Cortex-A53, 64-bit
RAM:        MediaTek MT7986BLA (512MB)
Flash:      SPI NAND GigaDevice (128 MB)
Ethernet:   MediaTek MT7531AE + 2.5GbE MaxLinear GPY211C0VC (SLNW8)
Ethernet:   1x2.5Gbe (LAN3 2.5Gbps), 2xGbE (LAN 1Gbps, LAN1,
            LAN2)
WLAN 2g:    MediaTek MT7975N, b/g/n/ax, MIMO 4x4
WLAN 5g:    MediaTek MT7975P(N), a/n/ac/ax, MIMO 4x4
LEDs:       8 LEDs, 1 status blue, 2x WIFI blue, 2x signal
    blue/red, 3 LAN blue gpio-controlled
Button:     2 (Reset, WPS)
USB ports:  No
Power:      12 VDC, 2 A
Connector:  Barrel
Bootloader: Main U-Boot - U-Boot 2022.01-rc4. Additionally, ubi0
            partition contain "seconduboot" (also U-Boot 2022.01-rc4)

Serial console (UART), unpopulated
---------------------
                            V
+-------+-------+-------+-------+
| +3.3V |  GND  |  TX   |  RX   |
+---+---+-------+-------+-------+
    |
    +--- Don't connect

Disassemble: rm the 2 screws at the bottom and the one at the backside.
            un-clip the case starting at the edge above the LEDs.

Installation (UART)
-------------------
1. Place OpenWrt initramfs image on tftp server with IP 192.168.1.2
2. Attach UART, switch on the router and interrupt the boot process by
   pressing 'Ctrl-C'
3. Load and run OpenWrt initramfs image:
      tftpboot openwrt-mediatek-filogic-tplink_re6000xd-initramfs-kernel.bin bootm
4. Run 'sysupgrade -n' with the sysupgrade OpenWrt image

Notice: while I was successfull at activating ssh (as described
        here:
        https://www.lisenet.com/2023/gaining-ssh-access-to-tp-link-re200-wi-fi-range-extender/)

        Unfortunately I haven't found the correct root password.
        Looks like they are using a static password
        (md5crypt, salt + 21 characters) that is not the web
        interface admin password.

        The TP-LINK RE900XD looks like the very same device,
        according to the pictures and the firmware.
        But I haven't checked if the OpenWrt firmware works as well
        on that device.

        The second ubi partition (ubi1) is empty and there is no known
        dual-partition mechanism, neither in u-boot nor in the stock firmware.

Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
5 months agokernel: bump 6.6 to 6.6.36
John Audia [Thu, 27 Jun 2024 17:56:04 +0000 (13:56 -0400)]
kernel: bump 6.6 to 6.6.36

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

Manually rebased:
        generic/hack-6.6/765-mxl-gpy-control-LED-reg-from-DT.patch
        bcm27xx/patches-6.6/950-0536-dmaengine-dw-axi-dmac-Fixes-for-RP1.patch

Removed upstreamed:
bmips/patches-6.6/010-v6.10-mips-bmips-BCM6358-make-sure-CBR-is-correctly-set.patch[1]

All other patches automatically rebased.

1. https://github.com/openwrt/openwrt/commit/7c9644a7b5e557f05b818296287cdebdd38f1097

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>
5 months agokernel: bump 6.1 to 6.1.96
Zxl hhyccc [Thu, 27 Jun 2024 15:13:11 +0000 (23:13 +0800)]
kernel: bump 6.1 to 6.1.96

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

Manually rebased:
generic/hack-6.1/765-mxl-gpy-control-LED-reg-from-DT.patch
reference:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/net/phy/mxl-gpy.c?h=v6.1.96&id=5bd1b7ab6ae5799c136e4319d8644c5ff9c71757

generic: Fix spelling in dmesg output during boot when using the fitblk driver.

generic/pending-6.1/510-block-add-uImage.FIT-subimage-block-driver.patch

All other patches automatically rebased.

Build system: Kirkwood bcm53xx

Signed-off-by: Zxl hhyccc <zxlhhy@gmail.com>
5 months agouboot-rockchip: Update to 2024.07
Tianling Shen [Wed, 3 Jul 2024 10:41:10 +0000 (18:41 +0800)]
uboot-rockchip: Update to 2024.07

Re-enable FIT signature verification since we switched to use hyphen
for node name separators in commit 2b133ab19cd5 ("scripts: use sep-char for hash nodes").

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
5 months agouboot-envtools: update to U-Boot release v2024.07
Shiji Yang [Thu, 4 Jul 2024 10:39:35 +0000 (18:39 +0800)]
uboot-envtools: update to U-Boot release v2024.07

Remove upstreamed patches:
010-fw_env-fix-reading-NVMEM-device-s-compatible-value.patch
[commit f29c5ca33df4c77b9af2cbfb7ed90bf336613522]

011-fw_env-keep-calling-read-until-whole-flash-block-is-.patch
[commit 9e3003f79d168eac7ee65cd457e3904e2fb4eea8]

012-fw_env-autodetect-NAND-erase-size-and-env-sectors.patch
[commit d73a6641868029b5cae53ed00c5766921c9d8b1f]

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agotools: mkimage: update to U-Boot release v2024.07
Shiji Yang [Thu, 4 Jul 2024 10:39:35 +0000 (18:39 +0800)]
tools: mkimage: update to U-Boot release v2024.07

Update to latest version.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agobcm47xx: drop 6.1 support
Mieczyslaw Nalewaj [Mon, 17 Jun 2024 05:57:59 +0000 (07:57 +0200)]
bcm47xx: drop 6.1 support

Drop configs, files and patches for Linux 6.1.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15635
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobcm47xx: use kernel 6.6 by default
Mieczyslaw Nalewaj [Wed, 5 Jun 2024 16:25:59 +0000 (18:25 +0200)]
bcm47xx: use kernel 6.6 by default

Switch to Linux kernel version 6.6.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15635
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobcm47xx: remove old cache aliasing patches
Mieczyslaw Nalewaj [Tue, 2 Jul 2024 17:31:42 +0000 (19:31 +0200)]
bcm47xx: remove old cache aliasing patches

Remove patches related to some ancient cache aliasing bugs that were fixed in earlier versions and are no longer relevant to us.

Co-authored-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15635
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agogeneric: gpio: fix broken GPIO for big endian CPUs
Shiji Yang [Thu, 4 Jul 2024 10:35:50 +0000 (18:35 +0800)]
generic: gpio: fix broken GPIO for big endian CPUs

Align the "bgpio_bits" with the data bus width.

Fixes: https://github.com/openwrt/openwrt/issues/15739
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Suggested-By: Mark Mentovai <mark@mentovai.com>
Tested-by: Lóránd Horváth <lorand.horvath82@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15784
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoath79: suppress GPIO static base allocation warning
Shiji Yang [Thu, 4 Jul 2024 10:35:50 +0000 (18:35 +0800)]
ath79: suppress GPIO static base allocation warning

Silence ath79 GPIO driver warning by setting GPIO numberspace base
dynamically. This patch also reorganize and fix the GPIO numbers on
6.6 kernel. The new gpio chip base number algorithm:

gpiochip    ath79-SOC    ath9k-0       ath9k-1
base           512      512+ngpios   512+ngpios+10

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/15784
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoath79: fix 5GHz External Antenna A GPIO for BSAP-1840
Shiji Yang [Thu, 4 Jul 2024 10:35:50 +0000 (18:35 +0800)]
ath79: fix 5GHz External Antenna A GPIO for BSAP-1840

Each ath9k device only has 10 gpios. ath9k-0 gpio number range is
502-511, and ath9k-1 gpio number range is 492-501. So "5GHz External
Antenna A" gpio line number should be 492 instead of 489.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/15784
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoath79: correct dts ngpios properties
Shiji Yang [Thu, 4 Jul 2024 10:35:50 +0000 (18:35 +0800)]
ath79: correct dts ngpios properties

SoC Model GPIO number

ar7100 12
ar7240 18(unknown, default)
ar7241 20
ar7242 18
ar9132 22(unknown, default)
ar9331 30
ar934x 23
qca953x 18
qca955x 24
qca956x 23

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/15784
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agouboot-rockchip: use u-boot-rockchip.bin
FUKAUMI Naoki [Wed, 3 Jul 2024 09:02:32 +0000 (18:02 +0900)]
uboot-rockchip: use u-boot-rockchip.bin

use u-boot-rockchip.bin to copy SPL/TPL/U-Boot to the image.

since binman was used in mainline u-boot for rockchip, we can use
u-boot-rockchip.bin instead of idbloader.img and u-boot.itb.

Reviewed-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://github.com/openwrt/openwrt/pull/15815
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoipq40xx: add BDFs for Linksys WHW03 V1
Rodrigo Balerdi [Sun, 30 Jun 2024 22:45:43 +0000 (19:45 -0300)]
ipq40xx: add BDFs for Linksys WHW03 V1

BDFs come from latest firmware, version 1.1.19.209880 (2022-06-20):
- /lib/firmware/IPQ4019/v1/FCC/boardData_1_0_IPQ4019_DK04_2G.bin
- /lib/firmware/IPQ4019/v1/FCC/boardData_1_0_IPQ4019_DK04_5G.bin
- /lib/firmware/QCA9888/v1/FCC/boardData_2_0_QCA9888_5G_Y9690_SBS_HB.bin

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15844
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoipq-wifi: update to Git HEAD (2024-06-30)
Rodrigo Balerdi [Sun, 30 Jun 2024 22:23:52 +0000 (19:23 -0300)]
ipq-wifi: update to Git HEAD (2024-06-30)

f54581d ipq6018: add BDF for Edgecore EAP101
6df42f9 ipq40xx: add BDFs for Linksys WHW03 V1
e82cba7 ipq8074: add TP-Link EAP660 HD v1 BDF

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15844
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobcm27xx: base-files: diag: improve LEDs behaviour
Álvaro Fernández Rojas [Wed, 3 Jul 2024 18:56:56 +0000 (20:56 +0200)]
bcm27xx: base-files: diag: improve LEDs behaviour

As reported in https://github.com/openwrt/openwrt/issues/15834 using the PWR
LED for indicating diag status is confusing since this is usually used for
power supply failures on RPi devices.
This commit uses ACT LED for diag status and restores it to mmc activity.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agokernel: Add kmod-sctp-diag
Hauke Mehrtens [Sat, 29 Jun 2024 16:28:40 +0000 (18:28 +0200)]
kernel: Add kmod-sctp-diag

Package the sctp_diag.ko file which already gets build when kmod-sctp
and kmod-inet-diag are selected.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/15833
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: Add kmod-mfd
Hauke Mehrtens [Sat, 29 Jun 2024 16:23:13 +0000 (18:23 +0200)]
kernel: Add kmod-mfd

Package the mfd-core.ko kernel module. It is selected by the
kmod-hwmon-gsc already.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/15833
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: Add mtd_nandbiterrs.ko to kmod-mtdtests
Hauke Mehrtens [Sat, 29 Jun 2024 16:01:56 +0000 (18:01 +0200)]
kernel: Add mtd_nandbiterrs.ko to kmod-mtdtests

The mtd_nandbiterrs.ko kernel module was added with kernel 3.7. We
should package it like the other test modules.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/15833
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: Add kmod-crypto-xxhash
Hauke Mehrtens [Sat, 29 Jun 2024 16:14:47 +0000 (18:14 +0200)]
kernel: Add kmod-crypto-xxhash

kxxhash_generic.ko is a soft dependency of kmod-fs-btrfs, but we did not
package it. Extract the kmod-lib-xxhash and then package
xxhash_generic.ko.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/15833
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: Add kmod-crypto-blake2b
Hauke Mehrtens [Sat, 29 Jun 2024 15:38:46 +0000 (17:38 +0200)]
kernel: Add kmod-crypto-blake2b

The kmod-fs-btrfs package has a soft dependency to kmod-crypto-blake2b

The CONFIG_BTRFS_FS kernel build option selects CONFIG_CRYPTO_BLAKE2B,
but we did not package it before.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/15833
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: Fix kmod-lib-lz4 packaging
Hauke Mehrtens [Sat, 29 Jun 2024 15:54:49 +0000 (17:54 +0200)]
kernel: Fix kmod-lib-lz4 packaging

The kernel provides two variants of the lz4 compression a normal version
and a high compression mode version. The old kmod-lib-lz4 package
contained the normal version plus one part of the lz4hc version. There
was already code which selected the kmod-lib-lz4hc package which did
not exists.

I split this into 3 packages. kmod-lib-lz4 and kmod-lib-lz4hc for the
normal the and high compression algorithm which contain the specific
code and the kmod-lib-lz4-decompress which contains the common
decompressor.

New we are also packaging lz4hc.ko

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/15833
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agokernel: Extract kmod-nf-dup-inet
Hauke Mehrtens [Sat, 29 Jun 2024 15:24:09 +0000 (17:24 +0200)]
kernel: Extract kmod-nf-dup-inet

The nf_dup_ipv4.ko and nf_dup_ipv6.ko kernel module were packaged by
kmod-ipt-tee and kmod-nft-dup-inet at the same time. Extract them into a
separate package used by both.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/15833
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agobuild: fix missing SOURCE_VERSION variable
Michael Pratt [Wed, 3 Jul 2024 07:15:46 +0000 (03:15 -0400)]
build: fix missing SOURCE_VERSION variable

The recipe Download/git-kernel uses DownloadMethod/git
which now requires a definition of SOURCE_VERSION instead of VERSION
due to Validate/git being used to check for the variables.

Rename the variable as intended to match with the others
that were renamed in the referenced commit.
This fixes the following Makefile parse error
when downloading a specific kernel repository version
when configured with the CONFIG_KERNEL_GIT_CLONE_URI option:

  Makefile:19: *** Download/git-kernel is missing the SOURCE_VERSION field..  Stop.

Fixes: 9fc79e2e2 ("download: don't overwrite VERSION variable")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15858
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agotarget.mk: fix arm architecture level detection
Lu jicong [Tue, 2 Jul 2024 13:01:49 +0000 (21:01 +0800)]
target.mk: fix arm architecture level detection

Now kernel configs of armv6k CPUs don't include CONFIG_CPU_V6.
So armv6k CPUs cannot be detected as arm_v6.
Fix this by adding detection for CONFIG_CPU_V6K.

Signed-off-by: Lu jicong <jiconglu58@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15855
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agof2fs-tools: Add missing 'f2fslabel' symlink
Sean Khan [Mon, 1 Jul 2024 17:59:45 +0000 (13:59 -0400)]
f2fs-tools: Add missing 'f2fslabel' symlink

`f2fslabel` is already built into `f2fs.fsck`, but is missing its symlink
in the final package.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/15851
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agowifi-scripts: add missing dependency on ucode-mod-uci
Stijn Tintel [Tue, 2 Jul 2024 22:40:15 +0000 (01:40 +0300)]
wifi-scripts: add missing dependency on ucode-mod-uci

Fixes the following error:

Syntax error: Unable to resolve path for module 'uci'
In line 3, byte 27:

 `import * as uci from 'uci';`
  Near here ----------------^

Fixes: 4a3ed518b2d0 ("wifi-scripts: rewrite wifi detect code in ucode")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 months agotools/e2fsprogs: fixup STAGING_DIR_HOST path evaluation in shell scripts
Robert Marko [Tue, 2 Jul 2024 09:14:17 +0000 (11:14 +0200)]
tools/e2fsprogs: fixup STAGING_DIR_HOST path evaluation in shell scripts

We have to use curly braces on the exported STAGING_DIR_HOST env variable,
instead of evaluating it directly as we are not in Make but a separate
shell script.

Otherwise it would fail with:
staging_dir/host/bin/compile_et: line 6: STAGING_DIR_HOST: command not found
staging_dir/host/bin/mk_cmds: line 5: STAGING_DIR_HOST: command not found

And so when krb5 tries to build it will fail as compile_et and mk_cmds will
return an error.

Fixes: 55bda9863dd0 ("tools/e2fsprogs: fix shell scripts under SDK")
Link: https://github.com/openwrt/openwrt/pull/15854
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/util-linux: build libuuid as PIC
Rosen Penev [Mon, 1 Jul 2024 23:48:45 +0000 (16:48 -0700)]
tools/util-linux: build libuuid as PIC

Needed to fix users of libuuid.a as autoconf applies PIC to only shared
libraries by default.

Found when trying to build python3/host.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15852
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoramips: remove useless compatible strings from SoC dtsi
Shiji Yang [Fri, 28 Jun 2024 07:50:57 +0000 (15:50 +0800)]
ramips: remove useless compatible strings from SoC dtsi

These removed compatible strings do not exist in the source code
nor the dt-binding documents. They are useless.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agogeneric: 6.6: net: ethernet: mediatek: Allow gaps in MAC allocation
Daniel Golle [Mon, 1 Jul 2024 19:37:58 +0000 (20:37 +0100)]
generic: 6.6: net: ethernet: mediatek: Allow gaps in MAC allocation

Some devices with MediaTek SoCs don't use the first but only the second
MAC in the chip. Especially with MT7981 which got a built-in 1GE PHY
connected to the second MAC this is quite common.
Make sure to reset and enable PSE also in those cases by skipping gaps
using 'continue' instead of aborting the loop using 'break'.

Fixes: 75081235b8 ("generic: 6.6: (re-)add support multiple PPE to mtk_eth_soc")
Reported-by: Daniel Suchy <danny@danysek.cz>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agobmips: enet: restore netif_napi_add weight
Álvaro Fernández Rojas [Mon, 1 Jul 2024 17:01:47 +0000 (19:01 +0200)]
bmips: enet: restore netif_napi_add weight

Switch to netif_napi_add_weight and add back weight value from <= v5.15.

Fixes: 8f6033e287ea ("bmips: enet: add compatibility with kernel 6.1")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agogeneric: fitblk: typo in dmesg output
Daniel Golle [Fri, 28 Jun 2024 02:39:45 +0000 (03:39 +0100)]
generic: fitblk: typo in dmesg output

Fix spelling in dmesg output during boot when using the fitblk driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agopistachio: Fix setting mtd name
Hauke Mehrtens [Wed, 26 Jun 2024 22:12:43 +0000 (00:12 +0200)]
pistachio: Fix setting mtd name

The bootloader provides the partition table using the boot arguments
and uses the name spi-nor and spi-nand for the different controllers.
The old code was not setting the name any more because mtd->name was
already set before. Move the setting of the name to the spi-mem code
now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agopistachio: Update to kernel 6.6
Hauke Mehrtens [Tue, 28 May 2024 21:28:40 +0000 (23:28 +0200)]
pistachio: Update to kernel 6.6

Refresh the patches and the configuration for kernel 6.6 and make
directly use of it.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agokernel/pistachio: Restore kernel files for v6.1
Hauke Mehrtens [Tue, 28 May 2024 21:07:43 +0000 (23:07 +0200)]
kernel/pistachio: 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.

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

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agokernel/pistachio: Create kernel files for v6.6 (from v6.1)
Hauke Mehrtens [Tue, 28 May 2024 21:07:43 +0000 (23:07 +0200)]
kernel/pistachio: Create kernel files for v6.6 (from v6.1)

This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agokernel: bump 5.15 to 5.15.161
Hauke Mehrtens [Sat, 29 Jun 2024 14:38:42 +0000 (16:38 +0200)]
kernel: bump 5.15 to 5.15.161

No manual changes needed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agokernel: bump 5.15 to 5.15.160
Hauke Mehrtens [Sun, 26 May 2024 16:49:49 +0000 (18:49 +0200)]
kernel: bump 5.15 to 5.15.160

No manual changes needed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agokernel: bump 5.15 to 5.15.159
Hauke Mehrtens [Sun, 26 May 2024 11:47:33 +0000 (13:47 +0200)]
kernel: bump 5.15 to 5.15.159

Removed because they are upstream:
   generic/pending-5.15/778-net-l2tp-drop-flow-hash-on-forward.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=e97e0051056b6dbcc43ae1862dcfcb05d06517c3

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agohostapd: bump PKG_RELEASE
David Bauer [Thu, 27 Jun 2024 20:59:50 +0000 (22:59 +0200)]
hostapd: bump PKG_RELEASE

Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agohostapd: don't ignore probe-requests with invalid DSSS params
David Bauer [Thu, 27 Jun 2024 20:58:56 +0000 (22:58 +0200)]
hostapd: don't ignore probe-requests with invalid DSSS params

Don't ignore probe requests which contain an invalid DS parameter for the
current operating channel.

As the comment outlines, the drop shall only apply if
dot11RadioMeasurementActivated is set to 1.

However, it was observed Linux clients (Debian 12 / NixOS 23.11)
with an Intel 8265 NIC may generate a probe request frame with
dot11RadioMeasurementActivated set to false and an invalid DSSS
parameter.

These were also dropped even though they should not have been. They
however should not have contained this parameter in the first place.

Don't drop Probe Requests which contain such an invalid field. This may
lead to more probe responses being sent, however it does fix very
frequent connection issues for these clients on 2.4 GHz.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agomalta: enable VM targets again
Paul Spooren [Tue, 18 Jun 2024 09:56:10 +0000 (11:56 +0200)]
malta: enable VM targets again

These targets are interesting for automated testing. The currently
available targets are from 2017 and either we should enable them again
or delete the remaining files on the download servers.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Link: https://github.com/openwrt/openwrt/pull/15740
Link: https://github.com/openwrt/openwrt/pull/15740
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agotools/e2fsprogs: fix shell scripts under SDK
Rosen Penev [Sun, 30 Jun 2024 16:08:40 +0000 (09:08 -0700)]
tools/e2fsprogs: fix shell scripts under SDK

7c32295b0036be425ba0cd527eb06316a87d0ec0 exposed a problem where the SDK
builds these shell scripts with a nonsensical absolute path for the DIR
variable. Use sed to patch in $STAGING_DIR_HOST.

Also remove PKG_RELEASE as that is nonsensical for tools.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15841
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoipq40xx: habanero-dvk: fix LAN MAC adresses
Robert Marko [Sun, 30 Jun 2024 09:08:16 +0000 (11:08 +0200)]
ipq40xx: habanero-dvk: fix LAN MAC adresses

Currently, only the WAN MAC is being populated on Habanero DVK, and that is
happening via the ethernet1 alias so U-Boot does it, previously ethernet0
was implicitly added in the SoC DTSI so it would populate the LAN MAC-s but
it was dropped(rightly so) so now LAN MAC-s and the GMAC one are random.

So, lets simply switch to using NVMEM to assign the proper MAC adresses.

Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoipq40xx: ipqess: do not free ipqess_init
John Thomson [Sat, 29 Jun 2024 22:45:47 +0000 (08:45 +1000)]
ipq40xx: ipqess: do not free ipqess_init

If this function is marked as __init, kernel will splat when driver is
(re)bind
echo "c080000.ethernet">/sys/bus/platform/drivers/ipqess-edma/unbind
echo "c080000.ethernet">/sys/bus/platform/drivers/ipqess-edma/bind

Example with additional print messages, functions at boot:
[    2.039468] ipqess-edma c080000.ethernet: ipqess_axi_probe pre register_netdev
[    2.039530] ipqess-edma c080000.ethernet: *netdev: c27d2000
[    2.045609] ipqess-edma c080000.ethernet: &ipqess_init: c0d1e28c
[    2.051122] ipqess_init
[    2.057338] netdev: c27d2000
[    2.059492] ess = netdev_priv: c27d2500
[    2.062615] ess->pdev: c2138c00
[    2.066174] ess->pdev->dev: c2138c10
[    2.069314] ess->pdev->dev.of_node: ef6f6368
[    2.073120] ess->pdev->dev.of_node: /soc/ethernet@c080000

fails (bind) after unbind:
[   34.987948] ipqess-edma c080000.ethernet: ipqess_axi_probe pre register_netdev
[   34.988012] ipqess-edma c080000.ethernet: *netdev: c27d6000
[   34.994088] ipqess-edma c080000.ethernet: &ipqess_init: c0d1e28c
[   34.999652] 8<--- cut here ---
[   35.005802] Unable to handle kernel paging request at virtual address c0d1e28c when execute
[   35.008676] [c0d1e28c] *pgd=80c1941e(bad)
[   35.016918] Internal error: Oops: 8000000d [#1] SMP ARM

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
Link: https://github.com/openwrt/openwrt/pull/15831
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoipq40xx: ipqess: pass up ethdev_addr probe defer
John Thomson [Fri, 28 Jun 2024 06:15:54 +0000 (16:15 +1000)]
ipq40xx: ipqess: pass up ethdev_addr probe defer

Notify via dev_info when a random MAC address is set.
of_get_ethdev_address can return -EPROBE_DEFER for NVMEM devices,
return this up, so that ipqess can defer as well.
Also move this MAC assignment from _init into _probe, so that this defer
can happen earlier.

Before change, with MAC address allocated from a built-in NVMEM layout
driver (mikrotik,routerboot-nvmem) with extra of_get_ethdev_address
result and random MAC printfs:
[    1.197571] ipqess-edma c080000.ethernet: ipqess_init of_get_ethdev_address ret:-517, of_node: /soc/ethernet@c080000
[    1.197690] ipqess-edma c080000.ethernet: generated random MAC address 22:e7:36:e0:e4:a3
[    1.614444] ipqess-edma c080000.ethernet eth0: entered promiscuous mode
[    5.055929] ipqess-edma c080000.ethernet eth0: configuring for fixed/internal link mode

after change:
[    1.173776] ipqess-edma c080000.ethernet: of_get_ethdev_address: -517
[    1.614607] ipqess-edma c080000.ethernet eth0: entered promiscuous mode
[    5.246105] ipqess-edma c080000.ethernet eth0: configuring for fixed/internal link mode
[    5.260754] ipqess-edma c080000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx

with extra __func__ printf to show _probe and _init:
[    1.173685] ipqess-edma c080000.ethernet: ipqess_axi_probe
[    1.173784] ipqess-edma c080000.ethernet: of_get_ethdev_address: -517
[    1.280347] ipqess-edma c080000.ethernet: ipqess_axi_probe
[    1.304844] ipqess-edma c080000.ethernet: ipqess_init
[    1.614664] ipqess-edma c080000.ethernet eth0: entered promiscuous mode

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
Link: https://github.com/openwrt/openwrt/pull/15831
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agogeneric: 6.6: (re-)add support multiple PPE to mtk_eth_soc
Daniel Golle [Tue, 25 Jun 2024 18:41:06 +0000 (19:41 +0100)]
generic: 6.6: (re-)add support multiple PPE to mtk_eth_soc

Now that the issue with WED has been sorted out, re-add support for
multiple PPE to the mtk_eth_soc driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>