openwrt/staging/wigyori.git
4 years agoar71xx: bring back Atheros AP83 support kitchensink-202004
Zoltan HERPAI [Tue, 5 May 2020 15:09:35 +0000 (17:09 +0200)]
ar71xx: bring back Atheros AP83 support

I still have a (working!) AP83-040 board, so let's bring back
support for it. Changes since it was dropped:

 - WLAN LED isn't working, "fixme"
 - hardcoded flash layout was added back into the mach file
 - sysupgrade is "fixme"
 - the flash mechanism and the custom SPI driver was not
   modernized, but they compile and work.

Other than these notes, the board is working as expected.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agopackages: vsc73x5-ucode: re-enable AP83-specific microcode install
Zoltan HERPAI [Tue, 5 May 2020 15:08:28 +0000 (17:08 +0200)]
packages: vsc73x5-ucode: re-enable AP83-specific microcode install

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agoar71xx: bring back AP83 SPI driver
Zoltan HERPAI [Tue, 5 May 2020 15:07:52 +0000 (17:07 +0200)]
ar71xx: bring back AP83 SPI driver

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agoar71xx: bring back legacy flash locking mechanism
Zoltan HERPAI [Tue, 5 May 2020 15:07:30 +0000 (17:07 +0200)]
ar71xx: bring back legacy flash locking mechanism

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agofirmware: intel-microcode: bump to 20191115
Zoltan HERPAI [Thu, 7 May 2020 10:12:02 +0000 (12:12 +0200)]
firmware: intel-microcode: bump to 20191115

  + SECURITY UPDATE
    - Implements MDS mitigation (TSX TAA), INTEL-SA-00270, CVE-2019-11135
    - Implements TA Indirect Sharing mitigation, and improves the
      MDS mitigation (VERW)
    - Fixes FIVR (Xeon Voltage Modulation) vulnerability, INTEL-SA-00271,
      CVE-2019-11139
    - Fixes SGX vulnerabilities and errata (including CVE-2019-0117)
    - Adds microcode update for CFL-S (Coffe Lake Desktop)
      INTEL-SA-00270, CVE-2019-11135, CVE-2019-0117
  + CRITICAL ERRATA FIXES
    - Fixes Jcc conditional jump macro-fusion erratum (Skylake+, except
      Ice Lake), causes a 0-3% typical perforance hit (can be as bad
      as 10%).  But ensures the processor will actually jump where it
      should, so don't even *dream* of not applying this fix.
    - Fixes AVX SHUF* instruction implementation flaw erratum
  + New Microcodes:
    sig 0x000406d8, pf_mask 0x01, 2019-09-16, rev 0x012d, size 84992
    sig 0x00050656, pf_mask 0xbf, 2019-09-05, rev 0x400002c, size 51200
    sig 0x00060663, pf_mask 0x80, 2018-04-17, rev 0x002a, size 87040
    sig 0x000706a8, pf_mask 0x01, 2019-08-29, rev 0x0016, size 74752
    sig 0x000706e5, pf_mask 0x80, 2019-09-05, rev 0x0046, size 102400
    sig 0x000a0660, pf_mask 0x80, 2019-08-27, rev 0x00c6, size 91136
  + Updated Microcodes:
    sig 0x000406e3, pf_mask 0xc0, 2019-10-03, rev 0x00d6, size 101376
    sig 0x00050653, pf_mask 0x97, 2019-09-09, rev 0x1000151, size 32768
    sig 0x00050657, pf_mask 0xbf, 2019-09-05, rev 0x500002c, size 51200
    sig 0x000506e3, pf_mask 0x36, 2019-10-03, rev 0x00d6, size 101376
    sig 0x000706a1, pf_mask 0x01, 2019-08-28, rev 0x0032, size 73728
    sig 0x000806e9, pf_mask 0x10, 2019-10-15, rev 0x00ca, size 100352
    sig 0x000806e9, pf_mask 0xc0, 2019-09-26, rev 0x00ca, size 100352
    sig 0x000806ea, pf_mask 0xc0, 2019-08-14, rev 0x00c6, size 99328
    sig 0x000806eb, pf_mask 0xd0, 2019-10-03, rev 0x00ca, size 100352
    sig 0x000806ec, pf_mask 0x94, 2019-10-03, rev 0x00ca, size 100352
    sig 0x000906e9, pf_mask 0x2a, 2019-10-03, rev 0x00ca, size 100352
    sig 0x000906ea, pf_mask 0x22, 2019-10-03, rev 0x00ca, size 99328
    sig 0x000906eb, pf_mask 0x02, 2019-10-03, rev 0x00ca, size 100352
    sig 0x000906ec, pf_mask 0x22, 2019-10-03, rev 0x00ca, size 99328
    sig 0x000906ed, pf_mask 0x22, 2019-10-03, rev 0x00ca, size 100352
    sig 0x000a0660, pf_mask 0x80, 2019-10-03, rev 0x00ca, size 91136

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agofirmware: amd64-microcode: update to 20191218
Zoltan HERPAI [Thu, 7 May 2020 10:10:35 +0000 (12:10 +0200)]
firmware: amd64-microcode: update to 20191218

  * New microcode update packages from AMD upstream:
    + Updated Microcodes:
      sig 0x00800f12, patch id 0x08001250, 2019-04-16
      sig 0x00800f82, patch id 0x0800820d, 2019-04-16

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agosunxi: drop NAND ESMT patch from 5.4
Zoltan HERPAI [Fri, 24 Apr 2020 14:47:09 +0000 (16:47 +0200)]
sunxi: drop NAND ESMT patch from 5.4

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agosunxi: add support for NextThing CHIP with Tzatziffy board
Zoltan HERPAI [Fri, 24 Apr 2020 13:57:44 +0000 (15:57 +0200)]
sunxi: add support for NextThing CHIP with Tzatziffy board

Specifications:
SoC R8 @ 1Ghz
DRAM 512MiB DDR3-800E @ 360MHz
NAND 4GB
Power DC 5V @ ~1A, 3.7V Li-Ion battery (Not included)
Storage SD-card via Tzatziffy board

Install method:
Standard sunxi method.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agosunxi: enable NAND on pcDuino3
Zoltan HERPAI [Sun, 25 Aug 2019 20:40:37 +0000 (22:40 +0200)]
sunxi: enable NAND on pcDuino3

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agosunxi: enable NAND on C64mini
Zoltan HERPAI [Wed, 13 Mar 2019 21:34:54 +0000 (22:34 +0100)]
sunxi: enable NAND on C64mini

At the same time, add a patch to support ESMT NANDs correctly,
which is included on the C64mini board.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agosunxi: enable NAND support on 5.4
Zoltan HERPAI [Fri, 24 Apr 2020 13:47:52 +0000 (15:47 +0200)]
sunxi: enable NAND support on 5.4

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agosunxi: add support for Retro Games Limited C=64 Mini (RGL001)
Zoltan HERPAI [Fri, 24 Apr 2020 13:44:01 +0000 (15:44 +0200)]
sunxi: add support for Retro Games Limited C=64 Mini (RGL001)

CPU: Allwinner A20 dual-core Cortex A7
Memory: 256/512Mb
Storage: 128Mb NAND
USB: 2x USB2.0

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agosunxi: add ethernet / PWM patches for H6
Zoltan HERPAI [Fri, 24 Apr 2020 07:42:27 +0000 (09:42 +0200)]
sunxi: add ethernet / PWM patches for H6

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agouboot-sunxi: add separate uEnv for H6-based boards
Zoltan HERPAI [Fri, 24 Apr 2020 07:41:39 +0000 (09:41 +0200)]
uboot-sunxi: add separate uEnv for H6-based boards

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agouboot-sunxi: make a distinction between H6 and A64 ATF builds
Zoltan HERPAI [Fri, 24 Apr 2020 07:38:56 +0000 (09:38 +0200)]
uboot-sunxi: make a distinction between H6 and A64 ATF builds

The A64 and the H6-based boards require a separate build of ATF.
Add a variable to cover this distinction.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agoarm-trusted-firmware-sunxi: enable H6 builds and bump to 20200423
Zoltan HERPAI [Fri, 24 Apr 2020 07:37:22 +0000 (09:37 +0200)]
arm-trusted-firmware-sunxi: enable H6 builds and bump to 20200423

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agoRevert "arm-trusted-firmware-sunxi: bump to v2.3-rc1 and use atf-builds binaries"
Zoltan HERPAI [Thu, 23 Apr 2020 14:48:14 +0000 (16:48 +0200)]
Revert "arm-trusted-firmware-sunxi: bump to v2.3-rc1 and use atf-builds binaries"

This reverts commit 8217b02db0ab3bce9c9f4f61157c034c3560f729.

4 years agouboot-mxs: bump to v2020.04
Michael Heimpold [Sun, 19 Apr 2020 22:21:59 +0000 (00:21 +0200)]
uboot-mxs: bump to v2020.04

Also update the U-Boot BSP patch for I2SE Duckbill devices.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
4 years agosunxi: update device support for H6-based Orange Pi One Plus
Zoltan HERPAI [Thu, 23 Apr 2020 07:47:26 +0000 (09:47 +0200)]
sunxi: update device support for H6-based Orange Pi One Plus

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agoarm-trusted-firmware-sunxi: bump to v2.3-rc1 and use atf-builds binaries
Petr Štetiar [Mon, 20 Apr 2020 14:29:32 +0000 (16:29 +0200)]
arm-trusted-firmware-sunxi: bump to v2.3-rc1 and use atf-builds binaries

Update ATF to latest v2.3-rc1 version and use reproducible bl31 binaries
from atf-builds project.

atf-builds project started recently offering reproducible ATF binaries
which is more convenient then building very tiny ATF artifacts from
scratch during each build, thus saving considerable build resources.  It
has reduced build from scratch time on my CI builder for sunxi/cortexa53
target from 57min down to 29min.

Run tested on a64-olinuxino-emmc.

 U-Boot SPL 2020.04 (Apr 20 2020 - 08:28:05 +0000)
 DRAM: 1024 MiB
 Trying to boot from MMC1
 NOTICE:  BL31: v2.2():v2.3-rc1
 NOTICE:  BL31: Built : 19:20:57, Apr 15 2020
 NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
 NOTICE:  BL31: Found U-Boot DTB at 0x4090dc0, model: Olimex A64-Olinuxino-eMMC

Cc: Zoltan HERPAI <wigyori@uid0.hu>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoriscv64: update image creation dts path
Zoltan HERPAI [Mon, 27 Jan 2020 10:09:52 +0000 (11:09 +0100)]
riscv64: update image creation dts path

4 years agoriscv64: add support for 5.4
Zoltan HERPAI [Sun, 26 Jan 2020 22:47:36 +0000 (23:47 +0100)]
riscv64: add support for 5.4

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agoriscv64: add new port
Zoltan HERPAI [Sun, 16 Dec 2018 10:05:58 +0000 (11:05 +0100)]
riscv64: add new port

RISC-V is a new CPU architecture aimed to be fully free and open. This
target will add support for it, based on 4.19.

Supports running on:
 - HiFive Unleashed (which is the most known devboard for this arch)
 - QEMU (support is available in mainline qemu)
Further devboards are expected given the interest in this new arch.

An SD-card image is generated, where the partitions are required to have
specific type codes. Compared to earlier branches for this target, BBL
support is removed, giving way for OpenSBI.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agofirmware: opensbi: add package for RISC-V
Zoltan HERPAI [Sun, 26 Jan 2020 22:45:48 +0000 (23:45 +0100)]
firmware: opensbi: add package for RISC-V

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agouboot-riscv64: add new package
Zoltan HERPAI [Sun, 26 Jan 2020 22:46:18 +0000 (23:46 +0100)]
uboot-riscv64: add new package

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agopackage: binutils: upgrade to 2.31.1
Zoltan HERPAI [Fri, 4 Jan 2019 13:28:33 +0000 (14:28 +0100)]
package: binutils: upgrade to 2.31.1

Runtime-tested on: mvebu, x86
Compile-tested on: mpc85xx, mvebu, sunxi, x86

Switch to download .xz at the same time.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agostrace: fix build error on riscv64
Zoltan HERPAI [Wed, 15 May 2019 15:22:31 +0000 (17:22 +0200)]
strace: fix build error on riscv64

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agoopenssl: add linux-riscv64 into the targets list
Zoltan HERPAI [Wed, 15 May 2019 15:21:45 +0000 (17:21 +0200)]
openssl: add linux-riscv64 into the targets list

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agotools: add gptfdisk for riscv64 image generation
Zoltan HERPAI [Mon, 20 Aug 2018 21:07:19 +0000 (23:07 +0200)]
tools: add gptfdisk for riscv64 image generation

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agogeneric: groundwork for RISC-V
Zoltan HERPAI [Sun, 16 Dec 2018 09:45:53 +0000 (10:45 +0100)]
generic: groundwork for RISC-V

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agosunxi: add support for Banana Pi M3
Zoltan HERPAI [Thu, 5 Mar 2020 20:54:53 +0000 (21:54 +0100)]
sunxi: add support for Banana Pi M3

CPU: Allwinner A83t Octa-core Cortex A7 @ 1.8GHz
Memory: 2GB DDR3
Storage: SDcard, SATA (via USB), 8GB eMMC
Network: 10/100/1000M ethernet, Ampak AP6212 wifi + BT
USB: 2x USB 2.0

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agouboot-sunxi: add DM_MMC support for Allwinner H6
Zoltan HERPAI [Mon, 26 Aug 2019 08:19:32 +0000 (10:19 +0200)]
uboot-sunxi: add DM_MMC support for Allwinner H6

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agosunxi: add support for H6 boards and OrangePiOnePlus
Zoltan HERPAI [Thu, 5 Mar 2020 20:46:49 +0000 (21:46 +0100)]
sunxi: add support for H6 boards and OrangePiOnePlus

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agomodules: add Allwinner Mali support
Zoltan HERPAI [Mon, 26 Aug 2019 08:24:32 +0000 (10:24 +0200)]
modules: add Allwinner Mali support

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agosuniv: add new target
Zoltan HERPAI [Wed, 13 Mar 2019 23:24:50 +0000 (00:24 +0100)]
suniv: add new target

This is Allwinner's ARM926EJ-S core, which is one of its early
products, reappearing in recent compact designs. The SoC includes
32Mb memory integrated, and has display and USB interfaces,
allowing for small footprint boards.

The target consists of basic 4.19 support, without u-boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agoshmin: add new SH3-target
Zoltan HERPAI [Mon, 26 Aug 2019 15:04:33 +0000 (17:04 +0200)]
shmin: add new SH3-target

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agosh775x: add new SH4 target
Zoltan HERPAI [Mon, 26 Aug 2019 14:37:31 +0000 (16:37 +0200)]
sh775x: add new SH4 target

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agoramips: add support for TP-Link Archer C5 v4
Zoltan HERPAI [Wed, 22 Apr 2020 14:09:45 +0000 (16:09 +0200)]
ramips: add support for TP-Link Archer C5 v4

Based on work in https://github.com/benwht/openwrt, rebased
for trunk.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agoramips: enable RTL8367S on mt7620 devices
Zoltan HERPAI [Wed, 22 Apr 2020 14:09:18 +0000 (16:09 +0200)]
ramips: enable RTL8367S on mt7620 devices

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 years agomediatek: disable the unused pcie port for elecom wrc-2533gent
Felix Fietkau [Thu, 9 Apr 2020 17:57:47 +0000 (19:57 +0200)]
mediatek: disable the unused pcie port for elecom wrc-2533gent

Fixes MSI support for the primary device

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agofstools: update to the latest version
Felix Fietkau [Thu, 9 Apr 2020 12:25:51 +0000 (14:25 +0200)]
fstools: update to the latest version

84965b92f635 blockd: print symlink error code and string message
62c578c22f9d blockd: report "target" path as "mount" for autofs available mounts
d1f1f2b38fa1 block: remove mount target file if it's a link
830441d790d6 blockd: remove symlink linkpath file if it's a dir or link
c80f7002114f libfstools/mtd: attempt to read from OOB data if empty space is found

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agoopenssl: bump to 1.1.1g
Petr Štetiar [Tue, 21 Apr 2020 20:51:20 +0000 (22:51 +0200)]
openssl: bump to 1.1.1g

Fixes NULL dereference in SSL_check_chain() for TLS 1.3, marked with
high severity, assigned CVE-2020-1967.

Ref: https://www.openssl.org/news/secadv/20200421.txt
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agokernel: bump 5.4 to 5.4.34
Petr Štetiar [Tue, 21 Apr 2020 09:09:30 +0000 (11:09 +0200)]
kernel: bump 5.4 to 5.4.34

Refreshed patches.

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

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoimx6: refresh kernel config
Koen Vandeputte [Tue, 21 Apr 2020 12:46:23 +0000 (14:46 +0200)]
imx6: refresh kernel config

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agobase-files: ensure VERBOSE is set
Alexander Couzens [Wed, 13 Nov 2019 17:13:13 +0000 (18:13 +0100)]
base-files: ensure VERBOSE is set

If not set, it shows the following error
sh: out of range

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
4 years agolantiq/fritz 7312: set maximum speed to 100 mbit
Alexander Couzens [Mon, 24 Jun 2019 15:41:22 +0000 (17:41 +0200)]
lantiq/fritz 7312: set maximum speed to 100 mbit

The fritz 7312 does not support 1000 gbit. Advertising it makes it
worse. Some NIC will change to 1000 gibt and turn off and on again for
ever.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
4 years agoubus: update to latest git HEAD
Hans Dedecker [Mon, 20 Apr 2020 19:22:46 +0000 (21:22 +0200)]
ubus: update to latest git HEAD

171469e lua: avoid truncation of large numeric values

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agox86: really remove packages already enabled in kconfig
Daniel Golle [Mon, 20 Apr 2020 18:21:50 +0000 (19:21 +0100)]
x86: really remove packages already enabled in kconfig

This commit really removes packages in geode profiles already enabled
in kernel config.

Fixes: 9c23ecee57 ("x86: move packages selection to profiles")
Reported-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agox86: move packages selection to profiles
Tomasz Maciej Nowak [Mon, 20 Apr 2020 17:46:34 +0000 (19:46 +0200)]
x86: move packages selection to profiles

This can be rather confusing for contributors, since there are three
layers in which they can be added. As for now there are none profiles
other than generic (exception: geos) let's move them to these profiles.
Being here this commit also removes packages in geode profiles already
enabled in kernel config.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agox86: select kmod-button-hotplug by default
Tomasz Maciej Nowak [Mon, 20 Apr 2020 17:46:33 +0000 (19:46 +0200)]
x86: select kmod-button-hotplug by default

This package is useful by all subtargets, therefore move it to default
packages selection.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agox86: fix kmod-forcedeth package selection
Tomasz Maciej Nowak [Mon, 20 Apr 2020 17:46:32 +0000 (19:46 +0200)]
x86: fix kmod-forcedeth package selection

There's no such package as forcedeth, threfore the driver is never
selected. Fix it by properly specifying package name.

Fixes: 35f208d ("x86: add nforce eth to default packages")
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agox86: image: drop dead code
Tomasz Maciej Nowak [Mon, 20 Apr 2020 17:46:31 +0000 (19:46 +0200)]
x86: image: drop dead code

These are remnants of old image generation code, which now serve no
purpose.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agouboot-rockchip: fix ident string
Petr Štetiar [Mon, 20 Apr 2020 14:42:47 +0000 (16:42 +0200)]
uboot-rockchip: fix ident string

Commit 797506011695 ("uboot-rockchip: add new package") has added
`OpenWRT` ident string, fix it to proper `OpenWrt`.

Fixes: 797506011695 ("uboot-rockchip: add new package")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agorockchip: add support for Pine64 RockPro64
Tobias Mädel [Sun, 12 Apr 2020 11:57:25 +0000 (13:57 +0200)]
rockchip: add support for Pine64 RockPro64

This adds the new rockchip target and support for RockPro64 RK3399

Flash:    16 MiB SPI NOR
RAM:      2 GiB/4 GiB LPDDR4
SoC:      RK3399
USB:      2x USB 2.0, 1x USB 3.0, 1x USB-C
Ethernet: 1x GbE
PCIe:     PCIe 2.0, 4 lanes
Storage:  eMMC or SD card
Optional SDIO wifi/bt module

The Pine64 RockPro64 is a single-board-computer with a 4x PCIe connector,
6 ARM64 cores (4 little, 2 big), plenty of RAM and storage.

By default the single Gigabit-Ethernet port is configured as the
LAN port.

Installation of the firware is possible by dd'ing the image
to an SD card or the eMMC flash.

Serial: 3v3 1500000 8n1

U-boot is build from the mainline tree and
integrated into the images. Required ATF to build u-boot
is downloaded from a CI build bot.

Signed-off-by: Tobias Mädel <t.maedel@alfeld.de>
Tested-by: Tobias Schramm <t.schramm@manjaro.org>
4 years agouboot-rockchip: add new package
Tobias Mädel [Sun, 12 Apr 2020 11:53:56 +0000 (13:53 +0200)]
uboot-rockchip: add new package

This package is needed for the rockchip target.

Signed-off-by: Tobias Mädel <t.maedel@alfeld.de>
Tested-by: Tobias Schramm <t.schramm@manjaro.org>
4 years agoarm-trusted-firmware-rockchip: add new package
Tobias Mädel [Sun, 12 Apr 2020 11:51:49 +0000 (13:51 +0200)]
arm-trusted-firmware-rockchip: add new package

This is needed to build the uboot-rockchip, needed for the rockchip target

Signed-off-by: Tobias Mädel <t.maedel@alfeld.de>
Tested-by: Tobias Schramm <t.schramm@manjaro.org>
[replaced `mkdir -p` with INSTALL_DIR variable]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agouboot-kirkwood: update to 2020.04
Pawel Dembicki [Sat, 11 Apr 2020 13:44:14 +0000 (15:44 +0200)]
uboot-kirkwood: update to 2020.04

Update U-Boot to current 2020.04 release for kirkwood platform.

Catch up with upstream and move some configuration options from
the header files to the corresponding defconfig files.

Compile tested: all devices
Run tested: nsa310, pogoplugv4

Tested-by: Cezary Jackiewicz <cezary@eko.one.pl> [nsa310]
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years agokernel: netfilter.mk: fix kmod-ipt-nat6 installation on 5.4
DENG Qingfang [Sun, 19 Apr 2020 11:23:24 +0000 (19:23 +0800)]
kernel: netfilter.mk: fix kmod-ipt-nat6 installation on 5.4

xt_MASQUERADE.ko is picked up by both kmod-ipt-nat and kmod-ipt-nat6, causing
conflict
As kmod-ipt-nat6 already depends on kmod-ipt-nat, remove xt_MASQUERADE from it

Fixes: FS#2924
Fixes: 0fad8af85158 ("kernel: Include xt_MASQUERADE for kernel 5.2 and later")
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agorelayd: bump to version 2020-04-20
Kevin Darbyshire-Bryant [Mon, 20 Apr 2020 08:08:20 +0000 (09:08 +0100)]
relayd: bump to version 2020-04-20

796da66 dhcp.c: improve input validation & length checks

Addresses CVE-2020-11752

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoumdns: update to version 2020-04-20
Kevin Darbyshire-Bryant [Mon, 20 Apr 2020 08:03:52 +0000 (09:03 +0100)]
umdns: update to version 2020-04-20

e74a3f9 dns.c: improve input validation

Addresses CVE-2020-11750

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoramips: mt7621: add NETGEAR R7200 as DEVICE_ALT1
Pawel Dembicki [Wed, 15 Apr 2020 13:43:51 +0000 (15:43 +0200)]
ramips: mt7621: add NETGEAR R7200 as DEVICE_ALT1

Netgear R7200 is another clone of Netgear R6700v2, introduced in:
6e80df5 ("ramips: add support for NETGEAR R6700v2/AC2400")

Reported-by: Joel Pinsker, github user @joelp64
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years agoprocd: fix jail when running on glibc
Daniel Golle [Sun, 19 Apr 2020 22:18:15 +0000 (23:18 +0100)]
procd: fix jail when running on glibc

 d200b70 jail: include /etc/nsswitch.conf in jail for glibc.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoath79: add support for AVM FRITZ!WLAN Repeater 450E
David Bauer [Tue, 14 Apr 2020 01:58:37 +0000 (03:58 +0200)]
ath79: add support for AVM FRITZ!WLAN Repeater 450E

SOC:    Qualcomm QCA9556 (Scorpion) 560MHz MIPS74Kc
RAM:    64MB Zentel A3R12E40CBF DDR2
FLASH:  16MiB Winbond W25Q128 SPI NOR
WLAN1:  QCA9556 2.4 GHz 802.11b/g/n 3x3
INPUT:  WPS button
LED:    Power, WiFi, LAN, RSSI indicator
Serial: Header Next to Black metal shield
        Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V)
        The Serial setting is 115200-8-N-1.

Installation via EVA:
In the first seconds after Power is connected, the bootloader will
listen for FTP connections on 192.168.178.1. Firmware can be uploaded
like following:

  ftp> quote USER adam2
  ftp> quote PASS adam2
  ftp> binary
  ftp> debug
  ftp> passive
  ftp> quote MEDIA FLSH
  ftp> put openwrt-sysupgrade.bin mtd1

Note that this procedure might take up to two minutes.
You need to powercycle the device afterwards to boot OpenWRT.

Tested-by: Andreas Ziegler <dev@andreas-ziegler.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agoramips: replace pinctrl property names for ipTIME A1004ns
Sungbo Eo [Sat, 18 Apr 2020 13:47:34 +0000 (22:47 +0900)]
ramips: replace pinctrl property names for ipTIME A1004ns

The pinctrl driver had been replaced with the upstream one in b756ea2a909a
("ramips: replace pinctrl property names"), but the initial A1004ns support
patch did not reflect the changes. This commit updates its pinctrl property
names.

Fixes: 9169482f640c ("ramips: add support for ipTIME A1004ns")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agotoolchain: glibc: Define minimum support kernel version as 4.14
Hauke Mehrtens [Sat, 18 Apr 2020 18:00:35 +0000 (20:00 +0200)]
toolchain: glibc: Define minimum support kernel version as 4.14

This will compile glibc in a way that it will only support kernel 4.14
and later. Compatibility code for older kernel versions will be removed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agotoolchain: glibc: Update glibc to version 2.31
Hauke Mehrtens [Mon, 16 Mar 2020 14:28:13 +0000 (15:28 +0100)]
toolchain: glibc: Update glibc to version 2.31

This updates glibc to the most recent version 2.31.

001-regex-read-overrun.patch was a backport from a more recent version
and is integrated in glibc 2.31.

050-Revert-Disallow-use-of-DES-encryption-functions-in-n.patch is needed
to add the DES crypto functions back again. They were removed in glibc
2.28, but we still use them in ppp.
musl lib also provides these DES crypto functions. Without them we would
have to link ppp against openssl or an other crypto library.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agodante: Fix compile with glibc
Hauke Mehrtens [Sat, 18 Apr 2020 15:50:03 +0000 (17:50 +0200)]
dante: Fix compile with glibc

When compiled with glibc the config_scan.c wants to use the
cpupolicy2numeric() function which is only available when
HAVE_SCHED_SETSCHEDULER is set. It looks like the wrong define was used here.

This fixes a build problem with glibc in combination with the force
ac_cv_func_sched_setscheduler=no in the OpenWrt CONFIGURE_VARS.

This fixes the following compile error with glibc:
----------------------------------------------------------------------
/bin/ld: config_scan.o: in function `socks_yylex':
dante-1.4.1/sockd/config_scan.l:461: undefined reference to `cpupolicy2numeric'
collect2: error: ld returned 1 exit status
make[5]: *** [Makefile:522: sockd] Error 1

Fixes: aaf46a8fe23e ("dante: disable sched_getscheduler() - not implemented in musl")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agorbcfg: Add missing mode to open call
Hauke Mehrtens [Sat, 18 Apr 2020 15:44:13 +0000 (17:44 +0200)]
rbcfg: Add missing mode to open call

When open() is called with O_CREAT a 3. parameter has to be given with
the file system permissions of the new file.

Not giving this is an error, which results in a compile error with glibc.

This fixes the following compile error with glibc:
----------------------------------------------------------------------
In file included from /include/fcntl.h:329,
                 from main.c:18:
In function 'open',
    inlined from 'rbcfg_update' at main.c:501:7:
/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
    __open_missing_mode ();
    ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoupgs: Remove extra _DEFAULT_SOURCE definition
Hauke Mehrtens [Sat, 18 Apr 2020 15:42:02 +0000 (17:42 +0200)]
upgs: Remove extra _DEFAULT_SOURCE definition

This extra _DEFAULT_SOURCE definition results in a double definition
which is a compile error.

This fixes the following compile error with glibc:
----------------------------------------------------------------------
ugps-2019-06-25-cd7eabcd/nmea.c:19: error: "_DEFAULT_SOURCE" redefined [-Werror]
 #define _DEFAULT_SOURCE

<command-line>: note: this is the location of the previous definition
cc1: all warnings being treated as errors

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agobusybox: backport Remove stime() function calls
Hauke Mehrtens [Mon, 23 Mar 2020 22:22:04 +0000 (23:22 +0100)]
busybox: backport Remove stime() function calls

glibc 2.31 does not provide stime() any more, backport a fix from
current busybox master to avoid using this function.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agobcm63xx: switch to 5.4 kernel
Álvaro Fernández Rojas [Sat, 18 Apr 2020 18:52:56 +0000 (20:52 +0200)]
bcm63xx: switch to 5.4 kernel

Seems stable after 6 days of testing on some of my devices.
Let's switch to 5.4 in order to get more feedback.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agoopenvpn: update to 2.4.9
Magnus Kroken [Fri, 17 Apr 2020 15:34:42 +0000 (17:34 +0200)]
openvpn: update to 2.4.9

This is primarily a maintenance release with bugfixes and improvements.
This release also fixes a security issue (CVE-2020-11810) which allows
disrupting service of a freshly connected client that has not yet
negotiated session keys. The vulnerability cannot be used to
inject or steal VPN traffic.

Release announcement:
https://openvpn.net/community-downloads/#heading-13812
Full list of changes:
https://community.openvpn.net/openvpn/wiki/ChangesInOpenvpn24#OpenVPN2.4.9

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
4 years agobinutils: add ALTERNATIVES for strings (FS#3001)
Hans Dedecker [Sat, 18 Apr 2020 08:34:10 +0000 (10:34 +0200)]
binutils: add ALTERNATIVES for strings (FS#3001)

Don't move strings anymore to /bin/strings to avoid clash with
busybox /usr/bin/strings but move it to /usr/bin/binutils-strings.
Use ALTERNATIVES support to install it as /usr/bin/strings

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agoramips: mt7621: use lzma-loader for newifi d1/d2/thunder timecloud
Chuanhong Guo [Sat, 18 Apr 2020 06:19:38 +0000 (14:19 +0800)]
ramips: mt7621: use lzma-loader for newifi d1/d2/thunder timecloud

These devices failed to properly extract kernel. enable lzma loader
for them.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: don't reuse KERNEL_DTB for lzma-loader
Chuanhong Guo [Sat, 18 Apr 2020 05:40:31 +0000 (13:40 +0800)]
ramips: don't reuse KERNEL_DTB for lzma-loader

mt7621 overrides KERNEL_DTB to limit dictionary size, which isn't needed
for our lzma loader.
This saves 15KB on mt7621 devices using uimage-lzma-loader.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: mt7621: backport more pcie driver fixes
Chuanhong Guo [Sat, 18 Apr 2020 04:51:03 +0000 (12:51 +0800)]
ramips: mt7621: backport more pcie driver fixes

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: increase spi-max-frequency for ipTIME mt7620 devices
Sungbo Eo [Sun, 5 Apr 2020 05:11:34 +0000 (14:11 +0900)]
ramips: increase spi-max-frequency for ipTIME mt7620 devices

This commit increases the hardware SPI frequency from 24.2MHz to 48.3MHz.

[    5.314163] m25p80 spi0.0: speed: 24166666/40000000, rate: 8, prescal: 2, loops: 226
[    5.076323] m25p80 spi0.0: speed: 48333333/50000000, rate: 4, prescal: 1, loops: 162

`time cat /dev/mtd2 >/dev/null` is reduced from 5.64s to 4.36s on A104ns,
and from 11.39s to 8.81s on A1004ns.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agoramips: add support for ipTIME A1004ns
Sungbo Eo [Thu, 26 Sep 2019 15:21:25 +0000 (00:21 +0900)]
ramips: add support for ipTIME A1004ns

ipTIME A1004ns is a 2.4/5GHz band AC750 router, based on MediaTek MT7620A.

Specifications:
- SoC: MT7620A
- RAM: DDR2 128MB
- Flash: SPI NOR 16MB
- WiFi:
  - 2.4GHz: SoC internal
  - 5GHz: MT7610EN
- Ethernet: 5x 10/100/1000Mbps
  - Switch: MT7530BU
- USB: 1x 2.0
- UART:
  - J2: 3.3V, TX, RX, GND (3.3V is the square pad) / 57600 8N1

Installation via web interface:
1.  Flash **initramfs** image through the stock web interface.
2.  Boot into OpenWrt and perform sysupgrade with sysupgrade image.

Revert to stock firmware:
1.  Perform sysupgrade with stock image.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agoramips: mt7621: Ubiquiti ER-X-SFP: fix gpio numbers for POE enable gpios
René van Dorst [Tue, 7 Apr 2020 20:00:20 +0000 (22:00 +0200)]
ramips: mt7621: Ubiquiti ER-X-SFP: fix gpio numbers for POE enable gpios

With v5.4 kernel a new gpio driver is used.
GPIO numbering has changed so update 03_gpio_switches too.

Signed-off-by: René van Dorst <opensource@vdorst.com>
4 years agoramips: mt7621: Ubiquiti ER-X: fix gpio number for POE enable gpio
René van Dorst [Thu, 9 Apr 2020 12:03:13 +0000 (14:03 +0200)]
ramips: mt7621: Ubiquiti ER-X: fix gpio number for POE enable gpio

With v5.4 kernel a new gpio driver is used.
GPIO numbering has changed so update 03_gpio_switches too.

Signed-off-by: René van Dorst <opensource@vdorst.com>
4 years agoramips: use all reserved space for HiWiFi HC5962
DENG Qingfang [Mon, 6 Apr 2020 05:17:47 +0000 (13:17 +0800)]
ramips: use all reserved space for HiWiFi HC5962

These stock partitons: "backup", "hw_panic", "overly", firmware_backup", "opt"
do not contain any device-specific data and can be used for /overlay, resulting in
121M space

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: increase HiWiFi HC5962 kernel partition to 4M
DENG Qingfang [Mon, 6 Apr 2020 05:17:43 +0000 (13:17 +0800)]
ramips: increase HiWiFi HC5962 kernel partition to 4M

Increase kernel partition because 2M is insufficient for 5.4
Because the partition changes, previous version of OpenWrt cannot upgrade
to this version, and requires a new installation

Recovery to stock instruction:
1. Download stock firmware at
   http://ur.ikcd.net/HC5962-sysupgrade-20171221-b00a04d1.bin
2. Power off the router
3. Press and hold the reset button for 4~6 sec while power it back on
4. Connect a PC to router's LAN
5. Visit http://192.168.2.1 and upload the firmware

Then repeat the instruction in edae3479e64e to install OpenWrt

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agogeneric: spi-nor: fix 4-byte opcode support for w25q256
Mantas Pucka [Thu, 16 Apr 2020 06:40:49 +0000 (09:40 +0300)]
generic: spi-nor: fix 4-byte opcode support for w25q256

There are 2 different chips (w25q256fv and w25q256jv) that share
the same JEDEC ID. Only w25q256jv fully supports 4-byte opcodes.
Use SFDP header version to differentiate between them.

Fixes broken reboot on 8devices Habanero since f0f35fdac

Signed-off-by: Mantas Pucka <mantas@8devices.com>
4 years agombedtls: update to 2.16.6
Magnus Kroken [Thu, 16 Apr 2020 15:47:47 +0000 (17:47 +0200)]
mbedtls: update to 2.16.6

Security fixes for:
* CVE-2020-10932
* a potentially remotely exploitable buffer overread in a DTLS client
* bug in DTLS handling of new associations with the same parameters

Full release announement:
https://tls.mbed.org/tech-updates/releases/mbedtls-2.16.6-and-2.7.15-released

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
4 years agokernel: bump 5.4 to 5.4.33
Petr Štetiar [Fri, 17 Apr 2020 12:29:33 +0000 (14:29 +0200)]
kernel: bump 5.4 to 5.4.33

Refreshed patches, removed upstreamed patches:

 oxnas: 001-irqchip-versatile-fpga-Handle-chained-IRQs-properly.patch
 oxnas: 002-irqchip-versatile-fpga-Apply-clear-mask-earlier.patch

Run tested: qemu-x86-64, apalis
Build tested: x86/64, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agomac80211: make sure existing iface belongs to correct (fullmac) phy
Daniel Golle [Fri, 17 Apr 2020 12:11:11 +0000 (13:11 +0100)]
mac80211: make sure existing iface belongs to correct (fullmac) phy

Some FullMAC cfg80211 wireless devices do not support virtual
interfaces, hence there is script logic to keep the existing network
device. Improve this to support renaming the interface if needed and
make sure the existing interface actually belongs to the right phy.
Change calls to 'iw' to avoid outputing warnings and errors to not
confuse users of such devices.

Also bump PKG_RELEASE which has been forgotten in the previous two
mac80211 changes.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoath79: remove stray pipe
David Bauer [Fri, 17 Apr 2020 12:15:06 +0000 (14:15 +0200)]
ath79: remove stray pipe

Fixes: 8918c038f330 ("ath79: add support for AVM FRITZ!WLAN Repeater 1750E")
Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agoelfutils: aarch64 fix build on musl
Lucian Cristian [Fri, 17 Apr 2020 10:04:37 +0000 (13:04 +0300)]
elfutils: aarch64 fix build on musl

aarch64_initreg.c: In function 'aarch64_set_initial_registers_tid':
aarch64_initreg.c:85:37: error: invalid operands to binary & (have 'long double' and 'unsigned int')
     dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF;
                      ~~~~~~~~~~~~~~ ^

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
4 years agouboot-sunxi: bump to 2020.04 relase
Petr Štetiar [Tue, 14 Apr 2020 21:30:56 +0000 (23:30 +0200)]
uboot-sunxi: bump to 2020.04 relase

Refreshed patches, removed upstreamed patch:

 260-configs-a64-olinuxino-emmc-add-eMMC-boot-part-config.patch

Boot tested on a64-olinuxino-emmc.

Cc: Zoltan HERPAI <wigyori@uid0.hu>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agouboot-imx6: bump to 2020.04 release
Petr Štetiar [Tue, 14 Apr 2020 21:21:19 +0000 (23:21 +0200)]
uboot-imx6: bump to 2020.04 release

Refreshed all patches, run tested on apalis.

Cc: Vladimir Vid <vladimir.vid@sartura.hr>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agomac80211: drop data frames without key on encrypted links
David Bauer [Thu, 16 Apr 2020 19:30:27 +0000 (21:30 +0200)]
mac80211: drop data frames without key on encrypted links

If we know that we have an encrypted link (based on having had
a key configured for TX in the past) then drop all data frames
in the key selection handler if there's no key anymore.

This fixes an issue with mac80211 internal TXQs - there we can
buffer frames for an encrypted link, but then if the key is no
longer there when they're dequeued, the frames are sent without
encryption. This happens if a station is disconnected while the
frames are still on the TXQ.

Detecting that a link should be encrypted based on a first key
having been configured for TX is fine as there are no use cases
for a connection going from with encryption to no encryption.
With extended key IDs, however, there is a case of having a key
configured for only decryption, so we can't just trigger this
behaviour on a key being configured.

Cc: stable@vger.kernel.org
Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agoath79: add support for AVM FRITZ!WLAN Repeater 1750E
David Bauer [Sun, 12 Apr 2020 11:33:01 +0000 (13:33 +0200)]
ath79: add support for AVM FRITZ!WLAN Repeater 1750E

This commit adds support for the AVM Fritz!WLAN Repeater 1750E

SOC: Qualcomm QCA9556 (Scorpion) 720MHz MIPS74Kc
RAM:    64MB Zentel A3R12E40CBF DDR2
FLASH:  16MiB Winbond W25Q128 SPI NOR
WLAN1:  QCA9556 2.4 GHz 802.11b/g/n 3x3
WLAN2:  QCA9880 5 GHz 802.11 n/ac 3x3
INPUT:  WPS button
LED:    Power, WiFi, LAN, RSSI indicator
Serial: Header Next to Black metal shield
        Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V)
        The Serial setting is 115200-8-N-1.

Tested and working:
 - Ethernet
 - 2.4 GHz WiFi (correct MAC)
 - 5 GHz WiFi (correct MAC)
 - Installation via EVA bootloader
 - OpenWRT sysupgrade
 - Buttons
 - LEDs

Installation via EVA:
In the first seconds after Power is connected, the bootloader will
listen for FTP connections on 192.168.178.1. Firmware can be uploaded
like following:

  ftp> quote USER adam2
  ftp> quote PASS adam2
  ftp> binary
  ftp> debug
  ftp> passive
  ftp> quote MEDIA FLSH
  ftp> put openwrt-sysupgrade.bin mtd1

Note that this procedure might take up to two minutes.
You need to powercycle the Device afterwards to boot OpenWRT.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agoath79: add QCA9550 reset sequence
David Bauer [Sun, 12 Apr 2020 11:03:31 +0000 (13:03 +0200)]
ath79: add QCA9550 reset sequence

The QCA9550 family of SoCs have a slightly different reset
sequence compared to older chips.

Normally the bootloader performs this sequence, however
some bootloader implementation expect the operating system
to clear the reset. Also get the PCIe resets from OF to
support the second RC of the QCA9558.

This is required for the AVM FRITZ!WLAN Repeater 1750E to work,
as EVA leaves the PCIe bus in reset.

Tested: AVM FRITZ!WLAN Repeater 1750E - OCEDO Koala

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agomac80211: fix detecting existing interface
Daniel Golle [Fri, 17 Apr 2020 10:33:40 +0000 (11:33 +0100)]
mac80211: fix detecting existing interface

Instead of using the actual interface name, a hard-coded 'wlan0' has
slipped into the script. Replace it.

Fixes: ccf2aa9d4b ("mac80211: detect existing interface before adding")
Reported-by: John Crispin <john@phrozen.org>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agokernel: add support for GD25D05 SPI NOR (5.4)
Koen Vandeputte [Thu, 16 Apr 2020 12:35:48 +0000 (14:35 +0200)]
kernel: add support for GD25D05 SPI NOR (5.4)

This chip is used on newer RB912UAG-5HPnD r2 and 922UAGS-5HPacD boards:

Before:

[    0.824562] spi-nor spi0.0: unrecognized JEDEC id bytes: c8 40 10 c8 40 10
[    0.831607] spi-nor: probe of spi0.0 failed with error -2

After:

[    0.825347] spi-nor spi0.0: gd25d05 (64 Kbytes)
[    0.830291] 1 routerbootpart partitions found on MTD device spi0.0
[    0.836577] Creating 1 MTD partitions on "spi0.0":
[    0.841448] 0x000000000000-0x000000010000 : "partitions"
[    0.848418] 4 routerbootpart partitions found on MTD device partitions
[    0.855092] Creating 4 MTD partitions on "partitions":
[    0.860318] 0x000000000000-0x00000000c000 : "routerboot"
[    0.866548] 0x00000000c000-0x00000000d000 : "hard_config"
[    0.872832] 0x00000000d000-0x00000000e000 : "bios"
[    0.878580] 0x00000000e000-0x00000000f000 : "soft_config"

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agoath79: reduce spi-max-frequency for Mikrotik wAP G-5HacT2HnD
Roger Pueyo Centelles [Wed, 8 Apr 2020 08:37:52 +0000 (10:37 +0200)]
ath79: reduce spi-max-frequency for Mikrotik wAP G-5HacT2HnD

The previous spi-max-frequency value did not work with all the CPU speed
settings (configurable with rbcfg or from the stock firmware); the new
one does for the three of them.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
4 years agoath79: MikroTik: fix missing nand on kernel 5.4
Koen Vandeputte [Thu, 16 Apr 2020 10:21:52 +0000 (12:21 +0200)]
ath79: MikroTik: fix missing nand on kernel 5.4

Following symbol got renamed upstream:
CONFIG_MTD_NAND --> CONFIG_MTD_RAW_NAND

Also add this renamed symbol so NAND also works on kernel 5.4.

After:
[    0.628372] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    0.634862] nand: Samsung NAND 128MiB 3,3V 8-bit
[    0.639554] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.647263] Scanning device for bad blocks
[    0.656228] random: fast init done
[    0.789652] 3 fixed-partitions partitions found on MTD device ar934x-nand
[    0.796550] Creating 3 MTD partitions on "ar934x-nand":
[    0.801874] 0x000000000000-0x000000040000 : "booter"
[    0.807715] 0x000000040000-0x000000400000 : "kernel"
[    0.813551] 0x000000400000-0x000008000000 : "ubi"

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agokernel: bump 4.19 to 4.19.115
Koen Vandeputte [Wed, 15 Apr 2020 13:11:54 +0000 (15:11 +0200)]
kernel: bump 4.19 to 4.19.115

Refreshed all patches.

Remove upstreamed:
- 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch
- 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch

Fixes:
- CVE-2020-8647
- CVE-2020-8648 (potentially)
- CVE-2020-8649

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agokernel: bump 4.14 to 4.14.176
Koen Vandeputte [Wed, 15 Apr 2020 12:31:12 +0000 (14:31 +0200)]
kernel: bump 4.14 to 4.14.176

Refreshed all patches.

Remove upstreamed:
- 0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch
- 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch
- 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch

Fixes:
- CVE-2020-8648 (potentially)
- CVE-2020-8647
- CVE-2020-8649

Compile-tested on: cns3xxx, octeontx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agoath79: improve status LED definitions for GL-AR750
Hannu Nyman [Wed, 15 Apr 2020 20:05:27 +0000 (23:05 +0300)]
ath79: improve status LED definitions for GL-AR750

Improve the status LED functionality in GL-AR750
by adding the definitions for different statuses
(boot, failsafe, running, flashing).

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>