openwrt/staging/nbd.git
23 months agofritz-tools: fritz_tffs_nand: get rid of struct tffs_sectors
Andre Heider [Wed, 15 Dec 2021 11:21:48 +0000 (12:21 +0100)]
fritz-tools: fritz_tffs_nand: get rid of struct tffs_sectors

This doesn't help and "[0]" gets in the way of bounds checks.

Signed-off-by: Andre Heider <a.heider@gmail.com>
23 months agofritz-tools: fritz_tffs_nand: exclude oob code when disabled
Andre Heider [Wed, 15 Dec 2021 10:38:20 +0000 (11:38 +0100)]
fritz-tools: fritz_tffs_nand: exclude oob code when disabled

Skip unnecessary stuff if checking the oob data is disabled.

Signed-off-by: Andre Heider <a.heider@gmail.com>
23 months agofirewall4: add missing PKG_MIRROR_HASH
Jo-Philipp Wich [Wed, 7 Dec 2022 07:54:56 +0000 (08:54 +0100)]
firewall4: add missing PKG_MIRROR_HASH

Fixes: 84183f0d98 ("firewall4: update to latest Git HEAD")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
23 months agomediatek: also move &slot0 from dtsi down to board dts
Daniel Golle [Wed, 7 Dec 2022 01:42:53 +0000 (01:42 +0000)]
mediatek: also move &slot0 from dtsi down to board dts

As the referenced MTD partition is only present in the dts, also move
&slot0 down to the dts files.

Fixes: 64e9b62829 ("mediatek: remove redundant flash entry from dtsi")
Fixes: 7dbac3433f ("mediatek: add support for reyee AX3200-E5")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agomediatek: remove redundant flash entry from dtsi
Daniel Golle [Wed, 7 Dec 2022 00:34:55 +0000 (00:34 +0000)]
mediatek: remove redundant flash entry from dtsi

Splitting-off the common parts of Ruijie RG-EW3200GX PRO and
reyee AX3200-E5 went wrong because the flash descriptiom was kept
also in the dtsi. Remove it there, as flash definition is added by
both board dts files.

Fixes: 7dbac3433f ("mediatek: add support for reyee AX3200-E5")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agobuild: add gzip to prereq-build.mk
Tony Butler [Fri, 2 Dec 2022 20:05:08 +0000 (12:05 -0800)]
build: add gzip to prereq-build.mk

gzip has never been checked for, a system without it would be rare, fix
it anyway

Signed-off-by: Tony Butler <spudz76@gmail.com>
23 months agoCI: build: fix use of sdk as toolchain
Christian Marangi [Mon, 5 Dec 2022 22:23:04 +0000 (23:23 +0100)]
CI: build: fix use of sdk as toolchain

The toolchain included in a sdk have a different format than an external
toolchain tar.

Since sdk is a more integrated setup doesn't use and include wrapper bin
that use the external toolchain config and use an alternative and more
standard way to include all the toolchain headers.

External toolchain use wrapper.sh to append the configured include
header when each tool is called.

Fix the sdk toolchain by reverting their own sdk wrapper scripts and to
simulate an external toolchain build copying what is done in the
toolchain target makefile.

This handle compilation error and warning caused by not using fortify
header on building packages.

Fixes: 006e52545d14 ("CI: build: add support to fallback to sdk for external toolchain")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agobuild: images: squashfs: add help, fix description
Tony Butler [Mon, 28 Nov 2022 12:00:02 +0000 (04:00 -0800)]
build: images: squashfs: add help, fix description

add help text for `TARGET_SQUASHFS_BLOCK_SIZE` to match the only valid
settings accepted by `mksquashfs4` ("block size not power of two or not
between 4096 and 1Mbyte") thus for this setting in "KB", the set:
  `4, 8, 16, 32, 64, 128, 256, 512, 1024`

replace `squashfs-lzma` with `squashfs` in the description for
`TARGET_ROOTFS_SQUASHFS` because it has various compressions, and not
just lzma as it did in the past

cosmetic change with no functional effect

Signed-off-by: Tony Butler <spudz76@gmail.com>
23 months agoath79: optimize the firmware recipe for Netgear NAND devices
Shiji Yang [Tue, 29 Nov 2022 10:13:38 +0000 (18:13 +0800)]
ath79: optimize the firmware recipe for Netgear NAND devices

1. Drop useless character '0xff' before fake filesystem header.
2. Reduce useless padding to shrink the size of the sysupgrade image.
3. Do not check the size of sysupgrade image. It does not make sense to
   check the size of a compressed package.
4. Do not take the size of netgear header into account because it will
   not be written to Flash.
5. Use the default lzma compression dictionary parameter '-d24' to get
   better performance.

Tested on Netgear R6100
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
23 months agoath79: convert Netgear R6100 radio calibration to nvmem-cells
Shiji Yang [Tue, 29 Nov 2022 10:13:19 +0000 (18:13 +0800)]
ath79: convert Netgear R6100 radio calibration to nvmem-cells

use nvmem-cells implementation to avoid copying art calibration data
to rootfs.

Tested on Netgear R6100
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
23 months agotools/cmake: update to 3.25.1
Hannu Nyman [Tue, 6 Dec 2022 10:33:58 +0000 (12:33 +0200)]
tools/cmake: update to 3.25.1

Update cmake to version 3.25.1

* refresh patches

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
23 months agokernel: ca8210: Fix crash by zero initializing data
Hauke Mehrtens [Sun, 20 Nov 2022 20:35:54 +0000 (21:35 +0100)]
kernel: ca8210: Fix crash by zero initializing data

This fixes crashes at bootup on pistachio.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agoe2fsprogs: Fix CVE-2022-1304
Hauke Mehrtens [Mon, 5 Dec 2022 23:17:35 +0000 (00:17 +0100)]
e2fsprogs: Fix CVE-2022-1304

This fixes CVE-2022-1304:
An out-of-bounds read/write vulnerability was found in e2fsprogs 1.46.5.
This issue leads to a segmentation fault and possibly arbitrary code
execution via a specially crafted filesystem.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agomediatek: add support for reyee AX3200-E5
Alex Hansen [Thu, 13 Oct 2022 18:36:40 +0000 (14:36 -0400)]
mediatek: add support for reyee AX3200-E5

This is yet another model of the Ruijie RG-EW3200GX PRO with a slightly
different flash layout, install process is the same.

Specifications:
SoC: MT7622B
RAM: 256MB
Flash: XMC XM25QH128C or Winbond WQ25Q128JVSQ 16MB SPI NOR
Ethernet: 5x1GbE
Switch: MT7531BE
WiFi: 2.4G: MT7622 5G: MT7915AN+MT7975AN
3LEDs: System LED(blue) + Mesh LED(green) + Mesh LED(red)
2Keys: Mesh button + Reset button
UART: Marked J19 on board. 3.3v, 115200n1
Power: 12V 2.5A

Flash instruction:
1. Serve the initramfs.img using a TFTP server with address 10.10.10.3.
2. Interrupt the uboot startup process via UART.
3. Select "System Load Linux to SDRAM via TFTP" item.
4. (important) Back up firmware(mtd7) partitions with:
    dd if=/dev/mtd7 of=/tmp/firmware.bin
    and then download the firmware.bin image via SCP.
5. Flash the OpenWrt sysupgrade firmware.

Recovery stock firmware:

1. Transfer the firmware.bin image to the device.
2. Flash the image with:
    mtd write firmware.bin firmware

Signed-off-by: Alex Hansen <mralexh123@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agofirewall4: update to latest Git HEAD
Jo-Philipp Wich [Mon, 5 Dec 2022 14:58:41 +0000 (15:58 +0100)]
firewall4: update to latest Git HEAD

700a925 fw4: prevent null access when no ipsets are defined
6443ec7 config: drop input traffic by default
119ee1a ruleset: drop ctstate invalid traffic for masq-enabled zones

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
23 months agoucode: update to latest Git HEAD
Jo-Philipp Wich [Wed, 23 Nov 2022 13:15:19 +0000 (14:15 +0100)]
ucode: update to latest Git HEAD

46d93c9 tests: fixup testcases
4c654df types: adjust double printing format
eac2add compiler: fix bytecode for logical assignments of properties
3903b18 fs: add `realpath()` function
8366102 math: add isnan() function
eef83d3 tests: relax sleep() test
394e901 lib: uc_json(): accept trailing whitespace when parsing strings
1867c8b uloop: terminate parent uloop in task child processes
d2cc003 uci: auto-load package in `ctx.foreach()` and `ctx.get_first()`
6c5ee53 compiler: ensure that arrow functions with block bodies return no value
fdc9b6a compiler: fix `??=`, `||=` and `&&=` logical assignment semantics
88dcca7 add cmake to install requires for debian

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
23 months agoramips: mt7621: enable lzma-loader for netis WF2881
Joonhyuk Song [Mon, 21 Nov 2022 02:37:36 +0000 (11:37 +0900)]
ramips: mt7621: enable lzma-loader for netis WF2881

Fixes boot loader LZMA decompression issues (LZMA ERROR 1)

Signed-off-by: Joonhyuk Song <thenoface303@gmail.com>
23 months agoramips: mt7621: mikrotik 760igs (hEX S) fix SFP
John Thomson [Wed, 9 Nov 2022 23:55:11 +0000 (09:55 +1000)]
ramips: mt7621: mikrotik 760igs (hEX S) fix SFP

This device uses an AR8031/AR8033 chip to convert SoC gmac1
RGMII to 1000base-x or sgmii for the SFP fibre cage.
The SFP cage requires phy-mode rgmii-rxid, and without it will not
recieve any packets: ethtool -S sfp rx_fcs_errors will increase when
packets should be being received, but no other _rx counters will change.

Fixes: c77858aa792 ("ramips: mt7621-dts: change phy-mode of gmac1 to rgmii")
Reviewed-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
23 months agomediatek: mt7623: build mt6577_auxadc driver into kernel
Daniel Golle [Mon, 5 Dec 2022 23:10:29 +0000 (23:10 +0000)]
mediatek: mt7623: build mt6577_auxadc driver into kernel

Set CONFIG_MT6577_AUXADC=y as otherwise reading temperature of the
thermal-zone doesn't work on MT7623 (it does work fine without this
driver on MT7622 and MT7986).

Fixes: f2ae4e2f8c ("mediatek: clean up platform kernel modules")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agotrusted-firmware-a.mk: fix build with binutils 2.39
Daniel Golle [Fri, 2 Dec 2022 12:54:52 +0000 (12:54 +0000)]
trusted-firmware-a.mk: fix build with binutils 2.39

Starting from version 2.39 binutils now warns about sections with rwx
permissions. While this is generally desirable it breaks building
ARM TrustedFirmware-A bl2 which treats warnings as errors.
Disable the warning/error for now to fix build.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agoramips: use ARTIFACTS for initramfs-factory of I-O DATA WN-AX1167GR
INAGAKI Hiroshi [Wed, 30 Nov 2022 13:10:57 +0000 (22:10 +0900)]
ramips: use ARTIFACTS for initramfs-factory of I-O DATA WN-AX1167GR

Use ARTIFACTS to generate initramfs-based factory image of I-O DATA
WN-AX1167GR instead of redundant recipe which generate on
KERNEL_INITRAMFS.

Note:

WN-AX1167GR has 2x OS images on stock firmware.

stock log:

flash manufacture id: c2, device id 20 18
MX25L12805D(c2 2018c220) (16384 Kbytes)
mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0
Creating 10 MTD partitions on "raspi":
0x000000000000-0x000001000000 : "ALL"
0x000000000000-0x000000030000 : "Bootloader"
0x000000030000-0x000000040000 : "Config "
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x000000060000 : "iNIC_rf"
0x000000060000-0x0000007e0000 : "Kernel"
0x000000800000-0x000000f80000 : "app"
0x000000f90000-0x000000fa0000 : "Key"
0x000000fa0000-0x000000fb0000 : "backup"
0x000000fb0000-0x000001000000 : "storage"

1st image is "Kernel" and 2nd is "app" when booted from 1st image.
In OpenWrt, those 2x partitions are combined to "firmware" with
undefined (empty) areas (0x7e0000-0x7fffff, 0xf80000-0xf8ffff).

The size of an OS image partition is 0x780000 (7680 KiB = 7.5 MiB), so
check-size for initramfs-factory image needs to be called with the size.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
23 months agobuild: make sure that $(STAGING_DIR_IMAGE) exists
Daniel Golle [Tue, 29 Nov 2022 15:26:25 +0000 (15:26 +0000)]
build: make sure that $(STAGING_DIR_IMAGE) exists

Call 'mkdir -p $(STAGING_DIR_IMAGE)' before trying to store files in
this potentially non-existing folder.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agoCI: trigger check also on build and check-kernel-patches workflow change
Christian Marangi [Sun, 4 Dec 2022 19:58:11 +0000 (20:58 +0100)]
CI: trigger check also on build and check-kernel-patches workflow change

Since kernel and packages workflow now use a shared build workflow, they
also need to react on changes on these shared workflow.

Fix this and add these shared workflow to the event paths to check.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoCI: build: fix matching for openwrt release branch for toolchain parsing
Christian Marangi [Sun, 4 Dec 2022 19:36:11 +0000 (20:36 +0100)]
CI: build: fix matching for openwrt release branch for toolchain parsing

The current match logic doesn't handle test for push events related to
stable release (example openwrt-22.03) but only fork with the related
prefix (example openwrt-22.03-fixup)

Fix wrong matching and while at it also add extra checks to other
matching (check if the branch name actually start with the requested
prefix)

Fixes: e24a1e6f6d7f ("CI: build: add support for external toolchains from stable branch")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoCI: fix matching for openwrt release branch for container selection
Christian Marangi [Sun, 4 Dec 2022 19:28:28 +0000 (20:28 +0100)]
CI: fix matching for openwrt release branch for container selection

The current match logic doesn't handle test for push events related to
stable release (example openwrt-22.03) but only fork with the related
prefix (example openwrt-22.03-fixup)

Fix wrong matching and while at it also add extra checks to other
matching (check if the branch name actually start with the requested
prefix)

Fixes: abe8a4824210 ("CI: build: add support for per branch tools container")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoCI: build: add support to fallback to sdk for external toolchain
Christian Marangi [Mon, 28 Nov 2022 15:12:13 +0000 (16:12 +0100)]
CI: build: add support to fallback to sdk for external toolchain

Add support to use sdk as external toolchain if the packaged external
toolchain tar is not found on openwrt servers for build shared workflow.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoCI: build: add support for external toolchains from stable branch
Christian Marangi [Mon, 28 Nov 2022 11:44:01 +0000 (12:44 +0100)]
CI: build: add support for external toolchains from stable branch

Add support to use external toolchains from stable branch if we are
testing commit targeting stable openwrt branch in kernel and packages
workflow.

With pr the target branch is parsed and the right toolchain is used.

To use the stable toolchain for local testing the branch needs to have
the prefix openwrt-[0-9][0-9].[0-9][0-9]- (example openwrt-21.02-fixup)

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoCI: build: add support for per branch tools container
Christian Marangi [Sun, 27 Nov 2022 18:53:08 +0000 (19:53 +0100)]
CI: build: add support for per branch tools container

Add support in build shared workflow for per branch tools container.

With pr the target branch is parsed and the right container is used.

To use the stable container for local testing the branch needs to have
the prefix openwrt-[0-9][0-9].[0-9][0-9]- (example openwrt-21.02-fixup)

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoCI: tools: support per branch tools container
Christian Marangi [Sun, 27 Nov 2022 18:45:38 +0000 (19:45 +0100)]
CI: tools: support per branch tools container

Add support to push per branch container tools.
For anything not official stick to latest tag that correspond to test
run from master.

If we are testing something for one of the openwrt stable branch, parse
the branch name or the tag and push dedicated tools containers.

To use the stable container for local testing the branch needs to have
the prefix openwrt-[0-9][0-9].[0-9][0-9] (example openwrt-21.02-fixup)

Any branch that will match this pattern openwrt-[0-9][0-9].[0-9][0-9]
will refresh the tools container with the matching tag.
(example branch openwrt-22.03 -> tools:openwrt-22.03)
(example branch openwrt-22.03-test -> tools:openwrt-22.03)

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoiucode-tool: fix compile error with musl libc and USE_CPUID_DEVICE
Christian Marangi [Tue, 29 Nov 2022 18:39:04 +0000 (19:39 +0100)]
iucode-tool: fix compile error with musl libc and USE_CPUID_DEVICE

Add patch to fix compilation error with USE_CPUID_DEVICE enabled and musl
used as libc. Musl doesn't add limits.h header by default and this is
required if USE_CPUID_DEVICE is used.

The package currently compile because fortify headers include limits.h
by default.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoramips: add support for HiWiFi HC5611
Senis John [Sat, 19 Nov 2022 03:30:54 +0000 (11:30 +0800)]
ramips: add support for HiWiFi HC5611

CPU: MediaTek MT7628AN @ 575 MHz
Flash: 16 MB
RAM: 128 MB
Ethernet: 10/100Mbps x 1
Wlan: 300 Mbps
USB: USB 2.0 x 1
LED: red/green x 1
Button: reset x 1

1. Open https://www.hiwifi.wtf/, Get Cloud token and unlock ssh
2. Upload the openwrt firmware to the router via SCP
3. Login the router via SSH
4. Run `mtd -r write path_to_firmware.bin firmware`

I have tested on my device.
- The LED will display RED on power-on, After system start completed, trun GREEN
- Reset button working now. Long press after 5s will reset factory. Short press less 1s will reboot the device
- USB can working under official u-boot

Signed-off-by: Senis John <thank243@gmail.com>
23 months agorockchip: enable watchdog driver
Kien Truong [Mon, 3 Oct 2022 11:51:40 +0000 (18:51 +0700)]
rockchip: enable watchdog driver

Enable Synopsys DesignWare watchdog driver for rockchip device

Tested on NanoPi R2S

Signed-off-by: Kien Truong <duckientruong@gmail.com>
23 months agoRevert "mvebu: switch default kernel to 5.15"
Petr Štetiar [Sun, 4 Dec 2022 07:08:24 +0000 (08:08 +0100)]
Revert "mvebu: switch default kernel to 5.15"

This reverts commit 5429411f732ba76eced30b5b596ec9c0374d0965 as upstream
in commit e5f31552674e ("ethernet: fix PTP_1588_CLOCK dependencies") has
changed `PTP_1588_CLOCK` dependency handling in 5.15 kernel.

That currently leads to `CONFIG_NET_DSA_MV88E6XXX=m` in images produced
by buildbots due to `CONFIG_ALL_KMODS=y` config option being used in
those builds, which leads to a broken LAN bridge network on several
devices.

References: https://lists.infradead.org/pipermail/openwrt-devel/2022-December/039950.html
Signed-off-by: Petr Štetiar <ynezz@true.cz>
23 months agoramips: mt7621: enable lzma-loader for ZyXEL WAP6805
Bjørn Mork [Mon, 28 Nov 2022 14:45:12 +0000 (15:45 +0100)]
ramips: mt7621: enable lzma-loader for ZyXEL WAP6805

Fixing "Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board
to recover".

Signed-off-by: Bjørn Mork <bjorn@mork.no>
23 months agobuild: config: cleanup impossible dependency logic
Tony Butler [Mon, 28 Nov 2022 12:05:30 +0000 (04:05 -0800)]
build: config: cleanup impossible dependency logic

some config `depends on` lines contained outdated kernel version checks
that can no longer happen and had become non-operational; clean them up

cosmetic change with no functional effect

Signed-off-by: Tony Butler <spudz76@gmail.com>
23 months agotools/xz: update to 5.2.9
Nick Hainke [Fri, 2 Dec 2022 21:20:07 +0000 (22:20 +0100)]
tools/xz: update to 5.2.9

Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agomac80211: Update to version 5.15.81
Hauke Mehrtens [Sun, 27 Nov 2022 18:51:44 +0000 (19:51 +0100)]
mac80211: Update to version 5.15.81

The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agoCI: Build all boards and testing kernel
Hauke Mehrtens [Sat, 3 Dec 2022 02:04:40 +0000 (03:04 +0100)]
CI: Build all boards and testing kernel

This adds options to build all boards of a selected target and an
additional option to build the testing kernel instead of the normal
kernel. This can be used by other trigger work flows.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agoCI: Allow building with internal toolchain
Hauke Mehrtens [Sat, 5 Nov 2022 13:27:11 +0000 (14:27 +0100)]
CI: Allow building with internal toolchain

This adds an option to build with internal toolchain. This can be used
to build targets which are currently not build by the OpenWrt build bots
and which needs their own toolchain build for every build.

Building the toolchain takes about 30 minutes compared to using the
external toolchain which takes some seconds.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agoCI: Extract the OpenWrt building to own sub workflow
Hauke Mehrtens [Tue, 1 Nov 2022 18:10:01 +0000 (19:10 +0100)]
CI: Extract the OpenWrt building to own sub workflow

Extract the building of OpenWrt into an own workflow which is then
triggered by the kernel.yml and packages.yml workflow with different
inputs. This allows us to share much of the code of the workflow.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agoCI: Simplify if conditions
Hauke Mehrtens [Sat, 5 Nov 2022 13:38:35 +0000 (14:38 +0100)]
CI: Simplify if conditions

There is no need to put a ${{ }} around the if conditions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agomvebu: switch default kernel to 5.15
Stijn Segers [Fri, 2 Dec 2022 12:36:20 +0000 (13:36 +0100)]
mvebu: switch default kernel to 5.15

In light of https://github.com/openwrt/openwrt/issues/11077, switch mvebu
to 5.15 which has been the testing kernel on this target since April - over
half a year.

Run-tested on the following subtargets:
* cortexa9 (Turris Omnia - 03f41b1eb2f15ab06d5800274be6a67c64e2a629)
* cortexa72 (MikroTik RB5009UG+S+IN)

Tested-by: Enrico Mioso <mrkiko.rs@gmail.com> [GL-MV1000]
Signed-off-by: Stijn Segers <foss@volatilesystems.org>
23 months agorealtek: fix dell typo
Jan-Niklas Burfeind [Mon, 28 Nov 2022 16:58:17 +0000 (17:58 +0100)]
realtek: fix dell typo

should be add/delete or abbreviated add/del

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
23 months agorealtek: refactor keep vlan tag setup, fix tagged forwarding
Luiz Angelo Daros de Luca [Mon, 7 Nov 2022 23:10:08 +0000 (20:10 -0300)]
realtek: refactor keep vlan tag setup, fix tagged forwarding

The code in dsa.c:rtl83xx_port_enable() was trying to set
vlan_port_tag_sts_ctrl while dealing with differences between SoCs.
However, not only that register has a different address, the register
structure and even the 2-bit value semantic changes for each SoC.

The vlan_port_tag_sts_ctrl field was dropped and converted into a
vlan_port_keep_incoming_tag_set() function that abstracts the different
between SoCs. The macro referencing that register migrated to the SoC
specific c file as it will be privately used by each file.

All magic numbers were converted into macros using BITMASK and
FIELD_PREP.

The vlan_port_tag_sts_ctrl debugfs was dropped for now as it is already
broken for rtl93xx. The best place for SoC specific code might be in each
respective c file and not in if/else clauses.

The final result is:

rtl838x: set ITAG_STS=TAGGED, same as before
rtl839x: set ITAG_STS=TAGGED instead of IGR_P_ITAG_KEEP=0x1, fixing
 forwarding of tagged packets
rtl930x: set EGR_ITAG_STS=TAGGED instead of IGR_P_ITAG=0x1, possibly
 fixing forwarding of tagged packets
rtl931x: set EGR_ITAG_STS=TAGGED instead of OTPID_KEEP=0x1, possibly
         fixing forwarding of tagged packets

Without (EGR_)ITAG_STS=TAGGED, at least for rtl839x, forwarded packets
will drop the vlan tag while packets from the CPU will still have the
correct tag.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
23 months agorealtek: Fix rtl930x speed status accessor
Olliver Schinagl [Mon, 31 Oct 2022 13:02:52 +0000 (14:02 +0100)]
realtek: Fix rtl930x speed status accessor

The rtl930x speed status registers require 4 bits to indicate the speed
status. As such, we want to divide by 8. To make things consistent with
the rest of this code, use a bitshift however.

This bug probably won't affect many users yet, as there aren't many
rtl930x switches in the wild yet with more then 10 ports, and thus a
low-impact bugfix.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
[also fix port field extraction]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
23 months agoCI: labeler: fix wrong label for pr targeting stable branch
Christian Marangi [Thu, 1 Dec 2022 00:46:03 +0000 (01:46 +0100)]
CI: labeler: fix wrong label for pr targeting stable branch

The label used for stable branch is in the form of
release/[0-9][0-9].[0-9][0-9]
Currently we apply the name of the target branch as the label, fix this
and correctly use the current label.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agoCI: add support to tag pr targeting stable branch
Christian Marangi [Tue, 29 Nov 2022 18:53:23 +0000 (19:53 +0100)]
CI: add support to tag pr targeting stable branch

Add support to tag pr targeting stable branch matching the simple regex
of openwrt-[0-9][0-9].[0-9][0-9]. The tag that will be added will match
the pr target branch.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agouboot-mediatek: bpi-r3: raise CONFIG_LMB_MAX_REGIONS to 64
Daniel Golle [Tue, 29 Nov 2022 19:38:21 +0000 (19:38 +0000)]
uboot-mediatek: bpi-r3: raise CONFIG_LMB_MAX_REGIONS to 64

Raise CONFIG_LMB_MAX_REGIONS to 64 as there are going to be more than
8 (the default value) reserved regions to allow supporting offloading
Wireless-to-Ethernet traffic on MT7986.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agodnsmasq: add option to expose additional paths to jail
Daniel Golle [Sun, 27 Nov 2022 12:33:31 +0000 (12:33 +0000)]
dnsmasq: add option to expose additional paths to jail

Add new UCI list 'addn_mount' allowing the expose additional filesystem
paths to the jailed dnsmasq process. This is useful e.g. in case of
manually configured includes to the configuration file or symlinks
pointing outside of the exposed paths as used by e.g. the safe-search
package in the packages feed.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agoipq40xx: add support for Mikrotik wAP R ac / LTE / LTE6
Alexander Couzens [Sat, 12 Nov 2022 12:13:46 +0000 (12:13 +0000)]
ipq40xx: add support for Mikrotik wAP R ac / LTE / LTE6

The Mikrotik wAP R AC is an outdoor, dual band, dual radio (802.11ac) AP
with a miniPCIe slot for a LTE modem.
The wAP R AC is similar to the wAP AC but with the miniPCIe slot.
The wAP R AC requires installing a LTE modem.
The wAP LTE and wAP LTE6 comes with a LTE modem installed.

See https://mikrotik.com/product/wap_r_ac for more info.

Specifications:
- SoC: Qualcomm Atheros IPQ4018
- CPU: 4x ARM Cortex A7
- RAM: 128MB
- Storage: 16MB NOR flash
- Wireless:
   - Built-in IPQ4018 (SoC) 802.11b/g/n 2x2:2, internal antenna
   - Built-in IPQ4018 (SoC) 802.11a/n/ac 2x2:2, internal antenna
- Ethernet: Built-in IPQ4018 (SoC, QCA8075) , 2x 1000/100/10 ports
  one with 802.3af/at PoE in
- 1x Mini PCI-E port (USB2)

Installation:
Boot the initramfs image via TFTP, then flash the sysupgrade image using
sysupgrade. Details at https://openwrt.org/toh/mikrotik/common.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
23 months agoairoha: disable swconfig
Aleksander Jan Bajkowski [Sat, 15 Oct 2022 19:48:22 +0000 (21:48 +0200)]
airoha: disable swconfig

Swconfig isn't used by this target and can be disabled for
this reason. Airoha doesn't even have an Ethernet driver.
In the future, this target should get a DSA driver.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
23 months agoairoha: refresh config
Aleksander Jan Bajkowski [Sat, 15 Oct 2022 19:48:00 +0000 (21:48 +0200)]
airoha: refresh config

This was done by executing these command:
$ time make kernel_oldconfig CONFIG_TARGET=platform

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
23 months agolayerscape: kmod-ppfe: Use ppfe driver as module
Pawel Dembicki [Sat, 29 Oct 2022 20:59:50 +0000 (22:59 +0200)]
layerscape: kmod-ppfe: Use ppfe driver as module

In 8274451cb86 kmod-ppfe was changed to built-in because CONFIG_FSL_PPFE
was binary. In 5.10 and 5.15 kernel, PPFE driver can be build as module.

This patch switch kmod-ppfe from build-in to loadable module.
Loadable module helps to avoid hazard: driver is looking for firmware
file before mount root.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
23 months agolayerscape: switch kernel testing to 5.15
Pawel Dembicki [Wed, 19 Oct 2022 19:59:40 +0000 (21:59 +0200)]
layerscape: switch kernel testing to 5.15

Let's test layerscape with 5.15 kernel.

Run tested: LS1012A-FRDM, LS1046A-RDB (nor and sd-boot images),
    LS1021A-IOT (By @ArtelMike with u-boot fix)

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
23 months agolayerscape: Switch LS1012A-FRDM initramfs to gzip
Pawel Dembicki [Thu, 20 Oct 2022 07:54:18 +0000 (09:54 +0200)]
layerscape: Switch LS1012A-FRDM initramfs to gzip

At this moment LS1012A-FRDM have uncompressed initramfs image.

Error was caused, because gzip extract area overlap image.

Let's change loadaddr and enable gzip initramfs images again.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
23 months agolayerscape: remove kernel 5.4 dependences
Pawel Dembicki [Wed, 19 Oct 2022 20:08:48 +0000 (22:08 +0200)]
layerscape: remove kernel 5.4 dependences

5.4 kernel was removed. Let's clean old dependences.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
23 months agolayerscape: 5.15: refresh kernel config
Pawel Dembicki [Wed, 19 Oct 2022 19:57:28 +0000 (21:57 +0200)]
layerscape: 5.15: refresh kernel config

Done by 'make kernel_oldconfig'.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
23 months agolayerscape: copy patches 5.10 to 5.15
Pawel Dembicki [Wed, 19 Oct 2022 13:36:26 +0000 (15:36 +0200)]
layerscape: copy patches 5.10 to 5.15

One patch manually rebased:
302-arm64-dts-ls1012a-update-with-ppfe-support.patch

PFE driver patch recreated from NXP 5.15 tree:
701-staging-add-fsl_ppfe-driver.patch

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
23 months agolayerscape: copy config 5.10 to 5.15
Pawel Dembicki [Wed, 19 Oct 2022 11:51:52 +0000 (13:51 +0200)]
layerscape: copy config 5.10 to 5.15

Configs was just copied.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
23 months agolayerscape: refresh kernel config
Pawel Dembicki [Wed, 19 Oct 2022 10:43:07 +0000 (12:43 +0200)]
layerscape: refresh kernel config

Done by 'make kernel_oldconfig'.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
23 months agolayerscape: Fix SPI-NOR issues with vendor patches
Pawel Dembicki [Sat, 29 Oct 2022 21:42:03 +0000 (23:42 +0200)]
layerscape: Fix SPI-NOR issues with vendor patches

For some reason LS1012A and LS1046A devboards don't work well with
Spansion SPI NOR flash. It cause read and write errors like:

[   27.285887] jffs2: Newly-erased block contained word 0xc20031985 at offset 0x025ae000
[   27.468922] jffs2: Newly-erased block contained word 0x0 at offset 0x02573000
[   27.502615] jffs2: Newly-erased block contained word 0xe723f41e5823f110 at offset 0x02572000
[   27.541550] jffs2: Newly-erased block contained word 0x1a7d266ee6 at offset 0x02571000
[   27.577195] jffs2: Newly-erased block contained word 0x5d000bae8d52fec6 at offset 0x02570000
[   27.611800] jffs2: Newly-erased block contained word 0x63515aee63515a4b at offset 0x0256f000
[   27.651749] jffs2: Newly-erased block contained word 0xc20031985 at offset 0x0256e000
[   27.825593] jffs2: Newly-erased block contained word 0xc20031985 at offset 0x0252e000

NXP have found workarround and applied in their vendor kernel version.
They force 1x tx and 1x rx lines in qspi. That method fix issues.
This patch ports patches from NXP LSDK tree.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
23 months agoath79: D-Link DIR-825 B1 add factory.bin recipe
Will Moss [Thu, 10 Nov 2022 19:55:11 +0000 (19:55 +0000)]
ath79: D-Link DIR-825 B1 add factory.bin recipe

- Bring back factory.bin image which was missing after porting device to ath79 target
- Use default sysupgrade.bin image recipe
- Adjust max image size according to new firmware partition size after
"ath79: expand rootfs for DIR-825-B1 with unused space (aca8bb5)" changes
- Remove support of upgrading from version 19.07, because partition size changes mentioned above

Signed-off-by: Will Moss <willormos@gmail.com>
23 months agoath79: add support for Senao Engenius EAP1750H
Michael Pratt [Wed, 24 Mar 2021 06:26:11 +0000 (02:26 -0400)]
ath79: add support for Senao Engenius EAP1750H

FCC ID: A8J-EAP1750H

Engenius EAP1750H is an indoor wireless access point with
1 Gb ethernet port, dual-band wireless,
internal antenna plates, and 802.3at PoE+

**Specification:**

  - QCA9558 SOC
  - QCA9880 WLAN PCI card, 5 GHz, 3x3, 26dBm
  - AR8035-A PHY RGMII GbE with PoE+ IN
  - 40 MHz clock
  - 16 MB FLASH MX25L12845EMI-10G
  - 2x 64 MB RAM NT5TU32M16FG
  - UART at J10 populated
  - 4 internal antenna plates (5 dbi, omni-directional)
  - 5 LEDs, 1 button (power, eth0, 2G, 5G, WPS) (reset)

**MAC addresses:**

  MAC addresses are labeled as ETH, 2.4G, and 5GHz
  Only one Vendor MAC address in flash

  eth0 ETH  *:fb art 0x0
  phy1 2.4G *:fc ---
  phy0 5GHz *:fd ---

**Serial Access:**

  the RX line on the board for UART is shorted to ground by resistor R176
  therefore it must be removed to use the console
  but it is not necessary to remove to view boot log

  optionally, R175 can be replaced with a solder bridge short

  the resistors R175 and R176 are next to the UART RX pin at J10

**Installation:**

  2 ways to flash factory.bin from OEM:

  Method 1: Firmware upgrade page:

    OEM webpage at 192.168.1.1
    username and password "admin"
    Navigate to "Firmware Upgrade" page from left pane
    Click Browse and select the factory.bin image
    Upload and verify checksum
    Click Continue to confirm and wait 3 minutes

  Method 2: Serial to load Failsafe webpage:

    After connecting to serial console and rebooting...
    Interrupt uboot with any key pressed rapidly
    execute `run failsafe_boot` OR `bootm 0x9fd70000`
    wait a minute
    connect to ethernet and navigate to
    "192.168.1.1/index.htm"
    Select the factory.bin image and upload
    wait about 3 minutes

**Return to OEM:**

  If you have a serial cable, see Serial Failsafe instructions
  otherwise, uboot-env can be used to make uboot load the failsafe image

  ssh into openwrt and run
  `fw_setenv rootfs_checksum 0`
  reboot, wait 3 minutes
  connect to ethernet and navigate to 192.168.1.1/index.htm
  select OEM firmware image from Engenius and click upgrade

**TFTP recovery:**

  Requires serial console, reset button does nothing

  rename initramfs to 'vmlinux-art-ramdisk'
  make available on TFTP server at 192.168.1.101
  power board, interrupt boot
  execute tftpboot and bootm 0x81000000

  NOTE: TFTP is not reliable due to bugged bootloader
  set MTU to 600 and try many times
  if your TFTP server supports setting block size
  higher block size is better.

**Format of OEM firmware image:**

  The OEM software of EAP1750H is a heavily modified version
  of Openwrt Kamikaze. One of the many modifications
  is to the sysupgrade program. Image verification is performed
  simply by the successful ungzip and untar of the supplied file
  and name check and header verification of the resulting contents.
  To form a factory.bin that is accepted by OEM Openwrt build,
  the kernel and rootfs must have specific names...

    openwrt-ar71xx-generic-eap1750h-uImage-lzma.bin
    openwrt-ar71xx-generic-eap1750h-root.squashfs

  and begin with the respective headers (uImage, squashfs).
  Then the files must be tarballed and gzipped.
  The resulting binary is actually a tar.gz file in disguise.
  This can be verified by using binwalk on the OEM firmware images,
  ungzipping then untaring.

  Newer EnGenius software requires more checks but their script
  includes a way to skip them, otherwise the tar must include
  a text file with the version and md5sums in a deprecated format.

  The OEM upgrade script is at /etc/fwupgrade.sh.

  OKLI kernel loader is required because the OEM software
  expects the kernel to be no greater than 1536k
  and the factory.bin upgrade procedure would otherwise
  overwrite part of the kernel when writing rootfs.

Note on PLL-data cells:

  The default PLL register values will not work
  because of the external AR8035 switch between
  the SOC and the ethernet port.

  For QCA955x series, the PLL registers for eth0 and eth1
  can be see in the DTSI as 0x28 and 0x48 respectively.
  Therefore the PLL registers can be read from uboot
  for each link speed after attempting tftpboot
  or another network action using that link speed
  with `md 0x18050028 1` and `md 0x18050048 1`.

  The clock delay required for RGMII can be applied
  at the PHY side, using the at803x driver `phy-mode`.
  Therefore the PLL registers for GMAC0
  do not need the bits for delay on the MAC side.
  This is possible due to fixes in at803x driver
  since Linux 5.1 and 5.3

Signed-off-by: Michael Pratt <mcpratt@pm.me>
23 months agoath79: use nvmem-cells for radio calibration of EAP1200H
Michael Pratt [Wed, 23 Nov 2022 21:00:28 +0000 (16:00 -0500)]
ath79: use nvmem-cells for radio calibration of EAP1200H

Transition from userscript to DTS for all of ART.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
23 months agoath79: calibrate TP-LINK TL-WR2543ND with nvmem
Edward Chow [Tue, 22 Nov 2022 10:49:21 +0000 (18:49 +0800)]
ath79: calibrate TP-LINK TL-WR2543ND with nvmem

Driver for and pci wlan card now pull the calibration data from the nvmem
subsystem.

This allows us to move the userspace caldata extraction for the pci-e ath9k
supported wifi into the device-tree definition of the device.

The wifi mac address remains correct after these changes, because When both
"mac-address" and "calibration" are defined, the effective mac address
comes from the cell corresponding to "mac-address" and
mac-address-increment.

Test passed on my tplink tl-wr2543nd.

Signed-off-by: Edward Chow <equu@openmail.cc>
23 months agoscripts: remove redundant character '0x0a' from Linksys image signature
Shiji Yang [Sun, 20 Nov 2022 03:15:16 +0000 (11:15 +0800)]
scripts: remove redundant character '0x0a' from Linksys image signature

The redundant character '0x0a' after the 192 bytes '0x00' padding broke
the factory image. We need to remove it to make things work again.

Fixes: e6769d11f3 scripts: fix missing character '0' issue in linksys image
Tested-by: Tony Butler <spudz76@gmail.com>
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
23 months agokernel: bump 5.10 to 5.10.156
John Audia [Fri, 25 Nov 2022 21:10:45 +0000 (16:10 -0500)]
kernel: bump 5.10 to 5.10.156

Manually rebased: ath79/patches-5.10/910-unaligned_access_hacks.patch

All other patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
23 months agokernel: bump 5.15 to 5.15.80
John Audia [Sat, 26 Nov 2022 11:51:56 +0000 (06:51 -0500)]
kernel: bump 5.15 to 5.15.80

Manually rebase:
   pending-5.15/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch
   ath79/patches-5.15/910-unaligned_access_hacks.patch

All other patches automatically rebased

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

Signed-off-by: John Audia <therealgraysky@proton.me>
23 months agomac80211: subsys: complete patch files for use with git am
Nick Hainke [Sun, 20 Nov 2022 09:35:13 +0000 (10:35 +0100)]
mac80211: subsys: complete patch files for use with git am

Adding proper fields to patch files allowing for `git am` to properly
function.

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agowolfssl: fix Config.in typo
Tony Butler [Sun, 20 Nov 2022 08:05:33 +0000 (00:05 -0800)]
wolfssl: fix Config.in typo

Fix simple typo `/crytpo/crypto/` in a description string

Signed-off-by: Tony Butler <spudz76@gmail.com>
23 months agowolfssl: update to v5.5.3
Nick Hainke [Wed, 16 Nov 2022 07:48:02 +0000 (08:48 +0100)]
wolfssl: update to v5.5.3

Remove "200-ecc-rng.patch" because it was upstramed by:
https://github.com/wolfSSL/wolfssl/commit/e2566bab2122949a6a0bb2276d0a52598794d7d0
Refreshed "100-disable-hardening-check.patch".

Fixes CVE 2022-42905.

Release Notes:
- https://github.com/wolfSSL/wolfssl/releases/tag/v5.5.2-stable
- https://github.com/wolfSSL/wolfssl/releases/tag/v5.5.3-stable

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agoipset: update to 7.16
Nick Hainke [Tue, 22 Nov 2022 07:58:09 +0000 (08:58 +0100)]
ipset: update to 7.16

Release Notes:
https://lore.kernel.org/netfilter-devel/d65fe5d8-d5ea-ef7-102d-aa1d15bb4d69@netfilter.org/T/#u

Patch "0001-lib-ipset-fix-printf-warning.patch" replaced upstream by:
http://git.netfilter.org/ipset/commit/?id=e39e3466d2d38cdfe83447f391b550e607bc3ce8

Remove upstreamed:
- 0002-Fix-IPv6-sets-nftables-translation.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agonls.mk: fixup cmake packages
Rosen Penev [Tue, 22 Nov 2022 01:02:31 +0000 (17:02 -0800)]
nls.mk: fixup cmake packages

Instead of manually overriding every cmake package that uses iconv or
gettext's paths, add the prefix in here so that at least FindIconv.cmake
works. Fixes compilation with BUILD_NLS.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
23 months agotools/mpfr: update to 4.1.1
Nick Hainke [Thu, 24 Nov 2022 00:28:09 +0000 (01:28 +0100)]
tools/mpfr: update to 4.1.1

Changes:
- Bug fixes
- Improved manual formatting

Refresh patches:
- 001-only_src.patch

Import patch fixing macro bug:
- 002-Fix-mpfr_custom_get_kind-macro-bug.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agotools/bash: update to 5.2.9
Nick Hainke [Thu, 17 Nov 2022 10:13:09 +0000 (11:13 +0100)]
tools/bash: update to 5.2.9

Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agoipq806x: disable cache and fabric devfreq driver to improve stability
Christian Marangi [Fri, 25 Nov 2022 23:38:31 +0000 (00:38 +0100)]
ipq806x: disable cache and fabric devfreq driver to improve stability

It was tested that cache scaling currently cause instability problem.
This is probably caused by a latent misconfiguration that cause the L2
cache to be sourced from the wrong source and runs at an unstable freq
compared to the original QSDK fw.

To improve stability while the problem is bisected, disable the devfreq
drivers with minimal perf penality.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
23 months agokernel: fix mtk_eth_soc issue when using secondary GMAC on MT7621/MT7622
Felix Fietkau [Fri, 25 Nov 2022 00:56:29 +0000 (01:56 +0100)]
kernel: fix mtk_eth_soc issue when using secondary GMAC on MT7621/MT7622

The CDMQ ingress special tag flag needs to be set for 7986 even without DSA
untag offload, otherwise tx checksum offload seems to break

Fixes: 9b482ee22f3f ("kernel: add more fixes for mtk_eth_soc")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agomediatek: set persistent wifi mac for bpi-r64 and bpi-r3
Daniel Golle [Thu, 24 Nov 2022 16:38:29 +0000 (16:38 +0000)]
mediatek: set persistent wifi mac for bpi-r64 and bpi-r3

Use persistent MAC address for the built-in wireless interfaces of the
BPi-R64 and BPi-R3 development boards.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agoipq40xx: remove '-fit' string from kernel filenames
Daniel Golle [Thu, 17 Nov 2022 02:03:59 +0000 (02:03 +0000)]
ipq40xx: remove '-fit' string from kernel filenames

The type of those images is already distinguishable by the '.itb'
extension, there is no need for an additional '-fit' string in the
filenames. Remove it to behave more like other targets.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agoipq40xx: remove 'nand-' string from image filenames
Daniel Golle [Thu, 17 Nov 2022 01:52:50 +0000 (01:52 +0000)]
ipq40xx: remove 'nand-' string from image filenames

Only on the ipq40xx subtarget different filenames were used for NAND-
based devices. This is unneeded, confusing and breaks downstream tools
such as luci-app-attendedsysupgrade and auc.
Remove the 'nand-' string from image filenames to fix that.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agokernel/module/iio: add TI am335x ADC driver
Alexander Couzens [Mon, 21 Nov 2022 14:46:42 +0000 (14:46 +0000)]
kernel/module/iio: add TI am335x ADC driver

Add the iio driver for the embedded ADC in the
TI Sitara am335x SoCs.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
23 months agobcm27xx: sound-soc-justboom-*: fix packages
Edmunt Pienkowsky [Thu, 15 Sep 2022 14:14:52 +0000 (16:14 +0200)]
bcm27xx: sound-soc-justboom-*: fix packages

Affected packages: sound-soc-justboom-both, sound-soc-justboom-dac and sound-soc-justboom-digi.

- Add snd-soc-wm8804-i2c and/or snd-soc-pcm512x-i2c kernel modules.
- Add kmod-regmap-i2c package dependency.

Signed-off-by: Edmunt Pienkowsky <roed@onet.eu>
23 months agobcm27xx: sound-soc-hifiberry-digi: fix package
Edmunt Pienkowsky [Thu, 15 Sep 2022 13:54:42 +0000 (15:54 +0200)]
bcm27xx: sound-soc-hifiberry-digi: fix package

- Add snd-soc-wm8804-i2c kernel module,
- Add kmod-regmap-i2c package dependency.

Signed-off-by: Edmunt Pienkowsky <roed@onet.eu>
23 months agobcm27xx: disable duplicate sdhost driver
John Audia [Sat, 19 Nov 2022 13:41:25 +0000 (08:41 -0500)]
bcm27xx: disable duplicate sdhost driver

Enabling both CONFIG_MMC_BCM2835 and CONFIG_MMC_BCM2835_SDHOST causes this
error in dmesg:
Error: Driver 'sdhost-bcm2835' is already registered, aborting...

Disabling CONFIG_MMC_BCM2835 and leaving CONFIG_MMC_BCM2835_SDHOST enabled
avoids this error.

Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

Signed-off-by: John Audia <therealgraysky@proton.me>
[Disable driver for all subtargets, refresh configs, tweak description]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
23 months agokernel: fix regression on mt7986
Felix Fietkau [Wed, 23 Nov 2022 10:33:44 +0000 (11:33 +0100)]
kernel: fix regression on mt7986

The CDMQ ingress special tag flag needs to be set for 7986 even without DSA
untag offload, otherwise tx checksum offload seems to break

Fixes: 9b482ee22f3f ("kernel: add more fixes for mtk_eth_soc")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agokernel: add WED rx support for mediatek
Felix Fietkau [Mon, 21 Nov 2022 19:46:46 +0000 (20:46 +0100)]
kernel: add WED rx support for mediatek

This is required for rx flow offloading on mt76 with MT7986 and MT7915

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agokernel: add a locking fix for netfilter hardware flow offloading
Felix Fietkau [Mon, 21 Nov 2022 19:43:12 +0000 (20:43 +0100)]
kernel: add a locking fix for netfilter hardware flow offloading

Protect the flow block cb list readers against concurrent updates

Reported-by: Chad Monroe <chad.monroe@smartrg.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agokernel: add more fixes for mtk_eth_soc
Felix Fietkau [Sat, 19 Nov 2022 18:04:08 +0000 (19:04 +0100)]
kernel: add more fixes for mtk_eth_soc

Fix corner cases in DSA offload
Add refcounting fix for flow offload
Fix VLAN untagging issue on MT7986

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agotools/patch: apply patch for EACCES on xattr copy
Thomas Weißschuh [Wed, 9 Nov 2022 04:17:00 +0000 (05:17 +0100)]
tools/patch: apply patch for EACCES on xattr copy

When compiling OpenWRT on a compressed btrfs volume the build fails in
libtool.
The file `libltdl/config/ltmain.m4sh` from `libtool-2.4.2.tar.xz` is
missing write permissions, therefore patch falls back to copying the
file and patching that. During this patch tries to preserve all file
attribute on the new copy.
However the attribute `btrfs.compression` is privileged and btrfs return
EACCES.
While patch ignores multiple other error codes during the copy of xattr
copy it is not prepared for EACCES and aborts.

EACCES should be ignored the same way as the other errors.

Build log:
```
...
Applying ./patches/000-relocatable.patch using plaintext:
patching file libltdl/config/general.m4sh
patching file libtoolize.in
patching file libtoolize.m4sh
patching file libltdl/m4/libtool.m4

Applying ./patches/100-libdir-fixes.patch using plaintext:
patching file libltdl/config/ltmain.m4sh
File libltdl/config/ltmain.sh is read-only; trying to patch anyway
patching file libltdl/config/ltmain.sh
patch: setting attribute btrfs.compression for btrfs.compression: Permission denied
Patch failed!  Please fix ./patches/100-libdir-fixes.patch!
```

Link: https://lists.gnu.org/archive/html/bug-patch/2022-11/msg00000.html
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
23 months agoramips: add support for Keenetic KN-3010
Maxim Anisimov [Fri, 11 Nov 2022 09:52:38 +0000 (12:52 +0300)]
ramips: add support for Keenetic KN-3010

Keenetic KN-3010 is a 2.4/5 Ghz band 11ac (Wi-Fi 5) router, based on MT7621DAT.

Specification:
- System-On-Chip: MT7621DAT
- CPU/Speed: 880 MHz
- Flash-Chip: Winbond w25q256
- Flash size: 32768 KiB
- RAM: 128 MiB
- 5x 10/100/1000 Mbps Ethernet
- 4x external, non-detachable antennas
- UART (J1) header on PCB (115200 8n1)
- Wireless No1 (2T2R): MT7603E 2.4 GHz 802.11bgn
- Wireless No2 (2T2R): MT7613BE 5 GHz 802.11ac
- 4x LED, 2x button, 1x mode switch

Notes:
- The device supports dual boot mode
- The firmware partitions were concatinated into one
- The FN button led indicator has been reassigned as the 2.4GHz
  wifi indicator.

Flash instruction:
The only way to flash OpenWrt image is to use tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-ramips-mt7621-keenetic_kn-3010-squashfs-factory.bin"
   to "KN-3010_recovery.bin" and place it in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed until power led start blinking.
4. Router will download file from server, write it to flash and reboot.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
23 months agox86: enable PINCTRL for all Intel platform
Xiaopo Zhang [Sat, 19 Nov 2022 02:46:28 +0000 (10:46 +0800)]
x86: enable PINCTRL for all Intel platform

Enable Intel PINCTRL for all platform on both 32 bit and 64 bit target.

Signed-off-by: Xiaopo Zhang <xiaopoz@proton.me>
23 months agox86/64: enable Intel PINCTRL in 64bit target
Xiaopo Zhang [Thu, 17 Nov 2022 13:17:36 +0000 (21:17 +0800)]
x86/64: enable Intel PINCTRL in 64bit target

Intel PINCTRL is not enable in the 64bit build, while it is enabled in
the x86/general target, which disables the ability of controlling GPIO
in the 64 bit build.

This commit copies the corresponding part of x86/general config, since
it is already there, so it should be fine to enable the same settings
here.

Signed-off-by: Xiaopo Zhang <xiaopoz@proton.me>
23 months agoath79: fix MAC address assigment for TP-Link TL-WR740N/TL-WR741ND v4
Will Moss [Sat, 19 Nov 2022 10:35:33 +0000 (10:35 +0000)]
ath79: fix MAC address assigment for TP-Link TL-WR740N/TL-WR741ND v4

On TP-Link TL-WR740N/TL-WR741ND v4 LAN MAC address (eth1 in DTS) is main
device MAC address, so do not increment it. WAN MAC is LAN MAC + 1.

Signed-off-by: Will Moss <willormos@gmail.com>
23 months agoath79: disable image building for Ubiquiti EdgeSwitch 8XP
Roger Pueyo Centelles [Fri, 18 Nov 2022 15:39:27 +0000 (16:39 +0100)]
ath79: disable image building for Ubiquiti EdgeSwitch 8XP

The downstream OpenWrt driver for the BCM53128 switch ceased to work,
rendering the 8 LAN ports of the device unusable. This commit disables
image building while the problem is being solved.

See issue #10374 for more details.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
23 months agoath79: calibrate nand netgear wndrxxxx with nvmem
Edward Chow [Sun, 20 Nov 2022 03:22:31 +0000 (11:22 +0800)]
ath79: calibrate nand netgear wndrxxxx with nvmem

Driver for both soc (2.4GHz Wifi) and pci (5 GHz) now pull the calibration
data from the nvmem subsystem.

This allows us to move the userspace caldata extraction for the pci-e ath9k
supported wifi into the device-tree definition of the device.

wmac's nodes are also changed over to use nvmem-cells over OpenWrt's
custom mtd-cal-data property.

The wifi mac address remains correct after these changes, because When both
"mac-address" and "calibration" are defined, the effective mac address
comes from the cell corresponding to "mac-address" and
mac-address-increment.

Test passed on my wndr3700v4 and wndr4500v3.
Signed-off-by: Edward Chow <equu@openmail.cc>
23 months agokernel: backport tso for asix driver
Aleksander Jan Bajkowski [Mon, 7 Mar 2022 21:31:45 +0000 (22:31 +0100)]
kernel: backport tso for asix driver

Performance comparison (iperf3, mtu 1500):
Before: 53.9 Mbps
After: 87.9 Mbps

The tests were performed on a BT Home Hub 5A router.
The iperf3 server was running on the router, the client
on the host.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
23 months agolantiq: xway: kernel: enable SMP support
Christian Buschau [Tue, 29 Mar 2022 12:14:43 +0000 (14:14 +0200)]
lantiq: xway: kernel: enable SMP support

Enabled CONFIG_MIPS_MT_SMP and CONFIG_SCHED_SMT.

Tested on FRITZ!Box 7330 SL, 7312 and o2 Box 4421.

Signed-off-by: Christian Buschau <christian.buschau@mailbox.org>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
23 months agolantiq: xway: ar9: add ICU1 (2nd core for SMP)
Christian Buschau [Sat, 27 Feb 2021 20:26:21 +0000 (21:26 +0100)]
lantiq: xway: ar9: add ICU1 (2nd core for SMP)

Fixes leftover TODO from commit 6bf179b27004eb76df3e466bd080fc5a83ccf0dd

Signed-off-by: Christian Buschau <christian.buschau@mailbox.org>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
23 months agolantiq: xway: refresh kernel config
Christian Buschau [Tue, 29 Mar 2022 12:08:45 +0000 (14:08 +0200)]
lantiq: xway: refresh kernel config

Run of 'make kernel_oldconfig CONFIG_TARGET=subtarget'

Signed-off-by: Christian Buschau <christian.buschau@mailbox.org>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
23 months agoath79: calibrate all ar9344 tl-WDRxxxx with nvmem
Edward Chow [Wed, 9 Nov 2022 09:18:17 +0000 (17:18 +0800)]
ath79: calibrate all ar9344 tl-WDRxxxx with nvmem

Driver for both soc (2.4GHz Wifi) and pci (5 GHz) now pull the calibration
data from the nvmem subsystem.

This allows us to move the userspace caldata extraction for the pci-e ath9k
supported wifi into the device-tree definition of the device.

wmac's nodes are also changed over to use nvmem-cells over OpenWrt's
custom mtd-cal-data property.

The wifi mac address remains correct after these changes, because When both
"mac-address" and "calibration" are defined, the effective mac address
comes from the cell corresponding to "mac-address" and
mac-address-increment.

Test passed on my tplink tl-wdr4310.

Signed-off-by: Edward Chow <equu@openmail.cc>