1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-26 01:27:28 +02:00
Commit Graph

51750 Commits

Author SHA1 Message Date
Linus Walleij
83441522a2 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>
2021-08-08 19:50:45 +02:00
Josef Schlehofer
d379476817 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>
2021-08-08 19:50:45 +02:00
Josef Schlehofer
7b868fe04a 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 080a0b74e3.

[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>
2021-08-08 19:50:45 +02:00
Klaus Kudielka
82620cd610 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>
2021-08-08 19:50:45 +02:00
Klaus Kudielka
f2c57a294f 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>
2021-08-08 19:50:45 +02:00
Klaus Kudielka
b3b855191b 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>
2021-08-08 19:50:45 +02:00
Rui Salvaterra
86c0c12c74 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>
2021-08-08 19:50:45 +02:00
Rui Salvaterra
968dc33299 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>
2021-08-08 19:50:45 +02:00
Damien Mascord
8e10b0181c 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>
2021-08-08 19:49:29 +02:00
John Audia
3c0a26b43a 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>
2021-08-08 17:57:34 +02:00
Rui Salvaterra
33e84e70ef kernel: bump 5.10 to 5.10.56
No patches needed refreshing

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-08-08 17:57:34 +02:00
Rui Salvaterra
39d12b0155 kernel: bump 5.10 to 5.10.55
No deleted or manually refreshed patches.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-08-08 17:57:34 +02:00
Daniel Golle
80be893d2b
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>
2021-08-08 15:26:28 +01:00
Stijn Tintel
b1bff5cb57 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>
2021-08-07 01:43:39 +03:00
Stijn Tintel
8347d8b4fb 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>
2021-08-07 01:34:40 +03:00
Stijn Tintel
84c9570aaa 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>
2021-08-07 01:30:37 +03:00
Rafał Miłecki
2dc1e4b488 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>
2021-08-06 09:50:44 +02:00
Rafał Miłecki
e7ae32b8df 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>
2021-08-06 09:50:44 +02:00
Rafał Miłecki
63bf027cc1 firmware-utils: seama: replace BSD-3-Clause boilerplate with SPDX
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-06 09:50:44 +02:00
Rafał Miłecki
60aa12984a 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>
2021-08-06 09:50:42 +02:00
Rafał Miłecki
f705008d7e 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>
2021-08-06 09:34:55 +02:00
Daniel Golle
a0b827b916
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>
2021-08-05 23:53:07 +01:00
Stijn Tintel
986685f4f0 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>
2021-08-06 00:21:08 +03:00
c36e9f891b 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>
2021-08-05 22:55:39 +02:00
Daniel Golle
e3096c384c
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>
2021-08-05 15:22:26 +01:00
David Bauer
774b386a92 generic: fix to few arguments to of_get_mac_address
Fixes commit 91a52f22a1 ("treewide: backport support for nvmem on non platform devices")

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-05 13:05:06 +02:00
Daniel Golle
46a65f927c
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>
2021-08-05 03:46:21 +01:00
Daniel Golle
aa21110e44
fstools: update to git HEAD
d4f0129 blockd: also report target in notifications

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-08-05 03:46:11 +01:00
David Bauer
c3d99ae792 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>
2021-08-05 01:48:55 +02:00
John Marrett
252466a0ce 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:

202e83a32a

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:

16c5708b20

Signed-off-by: John Marrett <johnf@zioncluster.ca>
2021-08-05 01:48:17 +02:00
Hannu Nyman
13d6d27422 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>
2021-08-05 01:48:17 +02:00
David Bauer
0a65fbbdfa ethtool: update to v5.13
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-05 01:48:13 +02:00
David Bauer
1e37399235 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>
2021-08-05 01:47:07 +02:00
David Bauer
d858366441 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>
2021-08-05 01:47:00 +02:00
Ansuel Smith
91a52f22a1 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>
2021-08-05 01:46:26 +02:00
Daniel Golle
edb6bc1990
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>
2021-08-04 19:12:44 +01:00
Daniel Golle
e67865c569
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>
2021-08-04 19:12:34 +01:00
Rafał Miłecki
b37f0dde78 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>
2021-08-04 08:42:30 +02:00
Daniel Golle
080a2d4bdf
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>
2021-08-04 00:13:50 +01:00
Daniel Golle
0f5e8c8614
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>
2021-08-04 00:13:45 +01:00
Daniel Golle
4baf47b9a8
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>
2021-08-03 18:28:53 +01:00
Daniel Golle
af76e26b55
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>
2021-08-03 18:28:44 +01:00
Hans Dedecker
022d1fe80f 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>
2021-08-01 21:13:00 +02:00
Daniel Golle
ddc8d085f3
dnsmasq: reset EXTRA_MOUNT in the right place
EXTRA_MOUNT variable should be reset in dnsmasq_start() rather than
just once at the beginning of the script.

Fixes: ac4e8aa2f8 ("dnsmasq: fix more dnsmasq jail issues")
Reported-by: Hartmut Birr <e9hack@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-08-01 15:06:57 +01:00
Daniel Golle
ac4e8aa2f8
dnsmasq: fix more dnsmasq jail issues
* remove superflus mounts of /dev/null and /dev/urandom
 * reset EXTRA_MOUNTS at the beginning of the script
 * add mount according to ignore_hosts_dir
 * don't add mount for file which is inside a directory already in the
   EXTRA_MOUNTS list

Fixes: 59c63224e1 ("dnsmasq: rework jail mounts")
Reported-by: Hartmut Birr <e9hack@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-08-01 11:35:31 +01:00
Daniel Golle
59c63224e1
dnsmasq: rework jail mounts
* split into multiple lines to improve readability
 * use EXTRA_MOUNT for addnhosts instead of blindly adding /tmp/hosts
 * remove no longer needed mount for /sbin/hotplug-call
 * add dhcp-script.sh dependencies (jshn, ubus)

Fixes: 3a94c2ca5c ("dnsmasq: add /tmp/hosts/ to jail_mount")
Fixes: aed95c4cb8 ("dnsmasq: switch to ubus-based hotplug call")
Reported-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-08-01 03:47:43 +01:00
David Bauer
191c4ff5e1 generic: add missing ARM64 crypto Kconfig symbols
bcm27xx-bcm2710 builds are stalling when compiled with V=s.

Explitily disable these unset symbols to avoid stalling
builds.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-31 22:14:02 +02:00
Hans Dedecker
e02a4c2080 odhcp6c: update to latest git HEAD
94adc8b odhcp6c: use strpbrk to provide get_sep_pos
e0d9a4b cmake: enable extra compiler checks

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2021-07-31 21:26:41 +02:00
John Audia
9993e3e3e6 kernel: bump 5.4 to 5.4.137
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>
2021-07-31 19:13:00 +02:00
John Audia
bd3cb93034 kernel: bump 5.4 to 5.4.136
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>
2021-07-31 19:13:00 +02:00