openwrt/staging/stintel.git
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>
5 months agokernel: mtd: ubi: avoid attaching "linux,ubi" mtd again
Shiji Yang [Fri, 21 Jun 2024 13:56:23 +0000 (13:56 +0000)]
kernel: mtd: ubi: avoid attaching "linux,ubi" mtd again

"linux,ubi" compatible MTD device can be automatically attached early
since commit fc153aa8d94f. Therefore, there is no need to attach MTD
devices named "ubi" or "data" again.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agoe2fsprogs: remove HostBuild
Rosen Penev [Wed, 26 Jun 2024 21:41:28 +0000 (14:41 -0700)]
e2fsprogs: remove HostBuild

These things already get built and installed by tools/e2fsprogs. No need
to duplicate.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15822
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobmips: backport upstreamed RAC patches
Christian Marangi [Tue, 25 Jun 2024 09:19:41 +0000 (11:19 +0200)]
bmips: backport upstreamed RAC patches

Replace downstream bmips RAC fixes with upstream patches.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
[backport upstream patches]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agoipq806x: 6.6: enable at803x driver
Bryan Berg [Wed, 22 May 2024 02:45:45 +0000 (19:45 -0700)]
ipq806x: 6.6: enable at803x driver

Used by ethernet interfaces on AP3935i.

Signed-off-by: Bryan Berg <bdb@north-eastham.org>
Link: https://github.com/openwrt/openwrt/pull/13629
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoipq806x: ap3935: Use rgmii-id mode for LAN1
Bryan Berg [Sat, 18 May 2024 23:29:28 +0000 (16:29 -0700)]
ipq806x: ap3935: Use rgmii-id mode for LAN1

Fix issue with LAN1 interface on ap3935 devices, where the LAN
1interface won't come up after boot unless the bootloader has
initialized the network stack. Use of `fixed-link` in the prior code
kept the driver from clobbering PHY settings, but now that the driver
supports rgmii-id phy-mode, we can just use that.

Signed-off-by: Bryan Berg <bdb@north-eastham.org>
Link: https://github.com/openwrt/openwrt/pull/13629
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoipq806x: ap3935: Use gmac0 mdio controller
Bryan Berg [Sat, 18 May 2024 23:27:19 +0000 (16:27 -0700)]
ipq806x: ap3935: Use gmac0 mdio controller

Updates ap3935 target to use the mdio controller built-in to gmac0,
rather than having the SoC bit-bang mdio from gpio pins

Signed-off-by: Bryan Berg <bdb@north-eastham.org>
Link: https://github.com/openwrt/openwrt/pull/13629
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agotools: util-linux: mark hexdump patch as backport
Robert Marko [Thu, 27 Jun 2024 10:22:01 +0000 (12:22 +0200)]
tools: util-linux: mark hexdump patch as backport

The hexdump fix for --disable-all-programs has been merged upstream, so
mark it so.

Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/coreutils: remove 64-bit time disable flag
Michael Pratt [Tue, 25 Jun 2024 06:30:22 +0000 (02:30 -0400)]
tools/coreutils: remove 64-bit time disable flag

This was added to support building coreutils on host systems
that still only have 32-bit time support.

Because other tools now also require the flag for building
with 32-bit time when support for 64-bit time is not present,
this flag is now added to all host builds
on a variable basis using the same test before building,
so it can now be removed from specific tools.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15799
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobuild: add test for 64-bit time support
Michael Pratt [Tue, 25 Jun 2024 05:48:45 +0000 (01:48 -0400)]
build: add test for 64-bit time support

Several GNU tools such as tar, coreutils, and findutils
now build with support for 64-bit time by default
and otherwise require reconfiguring with a flag
--disable-year2038 in order to build without 64-bit time.

Some standard C libraries, for example,
certain older versions of glibc such as 2.31
have large file support but not long time bits support:

  checking for ... option to enable large file support... -D_FILE_OFFSET_BITS=64
  checking for ... option for timestamps after 2038... support not detected

This test using C code taken from largefile.m4 in gnulib
uses math and casting to check for overflow
with a macro and array pair that can only be defined
when 64-bit time support is present, and otherwise errors.
It is the exact same code used to test for 64-bit time
during the configure stage of building these tools,
so the results of this test before configure takes place
will always be in concordance with the results of
the test that takes place during the configure script.

Based on the test, the configure flag --disable-year2038
is added to every host tool build depending on the host system.

When the year 2038 problem finally comes around,
the effect of the test can be converted
from the toggling of a configure option into a build prerequisite,
requiring it to pass in order to continue building.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15799
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobmips: add support for Sagem F@ST3864OP
Hang Zhou [Wed, 20 Mar 2024 15:23:46 +0000 (02:23 +1100)]
bmips: add support for Sagem F@ST3864OP

Specifications:
* SoC: BCM63168
* RAM: NT5CC64M16GP-DI, DDR3 128MiB
* NAND: W29N01HVSINA, 128MiB
* Ethernet: 4x1000M LAN, 1x 1000M WAN
* Serial interface: on board but not populated, 3.3V, 115200, 8N1

Notes:
* Use DSA for VLAN and switches
* Ethernet ports and USB works
* gpio-leds are not working
* WLAN, xDSL, and FXS are not going to work

Signed-off-by: Hang Zhou <929513338@qq.com>
[refactor, reorder, drop unneeded or not working stuff]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agobcm63xx-cfe: update to latest version
Álvaro Fernández Rojas [Tue, 25 Jun 2024 13:47:11 +0000 (15:47 +0200)]
bcm63xx-cfe: update to latest version

sagem: fast-3864-op:add cferam.000 file
tp-link: archer vr400 v1: add cfe file

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agotools: mtd-utils: use libuuid provided by util-linux
Robert Marko [Tue, 25 Jun 2024 15:53:11 +0000 (17:53 +0200)]
tools: mtd-utils: use libuuid provided by util-linux

Now that util-linux is building libuuid we can simply use that instead
of manually pointing to e2fsprogs libuuid so we can disable building
libuuid in e2fsprogs.

Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools: e2fsprogs: use standard make uninstall
Robert Marko [Tue, 25 Jun 2024 17:45:12 +0000 (19:45 +0200)]
tools: e2fsprogs: use standard make uninstall

There is no need to manually only remove 2 binaries during cleanup and
leave rest of the e2fsprogs installed stuff untouched, so instead use
make uninstall to do the cleanup.

Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools: e2fsprogs: use libuuid provided by util-linux
Robert Marko [Tue, 25 Jun 2024 17:43:30 +0000 (19:43 +0200)]
tools: e2fsprogs: use libuuid provided by util-linux

We are now using util-linux to provide libuuid so disable building it
in e2fsprogs and simply use the util-linux provided one.

Disabling libuuid removes the need for custom install recipe.

Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools: util-linux: build libuuid
Robert Marko [Tue, 25 Jun 2024 15:51:24 +0000 (17:51 +0200)]
tools: util-linux: build libuuid

util-linux usually provides libuuid, and is preffered by mtd-utils so lets
enable building libuuid so we can disable it later in e2fsprogs.

Only the static version of library is intentionally built.

Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools: util-linux: use standard make install/uninstall
Robert Marko [Tue, 25 Jun 2024 15:49:43 +0000 (17:49 +0200)]
tools: util-linux: use standard make install/uninstall

Instead of manually installing the binaries and removing them, we can now
simply rely on standard make install/uninstall as we are only building
tools we want to use.

This will be especially important when we start building libraries in
util-linux.

Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools: util-linux: use --disable-all-programs
Robert Marko [Tue, 25 Jun 2024 15:45:57 +0000 (17:45 +0200)]
tools: util-linux: use --disable-all-programs

util-linux supports passing --disable-all-programs configure flag to
disable building anything that isnt then manually enabled.

So, lets switch to using that instead of manually having to disable all
tools we dont need.

However, current drawback is that there is no upstream support for enabling
building hexdump so I included a patch that is pending upstream[0].

[0] https://github.com/util-linux/util-linux/pull/3101

Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoutils: mtd-utils: update to 2.2.0
Robert Marko [Tue, 25 Jun 2024 12:14:43 +0000 (14:14 +0200)]
utils: mtd-utils: update to 2.2.0

Release notes:
https://lists.infradead.org/pipermail/linux-mtd/2024-March/104058.html

mtd-utils are currently depending on zlib, however it is not expressed
as a dependency and it is somehow being only pulled-in by lincurses-devel
so mtd-utils were able to compile.

Since 2.2.0 zlib is optional so lets disable support for it like for other
compressors since we dont package the mkfs.ubifs or mkfs.jffs2 that
are only users of compressors anyway.

Link: https://github.com/openwrt/openwrt/pull/15802
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoutils: mtd-utils: drop autoreconf
Robert Marko [Tue, 25 Jun 2024 12:30:51 +0000 (14:30 +0200)]
utils: mtd-utils: drop autoreconf

Now that we are not patching mtd-utils with JFFS2 LZMA support there
is no need for autoreconf to be run.

Link: https://github.com/openwrt/openwrt/pull/15802
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoramips: yuncore_g720: fix buttons
Daniel Golle [Tue, 25 Jun 2024 19:40:59 +0000 (20:40 +0100)]
ramips: yuncore_g720: fix buttons

Turns out the device got two buttons, while the currently listed on is
actually WPS, and the other (will hidden) button is intended as RESET.
Update DT accordingly.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agotools: mtd-utils: fix disabling tests
Robert Marko [Sun, 23 Jun 2024 21:52:45 +0000 (23:52 +0200)]
tools: mtd-utils: fix disabling tests

Passing --disable-tests does not do anything since upstream commit [0]
("Fix test binary installation") as that commit removed it since there is
already and existing --without-tests compile option to not compile
the tests at all as --disable-tests was just disabling their installation.

So, lets just pass --without-tests instead to disable test compilation.

[0] https://git.infraroot.at/mtd-utils.git/commit/?id=7170a28d46d5db1e7a9da24a5555a194a233ef0b

Fixes: 67efb6a66146 ("tools: mtd-utils: Update to version 2.1.4")
Link: https://github.com/openwrt/openwrt/pull/15791
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools: mtd-utils: update to 2.2.0
Robert Marko [Sun, 23 Jun 2024 21:47:17 +0000 (23:47 +0200)]
tools: mtd-utils: update to 2.2.0

Release notes:
https://lists.infradead.org/pipermail/linux-mtd/2024-March/104058.html

Manually refresh the portability and JFFS2 LZMA patches.

Since mtd-utils have converted most of the JFFS2 compressors to be compile
time configurable and manual refreshing of JFFS2 LZMA was needed I also
converted it to a compile time option and enabled the new --with-lzma
option.

Link: https://github.com/openwrt/openwrt/pull/15791
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobmips: sercomm,ad1018: remove unneeded LED default-state
Álvaro Fernández Rojas [Tue, 25 Jun 2024 15:26:29 +0000 (17:26 +0200)]
bmips: sercomm,ad1018: remove unneeded LED default-state

Remove unneeded default-state from led_power_green (led@8) to be in line with
other bmips devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agobmips: innacomm,w3400v6: remove unneeded LED default-state
Álvaro Fernández Rojas [Tue, 25 Jun 2024 15:24:53 +0000 (17:24 +0200)]
bmips: innacomm,w3400v6: remove unneeded LED default-state

Remove unneeded default-state from led_power_green (led@4) to be in line with
other bmips devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agogeneric: 6.6: replace Aquantia pending LEDs patch with upstream version
Christian Marangi [Mon, 24 Jun 2024 21:22:41 +0000 (23:22 +0200)]
generic: 6.6: replace Aquantia pending LEDs patch with upstream version

Replace Aquantia pending LEDs patch with upstream version.
Sadly net maintainers didn't like integrated solution hence we still
need to handle LED restore on reset with custom solution.

Link: https://github.com/openwrt/openwrt/pull/15797
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoutils: mtd-utils: drop patches
Robert Marko [Sun, 23 Jun 2024 21:26:45 +0000 (23:26 +0200)]
utils: mtd-utils: drop patches

We have been carrying the 100-fix_includes.patch and 130-lzma_jffs2.patch
for a long time but the reason is lost to history.

We dont need to carry the JFFS2 LZMA support patch as mkfs.jffs2 is not
even being packaged so its not even being used.

As for the 100-fix_includes.patch that also seems like a relic of history
as mtd-utils compiles fine without it.

So, lets drop both patches.

Link: https://github.com/openwrt/openwrt/pull/15790
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoqualcommax: fix RAX120v2 PWM Fan controller wrong definition
Christian Marangi [Sat, 25 May 2024 10:54:31 +0000 (12:54 +0200)]
qualcommax: fix RAX120v2 PWM Fan controller wrong definition

Fix RAX120v2 PWM Fan controller wrong definition by using a non-existant
kmod and using the wrong compatible for it enabling an external clock
while actually the device use an internal one.

Link: https://github.com/openwrt/openwrt/pull/15796
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agogeneric: 6.6: backport patch for G671 PWM Fan controller support
Christian Marangi [Sat, 25 May 2024 10:52:44 +0000 (12:52 +0200)]
generic: 6.6: backport patch for G671 PWM Fan controller support

Backport patch for G761 PWM Fan controller support. This is used by
an ipq807x RAX120v2 and have an internal clock that was currently
unconfigured making the device not working.

Link: https://github.com/openwrt/openwrt/pull/15796
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoipq806x: fix broken line break with Linksys e8350-v1
Christian Marangi [Tue, 25 Jun 2024 10:20:14 +0000 (12:20 +0200)]
ipq806x: fix broken line break with Linksys e8350-v1

Fix broken line break for Linksys e8350-v1 pushed with CRLF instead of
LF.

Fixes: 45b3c620e597 ("ipq806x: add support for Linksys e8350-v1")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoipq806x: add support for Linksys e8350-v1
Sergey Filippov [Sat, 15 Jun 2024 19:36:43 +0000 (21:36 +0200)]
ipq806x: add support for Linksys e8350-v1

AC2400 Dual-Band Gigabit Wi-Fi Router base on ipq8064.
https://www.linksys.com/support-product?sku=E8350

Specification:
 - Qualcomm dual-core IPQ8064 @ 1.4 GHz
 - 512 MB of RAM
 - 4 MB of SPI NOR MX25U3235F
 - 128 MB of NAND S34MS01G2
 - Qualcomm QCA9880 2.4GHz 802.11bgn
 - Quantenna QSR1000 5GHz 802.11ac (no support)
 - 4 x 10/100/1000 Mbit/s w/ vlan support Ethernet
 - Qualcomm Atheros QCA8337 switch
 - 1 x 3.0 + 1 x 2.0 (combo with eSata port)
 - 115200, 8N1 internal serial console
 - Power, Reset, WPS and WLAN buttons
 - Power, WPS and WLAN leds
 - 12 VDC, 3 A power

Installation:
The installation must be done using web interface of the router.
To achive this new firmware-utils tool was added to set correct
magic headers for the factory images.

Installation from vendor firmware:
 1. Flash over the native Linksys WEB interface using factory image.

Installation using recovery mode:
 1. Power off the device and disconnect the WAN port.
    (Only LAN port to be connected)
 2. Press & hold the "Reset" button
 3. Power on the device & wait 10 seconds with pressed "Reset" button
 4. Set IP Internet Protocol on your PC from
    192.168.1.0/24 network (Router is on IP 192.168.1.1)
 5. Open the Firmware Recovery page in your browser:
    http://192.168.1.1/index.shtml
    Firmware Recovery -> File Name -> Recovery & Reboot

The device page in inbox:
https://openwrt.org/inbox/toh/linksys/linksys_ea8350_1

Signed-off-by: Sergey Filippov <sergey.filippov@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/15798
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agobmips: drop kernel 6.1 support
Álvaro Fernández Rojas [Tue, 25 Jun 2024 07:43:07 +0000 (09:43 +0200)]
bmips: drop kernel 6.1 support

kernel 6.1 can be dropped since 6.6 is the default kernel.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agobmips: switch default kernel to 6.6
Álvaro Fernández Rojas [Tue, 25 Jun 2024 07:40:49 +0000 (09:40 +0200)]
bmips: switch default kernel to 6.6

Update default kernel version to 6.6 for the bmips devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agobmips: add 6.6 kernel as testing
Goetz Goerisch [Mon, 24 Jun 2024 20:11:13 +0000 (22:11 +0200)]
bmips: add 6.6 kernel as testing

enable testing kernel version 6.6 for bmips

Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
5 months agobmips: refresh 6.6 kernel config files
Álvaro Fernández Rojas [Mon, 24 Jun 2024 20:11:13 +0000 (22:11 +0200)]
bmips: refresh 6.6 kernel config files

Refresh config for kernel 6.6.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agobmips: 6.6: refresh kernel patches
Goetz Goerisch [Mon, 24 Jun 2024 20:11:13 +0000 (22:11 +0200)]
bmips: 6.6: refresh kernel patches

refresh 6.6. kernel patches via 'make target/linux/refresh'

Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
[refresh patches]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 months agobmips: 6.6: copy patches, config from 6.1
Goetz Goerisch [Mon, 24 Jun 2024 20:11:13 +0000 (22:11 +0200)]
bmips: 6.6: copy patches, config from 6.1

copy the 6.1 config to 6.6

Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
5 months agogeneric: 6.6: backport mips kexec dependency fix
Álvaro Fernández Rojas [Mon, 24 Jun 2024 17:37:37 +0000 (19:37 +0200)]
generic: 6.6: backport mips kexec dependency fix

Backport upstream fix for incorrect ifdeffery and dependency of CONFIG_KEXEC,
which causes compilation errors with the following symbols:
CONFIG_CRASH_CORE=y
CONFIG_KEXEC_CORE=y
CONFIG_CRASH_DUMP=y

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
6 months agotools/llvm: update to 18.1.7
Konstantin Demin [Wed, 19 Jun 2024 16:43:51 +0000 (19:43 +0300)]
tools/llvm: update to 18.1.7

- release notes:
  - https://discourse.llvm.org/t/llvm-16-0-0-release/69326
  - https://discourse.llvm.org/t/llvm-17-0-1-released/73549
  - https://discourse.llvm.org/t/llvm-18-1-0-released/77448
  - https://discourse.llvm.org/t/llvm-18-1-1-released/77540
  - https://discourse.llvm.org/t/18-1-2-released/77821
  - https://discourse.llvm.org/t/18-1-3-released/78136
  - https://discourse.llvm.org/t/18-1-4-released/78430
  - https://discourse.llvm.org/t/18-1-5-released/78740
  - https://discourse.llvm.org/t/18-1-6-released/79068
  - https://discourse.llvm.org/t/18-1-7-released/79433
- remove PKG_RELEASE (irrelevant to tools)
- set default target/triplet to "bpf"
- rearrange configuration options
- better control feature support and improve build reproducibility:
  disable auxiliary features that are enabled implicitly - their
  support is detected at build-time

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15704
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agomvebu: add support for RB5009UG+S+IN
Robert Marko [Wed, 9 Feb 2022 07:45:47 +0000 (09:45 +0200)]
mvebu: add support for RB5009UG+S+IN

This patch adds support for Mikrotik RB5009UG+S+IN.

Specifications:
  - SoC: Marvell Armada 7040 (88F7040) - 4 cores, ARMv8 Cortex-A72, 1.4GHz, 64bit
  - RAM: 1024MB DDR4
  - Flash: 16MB SPI NOR flash, 1024MB NAND
  - Ethernet:
   * Marvell 88E6393X - Amethyst:
   * one 2.5G RJ45 port via Qualcomm QCA8081 PHY
   * seven 1G RJ45 ports via built-in PHY-s
   * one 10G SFP+ cage
   * All ports share the same 10G switch uplink to the CPU
  - LED: User, SFP, Hdr1, Hdr2
  - Buttons: Reset
  - UART: 115200 8n1 on the MikroTik 16 pin header
  - USB: One USB3 port
  - Power: 24-57 V via
   * DC jack
   * 802.3af/at PoE on Ethernet 1
   * 2-pin terminal on the side

16 Pin header pinout:
1   GND Vcc  RX  ?  GND
   #--------------------#
   |.-. .-. .-. .-. .-. |
   |'-' '-' '-' '-' '-' |
   |.-. .-. .-. .-. .-. |
   |'-' '-' '-' '-' '-' |
   #--------------------#
2   CLK  DO /CS  TX  DI

Do note that the default RouterBoot has disabled UART even when the
required hard-config bit is set to indicate UART support.
Patched RouterBoot must be used if UART is desired.

Also, since ARM64 Linux support does not support in any way appending the
DTB to the kernel image we use mainline U-Boot with added RB5009 support
in order to boot OpenWrt.
MikroTik uses YAFFS to store the boot kernel and we use YAFUT to put U-Boot
as the kernel which RouterBoot then simply boots as an ELF.

Install instructions:

NOTE: In case you are using an existing out of tree version of OpenWrt make
sure to reinstall RouterOS via Netinstall to return the expected partition
layout.

1. Prepare FAT or EXT4 formatted USB drive with OpenWrt initramfs:
* Copy bin/targets/mvebu/cortexa72/openwrt-mvebu-cortexa72-mikrotik_rb5009-initramfs-uImage.itb
to the root of FAT or EXT4 formatted USB drive.
* Plug in the drive to the RB5009 USB port

2. Boot the modified OpenWrt built U-Boot ELF:
u-boot.elf from bin/targets/mvebu/cortexa72/u-boot-rb5009/u-boot.elf

Consult OpenWrt wiki for common instructions on switching to boot from
Ethernet once as well as serving the file:
https://openwrt.org/toh/mikrotik/common

Once U-Boot is booted it will attempt to boot in the following order:
1. NAND
2. USB
3. Network

NAND is expected to fail but USB or Networking need to serve the OpenWrt
initramfs image and after booting it will be accessible from LAN ports
on the default 192.168.1.1 IP with default credentials.

3. Flash modified RouterBoot that enables UART (Optional but recommended):
https://public.robimarko.eu/RB5009/70x0-7.15-uart.fwf

* Copy the file over to the booted OpenWrt initramfs to /tmp
* Run: mtd erase RouterBOOT-primary
* Run: mtd write /tmp/70x0-7.15-uart.fwf RouterBOOT-primary

4. Install U-Boot to boot OpenWrt:
* Copy the u-boot.elf from bin/targets/mvebu/cortexa72/u-boot-rb5009/u-boot.elf
to OpenWrt initramfs to /tmp.
* Run: . /lib/functions.sh
* Run: yafut -d /dev/mtd$(find_mtd_index "YAFFS") -w -i /tmp/u-boot.elf -o kernel -T
This will use yafut to copy the U-Boot as kernel in YAFFS so that RouterBoot boots it.

5. Wipe the NAND UBI partition:
* Run: ubiformat /dev/mtd$(find_mtd_index "ubi") -y
This will prepare the existing RouterOS rootfs partition for OpenWrt.

6. Flash OpenWrt:
* Copy the bin/targets/mvebu/cortexa72/openwrt-mvebu-cortexa72-mikrotik_rb5009-squashfs-sysupgrade.bin
to OpenWrt initramfs to /tmp.
* Run: sysupgrade /tmp/openwrt-mvebu-cortexa72-mikrotik_rb5009-squashfs-sysupgrade.bin

Device will reboot, boot U-Boot and then OpenWrt.

Recovery:

In case you need to reinstall OpenWrt if it crashes after U-Boot, there is
a recovery mechanism in OpenWrt to boot the OpenWrt initramfs.
You need to hold the reset button while U-Boot is booting and then it will
boot the OpenWrt initramfs from:
1. USB
2. Networking

In recovery mode U-Boot will light all of the LED-s except for the switch
ones.

In case you want to return to RouterOS, you can simply do that via
Netinstall like on any other MikroTik board.

Credits also go to Serhii Serhieiev <adron@mstnt.com> who origininally
figured out the RouterBoot modification for UART, the missing 10G MVPP2
support in U-Boot as well as the custom aux loader to boot directly via
RouterBoot.

Link: https://github.com/openwrt/openwrt/pull/15765
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agouboot-mvebu: add support for MikroTik RB5009
Robert Marko [Sat, 8 Jun 2024 08:25:29 +0000 (10:25 +0200)]
uboot-mvebu: add support for MikroTik RB5009

MikroTik RB5009 uses RouterBoot as its bootloader like all MikroTik devices
running RouterOS, meaning that its not FIT compatible and can only boot
ELF images.

Now this is not so much of an issue on ARM or MIPS since kernel supports
appending DTB-s to it (Or we patch the kernel to embed it), but on ARM64
there is intentionally no such support.

RouterBoot will pass a DTB, but its the broken MikroTik one which is a
modified reference DTB and incorrect in more places than its valid so we
cannot use it to boot our kernel.

Thus, the solution is to use an intermediary loader and luckily for us
Armada 7040 is well supported in U-Boot which makes it a great option since
it supports anything that we will ever need to boot.

Upstream U-Boot currently requires the Armada boards to be converted to
OF_UPSTREAM before adding anything new and this requires updating all of
the drivers to accomodate the Linux DTS, while I plan to do this eventually
we will need to keep this board downstream for now.

Most stuff is supported in U-Boot, including networking since the switch
is preconfigured by RouterBoot.

A custom environment is used to try and boot from the following devices:
1. NAND (UBI)
2. USB
3. Networking

If NAND boot fails then U-Boot will attempt to boot OpenWrt initramfs from
USB or via networking.

There is a manual recovery mechanism implemented where if the reset button
is held when U-Boot is booting it will try to boot OpenWrt initramfs from:
1. USB
2. Networking

When U-Boot is in recovery mode it will light all of the LED-s except the
switch ones.

Link: https://github.com/openwrt/openwrt/pull/15765
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agomvebu: cortex-a72: enable MikroTik NVMEM layout driver
Robert Marko [Sun, 9 Jun 2024 10:18:54 +0000 (12:18 +0200)]
mvebu: cortex-a72: enable MikroTik NVMEM layout driver

RB5009 will take advantage of the driver to get MAC adress.

Link: https://github.com/openwrt/openwrt/pull/15765
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agomvebu: cortex-a72: enable U-Boot NVMEM driver
Robert Marko [Fri, 7 Jun 2024 17:43:14 +0000 (19:43 +0200)]
mvebu: cortex-a72: enable U-Boot NVMEM driver

In order to not have to ship envtools configuration per board, we can
instead rely on the kernel U-Boot environment NVMEM driver through which
envtools can read/write the environement.

Since size difference is negligeble and this subtarget has rather large
storage regardless, enable it by default.

Link: https://github.com/openwrt/openwrt/pull/15765
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agomvebu: cortex-a72: enable MikroTik platform drivers and NOR variable erase
Robert Marko [Sun, 17 Sep 2023 20:17:56 +0000 (22:17 +0200)]
mvebu: cortex-a72: enable MikroTik platform drivers and NOR variable erase

MikroTik RB5009 will be using advantage of the MikroTik platform drivers,
RouterBoot partition parser and SPI NOR variable erase support.

Link: https://github.com/openwrt/openwrt/pull/15765
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agomvebu: cortex-a72: enable ARM SBSA Generic Watchdog
Robert Marko [Fri, 7 Jun 2024 13:05:30 +0000 (15:05 +0200)]
mvebu: cortex-a72: enable ARM SBSA Generic Watchdog

Marvell 70x0 and 80x0 both have ARM SBSA Generic Watchdog built-in,
so lets enable the required driver for them.

Link: https://github.com/openwrt/openwrt/pull/15765
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agomvebu: cortex-a72: enable QCA8081 PHY support
Robert Marko [Mon, 18 Sep 2023 08:51:19 +0000 (10:51 +0200)]
mvebu: cortex-a72: enable QCA8081 PHY support

MikroTik RB5009 uses Qualcomm QCA8081 PHY for the 2.5G RJ45 port,
so we need to enable the driver for it.

Link: https://github.com/openwrt/openwrt/pull/15765
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agotreewide: refresh patches
Robert Marko [Sat, 22 Jun 2024 10:41:28 +0000 (12:41 +0200)]
treewide: refresh patches

These need to be refreshed, probably the generic backports affected them.

Link: https://github.com/openwrt/openwrt/pull/15765
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agogeneric: backport QCA808x possible interfaces fix
Robert Marko [Tue, 27 Feb 2024 18:07:42 +0000 (19:07 +0100)]
generic: backport QCA808x possible interfaces fix

QCA808x does not currently fill in the possible_interfaces.

This leads to Phylink not being aware that it supports 2500Base-X as well
so in cases where it is connected to a DSA switch like MV88E6393 it will
limit that port to phy-mode set in the DTS.

That means that if SGMII is used you are limited to 1G only while if
2500Base-X was set you are limited to 2.5G only.

Populating the possible_interfaces fixes this, so lets backport the patches
from kernel 6.9.

This also includes a backport of the Phylink PHY validation series from
kernel 6.8 that allows the use of possible_interfaces.

Link: https://github.com/openwrt/openwrt/pull/15765
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agogeneric: 6.6: backport Marvell Amethyst SMI GPIO setup
Robert Marko [Sun, 17 Sep 2023 20:43:48 +0000 (22:43 +0200)]
generic: 6.6: backport Marvell Amethyst SMI GPIO setup

Marvell Amethyst switches use a different SMI GPIO pin setup than other
switches, and since RB5009 uses Amethyst switch and its SMI bus to talk
to QCA8081 lets backport the required fix from kernel 6.9.

Link: https://github.com/openwrt/openwrt/pull/15765
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 months agobcm27xx: drop upstream patch that breaks rpi5 wifi
Álvaro Fernández Rojas [Mon, 24 Jun 2024 03:48:44 +0000 (05:48 +0200)]
bcm27xx: drop upstream patch that breaks rpi5 wifi

As reported in the following issue, this patch breaks wifi on the RPi 5.
https://github.com/raspberrypi/linux/issues/6237

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
6 months agogeneric: 6.6: backport upstream r8169 patches
Álvaro Fernández Rojas [Sun, 23 Jun 2024 17:19:47 +0000 (19:19 +0200)]
generic: 6.6: backport upstream r8169 patches

Backport a bunch of upstream r8169 patches:
- RTL8168/RTL8101 LEDs support.
- RTL8126A support.
- RTL8125/RTL8126 LEDs support.
- RTL8168M support.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
6 months agoqualcommax: get rid of custom socinfo.h header
Robert Marko [Sun, 23 Jun 2024 16:02:09 +0000 (18:02 +0200)]
qualcommax: get rid of custom socinfo.h header

Now that SSDK has been updated to use in-kernel SMEM ID-s to identify
the SoC its running on instead of relying on the downstream socinfo.h
header we can move the read_ipq_soc_version_major() function directly to
cpr3-util.c as its the only user of anything from the header and drop it.

Link: https://github.com/openwrt/openwrt/pull/15786
Signed-off-by: Robert Marko <robimarko@gmail.com>