openwrt/staging/ansuel.git
4 years agoramips: move swconfig to subtargets except for MT7621
DENG Qingfang [Thu, 26 Mar 2020 14:00:48 +0000 (22:00 +0800)]
ramips: move swconfig to subtargets except for MT7621

As MT7621 does not use swconfig anymore, move the package swconfig to
other subtargets.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: introduce 'soc_device' initialization
DENG Qingfang [Tue, 24 Mar 2020 12:09:10 +0000 (20:09 +0800)]
ramips: mt7621: introduce 'soc_device' initialization

mt7621 SoC has its own 'ralink_soc_info' structure with some
information about the soc itself. Pcie controller and pcie phy
drivers for this soc which are still in staging git tree make uses
of 'soc_device_attribute' looking for revision 'E2' in order to
know if reset lines are or not inverted. This way of doing things
seems to be necessary in order to make things clean and properly.
Hence, introduce this 'soc_device' to be able to properly use those
attributes in drivers. Also set 'data' pointer points to the struct
'ralink_soc_info' to be able to export also current soc information
using this mechanism.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: fix MikroTik 750Gr3 LAN ports names
DENG Qingfang [Thu, 19 Mar 2020 16:26:08 +0000 (00:26 +0800)]
ramips: fix MikroTik 750Gr3 LAN ports names

They are labeled as LAN2..LAN5 instead of LAN1..LAN4

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: use SoC I2C instead of bitbanged for Ubiquiti ER-X-SFP
DENG Qingfang [Thu, 19 Mar 2020 11:43:39 +0000 (19:43 +0800)]
ramips: use SoC I2C instead of bitbanged for Ubiquiti ER-X-SFP

The original idea of bitbanged I2C is to use i2c-gpio-custom
Since i2c-gpio-custom is no longer available on 5.4, use SoC I2C instead

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: fix Ubiquiti ER-X ports names and MAC addresses
DENG Qingfang [Thu, 19 Mar 2020 11:33:27 +0000 (19:33 +0800)]
ramips: mt7621: fix Ubiquiti ER-X ports names and MAC addresses

The name of each user port should be eth0..4, instead of lan1..4
and there is no WAN port. Rename them to match the official firmware.
To avoid conflict with the master port (gmac0), rename it to "dsa".

The official firmware assigns MAC address in this way:
eth0 = label mac
eth1 = label mac + 1
...
eth4 = label mac + 4

Since we have switched to DSA, it's possible to use different MAC for each port.

Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: net-label support
DENG Qingfang [Tue, 10 Mar 2020 17:33:40 +0000 (01:33 +0800)]
ramips: mt7621: net-label support

Add support for renaming ethernet interfaces in DTS

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: switch kernel version to 5.4
DENG Qingfang [Sun, 1 Mar 2020 09:17:49 +0000 (17:17 +0800)]
ramips: mt7621: switch kernel version to 5.4

After all dts and config changes, 4.14 no longer works on mt7621.
Switch it to 5.4 directly.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: change default ramips_setup_interfaces configuration
DENG Qingfang [Wed, 18 Mar 2020 17:10:50 +0000 (01:10 +0800)]
ramips: mt7621: change default ramips_setup_interfaces configuration

Most of MT7621 boards have LAN1~4 and WAN, so make this as the default

Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621 remove unused pinctrl groups in dts
DENG Qingfang [Sat, 4 Apr 2020 06:52:12 +0000 (14:52 +0800)]
ramips: mt7621 remove unused pinctrl groups in dts

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
[split commit, remove leftover uart3->gpio setup]
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: mt7621: update dts/defconfig for DSA
DENG Qingfang [Wed, 18 Mar 2020 15:38:58 +0000 (23:38 +0800)]
ramips: mt7621: update dts/defconfig for DSA

update dts and network/LED configuration for DSA driver.
sysupgrade from images prior to this commit with config preserved
will cause broken ethernet setup.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Acked-by: Jo-Philipp Wich <jo@mein.io>
[split commit]
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: mt7621: backport GPIO driver fix
DENG Qingfang [Tue, 17 Mar 2020 12:54:34 +0000 (20:54 +0800)]
ramips: mt7621: backport GPIO driver fix

Backport 2 patches from linux-next to fix mt7621 GPIO driver

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: update PCIe node in dtsi
DENG Qingfang [Wed, 1 Apr 2020 15:14:33 +0000 (23:14 +0800)]
ramips: mt7621: update PCIe node in dtsi

Update PCIe node in dtsi to match the new driver

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: backport PCIe driver fixes from staging-test
DENG Qingfang [Wed, 11 Mar 2020 13:05:41 +0000 (21:05 +0800)]
ramips: mt7621: backport PCIe driver fixes from staging-test

Backport mt7621-pci/mt7621-pci-phy fixes from staging-test

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: update pinctrl nodes
DENG Qingfang [Fri, 13 Mar 2020 13:27:03 +0000 (21:27 +0800)]
ramips: mt7621: update pinctrl nodes

Upstream GPIO driver uses "groups" "function" properties

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: convert GPIO dts refs
DENG Qingfang [Tue, 3 Mar 2020 21:22:24 +0000 (05:22 +0800)]
ramips: mt7621: convert GPIO dts refs

The upstream driver does not use &gpio0..2 banks notation anymore,
so convert them to &gpio

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: replace gpio/eth nodes in mt7621.dtsi
DENG Qingfang [Sun, 1 Mar 2020 09:14:44 +0000 (17:14 +0800)]
ramips: mt7621: replace gpio/eth nodes in mt7621.dtsi

There's different gpio and ethernet drivers upstream for mt7621.
Update these two nodes to match upstream dt bindings.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: refresh kernel config
DENG Qingfang [Sun, 1 Mar 2020 09:11:06 +0000 (17:11 +0800)]
ramips: mt7621: refresh kernel config

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: refresh patches
DENG Qingfang [Sun, 1 Mar 2020 09:06:45 +0000 (17:06 +0800)]
ramips: refresh patches

Removed upstreamed/solved elsewhere upstream:
- 0001-MIPS-ralink-Add-rt3352-SPI_CS1-pinmux.patch
- 0002-MIPS-pci-rt2880-set-pci-controller-of_node.patch
- 0004-MIPS-ralink-add-MT7621-pcie-driver.patch
- 0009-PCI-MIPS-enable-PCIe-on-MT7688.patch
- 0025-pinctrl-ralink-add-pinctrl-driver.patch
- 0028-GPIO-ralink-add-mt7621-gpio-controller.patch
- 0043-spi-add-mt7621-support.patch
- 0045-i2c-add-mt7621-driver.patch
- 0047-DMA-ralink-add-rt2880-dma-engine.patch
- 0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch
- 0054-mtd-spi-nor-w25q256-respect-default-mode.patch
- 0099-pci-mt7620.patch
- 304-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch

Removed because of the new NAND driver:
- 0038-Revert-mtd-nand-Remove-unused-chip-write_page-hook.patch
- 0039-mtd-add-mt7621-nand-support.patch
- 0040-nand-hack.patch

Remove patch that no longer applies (needs rework):
- 0034-NET-multi-phy-support.patch

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mtk-mmc: set correct DMA mask
DENG Qingfang [Fri, 17 Jan 2020 08:04:14 +0000 (16:04 +0800)]
ramips: mtk-mmc: set correct DMA mask

Since commit f8c55dc ("MIPS: use generic dma noncoherent ops for
simple noncoherent platforms") changed MIPS dma handling, the mmc
driver fails because it doesn't have a dma mask is set.

So set the correct dma mask.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: move MTK MMC driver to files directory
DENG Qingfang [Sun, 1 Mar 2020 09:02:06 +0000 (17:02 +0800)]
ramips: move MTK MMC driver to files directory

Move MTK MMC driver from "files-4.14" to "files" so kernel 5.4
can use it

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: copy patches and kernel config to 5.4
DENG Qingfang [Sun, 1 Mar 2020 09:01:09 +0000 (17:01 +0800)]
ramips: copy patches and kernel config to 5.4

Copy patches and kernel config to 5.4 for ramips

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agobcm53xx: refactor board.d code in 02_network
Rafał Miłecki [Fri, 3 Apr 2020 13:55:01 +0000 (15:55 +0200)]
bcm53xx: refactor board.d code in 02_network

1. Use functions for cleaner code
2. Always execute WAN interface generic code

Before this change WAN interface code wasn't executed on all devices due
to an early "exit 0".

Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
4 years agokernel: add module for Mellanox mlx Network Driver
Tan Zien [Sun, 5 Jan 2020 21:16:43 +0000 (05:16 +0800)]
kernel: add module for Mellanox mlx Network Driver

add module to support Mellanox Connect-X card
mlx4 supports ConnectX-3 series and previous cards
mlx5 supports Connect-IB/ConnectX-4 series and later cards

Signed-off-by: Tan Zien <nabsdh9@gmail.com>
4 years agoimx6: bootscript: use partition UUID for rootfs if possible
Tim Harvey [Wed, 1 Apr 2020 17:23:12 +0000 (10:23 -0700)]
imx6: bootscript: use partition UUID for rootfs if possible

Specifying root filesystem by device is non-deterministic for several
reasons:
 - USB device unmeration order is not garunteeed for USB storage devs
 - MMC devs ordering is determined by the instance of the MMC host
   controller including non-storage SDIO devices which can throw off
   numbering depending on kernel versions.

It is recommended to use partition UUID

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
4 years agoocteontx: switch to kernel 5.4
Tim Harvey [Wed, 1 Apr 2020 17:24:12 +0000 (10:24 -0700)]
octeontx: switch to kernel 5.4

5.4 is stable on Gateworks Newport GW610x/GW620x/GW630x/GW640x

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
4 years agobuild: refactor JSON info files to `profiles.json`
Paul Spooren [Thu, 12 Mar 2020 22:55:41 +0000 (12:55 -1000)]
build: refactor JSON info files to `profiles.json`

JSON info files contain machine readable information of built profiles
and resulting images. These files were added in commit 881ed09ee6e2
("build: create JSON files containing image info").

They are useful for firmware wizards and script checking for
reproducibility.

Currently all JSON files are stored next to the built images, resulting
in up to 168 individual files for the ath79/generic target.

This patch refactors the JSON creation to store individual per image
(not per profile) files in $(BUILD_DIR)/json_info_files and create an
single overview file called `profiles.json` in the target directory.

Storing per image files and not per profile solves the problem of
parallel file writes. If a profiles sysupgrade and factory image are
finished at the same time both processes would write to the same JSON
file, resulting in randomly broken outputs.

Some target like x86/64 do not use the image code yet, resulting in
missing JSON files. If no JSON info files were created, no
`profiles.json` files is created as it would be empty anyway.

As before, this creation is enabled by default only if `BUILDBOT` is set.

Tested via buildroot & ImageBuilder on ath79/generic, imx6 and x86/64.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[json_info_files dir handling in Make, if case refactoring]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agogrub2: fix build when ASLR enabled
Kevin Darbyshire-Bryant [Wed, 1 Apr 2020 21:44:37 +0000 (22:44 +0100)]
grub2: fix build when ASLR enabled

Disable ASLR and filter '-fno-plt' from CFLAGS: solves building when
ASLR enabled by basically disabling ASLR.

Solves errors similar to:
relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
or
module missing GLOBAL_OFFSET_TABLE

Suggested-by: 李国 <uxgood.org@gmail.com>
Acked-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agokmod-sched-cake: switch to in-tree cake for 4.19+
Kevin Darbyshire-Bryant [Mon, 29 Jul 2019 15:54:02 +0000 (16:54 +0100)]
kmod-sched-cake: switch to in-tree cake for 4.19+

Use in tree version of cake for kernels 4.19+ and backport features from
later kernel versions to 4.19.

Unfortunately PROVIDES dependency handling produces bogus circular
dependency warnings so whilst this package and kmod-sched-cake-oot
should be able to PROVIDE kmod-sched-cake this doesn't work.

Instead, remove the PROVIDES option and modify package sqm-scripts to
depend on the correct module independently.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agokmod-sched-cake: rename to kmod-sched-cake-oot
Kevin Darbyshire-Bryant [Mon, 30 Mar 2020 17:52:09 +0000 (18:52 +0100)]
kmod-sched-cake: rename to kmod-sched-cake-oot

In preparation for dropping the out of tree cake module and using
in tree cake from upstream, rename the package to kmod-sched-cake-oot
(out of tree)

Initially add a PROVIDES kmod-sched-cake so that package dependencies
can be satisfied.

Ultimately this package will be removed when linux 4.14 is removed.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agowireguard: bump to 1.0.20200401
Jason A. Donenfeld [Wed, 1 Apr 2020 20:08:42 +0000 (14:08 -0600)]
wireguard: bump to 1.0.20200401

Recent backports to 5.5 and 5.4 broke our compat layer. This release is
to keep things running with the latest upstream stable kernels.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agomac80211: rt2x00: prune more unnecessary exports
Daniel Golle [Mon, 30 Mar 2020 22:35:04 +0000 (23:35 +0100)]
mac80211: rt2x00: prune more unnecessary exports

The calibration patches for MT7620 unnecessarily export symbols and
populate never accessed function pointers. Remove all that and make
functions static as the only place where each of those functions is
called is within rt2800lib.c.
Also make code more readable by fixing indentation, removing
unnecessary parantheses and simplifying some instructions using
shorthands here and there.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agojansson: convert to cmake
Kevin Darbyshire-Bryant [Tue, 31 Mar 2020 12:01:18 +0000 (13:01 +0100)]
jansson: convert to cmake

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoopenssl: bump to 1.1.1f
Eneas U de Queiroz [Tue, 31 Mar 2020 20:51:45 +0000 (17:51 -0300)]
openssl: bump to 1.1.1f

There were two changes between 1.1.1e and 1.1.1f:
- a change in BN prime generation to avoid possible fingerprinting of
  newly generated RSA modules
- the patch reversing EOF detection we had already applied.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agooxnas: some improvements for Shuttle KD20
Daniel Golle [Sat, 28 Mar 2020 21:55:31 +0000 (21:55 +0000)]
oxnas: some improvements for Shuttle KD20

 * install kmod-hwmon-drivetemp by default
 * wire up thermal zone
 * fix fan GPIO polarity
 * fix i2c-gpio GPIO_OPEN_DRAIN

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agooxnas: fix warning in SATA driver
Daniel Golle [Tue, 31 Mar 2020 19:27:11 +0000 (20:27 +0100)]
oxnas: fix warning in SATA driver

drivers/ata/sata_oxnas.c: In function 'sata_oxnas_port_irq':
drivers/ata/sata_oxnas.c:2126:25: warning: left shift count >= width of type [-Wshift-count-overflow]
  if (ap->qc_active & (1 << ATA_TAG_INTERNAL)) {
                           ^~

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoipq40xx: fix DAP-2610 boot failure
Petr Štetiar [Tue, 31 Mar 2020 14:03:55 +0000 (16:03 +0200)]
ipq40xx: fix DAP-2610 boot failure

Albert has reported, that his DAP-2610 wont boot with the latest
snapshot and Fredrik has found out, that the device gets stuck at
"Waiting for root device ..." due to missing 5.4 kernel config symbol
CONFIG_MTD_SPLIT_WRGG_FW which was probably lost during the kernel
version bump.

Ref: https://forum.openwrt.org/t/dap-2610-bricked-help-needed
Fixes: 272e0a702a2b ("ipq40xx: add v5.4 support")
Suggested-by: Fredrik Olofsson <fredrik.olofsson@anyfinetworks.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agox86/64: add cdrom and iso9660 drivers
李国 [Fri, 27 Mar 2020 11:16:26 +0000 (19:16 +0800)]
x86/64: add cdrom and iso9660 drivers

The iso image need cdrom and iso9660 drivers to boot, otherwise it will
hang when mounting the root file system

Signed-off-by: 李国 <uxgood.org@gmail.com>
4 years agox86: generate EFI platform bootable images
李国 [Thu, 26 Mar 2020 06:05:33 +0000 (14:05 +0800)]
x86: generate EFI platform bootable images

Add EFI platform bootable images for x86 platforms. These images can
also boot from legacy BIOS platform.

EFI System Partition need to be fat12/fat16/fat32 (not need to load
filesystem drivers), so the first partition of EFI images are not ext4
filesystem any more.

GPT partition table has an alternate partition table, we did not
generate it. This may cause problems when use these images as qemu disk
(kernel can not find rootfs), we pad enough sectors will be ok.

Signed-off-by: 李国 <uxgood.org@gmail.com>
[part_magic_* refactoring, removed genisoimage checks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agogrub2: make some change to add efi platform support
李国 [Thu, 26 Mar 2020 05:51:32 +0000 (13:51 +0800)]
grub2: make some change to add efi platform support

1.generate boot image at Package/install section
2.move boot image to $(STAGING_DIR_IMAGE)/grub2/
3.add efi variant to support efi platform

Signed-off-by: 李国 <uxgood.org@gmail.com>
4 years agofirmware-utils: ptgen: add GPT support
李国 [Thu, 26 Mar 2020 05:47:40 +0000 (13:47 +0800)]
firmware-utils: ptgen: add GPT support

Add GPT support to ptgen, so we can generate EFI bootable images.

Introduced two options:
    -g        generate GPT partition table
    -G GUID   use GUID for disk and increase last bit for all partitions

We drop The alternate partition table to reduce size, This may cause
problems when generate vmdk images or vdi images. We have to pad enough
sectors when generate these images.

Signed-off-by: 李国 <uxgood.org@gmail.com>
[fixed compilation on macOS]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agobcm27xx-gpu-fw: update to latest version from RPi foundation
Álvaro Fernández Rojas [Tue, 31 Mar 2020 11:22:59 +0000 (13:22 +0200)]
bcm27xx-gpu-fw: update to latest version from RPi foundation

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm27xx: update 5.4 patches from RPi foundation
Álvaro Fernández Rojas [Tue, 31 Mar 2020 07:26:30 +0000 (09:26 +0200)]
bcm27xx: update 5.4 patches from RPi foundation

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agowireguard: bump to 1.0.20200330
Jason A. Donenfeld [Tue, 31 Mar 2020 00:25:29 +0000 (18:25 -0600)]
wireguard: bump to 1.0.20200330

* queueing: backport skb_reset_redirect change from 5.6
* version: bump

This release has only one slight change, to put it closer to the 5.6
codebase, but its main purpose is to bump us to a 1.0.y version number.
Now that WireGuard 1.0.0 has been released for Linux 5.6 [1], we can put
the same number on the backport compat codebase.

When OpenWRT bumps to Linux 5.6, we'll be able to drop this package
entirely, which I look forward to seeing.

[1] https://lists.zx2c4.com/pipermail/wireguard/2020-March/005206.html

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agogeneric: mips: exclude more dsemul code when fpu-emu is not enabled
Yousong Zhou [Tue, 3 Mar 2020 15:09:47 +0000 (23:09 +0800)]
generic: mips: exclude more dsemul code when fpu-emu is not enabled

The patch is backported from mips-next.  In addition to minor reduction
of code size and runtime memory use, the more apparent difference is
that the delay slot emulation page will not be present for those targets
with fpu emulation disabled (CONFIG_MIPS_FP_SUPPORT=n)

Memory maps of busybox before and after this change

  root@OpenWrt:/# cat /proc/self/maps
  00400000-00449000 r-xp 00000000 00:02 23         /bin/busybox
  00458000-00459000 r-xp 00048000 00:02 23         /bin/busybox
  00459000-0045a000 rwxp 00049000 00:02 23         /bin/busybox
  77dc0000-77de2000 r-xp 00000000 00:02 273        /lib/libgcc_s.so.1
  77de2000-77de3000 r-xp 00012000 00:02 273        /lib/libgcc_s.so.1
  77de3000-77de4000 rwxp 00013000 00:02 273        /lib/libgcc_s.so.1
  77de4000-77e7b000 r-xp 00000000 00:02 271        /lib/libc.so
  77e8a000-77e8c000 rwxp 00096000 00:02 271        /lib/libc.so
  77e8c000-77e8e000 rwxp 00000000 00:00 0
  7fd86000-7fda7000 rw-p 00000000 00:00 0          [stack]
  7fefd000-7fefe000 r-xp 00000000 00:00 0
  7ffe6000-7ffe7000 r--p 00000000 00:00 0          [vvar]
  7ffe7000-7ffe8000 r-xp 00000000 00:00 0          [vdso]

  root@OpenWrt:/# cat /proc/self/maps
  00400000-00449000 r-xp 00000000 00:02 23         /bin/busybox
  00458000-00459000 r-xp 00048000 00:02 23         /bin/busybox
  00459000-0045a000 rwxp 00049000 00:02 23         /bin/busybox
  77d55000-77d77000 r-xp 00000000 00:02 274        /lib/libgcc_s.so.1
  77d77000-77d78000 r-xp 00012000 00:02 274        /lib/libgcc_s.so.1
  77d78000-77d79000 rwxp 00013000 00:02 274        /lib/libgcc_s.so.1
  77d79000-77e10000 r-xp 00000000 00:02 272        /lib/libc.so
  77e1f000-77e21000 rwxp 00096000 00:02 272        /lib/libc.so
  77e21000-77e23000 rwxp 00000000 00:00 0
  7fe23000-7fe44000 rw-p 00000000 00:00 0          [stack]
  7ff63000-7ff64000 r--p 00000000 00:00 0          [vvar]
  7ff64000-7ff65000 r-xp 00000000 00:00 0          [vdso]

Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
4 years agotplink-safeloader: update soft_ver for TP-Link Archer C6 v2 (EU)
Georgi Vlaev [Fri, 27 Mar 2020 10:33:53 +0000 (12:33 +0200)]
tplink-safeloader: update soft_ver for TP-Link Archer C6 v2 (EU)

The last couple of TP-Link firmware releases for Archer C6 v2 (EU)
have switched to version 1.2.x. Bump the soft_ver to "1.2.1" to
allow firmware updates from the vendor web interface.

TP-Link vendor firmware releases supported by this change:
* Archer C6(EU)_V2_200110: soft_ver:1.2.1 Build 20200110 rel.60119
* Archer C6(EU)_V2_191014: soft_ver:1.2.0 Build 20191014 rel.33289

Signed-off-by: Georgi Vlaev <georgi.vlaev@gmail.com>
4 years agoath10k-ct: Support AQL on ath10k CT_KVER-5.4
Jose Olivera [Sat, 28 Mar 2020 16:11:36 +0000 (00:11 +0800)]
ath10k-ct: Support AQL on ath10k CT_KVER-5.4

Commit ea50780 backported Airtime Queue Limits (AQL) from Linux 5.5
to OpenWrt's backports 5.4. However, this only enabled AQL for the
vanilla ath10k driver. This patch also enables it for ath10k-ct.

Tested on:
* 2xTP-Link Archer A7v5 (QCA9563/QCA988X)
* Backports version 5.4-rc8 & 5.4.27
* ath10k-ct and ath10k-ct-htt firmware version 014 to 017
* ath10k-ct driver versions dc025dc to 3d173a4 (CT_KVER-5.4)
* WPA2, 802.11krv

Tested since January 25, 2020.

Signed-off-by: Jose Olivera <oliverajeo@gmail.com>
4 years agohostapd: add abridged flag in disassoc_imminent
Nick Hainke [Tue, 24 Mar 2020 22:12:01 +0000 (23:12 +0100)]
hostapd: add abridged flag in disassoc_imminent

If the abridged flag is set to 1 the APs that are listed in the BSS
Transition Candidate List are prioritized. If the bit is not set, the
APs have the same prioritization as the APs that are not in the list.

If you want to steer a client, you should set the flag!

The flag can be set by adding {...,'abridged': true,...} to the normal
ubus call.

Signed-off-by: Nick Hainke <vincent@systemli.org>
4 years agohostapd: expose beacon reports through ubus
Nick Hainke [Fri, 6 Dec 2019 17:17:06 +0000 (18:17 +0100)]
hostapd: expose beacon reports through ubus

Subscribe to beacon reports through ubus.
Can be used for hearing map and client steering purposes.

First enable rrm:
    ubus call hostapd.wlan0 bss_mgmt_enable '{"beacon_report":True}'

Subscribe to the hostapd notifications via ubus.

Request beacon report:
    ubus call hostapd.wlan0 rrm_beacon_req
'{"addr":"00:xx:xx:xx:xx:xx", "op_class":0, "channel":1,
"duration":1,"mode":2,"bssid":"ff:ff:ff:ff:ff:ff", "ssid":""}'

Signed-off-by: Nick Hainke <vincent@systemli.org>
[rework identation]
Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agohostapd: Add 802.11r support for WPA3-Enterprise
Jesus Fernandez Manzano [Fri, 27 Mar 2020 11:19:05 +0000 (12:19 +0100)]
hostapd: Add 802.11r support for WPA3-Enterprise

Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.net>
4 years agokernel: Enable CMOS RTC support on 5.4
Kevin Darbyshire-Bryant [Sun, 29 Mar 2020 20:38:10 +0000 (21:38 +0100)]
kernel: Enable CMOS RTC support on 5.4

Enable kernel symbol CONFIG_RTC_DRV_CMOS which was enabled in 4.14 &
4.19

Fixes FS#2905 and now my APU2 picks up time from RTC

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoramips: Deactivate NETGEAR WNCE2001 by default
Hauke Mehrtens [Sun, 29 Mar 2020 20:33:10 +0000 (22:33 +0200)]
ramips: Deactivate NETGEAR WNCE2001 by default

The root file system is getting too big for this device and this breaks
the ramips/rt305x build.

Do not build images for this board by default to fix this problem.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoodhcp6c: update to latest git HEAD
Hans Dedecker [Sun, 29 Mar 2020 20:21:16 +0000 (22:21 +0200)]
odhcp6c: update to latest git HEAD

f575351 ra: fix sending router solicitations

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agodnsmasq: bump to 2.81rc4
Kevin Darbyshire-Bryant [Thu, 19 Mar 2020 19:15:49 +0000 (19:15 +0000)]
dnsmasq: bump to 2.81rc4

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agonftables: implement no/json variants
Kevin Darbyshire-Bryant [Wed, 25 Mar 2020 09:13:46 +0000 (09:13 +0000)]
nftables: implement no/json variants

Replace the build time choice of json support with a package based
choice.  Users requiring a json aware version of 'nft' may now install
nftables-json.

The default choice to fulfill the 'nftables' package dependency is
'nftables-nojson'

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agojansson: import jansson from packages
Kevin Darbyshire-Bryant [Sat, 28 Mar 2020 11:27:27 +0000 (11:27 +0000)]
jansson: import jansson from packages

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agotreewide: Don't diverge from upstream default HZ settings on 4.19
Daniel Engberg [Mon, 18 Feb 2019 09:13:19 +0000 (09:13 +0000)]
treewide: Don't diverge from upstream default HZ settings on 4.19

Most targets upstream use 250Hz or even 1000Hz by default while
100Hz is hardcoded in OpenWrt's default config. Use upstream default
except for apm821xx which hardsets 1000Hz instead of platform default of
250Hz.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
[Apply same changes to 5.4]
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agomac80211: Update to version 5.4.27
Hauke Mehrtens [Fri, 13 Mar 2020 13:07:23 +0000 (14:07 +0100)]
mac80211: Update to version 5.4.27

The removed patches are all integrated in the upstream version now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agomac80211: Fix rt2x00 exports
Hauke Mehrtens [Sun, 29 Mar 2020 13:59:27 +0000 (15:59 +0200)]
mac80211: Fix rt2x00 exports

Do not export static functions, they are anyway not referenced by any
code in a different module.

This fixes the following compile warning:
WARNING: "rt2800_rf_aux_tx0_loopback" [/drivers/net/wireless/ralink/rt2x00/rt2800lib] is a static EXPORT_SYMBOL_GPL
WARNING: "rt2800_write_dc" [/drivers/net/wireless/ralink/rt2x00/rt2800lib] is a static EXPORT_SYMBOL_GPL
WARNING: "rt2800_rf_configstore" [/drivers/net/wireless/ralink/rt2x00/rt2800lib] is a static EXPORT_SYMBOL_GPL
WARNING: "rt2800_do_sqrt_accumulation" [/drivers/net/wireless/ralink/rt2x00/rt2800lib] is a static EXPORT_SYMBOL_GPL
WARNING: "rt2800_rf_configrecover" [/drivers/net/wireless/ralink/rt2x00/rt2800lib] is a static EXPORT_SYMBOL_GPL
WARNING: "rt2800_loft_search" [/drivers/net/wireless/ralink/rt2x00/rt2800lib] is a static EXPORT_SYMBOL_GPL
WARNING: "rt2800_iq_search" [/drivers/net/wireless/ralink/rt2x00/rt2800lib] is a static EXPORT_SYMBOL_GPL
WARNING: "rt2800_setbbptonegenerator" [/drivers/net/wireless/ralink/rt2x00/rt2800lib] is a static EXPORT_SYMBOL_GPL
WARNING: "rt2800_rf_aux_tx1_loopback" [/drivers/net/wireless/ralink/rt2x00/rt2800lib] is a static EXPORT_SYMBOL_GPL

Acked-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: generic: 5.4: fix mtd concat panic on read/write functions
Michal Cieslakiewicz [Fri, 27 Mar 2020 20:15:00 +0000 (21:15 +0100)]
kernel: generic: 5.4: fix mtd concat panic on read/write functions

Commit 2431c4f5b46c32c4ac495456b1ef4ce59c0bb85d ("mtd: Implement
mtd_{read,write}() as wrappers around mtd_{read,write}_oob()") for kernel 5.4
restrict mtd devices to register only one type of read/write functions
(either generic or OOB).

mtd concat does not follow above rule and defines both methods at the same
time, causing this type of device to be rejected by kernel. For routers that
use mtd concat for root UBI volume that means kernel panic and boot loop with
following error:

[    0.767307] Creating 1 MTD partitions on "ubi-concat":
[    0.772547] 0x000000000000-0x000007500000 : "ubi"
[    0.777953] ------------[ cut here ]------------
[    0.782683] WARNING: CPU: 0 PID: 1 at drivers/mtd/mtdcore.c:621 add_mtd_device+0x84/0x5f4
[    0.790983] Modules linked in:
[    0.794093] CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.24 #0
[    0.799932] Stack : 80680000 8062af20 00000000 00000000 8062a0f0 87c2dae4 87c282fc 8065fd23
[    0.808430]         805c64f4 00000001 807b32d8 80670000 80670000 00000001 87c2da98 25c15bcb
[    0.816909]         00000000 00000000 807e0000 0000006e 61696e74 00000000 2e342e32 34202330
[    0.825397]         0000006e cef2ada7 00000000 000c1ded 00000000 00000009 00000000 8034de64
[    0.833889]         00000009 80670000 80670000 80676d18 00000000 80320044 00000000 807b0000
[    0.842381]         ...
[    0.844861] Call Trace:
[    0.847367] [<80069994>] show_stack+0x30/0x100
[    0.851913] [<8007e8ac>] __warn+0xc0/0x10c
[    0.856072] [<8007e954>] warn_slowpath_fmt+0x5c/0xac
[    0.861134] [<8034de64>] add_mtd_device+0x84/0x5f4
[    0.866001] [<80352a50>] add_mtd_partitions+0xd8/0x1b8
[    0.871231] [<803527b8>] parse_mtd_partitions+0x238/0x3f8
[    0.876717] [<8034e51c>] mtd_device_parse_register+0x48/0x1b0
[    0.882586] [<8038dd2c>] virt_concat_probe+0x170/0x1ec
[    0.887820] [<803334c8>] platform_drv_probe+0x40/0x94
[    0.892970] [<80331638>] really_probe+0x104/0x35c
[    0.897766] [<80331d54>] device_driver_attach+0x70/0x98
[    0.903072] [<80331ddc>] __driver_attach+0x60/0x100
[    0.908042] [<8032f668>] bus_for_each_dev+0x68/0xa4
[    0.912989] [<803309d4>] bus_add_driver+0x1f0/0x200
[    0.917952] [<80332448>] driver_register+0x84/0x148
[    0.922906] [<80060a1c>] do_one_initcall+0x7c/0x1dc
[    0.927870] [<80684e14>] kernel_init_freeable+0x158/0x23c
[    0.933361] [<805387d8>] kernel_init+0x10/0xf0
[    0.937883] [<80064dd8>] ret_from_kernel_thread+0x14/0x1c
[    0.943375] ---[ end trace 62e0927fba490f68 ]---
[...]
[    2.266513] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    2.274893] Rebooting in 1 seconds..

This patch makes mtd concat to follow new mtd requirements by registering
either normal or oob versions of read/write functions, but not both at the
same time. OOB is used only when underlying mtd devices provide such
functionality (like NAND chips) - otherwise generic methods are used.

Tested successfully on Netgear WNDR4300.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
4 years agoarchs38: switch to kernel 5.4 by default
Evgeniy Didin [Sat, 28 Mar 2020 11:12:36 +0000 (14:12 +0300)]
archs38: switch to kernel 5.4 by default

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Petr Štetiar <ynezz@true.cz>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: John Crispin <john@phrozen.org>
4 years agoarchs38: Add patch for gcc8 compilance
Evgeniy Didin [Sat, 28 Mar 2020 11:12:35 +0000 (14:12 +0300)]
archs38: Add patch for gcc8 compilance

Building Linux kernel version 5.4.x with GCC8 ends up
with internal compiler error. The workaround on this issue
can be introdution of additional compiler option "--mmpy-option=2"

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Petr Štetiar <ynezz@true.cz>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: John Crispin <john@phrozen.org>
4 years agoarchs38: add kernel 5.4 config
Evgeniy Didin [Sat, 28 Mar 2020 11:12:34 +0000 (14:12 +0300)]
archs38: add kernel 5.4 config

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Petr Štetiar <ynezz@true.cz>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: John Crispin <john@phrozen.org>
[run make kernel_oldconfig CONFIG_TARGET=target]
[Do not deactivate CONFIG_NET_VENDOR_*]
[Activate CONFIG_HARDENED_USERCOPY]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agokernel: update arc-specific patch
Evgeniy Didin [Sat, 28 Mar 2020 11:12:37 +0000 (14:12 +0300)]
kernel: update arc-specific patch

This patch updates arc-specific patch by moving declaration
of struct object before it's usage.

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Petr Štetiar <ynezz@true.cz>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: John Crispin <john@phrozen.org>
4 years agocurl: rebuild when libopenssl config changes
DENG Qingfang [Thu, 31 Oct 2019 15:39:02 +0000 (23:39 +0800)]
curl: rebuild when libopenssl config changes

When some libopenssl options change curl will have to be rebuild to
adapt to those changes, avoiding undefined reference errors or features
disabled in curl.

Add CONFIG_OPENSSL_ENGINE, CONFIG_OPENSSL_WITH_COMPRESSION and
CONFIG_OPENSSL_WITH_NPN to PKG_CONFIG_DEPENDS so it will trigger
rebuild every time the options are changed.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agomac80211: rtl8723bs: fix missing MMC dependency
Petr Štetiar [Sat, 28 Mar 2020 14:01:47 +0000 (15:01 +0100)]
mac80211: rtl8723bs: fix missing MMC dependency

Building of ath79-tiny has uncovered following:

 Package kmod-rtl8723bs is missing dependencies for the following libraries:
 mmc_core.ko

So add this missing dependency.

Fixes: 8c26d67a67d0 ("mac80211: realtek: add staging driver for RTL8723BS SDIO module")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agomvebu: cortexa9: correct cpu subtype
Tomasz Maciej Nowak [Wed, 18 Mar 2020 18:04:12 +0000 (19:04 +0100)]
mvebu: cortexa9: correct cpu subtype

Armada 370  processors have only 16 double-precision registers. The
change introduced by 8dcc1087602e ("toolchain: ARM: Fix toolchain
compilation for gcc 8.x") switched accidentally the toolchain for mvebu
cortexa9 subtarget to cpu type with 32 double-precision registers. This
stems from gcc defaults which assume "vfpv3-d32" if only "vfpv3" as mfpu
is specified. That change resulted in unusable image, in which kernel
will kill userspace as soon as it causing "Illegal instruction".

Ref: https://forum.openwrt.org/t/gcc-was-broken-on-mvebu-armada-370-device-after-commit-on-2019-03-25/43272
Fixes: 8dcc1087602e ("toolchain: ARM: Fix toolchain compilation for
gcc 8.x")
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agotegra: correct cpu subtype
Tomasz Maciej Nowak [Wed, 18 Mar 2020 18:04:13 +0000 (19:04 +0100)]
tegra: correct cpu subtype

Tegra 2 processors have only 16 double-precision registers. The change
introduced by 8dcc1087602e ("toolchain: ARM: Fix toolchain compilation
for gcc 8.x") switched accidentally the toolchain for tegra target to cpu
type with 32 double-precision registers. This stems from gcc defaults
which assume "vfpv3-d32" if only "vfpv3" as mfpu is specified. That
change resulted in unusable image, in which kernel will kill userspace as
soon as it causing "Illegal instruction".

Ref: https://forum.openwrt.org/t/gcc-was-broken-on-mvebu-armada-370-device-after-commit-on-2019-03-25/43272
Fixes: 8dcc1087602e ("toolchain: ARM: Fix toolchain compilation for
gcc 8.x")
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agox86: fix missing squashfs and ext4 rootfs images
Paul Spooren [Wed, 25 Mar 2020 19:25:10 +0000 (09:25 -1000)]
x86: fix missing squashfs and ext4 rootfs images

The previous rework of x86 image creation done in commit cb007a7bf619
("x86: switch image generation to new code") removed images of separate
squashfs and ext4 filesystems which are handy for example in testing
under QEMU.

So this patch adds back creation of those missing rootfs images for ext4
and squashfs based filesystems.

Fixes: cb007a7bf619 ("x86: switch image generation to new code")
Signed-off-by: Paul Spooren <mail@aparcar.org>
[commit subject and description tweaks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agox86: fix padding in images
Paul Spooren [Wed, 25 Mar 2020 07:06:57 +0000 (21:06 -1000)]
x86: fix padding in images

The previous rework of x86 image creation done in commit  cb007a7bf619
("x86: switch image generation to new code") broke the padding in
images.

 sda: p2 size 212992 extends beyond EOD, enabling native capacity
 sda: p2 size 212992 extends beyond EOD, truncated
 sd 0:0:0:0: [sda] Attached SCSI disk
 SQUASHFS error: squashfs_read_data failed to read block 0x2cc556
 unable to read id index table
 VFS: Cannot open root device "PARTUUID=ac5c9cd8-02" or unknown-block(8,2): error -5
 Please append a correct "root=" boot option; here are the available partitions:
 0800           19761 sda
  driver: sd
   0801           16384 sda1 ac5c9cd8-01

   0802            2865 sda2 ac5c9cd8-02

 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,2)

Tested with x86/64 with Docker (squashfs), qemustart (ext4/squashfs) and
virtualbox (ext4/squashfs).

Ref: FS#2935
Fixes: cb007a7bf619 ("x86: switch image generation to new code")
Suggested-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Paul Spooren <mail@aparcar.org>
[commit subject and description tweaks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agokernel: package gpio-f7188x driver
Nick Bowler [Wed, 25 Mar 2020 02:00:30 +0000 (22:00 -0400)]
kernel: package gpio-f7188x driver

This driver enables support for the GPIO capabilities found in many
Fintek Super-IO chips.

Signed-off-by: Nick Bowler <nbowler@draconx.ca>
4 years agokernel: package f71808e-wdt driver
Nick Bowler [Wed, 25 Mar 2020 02:00:29 +0000 (22:00 -0400)]
kernel: package f71808e-wdt driver

This driver enables support for the watchdog timers found in many
Fintek Super-IO chips.

Signed-off-by: Nick Bowler <nbowler@draconx.ca>
4 years agokernel: package f71882fg hwmon driver
Nick Bowler [Wed, 25 Mar 2020 02:00:28 +0000 (22:00 -0400)]
kernel: package f71882fg hwmon driver

This driver enables hardware monitoring support using the sensors
found in many Fintek Super-IO chips.

Signed-off-by: Nick Bowler <nbowler@draconx.ca>
4 years agoopenssl: revert EOF detection change in 1.1.1
Eneas U de Queiroz [Fri, 27 Mar 2020 02:20:08 +0000 (23:20 -0300)]
openssl: revert EOF detection change in 1.1.1

This adds patches to avoid possible application breakage caused by a
change in behavior introduced in 1.1.1e.  It affects at least nginx,
which logs error messages such as:
nginx[16652]: [crit] 16675#0: *358 SSL_read() failed (SSL: error:
4095126:SSL routines:ssl3_read_n:unexpected eof while reading) while
keepalive, client: xxxx, server: [::]:443

Openssl commits db943f4 (Detect EOF while reading in libssl), and
22623e0 (Teach more BIOs how to handle BIO_CTRL_EOF) changed the
behavior when encountering an EOF in SSL_read().  Previous behavior was
to return SSL_ERROR_SYSCALL, but errno would still be 0.  The commits
being reverted changed it to SSL_ERRO_SSL, and add an error to the
stack, which is correct.  Unfortunately this affects a number of
applications that counted on the old behavior, including nginx.

The reversion was discussed in openssl/openssl#11378, and implemented as
PR openssl/openssl#11400.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agoar71xx: Fix gigabit switch support for Mikrotik RB951G-2HnD
Baptiste Jonglez [Thu, 26 Mar 2020 18:03:42 +0000 (19:03 +0100)]
ar71xx: Fix gigabit switch support for Mikrotik RB951G-2HnD

Without this patch, when using rev 3 of the Atheros AR9344 SoC, the
gigabit switch (AR8327) does not work or works very erratically.

This is a re-spin of http://patchwork.ozlabs.org/patch/419857/ with a
different PLL value, according to the feedback from several users
(including myself) as shown here:

  https://openwrt.org/toh/mikrotik/rb2011uias#tracking_reported_experience_with_suggested_patch_for_the_5_gige_ports

Performance is acceptable: testing L3 forwarding without NAT yields a
performance of 370 Mbit/s (iperf3 TCP) and 41 Kpps (iperf3 UDP with 64
bytes payload). Both tests show that 100% of CPU time is spent on softirq.

A similar fix for a different device (RB2011) was added in e457d22261
("Make GBit switch work on RB2011").

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
4 years agokernel: bump 5.4 to 5.4.28
Petr Štetiar [Thu, 26 Mar 2020 14:19:42 +0000 (15:19 +0100)]
kernel: bump 5.4 to 5.4.28

Changelog since 5.4.24 mentions CVE-2019-19769, CVE-2020-8648,
CVE-2020-8649 and CVE-2020-8647.

Removed upstreamed:

 generic: 507-v5.6-iio-chemical-sps30-fix-missing-triggered-buffer-depe.patch
 generic: 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch
 bcm27xx: 950-0435-ASoC-pcm512x-Fix-unbalanced-regulator-enable-call-in.patch
 ipq806x: 701-stmmac-fix-notifier-registration.patch
 lantiq: 002-pinctrl-falcon-fix-syntax-error.patch
 octeontx: 0002-net-thunderx-workaround-BGX-TX-Underflow-issue.patch

Run tested: apu2, qemu-x86-64, apalis, a64-olinuxino, nbg6617
Build tested: sunxi/a53, imx6, x86/64, ipq40xx

Tested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> [apu2]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoipq40xx: switch to 5.4 kernel
Petr Štetiar [Tue, 24 Mar 2020 10:09:41 +0000 (11:09 +0100)]
ipq40xx: switch to 5.4 kernel

5.4.24 seems to be working fine on my zyxel,nbg6617, so let's start
wider userbase testing.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoipq40xx: wpj428: fix missing MDIO GPIO reset and pinmux
Leon M. George [Mon, 11 Nov 2019 13:10:50 +0000 (14:10 +0100)]
ipq40xx: wpj428: fix missing MDIO GPIO reset and pinmux

The bootloader does not always initialize the MDIO pins before booting
Linux. E.g. on version "U-Boot 2012.07 [Chaos Calmer 15.05.1,r35193] (Jul
25 2017 - 11:36:26)" this is the case when booting automatically without
activating the U-Boot console.

Without this change, the kernel boot will complain about missing PHYs:

 libphy: ipq40xx_mdio: probed
 ar40xx c000000.ess-switch: Probe failed - Missing PHYs!
 libphy: Fixed MDIO Bus: probed

With this change it will work as expected:

 libphy: ipq40xx_mdio: probed
 ESS reset ok!
 ESS reset ok!
 libphy: Fixed MDIO Bus: probed

Ref: GH-2835
Tested-by: Fredrik Olofsson <fredrik.olofsson@anyfinetworks.com>
Signed-off-by: Leon M. George <leon@georgemail.eu>
[commit description from Fredrik, subject facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agosunxi: switch to 5.4 kernel
Petr Štetiar [Thu, 26 Mar 2020 12:14:32 +0000 (13:14 +0100)]
sunxi: switch to 5.4 kernel

Seems to be working fine on my a64-olinuxino, it's 99.9% upstream stuff
anyway. Lets start wider userbase testing.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agosunxi: a53: fix ethernet on a64-olinuxino
Petr Štetiar [Thu, 26 Mar 2020 12:06:12 +0000 (13:06 +0100)]
sunxi: a53: fix ethernet on a64-olinuxino

a64-olinuxino board has Micrel KSZ9031 Gigabit PHY so add support for
this PHY into kernel.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agosunxi: 5.4: dts: a64: olinuxino: add bank supply regulators
Petr Štetiar [Wed, 18 Mar 2020 23:43:14 +0000 (00:43 +0100)]
sunxi: 5.4: dts: a64: olinuxino: add bank supply regulators

This is backport of v5.6 patch.

Allwinner A64 SoC has separate supplies for PC, PD, PE, PG and PL. This
patch adds regulators for them to the pinctrl node.

Exception is PL which is used by the RSB bus. To avoid circular
dependencies, VCC-PL is omitted.

On boards with eMMC, VCC-PC is supplied by ELDO1, instead of DCDC1.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agosunxi: 5.4: a64-olinuxino: use red LED for status signalization
Petr Štetiar [Thu, 26 Mar 2020 09:13:57 +0000 (10:13 +0100)]
sunxi: 5.4: a64-olinuxino: use red LED for status signalization

There is a red LED marked as `GPIO_LED1` on the silkscreen and connected
to PE17, so use this LED for status signalization.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agosunxi: a53: add support for Olimex A64-Olinuxino eMMC
Petr Štetiar [Mon, 16 Mar 2020 09:57:50 +0000 (10:57 +0100)]
sunxi: a53: add support for Olimex A64-Olinuxino eMMC

Specifications:

 SoC: Allwinner A64 (1.2 GHz Quad-Core ARM Cortex-A53 64-bit)
 RAM: 1GB or 2GB RAM DDR3L @ 672Mhz
 Flash: 0/4/16GB eMMC flash memory for storage and boot
 MicroSD card connector for cards up to 32GB
 Debug: serial UART debug header with 0.1" pins
 Wired connectivity: 10/100/1000Mbps GbE Ethernet
 Wireless connectivity: on-board RTL8723BS 1T1R 802.11bgn WiFi and
                        Bluetooth 4.0 module with built-in antenna
                        (only available in the A64-OLinuXino-1G4GW)

Flashing instructions:

 Standard sunxi SD card installation procedure - copy eMMC image to SD
 card, insert in into SD card slot on the device and boot. You should see
 something like following if the eMMC is detected correctly:

  mmcblk2: mmc2:0001 P1XXXX 3.60 GiB
  mmcblk2boot0: mmc2:0001 P1XXXX partition 1 16.0 MiB
  mmcblk2boot1: mmc2:0001 P1XXXX partition 2 16.0 MiB

 Then flash SD card eMMC image straight into the mmcblk2 device:

  dd if=/mnt/openwrt...a64-olinuxino-emmc-squashfs-sdcard.img of=/dev/mmcblk2

 It also possible to boot from boot0 partition[1]:

  1. Compile U-Boot with CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x40
     otherwise the U-Boot will get stuck in bootloop
  2. Configure eMMC to boot from boot0 partition inside U-Boot:

     mmc bootbus 1 1 0 0; mmc partconf 1 1 1 0

  3. echo 0 > /sys/block/mmcblk2boot0/force_ro
  4. Write U-Boot from offset 0 (not offset 8k as with SD card) into
     boot0 partition

     dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk2boot0

Known issues:

 Wireless doesn't work properly via netifd.

1. https://linux-sunxi.org/index.php?title=Bootable_eMMC

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agosunxi: a53: add support for Olimex A64-Olinuxino
Petr Štetiar [Mon, 16 Mar 2020 09:57:50 +0000 (10:57 +0100)]
sunxi: a53: add support for Olimex A64-Olinuxino

Specifications:

 SoC: Allwinner A64 (1.2 GHz Quad-Core ARM Cortex-A53 64-bit)
 RAM: 1GB or 2GB RAM DDR3L @ 672Mhz
 Flash: 0/4/16GB eMMC flash memory for storage and boot
 MicroSD card connector for cards up to 32GB
 Debug: serial UART debug header with 0.1" pins
 Wired connectivity: 10/100/1000Mbps GbE Ethernet
 Wireless connectivity: on-board RTL8723BS 1T1R 802.11bgn WiFi and
                        Bluetooth 4.0 module with built-in antenna
                        (only available in the A64-OLinuXino-1G4GW)

Flashing instructions:

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

Known issues:

 Wireless doesn't work properly via netifd.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agosunxi: a53: image: make it DRY
Petr Štetiar [Mon, 16 Mar 2020 09:56:01 +0000 (10:56 +0100)]
sunxi: a53: image: make it DRY

Replace same copy&pasted lines with the appropriate reusable bits.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agouboot-sunxi: a64: allow booting directly from eMMC
Petr Štetiar [Wed, 18 Mar 2020 14:00:22 +0000 (15:00 +0100)]
uboot-sunxi: a64: allow booting directly from eMMC

Current boot script uses hardcoded bootdevice, which allows booting from
SD card only, so this patch allows booting directly from eMMC as well.
While at it, replace fixed root device with more flexible UUID based
probing, so from now on probing order of MMC device doesn't matter.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agouboot-sunxi: add support for Olimex A64-Olinuxino eMMC
Petr Štetiar [Mon, 16 Mar 2020 14:37:54 +0000 (15:37 +0100)]
uboot-sunxi: add support for Olimex A64-Olinuxino eMMC

Adding U-Boot image for Olimex A64-Olinuxino eMMC, including patch which
adds eMMC boot partition configuration commands.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agouboot-sunxi: add support for Olimex A64-Olinuxino
Petr Štetiar [Mon, 16 Mar 2020 14:37:54 +0000 (15:37 +0100)]
uboot-sunxi: add support for Olimex A64-Olinuxino

Adding U-Boot image for Olimex A64-Olinuxino.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agouboot-sunxi: rename Sinovoip BPI M2 Plus to Bananapi M2 Plus H3
Petr Štetiar [Wed, 25 Mar 2020 11:55:45 +0000 (12:55 +0100)]
uboot-sunxi: rename Sinovoip BPI M2 Plus to Bananapi M2 Plus H3

Rename the board as done in upstream commit 268ae6548779 ("sunxi: Rename
Sinovoip BPI M2 Plus to Bananapi M2 Plus H3") which backs the rename
with the following reasoning:

 The brand Sinovoip is used for Sinovoip's original VOIP products, while
 the Bananapi brand is for the single board computers they produce.  This
 has been verified by Bananapi. Rename the board from "Sinovoip BPI M2
 Plus" to "Bananapi M2 Plus". For the defconfig file, all lowercase is
 used.

 To support the H5 variant of this board, the "H3" suffix is added to
 the defconfig name.

This has to be done in order to allow building U-Boot past v2019.04
release where this change was introduced.

Ref: https://github.com/openwrt/openwrt/pull/2849#discussion_r396401489
Suggested-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agouboot-sunxi: Banana Pi M2 Ultra switch to mainline defconfig
Aleksander Jan Bajkowski [Sun, 9 Feb 2020 17:27:48 +0000 (18:27 +0100)]
uboot-sunxi: Banana Pi M2 Ultra switch to mainline defconfig

U-boot also have defconfig for this board. In 2019.01 branch they are identical.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years agouboot-sunxi: bump to 2020.01
Petr Štetiar [Mon, 16 Mar 2020 13:47:07 +0000 (14:47 +0100)]
uboot-sunxi: bump to 2020.01

Refreshed patches, removed following, probably obsolete patches:

 221-compatible-old-dtc.patch
 240-sun50i-h5-Orange-Pi-Zero-Plus-Fix-SdCard-detection.patch

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agolinux-firmware: add firmware for RTL8723BS SDIO modules
Petr Štetiar [Wed, 18 Mar 2020 15:51:13 +0000 (16:51 +0100)]
linux-firmware: add firmware for RTL8723BS SDIO modules

Adds firmware package for Realtek RTL8723BS SDIO Wireless LAN NIC driver
available in the staging.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agomac80211: realtek: add staging driver for RTL8723BS SDIO module
Petr Štetiar [Wed, 18 Mar 2020 15:54:03 +0000 (16:54 +0100)]
mac80211: realtek: add staging driver for RTL8723BS SDIO module

Adds kernel module for Realtek RTL8723BS SDIO Wireless LAN NIC driver
available in the staging.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agobcm27xx: 5.4: add support for Sensirion SPS30 in i2c-sensor overlay
Petr Štetiar [Sun, 8 Mar 2020 21:33:11 +0000 (22:33 +0100)]
bcm27xx: 5.4: add support for Sensirion SPS30 in i2c-sensor overlay

Add support for Sensirion SPS30 particulate matter sensor with fixed
address 0x69.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoath79: rename Mikrotik RB 922UAGS-5HPacD mtd partition
Thibaut VARÈNE [Tue, 17 Mar 2020 16:53:44 +0000 (17:53 +0100)]
ath79: rename Mikrotik RB 922UAGS-5HPacD mtd partition

In RouterBOARD parlance there never was an "art" partition.
This partition has always been named 'hard_config' on ar71xx.

This partition contains more than just ART (Atheros Radio Test) data. It
includes the hardware description (product code, serial, board
identifier, name, hardware options, MAC address), as well as other bits
affecting the operation of RouterBoot.
To avoid confusion with regular ART data, this partition is renamed in
line with historical ar71xx and ramips nomenclature as 'hard_config'.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
[minor commit title/message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: fix Mikrotik wAP G-5HacT2HnD mtd partitions
Thibaut VARÈNE [Tue, 17 Mar 2020 16:53:43 +0000 (17:53 +0100)]
ath79: fix Mikrotik wAP G-5HacT2HnD mtd partitions

In RouterBOARD parlance there never was an "art" partition.
This partition has always been named 'hard_config' on ar71xx.

This partition contains more than just ART (Atheros Radio Test) data. It
includes the hardware description (product code, serial, board
identifier, name, hardware options, MAC address), as well as other bits
affecting the operation of RouterBoot.
To avoid confusion with regular ART data, this partition is renamed in
line with historical ar71xx and ramips nomenclature as 'hard_config'.

This commit fixes the previous support files and implements the nested
RouterBoot partition scheme as already used by ramips-based SPI-NOR
RouterBOARD DTSes, as previously reviewed and implemented in
bbe2cf657ca7 ("ramips: fix RBM11G partitioning").

Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
[minor commit title/message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agokirkwood: fix DTS partitions for Pogoplug E02
Alberto Bursi [Fri, 27 Mar 2020 11:21:30 +0000 (12:21 +0100)]
kirkwood: fix DTS partitions for Pogoplug E02

The Pogoplug E02 was not using the correct partitions
in device tree, but used the ones from upstream and
thus could not boot OpenWrt images.

In contrast, uboot-kirkwood is using the correct
partitions since d3fc4fbd74dc ("uboot-kirkwood: re-add
Pogoplug E02 support").

This patch corrects the partitions in DTS for kernels
4.14, 4.19 and 5.4.

Fixes: 2b0fa00da8fc ("kirkwood: add Pogoplug E02 Kernel support")
Signed-off-by: Alberto Bursi <bobafetthotmail@gmail.com>
Reviewed-by: Pawel Dembicki <paweldembicki@gmail.com>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
[commit title/message facelift, refresh 4.14 patch]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agomediatke: add support for elecom-wrc-2533gent
John Crispin [Fri, 27 Mar 2020 15:13:06 +0000 (16:13 +0100)]
mediatke: add support for elecom-wrc-2533gent

This commit adds support for the MT7622-based Elecom WRC-2533gent router,
with spi-nand storage and 512MB RAM.

The device has the following specifications:

* MT7622 (arm64 dual-core)
* 512MB RAM (DDR3)
* 4GB storage (spi-nand)
* 5x 1Gbps Ethernet (RTL8337C switch)
* 1x UART header
* 1x USB 3.0 port
* 5x LEDs
* 1x reset button
* 1x WPS button
* 1x slider switch
* 1x DC jack for main power (12V)

The following has been tested and is working:
* Ethernet switch
* 2.4g and 5g wifi
* USB 3.0 port
* sysupgrade
* buttons/leds

Not working:
* bluetooth firmware does not load even though it is present int he rootfs

Signed-off-by: John Crispin <john@phrozen.org>
4 years agomediatek: more v5.4 mtd fixes
John Crispin [Fri, 27 Mar 2020 14:34:33 +0000 (15:34 +0100)]
mediatek: more v5.4 mtd fixes

Signed-off-by: John Crispin <john@phrozen.org>
4 years agohostapd: fix no_reload logic
John Crispin [Fri, 27 Mar 2020 11:40:23 +0000 (12:40 +0100)]
hostapd: fix no_reload logic

the code would unconditionally tear down all interfaces upon a reconf.
This should only be done when the reconf call fails.

Signed-off-by: John Crispin <john@phrozen.org>
4 years agomac80211: fix brcmfmac monitor interface crash
Rafał Miłecki [Fri, 27 Mar 2020 13:55:58 +0000 (14:55 +0100)]
mac80211: fix brcmfmac monitor interface crash

This fixes bug in brcmfmac *exposed* by ipv6/addrconf fix.

Fixes: ec8e8e2ef082 ("kernel: backport out-of-memory fix for non-Ethernet devices")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>