openwrt/staging/robimarko.git
3 years agoipq40xx: fix Edgecore ECW5211 boot
Stijn Tintel [Wed, 18 Aug 2021 13:11:11 +0000 (16:11 +0300)]
ipq40xx: fix Edgecore ECW5211 boot

The bootloader will look for a configuration section named ap.dk01.1-c2
in the FIT image. If this doesn't exist, the device won't boot.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agoramips: add WPS button for newifi d1
David Yang [Sun, 25 Jul 2021 13:21:02 +0000 (21:21 +0800)]
ramips: add WPS button for newifi d1

This device has a WPS button under WiFi antenna cover, add it to dts.

Signed-off-by: David Yang <mmyangfl@gmail.com>
3 years agoramips: mt7628: move mtd-eeprom out of root DTSI
Adrian Schmutzler [Tue, 17 Aug 2021 12:07:57 +0000 (14:07 +0200)]
ramips: mt7628: move mtd-eeprom out of root DTSI

The mt76x8 subtarget is the only one in ramips that stores the
mediatek,mtd-eeprom property directly in the "root" mt7628an.dtsi.

This is not optimal for a few different reasons:

 * If you don't really know it or are used to other (sub)targets,
   the property will be set somewhat magically.
 * The property is set based on &factory partition before (if at all)
   this partition is defined.
 * There are several devices that have different offset or even
   different partitions to read from, which will then be overwritten
   in the DTS files. Thus, definitions are scattered between root
   DTSI and individual files.

Based on these circumstances, the "root" definition is removed and
the property is added to the device-based DTS(I) files where needed
and applicable. This should be easier to grasp for unexperienced
developers and will move the property closer to the partition
definitions.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokernel: bump 5.10 to 5.10.59
Rui Salvaterra [Sun, 15 Aug 2021 22:54:28 +0000 (23:54 +0100)]
kernel: bump 5.10 to 5.10.59

No deleted or manually refreshed patches.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agobase-files: rename 'sdcard' to 'legacy-sdcard'
Daniel Golle [Sat, 7 Aug 2021 13:30:53 +0000 (14:30 +0100)]
base-files: rename 'sdcard' to 'legacy-sdcard'

While an image layout based on MBR and 'bootfs' partition may be easy
to understand for users who are very used to the IBM PC and always have
the option to access the SD card outside of the device (and hence don't
really depend on other recovery methods or dual-boot), in my opinion
it's a dead end for many desirable features on embedded systems,
especially when managed remotely (and hence without an easy option to
access the SD card using another device in case things go wrong, for
example).

Let me explain:

* using a MSDOS/VFAT filesystem to store kernel(s) is problematic, as a
  single corruption of the bootfs can render the system into a state
  that it no longer boots at all. This makes dual-boot useless, or at
  least very tedious to setup with then 2 independent boot partitions
  to avoid the single point of failure on a "hot" block (the FAT index
  of the boot partition, written every time a file is changed in
  bootfs). And well: most targets even store the bootloader environment
  in a file in that very same FAT filesystem, hence it cannot be used
  to script a reliable dual-boot method (as loading the environment
  itself will already fail if the filesystem is corrupted).

* loading the kernel uImage from bootfs and using rootfs inside an
  additional partition means the bootloader can only validate the
  kernel -- if rootfs is broken or corrupted, this can lead to a reboot
  loop, which is often a quite costly thing to happen in terms of
  hardware lifetime.

* imitating MBR-boot behavior with a FAT-formatted bootfs partition
  (like IBM PC in the 80s and 90s) is just one of many choices on
  embedded targets. There are much better options with modern U-Boot
  (which is what we use and build from source for all targets booting
  off SD cards), see examples in mediatek/mt7622 and mediatek/mt7623.

Hence rename the 'sdcard' feature to 'legacy-sdcard', and prefix
functions with 'legacy_sdcard_' instead of 'sdcard_'.

Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoprocd: add missing dependency and fix empty mount triggers
Daniel Golle [Sun, 15 Aug 2021 16:41:59 +0000 (17:41 +0100)]
procd: add missing dependency and fix empty mount triggers

procd.sh:
 Instead of triggering on every mount.add event, there should be no
 mount trigger at all in case none of the directories passed to
 procd_add_*_mount_trigger() are located on a mountpoint configured in
 /etc/config/fstab.

uxc:
 add missing dependency on rpcd.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoprocd: update to git HEAD
Daniel Golle [Sun, 15 Aug 2021 14:41:50 +0000 (15:41 +0100)]
procd: update to git HEAD

 040fecc system: fix issues reported by Coverity
 48f481b service: make sure string read is null terminated
 16dbc2a uxc: fix a bunch of issues discovered by Coverity
 ff9002f uxc: fix help output
 104b49d uxc: support config in uvol

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agofirewall: update to git HEAD
Kevin Darbyshire-Bryant [Sat, 14 Aug 2021 18:10:32 +0000 (19:10 +0100)]
firewall: update to git HEAD

40e5f6a ipsets: permit default timeout of 0

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
3 years agouboot-rockchip: update to v2021.07
David Bauer [Mon, 9 Aug 2021 23:05:50 +0000 (01:05 +0200)]
uboot-rockchip: update to v2021.07

Tested on NanoPi R2S

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agokernel: bump 5.4 to 5.4.140
John Audia [Thu, 12 Aug 2021 13:28:18 +0000 (09:28 -0400)]
kernel: bump 5.4 to 5.4.140

Removed upstreamed bcm27xx/patches-5.4:
    950-0977-USB-gadget-f_hid-avoid-crashes-and-log-spam.patch
    950-0980-SQUASH-USB-gadget-f_hid-remove-more-spam.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
3 years agokernel: bump 5.4 to 5.4.139
John Audia [Mon, 9 Aug 2021 14:47:18 +0000 (10:47 -0400)]
kernel: bump 5.4 to 5.4.139

All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
3 years agoprocd: update to git HEAD
Daniel Golle [Sat, 14 Aug 2021 18:01:37 +0000 (19:01 +0100)]
procd: update to git HEAD

 48638ad hotplug-dispatch: yet another rare memory leak disovered by Coverity
 459b3e8 jail: fix several issues discovered by Coverity
 2562e2b ujail-console: add missing error handling discovered by coverity

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agofstools: update to git HEAD
Daniel Golle [Sat, 14 Aug 2021 17:56:12 +0000 (18:56 +0100)]
fstools: update to git HEAD

 629726d blockd: fix resource leak discovered by coverity scan
 68ae639 libubi: fix several issues discovered by Coverity
 a77c4fa ubi: fix resource leak in legacy codepath
 2e3aca2 block: fix two resources leaks discovered by Coverity

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agokernel: bump 5.10 to 5.10.58
Rui Salvaterra [Thu, 12 Aug 2021 23:16:29 +0000 (00:16 +0100)]
kernel: bump 5.10 to 5.10.58

No deleted or manually refreshed patches.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agokernel: bump 5.10 to 5.10.57
Rui Salvaterra [Mon, 9 Aug 2021 21:05:05 +0000 (22:05 +0100)]
kernel: bump 5.10 to 5.10.57

No deleted or manually refreshed patches.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agoipq40xx: ar40xx: reset port status register
David Bauer [Fri, 13 Aug 2021 21:28:44 +0000 (23:28 +0200)]
ipq40xx: ar40xx: reset port status register

This resolves incosnsitencies of the configured RX / TX flow control
modes between different boards or bootloaders.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoipq40xx: ar40xx: use FIELD_GET macro
David Bauer [Fri, 13 Aug 2021 22:22:28 +0000 (00:22 +0200)]
ipq40xx: ar40xx: use FIELD_GET macro

This improves code readability.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoipq40xx: increase EX6150v2 SPI frequency
David Bauer [Sat, 14 Aug 2021 00:20:40 +0000 (02:20 +0200)]
ipq40xx: increase EX6150v2 SPI frequency

The chip supports clock speeds up to 50 MHz, however it won't even read
the chip-id correctly at this frequency.

45 MHz however works reliable.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoprocd: update to git HEAD
Daniel Golle [Fri, 13 Aug 2021 03:45:17 +0000 (04:45 +0100)]
procd: update to git HEAD

 9f233f5 system: make rootfs type accessible through board call

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agobcm4908: add missing config symbol
David Bauer [Thu, 12 Aug 2021 22:50:49 +0000 (00:50 +0200)]
bcm4908: add missing config symbol

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agomediatek: add missing config symbols
David Bauer [Thu, 12 Aug 2021 21:40:32 +0000 (23:40 +0200)]
mediatek: add missing config symbols

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agotegra: add missing Kconfig symbol
David Bauer [Thu, 12 Aug 2021 21:22:08 +0000 (23:22 +0200)]
tegra: add missing Kconfig symbol

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agorockchip: add missing Kconfig symbols
David Bauer [Thu, 12 Aug 2021 20:19:45 +0000 (22:19 +0200)]
rockchip: add missing Kconfig symbols

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years ago6in4: delete tunnel on interface teardown
Ansuel Smith [Mon, 2 Aug 2021 11:41:21 +0000 (13:41 +0200)]
6in4: delete tunnel on interface teardown

Delete tunnel on 6in4 interface teardown.
Should solve problem related to tunnel stuck on restart loop
with "Unknown Command" on tunnel restart due to wan connection drop.
Fixes: FS#3690
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
3 years agohostapd: fix broken check in radar detection notification
Felix Fietkau [Wed, 11 Aug 2021 17:00:22 +0000 (19:00 +0200)]
hostapd: fix broken check in radar detection notification

This check was accidentally left in after reworking the code,
causing a segfault

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agogeneric: add missing config symbol
David Bauer [Wed, 11 Aug 2021 00:11:17 +0000 (02:11 +0200)]
generic: add missing config symbol

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agomediatek: add missing config symbol
David Bauer [Wed, 11 Aug 2021 00:09:25 +0000 (02:09 +0200)]
mediatek: add missing config symbol

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agotreewide: add various missing config symbols
David Bauer [Tue, 10 Aug 2021 18:22:18 +0000 (20:22 +0200)]
treewide: add various missing config symbols

Fixes commit 91a52f22a13d ("treewide: backport support for nvmem on non platform devices")

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agogeneric: Kconfig: exit on unset symbol
David Bauer [Thu, 22 Jul 2021 23:32:38 +0000 (01:32 +0200)]
generic: Kconfig: exit on unset symbol

When a target configuration has unser Kconfig symbols, the build will
fail when OpenWrt is compiled with V=s and stdin is connected to a tty.

In case OpenWrt is compiled without either of these preconditions, the
build will uscceed with the symbols in question being unset.

Modify the kernel configuration in a way it fails on unset symbols
regardless of the aformentioned preconditions.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agogeneric: fix kernel panic on existing mac-address node
David Bauer [Mon, 9 Aug 2021 22:28:01 +0000 (00:28 +0200)]
generic: fix kernel panic on existing mac-address node

Calling free for the OF property can result in a kernel panic, as the
buffer in question might be referenced elsewhere. Also, it is not
removed from the tree.

Always allocate a new property and updating the tree with it fixes both
issues.

Fixes commit 91a52f22a13d ("treewide: backport support for nvmem on non platform devices")

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agofirmware-utils: nand_ecc: replace GPL boilerplate with SPDX
Rafał Miłecki [Fri, 6 Aug 2021 10:59:23 +0000 (12:59 +0200)]
firmware-utils: nand_ecc: replace GPL boilerplate with SPDX

Cc: yajin <yajin@vm-kernel.org>
Cc: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: trx: replace GPL-2.0-or-later boilerplate with SPDX
Rafał Miłecki [Fri, 6 Aug 2021 10:59:22 +0000 (12:59 +0200)]
firmware-utils: trx: replace GPL-2.0-or-later boilerplate with SPDX

This was missed because scancode license scanner was confused by
comments about crc32buf().

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: osbridge-crc: replace GPL-2.0-only boilerplate with SPDX
Rafał Miłecki [Fri, 6 Aug 2021 10:59:21 +0000 (12:59 +0200)]
firmware-utils: osbridge-crc: replace GPL-2.0-only boilerplate with SPDX

This was missed because scancode license scanner was confused by
comments about crc32buf().

Cc: Gabor Juhos <juhosg@openwrt.org>
Cc: Gabor Juhos <juhosg@freemail.hu>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: mkmylofw: replace GPL-2.0-or-later boilerplate with SPDX
Rafał Miłecki [Fri, 6 Aug 2021 10:59:20 +0000 (12:59 +0200)]
firmware-utils: mkmylofw: replace GPL-2.0-or-later boilerplate with SPDX

This was missed because scancode license scanner was confused by a
comment about (no) copyrights in the init_crc_table().

Cc: Gabor Juhos <juhosg@openwrt.org>
Cc: Gabor Juhos <juhosg@freemail.hu>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: mkmerakifw-old: replace GPL-2.0-only boilerplate with SPDX
Rafał Miłecki [Fri, 6 Aug 2021 10:59:19 +0000 (12:59 +0200)]
firmware-utils: mkmerakifw-old: replace GPL-2.0-only boilerplate with SPDX

This was missed because scancode license scanner was confused by a
comment about Cisco's GPL code github repository.

Cc: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Christian Lamparter <chunkeey@gmail.com>
3 years agoomap: Remove EXT2 and EXT3 driver config
Hauke Mehrtens [Sun, 8 Aug 2021 23:13:05 +0000 (01:13 +0200)]
omap: Remove EXT2 and EXT3 driver config

The EXT4 driver also takes care of EXT2 and EXT3 file systems.
Activating the EXT2 driver kernel config options unlocked some other
ext2 driver related options which OpenWrt did not take care of.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agouboot-layerscape: fix dtc compilation on host gcc 10
Hauke Mehrtens [Sun, 8 Aug 2021 22:03:43 +0000 (00:03 +0200)]
uboot-layerscape: fix dtc compilation on host gcc 10

Backport a patch from upstream U-Boot to fix the compile with host GCC 10.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agolayerscape: Fix multiple bugs in of_get_mac_address() changes
Hauke Mehrtens [Sun, 8 Aug 2021 20:50:27 +0000 (22:50 +0200)]
layerscape: Fix multiple bugs in of_get_mac_address() changes

The change which backported the of_get_mac_address() change broke some
patches in the layerscape target so the patches did not apply any more.

This commit makes them apply again and also fixes some other problems
related to this change.

Fixes commit 91a52f22a13d ("treewide: backport support for nvmem on non platform devices")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agokernel: Apply change to of_get_mac_address() to ks8851 too
Hauke Mehrtens [Sun, 8 Aug 2021 20:38:12 +0000 (22:38 +0200)]
kernel: Apply change to of_get_mac_address() to ks8851 too

The code from ks8851.c was moved to ks8851_common.c, so it was not
backported. This broke the compile of the omap target which uses this
driver.

Fixes commit 91a52f22a13d ("treewide: backport support for nvmem on non platform devices")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agomvebu: armada-37xx: add patch to forbid cpufreq for 1.2 GHz
Josef Schlehofer [Tue, 27 Jul 2021 11:20:43 +0000 (13:20 +0200)]
mvebu: armada-37xx: add patch to forbid cpufreq for 1.2 GHz

This patch is backported from linux-arm-kernel [1] to improve situation, when
it was reported that 1.2 GHz variant is unstable with DFS.
It waits to be accepted upstream, however, it waits for Marvell people to respond.

[1] https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210630225601.6372-1-kabel@kernel.org/

Fixes: 7b868fe04a89 ("Revert "mvebu: 5.4 fix DVFS caused random boot crashes"")
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
3 years agoRevert "mvebu: 5.10 fix DVFS caused random boot crashes"
Josef Schlehofer [Tue, 27 Jul 2021 11:20:42 +0000 (13:20 +0200)]
Revert "mvebu: 5.10 fix DVFS caused random boot crashes"

Based on the discussion on the mailing list [1], the patch which was
reverted, it reverts only one patch without the subsequent ones.

This leads to the SoC scaling issue not using a CPU parent clock, but
it uses DDR clock. This is done for all variants, and it's wrong because
commits (hacks) that were using the DDR clock are no longer in the mainline kernel.

If someone has stability issues on 1.2 GHz, it should not affect all
routers (1 GHz, 800 MHz) and it should be rather consulted with guys, who are trying to
improve the situation in the kernel and not making the situation worse.

There are two solutions in cases of instability:
a) disable cpufreq
b) underclock it up to 1 GHz

This reverts commit 080a0b74e39d159eecf69c468debec42f28bf4d8.

[1] https://lists.openwrt.org/pipermail/openwrt-devel/2021-June/035702.html

Fixes: d37947681772 ("mvebu: armada-37xx: add patch to forbid cpufreq for 1.2 GHz")
CC: Pali Rohár <pali@kernel.org>
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
3 years agopcre: update to 8.45
Rosen Penev [Tue, 13 Jul 2021 20:32:30 +0000 (13:32 -0700)]
pcre: update to 8.45

Switch to AUTORELEASE to avoid manual increments.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agonettle: update to 3.7.3
Rosen Penev [Tue, 13 Jul 2021 20:30:24 +0000 (13:30 -0700)]
nettle: update to 3.7.3

Switch to AUTORELEASE to avoid manual increments.

Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agombedtls: update to 2.16.11
Rosen Penev [Tue, 13 Jul 2021 20:27:09 +0000 (13:27 -0700)]
mbedtls: update to 2.16.11

Switched to AUTORELEASE to avoid manual increments.

Release notes:
https://github.com/ARMmbed/mbedtls/releases/tag/v2.16.11

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agolibpcap: update to 1.10.1
Rosen Penev [Tue, 13 Jul 2021 20:24:54 +0000 (13:24 -0700)]
libpcap: update to 1.10.1

Switch to AUTORELEASE to avoid manual increments.

Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agolibnftnl: update to 1.2.0
Rosen Penev [Tue, 13 Jul 2021 20:19:08 +0000 (13:19 -0700)]
libnftnl: update to 1.2.0

Switch to AUTORELEASE to avoid manual increments.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agolibcap: update to 2.51
Rosen Penev [Tue, 13 Jul 2021 20:16:50 +0000 (13:16 -0700)]
libcap: update to 2.51

Switched to AUTORELEASE to avoid manual increments.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agoelfutils: update to 0.182
Rosen Penev [Sun, 3 Jan 2021 23:18:33 +0000 (15:18 -0800)]
elfutils: update to 0.182

Add --disable-libdebuginfod with remove libcurl dependency.

Remove totally unused host elfutils.

Refreshed and rebased patches.

Also happens to fix compilation with GCC11.

Newer versions of elfutils seem to have some kind of dependency on
obstack.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agogettext-full: disable parallel compilation
Rosen Penev [Mon, 12 Jul 2021 01:00:55 +0000 (18:00 -0700)]
gettext-full: disable parallel compilation

Fails fairly reliably with make -j 12 on a Ryzen 3600.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agoutil-linux: update to 2.37
Rosen Penev [Tue, 13 Jul 2021 20:49:14 +0000 (13:49 -0700)]
util-linux: update to 2.37

Switched to AUTORELEASE to avoid manual increments.

Changed PKG_LICENSE to SPDX format.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agohostapd: respect fixed channel BW in HE20 mode
Jesus Fernandez Manzano [Tue, 20 Jul 2021 10:13:49 +0000 (12:13 +0200)]
hostapd: respect fixed channel BW in HE20 mode

When using htmode 'HE20' with a radio mode that uses wpa-supplicant
(like mesh or sta), it will default to 40 MHz bw if disable_ht40 is not
set. This commit fixes this behaviour.

Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.net>
3 years agolibpcap: add rpcapd as package
Stephan Schmidtmer [Sun, 25 Jul 2021 11:50:53 +0000 (11:50 +0000)]
libpcap: add rpcapd as package

This enables building of rpcapd and adds it as a package.

It is a daemon that allows remote packet capturing from another machine.
E.g. Wireshark can talk to it using the Remote Capture Protocol (RPCAP).
https://www.tcpdump.org/manpages/rpcapd.8.html

Compile and run tested: OpenWrt SNAPSHOT r17190-2801fe6132 on x86/64

Signed-off-by: Stephan Schmidtmer <hurz@gmx.org>
3 years agofritz-tools: fix returning wrong values due to strncmp usage
Daniel Kestrel [Sun, 25 Jul 2021 18:32:05 +0000 (20:32 +0200)]
fritz-tools: fix returning wrong values due to strncmp usage

When having two keys that start with the same characters and the second
key just has one character more nand_tffs_read and tffs_read return the
wrong value for the longer key. This is due to the usage of strncmp in
combination with the length of the shorter key which is usually first in
the list before the longer key and when strncmp matches, the search is
stopped. The problem only occurs when the length of the two keys is
different, not if just the last character is different. The fix is to
use strcmp and as such it will only return the value if the key (name)
and the key to look for (namefilter) have the same value and length. A
sample case returning wrong values is when keys macwlan and macwlan2 are
defined and querying macwlan2 returns the value for macwlan.

Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
3 years agoiproute2: bump to 5.13
Ansuel Smith [Tue, 27 Jul 2021 18:13:40 +0000 (20:13 +0200)]
iproute2: bump to 5.13

Drop patch 185-libbpf-add-limits-h merged upstream
Update patch 170-ip_tiny
Update patch 130-no_netem_tpic_dcb...

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
3 years agoiw: enable print wpa ie for scan
Jianhui Zhao [Mon, 2 Aug 2021 07:08:46 +0000 (07:08 +0000)]
iw: enable print wpa ie for scan

This increases the size of the iw_5.9-8fab0c9e-3_mips_24kc.ipk from
41166 to 41942 bytes by 776 bytes.

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
3 years agotoolchain/gcc: bump gcc 11 to 11.2
Rui Salvaterra [Wed, 28 Jul 2021 11:33:09 +0000 (12:33 +0100)]
toolchain/gcc: bump gcc 11 to 11.2

Patches automatically refreshed.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agolayerscape: armv8_64b: do not disable CONFIG_IP_ADVANCED_ROUTER
Martin Schiller [Tue, 27 Jul 2021 07:10:44 +0000 (09:10 +0200)]
layerscape: armv8_64b: do not disable CONFIG_IP_ADVANCED_ROUTER

This option is needed e.g. to use strongswan for IPSec.

BTW: This was the only target where this option was disabled.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
3 years agogemini: Add hdparm setting
Linus Walleij [Fri, 23 Jul 2021 10:29:27 +0000 (12:29 +0200)]
gemini: Add hdparm setting

This uses "hdparm" (if present) to get the harddisk into low
power mode on NAS set-ups.

Cc: Adrian Schmutzler <mail@adrianschmutzler.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
3 years agomvebu: armada-37xx: add patch to forbid cpufreq for 1.2 GHz
Josef Schlehofer [Tue, 27 Jul 2021 11:22:31 +0000 (13:22 +0200)]
mvebu: armada-37xx: add patch to forbid cpufreq for 1.2 GHz

This patch is backported from linux-arm-kernel [1] to improve situation, when
it was reported that 1.2 GHz variant is unstable with DFS.
It waits to be accepted upstream, however, it waits for Marvell people to respond.

[1] https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210630225601.6372-1-kabel@kernel.org/

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
3 years agoRevert "mvebu: 5.4 fix DVFS caused random boot crashes"
Josef Schlehofer [Tue, 27 Jul 2021 11:22:30 +0000 (13:22 +0200)]
Revert "mvebu: 5.4 fix DVFS caused random boot crashes"

Based on the discussion on the mailing list [1], the patch which was
reverted, it reverts only one patch without the subsequent ones.

This leads to the SoC scaling issue not using a CPU parent clock, but
it uses DDR clock. This is done for all variants, and it's wrong because
commits (hacks) that were using the DDR clock are no longer in the mainline kernel.

If someone has stability issues on 1.2 GHz, it should not affect all
routers (1 GHz, 800 MHz) and it should be rather consulted with guys, who are trying to
improve the situation in the kernel and not making the situation worse.

There are two solutions in cases of instability:
a) disable cpufreq
b) underclock it up to 1 GHz

This reverts commit 080a0b74e39d159eecf69c468debec42f28bf4d8.

[1] https://lists.openwrt.org/pipermail/openwrt-devel/2021-June/035702.html

CC: Pali Rohár <pali@kernel.org>
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
3 years agomvebu: Turris Omnia: use SFP module, if present
Klaus Kudielka [Sat, 27 Feb 2021 11:56:10 +0000 (12:56 +0100)]
mvebu: Turris Omnia: use SFP module, if present

Follow the recommendations stated in the Turris Omnia DTS for eth2:

"In case SFP module is present, U-Boot has to enable the sfp node above,
remove phy-handle property, and add managed = "in-band-status" property."

The boot script is written in a way, that it works for all U-Boot
versions deployed by the vendor so far (2015.10-rc2, 2019.07).

Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
3 years agomvebu: backport Turris Omnia DTS changes to 5.4
Klaus Kudielka [Sat, 17 Jul 2021 17:32:57 +0000 (19:32 +0200)]
mvebu: backport Turris Omnia DTS changes to 5.4

Kernel 5.4 receives a reduced set, just to make the SFP cage work.
While we are at it, move the patches accepted upstream to the 0xx series.

Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
3 years agomvebu: backport Turris Omnia DTS changes to 5.10
Klaus Kudielka [Sat, 17 Jul 2021 17:31:44 +0000 (19:31 +0200)]
mvebu: backport Turris Omnia DTS changes to 5.10

Kernel 5.10 receives the complete set of improvements from 5.11/5.12.
While we are at it, move the patches accepted upstream to the 0xx series.

Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
3 years agoath79: fix the AR7{1,2}00 USB PHY patches
Rui Salvaterra [Thu, 29 Jul 2021 11:01:04 +0000 (12:01 +0100)]
ath79: fix the AR7{1,2}00 USB PHY patches

PHY_SIMPLE is a bogus kconfig symbol, what we really need to select is
GENERIC_PHY.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agokernel/generic: add CONFIG_KCSAN to the 5.10 kconfig
Rui Salvaterra [Tue, 27 Jul 2021 19:02:31 +0000 (20:02 +0100)]
kernel/generic: add CONFIG_KCSAN to the 5.10 kconfig

Add the missing CONFIG_KCSAN (disabled). Found while making kernel_oldconfig on
an x86-64 subtarget.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agokernel: backport mdio_find_bus from 5.10.x
Damien Mascord [Tue, 13 Jul 2021 01:16:08 +0000 (11:16 +1000)]
kernel: backport mdio_find_bus from 5.10.x

mdio-tools (https://github.com/wkz/mdio-tools) requires the use of
mdio_find_bus, which is not present in 5.4.x.

This patch backports the required change from 5.10.x to 5.4.x

The original patch submission for this can be found at
https://patchwork.ozlabs.org/project/netdev/patch/20200201074625.8698-2-jeremy.linton@arm.com/

Signed-off-by: Damien Mascord <tusker@tusker.org>
[Add original patch description]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agokernel: bump 5.4 to 5.4.138
John Audia [Wed, 4 Aug 2021 11:55:58 +0000 (07:55 -0400)]
kernel: bump 5.4 to 5.4.138

All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
3 years agokernel: bump 5.10 to 5.10.56
Rui Salvaterra [Wed, 4 Aug 2021 11:44:53 +0000 (12:44 +0100)]
kernel: bump 5.10 to 5.10.56

No patches needed refreshing

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agokernel: bump 5.10 to 5.10.55
Rui Salvaterra [Mon, 2 Aug 2021 11:20:46 +0000 (12:20 +0100)]
kernel: bump 5.10 to 5.10.55

No deleted or manually refreshed patches.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agoprocd: change procd_add_start_mount_trigger to do restart
Daniel Golle [Sun, 8 Aug 2021 13:47:54 +0000 (14:47 +0100)]
procd: change procd_add_start_mount_trigger to do restart

Change procd_add_start_mount_trigger to procd_add_restart_mount_trigger
and make it call 'restart' instead of 'start'.
This is more useful as it allows to handle both cases, intial start of
a services as well as restarting services. Calling 'restart' on a
service which has not yet been started has the same result as calling
'start'.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agomvebu: switch to generic sdcard upgrade method
Stijn Tintel [Fri, 6 Aug 2021 22:42:43 +0000 (01:42 +0300)]
mvebu: switch to generic sdcard upgrade method

Now that we have a generic sdcard upgrade method, which was copied from
the mvebu platform method, we can switch mvebu to the generic method.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agobase-files: add generic sdcard upgrade method
Stijn Tintel [Thu, 29 Jul 2021 22:11:37 +0000 (01:11 +0300)]
base-files: add generic sdcard upgrade method

Add a generic sdcard upgrade method instead of duplicating code in yet
another target, and add a feature flag to only install this upgrade
method in targets that set this flag. Copied from mvebu.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agoscripts/target-metadata.pl: order features alphabetically
Stijn Tintel [Fri, 6 Aug 2021 22:28:08 +0000 (01:28 +0300)]
scripts/target-metadata.pl: order features alphabetically

We generaly do this in many other places, so let's do it here also.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agofirmware-utils: add GPL 2.0 SPDX to files with no license info
Rafał Miłecki [Wed, 4 Aug 2021 13:58:47 +0000 (15:58 +0200)]
firmware-utils: add GPL 2.0 SPDX to files with no license info

These files fall under the project license: GPL-2.0-only.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: tplink-safeloader: replace BSD-2-Clause boilerplate with SPDX
Rafał Miłecki [Wed, 4 Aug 2021 12:32:14 +0000 (14:32 +0200)]
firmware-utils: tplink-safeloader: replace BSD-2-Clause boilerplate with SPDX

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Matthias Schiffer <mschiffer@universe-factory.net>
3 years agofirmware-utils: seama: replace BSD-3-Clause boilerplate with SPDX
Rafał Miłecki [Wed, 4 Aug 2021 12:26:35 +0000 (14:26 +0200)]
firmware-utils: seama: replace BSD-3-Clause boilerplate with SPDX

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: replace GPL 2.0+ boilerplate/reference with SPDX
Rafał Miłecki [Wed, 4 Aug 2021 11:06:24 +0000 (13:06 +0200)]
firmware-utils: replace GPL 2.0+ boilerplate/reference with SPDX

This uses "GPL-2.0-or-later" header for files identified using scancode
license scanner with 100% score as GPL 2.0 or later.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: replace GPL 2.0 boilerplate/reference with SPDX
Rafał Miłecki [Wed, 4 Aug 2021 10:30:38 +0000 (12:30 +0200)]
firmware-utils: replace GPL 2.0 boilerplate/reference with SPDX

This uses "GPL-2.0-only" header for files identified using scancode
license scanner with 100% score as GPL 2.0.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agokirkwood: import patch to fix build and refresh patches
Daniel Golle [Thu, 5 Aug 2021 22:40:21 +0000 (23:40 +0100)]
kirkwood: import patch to fix build and refresh patches

kirkwood build broke due to missing include needed for ETH_ALEN.
Add patch (sent upstream as well) to address that.
Refresh patches for 5.4 and 5.10.

Fixes: 91a52f22a1 ("treewide: backport support for nvmem on non platform devices")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agokernel: kmod-xfrm-interface requires IPv6
Stijn Tintel [Fri, 12 Mar 2021 12:50:56 +0000 (14:50 +0200)]
kernel: kmod-xfrm-interface requires IPv6

The xfrm_interface module will not be built if IPv6 is not enabled in
the kernel. Add this dependency in the kmod package to avoid people
wondering why it doesn't build when they disabled IPv6.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agoramips: add missing label-mac-device for Xiaomi Mi Router 4A (100M)
Fabian Bläse [Mon, 19 Jul 2021 19:54:29 +0000 (21:54 +0200)]
ramips: add missing label-mac-device for Xiaomi Mi Router 4A (100M)

As both the Mi Router 4A (100M) and the Mi Router 4C use the same
label-mac-device, the alias can be moved to the shared dtsi.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
3 years agorealtek: fix syntax error introduced by previous commit
Daniel Golle [Thu, 5 Aug 2021 14:20:29 +0000 (15:20 +0100)]
realtek: fix syntax error introduced by previous commit

A superflus ')' character has slipped into commit 91a52f22a1. Remove it
to fix build.

Fixes: 91a52f22a1 ("treewide: backport support for nvmem on non platform devices")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agogeneric: fix to few arguments to of_get_mac_address
David Bauer [Thu, 5 Aug 2021 08:34:26 +0000 (10:34 +0200)]
generic: fix to few arguments to of_get_mac_address

Fixes commit 91a52f22a13d ("treewide: backport support for nvmem on non platform devices")

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoprocd: update to git HEAD and add new script helpers
Daniel Golle [Thu, 5 Aug 2021 01:56:17 +0000 (02:56 +0100)]
procd: update to git HEAD and add new script helpers

 e10de28 jail: cgroups-bpf: fix compile with musl 1.2
 f5d9b14 hotplug-dispatch: fix rare memory leaks in error paths

Add new init script helpers:
 procd_add_start_mount_trigger
 procd_add_reload_mount_trigger
 procd_get_mountpoints

Both trigger helpers expect a list of paths which are checked against
the mount targets configured in /etc/config/fstab and a trigger for all
mountpoints covered by the list of paths is setup.

procd_get_mountpoints is useful to find out if and which mountpoints
are covered by a list of paths.

Example:
  DATADIRS="/mnt/data/foo /mnt/data/bar /etc/foo/baz /var/lib/doe"

  start_service() {
    [ "$_BOOT" = "1" ] &&
      [ "$(procd_get_mountpoints $DATADIRS)" ] && return 0

    procd_open_instance
    # ...
    procd_close_instance
  }

  boot() {
    _BOOT=1 start
  }

  service_triggers() {
    procd_add_start_mount_trigger $DATADIRS
  }

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agofstools: update to git HEAD
Daniel Golle [Thu, 5 Aug 2021 02:34:56 +0000 (03:34 +0100)]
fstools: update to git HEAD

 d4f0129 blockd: also report target in notifications

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agomediatek: mt7622: enable HW RNG
David Bauer [Mon, 12 Jul 2021 23:11:57 +0000 (01:11 +0200)]
mediatek: mt7622: enable HW RNG

MT7622 provides are hardware RNG with upstream Linux driver. Enable
compilation of this driver to make use of the hardware RNG.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoath79: add support for GL.iNet GL-X300B
John Marrett [Tue, 8 Jun 2021 16:57:28 +0000 (12:57 -0400)]
ath79: add support for GL.iNet GL-X300B

The GL-X300B is a industrial 4G LTE router based on the Qualcomm
QCA9531 SoC.

Specifications:
 - Qualcomm QCA9531 @ 650 MHz
 - 128 MB of RAM
 - 16 MB of SPI NOR FLASH
 - 2x 10/100 Mbps Ethernet
 - 2.4GHz 802.11b/g/n
 - 1x USB 2.0 (vbus driven by GPIO)
 - 4x LED, driven by GPIO
 - 1x button (reset)
 - 1x mini pci-e slot (vcc driven by GPIO)
 - RS-485 Serial Port (untested)

Flash instructions:

This firmware can be flashed using either sysupgrade from the GL.iNet
firmware or the recovery console as follows:

 - Press and hold the reset button
 - Connect power to the router, wait five seconds
 - Manually configure 192.168.1.2/24 on your computer, connect to
   192.168.1.1
 - Upload the firmware image using the web interface

RS-485 serial port is untested and may depend on the following commit in
the GL.iNet repo:

https://github.com/gl-inet/openwrt/commit/202e83a32ae308fbb70502b6dbe3bb0bf8b1fba9

MAC addresses as verified by OEM firmware:

vendor   OpenWrt   address
WAN      eth0      label
LAN      eth1      label + 1
2g       phy0      label + 2

The label MAC address was found in the art partition at 0x0

Based on vendor commit:

https://github.com/gl-inet/openwrt/commit/16c5708b207eb76ff19a040dc973e560d3d8074b

Signed-off-by: John Marrett <johnf@zioncluster.ca>
3 years agogeneric: add missing Kconfig symbol ARM_SCMI_PROTOCOL
Hannu Nyman [Mon, 2 Aug 2021 17:14:57 +0000 (20:14 +0300)]
generic: add missing Kconfig symbol ARM_SCMI_PROTOCOL

Add the missing ARM_SCMI_PROTOCOL symbol. Apparently it was exposed
for 5.10.53 with a kernel dependency change.
Missing symbol observed with mediatek/7622 E8450/RT3200 router.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoethtool: update to v5.13
David Bauer [Sat, 31 Jul 2021 10:07:10 +0000 (12:07 +0200)]
ethtool: update to v5.13

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agogeneric: enable netlink ethtool interface
David Bauer [Thu, 4 Mar 2021 00:17:44 +0000 (01:17 +0100)]
generic: enable netlink ethtool interface

The virtual cable tester depends on the netlink interface for ethtool.
Thus, enable it in the generic kernel configuration.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoethtool: introduce ethtool-full build variant
David Bauer [Wed, 3 Mar 2021 23:11:31 +0000 (00:11 +0100)]
ethtool: introduce ethtool-full build variant

Netlink support is required for using the virtual cable tester
functionality.

Remove the pretty print build option and instead create a second package
variant ethtool-full. This allows users to install the full ethtool
featureset using opkg.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agotreewide: backport support for nvmem on non platform devices
Ansuel Smith [Fri, 23 Jul 2021 18:19:43 +0000 (20:19 +0200)]
treewide: backport support for nvmem on non platform devices

In the current state, nvmem cells are only detected on platform device.
To quickly fix the problem, we register the affected problematic driver
with the of_platform but that is more an hack than a real solution.
Backport from net-next the required patch so that nvmem can work also
with non-platform devices and rework our current patch.
Drop the mediatek and dsa workaround and rework the ath10k patches.
Rework every driver that use the of_get_mac_address api.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
3 years agoprocd: update to git HEAD
Daniel Golle [Wed, 4 Aug 2021 18:10:19 +0000 (19:10 +0100)]
procd: update to git HEAD

Fix build on glibc targets and address a bunch of compiler warnings.

 93fc089 jail: cgroups-bpf: don't use sys/reg.h when building with glibc
 548d057 jail: don't ignore return value of seteuid()
 220b716 jail: ignore return value when creating default /dev symlinks
 78d5baa hotplug-dispatch: don't ignore asprintf() return value
 736aee5 uxc: always handle asprintf() return value
 2b20456 hotplug-dispatch: replace wrongly used assert()
 bfc86a2 jail: cgroups: replace wrongly used assert()
 516bdf2 jail: don't ignore return value of write()

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agobase-files: upgrade: try umount lvm and loop devices
Daniel Golle [Wed, 4 Aug 2021 18:03:16 +0000 (19:03 +0100)]
base-files: upgrade: try umount lvm and loop devices

Try umount on device mapper and loop devices still mounted, so the
subsequent call to disactivate all physical volumes and delete all
loop devices is more likely to succeed.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agokernel: fix kernel 5.5 and 5.9 PCI DT regressions
Rafał Miłecki [Wed, 4 Aug 2021 06:10:02 +0000 (08:10 +0200)]
kernel: fix kernel 5.5 and 5.9 PCI DT regressions

This fixes PCI on bcm53xx.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofstools: update to git HEAD
Daniel Golle [Tue, 3 Aug 2021 21:55:00 +0000 (22:55 +0100)]
fstools: update to git HEAD

 141ac85 libblkid-tiny: fix invalid open syscall return check
 9e26563 libblkid-tiny: install header file to include dir

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoubox: update to git HEAD
Daniel Golle [Tue, 3 Aug 2021 21:43:39 +0000 (22:43 +0100)]
ubox: update to git HEAD

 1f4f72b logd: fix privilege dropping order
 205defb logread: fix erroneous message "Logread connected to" with udp

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoimages: squashfs: xattrs should not depend on buld host
Daniel Golle [Mon, 2 Aug 2021 18:14:53 +0000 (20:14 +0200)]
images: squashfs: xattrs should not depend on buld host

Enable xattr for the generated squashfs only if needed for SELinux.
This eliminates warnings during boot on target when building
(non-SELinux) OpenWrt on SELinux-enabled hosts like Fedora.

Reported-by: fda77 <fda77@users.noreply.github.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agobase-files: sysupgrade stage2: fix losetup detection
Daniel Golle [Mon, 2 Aug 2021 18:51:58 +0000 (20:51 +0200)]
base-files: sysupgrade stage2: fix losetup detection

If the busybox applet losetup was selected, `command -v` selects that
during sysupgrade. As this applet is in another path and doesn't cover
the '-D' option which is used to make sure user-defined loop devices
are no longer active during sysupgrade.
Detect losetup at the path of the full utility to avoid error messages
in case of the busybox applet being selected.

Reported-by: fda77 <fda77@users.noreply.github.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agonat46: fix translation of ICMP protocols parameter problem and unreachable
Hans Dedecker [Sun, 1 Aug 2021 19:10:05 +0000 (21:10 +0200)]
nat46: fix translation of ICMP protocols parameter problem and unreachable

9b3a819 nat46-core: Fix translation of ICMP protocols parameter problem and unreachable (#27)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>