openwrt/staging/wigyori.git
2 years agogeneric: refresh config for kernel 5.15
Ansuel Smith [Thu, 4 Nov 2021 22:22:29 +0000 (23:22 +0100)]
generic: refresh config for kernel 5.15

Refresh kernel 5.15 generic config file

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2 years agogeneric: standardize tcp_no_window_check pending patch for 5.15
Ansuel Smith [Sun, 7 Nov 2021 21:33:21 +0000 (22:33 +0100)]
generic: standardize tcp_no_window_check pending patch for 5.15

Standardize pending patch tcp_no_window_check patch as with
new kernel they added a check for global variables.
The 2 new condition are that they must be read-only or
the data pointer should not point to kernel/module global
data.
Remove the global variable and move it to a standard place
following other variables logic.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2 years agogeneric: rework pending patch for 5.15
Ansuel Smith [Thu, 4 Nov 2021 23:48:27 +0000 (00:48 +0100)]
generic: rework pending patch for 5.15

Rework pending patch for kernel 5.15

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2 years agogeneric: rework hack patch for 5.15
Ansuel Smith [Thu, 4 Nov 2021 22:25:50 +0000 (23:25 +0100)]
generic: rework hack patch for 5.15

Rework hack patch in dir for kernel 5.15.
For the specific patch of packet mangeling introduce a new extra_priv_flags
as we don't have enough space to add additional flags in priv_flags.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2 years agogeneric: drop upstream patch for 5.15
Ansuel Smith [Thu, 4 Nov 2021 22:21:11 +0000 (23:21 +0100)]
generic: drop upstream patch for 5.15

Drop upstream patch from backport dir for kernel 5.15

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2 years agogeneric: copy config and patch from 5.10 to 5.15
Ansuel Smith [Thu, 4 Nov 2021 20:52:43 +0000 (21:52 +0100)]
generic: copy config and patch from 5.10 to 5.15

Copy config and patches from kernel 5.10 to kernel 5.15

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2 years agokernel: drop obsolete kmod-video-core dependencies
Stijn Tintel [Wed, 17 Mar 2021 00:14:09 +0000 (02:14 +0200)]
kernel: drop obsolete kmod-video-core dependencies

These dependencies do not exist in any of the supported kernel versions.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2 years agokernel: drop obsolete symbols from kmod-video-core
Stijn Tintel [Wed, 17 Mar 2021 00:06:43 +0000 (02:06 +0200)]
kernel: drop obsolete symbols from kmod-video-core

These symbols don't exist in any of the supported kernel versions.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2 years agoprocd: update to git HEAD
Daniel Golle [Mon, 20 Dec 2021 02:21:23 +0000 (02:21 +0000)]
procd: update to git HEAD

 eb522fc uxc: consider uvol and etc location for configurations
 16a6ee9 uxc: integrate console into uxc
 129d050 remove ujail-console

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agohostapd: make OpenWrt statistics per-BSS
David Bauer [Sat, 18 Dec 2021 16:24:09 +0000 (17:24 +0100)]
hostapd: make OpenWrt statistics per-BSS

WNM and RRM statistics were incorrectly per-PHY, leading to shared
statistic counters per BSS.

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agohostapd: provide BSS-transition-queries to ubus subscribers
David Bauer [Sat, 30 Oct 2021 22:11:51 +0000 (00:11 +0200)]
hostapd: provide BSS-transition-queries to ubus subscribers

Provide incoming BSS transition queries to ubus subscribers.

This allows external steering daemons to provide clients with
an optimal list of transition candidates.

This commit has no functional state in case no ubus subscriber is
present or it does not handle this ubus message.

To prevent hostapd from sending out a generic response by itself, a
subscribing daemon has to return a non-zero response code to hostapd.

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agohostapd: WNM: allow specifying dialog-token
David Bauer [Mon, 27 Sep 2021 13:53:25 +0000 (15:53 +0200)]
hostapd: WNM: allow specifying dialog-token

Backport a patch to allow extending the ubus BSS-transition method
for specifying individual dialog tokens for BSS transition
management requests.

This is required for handling BSS transition queries in the future.

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agoramips: work around duplicate MAC address on U6 Lite
David Bauer [Fri, 17 Dec 2021 23:33:57 +0000 (00:33 +0100)]
ramips: work around duplicate MAC address on U6 Lite

The UniFi 6 Lite has two MAC addresses for the 2.4 and 5GHz radio in
it's EEPROM partition.

On my unit these are

F4 92 BF A0 BB 6F
F6 92 BF A0 BB 6F

The problem with these is that mac80211 increases the first octet by
2, which leads to conflicting MAC addresses between radios.

Work around this problem for now by increasing the last octet by 1 on
the 5 GHz radio.

Ubiquiti increases the last octet by 2 for each subsequent VAP created
per radio. Ideally we should do the same, however this functionality is
currently lacking from mac80211.

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agomediatek: mt7623: bpi-r2: add ethernet alias to device tree
Daniel Golle [Sat, 18 Dec 2021 01:45:44 +0000 (01:45 +0000)]
mediatek: mt7623: bpi-r2: add ethernet alias to device tree

Add ethernet0 alias in device tree to make U-Boot inherit the Ethernet
mac address (set via environment variable 'ethaddr') down to Linux.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agoodhcp6c: update to latest git HEAD
Hans Dedecker [Fri, 17 Dec 2021 20:04:54 +0000 (21:04 +0100)]
odhcp6c: update to latest git HEAD

39b584b Revert "dhcpv6: add a minimum valid lifetime for IA_PD updates"
c9578e1 dhcpv6: add support for null IA_PD valid lifetime
ca43ea3 dhcpv6: add a minimum valid lifetime for IA_PD updates

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2 years agonetifd: update to latest git HEAD
Hans Dedecker [Fri, 17 Dec 2021 19:54:44 +0000 (20:54 +0100)]
netifd: update to latest git HEAD

5ca5e0b netifd: allow disabling rule/rule6 config sections
8875960 interface-ip: add support for IPv6 prefix invalidation
e589c05 interface-ip: use metric when looking for a route
b54ffde main: fix hotplug script usage message

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2 years agokernel: 5.10: consolidate mac80211 crypto options
Sergey Ryazanov [Thu, 16 Dec 2021 22:23:08 +0000 (01:23 +0300)]
kernel: 5.10: consolidate mac80211 crypto options

Each of
- CRYPTO_AEAD2
- CRYPTO_AEAD
- CRYPTO_GF128MUL
- CRYPTO_GHASH
- CRYPTO_HASH2
- CRYPTO_HASH
- CRYPTO_MANAGER2
- CRYPTO_MANAGER
- CRYPTO_NULL2

either directly required for mac80211 crypto support, or directly
selected by such options. Support for the mac80211 crypto was enabled in
the generic config since c7182123b9 ("kernel: make cryptoapi support
needed by mac80211 built-in"). So move the above options from the target
configs to the generic config to make it clear why do we need them.

CC: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
2 years agokernel: filter out both Clang and LLD versions
Sergey Ryazanov [Thu, 16 Dec 2021 22:23:07 +0000 (01:23 +0300)]
kernel: filter out both Clang and LLD versions

Both CLANG_VERSION and LLD_VERISON are autogenerated runtime
configuration options, so add them to the kernel configuration filter
and remove from generic and per-target configs to keep configs clean.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
2 years agotoolchain/gcc: refresh gcc-11.2.0 patch
Ilya Lipnitskiy [Wed, 8 Dec 2021 01:28:23 +0000 (17:28 -0800)]
toolchain/gcc: refresh gcc-11.2.0 patch

Run make toolchain/gcc/minimal/refresh (with glibc, with musl
toolchain/gcc/{initial,final}/refresh don't work)

Fixes: ab241e0937c9 ("toolchain/gcc: fix build on MacOS arm64")
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2 years agotoolchain/gcc: replace revert with upstream fix
Ilya Lipnitskiy [Wed, 8 Dec 2021 01:28:22 +0000 (17:28 -0800)]
toolchain/gcc: replace revert with upstream fix

This will make upgrade to v11.3.0 easier and follows upstream more
closely.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2 years agotoolchain/gcc: remove upstreamed patch, add backport
Ilya Lipnitskiy [Wed, 8 Dec 2021 01:28:21 +0000 (17:28 -0800)]
toolchain/gcc: remove upstreamed patch, add backport

This patch has been upstream since GCC 10.
Dragan Mladjenovic (2):
      Emit .note.GNU-stack for soft-float linux targets.
      Emit .note.GNU-stack for hard-float linux targets.

Link: https://gcc.gnu.org/g:a3c1e1f2ff88
Link: https://gcc.gnu.org/g:54b3d52c3cca
Add backport patch to define TARGET_LIBC_GNUSTACK on musl to add
.note.GNU-stack on hard-float MIPS targets.

Link: https://gcc.gnu.org/g:25abbb924968
The net effect should be the exact same functionality while following
upstream code instead of a custom outdated patch.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2 years agokernel: bump 5.10 to 5.10.87
John Audia [Fri, 17 Dec 2021 11:42:51 +0000 (06:42 -0500)]
kernel: bump 5.10 to 5.10.87

All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, ipq806x/R7800*
Run-tested: bcm2711/RPi4B, ipq806x/R7800*

*Had to revert 7f1edbd41295dff9f2127b169fbc086c0fb2c14e in order to build
(binutils 2.37, https://bugs.openwrt.org/index.php?do=details&task_id=4149)

Signed-off-by: John Audia <graysky@archlinux.us>
2 years agokernel: bump 5.10 to 5.10.86
John Audia [Thu, 16 Dec 2021 18:27:45 +0000 (13:27 -0500)]
kernel: bump 5.10 to 5.10.86

All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, ipq806x/R7800*
Run-tested: bcm2711/RPi4B, ipq806x/R7800*

*Had to revert 7f1edbd41295dff9f2127b169fbc086c0fb2c14e in order to build
(binutils 2.37, https://bugs.openwrt.org/index.php?do=details&task_id=4149)

Signed-off-by: John Audia <graysky@archlinux.us>
2 years agokernel: bump 5.10 to 5.10.85
John Audia [Tue, 14 Dec 2021 11:15:08 +0000 (06:15 -0500)]
kernel: bump 5.10 to 5.10.85

Removed target for patch which does not exist:
    bcm27xx/patches-5.10/950-0249-kbuild-Disable-gcc-plugins.patch

All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, ipq806x/R7800*
Run-tested: bcm2711/RPi4B, ipq806x/R7800*

* Had to revert 7f1edbd41295dff9f2127b169fbc086c0fb2c14e in order to build
  (binutils 2.37, https://bugs.openwrt.org/index.php?do=details&task_id=4149)

Signed-off-by: John Audia <graysky@archlinux.us>
2 years agokernel: bump 5.10 to 5.10.84
John Audia [Wed, 8 Dec 2021 11:14:30 +0000 (06:14 -0500)]
kernel: bump 5.10 to 5.10.84

All patches automatically rebased.

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

Signed-off-by: John Audia <graysky@archlinux.us>
2 years agokernel: bump 5.4 to 5.4.167
John Audia [Fri, 17 Dec 2021 11:48:52 +0000 (06:48 -0500)]
kernel: bump 5.4 to 5.4.167

All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/mt7621*

*FS#4149 affects me so I had to revert 7f1edbd41295dff9f2127b169fbc086c0fb2c14e
in order to downgrade to 2.35.1

Signed-off-by: John Audia <graysky@archlinux.us>
2 years agokernel: bump 5.4 to 5.4.166
John Audia [Thu, 16 Dec 2021 19:53:58 +0000 (14:53 -0500)]
kernel: bump 5.4 to 5.4.166

All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/mt7621*

*FS#4149 affects me so I had to revert 7f1edbd41295dff9f2127b169fbc086c0fb2c14e
in order to downgrade to 2.35.1

Signed-off-by: John Audia <graysky@archlinux.us>
2 years agokernel: bump 5.4 to 5.4.165
John Audia [Wed, 15 Dec 2021 11:20:33 +0000 (06:20 -0500)]
kernel: bump 5.4 to 5.4.165

All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/mt7621*

*FS#4149 affects me so I had to revert 7f1edbd41295dff9f2127b169fbc086c0fb2c14e
in order to downgrade to 2.35.1

Signed-off-by: John Audia <graysky@archlinux.us>
2 years agomac80211: optimize airtime fairness code to reduce cpu usage
Felix Fietkau [Tue, 14 Dec 2021 16:58:14 +0000 (17:58 +0100)]
mac80211: optimize airtime fairness code to reduce cpu usage

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agohostapd: close correct blobmsg table
David Bauer [Thu, 16 Dec 2021 19:27:04 +0000 (20:27 +0100)]
hostapd: close correct blobmsg table

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agoramips: mt7620: tidy up 02_network
Sungbo Eo [Thu, 16 Dec 2021 13:14:48 +0000 (22:14 +0900)]
ramips: mt7620: tidy up 02_network

* fix alphabetic sorting
* consolidate duplicate cases

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2 years agobcm4908: add uboot-envtools to default packages
Rafał Miłecki [Thu, 16 Dec 2021 07:25:18 +0000 (08:25 +0100)]
bcm4908: add uboot-envtools to default packages

It's required by sysupgrade to access UBI metadata partitions.

Fixes: 5f05795aa771 ("bcm4908: sysupgrade: add pkgtb format support")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agokernel: backport support for multicolor & RGB LEDs to 5.4
Rafał Miłecki [Thu, 16 Dec 2021 06:07:34 +0000 (07:07 +0100)]
kernel: backport support for multicolor & RGB LEDs to 5.4

This is a requirement for backporting DT files defining such LEDs.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agokernel: backport the upstream implementation of threaded NAPI to 5.4
Felix Fietkau [Mon, 13 Dec 2021 17:15:07 +0000 (18:15 +0100)]
kernel: backport the upstream implementation of threaded NAPI to 5.4

The workqueue based implementation has a few corner cases and typically lower
performance than the upstream one

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agoramips: remove Linux 5.4 support
Rui Salvaterra [Tue, 14 Dec 2021 13:46:19 +0000 (13:46 +0000)]
ramips: remove Linux 5.4 support

We're at 5.10 stable, this can finally go.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2 years agoramips: fix Tenbay T-MB5EU v1 Wireless MAC
David Bauer [Tue, 14 Dec 2021 23:01:23 +0000 (00:01 +0100)]
ramips: fix Tenbay T-MB5EU v1 Wireless MAC

It was reported, that Tenbay T-MB5EU v1 do have incorrect Wireless MAC
address set on 2.4 and 5 GHz.

Some boards do not seem to have the correct MAC address set for the
external PHY of the MT7915 radio at caldata offset 0xa.

As the external PHY does not expose a DT binding (yet), fix up the mac
address in userspace.

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agohostapd: add OpenWrt specific statistic counters
David Bauer [Sat, 27 Nov 2021 21:08:28 +0000 (22:08 +0100)]
hostapd: add OpenWrt specific statistic counters

This adds a new struct for storing statistics not (yet) tracked by
hostapd regarding RRM and WNM activity.

These statistics can be read using the get_status hostapd interface ubus
method.

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agoiw: Update to version 5.16
Hauke Mehrtens [Sat, 20 Nov 2021 23:11:24 +0000 (00:11 +0100)]
iw: Update to version 5.16

Revert a commit to allow providing CFLAGS and LIBS from OpenWrt package
Makefile.

This downgrades the nl80211.h to kernel 5.15 and removes FILS_CRYPTO_OFFLOAD.
This is needed to make it compatible with our patched mac80211 from
kernel 5.15

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agolibnl-tiny: update to the latest version
Hauke Mehrtens [Sat, 20 Nov 2021 23:10:51 +0000 (00:10 +0100)]
libnl-tiny: update to the latest version

8e0555f attr.h: Add NLA_PUT_S32

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agomac80211: Update to version 5.15.8
Hauke Mehrtens [Sun, 5 Dec 2021 15:36:05 +0000 (16:36 +0100)]
mac80211: Update to version 5.15.8

The following patches were backported from upstream before and are not
needed any more:
  package/kernel/mac80211/patches/ath10k/081-ath10k-fix-module-load-regression-with-iram-recovery-feature.patch
  package/kernel/mac80211/patches/ath10k/980-ath10k-fix-max-antenna-gain-unit.patch
  package/kernel/mac80211/patches/build/010-headers-Add-devm_platform_get_and_ioremap_resource.patch
  package/kernel/mac80211/patches/subsys/300-mac80211-drop-check-for-DONT_REORDER-in-__ieee80211_.patch
  package/kernel/mac80211/patches/subsys/307-mac80211-do-not-access-the-IV-when-it-was-stripped.patch
  package/kernel/mac80211/patches/subsys/308-mac80211-fix-radiotap-header-generation.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agobcm4908: add fdt-utils to default packages
Rafał Miłecki [Tue, 14 Dec 2021 16:57:49 +0000 (17:57 +0100)]
bcm4908: add fdt-utils to default packages

It's required by sysupgrade.

Fixes: 5f05795aa771 ("bcm4908: sysupgrade: add pkgtb format support")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agolayerscape: armv7: refresh config-5.10
Martin Schiller [Wed, 3 Nov 2021 16:16:52 +0000 (17:16 +0100)]
layerscape: armv7: refresh config-5.10

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agolayerscape: armv7: copy config-5.4 to config-5.10
Martin Schiller [Wed, 3 Nov 2021 13:31:50 +0000 (14:31 +0100)]
layerscape: armv7: copy config-5.4 to config-5.10

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agolayerscape: armv8_64b: refresh config-5.10
Martin Schiller [Wed, 3 Nov 2021 10:29:35 +0000 (11:29 +0100)]
layerscape: armv8_64b: refresh config-5.10

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agolayerscape: armv8_64b: copy config-5.4 to config-5.10
Martin Schiller [Wed, 3 Nov 2021 09:51:53 +0000 (10:51 +0100)]
layerscape: armv8_64b: copy config-5.4 to config-5.10

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agolayerscape: armv8_64b: use non-SDK dts files for linux-5.10 or newer
Martin Schiller [Wed, 3 Nov 2021 09:36:35 +0000 (10:36 +0100)]
layerscape: armv8_64b: use non-SDK dts files for linux-5.10 or newer

Since we decided to drop the LSDK patches with linux-5.10, we now have
to switch to the corresponding upstream dts files as well.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agolayerscape: armv8_64b: fix KERNEL_LOADADDR for linux >= 5.8
Martin Schiller [Wed, 3 Nov 2021 09:27:04 +0000 (10:27 +0100)]
layerscape: armv8_64b: fix KERNEL_LOADADDR for linux >= 5.8

In kernel versions newer than 5.8 the arm64 TEXT_OFFSET (0x80000) has
been set to 0x0 (and later removed). This will break Uimages with kernel
load addresses that aren't 2MiB aligned any longer. Resulting in the
kernel silently fail to boot. For layerscape armv8_64b targets this
needs to be changed to 0x80000000 (start of RAM).

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agolayerscape: add patches for kernel 5.10
Martin Schiller [Wed, 3 Nov 2021 12:48:24 +0000 (13:48 +0100)]
layerscape: add patches for kernel 5.10

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agolayerscape: add kernel 5.10 as testing version
Martin Schiller [Wed, 3 Nov 2021 09:46:35 +0000 (10:46 +0100)]
layerscape: add kernel 5.10 as testing version

This patch adds "KERNEL_TESTING_PATCHVER:=5.10" to the Makefile in
layerscape target to allow using Kernel 5.10 for testing.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agolayerscape: remove unneeded KERNEL_ENTRY_POINT definition
Martin Schiller [Wed, 3 Nov 2021 09:18:39 +0000 (10:18 +0100)]
layerscape: remove unneeded KERNEL_ENTRY_POINT definition

As KERNEL_ENTRY_POINT is identical to KERNEL_LOADADDR, drop it.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agols-ddr-phy: bump to LSDK-21.08
Martin Schiller [Mon, 11 Oct 2021 10:54:48 +0000 (12:54 +0200)]
ls-ddr-phy: bump to LSDK-21.08

Update ls-ddr-phy to latest LSDK-21.08.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agorestool: bump to LSDK-21.08
Martin Schiller [Mon, 11 Oct 2021 10:54:09 +0000 (12:54 +0200)]
restool: bump to LSDK-21.08

Update restool to latest LSDK-21.08.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agols-dpl: bump to LSDK-21.08
Martin Schiller [Mon, 11 Oct 2021 10:53:06 +0000 (12:53 +0200)]
ls-dpl: bump to LSDK-21.08

Update ls-dpl to latest LSDK-21.08.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agols-mc: bump to LSDK-21.08
Martin Schiller [Mon, 11 Oct 2021 10:52:10 +0000 (12:52 +0200)]
ls-mc: bump to LSDK-21.08

Update ls-mc to latest LSDK-21.08.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agoppfe-firmware: bump to LSDK-21.08
Martin Schiller [Mon, 11 Oct 2021 10:51:13 +0000 (12:51 +0200)]
ppfe-firmware: bump to LSDK-21.08

Update ppfe-firmware to latest LSDK-21.08.

Switched to AUTORELEASE for simplicity.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agofman-ucode: bump to LSDK-21.08
Martin Schiller [Mon, 11 Oct 2021 10:49:56 +0000 (12:49 +0200)]
fman-ucode: bump to LSDK-21.08

Just update PKG_VERSION/PKG_MIRROR_HASH since fman-ucode
of LSDK-21.08 had no changes.

Switched to AUTORELEASE for simplicity.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agotfa-layerscape: bump to LSDK-21.08
Martin Schiller [Mon, 11 Oct 2021 10:43:55 +0000 (12:43 +0200)]
tfa-layerscape: bump to LSDK-21.08

Update tfa package to latest LSDK-21.08.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agouboot-layerscape: bump to LSDK-21.08
Martin Schiller [Thu, 7 Oct 2021 06:56:19 +0000 (08:56 +0200)]
uboot-layerscape: bump to LSDK-21.08

Update layerscape u-boot package to LSDK-21.08 and drop patches which
are no longer needed.

The new env variable 'fsl_bootcmd_mcinitcmd_set' is needed to protect
the configured bootcmd and mc_init values. See [1] for more
informations.

[1] https://source.denx.de/u-boot/u-boot/-/commit/b62c174e861bddc3c7131045ed018556645cecb9

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agols-rcw: bump to LSDK-21.08
Martin Schiller [Mon, 11 Oct 2021 10:46:38 +0000 (12:46 +0200)]
ls-rcw: bump to LSDK-21.08

Update ls-rcw to latest LSDK-21.08.
Drop patch 0001 since it had been integrated.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 years agoramips: switch to kernel 5.10
Rui Salvaterra [Thu, 9 Sep 2021 08:44:41 +0000 (09:44 +0100)]
ramips: switch to kernel 5.10

Tested on mt7621 (Redmi AC2100) and running stable for several months.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Tested-by: Stijn Segers <foss@volatilesystems.org>
Tested-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2 years agoramips: mt7620: use OKLI loader with Jboot devices
Pawel Dembicki [Thu, 10 Jun 2021 15:17:23 +0000 (17:17 +0200)]
ramips: mt7620: use OKLI loader with Jboot devices

Jboot devices have problem with >2MB kernelsize. The only way to avoid
this problem is use small loader.

This patch switch all mt7620 Jboot devices to lzma OKLI loader.

Suggested-by: Szabolcs Hubai <szab.hu@gmail.com>
Co-authored-by: Michael Pratt <mcpratt@pm.me>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2 years agobcm53xx: sysupgrade: fix support for Luxul's legacy firmware format
Rafał Miłecki [Mon, 13 Dec 2021 17:19:05 +0000 (18:19 +0100)]
bcm53xx: sysupgrade: fix support for Luxul's legacy firmware format

Fixes: 80041dea7094 ("bcm53xx: sysupgrade: refactor handling different firmware formats")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agootrx: update to the latest master
Rafał Miłecki [Mon, 13 Dec 2021 12:47:39 +0000 (13:47 +0100)]
otrx: update to the latest master

56e8e19 otrx: support TRX from stdin when extracting
a37ccaf otrx: support unsorted partitions offsets
1fa145e otrx: extract shared code opening & parsing TRX format
4ecefda otrx: allow validating TRX from stdin
cf01e69 otrx: avoid unneeded fseek() when calculating CRC32

Fixes: 80041dea7094 ("bcm53xx: sysupgrade: refactor handling different firmware formats")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agobcm4908: sysupgrade: add pkgtb format support
Rafał Miłecki [Wed, 8 Dec 2021 11:21:48 +0000 (12:21 +0100)]
bcm4908: sysupgrade: add pkgtb format support

BCM4908 devices with U-Boot use pkgtb firmware format. It's based on
U-Boot's FIT: DTB with configurations, images & embedded data.

This format contains bootfs, rootfs and optionally a first stage U-Boot
loader. Contained images need to be extracted & flashed.

Broadcom used two sets of firmwares: main & backup. It uses UBI volumes
"metadata1" & "metadata2" for storing U-Boot env variables with info
about flashed images.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agodtc: support printing binary data with fdtget
Rafał Miłecki [Tue, 7 Dec 2021 12:00:02 +0000 (13:00 +0100)]
dtc: support printing binary data with fdtget

It's needed for extracting binary images.

Cc: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agodtc: import package for dtc & fdt from packages feed
Rafał Miłecki [Tue, 7 Dec 2021 12:00:01 +0000 (13:00 +0100)]
dtc: import package for dtc & fdt from packages feed

fdt* utils are needed by targets that use U-Boot FIT images for
sysupgrade. It includes all recent BCM4908 SoC routers as Broadcom
switched from CFE to U-Boot.

fdtget is required for extracting images (bootfs & rootfs) from
Broadcom's ITB. Extracted images can be then flashed to UBI volumes.

sysupgrade is core functionality so it needs dtc as part of base code
base.

Cc: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agotreewide: use uniform vendor value for british telecom
Moritz Warning [Sat, 11 Dec 2021 08:33:46 +0000 (09:33 +0100)]
treewide: use uniform vendor value for british telecom

British Telecom is mostly known as BT.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
2 years agokernel: bump 5.10 to 5.10.83
John Audia [Wed, 1 Dec 2021 11:28:02 +0000 (06:28 -0500)]
kernel: bump 5.10 to 5.10.83

Removed upstreamed:
    bcm53xx/patches-5.10/033-v5.16-0024-ARM-dts-BCM5301X-Fix-I2C-controller-interrupt.patch[1]
    bcm53xx/patches-5.10/033-v5.16-0025-ARM-dts-BCM5301X-Add-interrupt-properties-to-GPIO-no.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.83&id=b2cd6fdcbe0a5cb44e4610a08cc58261d494a885
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.83&id=9db1d4a3c2700e1cc84c3d61199411d75c2a3ec6

Build system: x86_64*
Build-tested: bcm2711/RPi4B, ipq806x/R7800†
Run-tested: bcm2711/RPi4B, ipq806x/R7800†

* Had to revert 7c99085bd69742f66207d61e9f2da5ec4f8f9d2f in order to build
  (latest bump of ca-certificates)

† Had to revert 7f1edbd41295dff9f2127b169fbc086c0fb2c14e in order to build
  (binutils 2.37, https://bugs.openwrt.org/index.php?do=details&task_id=4149)

Signed-off-by: John Audia <graysky@archlinux.us>
2 years agoipq40xx: fix reset button GPIO for GL.iNet GL-B2200
Enrico Mioso [Fri, 3 Dec 2021 16:32:20 +0000 (17:32 +0100)]
ipq40xx: fix reset button GPIO for GL.iNet GL-B2200

GL.iNet's U-Boot checks for GPIO 40, not 43.
Changing this allows the RESET button to work as expected.

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
CC: Daniel Golle <daniel@makrotopia.org>
CC: Li Zhang <li.zhang@gl-inet.com>
2 years agoramips: add support for HUMAX E10
Kyoungkyu Park [Sat, 13 Nov 2021 16:03:24 +0000 (01:03 +0900)]
ramips: add support for HUMAX E10

HUMAX E10 (also known as HUMAX QUANTUM E10) is a 2.4/5GHz band AC router,
based on MediaTek MT7621A.

Specifications:
- SoC: MT7621A
- RAM: DDR3 128MB
- Flash: SPI NOR 16MB (MXIC MX25L12805D)
- WiFi:
  - 2.4GHz: MT7615
  - 5GHz: MT7615
- Ethernet: 2x 10/100/1000Mbps
  - Switch: SoC internal
- USB: 1x USB 2.0 Type-A
- UART: J1 (57600 8N1)
  - pinout: [3V3] (RXD) (GND) (TXD)

Installation via web interface:
- Flash **factory** image through the stock web interface.

Recovery procedure:
1. Connect ethernet cable between Router **LAN** port and PC Ethernet port.
2. Set your computer to a static IP **192.168.1.1**
3. Turn the device off and wait a few seconds. Hold the WPS button on front
   of device and insert power.
4. Send a firmware image to **192.168.1.6** using TFTP.
   You can use any TFTP client. (tftp, curl, Tftpd64...)
- It can accept both images which is
  HUMAX stock firmware dump (0x70000-0x1000000) image
  and OpenWRT **sysupgrade** image.

Signed-off-by: Kyoungkyu Park <choryu.park@choryu.space>
[remove trailing whitespace]
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2 years agoramips: mt76x8: tidy up 02_network
Sungbo Eo [Sun, 12 Dec 2021 11:25:56 +0000 (20:25 +0900)]
ramips: mt76x8: tidy up 02_network

* fix alphabetic sorting
* consolidate duplicate cases

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2 years agobuild: image: improve zip build recipe
Sungbo Eo [Sat, 4 Dec 2021 17:08:48 +0000 (02:08 +0900)]
build: image: improve zip build recipe

* clean before build
* specify executable path
* allow adding extra options for zip
* use basename of $@

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2 years agokernel: fix RCU issue in xt_FLOWOFFLOAD patch
Felix Fietkau [Tue, 30 Nov 2021 10:37:15 +0000 (11:37 +0100)]
kernel: fix RCU issue in xt_FLOWOFFLOAD patch

cond_resched() may not be called in a rcu-locked section

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agoprocd: update to git HEAD
Daniel Golle [Sat, 11 Dec 2021 03:16:16 +0000 (03:16 +0000)]
procd: update to git HEAD

 bb95fe8 jail: make sure jailed process is terminated

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agoath79: fix various dts warnings
Christian Lamparter [Fri, 10 Dec 2021 23:09:13 +0000 (00:09 +0100)]
ath79: fix various dts warnings

ar9344_openmesh_mr600-v1.dts:40.10-44.5: Warning (gpios_property):
/leds-ath9k/wifi2g: Missing property '#gpio-cells' in node
/ahb/pcie-controller@180c0000/wifi@0,0 or bad phandle
=> added gpio-controller + #gpio-cells

qca955x_zyxel_nbg6x16.dtsi:121.3-13: Warning (reg_format):
/ahb/usb@1b000000/port@1:reg: property has invalid length (4 bytes)
(#address-cells == 2, #size-cells == 1)
../dts/qca955x_zyxel_nbg6x16.dtsi:131.3-13: Warning (reg_format):
/ahb/usb@1b400000/port@1:reg: property has invalid length (4 bytes)
(#address-cells == 2, #size-cells == 1)
qca955x_zyxel_nbg6x16.dtsi:120.20-123.4: Warning (avoid_default_addr_size):
/ahb/usb@1b000000/port@1: Relying on default #address-cells value
=> ath79's usb-nodes are missing the address- and size-cells properties.
These are needed for usb led trigger support.

ar7242_ubnt_sw.dtsi:54.4-14: Warning (reg_format): /gpio_spi/gpio_spi@0:reg:
property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1)
=> the #address-cells and #size-cells had to be nudged.

qca9531_dlink_dch-g020-a1.dts:19.6-39.4: Warning (i2c_bus_bridge):
/i2c: incorrect #size-cells for I2C bus
=> #size-cells = <0>;

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agortl8812au-ct: update driver to be ready for 5.15
Janpieter Sollie [Thu, 9 Dec 2021 12:27:49 +0000 (13:27 +0100)]
rtl8812au-ct: update driver to be ready for 5.15

update rtl8812au-ct driver to be ready for 5.15 Linux.

Signed-off-by: Janpieter Sollie <janpieter.sollie@edpnet.be>
[added commit message from PR with changes, added tag to subject]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agolantiq: fixed wifi support for AVM FRITZ!Box 7430
Joel Linn [Wed, 8 Dec 2021 10:07:50 +0000 (11:07 +0100)]
lantiq: fixed wifi support for AVM FRITZ!Box 7430

adds the correct offset for the calibration data.
The values are according to the OpenWrt Forum Thread:
"Fritzbox 7430 and wifi".

Link: <https://forum.openwrt.org/t/fritzbox-7430-and-wifi/86944>
Reported-by: RENErica
Signed-off-by: Joel Linn <jl@conductive.de>
[changed commit message]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoath79: add support for WD My Net N600
Ryan Mounce [Tue, 16 Nov 2021 11:25:19 +0000 (21:55 +1030)]
ath79: add support for WD My Net N600

SoC: AR9344
RAM: 128MB
Flash: 16MiB SPI NOR
5GHz WiFi: AR9382 PCIe 2x2:2 802.11n
2.4GHz WiFi: AR9344 (SoC) AHB 2x2:2 802.11n

5x Fast ethernet via SoC switch (green LEDs)
1x USB 2.0
4x front LEDs from SoC GPIO
1x front WPS button from SoC GPIO
1x bottom reset button from SoC GPIO

UART header JP1, 115200 no parity 1 stop
TX
GND
VCC
(N/P)
RX

Flash factory image via "emergency room" recovery:
- Configure your computer with a static IP 192.168.1.123/24
- Connect to LAN port on the N600 switch
- Hold reset putton
- Power on, holding reset until the power LED blinks slowly
- Visit http://192.168.1.1/ and upload OpenWrt factory image
- Wait at least 5 minutes for flashing, reboot and key generation
- Visit http://192.168.1.1/ (OpenWrt LuCI) and upload OpenWrt sysupgrade image

Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
[dt leds preparations]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoath79: add support for jjPlus JWAP230
Olivier Valentin [Thu, 2 Dec 2021 16:05:18 +0000 (17:05 +0100)]
ath79: add support for jjPlus JWAP230

The jjPlus JWAP230 is an access point board built around the QCA9558,
with built-in 2.4GHz 3x3 N WiFi (28dBm). It can be expanded with 2
mini-PCIe boards, and has an USB2 root port.

Specifications:
- SOC: Qualcomm Atheros QCA9558
- CPU: 720MHz
- H/W switch: QCA8327 rev 2
- Flash: 16 MiB SPI NOR (en25qh128)
- RAM: 128 MiB DDR2
- WLAN: AR9550 built-in SoC bgn 3T3R (ath9k)
- PCI: 2x mini-PCIe (optional 5V)
- LEDs: 6x LEDs (3 are currently available)
- Button: 1x Reset (not yet defined)
- USB2:
  - 1x Type A root port
  - 1x combined mini-PCIe
- Ethernet:
  - 2x 10/100/1000 (1x PoE 802.3af (36-57 V))

Notes:
 The device used to be supported in the ar71xx target.
 For upgrades: Please use "sysupgrade --force -n <image>".
 This will restore the device back to OpenWrt defaults!

MAC address assignment:
    use   source
    LAN   art 0x0
    WAN   art 0x6
    WLAN  art 0x1002 (as part of the calibration data)

Flash instructions:
- install from u-boot with tftp (requires serial access)
  > setenv ipaddr a.b.c.d
  > setenv serverip e.f.g.h
  > tftp 0x80060000 \
      openwrt-ath79-generic-jjplus_jwap230-squashfs-sysupgrade.bin
  > erase 0x9f050000 +${filesize}
  > cp.b $fileaddr 0x9f050000 $filesize
  > setenv bootcmd bootm 0x9f050000
  > saveenv

Signed-off-by: Olivier Valentin <valentio@free.fr>
[Added DT-Leds (based on ar71xx), Added more notes about sysupgrade,
fixed "qca9550" to match SoC in commit and dts file name]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agox86: remove old lzma tuning patch
Christian Lamparter [Sat, 4 Dec 2021 20:52:22 +0000 (21:52 +0100)]
x86: remove old lzma tuning patch

Chen Minqiang reported in his GitHub PR #4733 that:
With CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA=y option set,
the popular x86/amd64 target's initramfs-kernel failed to boot.

The cause for this boot failure is that the LZMA compression
uses a the first bytes to encode the compression parameters.
It does not have a fixed magic. Yes, this only works if the
the existing lzma options in the upstream are not changed.

This patch does away with OpenWrt special LZMA options tuning
since it is rather unlikely that upstream will improve the
compression algorithm detection after all this time. Even
though, the tuning produced a smaller initramfs (~1.1% in a
spot check).

Link: <https://github.com/openwrt/openwrt/pull/4733>
Reported-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agox86: add/improve support for Sophos SG/XG products
Stan Grishin [Sun, 5 Dec 2021 22:32:04 +0000 (22:32 +0000)]
x86: add/improve support for Sophos SG/XG products

* Better product ID for Sophos SG/XG-105 models
* Add support for Sophos SG/XG-135 r1, r2 with/without wireless

Signed-off-by: Stan Grishin <stangri@melmac.ca>
[Changed subject to x86 - probably eaten somewhere, the PR had it]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agokernel: add more disabled config options
Josef Schlehofer [Sun, 17 Oct 2021 11:29:57 +0000 (13:29 +0200)]
kernel: add more disabled config options

NET_DSA_MSCC_FELIX:

Marvell 88E6xxx Ethernet switch fabric support (NET_DSA_MV88E6XXX) [N/m/y/?] n
Ocelot / Felix Ethernet switch support (NET_DSA_MSCC_FELIX) [N/m/y/?] (NEW)
Error in reading or end of file.

make[6]: *** [scripts/kconfig/Makefile:71: syncconfig] Error 1
make[5]: *** [Makefile:603: syncconfig] Error 2

IR_IMON_RAW:
    SoundGraph iMON Receiver (early raw IR models) (IR_IMON_RAW) [N/m/?] (NEW)

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
[squashed with "kernel: add missing IR_IMON_RAW config symbol"]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agohostapd: add support for specifying the FILS DHCP server
Felix Fietkau [Fri, 10 Dec 2021 10:30:40 +0000 (11:30 +0100)]
hostapd: add support for specifying the FILS DHCP server

The 'fils_dhcp' option can be set to '*' in order to autodetect the DHCP server
For proto=dhcp networks, the discovered dhcp server will be used
For all other networks, udhcpc is called to discover the address

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agonetifd: on dhcp interfaces, store the dhcp server in interface data
Felix Fietkau [Fri, 10 Dec 2021 09:16:18 +0000 (10:16 +0100)]
netifd: on dhcp interfaces, store the dhcp server in interface data

Among other things, this can be used to auto-configure the DHCP server
address for wireless APs using FILS, if the bridged interface is
configured to DHCP

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agohostapd: add support for enabling FILS on AP and client interfaces
Felix Fietkau [Tue, 7 Dec 2021 13:47:40 +0000 (14:47 +0100)]
hostapd: add support for enabling FILS on AP and client interfaces

This is only supported with WPA-enterprise

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agohostapd: enable FILS support in the full config and add build feature discovery
Felix Fietkau [Tue, 7 Dec 2021 10:06:16 +0000 (11:06 +0100)]
hostapd: enable FILS support in the full config and add build feature discovery

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agotools/mkimage: fix build on MacOS arm64
Sergey V. Lobanov [Thu, 2 Dec 2021 16:02:23 +0000 (19:02 +0300)]
tools/mkimage: fix build on MacOS arm64

Fixed -no-pie compilation warning on MacOS
Fixed errors related to using absolute addressing on MacOS arm64

Based on upstream patch from Jessica Clarke and suggestions from Ronny Kotzschmar

Link to original patch and discussion:
https://github.com/u-boot/u-boot/commit/3b142045e8a7f0ab17b6099e9226296af45967d0

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
2 years agoramips: add support for Zbtlink ZBT-WG1602
Sergey Ryazanov [Tue, 16 Nov 2021 10:10:25 +0000 (13:10 +0300)]
ramips: add support for Zbtlink ZBT-WG1602

Zbtlink ZBT-WG1602 is a Wi-Fi router intendent to use with WWAN
(UMTS/LTE/3G/4G) modems. The router board offsers a couple of miniPCIe
slots with USB and SIM only and another one pure miniPCIe slot as well
as five Gigabit Ethernet ports (4xLAN + WAN).

Specification:

* SoC: MT7621A
* RAM: 256/512 MiB
* Flash: 16/32 MiB (SPI NOR)
* external watchdog (looks like Torexsemi XC6131B)
* Eth: 10/100/1000 Mbps Ethernet x5 ports (4xLAN + WAN)
* WLAN 2GHz: MT7603EN (.11n, MIMO 2x2)
* WLAN 5GHz: MT7612EN (.11ac, MIMO 2x2)
* WLAN Ants: detachable x2, shared by 2GHz & 5GHz radios
* miniPCIe: 2x slots with USB&SIM + 1x slot with regular PCIe bus
* WWAN Ants: detachable x4
* External storage: microSD (SDXC) slot
* USB: 2.0 Type-A port
* LED: 11 (5 per Eth phy, 3 SoC controlled, 2 WLAN 2/5 controlled, 1
       power indicator)
* Button: 1 (reset)
* UART: console (115200 baud)
* Power: DC jack (12 V / 2.5 A)

Additional HW information:

* SoC USB port #1 is shared by internal miniPCIe slot and external
  Type-A USB port, USB D+/D- lines are toggled between ports using a
  GPIO controlled DPDT switch.
* Power of the USB enabled miniPCIe slots can be individually controlled
  using dedicated GPIO lines.
* Vendor firmware feeds the external watchdog with 1s pulses. GPIO
  watchdog driver is able to either generate a 1us pulses or toggle the
  output line. 1us is not enough for the external watchod timer, so
  the line toggling driver mode is utilized.

Installation:

Vendor's firmware is OpenWrt (LEDE) based, so the sysupgrade image can
be directly used to install OpenWrt. Firmware must be upgraded using the
'force' and 'do not save configuration' command line options (or
correspondig web interface checkboxes) since the vendor firmware is from
the pre-DSA era.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
2 years agoath79: add support for TP-Link EAP225 v1
Sander Vanheule [Mon, 22 Nov 2021 19:59:06 +0000 (20:59 +0100)]
ath79: add support for TP-Link EAP225 v1

TP-Link EAP225 v1 is an AC1200 (802.11ac Wave-1) ceiling mount access point.

Device specifications:
* SoC: QCA9563 @ 775MHz
* RAM: 128MiB DDR2
* Flash: 16MiB SPI-NOR
* Wireless 2.4GHz (SoC): b/g/n, 2x2
* Wireless 5Ghz (QCA9882): a/n/ac, 2x2
* Ethernet (AR8033): 1× 1GbE, 802.3at PoE

Flashing instructions:
* Ensure the device is upgraded to firmware v1.4.0
* Exploit the user management page in the web interface to start telnetd
  by changing the username to `;/usr/sbin/telnetd -l/bin/sh&`.
* Immediately change the malformed username back to something valid
  (e.g. 'admin') to make ssh work again.
* Use the root shell via telnet to make /tmp world writeable (chmod 777)
* Extract /usr/bin/uclited from the device via ssh and apply the binary
  patch listed below. The patch is required to prevent `uclited -u` in
  the last step from crashing.
* Copy the patched uclited binary back to the device at /tmp/uclited
  (via ssh)
* Upload the factory image to /tmp/upgrade.bin (via ssh)
* Run `chmod +x /tmp/uclited && /tmp/uclited -u` to install OpenWrt.

uclited patching:
    --- xxd uclited
    +++ xxd uclited-patched
    @@ -53811,7 +53811,7 @@
     000d2330: 8c44 0000 0320 f809 0000 0000 8fbc 0010  .D... ..........
     000d2340: 8fa6 0a4c 02c0 2821 8f82 87c4 0000 0000  ...L..(!........
    -000d2350: 8c44 0000 0c13 461c 27a7 0018 8fbc 0010  .D....F.'.......
    +000d2350: 8c44 0000 2402 0000 0000 0000 8fbc 0010  .D..$...........
     000d2360: 1040 001d 0000 1821 8f99 8378 3c04 0058  .@.....!...x<..X
     000d2370: 3c05 0056 2484 ad68 24a5 9f00 0320 f809  <..V$..h$.... ..

To make sure the correct file is patched, the following MD5 checksums
should match the unpatched and patched files:
    4bd74183c23859c897ed77e8566b84de  uclited
    4107104024a2e0aeaf6395ed30adccae  uclited-patched

Debricking:
* Serial port can be soldered on unpopulated 4-pin header
  (1: TXD, 2: RXD, 3: GND, 4: VCC)
    * Bridge unpopulated resistors running from pins 1 (TXD) and 2 (RXD).
      Do NOT bridge the pull-down for pin 2, running parallel to the
      header.
    * Use 3.3V, 115200 baud, 8n1
* Interrupt bootloader by holding CTRL+B during boot
* tftp initramfs to flash via the LuCI web interface
    setenv ipaddr 192.168.1.1 # default, change as required
    setenv serverip 192.168.1.10 # default, change as required
    tftp 0x80800000 initramfs.bin
    bootelf $fileaddr

Tested by forum user KernelMaker.

Link: https://forum.openwrt.org/t/eap225-v1-firmware/87116
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 years agorealtek: sort the port list numerically
Bjørn Mork [Mon, 29 Nov 2021 13:18:14 +0000 (14:18 +0100)]
realtek: sort the port list numerically

Mac adresses are assigned in the order given by the port list.  The
interfaces are also brought up in this order.  This target supports
devices with up to 52 ports.  Sorting these alphabetically is very
confusing, and assigning mac addresses in alphabetic order does not
match stock firmware behaviour.

Suggested-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2 years agorealtek: update watchdog timer patch
Sander Vanheule [Wed, 1 Dec 2021 21:08:23 +0000 (22:08 +0100)]
realtek: update watchdog timer patch

The Realtek Otto watchdog timer driver was accepted upstream, and is
queued for 5.17. Update the patch's file name, and replace by the final
version.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 years agox86: added support to generate VHDX images
Oldřich Jedlička [Sat, 9 Jan 2021 21:23:09 +0000 (22:23 +0100)]
x86: added support to generate VHDX images

Added support to generate dynamic-sized VHDX images for Hyper-V.
Compile-tested on x86 and run-tested on Windows 10 21H2 (Hyper-V).

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
2 years agotools/meson: update to 0.60.1
Rosen Penev [Mon, 22 Nov 2021 08:51:08 +0000 (00:51 -0800)]
tools/meson: update to 0.60.1

change meson binary to use py extension. Fixes issue with meson's
symbolextractor using the host python instead of the system one.

We intentionally use a .py extension here so that meson launches
additional python scripts with the same build host python interpreter as
itself is running under (and not the host package one once it becomes
available)

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years agokernel: add kmod-video-gspca-sq930x
Josef Schlehofer [Fri, 25 Jun 2021 09:31:23 +0000 (11:31 +0200)]
kernel: add kmod-video-gspca-sq930x

This module adds support for USB WebCams, which uses SQ930X chip [1].

[1] https://cateee.net/lkddb/web-lkddb/USB_GSPCA_SQ930X.html

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2 years agokernel: btrfs: enable ACL
Josef Schlehofer [Thu, 16 May 2019 15:23:12 +0000 (17:23 +0200)]
kernel: btrfs: enable ACL

By default CONFIG_BTRFS_FS_POSIX_ACL is disabled, it should be enabled
only when you enable CONFIG_FS_POSIX_ACL.

Right now, when you enable CONFIG_FS_POSIX_ACL it will enable
CONFIG_BTRFS_FS_POSIX_ACL, but it will be disabled once you install
kmod-btrfs. This should prevent it.

Btrfs has enabled by default ACL for mount option.

More details:
https://cateee.net/lkddb/web-lkddb/BTRFS_FS_POSIX_ACL.html
https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs(5)

Signed-off-by: Josef Schlehofer <josef.schlehofer@nic.cz>
2 years agoipq806x: revert SDC clock changes for NBG6817 MMC
Shane Synan [Fri, 3 Dec 2021 20:46:36 +0000 (15:46 -0500)]
ipq806x: revert SDC clock changes for NBG6817 MMC

Revert the SDC "CLK_SET_RATE_GATE" changes to the SDC clock regulator
structures.

See https://elinux.org/images/b/b8/Elc2013_Clement.pdf
> if ((clk->flags & CLK_SET_RATE_GATE) && clk->prepare_count) {
>
> For this particular clock, setting its rate is possible only if the
> clock is ungated (not yet prepared)

This fixes the MMC failing to initialize on newer ZyXEL NBG6817
hardware revisions with Kingston MMC.  Older revisions should
hopefully be unaffected.

Check MMC hardware details with:
cd /sys/block/mmcblk0/device/ && \
  tail -v cid date name manfid fwrev hwrev oemid rev

Known problematic MMC names (broken before this commit):
* M62704 (dated 12/2018) via myself
* M62704 (dated 11/2018) via Drake Stefani

Known unaffected MMC names (already working without this commit):
* S10004 (dated 12/2015) via slh

Without enabling dynamic debugging, this error manifests in the kernel
hardware serial console as the following:

[    2.746605] mmc0: error -110 whilst initialising MMC card
[…trimmed other messages…]
[    2.877832] Waiting for root device /dev/mmcblk0p5...

Enabling Linux dynamic kernel debugging provides additional messages.
For guidance, see the Linux kernel documentation:
https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html

First, enable dynamic debugging in OpenWRT's configuration:

1.  Run "make menuconfig"

2.  Select "Global build settings --->"

3.  Select "Kernel build options --->"

4.  Enable "Compile the kernel with dynamic printk" via spacebar

5.  Save and exit (arrow key to "Exit" until prompted to save, save)

Alternatively, set "CONFIG_KERNEL_DYNAMIC_DEBUG=y" in your .config.

Then, turn on dynamic debugging at boot:

Modify bootargs in
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts
to add…

bootargs = "[…existing bootargs…] dyndbg=\"file drivers/mmc/* +p\" dynamic_debug.verbose=1 loglevel=8";

For example:
  chosen {
- bootargs = "rootfstype=squashfs,ext4 rootwait noinitrd fstools_ignore_partname=1";
+ bootargs = "rootfstype=squashfs,ext4 rootwait noinitrd fstools_ignore_partname=1 dyndbg=\"file drivers/mmc/* +p\" dynamic_debug.verbose=1 loglevel=8";
  append-rootblock = "root=/dev/mmcblk0p";

Then, compile and flash the resulting build.  If you are testing
before this commit on newer MMC hardware, be prepared to recover!

NOTE: If you have hardware serial console access, you don't need to
use TFTP recovery to change the active boot partition.

Reboot to working alternative partition via serial console:

1.  Connect to hardware serial console
    * See https://openwrt.org/toh/zyxel/nbg6817#serial

2.  Interrupt boot at "Hit any key to stop autoboot:"

3.  Run "ATSE NBG6817"

4.  Copy the result (e.g. "001976FE4B04")
    * Changes with **every boot** - can't reuse this

5.  On your local system, run
    "./zyxel-uboot-password-tool.sh <copied value here>"
    * Example: "./zyxel-uboot-password-tool.sh 001976FE4B04"

6.  Run the command provided by the password tool
    * Example: "ATEN 1,910F129B"
    * Changes with **every boot** - can't reuse this

7.  Run "ATGU"
    * You now have full u-boot shell until next boot - unlocking is
       not remembered

8.  Run either "run boot_mmc" (for booting partition set "FF") or
    "run boot_mmc_1" (for booting partition set "01")
    * These commands are not affected by dual-boot partition flags

NOTE: This will NOT set the dual-boot partition flag.  You'll need to
fix that manually.  The "nbg6817-dualboot" script may help:
https://github.com/pkgadd/nbg6817/blob/master/nbg6817-dualboot

zyxel-uboot-password-tool.sh - sourced from
commit 459c8c9ef816156107e297964d088ddee2b4eef5:

ror32() {
  echo $(( ($1 >> $2) | (($1 << (32 - $2) & (2**32-1)) ) ))
}

v="0x$1"
a="0x${v:2:6}"
b=$(( a + 0x10F0A563))
c=$(( 0x${v:12:14} & 7 ))
p=$(( $(ror32 $b $c) ^ a ))
printf "ATEN 1,%X\n" $p

Kernel serial console log BEFORE commit with dynamic debug enabled:
[…trimmed…]
[    3.171343] mmci-pl18x 12400000.sdcc: designer ID = 0x51
[    3.171397] mmci-pl18x 12400000.sdcc: revision = 0x0
[    3.175811] mmci-pl18x 12400000.sdcc: clocking block at 96000000 Hz
[    3.181134] mmci-pl18x 12400000.sdcc: No vqmmc regulator found
[    3.186788] mmci-pl18x 12400000.sdcc: mmc0: PL180 manf 51 rev0 at 0x12400000 irq 41,0 (pio)
[    3.192902] mmci-pl18x 12400000.sdcc: DMA channels RX dma1chan1, TX dma1chan2
[    3.215609] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 1 timing 0
[    3.227532] mmci-pl18x 12400000.sdcc: Initial signal voltage of 3.3v
[    3.247518] mmc0: clock 52000000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[…trimmed…]
[    3.997725] mmc0: req done (CMD2): -110: 00000000 00000000 00000000 00000000
[    4.003631] mmci-pl18x 12400000.sdcc: irq0 (data+cmd) 00000000
[    4.003659] mmc0: error -110 whilst initialising MMC card
[    4.016481] mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 1 timing 0

Notice how the initial clock is 52 MHz, which is incorrect - MMC
requires negotiation to enable higher speeds.

Kernel serial console log AFTER commit with dynamic debug enabled:
[…trimmed…]
[    3.168996] mmci-pl18x 12400000.sdcc: designer ID = 0x51
[    3.169051] mmci-pl18x 12400000.sdcc: revision = 0x0
[    3.173492] mmci-pl18x 12400000.sdcc: clocking block at 96000000 Hz
[    3.178808] mmci-pl18x 12400000.sdcc: No vqmmc regulator found
[    3.184702] mmci-pl18x 12400000.sdcc: mmc0: PL180 manf 51 rev0 at 0x12400000 irq 41,0 (pio)
[    3.190573] mmci-pl18x 12400000.sdcc: DMA channels RX dma1chan1, TX dma1chan2
[    3.217873] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 1 timing 0
[    3.229250] mmci-pl18x 12400000.sdcc: Initial signal voltage of 3.3v
[    3.249111] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[…trimmed…]
[    4.392652] mmci-pl18x 12400000.sdcc: irq0 (data+cmd) 00000000
[    4.392785] mmc0: clock 52000000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 1
[    4.406554] mmc0: starting CMD6 arg 03b70201 flags 0000049d
[…trimmed…]

Now, the MMC properly initializes and later switches to high speed.

Thanks to:
* Ansuel for maintaining/help with the IPQ806x platform, kernel code
* slh for additional debugging and suggestions
* dwfreed for confirming newer MMC details, clock frequency
* robimarko for device driver debug printing help, clock debugging
* Drake for testing and confirmation with their own newer NBG6817
...and anyone else I missed!

Signed-off-by: Shane Synan <digitalcircuit36939@gmail.com>
Tested-by: Shane Synan <digitalcircuit36939@gmail.com>
2 years agonat46: update to latest git HEAD
Hans Dedecker [Sun, 5 Dec 2021 17:37:15 +0000 (18:37 +0100)]
nat46: update to latest git HEAD

d9bc161 nat46-core: Fix typo since day one (#31)
840e235 Fix coverity issues observed so far (#30)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2 years agomediatek: enable bmt on mt7622-rfb1
Felix Fietkau [Sat, 4 Dec 2021 21:46:00 +0000 (22:46 +0100)]
mediatek: enable bmt on mt7622-rfb1

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agomediatek: bmt: use generic mtd api
Chuanhong Guo [Sat, 4 Dec 2021 14:24:59 +0000 (22:24 +0800)]
mediatek: bmt: use generic mtd api

BMT replaces nand-specific ops for erasing and writing, but the
mtk-snand driver only implements generic mtd api.

Replace erase, block_isbad, block_markbad in mtd_info for generic mtd
drivers.

Fixes: b600aee3ed ("mediatek: attach bmt to the new snand driver")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2 years agobase-files: fix service_running check
Florian Eckert [Tue, 15 Jun 2021 06:48:18 +0000 (08:48 +0200)]
base-files: fix service_running check

The following command checks if a instance of a service is running.
/etc/init.d/<service> running <instance>

 In the variable `$@`, which is passed to the function
`service_running`, the first argument is always the `instance` which
should be checked. Because all other variables where removed from `$@`
with `shift`.

Before this change the first argument of `$@` was set to the `$service`
Variable. So the function does not work as expected. The `$service`
variable was always the instance which should be checked. This is not
what we want.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>