oweals/openwrt.git
3 years agoramips: fix port display for TRENDnet TEW-810DR
J. Scott Heppler [Fri, 12 Jun 2020 16:04:15 +0000 (18:04 +0200)]
ramips: fix port display for TRENDnet TEW-810DR

This updates the display port order for the TEW-810DR to be in line
with the DIR-810L. Both share the same board and pictures on the
vendors' pages indicate the same external numbering scheme as well.

Signed-off-by: J. Scott Heppler <shep971@centurylink.net>
[replace commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: mt7621: add support for NETGEAR WAC104
Pawel Dembicki [Tue, 9 Jun 2020 13:16:35 +0000 (15:16 +0200)]
ramips: mt7621: add support for NETGEAR WAC104

NETGEAR WAC104 is an AP based on castrated R6220, without WAN
port and USB.

SoC: MediaTek MT7621ST
RAM: 128M DDR3
FLASH: 128M NAND
WiFi: MediaTek MT7612EN an+ac
MediaTek MT7603EN bgn
ETH: MediaTek MT7621ST (4x LAN)
BTN: 1x Connect (WPS), 1x WLAN, 1x Reset
LED: 7x (3x GPIO controlled)

Installation:

Login to netgear webinterface and flash factory.img

Back to stock:

Use nmrpflash to revert stock image.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
3 years agoath79: add support for D-Link DAP-2695-A1
Stijn Tintel [Sun, 7 Jun 2020 23:11:34 +0000 (02:11 +0300)]
ath79: add support for D-Link DAP-2695-A1

Hardware:
* SoC: Qualcomm Atheros QCA9558
* RAM: 256MB
* Flash: 16MB SPI NOR
* Ethernet: 2x 10/100/1000 (1x 802.3at PoE-PD)
* WiFi 2.4GHz: Qualcomm Atheros QCA9558
* WiFi 5GHz: Qualcomm Ahteros QCA9880-2R4E
* LEDS: 1x 5GHz, 1x 2.4GHz, 1x LAN1(POE), 1x LAN2, 1x POWER
* Buttons: 1x RESET
* UART: 1x RJ45 RS-232 Console port

Installation via stock firmware:
* Install the factory image via the stock firmware web interface

Installation via bootloader Emergency Web Server:
* Connect your PC to the LAN1(PoE) port
* Configure your PC with IP address 192.168.0.90
* Open a serial console to the Console port (115200,8n1)
* Press "q" within 2s when "press 'q' to stop autoboot" appears
* Open http://192.168.0.50 in a browser
* Upload either the factory or the sysupgrade image
* Once you see "write image into flash...OK,dest addr=0x9f070000" you
  can power-cycle the device. Ignore "checksum bad" messages.

Setting the MAC addresses for the ethernet interfaces via
/etc/board.d/02_network adds the following snippets to
/etc/config/network:

config device 'lan_eth0_1_dev'
        option name 'eth0.1'
        option macaddr 'xx:xx:xx:xx:xx:xx'

config device 'wan_eth1_2_dev'
        option name 'eth1.2'
        option macaddr 'xx:xx:xx:xx:xx:xx'

This would result in the proper MAC addresses being set for the VLAN
subinterfaces, but the parent interfaces would still have a random MAC
address. Using untagged VLANs could solve this, but would still leave
those extra snippets in /etc/config/network, and then the device VLAN
setup would differ from the one used in ar71xx. Therefore, the MAC
addresses of the ethernet interfaces are being set via preinit instead.

The bdcfg partition contains 4 MAC address labels:
 - lanmac
 - wanmac
 - wlanmac
 - wlanmac_a

The first 3 all contain the same MAC address, which is also the one on
the label.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: enable wrgg MTD splitter
Stijn Tintel [Sun, 7 Jun 2020 22:46:26 +0000 (01:46 +0300)]
ath79: enable wrgg MTD splitter

This is required for the D-Link DAP-2695-A1.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agomtd: enable wrgg support for ath79
Stijn Tintel [Sun, 7 Jun 2020 22:44:42 +0000 (01:44 +0300)]
mtd: enable wrgg support for ath79

This is required for the D-Link DAP-2695-A1.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agoodhcpd: remove bogus IPKG_INSTROOT reference
Kevin Darbyshire-Bryant [Wed, 10 Jun 2020 16:27:27 +0000 (17:27 +0100)]
odhcpd: remove bogus IPKG_INSTROOT reference

IPKG_INSTROOT is only set under image builder and we won't be running
this script at build time either, so remove the reference before it gets
cargo-culted into other scripts.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Acked-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agokernel: rtl8367b: fix external interface modes
INAGAKI Hiroshi [Mon, 30 Mar 2020 06:47:44 +0000 (15:47 +0900)]
kernel: rtl8367b: fix external interface modes

The interface mode number of RGMII_33V is 7 on RTL8367, but it's 9 on
RTL8367B.

the external interface modes for RTL8367 are follows:

- 0, Disabled
- 1, RGMII
- 2, MII_MAC
- 3, MII_PHY
- 4, TMII_MAC
- 5, TMII_PHY
- 6, GMII
- 7, RGMII_33V

the external interface modes for RTL8367B are follows:

- 0, Disabled
- 1, RGMII
- 2, MII_MAC
- 3, MII_PHY
- 4, TMII_MAC
- 5, TMII_PHY
- 6, GMII
- 7, RMII_MAC
- 8, RMII_PHY
- 9, RGMII_33V

But the driver in U-Boot of RT-N56U GPL tar blocks using RGMII_33V (9)
mode and it seems to be unsupported on RTL8367B, so drop it from
switch-case in rtl8367b_extif_set_mode.

ref (RTL8367):

- TL-WR2453ND v1

ref (RTL8367B):

- ASUS RT-N56U
- TP-Link Archer C2 v1

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agoimagebuilder: Remove json_info_files/ before build
Paul Spooren [Tue, 9 Jun 2020 04:15:05 +0000 (18:15 -1000)]
imagebuilder: Remove json_info_files/ before build

The folder `json_info_files` contains multiple JSON files which describe
created firmware images. The folder is not removed between builds as the
ImageBuilder does not use `image.mk`.

Not removing the JSON files result in a merged `profiles.json` file
containing entries for outdated or non-existing images.

This commit adds the `json_info_files/` cleanup step to the ImageBuilder
Makefile.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoimagebuilder: pass IB=1 on checking requirements
Paul Spooren [Wed, 10 Jun 2020 02:24:29 +0000 (22:24 -0400)]
imagebuilder: pass IB=1 on checking requirements

The patch 4a1a58a3  build, imagebuilder: Do not require libncurses-dev
was supposed to remove libncurses as a requirement for the ImageBuilder.
However as the IB=1 is only exported during building, not for checking
requirements, it did never actually work.

This commit export IB=1 to the requirement check.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoramips: fix port display for D-Link DIR-810L
Adrian Schmutzler [Tue, 9 Jun 2020 10:01:43 +0000 (12:01 +0200)]
ramips: fix port display for D-Link DIR-810L

The port order displayed in LuCI is currently inverted for this
devices:

LuCI - Device
LAN1 - LAN4
LAN2 - LAN3
LAN3 - LAN2
LAN4 - LAN1

Fix it.

Strangely, the owner of a TRENDnet TEW-810DR reports that the
initial port order is correct, while both devices share the
same board and look similar from the outside. Since I cannot
investigate this without having any of the devices, this does
only touch the DIR-810L for now.

While at it, also merge in the case for zbtlink,zbt-we2026, as
the display port specified for WAN there won't have any effect
anyway.

Reported-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobcm63xx: switch to upstream NAND patches
Álvaro Fernández Rojas [Thu, 11 Jun 2020 07:07:04 +0000 (09:07 +0200)]
bcm63xx: switch to upstream NAND patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoramips: fix WAN LED for D-Link DIR-810L/TRENDnet TEW-810DR
Adrian Schmutzler [Tue, 9 Jun 2020 09:52:26 +0000 (11:52 +0200)]
ramips: fix WAN LED for D-Link DIR-810L/TRENDnet TEW-810DR

The WAN LED on DIR-810L was actually blinking on LAN1 port
activity. This has already been improved for the TEW-810DR, where
the GPIO has been set up explicitly rather than having it controlled
by the switch.

This patch also applies this setup to the DIR-810L.

In addition, the trigger in 01_leds is set up with
ucidef_set_led_switch for both devices now, so state changes should
be displayed correctly as well.

Reported-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> [DIR-810L]
Tested-by: J. Scott Heppler <shep971@centurylink.net> [TEW-810DR]
3 years agosoloscli: fix uci-defaults file
Adrian Schmutzler [Sat, 6 Jun 2020 21:09:59 +0000 (23:09 +0200)]
soloscli: fix uci-defaults file

The folder for the uci-defaults file of this package is wrong, so
the file most probably has not been executed at all for several
years at least.

Fix the folder and remove the useless shebang for the file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoapm821xx: move device definitions to subfiles
Adrian Schmutzler [Sun, 7 Jun 2020 11:13:46 +0000 (13:13 +0200)]
apm821xx: move device definitions to subfiles

With several subtargets, the image/Makefile becomes crowded after a
while. Many targets have moved their device definitions to $subtarget.mk
files to have them more organized, let's do this here as well.

While at it, also move subtarget-specific build recipes.

Cc: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Christian Lamparter <chunkeey@gmail.com>
3 years agotreewide: simplify inclusion of subtarget image files
Adrian Schmutzler [Sun, 7 Jun 2020 11:11:15 +0000 (13:11 +0200)]
treewide: simplify inclusion of subtarget image files

Many target use a repetitive if-include scheme for their subtarget
image files, though their names are consistent with the subtarget
names.

This patch removes these redundant conditions and just uses the
variable for the include where the target setup allows it.

For sunxi, this includes a trivial rename of the subtarget image
Makefiles.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: add support for the Netgear WNDRMAC v1
Renaud Lepage [Sun, 10 May 2020 22:10:20 +0000 (15:10 -0700)]
ath79: add support for the Netgear WNDRMAC v1

The Netgear WNDRMAC v1 is a hardware variant of the Netgear WNDR3700 v2

Specifications
==============
* SoC: Atheros AR7161
* RAM: 64mb
* Flash on board: 16mb
* WiFi: Atheros AR9220 (a/n), Atheros AR9223 (b/g/n)
* Ethernet: RealTek RTL8366SR (1xWAN, 4xLAN, Gigabit)
* Power: 12 VDC, 2.5 A
* Full specs on [openwrt.org](https://openwrt.org/toh/hwdata/netgear/netgear_wndrmac_v1)

Flash Instructions
==================
It is possible to use the OEM Upgrade page to install the `factory`
variant of the firmware.

After the initial upgrade, you will need to telnet into the router
(default IP 192.168.1.1) to install anything. You may install LuCI
this way. At this point, you will have a web interface to configure
OpenWRT on the WNDRMAC v1.

Please use the `sysupgrade` variant for subsequent flashes.

Recovery Instructions
=====================
A TFTP-based recovery flash is possible if the need arises. Please refer
to the WNDR3700 page on openwrt.org for details.

https://openwrt.org/toh/netgear/wndr3700#troubleshooting_and_recovery

Signed-off-by: Renaud Lepage <root@cybikbase.com>
[update DTSI include name]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: add support for the Netgear WNDRMAC v2
Renaud Lepage [Sun, 10 May 2020 23:05:20 +0000 (16:05 -0700)]
ath79: add support for the Netgear WNDRMAC v2

The Netgear WNDRMAC v2 is a hardware variant of the Netgear WNDR3800

Specifications
==============
* SoC: Atheros AR7161
* RAM: 128mb
* Flash on board: 16mb
* WiFi: Atheros AR9220 (a/n), Atheros AR9223 (b/g/n)
* Ethernet: RealTek RTL8366SR (1xWAN, 4xLAN, Gigabit)
* Serial console: Yes, 115200 / 8N1 (JTAG)
* USB: 1x2.0
* Power: 12 VDC, 2.5 A
* Full specs on [openwrt.org](https://openwrt.org/toh/hwdata/netgear/netgear_wndrmac_v2)

Flash Instructions
==================
It is possible to use the OEM Upgrade page to install the `factory`
variant of the firmware.

After the initial upgrade, you will need to telnet into the router
(default IP 192.168.1.1) to install anything. You may install LuCI
this way. At this point, you will have a web interface to configure
OpenWRT on the WNDRMAC v2.

Please use the `sysupgrade` variant for subsequent flashes.

Recovery Instructions
=====================
A TFTP-based recovery flash is possible if the need arises. Please refer
to the WNDR3800 page on openwrt.org for details.

https://openwrt.org/toh/netgear/wndr3800#recovery_flash_in_failsafe_mode

Signed-off-by: Renaud Lepage <root@cybikbase.com>
[do not add device to uboot-envtools, update DTSI name]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: rename DTSI for Netgear WNDR devices based on ar7161
Adrian Schmutzler [Wed, 10 Jun 2020 14:58:46 +0000 (16:58 +0200)]
ath79: rename DTSI for Netgear WNDR devices based on ar7161

This renames the DTSI for Netgear WNDR devices based on ar7161 to
indicate that the file is not limited to WNDR3700 models.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: limit uci commit to the changed config file
Adrian Schmutzler [Wed, 10 Jun 2020 14:43:17 +0000 (16:43 +0200)]
ramips: limit uci commit to the changed config file

Since 01_enable_packet_steering only touches the network config,
limit the uci commit to this as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: use amber LED for boot/failsafe on Netgear EX3700/EX6130
Adrian Schmutzler [Tue, 9 Jun 2020 10:51:32 +0000 (12:51 +0200)]
ramips: use amber LED for boot/failsafe on Netgear EX3700/EX6130

According to the manual, the amber power LED is used to indicate boot,
while the green LED is meant to indicate a running system.

While at it, also adjust the DT node names for all LEDs.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: add support for Netgear EX6120
Adrian Schmutzler [Tue, 9 Jun 2020 10:31:57 +0000 (12:31 +0200)]
ramips: add support for Netgear EX6120

Specifications:
* SoC: MT7620A
* CPU: 580 MHz
* RAM: 64 MB DDR
* Flash: 8MB NOR SPI flash
* WiFi: MT7612E (5GHz) and builtin MT7620A (2.4GHz)
* LAN: 1x100M

The device is identical to the EX6130 except
for the mains socket and the hardware ID.

Installation:
The -factory images can be flashed from the
device's web interface or via nmrpflash.

Notes:
MAC addresses were set up based on the EX6130 setup.

This is based on prior work of Adam Serbinski and Mathias Buchwald.

Tested by Mathias Buchwald.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: add mt7621 ethernet driver improvements
Felix Fietkau [Mon, 8 Jun 2020 17:00:02 +0000 (19:00 +0200)]
ramips: add mt7621 ethernet driver improvements

- Speed up MDIO bus access
- Improve performance on tx completion

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agokernel: backport upstream DSA GRO support
Felix Fietkau [Mon, 8 Jun 2020 14:57:43 +0000 (16:57 +0200)]
kernel: backport upstream DSA GRO support

Should improve performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agoramips: enable packet steering by default on mt7621
Felix Fietkau [Sun, 7 Jun 2020 19:19:49 +0000 (21:19 +0200)]
ramips: enable packet steering by default on mt7621

It provides a significant performance boost, especially with flow offloading
enabled

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agonetifd: disable receive packet steering for DSA slave devices
Felix Fietkau [Mon, 8 Jun 2020 14:30:47 +0000 (16:30 +0200)]
netifd: disable receive packet steering for DSA slave devices

It is already handled on the master device. Doing it twice reduces
performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomt76: enable hostapd 802.11ax support if kmod-mt7915e is selected
Felix Fietkau [Sun, 7 Jun 2020 19:18:01 +0000 (21:18 +0200)]
mt76: enable hostapd 802.11ax support if kmod-mt7915e is selected

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agohostapd: add config symbol for allowing drivers to enable 802.11ax support
Felix Fietkau [Sun, 7 Jun 2020 19:15:54 +0000 (21:15 +0200)]
hostapd: add config symbol for allowing drivers to enable 802.11ax support

Also expose a build feature for it

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agoath79: wndr3700 series: fix wifi range & throughput
Christian Lamparter [Sun, 7 Jun 2020 20:57:46 +0000 (22:57 +0200)]
ath79: wndr3700 series: fix wifi range & throughput

This patch adds ar71xx's GPIO setup for the 2.4GHz and 5GHz antennae
demultiplexer:

| 158         /* 2.4 GHz uses the first fixed antenna group (1, 0, 1, 0) */
| 159         ap9x_pci_setup_wmac_gpio(0, (0xf << 6), (0xa << 6));
| 160
| 161         /* 5 GHz uses the second fixed antenna group (0, 1, 1, 0) */
| 162         ap9x_pci_setup_wmac_gpio(1, (0xf << 6), (0x6 << 6));

This should restore the range and throughput of the 2.4GHz radio
on all the derived wndr3700 variants and versions with the AR7161 SoC.
A special case is the 5GHz radio. The original wndr3700(v1) will
benefit from this change. However the wndr3700v2 and later revisions
were unaffected by the missing bits, as there is no demultiplexer
present in the later designs.

This patch uses gpio-hogs within the device-tree for all
wndr3700/wndr3800/wndrmac variants.

Notes:

Based on the PCB pictures, the WNDR3700(v1) really had eight
independent antennae. Four antennae for each radio and all of
those were printed on the circut board.

The WNDR3700v2 and later have just six antennae. Four of those
are printed on the circuit board and serve the 2.4GHz radio.
Whereas the remaining two are special 5GHz Rayspan Patch Antennae
which are directly connected to the 5GHz radio.

Hannu Nyman dug pretty deep and unearthed a treasure of information
regarding the history of how these values came to be in the OpenWrt
archives: <https://dev.archive.openwrt.org/ticket/6533.html>.

Mark Mentovai came across the fixed antenna group when he was looking
into the driver:

    fixed_antenna_group 1, (0, 1, 0, 1)
    fixed_antenna_group 2, (0, 1, 1, 0)
    fixed_antenna_group 3, (1, 0, 0, 1)
    fixed_antenna_group 4, (1, 0, 1, 0)

Fixes: FS#3088

Reported-by: Luca Bensi
Reported-by: Maciej Mazur
Reported-by: Hannu Nyman <hannu.nyman@iki.fi>
Debugged-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
3 years agoca-certificates: update to version 20200601
Christian Lamparter [Sun, 7 Jun 2020 15:22:02 +0000 (17:22 +0200)]
ca-certificates: update to version 20200601

This patch updates the ca-certificates and ca-bundle package.
This version changed the files directory again, to work/, so
PKG_BUILD_DIR was brought back.

A list of changes from Debian's change-log entry for 20200601 [0]:

  * mozilla/{certdata.txt,nssckbi.h}:
    Update Mozilla certificate authority bundle to version 2.40.
    Closes: #956411, #955038
  * mozilla/blacklist.txt
    Add distrusted Symantec CA list to blacklist for explicit removal.
    Closes: #911289
    Blacklist expired root certificate, "AddTrust External Root"
    Closes: #961907
    The following certificate authorities were added (+):
    + "Certigna Root CA"
    + "emSign ECC Root CA - C3"
    + "emSign ECC Root CA - G3"
    + "emSign Root CA - C1"
    + "emSign Root CA - G1"
    + "Entrust Root Certification Authority - G4"
    + "GTS Root R1"
    + "GTS Root R2"
    + "GTS Root R3"
    + "GTS Root R4"
    + "Hongkong Post Root CA 3"
    + "UCA Extended Validation Root"
    + "UCA Global G2 Root"
    The following certificate authorities were removed (-):
    - "AddTrust External Root"
    - "Certinomis - Root CA"
    - "Certplus Class 2 Primary CA"
    - "Deutsche Telekom Root CA 2"
    - "GeoTrust Global CA"
    - "GeoTrust Primary Certification Authority"
    - "GeoTrust Primary Certification Authority - G2"
    - "GeoTrust Primary Certification Authority - G3"
    - "GeoTrust Universal CA"
    - "thawte Primary Root CA"
    - "thawte Primary Root CA - G2"
    - "thawte Primary Root CA - G3"
    - "VeriSign Class 3 Public Primary Certification Authority - G4"
    - "VeriSign Class 3 Public Primary Certification Authority - G5"
    - "VeriSign Universal Root Certification Authority"

[0] <https://metadata.ftp-master.debian.org/changelogs//main/c/ca-certificates/ca-certificates_20200601_changelog>

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
3 years agooxnas: build with 8021Q VLAN support
Daniel Golle [Tue, 9 Jun 2020 15:44:23 +0000 (16:44 +0100)]
oxnas: build with 8021Q VLAN support

CONFIG_VLAN_8021Q was explicitely disabled in oxnas kernel config.
Don't do that, so VLANs can be used on the target.

Fixes: dcc34574ef ("oxnas: bring in new oxnas target")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agokernel: bump 5.4 to 5.4.45
Petr Štetiar [Tue, 9 Jun 2020 12:18:25 +0000 (14:18 +0200)]
kernel: bump 5.4 to 5.4.45

Fixes CVE-2020-10757 via upstream commit df4988aa1c96 ("mm: Fix mremap
not considering huge pmd devmap").

Resolved merge conflict in the following patches:

 bcm27xx: 950-0128-gpiolib-Don-t-prevent-IRQ-usage-of-output-GPIOs.patch

Refreshed patches, removed upstreamed patch:

 generic: 751-v5.8-net-dsa-mt7530-set-CPU-port-to-fallback-mode.patch
 generic: 754-v5.7-net-dsa-mt7530-fix-roaming-from-DSA-user-ports.patch

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

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agohostapd: update to latest Git hostap_2_9-1331-g5a8b366233f5
Petr Štetiar [Mon, 8 Jun 2020 15:35:32 +0000 (17:35 +0200)]
hostapd: update to latest Git hostap_2_9-1331-g5a8b366233f5

Bump to latest Git and refresh all patches in order to get fix for "UPnP
SUBSCRIBE misbehavior in hostapd WPS AP" (CVE-2020-12695).

 General security vulnerability in the way the callback URLs in the UPnP
 SUBSCRIBE command are used were reported (VU#339275, CVE-2020-12695).
 Some of the described issues may be applicable to the use of UPnP in WPS
 AP mode functionality for supporting external registrars.

Ref: https://w1.fi/security/2020-1/
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agoramips: erx and erx-sfp: fix missing WAN interface
Perry Melange [Sun, 26 Apr 2020 08:51:33 +0000 (10:51 +0200)]
ramips: erx and erx-sfp: fix missing WAN interface

This partially reverts commit 5acd1ed0be0d ("ramips: mt7621: fix
Ubiquiti ER-X ports names and MAC addresses"), this change was discussed
in https://github.com/openwrt/openwrt/pull/2901#discussion_r407238452

With commit 5acd1ed0be0d ("ramips: mt7621: fix Ubiquiti ER-X ports names
and MAC addresses"), all the ports were put into the LAN bridge, with
the argument that the OEM firmware does not have a WAN port enabled.  In
the default OEM setup, all of the ports except eth0 are dead and eth0 is
set to a static IP address without providing DHCP services when
connected.  It is only after the wizard has been run that eth0 becomes
the WAN port and all the rest of the ports belong to LAN with DHCP
enabled.

Having all of the ports set to the LAN bridge does not mirror the default
OEM setup.  To accomplish that, then only eth0 would be in the LAN bridge.
But this is not the expected behaviour of OpenWrt.

Therefore this proposal to set eth0 to WAN and eth1-N to LAN provides
the expected behaviour expected from OpenWrt, maintains the current
documentation as up-to-date, and does not require the user to manually
detach eth0 from the LAN bridge, create the WAN(6) interface(s), and set
eth0 to the WAN(6) interface(s).

Fixes: 5acd1ed0be0d ("ramips: mt7621: fix Ubiquiti ER-X ports names and MAC addresses")
Signed-off-by: Perry Melange <isprotejesvalkata@gmail.com>
[commit subject and description tweaks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agomkchkimg: use higher version code
Joseph C. Lehner [Fri, 22 Mar 2019 14:19:54 +0000 (15:19 +0100)]
mkchkimg: use higher version code

This patch changes the version code of the image header
from `1.1.99_0.0.0.0` to `99.99.99_99.99.99.99`. This
is neccessary on some devices where the stock firmware
checks the version field, possibly preventing third-party
firmware from being installed.

Reviewed-by: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
3 years agoumdnsd: update to latest git HEAD
Kevin Darbyshire-Bryant [Mon, 8 Jun 2020 19:13:15 +0000 (20:13 +0100)]
umdnsd: update to latest git HEAD

d13290b Fix advertised IPv6 addresses

Don't just serve link-local addresses via mdns, offer all.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
3 years agohostapd: silence rm
Stijn Tintel [Mon, 8 Jun 2020 03:03:05 +0000 (06:03 +0300)]
hostapd: silence rm

When bringing up wifi the first time after boot, these warnings appear:

netifd: radio0 (1370): rm: can't remove '/var/run/hostapd-wlan0.psk': No such file or directory
netifd: radio0 (1370): rm: can't remove '/var/run/hostapd-wlan0.vlan': No such file or directory

Silence them by adding the "-f" option to rm.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: John Crispin <john@phrozen.org>
3 years agomediatek: fix image/mt7622.mk
John Crispin [Sun, 7 Jun 2020 18:59:17 +0000 (20:59 +0200)]
mediatek: fix image/mt7622.mk

Signed-off-by: John Crispin <john@phrozen.org>
3 years agobcm63xx: bcm6328: switch to upstream boot sel patch
Álvaro Fernández Rojas [Sun, 7 Jun 2020 16:59:38 +0000 (18:59 +0200)]
bcm63xx: bcm6328: switch to upstream boot sel patch

BCM6328 boot selection fix has been upstreamed.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: add support for the Sercomm H500-s
Daniel González Cabanelas [Sun, 7 Jun 2020 08:55:56 +0000 (10:55 +0200)]
bcm63xx: add support for the Sercomm H500-s

Sercomm H500-s is an xDSL dual band wireless router based on Broadcom
BCM63167 SoC.

Hardware:
   SoC:          Broadcom BCM63167
   CPU:          BMIPS4350 V8.0, 400 MHz, 2 cores
   Flash:        NAND 128 MiB
   RAM:          DDR3 128 MiB
   Ethernet:     4x 10/100/1000 Mbps
   Switch:       BCM53134S
   Wireless:     802.11b/g/n: BCM435f (integrated)
                 802.11ac:    Quantenna QT3740BC (onboard SoC)
   USB:          1x 2.0
   LEDs/Buttons: 11x / 2x

Flash instruction, web UI:
  1. Reset to defaults using the reset button if the admin password is
     unknown
  2. Login into the web UI as admin.
     Address:  http://192.168.0.1
     User:     admin
     Password: VF-ESVodafone-H-500-s or l033i-h500s
  3. Go to Settings -> Firmware Update, and select the Openwrt factory
     firmware
  4. Update the firmware.
  5. Wait until it finish, the device will reboot with Openwrt installed
     on the alternative image partitions keeping the stock firmware in
     the former.

Notes:
  - The patch also adds support for the lowi version. Only the factory
    firmware is different.
  - The integrated Wifi in the Broadcom Soc isn't still supported.
  - The Quantenna 802.11ac wifi works ok, but needs to be configured with
    the Quantenna client application. It can't be configured with Luci
    nor any iw command since it's a separated subsystem linked via
    ethernet.
  - The BCM53134S external switch is managed via MDIO which isn't
    supported in this target. Therefore it will behave as a dumb switch.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
3 years agobcm63xx: image: support device-specific load address
Álvaro Fernández Rojas [Sun, 7 Jun 2020 08:55:53 +0000 (10:55 +0200)]
bcm63xx: image: support device-specific load address

Some CFEs are located at the address currently used for relocation and lzma
loader load address, so we need to provide a way to override it.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: image: don't add the CFE to the sercomm factory
Daniel González Cabanelas [Sun, 7 Jun 2020 08:55:51 +0000 (10:55 +0200)]
bcm63xx: image: don't add the CFE to the sercomm factory

There is no need to include the CFE bootloader in the Sercomm factory
images.

There might be a case when this could be useful:
  - We are running the stock firmware on the first Sercomm image
  - The second partition storing the botloader was erased (unlikely)
Even in this case flashing an image without a bootlader is harmless.

Don't include the bootloader in the factory image creation and rid of the
risk of flashing factory images with an untested bootloader partition.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
3 years agobcm63xx: kernel: add BCM63167 cpuid variant
Daniel González Cabanelas [Sun, 7 Jun 2020 08:55:46 +0000 (10:55 +0200)]
bcm63xx: kernel: add BCM63167 cpuid variant

The BCM63167 is a BCM63268 SoC with a different physical packaging.

Add the CPU ID to allow supporting routers with this SoC (i.e Sercomm
H500-s)

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
3 years agobcm63xx: vr-3032u: add missing compatible property
Álvaro Fernández Rojas [Sun, 7 Jun 2020 16:49:24 +0000 (18:49 +0200)]
bcm63xx: vr-3032u: add missing compatible property

SoC is a BCM63168.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: vg-8050: add missing compatible property
Álvaro Fernández Rojas [Sun, 7 Jun 2020 16:48:08 +0000 (18:48 +0200)]
bcm63xx: vg-8050: add missing compatible property

SoC is a BCM63169.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agomediatek: add mt7531 DSA support
John Crispin [Thu, 4 Jun 2020 13:07:28 +0000 (15:07 +0200)]
mediatek: add mt7531 DSA support

Signed-off-by: John Crispin <john@phrozen.org>
3 years agomediatek: add bpi-r64 emmc support
John Crispin [Thu, 4 Jun 2020 12:26:11 +0000 (14:26 +0200)]
mediatek: add bpi-r64 emmc support

Signed-off-by: John Crispin <john@phrozen.org>
3 years agomediatek: make emmc image generation work on mt7622
John Crispin [Thu, 4 Jun 2020 12:23:07 +0000 (14:23 +0200)]
mediatek: make emmc image generation work on mt7622

Signed-off-by: John Crispin <john@phrozen.org>
3 years agomediatek: switch over to extended upstream eip97 driver
John Crispin [Thu, 4 Jun 2020 12:20:34 +0000 (14:20 +0200)]
mediatek: switch over to extended upstream eip97 driver

Signed-off-by: John Crispin <john@phrozen.org>
3 years agomediatek: tidy up image subtarget Makefiles
Sungbo Eo [Fri, 29 May 2020 11:49:44 +0000 (20:49 +0900)]
mediatek: tidy up image subtarget Makefiles

- sort device recipes alphabetically
- adjust board name of ELECOM WRC-2533GENT
- harmonize line wrapping

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[rebased]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobcm27xx-gpu-fw: bump to most recent good version
Stijn Tintel [Sun, 7 Jun 2020 06:56:46 +0000 (09:56 +0300)]
bcm27xx-gpu-fw: bump to most recent good version

This updates to the last firmware version before the switch to building
from the common firmware branch, which introduces various issues.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoRevert "bcm27xx-gpu-fw: update to latest version"
Stijn Tintel [Sun, 7 Jun 2020 06:18:39 +0000 (09:18 +0300)]
Revert "bcm27xx-gpu-fw: update to latest version"

This reverts commit 9e467a764b4e30a04dd0431ea277f6acd26babe0.

The Raspberry Pi firmware recently switched to building from the common
firmware branch. This introduces changes in the core clock handling,
causing various issues.

E.g. enable_uart=1 no longer fixes the core clock frequency to 250MHz.
When the disable-bt DT overlay is not loaded, the core clock frequency
is increased to 400MHz. As a result, the UART baud rate is no longer
correct, and this causes garbled serial console, or communication
problems with HATs that use the UART.

As a workaround, the core clock could be fixed to 250MHz by adding
'core_freq=250' in /boot/config.txt, but as there appear to be other
issues than just the UART being broken, the safer bet is to revert the
firmware for now.

Upstream bug: https://github.com/raspberrypi/firmware/issues/1376

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm27xx: fix unmounting /boot after sysupgrade
Stijn Tintel [Sun, 7 Jun 2020 02:31:09 +0000 (05:31 +0300)]
bcm27xx: fix unmounting /boot after sysupgrade

Due to a typo, /boot is not properly unmounted after copying the backup
file to it. Fix the typo to solve this.

Fixes: 246916ddf4a1 ("brcm2708: use x86's upgrade scripts for all rpi targets")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agonetifd: update to latest git HEAD
Hans Dedecker [Sat, 6 Jun 2020 18:54:09 +0000 (20:54 +0200)]
netifd: update to latest git HEAD

51e9fb8 system-linux: improve handling of device rename

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agokernel: Add kmod-sch-cake-virtual intermediate package
Toke Høiland-Jørgensen [Wed, 6 May 2020 19:58:30 +0000 (21:58 +0200)]
kernel: Add kmod-sch-cake-virtual intermediate package

As reported in https://github.com/openwrt/packages/issues/12072, the
imagebuilder fails due to a dependency resolution error when the userspace
packages are built using a target that has a different kernel version than
that which is being run. To resolve this, add a virtual kernel package with
the conditional dependency currently used in sqm-scripts. The idea is to
move the sqm-scripts dependency to this virtual package, which hopefully
should be consistent with the actual kernel module being built.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
3 years agonghttp2: bump to 1.41.0
Hans Dedecker [Sat, 6 Jun 2020 12:00:37 +0000 (14:00 +0200)]
nghttp2: bump to 1.41.0

8f7b008b Update bash_completion
83086ba9 Update manual pages
c3b46625 Merge pull request from GHSA-q5wr-xfw9-q7xr
3eecc2ca Bump version number to v1.41.0, LT revision to 34:0:20
881c060d Update AUTHORS
f8da73bd Earlier check for settings flood
336a98fe Implement max settings option
ef415836 Revert "Add missing connection error handling"
979e6c53 Merge pull request #1459 from nghttp2/proxyprotov2
b7d16101 Add missing connection error handling
cd53bd81 Merge pull request #1460 from gportay/patch-1
e5625b8c Fix doc
c663349f integration: Add PROXY protocol v2 tests
854e9fe3 nghttpx: Always call init_forwarded_for
c60ea227 Update doc
49cd8e6e nghttpx: Add PROXY-protocol v2 support
3b17a659 Merge pull request #1453 from Leo-Neat/master
600fcdf5 Merge pull request #1455 from xjtian/long_serials
4922bb41 static_cast size parameter in StringRef constructor to size_t
aad86975 Fix get_x509_serial for long serial numbers
dc7a7df6 Adding CIFuzz
b3f85e2d Merge pull request #1444 from nghttp2/fix-recv-window-flow-control-issue
ffb49c6c Merge pull request #1435 from geoffhill/master
2ec58551 Fix receiving stream data stall
459df42b Merge pull request #1442 from nghttp2/upgrade-llhttp
a4c1fed5 Bump llhttp to 2.0.4
866eadb5 Enable session_create_idle_stream test, fix errors
5e13274b Fix typo
e0d7f7de h2load: Allow port in --connect-to
df575f96 h2load: add --connect-to option
1fff7379 clang-format-9
b40c6c86 Merge pull request #1418 from vszakats/patch-1
9bc2c75e lib/CMakeLists.txt: Make hard-coded static lib suffix optional
2d5f7659 Bump up version number to 1.41.0-DEV

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agokernel: sch_cake: use skb hash improve wireguard compatibility
Kevin Darbyshire-Bryant [Fri, 29 May 2020 15:29:53 +0000 (16:29 +0100)]
kernel: sch_cake: use skb hash improve wireguard compatibility

While the other fq-based qdiscs take advantage of skb->hash and doesn't
recompute it if it is already set, sch_cake does not.

This was a deliberate choice because sch_cake hashes various parts of the
packet header to support its advanced flow isolation modes. However,
foregoing the use of skb->hash entirely loses a few important benefits:

- When skb->hash is set by hardware, a few CPU cycles can be saved by not
  hashing again in software.

- Tunnel encapsulations will generally preserve the value of skb->hash from
  before the encapsulation, which allows flow-based qdiscs to distinguish
  between flows even though the outer packet header no longer has flow
  information.

It turns out that we can preserve these desirable properties in many cases,
while still supporting the advanced flow isolation properties of sch_cake.
This patch does so by reusing the skb->hash value as the flow_hash part of
the hashing procedure in cake_hash() only in the following conditions:

- If the skb->hash is marked as covering the flow headers (skb->l4_hash is
  set)

AND

- NAT header rewriting is either disabled, or did not change any values
  used for hashing. The latter is important to match local-origin packets
  such as those of a tunnel endpoint.

The immediate motivation for fixing this was the recent patch to WireGuard
to preserve the skb->hash on encapsulation. As such, this is also what I
tested against; with this patch, added latency under load for competing
flows drops from ~8 ms to sub-1ms on an RRUL test over a WireGuard tunnel
going through a virtual link shaped to 1Gbps using sch_cake. This matches
the results we saw with a similar setup using sch_fq_codel when testing the
WireGuard patch.

Fixes: 046f6fd5daef ("sched: Add Common Applications Kept Enhanced (cake) qdisc")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
3 years agomvebu: remove ClearFog Pro SUPPORTED_DEVICES
DENG Qingfang [Thu, 4 Jun 2020 04:30:19 +0000 (12:30 +0800)]
mvebu: remove ClearFog Pro SUPPORTED_DEVICES

A direct upgrade from previous swconfig version with
incompatible settings to DSA will break the internet.
Remove SUPPORTED_DEVICES so users cannot upgrade directly.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
[rebase after Linksys rename, adjust title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agomvebu: rename Linksys devices based on their common names
Paul Spooren [Fri, 10 Apr 2020 10:14:21 +0000 (00:14 -1000)]
mvebu: rename Linksys devices based on their common names

The Linksys devices in mvebu target feature a mixed naming,
where parts are based on the official product name (device
node, image; e.g. WRT3200ACM) and parts are based on the
internal code name (DTS file name, compatible, LED labels;
e.g. rango). This inconsistent naming has been perceived
as quite confusing.

A recent attempt by Paul Spooren to harmonize this naming
in kernel has been declined there. However, for us it still
makes sense to apply at least a part of these changes
locally.

Primarily, this patch changes the compatible in DTS and thus
the board name used in various scripts to have them in line
with the device, model and image names. Due to the recent
switch from swconfig to DSA, this allows us to drop
SUPPORTED_DEVICES and thus prevent seamless upgrade between
these incompatible setups.

However, this does not include the LED label rename from
Paul's initial patch: I don't think it's worth keeping the
enormous diff locally for this case, as we can implement
this much easier in 01_leds if we have to live with the
inconsistency anyway.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[rebase, extend to all devices, drop DT LED changes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokernel: b53: fix compilation with kernels 5.5+
Rafał Miłecki [Fri, 5 Jun 2020 10:42:21 +0000 (12:42 +0200)]
kernel: b53: fix compilation with kernels 5.5+

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agogeneric: mt7530: support adjusting EEE
DENG Qingfang [Thu, 28 May 2020 07:04:17 +0000 (15:04 +0800)]
generic: mt7530: support adjusting EEE

Add support for adjusting EEE with ethtool

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
3 years agogeneric: mt7530: fix roaming from DSA user ports
DENG Qingfang [Sat, 25 Apr 2020 12:08:00 +0000 (20:08 +0800)]
generic: mt7530: fix roaming from DSA user ports

When a client moves from a DSA user port to a software port in a bridge,
it cannot reach any other clients that connected to the DSA user ports.
That is because SA learning on the CPU port is disabled, so the switch
ignores the client's frames from the CPU port and still thinks it is at
the user port.

Fix it by enabling SA learning on the CPU port.

To prevent the switch from learning from flooding frames from the CPU
port, set skb->offload_fwd_mark to 1 for unicast and broadcast frames,
and let the switch flood them instead of trapping to the CPU port.
Multicast frames still need to be trapped to the CPU port for snooping,
so set the SA_DIS bit of the MTK tag to 1 when transmitting those frames
to disable SA learning.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
3 years agogeneric: fix DSA VLAN filtering
DENG Qingfang [Mon, 20 Apr 2020 13:37:17 +0000 (21:37 +0800)]
generic: fix DSA VLAN filtering

Currently enabling VLAN filtering blocks all traffic in the bridge
immediately. That is because DSA ignores all VLAN setup when VLAN
filtering is disabled, and when it is enabled, there is no VLAN entry
in the VLAN table, causing all traffic to be blocked.

Add patches to allow VLAN setup even if VLAN filtering is disabled.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
3 years agogeneric: mt7530: set CPU port to fallback mode
DENG Qingfang [Thu, 14 May 2020 03:00:58 +0000 (11:00 +0800)]
generic: mt7530: set CPU port to fallback mode

Currently, setting a bridge's self PVID to other value and deleting
the default VID 1 renders untagged ports of that VLAN unable to talk to
the CPU port:

bridge vlan add dev br0 vid 2 pvid untagged self
bridge vlan del dev br0 vid 1 self
bridge vlan add dev sw0p0 vid 2 pvid untagged
bridge vlan del dev sw0p0 vid 1
# br0 cannot send untagged frames out of sw0p0 anymore

That is because the CPU port is set to security mode and its PVID is
still 1, and untagged frames are dropped due to VLAN member violation.

Set the CPU port to fallback mode so untagged frames can pass through.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
3 years agoramips/mediatek: select kmod-mt7615-firmware where kmod-mt7615e is selected
Felix Fietkau [Wed, 3 Jun 2020 16:55:55 +0000 (18:55 +0200)]
ramips/mediatek: select kmod-mt7615-firmware where kmod-mt7615e is selected

The new mt76 version splits out the firmware, because the driver can also be
used for MT7663/MT7613

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agokernel: fix portability issue with perf on linux 5.4
Felix Fietkau [Tue, 12 May 2020 13:23:01 +0000 (15:23 +0200)]
kernel: fix portability issue with perf on linux 5.4

Remove dependencies on core kernel headers in host tools used to build perf,
which break on any non-linux system

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agohostapd: add support for wifi-station and wifi-vlan sections
John Crispin [Mon, 25 May 2020 09:39:40 +0000 (11:39 +0200)]
hostapd: add support for wifi-station and wifi-vlan sections

This patch adds support for 2 new uci sections.

config wifi-vlan
# iface is optional. if it is not defined the vlan will apply
# to all interfaces
        option iface default_radio0
        option name guest
        option vid 100
        option network guest

config wifi-station
# iface is optional. if it is not defined the station will apply
# to all interfaces
        option iface default_radio0
        # mac is optional. if it is not defined it will be a catch all
# for any sta using this key
option mac '00:11:22:33:44:55'
        # vid is optional. if it is not defined, the sta will be part of
# the primary iface.
option vid 100
        option key testtest

With this patch applied it is possible to use multiple PSKs on a single BSS.

Signed-off-by: John Crispin <john@phrozen.org>
3 years agonetifd: update to latest HEAD
John Crispin [Thu, 4 Jun 2020 11:35:33 +0000 (13:35 +0200)]
netifd: update to latest HEAD

db275e1 interface-ip: fix build on non-linux systems
3392046 system-dummy: fix missing return
a56b457 netifd: wireless: add support for tracking wifi-station sections
4ce33ce netifd: wireless: add support for tracking wifi-vlan sections

Signed-off-by: John Crispin <john@phrozen.org>
3 years agomvebu: rename Linksys Mamba WAN port
DENG Qingfang [Tue, 28 Apr 2020 15:40:53 +0000 (23:40 +0800)]
mvebu: rename Linksys Mamba WAN port

Rename it to wan to match Linksys Armada 385 series

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
3 years agomvebu: remove swconfig package
DENG Qingfang [Sun, 19 Apr 2020 08:16:32 +0000 (16:16 +0800)]
mvebu: remove swconfig package

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
3 years agogeneric: backport mv88e6xxx port mirroring support
DENG Qingfang [Sun, 19 Apr 2020 08:04:06 +0000 (16:04 +0800)]
generic: backport mv88e6xxx port mirroring support

Backport port mirroring support for mv88e6xxx

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
3 years agomvebu: drop 06_set_iface_mac preinit script
DENG Qingfang [Sun, 19 Apr 2020 07:55:31 +0000 (15:55 +0800)]
mvebu: drop 06_set_iface_mac preinit script

MAC address is set in board.d script
Interface swapping is not needed anymore as switching to DSA breaks
previous configuration anyway

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
3 years agomvebu: use ucidef to set up MAC address
DENG Qingfang [Sun, 19 Apr 2020 07:53:03 +0000 (15:53 +0800)]
mvebu: use ucidef to set up MAC address

Use ucidef to set up MAC address instead of preinit script

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
3 years agomvebu: use eth0 as DSA CPU port for Linksys WRT
DENG Qingfang [Thu, 30 Apr 2020 11:41:39 +0000 (19:41 +0800)]
mvebu: use eth0 as DSA CPU port for Linksys WRT

eth0 has HW MAC address while eth2 does not.
Use eth0 instead so we don't have to set LAN MAC manually.
Disable unused eth2, until multi CPU port is supported.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
3 years agomvebu: update default config for DSA
DENG Qingfang [Sun, 19 Apr 2020 07:36:04 +0000 (15:36 +0800)]
mvebu: update default config for DSA

Update network/LED configuration for DSA driver.
sysupgrade from images prior to this commit with config preserved
will break the ethernet.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
3 years agomvebu: remove swconfig symbols from kernel config
DENG Qingfang [Sun, 19 Apr 2020 07:34:40 +0000 (15:34 +0800)]
mvebu: remove swconfig symbols from kernel config

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
3 years agomvebu: drop swconfig patches
DENG Qingfang [Sun, 19 Apr 2020 07:33:19 +0000 (15:33 +0800)]
mvebu: drop swconfig patches

Drop swconfig patches for Clearfog and Linksys WRT

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
3 years agomvebu: switch to kernel 5.4
Adrian Schmutzler [Thu, 28 May 2020 16:46:47 +0000 (18:46 +0200)]
mvebu: switch to kernel 5.4

Last reports with kernel 5.4 have all been positive [1], so let's open
this to a wider range of testers.

[1] https://github.com/openwrt/openwrt/pull/2804

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobcm63xx: vg-8050: fix WFI partition size
Álvaro Fernández Rojas [Wed, 3 Jun 2020 17:06:22 +0000 (19:06 +0200)]
bcm63xx: vg-8050: fix WFI partition size

Each image can take up to 0x3d60000, which means 128k more per image.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agobcm63xx: vr-3032u: fix WFI partition size
Álvaro Fernández Rojas [Wed, 3 Jun 2020 17:03:42 +0000 (19:03 +0200)]
bcm63xx: vr-3032u: fix WFI partition size

Each image can take up to 0x3d60000, which means 128k more per image.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agokernel: mtdsplit: bcm_wfi: always add img partitions
Álvaro Fernández Rojas [Wed, 3 Jun 2020 16:44:50 +0000 (18:44 +0200)]
kernel: mtdsplit: bcm_wfi: always add img partitions

This is useful when booting OpenWrt from ramdisks in order to have both
images partitions defined.
Furthermore, instead of always using img2 for the inactive image, let's use
img1 or img2 accordingly.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3 years agoramips: mt7621: use higher SPI clock speed on Mikrotik rbm11g and rbm33g
Tobias Schramm [Wed, 3 Jun 2020 13:10:40 +0000 (15:10 +0200)]
ramips: mt7621: use higher SPI clock speed on Mikrotik rbm11g and rbm33g

Previously the dts were using a value determined by empirical testing,
because of a spi driver/clock bug. The bug was fixed quite some time
ago. 33 MHz is the default clock frequency used by RouterBOOT and thus
safe.

Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
3 years agoiwinfo: update to version 2020-06-03
Petr Štetiar [Wed, 3 Jun 2020 12:55:10 +0000 (14:55 +0200)]
iwinfo: update to version 2020-06-03

2faa20e5e9d1 iwinfo: add device id for Mikrotik R11e-5HacD miniPCIe card
d577a9d38a3b iwinfo: add device id for Marvell 88W8997 SDIO wifi card
f6b7d16d2ffa iwinfo: add device id for Atheros AR9287 PCIe wifi card

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agobcm47xx: fix brcm-wl module loading
Sungbo Eo [Sun, 31 May 2020 07:42:23 +0000 (16:42 +0900)]
bcm47xx: fix brcm-wl module loading

_dma_cache_wback_inv needs to be exported to load wl module successfully.

root@OpenWrt:/# insmod wl
[  363.867779] wl: Unknown symbol _dma_cache_wback_inv (err -2)
failed to insert /lib/modules/5.4.40/wl.ko

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Cc: Rafał Miłecki <rafal@milecki.pl>
3 years agokernel: iio: add drivers for st_lsm6dsx IMU MEMS sensors
Tim Harvey [Thu, 28 May 2020 15:04:42 +0000 (08:04 -0700)]
kernel: iio: add drivers for st_lsm6dsx IMU MEMS sensors

Add kmod for the ST LSM6DSX IMU driver.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[fixed missing regmap module dependencies]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agokernel: iio: fix st_accel_{i2c, spi} driver
Tim Harvey [Thu, 28 May 2020 15:02:01 +0000 (08:02 -0700)]
kernel: iio: fix st_accel_{i2c, spi} driver

Add missing kernel module and rename driver

Fixes: 2d8f4c4fbd46 ("kernel: iio: add st-accel driver modules")
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
3 years agoocteontx: fix mcp251x can controller
Tim Harvey [Thu, 28 May 2020 14:58:49 +0000 (07:58 -0700)]
octeontx: fix mcp251x can controller

Update the can-mcp251x-convert-to-half-duplex-SPI patch to fix reception

Some SPI host controllers such as the Cavium Thunder TX do not support
full-duplex SPI. Using half-duplex transfers allows the driver to work
with those host controllers.

This patch fixes the fact that mcp251x_hw_rx_frame was still relying on
a full-duplex transfer where bits were being shifted on MOSI at the same time
as MISO. After splitting the transaction into a spi_write_then_read() care
must be taken to ignore the first byte.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
3 years agoocteontx: fix gpio irq request
Tim Harvey [Thu, 28 May 2020 14:58:34 +0000 (07:58 -0700)]
octeontx: fix gpio irq request

This fixes a regression in 5.4 that causes a crash when a driver requests
an ARM GPIO for an IRQ.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
3 years agoocteontx: refresh kernel 5.4 config
Tim Harvey [Tue, 2 Jun 2020 17:05:01 +0000 (10:05 -0700)]
octeontx: refresh kernel 5.4 config

refresh kernel config by running make kernel_menuconfig and saving changes

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
3 years agoimx6: image: increase max ubifs file-system size
Tim Harvey [Thu, 28 May 2020 13:57:05 +0000 (06:57 -0700)]
imx6: image: increase max ubifs file-system size

The latest 2GiB NAND flash parts used by Gateworks ventana are 2K page-size.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
3 years agoimx6: backport v5.8 imx6qdl-gw dt patches
Tim Harvey [Thu, 28 May 2020 13:56:17 +0000 (06:56 -0700)]
imx6: backport v5.8 imx6qdl-gw dt patches

- add fxos8700 support to GW52xx/GW53xx/GW54xx
- add USB_OTG support to GW552x
- add LSM9DS1 IMU support to GW560x
- add LSM9DS1 IMU support to GW5904
- add CC1352 UART to GW5910
- add BCM4330 support to GW5910
- fix wlan regulator for GW5910

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
3 years agowolfssl: use -fomit-frame-pointer to fix asm error
Eneas U de Queiroz [Tue, 26 May 2020 13:45:22 +0000 (10:45 -0300)]
wolfssl: use -fomit-frame-pointer to fix asm error

32-bit x86 fail to compile fast-math feature when compiled with frame
pointer, which uses a register used in a couple of inline asm functions.

Previous versions of wolfssl had this by default.  Keeping an extra
register available may increase performance, so it's being restored for
all architectures.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
3 years agoexfat-utils: move into packages feed
Rosen Penev [Sun, 26 Apr 2020 23:17:30 +0000 (16:17 -0700)]
exfat-utils: move into packages feed

This will be moved to packages:

https://github.com/openwrt/packages/pull/12378

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[commit subject facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agoxfsprogs: move into packages feed
Rosen Penev [Fri, 22 May 2020 23:22:57 +0000 (16:22 -0700)]
xfsprogs: move into packages feed

Does not seem to be needed here. This will be imported into packages.

Ref: https://github.com/openwrt/packages/pull/12256
Signed-off-by: Rosen Penev <rosenp@gmail.com>
[subject facelift, PR ref]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agolibconfig: move into packages feed
Rosen Penev [Fri, 22 May 2020 23:16:47 +0000 (16:16 -0700)]
libconfig: move into packages feed

No package in base uses libconfig. Everything is in the packages feed.

Ref: https://github.com/openwrt/packages/pull/12255
Signed-off-by: Rosen Penev <rosenp@gmail.com>
[subject facelift, PR ref]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agokernel: add gpio-it87
Florian Eckert [Wed, 29 Apr 2020 13:54:06 +0000 (15:54 +0200)]
kernel: add gpio-it87

Since commit 910df3f06cc902ca2cb0ca8e963e9354c930df1a we have build in
on all X86/64 platforms the gpio-it87 driver.

Since this change I am getting the following error message on boot.
 > kern.err kernel: [    1.009416] gpio_it87: no device

I do not have this device on my system. To prevent the nonsensical
message and the loading of the module I have added this as a package, so
that it can be installed later or during image building.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Reviewed-by: Philip Prindeville <philipp@redfish-solutions.com>
3 years agoath79: phy-ar7200-usb: do not print error on defered init
Johann Neuhauser [Tue, 28 Apr 2020 21:20:13 +0000 (23:20 +0200)]
ath79: phy-ar7200-usb: do not print error on defered init

This is only a cosmetic correction, as the driver works as expected.
However, the error message confuses users about a missing reset definition.

On a defered init we don't see the following error message now:
[    0.078292] ar7200-usb-phy usb-phy: phy reset is missing

Tested-by: Lech Perczak <lech.perczak@gmail.com>
Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
3 years agobase-files: prevent issues w/ overlay on powerloss after sysupgrade
Sergey Ryazanov [Fri, 24 Apr 2020 14:04:14 +0000 (17:04 +0300)]
base-files: prevent issues w/ overlay on powerloss after sysupgrade

Due to filesystem write caching the old configuration data could stay
out of flash for a long time during a first boot after the sysupgrade.
Power loss during this period could damage the overlay data and even
make device inaccessable via the network.

Fix this by syncing data to a flash as soon as the previous
configuration will be unpacked after the sysupgrade. Also sync the FS
state after the sysupgrade.tgz archive removing to prevent duplicative
extraction of a previous configuration.

Tested with AMD Geode based board.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
3 years agodnsmasq: add /etc/dnsmasq.d/ to conffiles
Sven Roederer [Fri, 24 Apr 2020 13:43:49 +0000 (15:43 +0200)]
dnsmasq: add /etc/dnsmasq.d/ to conffiles

This directory can hold configuration-snippets which should also included in the backup.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
3 years agomvebu: espressobin: fix SATA and USB 3.0 ports detection
Tomasz Maciej Nowak [Mon, 20 Apr 2020 17:47:11 +0000 (19:47 +0200)]
mvebu: espressobin: fix SATA and USB 3.0 ports detection

This commit removes changes from upstream commits:
8e18c8e58da6 arm64: dts: marvell: armada-3720-espressobin: declare SATA
PHY property
bd3d25b07342 arm64: dts: marvell: armada-37xx: link USB hosts with their
PHYs
For most boards which have factory bootloader this caused that devices
connected to USB 3.0 and SATA port were not detected. For them to
function users would need to upgrade the bootloader to version with ARM
Trusted Firmware 2.1 or later. Unfortunately there is no official
bootloader image with updated ATF component, therefore drop these
properties from nodes. This change was also tested briefly with
bootloader with updated ATF and the ports functioned properly.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
3 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>