openwrt/staging/dangole.git
3 years agotoolchain/gdb: fix compilation with ccache
Rosen Penev [Mon, 5 Apr 2021 01:32:30 +0000 (18:32 -0700)]
toolchain/gdb: fix compilation with ccache

For some reason, one of the configure checks results in some infinite
loop and ends up spawning endless gcc processes, causing OOM. Just pass
a configure var to avoid it.

Same fix as 6e23813c1ed7494a9da3b5e59cfcafd71097c420

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agokernel/modules: move act_gact into kmod-sched-core
DENG Qingfang [Fri, 9 Apr 2021 04:25:08 +0000 (12:25 +0800)]
kernel/modules: move act_gact into kmod-sched-core

As the name suggests, act_gact has the generic actions such as dropping
and accepting packets, so move it into kmod-sched-core.

Signed-off-by: DENG Qingfang <dqfext@gmail.com>
3 years agolinux-firmware: ath10k: add support for Qualcomm Atheros QCA9377
Josef Schlehofer [Sat, 10 Apr 2021 17:07:40 +0000 (19:07 +0200)]
linux-firmware: ath10k: add support for Qualcomm Atheros QCA9377

Add firmware and board file for Qualcomm Atheros QCA9377 802.11ac Wireless
Network Adapter (rev 31) recognized as [168c:0042].

This card supports standard 1x1 802.11ac Wave2, BT5, and MU-MIMO.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
3 years agoltq-vdsl-app: extent dsl metrics with state_num and power_state_num
Florian Eckert [Tue, 13 Apr 2021 09:30:33 +0000 (11:30 +0200)]
ltq-vdsl-app: extent dsl metrics with state_num and power_state_num

With the old ubus dsl API, the numbers for the individual line_states and
power_states were also returned. These were not ported to the new DSL
C-API. This commit adds the missing information.

For this the internal values are mapped to numbers.

* additional JSON output for state_num:
"state_num": <map_state_number>

Since not all values are meaningful only the following values are
implemented, this can be extended if the future.

* LSTATE_MAP_NOT_INITIALIZED
* LSTATE_MAP_EXCEPTION
* LSTATE_MAP_IDLE
* LSTATE_MAP_SILENT
* LSTATE_MAP_HANDSHAKE
* LSTATE_MAP_FULL_INIT
* LSTATE_MAP_SHOWTIME_NO_SYNC
* LSTATE_MAP_SHOWTIME_TC_SYNC
* LSTATE_MAP_RESYNC

* additinal JSON output for power_level:
"power_state_num": <map_power_satte_number>,

Since there are not so many here, all are mapped.

* PSTATE_MAP_NA,
* PSTATE_MAP_L0,
* PSTATE_MAP_L1,
* PSTATE_MAP_L2,
* PSTATE_MAP_L3,

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
v6:
Add state LSTATE_MAP_NOT_INITILIZED at the beginning of the list
Start the list LSTATE_MAP with -1
Reviewed-by: Andre Heider <a.heider@gmail.com>
3 years agokernel: Disable IXP4xx physmap by default
Linus Walleij [Wed, 14 Apr 2021 08:36:21 +0000 (10:36 +0200)]
kernel: Disable IXP4xx physmap by default

This makes no sense on anything but the IXP4xx platform
that we do not even support anymore. If we bring it back,
it can be selectively enabled for that platform only.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
3 years agokernel: Disable CPU_THERMAL by default
Linus Walleij [Wed, 14 Apr 2021 08:45:06 +0000 (10:45 +0200)]
kernel: Disable CPU_THERMAL by default

This config is for platforms that have:
A) CONFIG_THERMAL set (we disable it by default)
B) Has thermal zones that need to control cpufreq

This is not suitable for default config, it needs to be enabled
on a per-target basis in individual configs.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
3 years agokernel: Disable GPIO_CDEV_V1 by default
Linus Walleij [Wed, 14 Apr 2021 08:53:11 +0000 (10:53 +0200)]
kernel: Disable GPIO_CDEV_V1 by default

We do not enable GPIO_CDEV so do not enable CDEV_V1
either. As we rebuild the whole userspace and kernel
in OpenWRT it doesn't make any sense to support the
old ABI anyway: the new one should be used by default.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
3 years agokernel: Disable CONFIG_DMA_PERNUMA_CMA by default
Linus Walleij [Wed, 14 Apr 2021 23:11:09 +0000 (01:11 +0200)]
kernel: Disable CONFIG_DMA_PERNUMA_CMA by default

This CMA memory allocation option only applies to NUMA
(Non-Uniform Memory Access) systems which are seldom
the kind of systems that OpenWRT address.

It is safe to assume that any system that need this
option would turn it on locally.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
3 years agokernel: Remove dead scheduler options
Linus Walleij [Wed, 14 Apr 2021 23:48:47 +0000 (01:48 +0200)]
kernel: Remove dead scheduler options

The non-MQ CFQ, deadline and noop IO schedulers are
deleted from the Linux kernel
since commit f382fb0bcef4c37dc049e9f6963e3baf204d815c
"block: remove legacy IO schedulers".

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
3 years agokernel: bump 5.4 to 5.4.113
John Audia [Fri, 16 Apr 2021 13:46:53 +0000 (09:46 -0400)]
kernel: bump 5.4 to 5.4.113

Ran update_kernel.sh in a fresh clone without any existing toolchains.  No
manual intervention needed.

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.112
John Audia [Wed, 14 Apr 2021 11:25:24 +0000 (07:25 -0400)]
kernel: bump 5.4 to 5.4.112

Ran update_kernel.sh in a fresh clone without any existing toolchains.

Removed upstreamed:
  mvebu/patches-5.4/319-ARM-dts-turris-omnia-configure-LED-2--INTn-pin-as-interrupt-pin.patch

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.111
John Audia [Sat, 10 Apr 2021 13:12:08 +0000 (09:12 -0400)]
kernel: bump 5.4 to 5.4.111

Refreshed with update_kernel.sh. No manual tweaks needed.

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.31
Rui Salvaterra [Fri, 16 Apr 2021 16:30:59 +0000 (17:30 +0100)]
kernel: bump 5.10 to 5.10.31

Automatically refreshed:
ramips/patches-5.10/710-at803x.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agoglibc: update to latest 2.33 commit
Hans Dedecker [Sat, 17 Apr 2021 19:24:39 +0000 (21:24 +0200)]
glibc: update to latest 2.33 commit

12ff80b312 Remove PR_TAGGED_ADDR_ENABLE from sys/prctl.h
1bf38e7260 Fix SXID_ERASE behavior in setuid programs (BZ #27471)
a7b8e8ec9b Enhance setuid-tunables test
ee16c81063 tst-env-setuid: Use support_capture_subprogram_self_sgid
267e174f19 support: Add capability to fork an sgid child
249c486ce8 support: Pass environ to child process
45b2c57d34 support: Typo and formatting fixes
e07abf59b2 tunables: Fix comparison of tunable values
3e9ca60a58 linux: always update select timeout (BZ #27706)
8380ca5833 linux: Normalize and return timeout on select (BZ #27651)
85e4dc415a libsupport: Add support_select_normalizes_timeout
b5b4aa62c1 libsupport: Add support_select_modifies_timeout
3d525dd639 misc: Fix tst-select timeout handling (BZ#27648)
830674605f tst: Provide test for select

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agoodhcp6c: read user scripts from directory
Leon M. George [Tue, 23 Mar 2021 10:02:36 +0000 (11:02 +0100)]
odhcp6c: read user scripts from directory

Placeholder DHCP user scripts were added recently.

These files make package-based installations of such scripts more difficult.
Pull user callbacks from directories instead to allow packages and users to
install co-existing scripts more easily.

References:
b4f3d93b5 odhcp6c: add a odhcp6c.user placeholder script

Signed-off-by: Leon M. George <leon@georgemail.eu>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
3 years agonetifd: read udhcpc user scripts from directory
Leon M. George [Tue, 23 Mar 2021 10:02:36 +0000 (11:02 +0100)]
netifd: read udhcpc user scripts from directory

Placeholder DHCP user scripts were added recently.

These files make package-based installations of such scripts more difficult.
Pull user callbacks from directories instead to allow packages and users to
install co-existing scripts more easily.

References:
130118f7a netifd: add a udhcpc.user placeholder script

Signed-off-by: Leon M. George <leon@georgemail.eu>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
3 years agoath79: update spi-nor patches
David Bauer [Tue, 6 Apr 2021 20:50:51 +0000 (22:50 +0200)]
ath79: update spi-nor patches

Update the 4 bit BP patches for Ubiquiti boards with the second
iteration sent upstream.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoath79: remove unused patch
David Bauer [Fri, 16 Apr 2021 16:29:58 +0000 (18:29 +0200)]
ath79: remove unused patch

This patch ist not required, as it only has an effect in case the GPIO
descriptors supplied to num-cs are valid.

As this is not the case for ath79, this patch can safely be omitted. The
issue it tried to fix is actually fixed with
0054-spi-sync-up-initial-chipselect-state.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agomediatek: fix Ubiquiti UniFi 6 LR LED
David Bauer [Fri, 16 Apr 2021 10:30:43 +0000 (12:30 +0200)]
mediatek: fix Ubiquiti UniFi 6 LR LED

When adding Kernel 5.10 support, the kernel configuration did not
include the LED driver required for the UniFi 6 LR. Also the actual
driver source went missing.

Fixes commit c46ccb69d17e ("mediatek: mt7622: add Linux 5.10 support")

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agokernel: bump 5.10 to 5.10.30
Rui Salvaterra [Wed, 14 Apr 2021 18:47:00 +0000 (19:47 +0100)]
kernel: bump 5.10 to 5.10.30

Deleted (reverse-applicable):
mvebu/patches-5.10/101-ARM-dts-turris-omnia-configure-LED-2--INTn-pin-as-interrupt-pin.patch

Automatically refreshed:
bcm63xx/patches-5.10/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch
generic/backport-5.10/610-v5.13-02-netfilter-Fix-fall-through-warnings-for-Clang.patch
generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch
generic/hack-5.10/204-module_strip.patch
generic/hack-5.10/902-debloat_proc.patch
generic/pending-5.10/203-kallsyms_uncompressed.patch
generic/pending-5.10/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
generic/pending-5.10/920-mangle_bootargs.patch
mediatek/patches-5.10/115-dts-bpi64-add-snand-support.patch
mediatek/patches-5.10/602-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-MT7622.patch
mediatek/patches-5.10/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch
ramips/patches-5.10/323-mt7621-memory-detect.patch

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agoath79: mikrotik: enable SFP on RB922UAGS-5HPaCD
Roger Pueyo Centelles [Fri, 18 Dec 2020 21:26:55 +0000 (22:26 +0100)]
ath79: mikrotik: enable SFP on RB922UAGS-5HPaCD

This patch enables the SFP cage on the MikroTik RouterBOARD 922UAGS-5HPacD.

GPIO16 (tx-disable-gpios) should be governed by the SFP driver to enable
or disable transmission, but no change is observed. Therefore, it is
left as output high to ensure the SFP module is forced to transmit.

Tested on a RouterBOARD 922UAGS-5HPacD board, with a CISCO GLC-LH-SMD
1310nm module and an unbranded GLC-T RJ45 Gigabit module. PC=>router
iperf3 tests deliver 440/300 Mbps up/down, both via regular eth0 port
or SFP port with RJ45 module. Bridge between eth0 and eth1 delivers
950 Mbps symmetric.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
3 years agogemini,layerscape,oxnas: don't disable option CONFIG_BPF_SYSCALL
Tony Ambardar [Sun, 11 Apr 2021 05:18:10 +0000 (22:18 -0700)]
gemini,layerscape,oxnas: don't disable option CONFIG_BPF_SYSCALL

Respect the generic kernel config setting, which is "enabled" tree-wide, as
previously done for sunxi.

Ref: 247ef4d98bab ("sunxi: enable CONFIG_BPF_SYSCALL and CONFIG_EMBEDDED")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
3 years agoath79: fix 10 Mbit PLL data for TP-Link EAP2xx
David Bauer [Wed, 14 Apr 2021 22:30:24 +0000 (00:30 +0200)]
ath79: fix 10 Mbit PLL data for TP-Link EAP2xx

Fix the PLL register value for 10 Mbit/s link modes on TP-Link EAP
boards using a AR8033 SGMII PHY.

Otherwise, 10 Mbit/s links do not transfer data.

Reported-by: Tom Herbers <freifunk@tomherbers.de>
Tested-by: Tom Herbers <freifunk@tomherbers.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoath79: fix 10 Mbit PLL data for UniFi AC
David Bauer [Wed, 14 Apr 2021 21:58:25 +0000 (23:58 +0200)]
ath79: fix 10 Mbit PLL data for UniFi AC

Fix the PLL register value for 10 Mbit/s link modes on the UniFi AC Lite
/ Mesh / LR. Otherwise, 10 Mbit/s links do not transfer data.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoath79: fix link mode support list on UniFi AC
David Bauer [Wed, 14 Apr 2021 22:54:49 +0000 (00:54 +0200)]
ath79: fix link mode support list on UniFi AC

This fixes incorrect supported link modes indicated when using ethtool
on the Ubiquiti UniFi AC lite / LR / Mesh.

eroot@OpenWrt:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes:   100baseT/Half 100baseT/Full
                        1000baseT/Full
                        1000baseX/Full

The reason for this is, that since kernel 5.4 the PHY capabilities are
read dynamically from the PHY. As Ubiquiti leaves the PHY in a wrong
state, the capabilities of the SGMII side of the PHY are read.

As a side effect, 10 Mbit/s link modes did not work on these boards.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoramips/mediatek: import a patch fixing bug in flow-offloading
Daniel Golle [Thu, 15 Apr 2021 19:24:23 +0000 (20:24 +0100)]
ramips/mediatek: import a patch fixing bug in flow-offloading

From Frank Wunderlich <frank-w@public-files.de>:
Issue were traffic problems after a while with increased ping times if
flow offload is active.

It turns out that key_offset with cookie is needed in rhashtable_params
and head_offset was defined twice.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agolibsemanage: fix pkgconfig paths
Rosen Penev [Wed, 14 Apr 2021 03:18:26 +0000 (20:18 -0700)]
libsemanage: fix pkgconfig paths

The pkgconfig file currently points to host paths.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agouboot-sunxi: update ATF dependencies for 3 boards
Zoltan HERPAI [Wed, 14 Apr 2021 08:18:25 +0000 (10:18 +0200)]
uboot-sunxi: update ATF dependencies for 3 boards

Fix 3 board definitions that were missed in the process of moving
to the a64/h6 ATF blobs.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agoramips: gpio-ralink: use ngpios, not ralink,num-gpios
Ilya Lipnitskiy [Tue, 6 Apr 2021 05:53:46 +0000 (22:53 -0700)]
ramips: gpio-ralink: use ngpios, not ralink,num-gpios

DTS properties that match *-gpios are treated specially.

Use ngpios instead, as most GPIO drivers upstream do.

Fixes 5.10 DTS errors such as:
  OF: /palmbus@300000/gpio@600: could not find phandle

Fixes DTC warnings such as:
  Warning (gpios_property): /palmbus@300000/gpio@600:ralink,num-gpios:
  Could not get phandle node for (cell 0)

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Cc: Daniel Golle <daniel@makrotopia.org>
3 years agoramips: rt288x: replace hack with a kconfig change
Ilya Lipnitskiy [Sun, 4 Apr 2021 02:26:11 +0000 (19:26 -0700)]
ramips: rt288x: replace hack with a kconfig change

Use an existing kernel config symbol to fix devices whose ramstart is
not zero. See upstream patch message for more details.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Cc: Tobias Wolf <dev-NTEO@vplace.de>
Cc: Daniel Golle <daniel@makrotopia.org>
3 years agoramips: mt7530 swconfig: fix race condition in register access
DENG Qingfang [Sat, 3 Apr 2021 14:59:15 +0000 (22:59 +0800)]
ramips: mt7530 swconfig: fix race condition in register access

The mt7530_{r,w}32 operation over MDIO uses 3 mdiobus operations and
does not hold a lock, which causes a race condition when multiple
threads try to access a register, they may get unexpected results.

To avoid this, handle the MDIO lock manually, and use the unlocked
__mdiobus_{read,write} in the critical section.

This fixes the "Ghost VLAN" artifact[1] in MT7530/7621 when the VLAN
operation and the swconfig LED link status poll race between each other.

[1] https://forum.openwrt.org/t/mysterious-vlan-ids-on-mt7621-device/64495

Signed-off-by: DENG Qingfang <dqfext@gmail.com>
3 years agoramips: drop obsolete arcs_cmdline override patch
Ilya Lipnitskiy [Fri, 19 Mar 2021 05:22:52 +0000 (22:22 -0700)]
ramips: drop obsolete arcs_cmdline override patch

CONFIG_MIPS_CMDLINE_FROM_DTB is set to 'y' for all ramips targets
already, which will ensure that the value of 'bootargs' will take
precedence over whatever is in arcs_cmdline.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
3 years agofirmware-utils: tplink-safeloader: support displaying fw info
Rafał Miłecki [Thu, 8 Apr 2021 21:49:43 +0000 (23:49 +0200)]
firmware-utils: tplink-safeloader: support displaying fw info

Add "-i" option for reading & displaying firmware info. First it lists
in-firmware partitions ("fwup-ptn"). Then it checks for human
understandable partitions and prints data found in each of them.

This new feature is meant for development & debug purposes.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agouci: update to the latest master
Rafał Miłecki [Wed, 14 Apr 2021 06:32:26 +0000 (08:32 +0200)]
uci: update to the latest master

4b3db11 cli: add option for changing save path

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobcm53xx: add pending TRX patch for "firmware" partition
Rafał Miłecki [Wed, 14 Apr 2021 06:26:25 +0000 (08:26 +0200)]
bcm53xx: add pending TRX patch for "firmware" partition

This fixes partitioning on Linksys EA9500. With this change only the
currently used firmware MTD partition gets parsed.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agokernel: limit crypto-hw-ccp to the x86
Rafał Miłecki [Tue, 13 Apr 2021 08:15:39 +0000 (10:15 +0200)]
kernel: limit crypto-hw-ccp to the x86

CRYPTO_DEV_CCP depends on X86 or ARM64
CRYPTO_DEV_CCP_DD depends on CPU_SUP_AMD or ARM64

Compiling this driver makes sense for x86 mainly. If one day support for
ARM64 board with AMD Secure Processor gets added this package may be
updated.

Trying to build this package on bcm4908 was causing:
ERROR: module 'build_dir/target-aarch64_cortex-a53_musl/linux-bcm4908_generic/linux-5.4.110/drivers/crypto/ccp/ccp-crypto.ko' is missing.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agokernel: crypto: format "crypto-hw-ccp" dependencies
Rafał Miłecki [Tue, 13 Apr 2021 15:18:27 +0000 (17:18 +0200)]
kernel: crypto: format "crypto-hw-ccp" dependencies

Use multiples lines for better readability and sort lines.

Suggested-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: mkmylofw: fix blocks padding
Rafał Miłecki [Tue, 13 Apr 2021 11:53:57 +0000 (13:53 +0200)]
firmware-utils: mkmylofw: fix blocks padding

The old code didn't make sense as it was using "len" variable which was
guaranteed to be always 0. Loop right above broken code is:
while (len > 0) { }

With this recent ALIGN macro fix this resulted in subtracting block size
from 0 and calling write_out_padding() with a negative length.

To calculate amount of bytes needed for padding & alignment it should be
enough to use % 4.

Fixes: a2f66229450d ("firmware-utils: fix few random warnings")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: zyimage: drop POSIX SOURCE defines
Rafał Miłecki [Fri, 9 Apr 2021 09:36:57 +0000 (11:36 +0200)]
firmware-utils: zyimage: drop POSIX SOURCE defines

This fixes:
src/zyimage.c:10:0: warning: "_POSIX_SOURCE" redefined
src/zyimage.c:11:0: warning: "_POSIX_C_SOURCE" redefined

This change has been tested on Linux with -Wextra and on Mac OS.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agotplink-safeloader: fix C7v5 factory flashing from vendor fw > v1.1.x
Petr Štetiar [Fri, 9 Apr 2021 12:52:05 +0000 (14:52 +0200)]
tplink-safeloader: fix C7v5 factory flashing from vendor fw > v1.1.x

Currently it's not possible to flash factory images on devices shipped
with vendor firmware versions 1.1.0 Build 20201120 rel. 50406 (published
2020-12-22):

 (curFw_ver, newFw_ver) == (1.1, 1.0) [NM_Error](nm_checkSoftVer) 00848: Firmwave not supports, check failed.
 [NM_Error](nm_checkUpdateContent) 01084: software version dismatched
 [NM_Error](nm_buildUpgradeStruct) 01188: checkUpdateContent failed.

They've even following note in release notes:

 Note: You will be unable to downgrade to the previous firmware version
       after updating this firmware.

This version check in vendor firmware is implemented in
/usr/bin/nvrammanager binary likely as following C code[1]:

 sscanf(buf, "%d.%d.%*s",&upd_fw_major, &upd_fw_minor);
 ...
 if (((int)upd_fw_major < (int)cur_fw_major) ||
     ((ret = 1, cur_fw_major == upd_fw_major && (upd_fw_minor < (int)cur_fw_minor)))) {
       ret = 0;
       printf("[NM_Error](%s) %05d: Firmwave not supports, check failed.\r\n\r\n","nm_checkSoftVer" ,0x350);
 }
 ...
 return ret;

So in order to fix this and make it future proof it should be enough to
ship our factory firmware images with major version 7 (lucky number).

Tested on latest firmware version 1.1.2 Build 20210125 rel.37999:

 Firmwave supports, check OK.
  (curFw_ver, newFw_ver) == (1.1, 7.0) check firmware ok!

Flashing back to vendor firmware
c7v5_us-up-ver1-1-2-P1[20210125-rel37999]_2021-01-25_10.33.55.bin works
as well:

 U-Boot 1.1.4-gbec22107-dirty (Nov 18 2020 - 18:19:12)
 ...
 Firmware downloaded... filesize = 0xeeae77 fileaddr = 0x80060000.
 Firmware Recovery file length : 15642231
 Firmware process id 2.
 handle_fw_cloud 146
 Image verify OK!
 Firmware file Verify ok!
 product-info:product_name:Archer C7
 product_ver:5.0.0
 special_id:55530000
 [Error]sysmgr_cfg_checkSupportList(): 1023 @ specialId 45550000 NOT Match.
 Firmware supports, check OK.
 Firmware Recovery check ok!

1. https://gist.github.com/ynezz/2e0583647d863386a66c3d231541b6d1

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agoath79: add missing patch for kernel 5.10
David Bauer [Mon, 12 Apr 2021 22:37:29 +0000 (00:37 +0200)]
ath79: add missing patch for kernel 5.10

When adding the patch for the missing register, the patch file for the
testing kernel 5.10 was not included.

Fixes commit fbbad9a9a629 ("ath79: force SGMII SerDes
mode to MAC operation")
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoath79: force SGMII SerDes mode to MAC operation
David Bauer [Wed, 31 Mar 2021 23:20:45 +0000 (01:20 +0200)]
ath79: force SGMII SerDes mode to MAC operation

The mode on the SGMII SerDes on the QCA9563 is 1000 Base-X by default.
This only allows for 1000 Mbit/s links, however when used with an SGMII
PHY in 100 Mbit/s link mode, the link remains dead.

This strictly has nothing to do with the SerDes calibration, however it
is done at the same point in the QCA reference U-Boot which is the
blueprint for everything happening here. As the current state is more or
less a hack, this should be fine.

This fixes the issues outlined above on a TP-Link EAP-225 Outdoor.

Reported-by: Tom Herbers <freifunk@tomherbers.de>
Tested-by: Tom Herbers <freifunk@tomherbers.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agolantiq: kernel 5.10: disable ltq-deu
Mathias Kresin [Sun, 27 Dec 2020 21:58:45 +0000 (22:58 +0100)]
lantiq: kernel 5.10: disable ltq-deu

For linux 5.10, kmod-ltq-deu need to be migrated to the new crypto
API/framework.

Leave it in tree for now and enable it only for Kernel 5.4. Maybe
someone picks up the work to migrate the package.

Signed-off-by: Mathias Kresin <dev@kresin.me>
3 years agolantiq: add Linux 5.10 support as testing kernel
Mathias Kresin [Sun, 27 Dec 2020 09:28:08 +0000 (10:28 +0100)]
lantiq: add Linux 5.10 support as testing kernel

Following changes are made to the Lantiq kernel patches:

  0001-MIPS-lantiq-add-pcie-driver.patch
    The pci header isn't included by the of_pci header any longer

  0024-MIPS-lantiq-revert-DSA-switch-driver-PMU-clock-chang.patch
    Due to the merge of grx390 and ar10 clocks, extend support to grx390

  0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
    The do_carrier arguments was dropped from phy_link_change. The
    phylib has always sets the third parameter to true so the flag is
    always changed anyway.

    of_get_phy_mode() returns an error, or 0 on success, and pass a
    pointer, of type phy_interface_t, where the phy mode should be
    stored now. So far an error wasn't considered. Print at least an
    error message if something unexpected happens.

    The stuck queue is now passed to xrx200_tx_timeout (the timeout
    handler) but not used so far.

  0028-NET-lantiq-various-etop-fixes.patch
    ioremap has provided non-cached semantics by default since the Linux
    2.6 days and was removed with kernel version 5.6.

    of_get_phy_mode() returns an error, or 0 on success, and pass a
    pointer, of type phy_interface_t, where the phy mode should be
    stored now. So far an error wasn't considered. Print at least an
    error message if something unexpected happens.

  0042-arch-mips-increase-io_space_limit.patch
    Move IO space extension to laniq specific file

Signed-off-by: Mathias Kresin <dev@kresin.me>
3 years agolantiq: copy target to kernel 5.10
Mathias Kresin [Sun, 27 Dec 2020 09:26:37 +0000 (10:26 +0100)]
lantiq: copy target to kernel 5.10

Duplicate kernel 5.4 config and patches for kernel 5.10.

Duplicate the devicetree source files as well, they need kernel 5.10
specific adjustments.

Signed-off-by: Mathias Kresin <dev@kresin.me>
3 years agolantiq: dts: mark PCI bridges as such
Mathias Kresin [Mon, 28 Dec 2020 13:03:54 +0000 (14:03 +0100)]
lantiq: dts: mark PCI bridges as such

Use the device_type property to mark PCI host bridges as such. With
linux 5.10 it is mandatory, otherwise the PCI IO space is flages as PCI
memory and the PCI init fails.

Signed-off-by: Mathias Kresin <dev@kresin.me>
3 years agolantiq: ltq-adsl: add kernel 5.10 compatiblity
Mathias Kresin [Sun, 3 Jan 2021 18:48:56 +0000 (19:48 +0100)]
lantiq: ltq-adsl: add kernel 5.10 compatiblity

The pgprot argument to __vmalloc is always PAGE_KERNEL now and was
removed.

Signed-off-by: Mathias Kresin <dev@kresin.me>
3 years agolantiq: ltq-vdsl: add kernel 5.10 compatiblity
Mathias Kresin [Sun, 27 Dec 2020 20:03:14 +0000 (21:03 +0100)]
lantiq: ltq-vdsl: add kernel 5.10 compatiblity

The pgprot argument to __vmalloc is always PAGE_KERNEL now and was
removed.

Signed-off-by: Mathias Kresin <dev@kresin.me>
3 years agoltq-atm/ltq-ptm: add kernel 5.10 compatiblity
Mathias Kresin [Sun, 27 Dec 2020 18:42:24 +0000 (19:42 +0100)]
ltq-atm/ltq-ptm: add kernel 5.10 compatiblity

The callback handling of the tasklet API was redesigned and the macros
using the old syntax renamed to _OLD.

The stuck queue is now passed to ndo_tx_timeout callback but not used so
far.

Signed-off-by: Mathias Kresin <dev@kresin.me>
3 years agolantiq: ltq-tapi: add kernel 5.10 compatiblity
Mathias Kresin [Sun, 27 Dec 2020 16:25:25 +0000 (17:25 +0100)]
lantiq: ltq-tapi: add kernel 5.10 compatiblity

Due to SCHED_FIFO being a broken scheduler model, all users of
sched_setscheduler() are converted to sched_set_fifo_low() upstream and
sched_setscheduler() is no longer exported.

The callback handling of the tasklet API was redesigned and the macros
using the old syntax renamed to _OLD.

Signed-off-by: Mathias Kresin <dev@kresin.me>
ltq tapi

3 years agolantiq: ltq-vdsl-mei: add kernel 5.10 compatiblity
Mathias Kresin [Sun, 27 Dec 2020 13:55:43 +0000 (14:55 +0100)]
lantiq: ltq-vdsl-mei: add kernel 5.10 compatiblity

proc_create_data() expects a struct of type proc_ops.

Signed-off-by: Mathias Kresin <dev@kresin.me>
3 years agolantiq: ltq-ifxos: add kernel 5.10 compatiblity
Mathias Kresin [Sun, 27 Dec 2020 11:26:28 +0000 (12:26 +0100)]
lantiq: ltq-ifxos: add kernel 5.10 compatiblity

ioremap has provided non-cached semantics by default since the Linux 2.6
days and was removed with kernel version 5.6.

Signed-off-by: Mathias Kresin <dev@kresin.me>
3 years agokernel: fix deferred mtdblock registration
Daniel Golle [Mon, 12 Apr 2021 20:40:35 +0000 (21:40 +0100)]
kernel: fix deferred mtdblock registration

Check if gendisk is already up instead of trying to figure out parent
mtd device (which didn't work well).

Reported-by: DENG Qingfang <dqfext@gmail.com>
Reported-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
Fixes: 2809d0000744 ("kernel: support FIT partition parser on mtdblock devices")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agosunxi: add support for Banana Pi M2 Berry
Zoltan HERPAI [Mon, 18 Jan 2021 08:00:42 +0000 (09:00 +0100)]
sunxi: add support for Banana Pi M2 Berry

CPU: Allwinner V40 quad-core Cortex A7 @ 1.2GHz
Memory: 1GB DDR3
Storage: SDcard, native SATA
Network: 10/100/1000M ethernet, Ampak AP6212 wifi + BT
USB: 4x USB 2.0

Installation:
Use the standard sunxi installation to an SD-card.

While the board is very similar to the M2 Ultra board
(the V40 is the automotive version of the R40), as both
the u-boot and kernel supports them separately, and some
pins are different, let's add a separate device spec.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agoath79: mikrotik: enable 2nd USB on RouterBOARD 922UAGS-5HPacD
Koen Vandeputte [Mon, 12 Apr 2021 11:15:18 +0000 (13:15 +0200)]
ath79: mikrotik: enable 2nd USB on RouterBOARD 922UAGS-5HPacD

RB922 boards have 2 separate USB controllers:
- 1 is connected to Slot Type A
- 1 is connected to the mini PCIe port

Enable the 2nd one too.

Before:

[    5.339304] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI)
Driver
[    5.355053] SCSI subsystem initialized
[    5.364184] ehci-fsl: Freescale EHCI Host controller driver
[    5.372377] ehci-platform: EHCI generic platform driver
[    5.378053] ehci-platform 1b000000.usb: EHCI Host Controller
[    5.383861] ehci-platform 1b000000.usb: new USB bus registered,
assigned bus number 1
[    5.391932] ehci-platform 1b000000.usb: irq 14, io mem 0x1b000000
[    5.410730] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    5.417739] hub 1-0:1.0: USB hub found
[    5.422280] hub 1-0:1.0: 1 port detected
[    5.434007] usbcore: registered new interface driver usb-storage

After:

[    5.342988] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI)
Driver
[    5.358687] SCSI subsystem initialized
[    5.367813] ehci-fsl: Freescale EHCI Host controller driver
[    5.375998] ehci-platform: EHCI generic platform driver
[    5.381695] ehci-platform 1b000000.usb: EHCI Host Controller
[    5.387507] ehci-platform 1b000000.usb: new USB bus registered,
assigned bus number 1
[    5.395571] ehci-platform 1b000000.usb: irq 14, io mem 0x1b000000
[    5.416050] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    5.423089] hub 1-0:1.0: USB hub found
[    5.427578] hub 1-0:1.0: 1 port detected
[    5.432432] ehci-platform 1b400000.usb: EHCI Host Controller
[    5.438254] ehci-platform 1b400000.usb: new USB bus registered,
assigned bus number 2
[    5.446325] ehci-platform 1b400000.usb: irq 15, io mem 0x1b400000
[    5.468049] ehci-platform 1b400000.usb: USB 2.0 started, EHCI 1.00
[    5.475082] hub 2-0:1.0: USB hub found
[    5.479574] hub 2-0:1.0: 1 port detected
[    5.491305] usbcore: registered new interface driver usb-storage

Fixes: 8f93c05a59 ("ath79: add support for MikroTik RouterBOARD
922UAGS-5HPacD")
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
3 years agouboot-mediatek: minor fixes for bpi-r64 spi-nand default env
Daniel Golle [Sun, 11 Apr 2021 21:42:46 +0000 (22:42 +0100)]
uboot-mediatek: minor fixes for bpi-r64 spi-nand default env

 * check image checksums before writing to flash
 * only bootmenu_0...9 are working, remove bootmenu_a entry

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agosunxi: add support for H6 boards and OrangePiOnePlus
Zoltan HERPAI [Fri, 24 Apr 2020 07:58:53 +0000 (09:58 +0200)]
sunxi: add support for H6 boards and OrangePiOnePlus

Specifications:

SoC Allwinner H6 @ 1.8 Ghz
DRAM 1Gb LPDDR3
Power DC 5V @ 3A
Video HDMI (Type 2.0A - full)
Audio HDMI, on-board microphone
Network 10/100/1000Mbps Ethernet (Realtek RTL8211)
Storage microSD
USB 1 USB2.0 Host, 1 USB2.0 OTG
Debug Serial UART

Flashing instructions:
 Standard sunxi SD card installation procedure - copy image to SD card,
 insert into SD card slot on the device and boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agoarm-trusted-firmware-sunxi: move to use the common tf-a build code and bump to latest...
Zoltan HERPAI [Mon, 22 Feb 2021 21:32:04 +0000 (22:32 +0100)]
arm-trusted-firmware-sunxi: move to use the common tf-a build code and bump to latest version

Create a -a64 package for now. Moving to the latest ATF was tested on a
SoPine A64 board.

U-Boot SPL 2020.04 (Feb 19 2021 - 11:28:19 +0000)
DRAM: 2048 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.4(release):reboot-15854-g42b39a13d2
NOTICE:  BL31: Built : 22:45:53, Feb 22 2021
NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE:  BL31: Found U-Boot DTB at 0x4090a28, model: SoPine with baseboard
NOTICE:  PSCI: System suspend is unavailable

U-Boot 2020.04 (Feb 19 2021 - 11:28:19 +0000) Allwinner Technology

CPU:   Allwinner A64 (SUN50I)
Model: SoPine with baseboard
DRAM:  2 GiB

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agouboot-sunxi: add ATF variable for specifying which flavour to use
Zoltan HERPAI [Wed, 29 Apr 2020 09:02:27 +0000 (11:02 +0200)]
uboot-sunxi: add ATF variable for specifying which flavour to use

In preparation for H6 support (which requires a separate ATF blob), add
an envvar to the A64 boards specifying which ATF blob to use.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agotoolchain: gcc: Update to version 10.3.0
Hauke Mehrtens [Sat, 10 Apr 2021 18:37:55 +0000 (20:37 +0200)]
toolchain: gcc: Update to version 10.3.0

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agovalgrind: Fix compile problem with MIPS soft float
Hauke Mehrtens [Sun, 4 Apr 2021 20:37:09 +0000 (22:37 +0200)]
valgrind: Fix compile problem with MIPS soft float

valgrind does not compile any more when using a GCC 10 for MIPS with
soft float. Just remove the parts which are generating assembler which
would not work.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agouboot-envtools: support environment in spi-nand on bpi-r64
Daniel Golle [Sun, 11 Apr 2021 15:55:05 +0000 (16:55 +0100)]
uboot-envtools: support environment in spi-nand on bpi-r64

Default to U-Boot env in UBI if root device is not mmc block device.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
3 years agomediatek: mt7622: add spi-nand support for bananapi bpi-r64
Oskari Lemmela [Sat, 10 Apr 2021 17:16:08 +0000 (20:16 +0300)]
mediatek: mt7622: add spi-nand support for bananapi bpi-r64

Some of bpi-r64 boards have serial NAND attached to SPI bus.
Add SD card image support for installing openwrt to it.
Default to nand upgrade if root device is not mmc block device.

Separate preloader and uboot images for snand are generated.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
3 years agouboot-mediatek: add spi-nand build for bananapi bpi-r64
Daniel Golle [Sun, 11 Apr 2021 15:59:09 +0000 (16:59 +0100)]
uboot-mediatek: add spi-nand build for bananapi bpi-r64

Some of bpi-r64 boards have serial NAND attached to SPI bus.
Build U-Boot for booting from SPI-NAND.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
3 years agomt76: add missing file
Felix Fietkau [Sun, 11 Apr 2021 17:56:32 +0000 (19:56 +0200)]
mt76: add missing file

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomt76: update to the latest version
Felix Fietkau [Sun, 11 Apr 2021 17:37:10 +0000 (19:37 +0200)]
mt76: update to the latest version

028b7152b1a9 mt76: mt7921: remove 80+80 MHz support capabilities
7714dc914df6 mt76: report Rx timestamp
ffd4cf15fa0e mt76: mt7915: add mmio.c
fe8717dd573a mt76: mt7615: add missing SPDX tag in mmio.c
6b293c411d22 mt76: mt7615: always add rx header translation tlv when adding stations

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: add client mode connection monitor fix
Felix Fietkau [Sun, 11 Apr 2021 17:42:14 +0000 (19:42 +0200)]
mac80211: add client mode connection monitor fix

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: support rx timestamps for HE rates
Felix Fietkau [Sun, 11 Apr 2021 17:41:56 +0000 (19:41 +0200)]
mac80211: support rx timestamps for HE rates

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomxs: add support for 5.10 as testing kernel
Zoltan HERPAI [Thu, 18 Feb 2021 22:27:01 +0000 (23:27 +0100)]
mxs: add support for 5.10 as testing kernel

The 100-ARM-dts-imx23-introduce-mmc0_sck_cfg.patch does
not need to be copied over as it's already merged upstream.

Other notable change is the USB_CHIPIDEA_OF change to
USB_CHIPIDEA_IMX [1].

[1] https://www.spinics.net/lists/linux-usb/msg193347.html

Compile/runtime-tested on Olinuxino Micro (imx23).

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agomediatek: fix writing bananapi bpi-r64 env
Oskari Lemmela [Sat, 10 Apr 2021 17:16:06 +0000 (20:16 +0300)]
mediatek: fix writing bananapi bpi-r64 env

Use generic functions to get env partition.

Fixes: 7043e4334f0 ("mediatek: mt7622: improve sysupgrade on MMC")
Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
3 years agomediatek: bpi-r64: use separate partition for emmc bootloader
Oskari Lemmela [Sat, 10 Apr 2021 17:16:05 +0000 (20:16 +0300)]
mediatek: bpi-r64: use separate partition for emmc bootloader

eMMC booloader is stored to separate partition.
FIP size is increased to 2MB.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
3 years agokernel: Adapt renamed can-dev.ko
Hauke Mehrtens [Sat, 10 Apr 2021 21:06:11 +0000 (23:06 +0200)]
kernel: Adapt renamed can-dev.ko

The can-dev.ko kernel module was moved in kernel 5.4.110 and 5.10.28.

Fixes: a1311df95587 ("kernel: bump 5.10 to 5.10.28")
Fixes: b0a34e886da1 ("kernel: bump 5.4 to 5.4.110")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agokernel: bump 5.10 to 5.10.28
Rui Salvaterra [Thu, 8 Apr 2021 20:27:12 +0000 (21:27 +0100)]
kernel: bump 5.10 to 5.10.28

Automatically refreshed:
601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch
640-02-net-resolve-forwarding-path-from-virtual-netdevice-a.patch
680-NET-skip-GRO-for-foreign-MAC-addresses.patch

Run tested:
ramips/mt7621 (Redmi AC2100)

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agosunxi: disable LPAE on cortexa8
Zoltan HERPAI [Sat, 10 Apr 2021 20:01:24 +0000 (22:01 +0200)]
sunxi: disable LPAE on cortexa8

LPAE should be disabled as the Cortex-A8 cores don't support it,
and the kernel will crash on boot if it's enabled.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agoath79: increase max SPI clock for DIR-859 A1
Jan Forman [Sun, 21 Mar 2021 14:29:43 +0000 (15:29 +0100)]
ath79: increase max SPI clock for DIR-859 A1

Increase the spi-max frequency to 50 MHz, similar to the DIR-842.

Signed-off-by: Jan Forman <forman.jan96@gmail.com>
[improve commit title, fix commit message alignment]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: improve pinctrl for Youku YK-L1
Shiji Yang [Sun, 4 Apr 2021 03:55:41 +0000 (11:55 +0800)]
ramips: improve pinctrl for Youku YK-L1

1. rename led pin "air" to a more common name "wlan" and use "phy0tpt" to trigger it.
2. led "wan" can be triggered by ethernet pinctrl by default so just drop it.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
3 years agokernel: bump 5.4 to 5.4.110
John Audia [Wed, 7 Apr 2021 14:13:50 +0000 (10:13 -0400)]
kernel: bump 5.4 to 5.4.110

Ran update_kernel.sh in a fresh clone without any existing toolchains.

Manually rebased due to movement of rx-offload.c in 5.4.110:
  layerscape/patches-5.4/802-can-0002-can-rx-offload-fix-long-lines.patch
  layerscape/patches-5.4/802-can-0003-can-rx-offload-can_rx_offload_compare-fix-typo.patch
  layerscape/patches-5.4/802-can-0004-can-rx-offload-can_rx_offload_irq_offload_timestamp-.patch
  layerscape/patches-5.4/802-can-0005-can-rx-offload-can_rx_offload_reset-remove-no-op-fun.patch
  layerscape/patches-5.4/802-can-0006-can-rx-offload-Prepare-for-CAN-FD-support.patch
  layerscape/patches-5.4/802-can-0018-can-flexcan-use-struct-canfd_frame-for-CAN-classic-f.patch

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 agomediatek: remove duplicate dts-v1 statement for UniFi 6 LR
Adrian Schmutzler [Sat, 10 Apr 2021 16:38:33 +0000 (18:38 +0200)]
mediatek: remove duplicate dts-v1 statement for UniFi 6 LR

/dts-v1/; must only be specified once.

Fixes: e887049fbb74 ("mediatek: add alternative bootchain variant
for UniFi 6 LR")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: consolidate testing kernel
Adrian Schmutzler [Sat, 10 Apr 2021 16:23:46 +0000 (18:23 +0200)]
ath79: consolidate testing kernel

All subtargets have the same testing kernel set, so move it to the
target definition.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoumdns: add missing syscalls to seccomp filter
Daniel Golle [Sat, 10 Apr 2021 16:30:49 +0000 (17:30 +0100)]
umdns: add missing syscalls to seccomp filter

Looks like 'openat', 'pipe2' and 'ppoll' are now needed, possibly due
to changes on libraries used by umdns now using slightly different
calls.

Found using
/etc/init.d/umdns trace
now use umdns, ie. cover all ubus call etc., then
/etc/init.d/umdns stop
find list of syscalls traced in /tmp/umdns.*.json

Fixes: FS#3355 ("UMDNS: does not start on master with seccomp")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agokernel: fix mtd squashfs root regression on targets with CONFIG_FIT_PARTITION
Felix Fietkau [Sat, 10 Apr 2021 15:00:57 +0000 (17:00 +0200)]
kernel: fix mtd squashfs root regression on targets with CONFIG_FIT_PARTITION

Move 480-mtd-set-rootfs-to-be-root-dev.patch to hack-5.10 and fix assumption
about the block device index.

Fixes: 2809d0000744 ("kernel: support FIT partition parser on mtdblock devices")
Acked-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agokernel: update flow offload patches to upstream version
Felix Fietkau [Sat, 10 Apr 2021 11:20:04 +0000 (13:20 +0200)]
kernel: update flow offload patches to upstream version

Move patches to backport-5.10, since the series was accepted upstream

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agouboot-envtools: oxnas: drop redundant space after case keywords
Piotr Dymacz [Fri, 2 Apr 2021 17:17:12 +0000 (19:17 +0200)]
uboot-envtools: oxnas: drop redundant space after case keywords

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-envtools: layerscape: drop redundant space after case keywords
Piotr Dymacz [Fri, 2 Apr 2021 17:16:14 +0000 (19:16 +0200)]
uboot-envtools: layerscape: drop redundant space after case keywords

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-envtools: ipq806x: drop redundant space after case keywords
Piotr Dymacz [Thu, 7 Jan 2021 16:55:15 +0000 (17:55 +0100)]
uboot-envtools: ipq806x: drop redundant space after case keywords

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-envtools: ipq40xx: drop redundant space after case keywords
Piotr Dymacz [Thu, 7 Jan 2021 16:54:18 +0000 (17:54 +0100)]
uboot-envtools: ipq40xx: drop redundant space after case keywords

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-envtools: imx6: drop redundant space after case keywords
Piotr Dymacz [Thu, 7 Jan 2021 16:51:02 +0000 (17:51 +0100)]
uboot-envtools: imx6: drop redundant space after case keywords

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-envtools: drop shebang from uci-defaults and lib files
Piotr Dymacz [Fri, 2 Apr 2021 17:43:38 +0000 (19:43 +0200)]
uboot-envtools: drop shebang from uci-defaults and lib files

These files are sourced and non-executable, a shebang is redundant.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-imx6: define 'BUILD_DEVICES' for Toradex Apalis
Piotr Dymacz [Thu, 7 Jan 2021 16:30:49 +0000 (17:30 +0100)]
uboot-imx6: define 'BUILD_DEVICES' for Toradex Apalis

Without 'BUILD_DEVICES' defined, the U-Boot related package won't be
automatically selected when building for Toradex Apalis device.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-imx6: align indent size in Makefile
Piotr Dymacz [Thu, 7 Jan 2021 16:28:36 +0000 (17:28 +0100)]
uboot-imx6: align indent size in Makefile

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-imx6: drop support for Nitrogen6x/SABRE devices
Piotr Dymacz [Sat, 27 Feb 2021 11:58:55 +0000 (12:58 +0100)]
uboot-imx6: drop support for Nitrogen6x/SABRE devices

These devices never got officially supported in the tree thus it doesn't
make much sense to waste our infrastructure resources and keep building
dedicated U-Boot images for them.

CC: Petr Štetiar <ynezz@true.cz>
CC: Luka Perkov <luka.perkov@sartura.hr>
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Acked-by: Petr Štetiar <ynezz@true.cz>
3 years agomediatek: add alternative bootchain variant for UniFi 6 LR
Daniel Golle [Fri, 2 Apr 2021 23:43:50 +0000 (00:43 +0100)]
mediatek: add alternative bootchain variant for UniFi 6 LR

Builds images for the Ubiquiti Network UniFi 6 LR device running the
U-Boot build added by the previous commits.
Everything but MTD partitions is moved to dtsi.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agouboot-envtools: add env settings for ubnt,unifi-6-lr-ubootmod
Daniel Golle [Sun, 4 Apr 2021 16:16:42 +0000 (17:16 +0100)]
uboot-envtools: add env settings for ubnt,unifi-6-lr-ubootmod

Add settings for fw_printenv/fw_setenv for the Ubiquiti UniFi 6 LR
when running OpenWrt's version of U-Boot. The settings should work
equally with the unmodified version, but that has not yet been
tested.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agouboot-mediatek: add build for Ubiquiti Networks UniFi 6 LR
Daniel Golle [Fri, 2 Apr 2021 11:05:15 +0000 (12:05 +0100)]
uboot-mediatek: add build for Ubiquiti Networks UniFi 6 LR

Add U-Boot build for the Ubiquiti Networks UniFi 6 LR access point.
This allows updating the bootchain to modern ARM Trusted Firmware 2.4
and U-Boot 2021.04 while keeping as much of the existing flash layout
as possible (u-boot-env, factory and eeprom partitions are retained),
gaining robust recovery vs. production dual-boot mechanism.
Add info for the Winbond W25Q512JV SPI NOR flash used in the device
and wait for GPIOs to settle after reset before checking for reset
button.
I2C connected LED controller is not supported yet.
Writing large amounts of data to SPI flash currently doesn't work due
to watchdog timeout causing reset before data write completes.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoarm-trusted-firmware-mediatek: increase NOR bl3 size
Daniel Golle [Fri, 2 Apr 2021 11:03:01 +0000 (12:03 +0100)]
arm-trusted-firmware-mediatek: increase NOR bl3 size

Use bl3 size of 0xa0000 instead of 0x80000 in NOR flash.
This results in bl3 ending at 0xc0000 which is where the legacy
bootchain typically puts U-Boot environment.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agokernel: support FIT partition parser on mtdblock devices
Daniel Golle [Fri, 2 Apr 2021 23:41:30 +0000 (00:41 +0100)]
kernel: support FIT partition parser on mtdblock devices

Allow using the FIT block-device partition partition parser to work on
top of mtdblock devices.
This is more tricky than it sounds as it requires to reorganize the
procedure of registering mtdblock devices in order to avoid locking
troubles caused by the block partition parsers then trying to open
the mtdblock device for reading while locks are still being held.
Fix that by moving the adding of the disks after the entire device
has been probed when locks no longer need to be held.
Also address issue with mtdsuper surfaced when using sub-partitions
which prevented mounting JFFS2 using the /dev/mtdblock* device.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agokernel: mtdsplit_fit: support FIT with external data
Daniel Golle [Fri, 2 Apr 2021 23:40:25 +0000 (00:40 +0100)]
kernel: mtdsplit_fit: support FIT with external data

U-Boot has recently added support for having data blobs in uImage.FIT
images stored at offsets after the FDT structure rather than embedding
the data into the FDT structure itself. This is useful as it allows
parts of the image to be mapped by the FIT partition parser, and it
allows the FIT structure itself to be parsed more easily as it usually
fits into single page.
mtdsplit_fit assumed that the total length of an image is identical
to the length of the FDT structure. For uImage.FIT with external data
this assumption no longer holds true.
Add support for uImage.FIT with external data to mtdsplit_fit and in
in that case only split-off rootfs_data -- selecting and mapping rootfs
partition is left to the block partition parser just like on UBI and
block/GPT based platforms.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agouboot-mediatek: bpi-r64: erase eMMC environment on installation
Daniel Golle [Fri, 9 Apr 2021 14:58:57 +0000 (15:58 +0100)]
uboot-mediatek: bpi-r64: erase eMMC environment on installation

Erase U-Boot environment partition on eMMC on installation to make sure
chages are applied.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoath79: mikrotik: define the testing kernel version
Koen Vandeputte [Fri, 9 Apr 2021 14:08:00 +0000 (16:08 +0200)]
ath79: mikrotik: define the testing kernel version

commit d6b785d477 ("ath79: add kernel 5.10 support") moved
KERNEL_TESTING_PATCHVER to a subtarget level,
but is looks like Mikrotik subtarget was forgotten.

Also add it for Mikrotik.

Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
3 years agofirmware-utils: add -Wall to most tools
Rafał Miłecki [Thu, 8 Apr 2021 22:12:28 +0000 (00:12 +0200)]
firmware-utils: add -Wall to most tools

This helps spotting possible problems

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>