openwrt/openwrt.git
4 years agox86: image: cleanup before creating image
Tomasz Maciej Nowak [Tue, 14 Jan 2020 17:45:43 +0000 (18:45 +0100)]
x86: image: cleanup before creating image

There can be some leftovers from other image recipes, if the same
directory names are used and multiply image types are selected.
Therefore remove directories used in the recipe, before contents for the
image are prepared.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agokernel: iio: add fxos8700 driver support
Tim Harvey [Fri, 28 Feb 2020 18:49:54 +0000 (10:49 -0800)]
kernel: iio: add fxos8700 driver support

Adds various kernel modules for Freescale FXOS8700 3-axis accelerometer.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[added missing commit description]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agokernel: iio: add st-accel driver modules
Tim Harvey [Fri, 28 Feb 2020 16:56:24 +0000 (08:56 -0800)]
kernel: iio: add st-accel driver modules

Adds kernel modules for various STMicroelectronics accelerometers.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[added missing commit description]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoimx6: 5.4: dts: backport lsm9ds1 imu support for GW553x
Tim Harvey [Fri, 28 Feb 2020 19:33:56 +0000 (11:33 -0800)]
imx6: 5.4: dts: backport lsm9ds1 imu support for GW553x

Add one node for the accel/gyro i2c device and another for the separate
magnetometer device in the lsm9ds1.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[commit subject/description tweaks, kernel version in patch filename]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agokernel: 5.4: backport fxos8700 accel support from 5.5
Tim Harvey [Fri, 28 Feb 2020 18:49:53 +0000 (10:49 -0800)]
kernel: 5.4: backport fxos8700 accel support from 5.5

Backport kernel module from 5.5 for FXOS8700CQ, which is a small,
low-power, 3-axis linear accelerometer and 3-axis magnetometer combined
into a single package. The device features a selectable I2C or
point-to-point SPI serial interface with 14-bit accelerometer and 16-bit
magnetometer ADC resolution along with smart-embedded functions.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[added commit description]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agokernel: can: add MCP251x CAN controller module support
Tim Harvey [Fri, 28 Feb 2020 16:56:44 +0000 (08:56 -0800)]
kernel: can: add MCP251x CAN controller module support

Adds kernel module for Microchip MCP251x SPI CAN controller.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[added missing commit description]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agomkrasimage: fix segmentation fault
Michael T Farnworth [Sat, 22 Feb 2020 14:20:49 +0000 (14:20 +0000)]
mkrasimage: fix segmentation fault

Code was attempting to determine the size of the file
before it was actually known and allocating insufficient
memory space.  Images above a certain size caused a
segmentation fault.  Moving the calloc() ensured ensured
that large images didn't result in a buffer overflow on
memcpy().

Signed-off-by: Michael T Farnworth <michael@turf.org>
[fixed name in From to match one in SoB]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agotools/pkgconf: Run pkg-config wrapper through shellcheck
Rosen Penev [Thu, 28 Nov 2019 19:19:32 +0000 (11:19 -0800)]
tools/pkgconf: Run pkg-config wrapper through shellcheck

Mainly quoting fixes.

Separated parameters by \ for easier readability.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agotools/pkg-config: Replace with pkgconf
Rosen Penev [Thu, 28 Nov 2019 19:19:31 +0000 (11:19 -0800)]
tools/pkg-config: Replace with pkgconf

pkgconf is a newer, actively maintained implementation of pkg-config that
supports more aspects of the pkg-config file specification and provides a
library interface that applications can use to incorporate intelligent
handling of pkg-config files into themselves (such as build file
generators, IDEs, and compilers). Through its pkg-config compatibility
interface (activated when it is run as "pkg-config"), it also can
completely replace the original implementation.

It is also lighterweight and does not require glib2, as pkg-config does.

On other distros, pkgconf is symlinked to pkg-config. For simplicity here,
it is renamed to pkg-config.real, as in the original package.

Initial results have been positive. As before, pkgconf works as long as
the pkg-config files point to the proper paths.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[backported upstream fix for Meson]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agouboot-mvebu: point to UBOOT_CONFIG when setting options
Tomasz Maciej Nowak [Mon, 10 Feb 2020 15:33:27 +0000 (16:33 +0100)]
uboot-mvebu: point to UBOOT_CONFIG when setting options

The BUILD_VARIANT might differ from UBOOT_CONFIG, so point to a file we
are actually changing. Being here let's call 'Build/Configure/U-Boot'
definition, instead of definig the same command. This'll be more future
proof, if U-Boot configuration procedure will change.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agomvebu: uDPU: drop patch compiling dtb
Tomasz Maciej Nowak [Mon, 10 Feb 2020 15:33:26 +0000 (16:33 +0100)]
mvebu: uDPU: drop patch compiling dtb

If device recipe has specified DEVICE_DTS variable, the dtb is built
anyway by OpenWrt buildroot image rules. Drop the patch and adjust the
location of compiled dtb.

Cc: Scott Roberts <ttocsr@gmail.com>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agomvebu: image: rework uDPU-firmware recipe
Tomasz Maciej Nowak [Mon, 10 Feb 2020 15:33:25 +0000 (16:33 +0100)]
mvebu: image: rework uDPU-firmware recipe

Tar has ability to change current dir, so use that instead additional
command invocation. Also being here, change tar arguments to make final
archive reproducible.

Cc: Scott Roberts <ttocsr@gmail.com>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agomvebu: uDPU: clean package selection
Tomasz Maciej Nowak [Mon, 10 Feb 2020 15:33:24 +0000 (16:33 +0100)]
mvebu: uDPU: clean package selection

This device receipe selects bunch of packages which some are re-defined,
unnecessary or irrelevant. Clean them up, so only basic functionality
persist.

Cc: Scott Roberts <ttocsr@gmail.com>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agomvebu: image: keep global DTS_DIR intact
Tomasz Maciej Nowak [Mon, 10 Feb 2020 15:33:23 +0000 (16:33 +0100)]
mvebu: image: keep global DTS_DIR intact

Don't rewrite global DTS_DIR, instead, use proper variable for
specifying devices dts directory. For consistency, also specify the
variable in default profile, as suggested by Adrian Schmutzler.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agotools: Fix "lib" symlink created inside $(STAGING_DIR_HOST)/lib
Jeffery To [Tue, 18 Feb 2020 21:37:22 +0000 (05:37 +0800)]
tools: Fix "lib" symlink created inside $(STAGING_DIR_HOST)/lib

Currently, if "make tools/install" is called after tools have already
been installed, a symbolic link named "lib" will be created inside
$(STAGING_DIR_HOST)/lib, pointing to "lib" (i.e. itself).

During tools/prepare, a "lib64" symlink is created inside
$(STAGING_DIR_HOST) that points to "lib" (also inside
$(STAGING_DIR_HOST)).

If tools/prepare is called and the "lib64" symlink already exists, then
ln will treat it as a directory and instead create a symlink named "lib"
inside of that directory.

This adds the -n option for ln so that $(STAGING_DIR_HOST)/lib64 is
always treated as a normal file (the link name), not as a directory.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
4 years agobuild: Fix directory symlinks not removed when cleaning STAGING_DIR
Jeffery To [Tue, 18 Feb 2020 21:15:04 +0000 (05:15 +0800)]
build: Fix directory symlinks not removed when cleaning STAGING_DIR

Currently, a symbolic link whose target is a directory will not be
removed when cleaning packages from STAGING_DIR.

In the first cleaning pass in scripts/clean-package.sh, the -f test for
a directory symlink returns false (because the link target is a
directory) and so the symlink is not removed.

In the second pass, the -d test returns true for a directory symlink,
but the symlink is not removed by rmdir because rmdir only removes
(real) directories.

This updates clean-package.sh to remove all non-directories (including
symbolic links) in the first pass.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
4 years agobuild: Remove STAGING_DIR_HOST references for InstallDev/UninstallDev
Jeffery To [Sat, 8 Jun 2019 22:00:47 +0000 (06:00 +0800)]
build: Remove STAGING_DIR_HOST references for InstallDev/UninstallDev

Build/InstallDev no longer places a file list in
$(STAGING_DIR_HOST)/packages; this change removes the creation of
$(STAGING_DIR_HOST)/packages and the attempted removal of a
STAGING_DIR_HOST file list during package clean.

This also changes the host directory passed to Build/UninstallDev from
$(STAGING_DIR_HOST) to $(STAGING_DIR)/host, to match the directory
passed to Build/InstallDev.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
4 years agobase-files: Add /etc/shinit for non-login shell init
Jeffery To [Thu, 2 May 2019 18:24:27 +0000 (02:24 +0800)]
base-files: Add /etc/shinit for non-login shell init

Because /etc/profile (and ~/.profile) are read by login shells only,
aliases and functions defined there are not available to non-login
shells, e.g. when using screen or tmux.

If the ENV environment variable exists (exported by /etc/profile or
~/.profile) and references an existing file, then all interactive shells
(login or non-login) will read that file as well.

This sets the ENV environment variable in /etc/profile, pointing to
/etc/shinit.

This also adds /etc/shinit, which:

* Contains alias and function definitions originally in /etc/profile

* Sources /etc/mkshrc if the user is using mksh (also originally in
  /etc/profile), as /etc/mkshrc is meant for all interactive shells

* Sources ~/.mkshrc if the user is using mksh, to compensate for the
  fact that mksh will not read ~/.mkshrc if ENV is set

* Sources ~/.shinit if the user is not using mksh

This also removes the shebang from /etc/profile, as the file is sourced,
not executed.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
4 years agoppp: activate PIE ASLR by default
Petr Štetiar [Thu, 20 Feb 2020 09:46:49 +0000 (10:46 +0100)]
ppp: activate PIE ASLR by default

This activates PIE ASLR support by default when the regular option is
selected.

Size increase on imx6:

 112681 ppp_2.4.8-2_arm_cortex-a9_neon.ipk
 121879 ppp_2.4.8-2_arm_cortex-a9_neon.ipk
 = 9198 diff

Acked-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agolibpcap: activate PIE ASLR by default
Stijn Tintel [Sat, 22 Feb 2020 09:40:26 +0000 (11:40 +0200)]
libpcap: activate PIE ASLR by default

This activates PIE ASLR support by default when the regular option is
selected. This is required to enable PIE ASLR support by default in ppp,
as it fails to build without it, on x86/64.

The .so file size stays identical.

Suggested-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
4 years agoar71xx: correct AVM FRITZ Repeater 450E WPS button flag
David Bauer [Sun, 1 Mar 2020 17:36:17 +0000 (18:36 +0100)]
ar71xx: correct AVM FRITZ Repeater 450E WPS button flag

The AVM FRITZ!WLAN Repeater 450E's WPS button is not active low.

Correct the active low flag to avoid unintenional activation of
failsafe mode on boot.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agolinux-5.4: backport ARM symbol export fix
Álvaro Fernández Rojas [Sun, 1 Mar 2020 14:51:31 +0000 (15:51 +0100)]
linux-5.4: backport ARM symbol export fix

Fixes the following warning for ARM targets:
  WARNING: "return_address" [vmlinux] is a static EXPORT_SYMBOL_GPL

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agolinux-5.4: backport modpost upstream patches
Álvaro Fernández Rojas [Sun, 1 Mar 2020 14:50:37 +0000 (15:50 +0100)]
linux-5.4: backport modpost upstream patches

Fixes modpost Segmentation Fault with bcm2708 and bcm2709:
  MODPOST vmlinux.o
  Segmentation fault
  make[6]: *** [scripts/Makefile.modpost:66: __modpost] Error 139

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm27xx: bcm2708: refresh linux 5.4 config
Álvaro Fernández Rojas [Sun, 1 Mar 2020 12:43:29 +0000 (13:43 +0100)]
bcm27xx: bcm2708: refresh linux 5.4 config

I missed this when adding linux 5.4 support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agompc85xx: disable kernel uImage generation
David Bauer [Sat, 29 Feb 2020 13:32:15 +0000 (14:32 +0100)]
mpc85xx: disable kernel uImage generation

The previous workaround for the unsupported mkimage xz compression
leads to the TP-Link TL-WDR4900s simpleImage bootwrapper being gzip
compressed, which does not fit the kernel partition.

Removing the uImage gerneration works around this problem.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agotreewide: move commonly disabled symbols to generic config
David Bauer [Sat, 29 Feb 2020 10:43:10 +0000 (11:43 +0100)]
treewide: move commonly disabled symbols to generic config

Move new commonly disabled kernel 5.4 symbols to the generic kernel
configuration.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agompc85xx: add missing kernel symbols
David Bauer [Sat, 29 Feb 2020 10:41:48 +0000 (11:41 +0100)]
mpc85xx: add missing kernel symbols

These symbols were previously not set. Define their state to avoid
potentially breaking builds.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agobuild: add xargs as prerequisite
Kevin Darbyshire-Bryant [Sat, 29 Feb 2020 15:28:44 +0000 (15:28 +0000)]
build: add xargs as prerequisite

Build system needs an 'xargs' that supports '-r' which darwin doesn't.
Homebrew installs a 'gxargs' with the findutils package so look for
'gxargs' as well as 'xargs'

This is a bit of a 'fun' corner case anyway. xargs is only required by
the build if 'CONFIG_AUTOREMOVE' is set and after the build system has
built 'tools/findutils' we have a fully working xargs for host anyway.
Until that time we have to rely on the host's xargs implementation.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoapm821xx: remove gpio-interrupt cruft
Christian Lamparter [Fri, 28 Feb 2020 22:44:31 +0000 (23:44 +0100)]
apm821xx: remove gpio-interrupt cruft

This hunk became obsolete the moment when our
gpio-button-hotplug learned how to deal with
interrupt-supported gpio buttons. The gpio driver
never supported interrupt handling, so these
properties never served any use (outside of a
enhanced ppc4xx-gpio driver that was dropped).

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agomvebu: fix build regression due to neon-asm ghash module
Christian Lamparter [Sat, 29 Feb 2020 12:57:09 +0000 (13:57 +0100)]
mvebu: fix build regression due to neon-asm ghash module

This patch fixes the regression caused by adding the NEON
variant of the ghash as the default ghash package package:

> ERROR: module '[...]/arch/arm/crypto/ghash-arm-ce.ko' is missing.
> modules/crypto.mk:286: recipe for target
>  '[...]/kmod-crypto-ghash_4.19.106-1_aarch64_cortex-a53.ipk' failed

This patch limits the scope to the ARM32/cortexa9 target of mvebu.

Fixes: 285df63efc70 ("kernel: build neon-asm version of ghash module")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agobcm27xx: add linux 5.4 support
Álvaro Fernández Rojas [Sat, 29 Feb 2020 08:25:20 +0000 (09:25 +0100)]
bcm27xx: add linux 5.4 support

Tested on bcm2710 (Raspberry Pi 3B).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm27xx: update kernel configs
Álvaro Fernández Rojas [Sat, 29 Feb 2020 10:51:58 +0000 (11:51 +0100)]
bcm27xx: update kernel configs

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm27xx: update to latest patches from RPi foundation
Álvaro Fernández Rojas [Fri, 28 Feb 2020 18:59:52 +0000 (19:59 +0100)]
bcm27xx: update to latest patches from RPi foundation

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm27xx-gpu-fw: update to latest version
Álvaro Fernández Rojas [Fri, 28 Feb 2020 18:36:17 +0000 (19:36 +0100)]
bcm27xx-gpu-fw: update to latest version

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agospi: ath79: remove spi-master setup and cleanup assignment
David Bauer [Fri, 28 Feb 2020 23:54:41 +0000 (00:54 +0100)]
spi: ath79: remove spi-master setup and cleanup assignment

This removes the assignment of setup and cleanup functions for the ath79
target. Assigning the setup-method will lead to 'setup_transfer' not
being assigned in spi_bitbang_init.

Also drop the redundant cleanup assignment, as this also happens in
spi_bitbang_init.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agompc85xx: move NAND symbol to target config
David Bauer [Fri, 28 Feb 2020 23:11:59 +0000 (00:11 +0100)]
mpc85xx: move NAND symbol to target config

All mpc85xx subtargets utilize NAND, thus enable NAND support
target-wide.

Fixes: 1287bb48dc72 ("mpc85xx: fix build with kernel 5.4")
Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agompc85xx: fix build with kernel 5.4
David Bauer [Mon, 24 Feb 2020 21:49:45 +0000 (22:49 +0100)]
mpc85xx: fix build with kernel 5.4

This fixes some outstanding issues with the Kernel 5.4 build:

 * Adds missing support patch for the Enterasys WS-AP3710i
 * Fixes incorrect NAND symbols
 * Adds patch for broken image wrapping

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agoapm821xx: 5.4: add important NAND symbols
Christian Lamparter [Fri, 14 Feb 2020 16:19:53 +0000 (17:19 +0100)]
apm821xx: 5.4: add important NAND symbols

This patch adds important NAND config symbols.
These are necessary as otherwise the devices
won't find the rootfs on the NAND chips.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoipq40xx: 5.4: refresh patches and config
Christian Lamparter [Fri, 28 Feb 2020 20:15:48 +0000 (21:15 +0100)]
ipq40xx: 5.4: refresh patches and config

This patch just refreshes the 5.4 patches. It seems as if
070-v4.20-soc-qcom-spm-add-SCM-probe-dependency.patch is
already applied, so drop it. It also does a quick
make kernel_oldconfig to get rid of unneeded symbols.

[Looks like USB and Ethernet need some more work].

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agokernel: 5.4: add unconfigured symbols
Christian Lamparter [Fri, 28 Feb 2020 19:46:09 +0000 (20:46 +0100)]
kernel: 5.4: add unconfigured symbols

This patch adds a few more symbols that I found that
need disabling in order to not break the automatic build.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agokernel: build arm/neon-optimized sha1/512 modules
Eneas U de Queiroz [Mon, 24 Feb 2020 17:37:58 +0000 (14:37 -0300)]
kernel: build arm/neon-optimized sha1/512 modules

This builds the regular arm and arm-neon asm optmized modules for sha1
and sha512, for targets that set CONFIG_ARM_CRYPTO.

On ip40xx, the arm-asm version of sha1 improves performance by 5% over
the generic C implementation; sha1-neon is 25% faster than generic,
and sha512-neon, 259%.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agokernel: build neon-asm version of ghash module
Eneas U de Queiroz [Mon, 24 Feb 2020 12:59:38 +0000 (09:59 -0300)]
kernel: build neon-asm version of ghash module

This alone improves AES-GCM performance by up to 50% on ipq40xx.  This
is enabled for targets that support neon and set CONFIG_ARM_CRYPTO:
imx6, ipq40xx, and mvebu.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agoipq40xx: qce - add fixes for AES ciphers
Eneas U de Queiroz [Fri, 20 Dec 2019 13:52:17 +0000 (10:52 -0300)]
ipq40xx: qce - add fixes for AES ciphers

This backports commits from master that fix AES ciphers when using the
qce driver:

 - A couple of simple fixes for CTR and XTS modes used with AES:
   * 041-crypto-qce-fix-ctr-aes-qce-block-chunk-sizes.patch
   * 042-crypto-qce-fix-xts-aes-qce-key-sizes.patch

 - A fix for a bug that affected cases when there were more entries in
   the input sg list than necessary to actually encrypt, resulting in
   failure in gcm, where the authentication tag is present after the
   encryption data:
   * 043-crypto-qce-save-a-sg-table-slot-for-result-buf.patch

 - A fix to update the IV buffer passed to the driver from the kernel:
   * 044-crypto-qce-update-the-skcipher-IV.patch

 - A patch that reduces memory footprint and driver initialization by
   only initializing the fallback mechanism where it is actually used:
   * 046-crypto-qce-initialize-fallback-only-for-AES.patch

 - Three patches that make gcm and xts modes work with the qce driver,
   and improve performance with small blocks:
   * 047-crypto-qce-use-cryptlen-when-adding-extra-sgl.patch
   * 048-crypto-qce-use-AES-fallback-for-small-requests.patch
   * 049-crypto-qce-handle-AES-XTS-cases-that-qce-fails.patch

 - A patch that allows the hashes/ciphers to be built individually.
   * 051-crypto-qce-allow-building-only-hashes-ciphers.patch

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
[renumbered patches, added patches from dropped commit, refreshed, 5.4]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoipq40xx: use neon crypto drivers
Eneas U de Queiroz [Fri, 21 Feb 2020 18:44:39 +0000 (15:44 -0300)]
ipq40xx: use neon crypto drivers

This adds the neon based implementations of AES & SHA256.

For AES, according to the kernel config help:

Use a faster and more secure NEON based implementation of AES in CBC,
CTR and XTS modes.
Bit sliced AES gives around 45% speedup on Cortex-A15 for CTR mode
and for XTS mode encryption, CBC and XTS mode decryption speedup is
around 25%. (CBC encryption speed is not affected by this driver.)
This implementation does not rely on any lookup tables so it is
believed to be invulnerable to cache timing attacks.
...
The observed speedups on ipq40xx are more modest: speedup is around 20%
for CTR mode and for XTS mode encryption, CBC and XTS mode decryption
speedup is around 10%. Measurements were made using tcrypt, with
1024-bytes blocks for CTR & CBC, and 4096-bytes for XTS.
The aes-neon-bs driver uses a fallback for CBC encryption; that fallback
could be either the generic driver written in C, or the scalar arm-asm
one.  Even though aes-arm is 1.9% slower, it is more resilient to timing
attacks (the reason for being slower), so it is being included here.

The neon sha256 module increases performance over the generic module by
33%.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
[Enable only ciphers for now, reorder patch in series to help bisect
as new symbols could lead to build failures, 5.4]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoipq40xx: qce - switch to skcipher API
Eneas U de Queiroz [Fri, 20 Dec 2019 13:37:21 +0000 (10:37 -0300)]
ipq40xx: qce - switch to skcipher API

This backports a commit updating the API of the QCE crypto engine to
what is used in current kerenl, easing future upstream backports.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
[renumber patches, refreshed, added 5.4 patches]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agokernel: 4.19,5.4: disable ARM CE & NEON
Christian Lamparter [Wed, 26 Feb 2020 21:25:34 +0000 (22:25 +0100)]
kernel: 4.19,5.4: disable ARM CE & NEON

This patch disables the CRYPTO KERNEL SYMBOLs that are touched
by the upcoming ipq40xx patch "ipq40xx: use neon crypto drivers"
from "Eneas U de Queiroz" and more so for his follow up patches
for the  other ARM targets in this series. This should help to
prevent at least a few potential build errors on other archs.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoipq40xx: add support for EnGenius EAP2200
Steven Lin [Mon, 2 Sep 2019 02:39:45 +0000 (10:39 +0800)]
ipq40xx: add support for EnGenius EAP2200

SOC:    IPQ4019 / QCA Dakota
CPU:    Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7
DRAM:   256 MiB
FLASH:  NOR 4 MiB + NAND 128 MiB
ETH:    Qualcomm Atheros QCA8072
WLAN1:  Qualcomm Atheros QCA4019 2.4GHz 802.11bgn 2:2x2
WLAN2:  Qualcomm Atheros QCA4019 5GHz 802.11a/n/ac 2:2x2
WLAN2:  Qualcomm Atheros QCA9888 5GHz 802.11a/n/ac 2:2x2
INPUT:  WPS Button
LEDS:   Power, LAN1, LAN2, WLAN 2.4GHz, WLAN 5GHz-1, WLAN 5GHz-2, OPMODE

1. Load Ramdisk via U-Boot

To set up the flash memory environment, do the following:
a. As a preliminary step, ensure that the board console port is connected to the PC using these RS232 parameters:
   * 115200bps
   * 8N1
b. Confirm that the PC is connected to the board using one of the Ethernet ports.
c. Set a static ip 192.168.99.8 for Ethernet that connects to board.
d. The PC must have a TFTP server launched and listening on the interface to which the board is connected.
e. At this stage power up the board and, after a few seconds, press 4 and then any key during the countdown.

U-BOOT> set serverip 192.168.99.9 && tftpboot 0x84000000 192.168.99.8:openwrt.itb && bootm

Signed-off-by: Steven Lin <steven.lin@senao.com>
[copied 4.19 dts to 5.4]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoipq807x: fix indent in image/Makefile
Adrian Schmutzler [Fri, 28 Feb 2020 19:00:10 +0000 (20:00 +0100)]
ipq807x: fix indent in image/Makefile

Convert space indent to tab like the rest of the file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobcm27xx-userland: update to latest version
Álvaro Fernández Rojas [Fri, 28 Feb 2020 18:30:16 +0000 (19:30 +0100)]
bcm27xx-userland: update to latest version

Remove upstream cmake fix.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agokernel: 5.4 fix build on darwin
Kevin Darbyshire-Bryant [Wed, 5 Feb 2020 19:48:27 +0000 (19:48 +0000)]
kernel: 5.4 fix build on darwin

Fix typedef clash on darwin.

HOSTCC  scripts/mod/file2alias.o
scripts/mod/file2alias.c:47:3: error: typedef redefinition with different types ('struct uuid_t' vs '__darwin_uuid_t' (aka 'unsigned char [16]'))
} uuid_t;
  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h:31:25: note: previous definition is here
typedef __darwin_uuid_t uuid_t;
                        ^
scripts/mod/file2alias.c:1305:42: error: array initializer must be an initializer list or string literal
        DEF_FIELD(symval, tee_client_device_id, uuid);
                                                ^
2 errors generated.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoipq807x: add very basic target support
John Crispin [Wed, 26 Feb 2020 12:01:32 +0000 (13:01 +0100)]
ipq807x: add very basic target support

This is still missing a lot of love but people want to start working on it
so lets give them a common baseline.

Signed-off-by: John Crispin <john@phrozen.org>
4 years agoipq40xx: add v5.4 support
John Crispin [Tue, 14 Jan 2020 16:15:57 +0000 (17:15 +0100)]
ipq40xx: add v5.4 support

Signed-off-by: John Crispin <john@phrozen.org>
4 years agomediatek: add v5.4 support
Mark-MC Lee (李明昌) [Mon, 10 Feb 2020 08:33:15 +0000 (09:33 +0100)]
mediatek: add v5.4 support

Signed-off-by: Mark-MC Lee (李明昌) <Mark-MC.Lee@mediatek.com>
4 years agobcm53xx: add v5.4 support
John Crispin [Mon, 10 Feb 2020 06:46:56 +0000 (07:46 +0100)]
bcm53xx: add v5.4 support

Signed-off-by: John Crispin <john@phrozen.org>
4 years agoimx6: add support for kernel 5.4
Koen Vandeputte [Mon, 9 Dec 2019 14:19:26 +0000 (15:19 +0100)]
imx6: add support for kernel 5.4

Refreshed all patches.
Refreshed kernel config.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agompc85xx: add support for kernel 5.4
David Bauer [Wed, 4 Dec 2019 16:35:04 +0000 (17:35 +0100)]
mpc85xx: add support for kernel 5.4

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agoath79: Make upstream ag71xx driver work
Hauke Mehrtens [Mon, 17 Feb 2020 23:36:28 +0000 (00:36 +0100)]
ath79: Make upstream ag71xx driver work

* Fix some bugs in the driver
* Add missing clock and reset references in dts
* Rename mdio-bus to mdio so the driver find it

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoath79: add support for kernel 5.4
David Bauer [Sun, 8 Dec 2019 20:44:23 +0000 (21:44 +0100)]
ath79: add support for kernel 5.4

Signed-off-by: David Bauer <mail@david-bauer.net>
[refreshed]
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* Sync the patches with the changes done for kernel 4.19
* Use KERNEL_TESTING_PATCHVER
* Refresh the configuration
* Fix multiple compile bugs in the patches
* Only add own ag71xx files for kernel 4.19 and use upstream version for
  5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoapm821xx: add linux kernel 5.4 testing support
Christian Lamparter [Sat, 30 Nov 2019 19:57:11 +0000 (20:57 +0100)]
apm821xx: add linux kernel 5.4 testing support

This patch adds support for the linux kernel version 5.4
as an optional testing kernel.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agokernel: Use new symbol to deactivate MIPS FPU support
Hauke Mehrtens [Sun, 23 Feb 2020 17:57:45 +0000 (18:57 +0100)]
kernel: Use new symbol to deactivate MIPS FPU support

With kernel 5.4 the upstream kernel supports deactivating the FPU
support on MIPS. Use this new upstream feature instead of our older
patch which was removed when porting the kernel patches to kernel 5.4.

This way both options are set which should work for older kernel
versions and also new ones.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: Remove nvmem hack patch from 5.4
Hauke Mehrtens [Sun, 23 Feb 2020 15:46:01 +0000 (16:46 +0100)]
kernel: Remove nvmem hack patch from 5.4

The nvmem framework is now used in net/ethernet/eth.c and the nvmem
sysfs is split into a separate Kconfig option. More work would be needed
to adapt this patch for the broader use. The current patch compiles fine
on ath79, but it breaks the x86 target.

nvmem is also compiled into the kernel for most of our targets for
example ath79 anyway, so patching the kernel to remove it is now harder
and not the case on multiple targets anyway. Instead of making this work
on kernel 5.4 just remove this hack patch.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: Remove chash.ko from kmod-drm-amdgpu
Hauke Mehrtens [Sun, 23 Feb 2020 15:41:58 +0000 (16:41 +0100)]
kernel: Remove chash.ko from kmod-drm-amdgpu

This module was added with kernel 4.15, but is was removed again with
kernel version 5.3. OpenWrt does not support specifying a kernel version
range so just break it with kernel 4.14 and only support recent kernel
versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: Add snd-intel-nhlt.ko to kmod-sound-hda-intel
Hauke Mehrtens [Sun, 23 Feb 2020 15:41:16 +0000 (16:41 +0100)]
kernel: Add snd-intel-nhlt.ko to kmod-sound-hda-intel

With kernel 5.4 kmod-sound-hda-intel also needs snd-intel-nhlt.ko, but
this kernel module is only build on x86, make the OpenWrt kmod depend on
TARGET_x86.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: Make kmod-ixgbe depend on kmod-libphy
Hauke Mehrtens [Sun, 23 Feb 2020 15:39:30 +0000 (16:39 +0100)]
kernel: Make kmod-ixgbe depend on kmod-libphy

With kernel 5.4 kmod-ixgbe is depending on kmod-libphy, add this
missing dependency.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: Make LIB_ARC4 selectable
Hauke Mehrtens [Sun, 23 Feb 2020 15:28:21 +0000 (16:28 +0100)]
kernel: Make LIB_ARC4 selectable

This makes it possible to select CONFIG_CRYPTO_LIB_ARC4 directly. We
need this to be able to compile this into the kernel and make use of it
from mac80211 backports.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agonat46: Fix compile with kernel 5.4
Hauke Mehrtens [Wed, 5 Feb 2020 21:57:14 +0000 (22:57 +0100)]
nat46: Fix compile with kernel 5.4

nf_reset() was renamed to nf_reset_ct() in upstream Linux commit
895b5c9f206e ("netfilter: drop bridge nf reset from nf_reset)"

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: Make kmod-rtc-pcf2123 depend on kmod-regmap-spi
Koen Vandeputte [Fri, 28 Feb 2020 14:09:27 +0000 (15:09 +0100)]
kernel: Make kmod-rtc-pcf2123 depend on kmod-regmap-spi

In kernel 5.4 kmod-rtc-pcf2123 depends on kmod-regmap-spi, add this missing
dependency.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agokernel: Make kmod-nft-core depend on kmod-nf-nat
Hauke Mehrtens [Wed, 5 Feb 2020 21:58:57 +0000 (22:58 +0100)]
kernel: Make kmod-nft-core depend on kmod-nf-nat

In kernel 5.4 kmod-nf-core depends on kmod-nf-nat, add this missing
dependency.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: Make kmod-fs-f2fs depend on kmod-nls-base
Hauke Mehrtens [Fri, 31 Jan 2020 12:48:24 +0000 (13:48 +0100)]
kernel: Make kmod-fs-f2fs depend on kmod-nls-base

Since kernel 5.4 kmod-fs-f2fs is depending on kmod-nls-base.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: Add of_touchscreen.ko to kmod-input-touchscreen-ads7846
Hauke Mehrtens [Fri, 31 Jan 2020 12:47:29 +0000 (13:47 +0100)]
kernel: Add of_touchscreen.ko to kmod-input-touchscreen-ads7846

kmod-input-touchscreen-ads7846 depends on of_touchscreen.ko since
kernel 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: Remove kmod-gigaset for kernel 5.4
Hauke Mehrtens [Fri, 31 Jan 2020 12:46:31 +0000 (13:46 +0100)]
kernel: Remove kmod-gigaset for kernel 5.4

gigaset was moved to staging in kernel 5.4, just deactivate it on
recent kernel versions instead of adapting it.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: Add roles.ko to kmod-usb-chipidea
Hauke Mehrtens [Fri, 31 Jan 2020 12:45:07 +0000 (13:45 +0100)]
kernel: Add roles.ko to kmod-usb-chipidea

kmod-usb-chipidea depends on roles.ko since kernel 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: Make kmod-gpio-pca953x depend on kmod-regmap-i2c
Hauke Mehrtens [Fri, 31 Jan 2020 12:40:10 +0000 (13:40 +0100)]
kernel: Make kmod-gpio-pca953x depend on kmod-regmap-i2c

In kernel 5.4 kmod-gpio-pca953x depends on kmod-regmap-i2c.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: module v4l2-common.ko was removed
Hauke Mehrtens [Fri, 31 Jan 2020 12:38:23 +0000 (13:38 +0100)]
kernel: module v4l2-common.ko was removed

The content of v4l2-common.ko was merged into videodev.ko and it was
removed in kernel 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: Adapt moved crodic.ko module
Hauke Mehrtens [Fri, 31 Jan 2020 12:36:15 +0000 (13:36 +0100)]
kernel: Adapt moved crodic.ko module

The module was moved in the kernel, adapt OpenWrt.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: Add crypto libraries to modules
Hauke Mehrtens [Fri, 31 Jan 2020 12:32:03 +0000 (13:32 +0100)]
kernel: Add crypto libraries to modules

In kernel 5.3 and 5.4 some crypto modules were split into two modules,
one implementing the crypto algorithm and the other integrating it
into the Linux crypto framework.

Adapt OpenWrt to support this split.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: Include xt_MASQUERADE for kernel 5.2 and later
Koen Vandeputte [Sun, 23 Feb 2020 14:30:37 +0000 (15:30 +0100)]
kernel: Include xt_MASQUERADE for kernel 5.2 and later

Instead of ip6t_MASQUERADE, include xt_MASQUERADE on kernel >= 5.2.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agokernel: mode_beet mode_transport mode_tunnel xfram modules
Koen Vandeputte [Sun, 23 Feb 2020 14:28:15 +0000 (15:28 +0100)]
kernel: mode_beet mode_transport mode_tunnel xfram modules

This adds the new xfrm4_mode_beet, xfrm4_mode_transport,
xfrm4_mode_tunnel and their IPv6 versions on kernel 5.4. These modules
were newly added in kernel 5.2.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agox86: Update configuration
Hauke Mehrtens [Sun, 23 Feb 2020 15:46:41 +0000 (16:46 +0100)]
x86: Update configuration

The configuration was refreshed and KERNEL_TESTING_PATCHVER was set to
make it easy to compile for kernel 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agox86: Refresh patches on kernel 5.4
Hauke Mehrtens [Sun, 23 Feb 2020 13:58:32 +0000 (14:58 +0100)]
x86: Refresh patches on kernel 5.4

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agox86: copy kernel patches from 4.19 to 5.4
Hauke Mehrtens [Sun, 23 Feb 2020 13:55:25 +0000 (14:55 +0100)]
x86: copy kernel patches from 4.19 to 5.4

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: add support for kernel 5.4
Koen Vandeputte [Mon, 25 Nov 2019 15:08:31 +0000 (16:08 +0100)]
kernel: add support for kernel 5.4

The following patches were removed because they are integrated in the upstream kernel 5.4:
 * backport-5.4/047-v4.21-mtd-keep-original-flags-for-every-struct-mtd_info.patch
 * backport-5.4/048-v4.21-mtd-improve-calculating-partition-boundaries-when-ch.patch
 * backport-5.4/080-v5.1-0001-bcma-keep-a-direct-pointer-to-the-struct-device.patch
 * backport-5.4/080-v5.1-0002-bcma-use-dev_-printing-functions.patch
 * backport-5.4/095-Allow-class-e-address-assignment-via-ifconfig-ioctl.patch
 * backport-5.4/101-arm-cns3xxx-use-actual-size-reads-for-PCIe.patch
 * backport-5.4/200-v5.2-usb-dwc2-Set-lpm-mode-parameters-depend-on-HW-configuration.patch
 * backport-5.4/210-arm64-sve-Disentangle-uapi-asm-ptrace.h-from-uapi-as.patch
 * backport-5.4/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch
 * backport-5.4/450-v5.0-mtd-spinand-winbond-Add-support-for-W25N01GV.patch
 * backport-5.4/451-v5.0-mtd-spinand-Add-initial-support-for-Toshiba-TC58CVG2.patch
 * backport-5.4/452-v5.0-mtd-spinand-add-support-for-GigaDevice-GD5FxGQ4xA.patch
 * backport-5.4/455-v5.1-mtd-spinand-Add-support-for-all-Toshiba-Memory-produ.patch
 * backport-5.4/456-v5.1-mtd-spinand-Add-support-for-GigaDevice-GD5F1GQ4UExxG.patch
 * backport-5.4/460-v5.0-mtd-spi-nor-Add-support-for-mx25u12835f.patch
 * backport-5.4/460-v5.3-mtd-spinand-Define-macros-for-page-read-ops-with-thr.patch
 * backport-5.4/461-v5.3-mtd-spinand-Add-support-for-two-byte-device-IDs.patch
 * backport-5.4/462-v5.3-mtd-spinand-Add-support-for-GigaDevice-GD5F1GQ4UFxxG.patch
 * backport-5.4/463-v5.3-mtd-spinand-Add-initial-support-for-Paragon-PN26G0xA.patch
 * backport-5.4/700-v5.1-net-phylink-only-call-mac_config-during-resolve-when.patch
 * backport-5.4/701-v5.2-net-phylink-ensure-inband-AN-works-correctly.patch
 * backport-5.4/702-v4.20-net-ethernet-Add-helper-for-MACs-which-support-asym-.patch
 * backport-5.4/703-v4.20-net-ethernet-Add-helper-for-set_pauseparam-for-Asym-.patch
 * backport-5.4/704-v4.20-net-phy-Stop-with-excessive-soft-reset.patch
 * backport-5.4/705-v5.1-net-phy-provide-full-set-of-accessor-functions-to-MM.patch
 * backport-5.4/706-v5.1-net-phy-add-register-modifying-helpers-returning-1-o.patch
 * backport-5.4/707-v5.1-net-phy-add-genphy_c45_check_and_restart_aneg.patch
 * backport-5.4/708-v5.3-net-phylink-remove-netdev-from-phylink-mii-ioctl-emu.patch
 * backport-5.4/709-v5.3-net-phylink-support-for-link-gpio-interrupt.patch
 * backport-5.4/710-v5.3-net-phy-allow-Clause-45-access-via-mii-ioctl.patch
 * backport-5.4/711-v5.3-net-sfp-add-mandatory-attach-detach-methods-for-sfp-.patch
 * backport-5.4/712-v5.3-net-sfp-remove-sfp-bus-use-of-netdevs.patch
 * backport-5.4/713-v5.2-net-phylink-avoid-reducing-support-mask.patch
 * backport-5.4/714-v5.3-net-sfp-Stop-SFP-polling-and-interrupt-handling-duri.patch
 * backport-5.4/715-v5.3-net-phylink-don-t-start-and-stop-SGMII-PHYs-in-SFP-m.patch
 * backport-5.4/740-v5.5-net-phy-avoid-matching-all-ones-clause-45-PHY-IDs.patch
 * backport-5.4/741-v5.5-net-phylink-fix-link-mode-modification-in-PHY-mode.patch
 * pending-5.4/103-MIPS-perf-ath79-Fix-perfcount-IRQ-assignment.patch
 * pending-5.4/131-spi-use-gpio_set_value_cansleep-for-setting-chipsele.patch
 * pending-5.4/132-spi-spi-gpio-fix-crash-when-num-chipselects-is-0.patch
 * pending-5.4/220-optimize_inlining.patch
 * pending-5.4/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch
 * pending-5.4/475-mtd-spi-nor-Add-Winbond-w25q128jv-support.patch
 * pending-5.4/477-mtd-add-spi-nor-add-mx25u3235f.patch
 * pending-5.4/479-mtd-spi-nor-add-eon-en25qh64.patch

Some bigger changes were done to this feature and we did not port this patch yet:
 * hack-5.4/207-disable-modorder.patch

This depends on BOOTMEM which was removed from the kernel, this needs some bigger changes:
 * hack-5.4/930-crashlog.patch

A different version of the FPU disable patch was merged upstream, OpenWrt needs some adaptations.
 * pending-5.4/304-mips_disable_fpu.patch

- no crashlog support yet as a required file got deleted upstream
- Removed patch below, which is now seen as a recursive dependency [1]
- Removed patch below due to build error [2]
- fix still required to avoid identical function def [3]
- Fixes included from Blocktrron
- Fixes included from Chunkeey
- Fix included from nbd regarding "dst leak in Flow Offload"

[1] target/linux/generic/hack-5.4/260-crypto_test_dependencies.patch
[2] target/linux/generic/hack-5.4/207-disable-modorder.patch
[3] target/linux/generic/pending-5.4/613-netfilter_optional_tcp_window_check.patch

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: copy kernel 4.19 code to 5.4
Hauke Mehrtens [Sun, 23 Feb 2020 12:20:11 +0000 (13:20 +0100)]
kernel: copy kernel 4.19 code to 5.4

No changes were done to the patches while coping them. Currently they do
not apply on top of kernel 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agolibubox: update to latest Git HEAD
Jo-Philipp Wich [Thu, 27 Feb 2020 21:03:18 +0000 (22:03 +0100)]
libubox: update to latest Git HEAD

7da6643 tests: blobmsg: add test case
75e300a blobmsg: fix wrong payload len passed from blobmsg_check_array

Fixes: FS#2833
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoath79: also reduce spi-max-frequency for buffalo_wzr-hp-ag300h
Adrian Schmutzler [Thu, 27 Feb 2020 13:49:08 +0000 (14:49 +0100)]
ath79: also reduce spi-max-frequency for buffalo_wzr-hp-ag300h

In accordance to ebc090e420d1 ("ath79: reduce spi-max-frequency to 50 MHz")
this also reduces the spi-max-frequency to 50 MHz for the last remaining
device with higher frequency in ath79. This will save us from having a
single special case that will require adjustment when the spi driver for
this device is changed in the future.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Chuanhong Guo <gch981213@gmail.com>
4 years agokirkwood: apply minor DTS style improvements
Adrian Schmutzler [Thu, 27 Feb 2020 12:05:51 +0000 (13:05 +0100)]
kirkwood: apply minor DTS style improvements

This applies some minor DTS style improvements to the files kept
in OpenWrt at the moment:

- harmonize/improve LED/pinmux node names
- harmonize empty lines between nodes
- change "ok" to "okay"
- some other minor formatting adjustments

Since changes are only cosmetical, they are only applied to the
"newer" DTS files for kernel 4.19.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agokirkwood: convert DTS patches into plain DTS files
Sungbo Eo [Mon, 24 Feb 2020 12:06:04 +0000 (21:06 +0900)]
kirkwood: convert DTS patches into plain DTS files

Move DTS files newly created by patch files to files directory. This will make
these files much more maintainable.

Patching the kernel Makefile is unnecessary, as the DTS files specified in
DEVICE_DTS will be compiled by OpenWrt buildroot anyway.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: reduce spi-max-frequency to 50 MHz
Adrian Schmutzler [Thu, 27 Feb 2020 10:55:36 +0000 (11:55 +0100)]
ath79: reduce spi-max-frequency to 50 MHz

The introduction of ebf0d8dadeca ("ath79: add new ar934x spi driver")
made the SPI memory unusable on devices with very high spi-max-frequency
(104 MHz).

Here's how the actual clock is calculated: (AHB_CLK/((CLOCK_DIVIDER+1)*2))
where AHB_CLK is a fixed clock (e.g. 200MHz on AR9331) and CLOCK_DIVIDER
is the parameter we can set. Highest clock according to this formula is
AHB_CLK/2 (100MHz, but that didn't work in device tests).
The next possible value is AHB_CLK/4 (50MHz). Speeds between 50 MHz and
100 MHz will be rounded down, so using values higher than 50 MHz does
not provide any benefit.

Consequently, this patch reduces spi-max-frequency for all devices with
values higher than 50 MHz to 50 MHz (effectively, this only affects
devices with 104 MHz before this patch).

Tested on GL.inet GL-AR150:
Boot fails with 104 MHz but is successful with both 50 MHz and 80 MHz
(fast-read), where the latter two yield identical read speeds.

Fixes: ebf0d8dadeca ("ath79: add new ar934x spi driver")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: fix spi-max-frequency for wAP G-5HacT2HnD
Roger Pueyo Centelles [Mon, 24 Feb 2020 20:07:59 +0000 (21:07 +0100)]
ath79: fix spi-max-frequency for wAP G-5HacT2HnD

The introduction of ebf0d8dade (ath79: add new ar934x spi driver)
made the SPI memory unusable. Reducing the spi-max-frequency to
a smaller value makes it work again.

Tested on two MikroTik RouterBOARD wAP G-5HacT2HnD devices.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
4 years agobase-files: add all buildinfo with INCLUDE_CONFIG
Xu Wang [Sat, 8 Feb 2020 23:04:11 +0000 (23:04 +0000)]
base-files: add all buildinfo with INCLUDE_CONFIG

CONFIG_INCLUDE_CONFIG option is helpful for being able to rebuild the
exact same firmware as you see on a live OpenWRT instance, but it's
crucially missing feeds information, so we can't rebuild the exact same
package versions. This commit fixes this by adding the remaining feeds
(and version) buildinfo files to the image.

Signed-off-by: Xu Wang <xwang1498@gmx.com>
4 years agoppp: backport security fixes
Petr Štetiar [Thu, 20 Feb 2020 08:03:54 +0000 (09:03 +0100)]
ppp: backport security fixes

8d45443bb5c9 pppd: Ignore received EAP messages when not doing EAP
8d7970b8f3db pppd: Fix bounds check in EAP code
858976b1fc31 radius: Prevent buffer overflow in rc_mksid()

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Fixes: CVE-2020-8597
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoRevert "ppp: backport security fixes"
Jo-Philipp Wich [Wed, 26 Feb 2020 15:36:16 +0000 (16:36 +0100)]
Revert "ppp: backport security fixes"

This reverts commit 215598fd03899c19a9cd26266221269dd5ec8cee since it
didn't contain a reference to the CVE it addresses. The next commit
will re-add the commit including a CVE reference in its commit message.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoath79: add support for MikroTik RouterBOARD 922UAGS-5HPacD
Roger Pueyo Centelles [Sun, 26 Jan 2020 16:56:05 +0000 (17:56 +0100)]
ath79: add support for MikroTik RouterBOARD 922UAGS-5HPacD

This patch ports support for the MikroTik RouterBOARD 922UAGS-5HPacD
with a built-in 802.11ac High-Power radio (31dBm), which was already
available in the ar71xx target.

See https://mikrotik.com/product/RB922UAGS-5HPacD for more info.

Specifications:
- SoC: Qualcomm Atheros QCA9558 (720 MHz)
- RAM: 128 MB
- Storage: 128 MB NAND
- Wireless: external QCA9882 802.11a/ac 2x2:2
- Ethernet: 1x 1000/100/10 Mbps, integrated, via AR8031 PHY, passive PoE-in 24V
- SFP: 1x host
- USB: 1x 2.0 type A
- PCIe: 1x Mini slot (also contains USB 2.0 for 3G/LTE modems)
- SIM slot: 1x mini-SIM

Working:
- Board/system detection
- SPI and NAND storage
- PCIe
- USB type A host
- Wireless
- Ethernet
- LEDs (user, phy0)
- Reset button
- Sysupgrade to/from ar71xx

Not supported:
- RSSI LEDs
- SFP cage

Installation methods:
- Sysupgrade from ar71xx (it is advisable to use the -n option to
wipe any previous settings), or
- Boot the initramfs image via TFTP and then flash the sysupgrade
image using "sysupgrade -n"

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
4 years agorbextract: support devices with plain RLE caldata
Roger Pueyo Centelles [Wed, 29 Jan 2020 10:27:03 +0000 (11:27 +0100)]
rbextract: support devices with plain RLE caldata

Old MikroTik devices have the RLE-encoded radio calibration data
directly stored in the art (hard_config) partition, without LZO
compression nor any preceding ERD magic bytes. This commit adds
a fallback for these devices.

Tested on the ath79 target with a MikroTik SXT 5nD r2 (SXT Lite5),
only locally --not yet merged upstream--.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
4 years agokernel: x86_64: drop CALGARY properly
Kevin Darbyshire-Bryant [Tue, 25 Feb 2020 16:38:35 +0000 (16:38 +0000)]
kernel: x86_64: drop CALGARY properly

Use correct config syntax of 'is not set' instead of just commenting the
line

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agomediatek: add latest fixes provided by MTK
John Crispin [Tue, 25 Feb 2020 16:15:07 +0000 (17:15 +0100)]
mediatek: add latest fixes provided by MTK

Signed-off-by: John Crispin <john@phrozen.org>
4 years agokernel: x86_64: drop CALGARY IOMMU
Kevin Darbyshire-Bryant [Mon, 24 Feb 2020 13:53:57 +0000 (13:53 +0000)]
kernel: x86_64: drop CALGARY IOMMU

The calgary IOMMU was only used on high-end IBM systems in the early
x86_64 age.  This is an unlikely OpenWrt target and in fact upstream
are looking to drop the driver entirely with the bonus that we no
longer see:

[ 0.000000] Calgary: detecting Calgary via BIOS EBDA area
[ 0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing!

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agomac80211: enhance wifi reload
John Crispin [Tue, 25 Feb 2020 16:03:44 +0000 (17:03 +0100)]
mac80211: enhance wifi reload

If the reconf call fails force a full restart of the radio.

Signed-off-by: John Crispin <john@phrozen.org>
4 years agohostapd: enhance wifi reload
John Crispin [Tue, 25 Feb 2020 16:01:55 +0000 (17:01 +0100)]
hostapd: enhance wifi reload

Add a radio_config_id property. If the radio config changes return an error
upon receiving the reconf call.

Signed-off-by: John Crispin <john@phrozen.org>
4 years agomt76: update to the latest version
Felix Fietkau [Tue, 25 Feb 2020 12:33:46 +0000 (13:33 +0100)]
mt76: update to the latest version

0a53dcda5203 mt76: mt7603: add upper limit for dynamic sensitivity minimum receive power
46e63c05f7d1 mt76: mt7603: enable dynamic sensitivity adjustment by default
81476f11b68c mt76: mt7615: fix antenna mask initialization in DBDC mode

Signed-off-by: Felix Fietkau <nbd@nbd.name>