openwrt/staging/jogo.git
4 years agosunxi: remove CONFIG_LEGACY_PTY from kernel config
Daniel Golle [Mon, 9 Dec 2019 19:15:36 +0000 (20:15 +0100)]
sunxi: remove CONFIG_LEGACY_PTY from kernel config

Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agolayerscape: remove CONFIG_LEGACY_PTY from kernel config
Daniel Golle [Mon, 9 Dec 2019 19:15:02 +0000 (20:15 +0100)]
layerscape: remove CONFIG_LEGACY_PTY from kernel config

Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agokirkwood: remove CONFIG_LEGACY_PTY from kernel config
Daniel Golle [Mon, 9 Dec 2019 19:13:41 +0000 (20:13 +0100)]
kirkwood: remove CONFIG_LEGACY_PTY from kernel config

Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoat91: disable legacy PTYs and virtual terminals
Daniel Golle [Mon, 9 Dec 2019 19:12:41 +0000 (20:12 +0100)]
at91: disable legacy PTYs and virtual terminals

Enabling legacy PTYs causes problems with procd-hotplug.
And as this is a headless target, no need to have virtual terminals.
Remove corresponding kernel config options, they are disabled in
generic kernel config.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agompc85xx: remove CONFIG_LEGACY_PTY from kernel config
Daniel Golle [Mon, 9 Dec 2019 19:11:18 +0000 (20:11 +0100)]
mpc85xx: remove CONFIG_LEGACY_PTY from kernel config

Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoixp4xx: remove CONFIG_LEGACY_PTY from kernel config
Daniel Golle [Mon, 9 Dec 2019 19:10:18 +0000 (20:10 +0100)]
ixp4xx: remove CONFIG_LEGACY_PTY from kernel config

Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agouml: remove CONFIG_LEGACY_PTY from kernel config
Daniel Golle [Mon, 9 Dec 2019 19:09:13 +0000 (20:09 +0100)]
uml: remove CONFIG_LEGACY_PTY from kernel config

Having legacy PTYs enabled causes problems with procd-hotplug.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agooxnas: disable legacy PTYs and virtual terminals
Daniel Golle [Mon, 9 Dec 2019 19:07:00 +0000 (20:07 +0100)]
oxnas: disable legacy PTYs and virtual terminals

Enabling legacy PTYs causes problems with procd-hotplug.
And as this is a headless target, no need to have virtual terminals.
Remove corresponding kernel config options, they are disabled in
generic kernel config.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agomac80211: don't call md5sum on non-existing file
Daniel Golle [Thu, 5 Dec 2019 20:17:58 +0000 (21:17 +0100)]
mac80211: don't call md5sum on non-existing file

If no AP is configured, hostapd-${phy}.conf is not being created,
hence md5sum fails and causes log pollution:

netifd: radio1 (3183): md5sum: can't open '/var/run/hostapd-phy1.conf': No such file or directoy

Hence make sure the file exists when calling md5sum.

Fixes: a5bc9787d4 ("mac80211: add support for dynamically reconfiguring wifi")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agohostapd: re-introduce process tracking
Daniel Golle [Thu, 5 Dec 2019 17:35:36 +0000 (18:35 +0100)]
hostapd: re-introduce process tracking

Before commit 60fb4c92b6 ("hostapd: add ubus reload") netifd was
tracking hostapd/wpa_supplicant and restarting wifi in case of a
process crash. Restore this behaviour by tracking the PIDs of
hostapd and wpa_supplicant.
Also make sure hostapd and/or wpa_supplicant have been started before
emmitting ubus calls to them using ubus wait_for.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agomac80211: track unmanaged interfaces
Daniel Golle [Thu, 5 Dec 2019 17:22:55 +0000 (18:22 +0100)]
mac80211: track unmanaged interfaces

In addition to wpa_supplicant and hostapd managed interfaces, also
track unmanaged interfaces. This is used to make sure that running
'wifi' always returns into a clean state regardless of what the user
did before.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agohostapd: manage instances via procd instead of pidfile
Felix Fietkau [Wed, 4 Dec 2019 23:26:53 +0000 (00:26 +0100)]
hostapd: manage instances via procd instead of pidfile

Allows graceful restart of crashing hostapd/wpa_supplicant instances

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: attempt to launch only present services]

4 years agohostapd: fix crash regression triggered by mesh mode
Felix Fietkau [Wed, 4 Dec 2019 23:01:28 +0000 (00:01 +0100)]
hostapd: fix crash regression triggered by mesh mode

Fixes: 60fb4c92b6 ("hostapd: add ubus reload")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: polish commit message]

4 years agotreewide: remove dts-v1 identifier from DTSI files
Adrian Schmutzler [Sat, 23 Nov 2019 10:44:51 +0000 (11:44 +0100)]
treewide: remove dts-v1 identifier from DTSI files

The "/dts-v1/;" identifier is supposed to be put once at the beginning
of a device tree file. Thus, it makes no sense to provide it a second
time in to-be-included DTSI files.

This removes the identifier from all DTSI files in /target/linux.

Most of the DTS files in OpenWrt do contain the "/dts-v1/;". It is
missing for most of the following targets, though:
mvebu, ipq806x, mpc85xx, ipq40xx

This does not touch ipq806x for now, as the bump to 4.19 is close.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agohostapd: enable CTRL_IFACE_MIB for hostapd-full
David Bauer [Thu, 5 Dec 2019 18:29:14 +0000 (19:29 +0100)]
hostapd: enable CTRL_IFACE_MIB for hostapd-full

This enables the CTRL_IFACE_MIB symbol for wpad-full and hostapd-full.
If it is not enabled, statistic outputs such as "hostapd_cli all_sta"
are empty.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agobrcm47xx: add switch configuration for WNR3500L
Olli Asikainen [Fri, 15 Nov 2019 15:07:37 +0000 (17:07 +0200)]
brcm47xx: add switch configuration for WNR3500L

Netgear WNR3500L is an already supported device, but out of the
box, the device has no switch configuration and there is no wan.
The correct configuration for this specific model is similar to
some other models. This simple commit adds the correct switch
and the out-of-the-box experience is improved.

Experimentally determined:

Port 0 => WAN
Port 1..4 => LAN
Port 5..7 => unused
Port 8 => CPU

Signed-off-by: Olli Asikainen <olli.asikainen@gmail.com>
Tested-by: Fabian Zaremba <fabian@youremail.eu>
[added port mapping to commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: convert mediatek,mtd-eeprom from decimal to hex notation
Adrian Schmutzler [Sat, 7 Dec 2019 23:09:25 +0000 (00:09 +0100)]
ramips: convert mediatek,mtd-eeprom from decimal to hex notation

A small subset of devices uses decimal notation for mediatek,mtd-eeprom
in DTS files. Convert to hexadecimal notation to be consistent with
all the rest.

Also change "0" to "0x0" in the same files for consistency.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: fix number of LAN Ports for Mikrotik RBM33G
Martin Schiller [Wed, 4 Dec 2019 09:43:02 +0000 (10:43 +0100)]
ramips: fix number of LAN Ports for Mikrotik RBM33G

The Mikrotik RBM33G has only 2 LAN ports.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
[moved node in 02_network to maintain alphabetic sorting]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: fix switch port order for TP-Link Archer C20i
Walter Sonius [Wed, 4 Dec 2019 20:07:58 +0000 (21:07 +0100)]
ramips: fix switch port order for TP-Link Archer C20i

Physical port order watched from the backside of the C20i
(from left to right) is: Internet / 1 / 2 / 3 / 4

Physical Port Switch port
WAN             0
LAN 3           1
LAN 4           2
LAN 1           3
LAN 2           4
(not used)      5
CPU             6

Signed-off-by: Walter Sonius <walterav1984@gmail.com>
[commit message/title improvements]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: fix WNDR3700/WNDR3800 wifi reg size
Christian Lamparter [Wed, 15 Aug 2018 15:53:48 +0000 (17:53 +0200)]
ath79: fix WNDR3700/WNDR3800 wifi reg size

"[...] the size component shall be zero."
(See "PCI Bus Binding to: IEEE Std 1275-1994 Rev 2.1"
section "4.1.1 Open Firmware-defined Properties for Child Nodes")

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoiproute2: update to 5.4.0
Hans Dedecker [Thu, 5 Dec 2019 21:46:50 +0000 (22:46 +0100)]
iproute2: update to 5.4.0

Update iproute2 to latest stable version, see https://lwn.net/Articles/805654/
for the changes in 5.4.0

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agomediatek: fix pcie bringup issue
John Crispin [Thu, 5 Dec 2019 09:22:56 +0000 (10:22 +0100)]
mediatek: fix pcie bringup issue

Signed-off-by: John Crispin <john@phrozen.org>
4 years agowireguard: bump to 0.0.20191205
Jason A. Donenfeld [Thu, 5 Dec 2019 10:59:41 +0000 (11:59 +0100)]
wireguard: bump to 0.0.20191205

* wg-quick: linux: suppress error when finding unused table

This fixes a spurious warning messages seen with recent versions of iproute2
and kernels.

* wg-quick: linux: ensure postdown hooks execute
* wg-quick: linux: have remove_iptables return true
* wg-quick: linux: iptables-* -w is not widely supported

Adding in iptables had some hiccups. For the record, I'm very unhappy about
having to put any firewalling code into wg-quick(8). We'll of course need to
support nftables too at some point if this continues. I'm investigating with
upstream the possibility of adding a sysctl to patch the issue that iptables
is handling now, so hopefully at somepoint down the line we'll be able to shed
this dependency once again.

* send: use kfree_skb_list
* device: prepare skb_list_walk_safe for upstreaming
* send: avoid touching skb->{next,prev} directly

Suggestions from LKML.

* ipc: make sure userspace communication frees wgdevice

Free things properly on error paths.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoath79: add support for Ubiquiti LiteBeam AC Gen2
Stijn Tintel [Fri, 12 Apr 2019 17:21:58 +0000 (20:21 +0300)]
ath79: add support for Ubiquiti LiteBeam AC Gen2

Hardware:
* SoC: Atheros AR9342-BL1A
* RAM: 64MB DDR2 (Winbond W9751G6KB-25)
* Flash: 16MB SPI NOR (Macronix MX25L12835FZ2I-10G)
* Ethernet: 1x 10/100/1000 Mbps (Atheros AR8035-A) with 24V PoE support
* Wifi 2.4GHz: Atheros AR9340 v2
* WiFi 5GHz: Ubiquiti U-AME-G1-BR4A (rebranded QCA988X v2)
* LEDs: 1x Power, 1x Ethernet
* Buttons: 1x Reset
* UART: 1x TTL 115200n8, 3.3V RX TX GND, 3.3V pin closest to RJ45 port

The LEDs do not seem to be connected to any GPIO, so there is currently
no way to control them.

Installation via U-Boot, TFTP and serial console:
* Configure your TFTP server with IP 192.168.1.254
* Connect serial console and power up the device
* Hit any key to stop autoboot
* tftpboot 0x81000000 openwrt-ath79-generic-ubnt_litebeam-ac-gen2-initramfs-kernel.bin
* bootm 0x81000000
* copy openwrt-ath79-generic-ubnt_litebeam-ac-gen2-squashfs-sysupgrade.bin
  to /tmp
* sysupgrade /tmp/openwrt-ath79-generic-ubnt_litebeam-ac-gen2-squashfs-sysupgrade.bin

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: drop IMAGE/factory.bin from ubnt-wa devices
Stijn Tintel [Tue, 3 Dec 2019 11:57:20 +0000 (13:57 +0200)]
ath79: drop IMAGE/factory.bin from ubnt-wa devices

The sysupgrade image contains OpenWrt specific metadata. Having this
metadata in the factory images makes no sense. Drop IMAGE/factory.bin
from Device/ubnt-wa and use the default from Device/ubnt instead.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agokernel: act_ctinfo: fix updated backport on 4.14
Kevin Darbyshire-Bryant [Wed, 4 Dec 2019 12:06:26 +0000 (12:06 +0000)]
kernel: act_ctinfo: fix updated backport on 4.14

It turns out my 4.14 testing had a rather large flaw in it and the
'extack' mechanism isn't quite ready.  Remove the extack stuff from this
backport.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agokernel: act_ctinfo: update backport
Kevin Darbyshire-Bryant [Tue, 26 Nov 2019 08:45:38 +0000 (08:45 +0000)]
kernel: act_ctinfo: update backport

Since the original backports from kernel 5.3 a few things have been
tweaked by kernel bumps & other upstream changes.  Update the backport
to reflect upstream as closely as possible and remove the bitrot.

Functions remain the same, error reporting improved.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoath79: fix source of label MAC address for Ubiquiti XM devices
Adrian Schmutzler [Tue, 19 Nov 2019 14:24:58 +0000 (15:24 +0100)]
ath79: fix source of label MAC address for Ubiquiti XM devices

In d421a8b94489 ("ath79: read label MAC address from flash instead
of using phy0/phy1") the source of the label MAC address was changed
for devices just reading it from phy0. To get rid of the dependency
from phy startup, addresses were read directly from the flash
locations that are used to initialize the phy MAC addresses.

Unfortunately, it turned out that Ubiquiti XM devices seem to have
different flash locations than expected, and also seem to have
specific locations for different devices (all in art/EEPROM):

0xe012 AR9280 Nanostation M2 - 0x120c
0xe035 AR9280 Nanostation M3 - 0x120c
0xe1b2 AR9280 Rocket M2 - 0x120c
0xe1c3 AR9280 Rocket M3 - 0x120c
0xe1b5 AR9280 Rocket M5 - 0x120c
0xe2d5 AR9280 Bullet M2 Titanium - 0x120c
0xe2b5 AR9280 Nanobridge M5 - 0x120c
0xe202 AR9280 Bullet M2 - 0x120c
0xe232 AR9287 Nanobridge M2 - 0x110c
0xe4a2 AR9285 AirRouter - 0xa0bf
Picostation M2 - 0x120c and 0xa0bf
Nanostation Loco M2 - not in 0x120c, other locations not checked

An additional problem of the Ubiquiti device support in OpenWrt is
that we provide images that match several subvariants of the devices,
which might have different MAC address locations.

Given that reading the address from phy0 in 02_network _is_ working
for the ath79 target in general, it does not seem reasonable to
rebuild a complex MAC address retrieval mechanism which is already
present in the ath9k driver.

So, this patch reverts the label MAC address source for Ubiquiti XM
devices (and the Unifi AP) to /sys/class/ieee80211/phy0/macaddress.

This doesn't affect XW and Unifi AC devices, where the label MAC
address source is defined via device tree.

For alfa-network,ap121f the location 0x1002 is kept, as this has
been verified during device support preparation in PR #2199.

Fixes: d421a8b94489 ("ath79: read label MAC address from flash
instead of using phy0/phy1")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agogre: add ipv6 parameter to gre interfaces
Alin Nastac [Tue, 12 Nov 2019 14:11:00 +0000 (15:11 +0100)]
gre: add ipv6 parameter to gre interfaces

IPv6 protocol is enabled on all gre interfaces, but gre(v6)tap
interfaces are usually added to a bridge interface, in which case
IPv6 should be enabled only on the bridge interface.

Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
4 years agocurl: bump to 7.67.0
Hans Dedecker [Mon, 2 Dec 2019 19:42:46 +0000 (20:42 +0100)]
curl: bump to 7.67.0

For changes in 7.67.0; see https://curl.haxx.se/changes.html#7_67_0

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agoocteon: fix sysupgrade
Stijn Tintel [Sat, 30 Nov 2019 18:17:42 +0000 (20:17 +0200)]
octeon: fix sysupgrade

Sysupgrade was failing due to incorrect replacement of backticks:
/sbin/sysupgrade: /lib/upgrade/platform.sh: line 101: syntax error: missing '))'

Fixes: 0bbfc3dff719 ("octeon: replace backticks by $(...)")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
4 years agogeneric ar8xxx: increase VLAN table for AR83x7
David Bauer [Sun, 24 Nov 2019 19:53:39 +0000 (20:53 +0100)]
generic ar8xxx: increase VLAN table for AR83x7

The Atheros AR8327 and AR8337 have (according to their datasheet) a
VLAN table with a maximum of 4096 entries.

Currently, there's a hard limit of 128 VLANs, which is the same as
for most other Atheros switches. Increase this limit only for the
AR83x7 series and modify some shared functions to allow them to work
with a variable max VLAN count.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agomac80211: switch to upstream owl-loader driver
Christian Lamparter [Sat, 16 Nov 2019 16:08:07 +0000 (17:08 +0100)]
mac80211: switch to upstream owl-loader driver

The Owl Loader (named after the codename that Atheros gave
these devices back in the day) has been accepted upstream.

This patch removes the "misc" driver OpenWrt had and adds
the remaining differences against the version that ships
with 5.4-rc1 into a separate "120-owl-loader-compat.patch"
file that can be cut down once AR71XX is being dealt with.

Note: I decided to keep the existing (kmod-)owl-loader
package name around for now. The kernel module file in
the kmod package will be called ath9k_pci_owl_loader.ko
though.

Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agobusybox: add glibc dependency for vi regex option
Satadru Pramanik [Fri, 15 Nov 2019 17:42:44 +0000 (12:42 -0500)]
busybox: add glibc dependency for vi regex option

Build with musl libc fails with BUSYBOX_DEFAULT_FEATURE_VI_REGEX_SEARCH
enabled. Enabling BusyBox's vi regex search option depends upon GNU
regex.  Musl libc does not support GNU regex[1].

So this patch adds explicit dependency on GNU libc and while at it
remove the FIXME comment.

1. https://wiki.musl-libc.org/functional-differences-from-glibc.html

Ref: https://dev.archive.openwrt.org/ticket/21741.html
Ref: https://forum.openwrt.org/t/busybox-not-compiling/
Ref: https://github.com/openwrt/packages/issues/4453
Signed-off-by: Satadru Pramanik <satadru@umich.edu>
[commit subject/description tweaks, From: fix, USE_GLIBC fix, removed comments]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoglibc: backport fix for regexec buffer read overrun
Alin Nastac [Thu, 21 Nov 2019 13:06:18 +0000 (14:06 +0100)]
glibc: backport fix for regexec buffer read overrun

Problem found by AddressSanitizer[1]:

 Latest `grep` (git commit 1019e6e) compiled with asan may cause a
 heap-buffer-overflow when `-i` is specified.

     ./grep -i '\(\(\)*.\)*\(\)\(\)\1' /bin/chvt

 =================================================================
 ==16206==ERROR: AddressSanitizer: heap-buffer-overflow on address

1. https://debbugs.gnu.org/34140

Ref: https://sourceware.org/bugzilla/show_bug.cgi?id=24114
Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
[commit title and description facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoRevert "mt76: probe load mt7615 driver asynchronously"
DENG Qingfang [Mon, 14 Oct 2019 07:48:32 +0000 (15:48 +0800)]
Revert "mt76: probe load mt7615 driver asynchronously"

This reverts commit 81764319637f ("mt76: probe load mt7615 driver
asynchronously").  After said commit, users report that MT7615 no longer
works on boot and they have to manually enable WiFi (via command "wifi") to
make it working again.

Fixes: FS#2546
Ref: https://forum.openwrt.org/t/xiaomi-r3p-no-wifi-on-boot/45509
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
[commit description facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoipq40xx: add support for Crisis Innovation Lab MeshPoint.One
Robert Marko [Mon, 25 Nov 2019 14:25:00 +0000 (15:25 +0100)]
ipq40xx: add support for Crisis Innovation Lab MeshPoint.One

MeshPoint.One is Wi-Fi hotspot and smart IoT gateway (based upon
Jalapeno module from 8Devices).

MeshPoint.One (https://meshpointone.com) is a unique Wi-Fi hotspot and
smart city gateway that can be installed and powered from street
lighting (even solar power in the future).  MeshPoint provides up to 27
hours of interrupted Wi-Fi and IoT services from internal battery even
when external power is not available.  MeshPoint.One can be used for
disaster relief efforts in order to provide instant Wi-Fi coverage that
can be easily expanded by just adding more devices that create wide area
mesh network.  MeshPoint.One devices have standard Luci UI for
management.

Features:
- 1x 1Gpbs WAN
- 1x 1Gbps LAN
- POE input (eth0)
- POE output (eth1)
- Sensor for temperature, humidity and pressure (Bosch BME280)
- current, voltage and power measurement via TI INA230
- Hardware real time clock
- optional power via Li-Ion battery
- micro USB port with USB to serial chip for easy OpenWrt terminal
  access
- I2C header for connecting additional sensors

Installation:
-------------
Simply flash the sysupgrade image from stock firmware.

Or use the built in Web recovery into bootloader:
Hold Reset button for 5 to 20 seconds or use UART and httpd command.
Web UI will appear on 192.168.2.100 by default.
For web recovery use the factory.ubi image.

Signed-off-by: Damir Samardzic <damir.samardzic@sartura.hr>
Signed-off-by: Damir Franusic <damir.franusic@sartura.hr>
Signed-off-by: Valent Turkovic <valent@meshpoint.me>
Signed-off-by: Robert Marko <robert@meshpoint.me>
[commit description long line wrap, usb->USB]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoipq40xx: use DTSI for Jalapeno
Robert Marko [Mon, 25 Nov 2019 14:12:24 +0000 (15:12 +0100)]
ipq40xx: use DTSI for Jalapeno

Lets move common code for Jalapeno into DTSI, this way Jalapeno based
boards don't introduce duplicate code.

While at it, lets also fix some style issues and update to current DTS
style.

Signed-off-by: Robert Marko <robert@meshpoint.me>
[commit description long line wrap]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agonetifd: update to latest git HEAD
Hans Dedecker [Fri, 29 Nov 2019 20:53:21 +0000 (21:53 +0100)]
netifd: update to latest git HEAD

e45b140 interface: warn if ip6hint is truncated

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agomac80211: unify setup of iw htmode for mesh and adhoc
Santiago Piccinini [Mon, 25 Nov 2019 19:53:59 +0000 (16:53 -0300)]
mac80211: unify setup of iw htmode for mesh and adhoc

This also fixes mac80211_prepare_vif iw set channel in monitor or
mesh mode.

Signed-off-by: Santiago Piccinini <spiccinini@altermundi.net>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: fixed commit message]

4 years agokernel: bump 4.9 to 4.9.205
Koen Vandeputte [Fri, 29 Nov 2019 09:52:01 +0000 (10:52 +0100)]
kernel: bump 4.9 to 4.9.205

Refreshed all patches.

Fixes:
- CVE-2019-18660

Compile-tested on: none
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agokernel: bump 4.19 to 4.19.86
Koen Vandeputte [Mon, 25 Nov 2019 10:32:08 +0000 (11:32 +0100)]
kernel: bump 4.19 to 4.19.86

Refreshed all patches.

Altered patches:
- 950-0064-mfd-Add-Raspberry-Pi-Sense-HAT-core-driver.patch
- 0005-mtd-physmap_of-Move-custom-initialization.patch

Remove upstreamed:
- 0001-pinctrl-gemini-Mask-and-set-properly.patch
- 0002-pinctrl-gemini-Fix-up-TVC-clock-group.patch

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.156
Koen Vandeputte [Mon, 25 Nov 2019 10:29:17 +0000 (11:29 +0100)]
kernel: bump 4.14 to 4.14.156

Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years agoucert: update to latest git HEAD
Daniel Golle [Thu, 28 Nov 2019 19:17:20 +0000 (11:17 -0800)]
ucert: update to latest git HEAD

e4bd927 cast ucert_argv to proper type when passing to execv

Fixes warnings:

warning: passing argument 2 of 'execv' from incompatible pointer type
[-Wincompatible-pointer-types]
  254 |       execv(usign_argv[0], usign_argv)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoconfig: kernel: fix typo in HFSPLUG_FS_POSIX_ACL
Stijn Tintel [Thu, 28 Nov 2019 00:01:05 +0000 (02:01 +0200)]
config: kernel: fix typo in HFSPLUG_FS_POSIX_ACL

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
4 years agompc85xx: add vendor to Makefile node name, derive SUPPORTED_DEVICES
Adrian Schmutzler [Sat, 23 Nov 2019 17:20:34 +0000 (18:20 +0100)]
mpc85xx: add vendor to Makefile node name, derive SUPPORTED_DEVICES

By adding the vendor to the Makefile device definition node name,
one can derive the standard compatible used in SUPPORTED_DEVICES
instead of having to specify it manually.

Despite, this moves the naming scheme closer to what is used for
other targets (ath79, ramips).

Build-tested on all subtargets.
Run-tested on TP-Link TL-WDR4900 v1.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agotools: tplink-safeloader: fix whitespace issues
Adrian Schmutzler [Wed, 27 Nov 2019 20:05:29 +0000 (21:05 +0100)]
tools: tplink-safeloader: fix whitespace issues

This replaces tabs by spaces when preceding an equal sign. This improves
consistency in the file and makes the indent look correct on all platforms.

While at it, also fix one case of inconsistent leading spaces.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: add support for TP-Link Archer C6 v2 (US) and A6 (US/TW)
Anderson Vulczak [Sat, 5 Oct 2019 13:44:55 +0000 (10:44 -0300)]
ath79: add support for TP-Link Archer C6 v2 (US) and A6 (US/TW)

This patch is based on #1689 and adds support for TP-Link Archer
C6 v2 (US) and A6 (US/TW).

The hardware is the same as EU and RU variant, except for GPIOs
(LEDS/Buttons), flash(chip/partitions) and UART being available
on the board.

- SOC: Qualcomm QCA9563 @ 775MHz
- Flash: GigaDevice GD25Q127CS1G (16MiB)
- RAM: Zentel A3R1GE40JBF (128 MiB DDR2)
- Ethernet: Qualcomm QCA8337N: 4x 1Gbps LAN + 1x 1Gbps WAN
- Wireless:
  - 2.4GHz (bgn) QCA9563 integrated (3x3)
  - 5GHz (ac) Qualcomm QCA9886 (2x2)
- Button: 1x power, 1x reset, 1x wps
- LED: 6x LEDs: power, wlan2g, wlan5g, lan, wan, wps
- UART: 115200, 8n1 (header available on board)

Known issues:
 - Wireless: 5GHz is known to have lower RSSI signal, it affects speed and range.

Flash instructions:

Upload openwrt-ath79-generic-tplink_archer-c6-v2-us-squashfs-factory.bin
via the router Web interface.

Flash instruction using tftp recovery:

1. Connect the computer to one of the LAN ports of the router
2. Set the computer IP to 192.168.0.66
3. Start a tftp server with the OpenWrt factory image in the
   tftp root directory renamed to ArcherA6v2_tp_recovery.bin.
4. Connect power cable to router, press and hold the
   reset button and turn the router on
5. Keep the reset button pressed until the WPS LED lights up
6. Wait ~150 seconds to complete flashing

Flash partitioning: I've followed #1689 for defining the partition layout
for this patch. The partition named as "tplink" @ 0xfd0000 is marked
as read only as it is where some config for stock firmware are stored.
On stock firmware those stock partitions starts at 0xfd9400 however
I had not been able to make it functional starting on the same address as
on stock fw, so it has been partitioned following #1689 and not the stock
partition layout for this specific partition. Due to that firmware/rootfs
partition lenght is 0xf80000 and not 0xf89400 as stock.

According to the GPL code, the EU/RU/JP variant does have different GPIO pins
assignment to LEDs and buttons, also the flash memory layout is different.

GPL Source Code: https://static.tp-link.com/resources/gpl/gpl-A6v2_us.tar.gz

Signed-off-by: Anderson Vulczak <andi@andi.com.br>
[wrap commit message, remove soft_ver change for C6 v2 EU, move LED aliases
to DTS files, remove dts-v1 in DTSI, node/property reorder in DTSI]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: rename EEPROM to art
Adrian Schmutzler [Fri, 22 Nov 2019 13:42:47 +0000 (14:42 +0100)]
ath79: rename EEPROM to art

This renames all remaining occurrences of "EEPROM" to "art" to
further harmonize the partition labelling in ath79. This will
help to reduce the amount of user-space code and might be
beneficial when code is copy/pasted in the future.

Affected are only devices from Ubiquiti, where the XM board is
already using "art" in ath79.

Acked-by: Piotr Dymacz <pepe2k@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agowireguard: bump to 0.0.20191127
Jason A. Donenfeld [Wed, 27 Nov 2019 14:50:49 +0000 (15:50 +0100)]
wireguard: bump to 0.0.20191127

* messages: recalculate rekey max based on a one minute flood
* allowedips: safely dereference rcu roots
* socket: remove redundant check of new4
* allowedips: avoid double lock in selftest error case
* tools: add syncconf command

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
4 years agoprocd: update to latest git HEAD
Hans Dedecker [Tue, 26 Nov 2019 20:53:21 +0000 (21:53 +0100)]
procd: update to latest git HEAD

3aa051b system: sysupgrade: close input side of pipe before reading

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agouboot-envtools: ath79: add support for YunCore XD4200 and A782
Piotr Dymacz [Wed, 13 Nov 2019 13:51:31 +0000 (14:51 +0100)]
uboot-envtools: ath79: add support for YunCore XD4200 and A782

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
5 years agoath79: add support for YunCore XD4200 and A782
Piotr Dymacz [Tue, 12 Nov 2019 21:36:28 +0000 (22:36 +0100)]
ath79: add support for YunCore XD4200 and A782

YunCore XD4200 ('XD4200_W6.0' marking on PCB) is Qualcomm/Atheros based
(QCA9563, QCA9886, QCA8334) dual-band, Wave-2 AC1200 ceiling AP with PoE
(802.3at) support. A782 model ('T750_V5.1' marking on PCB) is a smaller
version of the XD4200, with similar specification but lower TX power.

Specification:

- QCA9563 (775 MHz)
- 128 MB of RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- 2x 10/100/1000 Mbps Ethernet (QCA8334), with 802.3at PoE support (WAN)
- Wi-Fi 2.4 GHz:
  - XD4200: 2T2R (QCA9563), with ext. PA (SKY65174-21) and LNA
  - A782: 2T2R (QCA9563), with ext. FEM (SKY85329-11)
- Wi-Fi 5 GHz:
  - XD4200: 2T2R (QCA9886), with ext. FEM (SKY85728-11)
  - A782: 2T2R (QCA9886), with ext. FEM (SKY85735-11)
- LEDs:
  - XD4200: 5x (2x driven by SOC, 1x driven by AC radio, 2x Ethernet)
  - A782: 3x (1x RGB, driven by SOC and radio, 2x Ethernet)
- 1x button (reset)
- 1x UART (4-pin, 2.54 mm pitch) header on PCB
- 1x DC jack (12 V)

Flash instructions:

If your device comes with generic QSDK based firmware, you can login
over telnet (login: root, empty password, default IP: 192.168.188.253),
issue first (important!) 'fw_setenv' command and then perform regular
upgrade, using 'sysupgrade -n -F ...' (you can use 'wget' to download
image to the device, SSH server is not available):

  fw_setenv bootcmd "bootm 0x9f050000 || bootm 0x9fe80000"
  sysupgrade -n -F openwrt-...-yuncore_...-squashfs-sysupgrade.bin

In case your device runs firmware with YunCore custom GUI, you can use
U-Boot recovery mode:

1. Set a static IP 192.168.0.141/24 on PC and start TFTP server with
   'tftp' image renamed to 'upgrade.bin'
2. Power the device with reset button pressed and release it after 5-7
   seconds, recovery mode should start downloading image from server
   (unfortunately, there is no visible indication that recovery got
   enabled - in case of problems check TFTP server logs)

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
5 years agoath79: add support for YunCore TFTP image generation
Vincent Wiemann [Mon, 12 Aug 2019 23:26:45 +0000 (01:26 +0200)]
ath79: add support for YunCore TFTP image generation

YunCore QCA9k based devices released in 2019 require a custom TFTP image
for U-Boot built-in recovery mode (triggered with reset button). Image
has to be prepended with 'YUNCORE' keyword followed by U-Boot CLI
commands which will be executed later. Images without the custom header
will be ignored by U-Boot.

To be able to support both the vendor firmware (QSDK) and OpenWrt flash
layouts, used here commands change the 'bootcmd' before flashing image.

This commit adds generic helper script for YunCore devices with 16 MB of
flash and enables TFTP image generation for A770 model.

Signed-off-by: Vincent Wiemann <vincent.wiemann@ironai.com>
[pepe2k@gmail.com: commit description reworded, recipe renamed]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
5 years agoath79: generic: base-files: fix indentation in 02_network
Piotr Dymacz [Sun, 10 Nov 2019 23:33:58 +0000 (00:33 +0100)]
ath79: generic: base-files: fix indentation in 02_network

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
5 years agotools/expat: change package source to GitHub
David Bauer [Sat, 23 Nov 2019 18:28:47 +0000 (19:28 +0100)]
tools/expat: change package source to GitHub

According to the SourceForge page, the project is migrating to GitHub.
Thus, change the source of the package to GitHub.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoramips: reorganize NETGEAR sercomm boards
David Bauer [Sun, 17 Nov 2019 14:51:48 +0000 (15:51 +0100)]
ramips: reorganize NETGEAR sercomm boards

This re-organizes the device-tree files for the Sercomm-manufactured
NETGEAR routers. They are now split into two different base-boards,
from which the respective model is extended.

This partially reverts commit c7842ceaaa27 ("ramips: reorganize DTSI
files for Netgear R devices"), which introduced inheritance between two
completely unrelated base-boards.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoccache: update to 3.7.6
DENG Qingfang [Sun, 24 Nov 2019 12:27:53 +0000 (20:27 +0800)]
ccache: update to 3.7.6

Update ccache to 3.7.6

Release notes:
https://ccache.dev/releasenotes.html#_ccache_3_7_6

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years agotools/quilt: update to 0.66
Hannu Nyman [Sat, 9 Nov 2019 20:22:15 +0000 (22:22 +0200)]
tools/quilt: update to 0.66

Update quilt to version 0.66

Release notes at:
http://git.savannah.nongnu.org/cgit/quilt.git/tree/NEWS?id=294006e12

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
5 years agolibubox: update to latest Git HEAD
Petr Štetiar [Sun, 24 Nov 2019 12:51:42 +0000 (13:51 +0100)]
libubox: update to latest Git HEAD

07413cce72e1 tests: jshn: add more test cases
26586dae43a8 jshn: fix missing usage for -p and -o arguments
8e832a771d3a jshn: fix off by one in jshn_parse_file
cb698e35409b jshn: jshn_parse: fix leaks of memory pointed to by 'obj'
c42f11cc7c0f jshn: main: fix leak of memory pointed to by 'vars'
93848ec96dc5 jshn: refactor main into smaller pieces
9b6ede0e5312 avl: guard against theoretical null pointer dereference
c008294a8323 blobmsg_json: fix possible uninitialized struct member
0003ea9c45cc base64: fix possible null pointer dereference
8baeeea1f52d add assert.h component
b0a5cd8a28bf add cram based unit tests
1fefb7c4d7f9 add initial GitLab CI support
c955464d7a9b enable extra compiler checks
6228df9de91d iron out all extra compiler warnings

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoath79: remove ath10k drivers from Archer C7 v1 profile
Stijn Segers [Fri, 22 Nov 2019 18:38:46 +0000 (19:38 +0100)]
ath79: remove ath10k drivers from Archer C7 v1 profile

Ath10k packages were removed from ar71xx in master in commit
34113999ef43 ("ar71xx: Remove ath10k packages from archer-c7-v1 (fixes
FS#1743)") but ath79 in master and the 19.07 branch still suffer from
the issue.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
[commit description facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agotreewide: kernel config: remove runtime options
Petr Štetiar [Mon, 18 Nov 2019 14:40:08 +0000 (15:40 +0100)]
treewide: kernel config: remove runtime options

Remove CC_HAS_ASM_GOTO, CC_IS_GCC and GCC_VERSION kernel config options
which are set at runtime and which should be ignored now.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agokernel-build: ignore runtime config options during reconfig
Petr Štetiar [Mon, 18 Nov 2019 13:32:23 +0000 (14:32 +0100)]
kernel-build: ignore runtime config options during reconfig

Don't put CC_HAS_ASM_GOTO, IS_GCC, IS_CLANG and GCC_VERSION runtime
config options into the kernel configs during reconfiguration as it
makes no sense, since these options should be set at runtime.

Fixes: FS#2588
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agonghttp2: bump to 1.40.0
Hans Dedecker [Sat, 23 Nov 2019 20:25:13 +0000 (21:25 +0100)]
nghttp2: bump to 1.40.0

41060943 Bump up version number to 1.40.0, LT revision to 33:0:19
5ae9bb89 Fail fast if huffman decoding context is in failure state
bb519154 Merge pull request #1413 from nghttp2/check-authority
77f5487a Add nghttp2_check_authority as public API
db9a8f6e Merge pull request #1409 from nghttp2/fix-wrong-stream-close-error-code
6f28a69b Merge pull request #1411 from richard78917/fix_warning
6ce4835e Fix the bug that stream is closed with wrong error code
29042f1c priority_spec::valid(): remove const qualifier from return value
d08c4395 Merge pull request #1405 from nghttp2/huffman
5d6964cf Faster huffman decoding
0d855bfc Faster huffman encoding
6f967c6e Fix errors reported by coverity scan
b8a43db8 Merge pull request #1394 from wrowe/fix-static-libname
70b62c1a Merge pull request #1393 from wrowe/fix-static-msvcrt
28b1f0b9 Avoid filename collision of static and dynamic lib
1dd966f1 Merge branch 'fix-nghttpx-mruby'
fe8946dd nghttpx: Fix bug that mruby is incorrectly shared between backends
72b71a6b Add new flag ENABLE_STATIC_CRT for Windows
f8933fe5 nghttpx: Reconnect h1 backend if it lost connection before sending headers
89c33d69 Update neverbleed
7079dc5e Update neverbleed to fix memory leak
5080db84 Revert "nghttpx: Reconnect h1 backend if it lost connection before sending headers"
053c7ac5 nghttpx: Returns 408 if backend timed out before sending headers
8a59ce6d nghttpx: Reconnect h1 backend if it lost connection before sending headers
f2fde180 Remove redundant null check before delete
95efb3e1 Don't read too greedily
0a6ce87c Add nghttp2_option_set_max_outbound_ack
2aa79fa9 Bump up LT revision to 32:0:18
3980678d Merge branch 'nghttpx-fix-request-stall'
319d5ab1 nghttpx: Fix request stall
448bbbc3 integration-tests: gofmt
e575a2aa Merge pull request #1377 from Aldrog/cmake_systemd
4f7aedc9 cmake: Support building nghttpx with systemd
7a590893 Fix clang-8 warning
ee443134 Fix FPE with default backend
abef9b90 Fix log-level is not set with cmd-line or configuration file
12a999f0 Bump up version number to 1.40.0-DEV
acfb3607 Update manual pages

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agokernel: nf_conntrack_rtcache: fix WARNING on rmmod
Yousong Zhou [Sat, 23 Nov 2019 18:05:45 +0000 (18:05 +0000)]
kernel: nf_conntrack_rtcache: fix WARNING on rmmod

Fixes b7c58a1ee ("kernel: nf_conntrack_rtcache: fix cleanup on netns
delete and rmmod")

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years agokernel: nf_conntrack_rtcache: fix WARNING on forward path
Yousong Zhou [Sat, 23 Nov 2019 17:10:09 +0000 (17:10 +0000)]
kernel: nf_conntrack_rtcache: fix WARNING on forward path

Fixes b7c58a1ee ("kernel: nf_conntrack_rtcache: fix cleanup on netns
delete and rmmod")

Resolves FS#2624

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years agobuild: add PKG_SOURCE_URL_FILE support
Kamil Wcislo [Thu, 5 Jul 2018 19:40:19 +0000 (21:40 +0200)]
build: add PKG_SOURCE_URL_FILE support

It seems that there is a missing PKG_SOURCE_URL_FILE support.
This little fix adds the support for packages to change the name of the
downloaded file.

Sometimes it is desirable to change the downloaded archive file name, like
for mitigating name conflicts for different packages (some files on the server
could be named like, e.g. 2018-01-01.tar.gz) or for the cases that there is
no name for the file in the URL (e.g. http://someserver.com/download).

Signed-off-by: Kamil Wcislo <kamil.wcislo@lpnplant.io>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
5 years agoath79: improve TP-Link CPE DTSI names for ar9344 SOC
Adrian Schmutzler [Fri, 22 Nov 2019 10:50:00 +0000 (11:50 +0100)]
ath79: improve TP-Link CPE DTSI names for ar9344 SOC

The initial DTSI names for the TP-Link CPE devices have become
quite confusing, as several non-V1 devices now use the *-v1.dtsi,
the *cpe510-v1.dts does not use the cpe510.dtsi, etc.

This introduces a new naming scheme based on whether devices have
one or two ports, which should be easier to grasp.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agotplink-safeloader: shorten version number of TP-Link WBS210 v2
Bernhard Geier [Fri, 22 Nov 2019 22:11:24 +0000 (23:11 +0100)]
tplink-safeloader: shorten version number of TP-Link WBS210 v2

"2.0" instead of "2.00" is sufficient and more in line with the
other definitions.

Signed-off-by: Bernhard Geier <freifunk@geierb.de>
[commit message/title adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agobase-files: config_generate: split macaddr with multiple ifaces
Sungbo Eo [Mon, 11 Nov 2019 16:20:45 +0000 (01:20 +0900)]
base-files: config_generate: split macaddr with multiple ifaces

netifd does not handle network.@device[x].name properly if it
contains multiple ifaces separated by spaces. Due to this, board.d
lan_mac setup does not work if multiple ifaces are set to LAN by
ucidef_set_interface_lan.

To fix this, create a device node for each member iface when
running config_generate instead. Those are named based on the
member ifname:

  ucidef_set_interface_lan "eth0 eth1.1"
  ucidef_set_interface_macaddr "lan" "yy:yy:yy:yy:yy:01"

will return

  config device 'lan_eth0_dev'
        option name 'eth0'
        option macaddr 'yy:yy:yy:yy:yy:01'

  config device 'lan_eth1_1_dev'
        option name 'eth1.1'
        option macaddr 'yy:yy:yy:yy:yy:01'

ref: https://github.com/openwrt/openwrt/pull/2542

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[always use new scheme, extend description, change commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: DTS style improvement for Ubiquiti XM and BZ devices
Adrian Schmutzler [Tue, 19 Nov 2019 14:47:11 +0000 (15:47 +0100)]
ath79: DTS style improvement for Ubiquiti XM and BZ devices

This applies minor style improvements and removes commented pll
clock adjustments from ubnt_xm DTSI. The latter were introduced
(already commented out) when adding ath79 target and have never
been touched since then. For Unifi (BZ board), similar clock
adjustments are employed and used.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agokernel: nf_conntrack_rtcache: fix cleanup on netns delete and rmmod
Yousong Zhou [Wed, 13 Nov 2019 17:03:12 +0000 (17:03 +0000)]
kernel: nf_conntrack_rtcache: fix cleanup on netns delete and rmmod

Fixes FS#1472, FS#2353, FS#2426

Fixes: b3f95490 ("kernel: generic: Add kernel 4.14 support")
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agomac80211: add default value for noscan
Sebastian Kemper [Sat, 23 Nov 2019 10:25:02 +0000 (11:25 +0100)]
mac80211: add default value for noscan

Commit b3d8b3a introduced a new test:

[ -n "$noscan" -a "$noscan" -gt 0 ] && hostapd_noscan=1

But if length of "$noscan" is zero (noscan is not set) this doesn't stop
the shell to evaluate the rest of the test.

root@hank2:~# [ -n "$noscan" -a "$noscan" -gt 0 ]
ash: out of range
root@hank2:~#

So when radios are brought up this shows in the log:

Sat Nov 23 10:51:38 2019 daemon.info procd: - init complete -
Sat Nov 23 10:52:24 2019 daemon.notice netifd: radio1 (1243): sh: out of range
Sat Nov 23 10:52:25 2019 user.notice firewall: Reloading firewall due to ifup of wan (eth0.2)
Sat Nov 23 10:52:25 2019 daemon.notice netifd: radio0 (1242): sh: out of range
Sat Nov 23 10:52:26 2019 authpriv.info dropbear[1536]: Not backgrounding

This commit sets noscan to 0 if unset and removes the gratuitous length
check, preventing the warning.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
5 years agodnsmasq: correct sense & usage of dnsseccheckunsigned
Kevin Darbyshire-Bryant [Fri, 22 Nov 2019 14:04:02 +0000 (14:04 +0000)]
dnsmasq: correct sense & usage of dnsseccheckunsigned

dnsmasq v2.80 made 'dnssec-check-unsigned' the default, thus the uci
option was rendered ineffectual: we checked unsigned zones no matter the
setting.

Disabling the checking of unsigned zones is now achieve with the
"--dnssec-check-unsigned=no" dnsmasq option.

Update init script to pass required option in the disabled case.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agoe2fsprogs: Fix CVE-2019-5094 in libsupport
Hauke Mehrtens [Fri, 22 Nov 2019 21:43:25 +0000 (22:43 +0100)]
e2fsprogs: Fix CVE-2019-5094 in libsupport

This adds the following patch from debian:
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/?h=debian/stable&id=09fe1fd2a1f9efc3091b4fc61f1876d0785956a8
libsupport: add checks to prevent buffer overrun bugs in quota code

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agomac80211: update to version 5.4-rc8
Hauke Mehrtens [Thu, 21 Nov 2019 21:20:20 +0000 (22:20 +0100)]
mac80211: update to version 5.4-rc8

This updates mac80211 to backports based on kernel 5.4-rc8.

The deleted patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agokernel: Add missing configuration option
Hauke Mehrtens [Fri, 22 Nov 2019 19:13:55 +0000 (20:13 +0100)]
kernel: Add missing configuration option

This was found by the build bot.

Fixes: e29500eb849a ("kernel: bump 4.19 to 4.19.85")
Fixes: db9e9e838216 ("kernel: bump 4.14 to 4.14.155")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agofirewall: update to latest Git HEAD
Jo-Philipp Wich [Fri, 22 Nov 2019 17:53:03 +0000 (18:53 +0100)]
firewall: update to latest Git HEAD

8174814 utils: persist effective extra_src and extra_dest options in state file
72a486f zones: fix emitting match rules for zones with only "extra" options

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agocns3xxx: use proper macros for defining partition regions
Koen Vandeputte [Fri, 22 Nov 2019 08:58:50 +0000 (09:58 +0100)]
cns3xxx: use proper macros for defining partition regions

While at it, also reorder the items for
improved readability.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.19 to 4.19.85
Koen Vandeputte [Thu, 21 Nov 2019 13:09:35 +0000 (14:09 +0100)]
kernel: bump 4.19 to 4.19.85

Refreshed all patches.

Altered patches:
- 080-sata_support.patch

Remove upstreamed:
- 034-v4.20-MIPS-BCM47XX-Enable-USB-power-on-Netgear-WNDR3400v3.patch
- 001-4.21-01-BCM63XX-fix-switch-core-reset-on-BCM6368.patch
- 073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.14 to 4.14.155
Koen Vandeputte [Thu, 21 Nov 2019 13:03:58 +0000 (14:03 +0100)]
kernel: bump 4.14 to 4.14.155

Refreshed all patches.

Altered patches:
- 707-dpaa-ethernet-support-layerscape.patch

Remove upstreamed:
- 034-v4.20-MIPS-BCM47XX-Enable-USB-power-on-Netgear-WNDR3400v3.patch
- 001-4.21-01-BCM63XX-fix-switch-core-reset-on-BCM6368.patch
- 073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agoath79: add support for the TP-LINK WBS510 V1
Andrew Cameron [Fri, 8 Nov 2019 03:36:02 +0000 (21:36 -0600)]
ath79: add support for the TP-LINK WBS510 V1

This adds support for a popular low-cost 5GHz N based AP

Specifications:
- SoC: Atheros AR9344
- RAM: 64MB
- Storage: 8 MB SPI NOR
- Wireless: 5GHz 300 Mbps, 2x RP-SMA connector, 27 dBm TX power
- Ethernet: 1x 10/100 Mbps with 24V POE IN, 1x 10/100 Mbps

Installation:
Flash factory image through stock firmware WEB UI
or through TFTP
To get to TFTP recovery just hold reset button while powering on for
around 4-5 seconds and release.
Rename factory image to recovery.bin
Stock TFTP server IP:192.168.0.100
Stock device TFTP adress:192.168.0.254

Signed-off-by: Andrew Cameron <apcameron@softhome.net>
5 years agoath79: add support for the TP-LINK WBS510 V2
Andrew Cameron [Thu, 7 Nov 2019 02:12:55 +0000 (20:12 -0600)]
ath79: add support for the TP-LINK WBS510 V2

This adds support for a popular low-cost 5GHz N based AP

Specifications:
 - SoC: Atheros AR9344
 - RAM: 64MB
 - Storage: 8 MB SPI NOR
 - Wireless: 5GHz 300 Mbps, 2x RP-SMA connector, 27 dBm TX power
 - Ethernet: 1x 10/100 Mbps with 24V POE IN, 1x 10/100 Mbps

Installation:
Flash factory image through stock firmware WEB UI
or through TFTP
To get to TFTP recovery just hold reset button while powering on for
around 4-5 seconds and release.
Rename factory image to recovery.bin
Stock TFTP server IP:192.168.0.100
Stock device TFTP adress:192.168.0.254

Signed-off-by: Andrew Cameron <apcameron@softhome.net>
5 years agowireless-regdb: Make it build with python2
Hauke Mehrtens [Sun, 17 Nov 2019 22:59:37 +0000 (23:59 +0100)]
wireless-regdb: Make it build with python2

This backports a patch to build it work with python2 in addition to
python3.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Petr Štetiar <ynezz@true.cz>
5 years agoar71xx: ubnt-(xm,xw): add rssileds package
Lech Perczak [Sun, 17 Nov 2019 19:58:27 +0000 (20:58 +0100)]
ar71xx: ubnt-(xm,xw): add rssileds package

In order to make RSSI indicator on the device work out of box,
include "rssileds" package in per-device rootfs image by default
for Ubiquiti XM and XW devices, namely:
- Bullet M (XM/XW)
- Rocket M (XM/XW)
- Nanostation M (XM/XW)
- Nanostation Loco-M (XW)

This moves the package addition to the individual devices in order
to prevent accidental inclusions of the package when not looking
at the parent node carefully enough.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[add bullet-m-xw, remove rocket-m-ti, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoath79: add PoE passthrough switch for Ubiquiti Nanostation (XM/XW)
Adrian Schmutzler [Mon, 18 Nov 2019 22:59:06 +0000 (23:59 +0100)]
ath79: add PoE passthrough switch for Ubiquiti Nanostation (XM/XW)

This adds the gpio switch to enable PoE passthrough on Ubiquiti
Nanostation (XM/XW).

Values are copied from the implementation in ar71xx.

GPIO values checked on:
- NanoStation M5 XW
- NanoStation M2 XM

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agouboot-mvebu: add uDPU board
Vladimir Vid [Mon, 9 Sep 2019 16:50:26 +0000 (18:50 +0200)]
uboot-mvebu: add uDPU board

* add u-boot support for uDPU
* add line to copy u-boot binary to STAGING_DIR_IMAGE, this can later be used
as BL33 variable required for ATF build
* add patch to increase max gunzip size in mvebu_armada-37xx.h which is
required for booting the itb recovery images

Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr>
5 years agopackages/boot: add arm-trusted-firmware-mvebu and initial uDPU support
Vladimir Vid [Fri, 25 Oct 2019 15:24:38 +0000 (17:24 +0200)]
packages/boot: add arm-trusted-firmware-mvebu and initial uDPU support

ATF mvebu is required for building a functional bootloader for A7K/A8K and
A37xx platforms. uDPU device is added as the first target.

A3700 platform has a wide range of settings which can be used per device, so
options are defined under the Device sections.

Platform also required WTP (recovery) tools and mv-ddr package for the DDR
topology configuration. 32-bit cross compiler is used for building the WTMI
image.

After the build, flash-image.bin can be used with the bubt command from the
u-boot shell to flash the new version of u-boot.

Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr>
5 years agonetifd: dhcp proto convert release to norelease
Kevin Darbyshire-Bryant [Tue, 19 Nov 2019 15:12:42 +0000 (15:12 +0000)]
netifd: dhcp proto convert release to norelease

Change dhcp no/release on shutdown to 'norelease' uci option to match
existing proto dhcpv6 usage.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Acked-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agoam33x-cm3: remove
Andre Heider [Thu, 3 Oct 2019 16:11:17 +0000 (18:11 +0200)]
am33x-cm3: remove

This is currently unused and not working anyway, since the used upstream
kernel loads am335x-pm-firmware.elf and not am335x-pm-firmware.bin [0].

The last downstream patches using the latter were removed with e4eef7e6.

Remove it instead of fixing it since the rtc-only sleep state can even
damage the hardware [1].

[0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ccbbb9faac946ce61c241ce9f08b3486fabf031d
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7a6cb0abe1aa63334f3ded6d2b6c8eca80e72302

Signed-off-by: Andre Heider <a.heider@gmail.com>
5 years agoomap: support booting off different mmc devices
Andre Heider [Sat, 7 Sep 2019 10:36:52 +0000 (12:36 +0200)]
omap: support booting off different mmc devices

Tested with installing to/sysupgrading from sd and emmc on boneblack.

Signed-off-by: Andre Heider <a.heider@gmail.com>
5 years agoomap: switch from uEnv.txt to generic distro booting
Andre Heider [Fri, 6 Sep 2019 20:53:23 +0000 (22:53 +0200)]
omap: switch from uEnv.txt to generic distro booting

Which makes supporting different boot devices easy.

Signed-off-by: Andre Heider <a.heider@gmail.com>
5 years agoomap: update uboot to 2019.10
Andre Heider [Fri, 6 Sep 2019 09:25:30 +0000 (11:25 +0200)]
omap: update uboot to 2019.10

All patches have been dropped, they're either redundant (e.g. due to the
new and unset CONFIG_SPL_FAT_WRITE), break compilation (thumb hacks) or
have been applied upstream.

The defconfig for am335x_boneblack has been removed upstream [0], so use
am335x_evm for boneblack too.

Size changes (before, after, file):

ti_am335x-evm and ti_am335x-bone-black:
  79804 110832 MLO
 623836 756148 u-boot.img

ti_omap3-beagle:
  54148  57708 MLO
 496272 665728 u-boot.img

ti_omap4-panda:
  39356  40204 MLO
 284648 366672 u-boot.img

Tested on boneblack, which has the biggest spl size increase. The beagle and
panda spl sizes seem reasonable to not break booting.

[0] https://gitlab.denx.de/u-boot/u-boot/commit/8fa7f65dd02c176ee6021eaf40114560b8954ba2

Signed-off-by: Andre Heider <a.heider@gmail.com>
5 years agoomap: switch to kernel 4.19
Andre Heider [Fri, 6 Sep 2019 07:48:22 +0000 (09:48 +0200)]
omap: switch to kernel 4.19

Signed-off-by: Andre Heider <a.heider@gmail.com>
5 years agoomap: enable new sound kernel options
Andre Heider [Fri, 6 Sep 2019 10:00:17 +0000 (12:00 +0200)]
omap: enable new sound kernel options

This gets rid of a boot time warning about the missing edma module.
Enable SND_OMAP_SOC_HDMI_AUDIO while here.
All enabled options default to y.

Signed-off-by: Andre Heider <a.heider@gmail.com>
5 years agoomap: disable excess kernel debug options
Andre Heider [Sun, 13 Oct 2019 03:56:46 +0000 (05:56 +0200)]
omap: disable excess kernel debug options

Signed-off-by: Andre Heider <a.heider@gmail.com>
5 years agoomap: run `make oldconfig` for kernel 4.19
Andre Heider [Fri, 6 Sep 2019 07:48:00 +0000 (09:48 +0200)]
omap: run `make oldconfig` for kernel 4.19

The only manually enabled config is the new OMAP4_DSS_HDMI_CEC, which
defaults to y.

Signed-off-by: Andre Heider <a.heider@gmail.com>
5 years agoomap: copy the kernel 4.14 config for 4.19
Andre Heider [Fri, 6 Sep 2019 07:22:29 +0000 (09:22 +0200)]
omap: copy the kernel 4.14 config for 4.19

Signed-off-by: Andre Heider <a.heider@gmail.com>
5 years agoipq40xx: fix build error
Koen Vandeputte [Wed, 20 Nov 2019 07:50:24 +0000 (08:50 +0100)]
ipq40xx: fix build error

Add missing brace which was accidentally omitted

Fixes: d6aea46a50d9 ("kernel: bump 4.14 to 4.14.154")
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agobrcm2708: remove useless patches
Koen Vandeputte [Wed, 20 Nov 2019 06:57:36 +0000 (07:57 +0100)]
brcm2708: remove useless patches

The first adds some stuff while the second one
just reverts it.

Remove both patches.

This is done is a separate commit on purpose to make it clear.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>