5 years agoipq-wifi: add a note / reminder about upstreaming new board files
Christian Lamparter [Sun, 29 Jul 2018 09:55:13 +0000 (11:55 +0200)]
ipq-wifi: add a note / reminder about upstreaming new board files

|Please send a mail with your device-specific board files upstream.
|You can find instructions and examples on the linux-wireless wiki:

Signed-off-by: Christian Lamparter <>
5 years agobrcm63xx: drop linux,part-probe usage where possible
Jonas Gorski [Sun, 29 Jul 2018 11:09:22 +0000 (13:09 +0200)]
brcm63xx: drop linux,part-probe usage where possible

It was present as 4.4 compatibility, but since we now use 4.9 or later
with the new upstream solution, we don't need it anymore.

Signed-off-by: Jonas Gorski <>
5 years agobrcm63xx: drop own implementation of DT partitions in favour of upstream
Jonas Gorski [Sun, 29 Jul 2018 10:53:49 +0000 (12:53 +0200)]
brcm63xx: drop own implementation of DT partitions in favour of upstream

The binding works the same, so we can just drop the revert and the patch.

Signed-off-by: Jonas Gorski <>
5 years agothc-ipv6: Update URLs
Rosen Penev [Sun, 29 Jul 2018 07:35:58 +0000 (00:35 -0700)]
thc-ipv6: Update URLs

Development has moved to GitHub. Found using UScan.

Signed-off-by: Rosen Penev <>
5 years agolibjson-c: Update package URL
Rosen Penev [Sun, 29 Jul 2018 07:26:29 +0000 (00:26 -0700)]
libjson-c: Update package URL

Found through UScan.

Signed-off-by: Rosen Penev <>
5 years agobcm53xx: revert SPI controller commit breaking flash reads
Rafał Miłecki [Sun, 29 Jul 2018 09:01:14 +0000 (11:01 +0200)]
bcm53xx: revert SPI controller commit breaking flash reads

That upstream commit caused instability in flash reads. It was reported
but there isn't any proper fix as for now.

Signed-off-by: Rafał Miłecki <>
5 years agotools/cmake: Update to 3.12.0
Daniel Engberg [Sun, 22 Jul 2018 16:31:38 +0000 (18:31 +0200)]
tools/cmake: Update to 3.12.0

Update cmake to 3.12.0
Remove 140-curl-fix-libressl.patch as fix is in upstream

Signed-off-by: Daniel Engberg <>
5 years agobcm53xx: backport BCM5301X/BCM53573 dts commits from 4.19+
Rafał Miłecki [Sat, 28 Jul 2018 19:46:40 +0000 (21:46 +0200)]
bcm53xx: backport BCM5301X/BCM53573 dts commits from 4.19+

This includes Linksys EA9500 support, BCM53573 timer fix and
upstream-ready partitions patch that replaces two downstream hacks.

Signed-off-by: Rafał Miłecki <>
5 years agobcm53xx: switch USB 3.0 PHY DT description to use MDIO bus
Rafał Miłecki [Sat, 28 Jul 2018 19:37:46 +0000 (21:37 +0200)]
bcm53xx: switch USB 3.0 PHY DT description to use MDIO bus

USB 3.0 PHY is attached to the MDIO bus and should be supported
(accessed) as a MDIO device. This wasn't known initially which resulted
in writing driver that was working with MDIO bus (using some magic
values) without knowing it.

This commit updates DT to properly describe MDIO & USB 3.0 PHY and
enables required kernel drivers.

Signed-off-by: Rafał Miłecki <>
5 years agobcm53xx: backport DT fix for I2C controller interrupt
Rafał Miłecki [Sat, 28 Jul 2018 19:35:23 +0000 (21:35 +0200)]
bcm53xx: backport DT fix for I2C controller interrupt

Specified interrupt type was incorrect.

Signed-off-by: Rafał Miłecki <>
5 years agoigmpproxy: add a silent logging option
Dmitry Tunin [Sat, 28 Jul 2018 14:06:28 +0000 (17:06 +0300)]
igmpproxy: add a silent logging option

[0-3](none, minimal[default], more, maximum)

It is not 100% backward compatible, because now 0 disables logging

Signed-off-by: Dmitry Tunin <>
5 years agodnsmasq: bump to dnsmasq v2.80test3
Kevin Darbyshire-Bryant [Sat, 28 Jul 2018 09:47:32 +0000 (10:47 +0100)]
dnsmasq: bump to dnsmasq v2.80test3

Refresh patches

Upstream commits since last bump:

3b6eb19 Log DNSSEC trust anchors at startup.
f3e5787 Trivial comment change.
c851c69 Log failure to confirm an address in DHCPv6.
a3bd7e7 Fix missing fatal errors when parsing some command-line/config options.
ab5ceaf Document the --help option in the french manual
1f2f69d Fix recurrent minor spelling mistake in french manual
f361b39 Fix some mistakes in french translation of the manual
eb1fe15 When replacing cache entries, preserve CNAMES which target them.

Signed-off-by: Kevin Darbyshire-Bryant <>
5 years agokernel: backport mtd support for subpartitions in DT
Rafał Miłecki [Fri, 27 Jul 2018 19:54:08 +0000 (21:54 +0200)]
kernel: backport mtd support for subpartitions in DT

This is a new & warm feature that allows nesting partiitons in DT and
mixing their types (e.g. static vs. dynamic). It's very useful for
boards that have most partitions static but some of them require extra
parsing (e.g. a "firmware" partition).

It's required to successfully backport support for new devices using
that new syntax in their DT files.

Since brcm63xx has a custom alternative patch the upstream one is being
reverted for it. The plan is to make brcm63xx use the upstream

Signed-off-by: Rafał Miłecki <>
5 years agobrcm47xx: revert upstream commit breaking BCM4718A1
Rafał Miłecki [Fri, 27 Jul 2018 13:57:13 +0000 (15:57 +0200)]
brcm47xx: revert upstream commit breaking BCM4718A1

This fixes kernel hang when booting on BCM4718A1 (& probably BCM4717A1).

Signed-off-by: Rafał Miłecki <>
5 years agokernel: backport mtd patches with Broadcom of_match_table-s
Rafał Miłecki [Fri, 27 Jul 2018 13:51:53 +0000 (15:51 +0200)]
kernel: backport mtd patches with Broadcom of_match_table-s

Two tiny & trivial patches with no regression risk. One simplifies
bcm53xx downstream patch.

Signed-off-by: Rafał Miłecki <>
5 years agoutil-linux: package blockdev executable
Daniel Golle [Fri, 27 Jul 2018 10:50:35 +0000 (12:50 +0200)]
util-linux: package blockdev executable

Signed-off-by: Daniel Golle <>
5 years agowwan: Fix teardown for sierra_net driver
Masashi Honma [Tue, 17 Jul 2018 23:40:33 +0000 (08:40 +0900)]
wwan: Fix teardown for sierra_net driver

The sierra_net driver is using proto_directip_setup for setup. So use
proto_directip_teardown for teardown.

Signed-off-by: Masashi Honma <>
5 years agoead: use new protocol setting API since libpcap 1.9.0
Syrone Wong [Thu, 26 Jul 2018 14:46:39 +0000 (22:46 +0800)]
ead: use new protocol setting API since libpcap 1.9.0

Dropped the protocol API specific symbol: HAS_PROTO_EXTENSION and
switch to the official API

Signed-off-by: Syrone Wong <>
5 years agolibpcap: update to 1.9.0
Syrone Wong [Thu, 26 Jul 2018 14:46:38 +0000 (22:46 +0800)]
libpcap: update to 1.9.0 dropped due to upstream
002-Add-missing-compiler_state_t-parameter.patch dropped due to upstream

202-protocol_api.patch dropped due to implemented upstream by another way
upstream commit:
and renamed via:

ead is the only user who use the protocol api, we have to use the new api since libpcap 1.9.0

Signed-off-by: Syrone Wong <>
5 years agomac80211: brcmfmac: backport 4.19 patches preparing monitor mode support
Rafał Miłecki [Thu, 26 Jul 2018 21:20:30 +0000 (23:20 +0200)]
mac80211: brcmfmac: backport 4.19 patches preparing monitor mode support

Monitor mode isn't supported yet with brcmfmac, it's just an early work.
This also prepares brcmfmac to work stable with new firmwares which use
updated struct for passing STA info.

Signed-off-by: Rafał Miłecki <>
5 years agomac80211: backport brcmfmac fixes & debugging helpers from 4.18
Rafał Miłecki [Thu, 26 Jul 2018 20:43:18 +0000 (22:43 +0200)]
mac80211: backport brcmfmac fixes & debugging helpers from 4.18

The most important is probably regression fix in handling platform
NVRAM. That bug stopped hardware from being properly calibrated breaking
e.g. 5 GHz for Netgear R8000.

Other than that it triggers memory dumps when experiencing firmware
problems which is important for debugging purposes.

Fixes: 7e8eb7f309a8 ("mac80211: backport brcmfmac firmware & clm_blob loading rework")
Signed-off-by: Rafał Miłecki <>
5 years agoubus: update to latest git HEAD
Jo-Philipp Wich [Thu, 26 Jul 2018 14:48:07 +0000 (16:48 +0200)]
ubus: update to latest git HEAD

40e0931 libubus: pass an empty UBUS_ATTR_DATA block if msg is NULL on invoke

Signed-off-by: Jo-Philipp Wich <>
5 years agoodhcpd: update to latest git HEAD
Jo-Philipp Wich [Thu, 26 Jul 2018 12:53:05 +0000 (14:53 +0200)]
odhcpd: update to latest git HEAD

44cce31 ubus: avoid dumping interface state with NULL message

Signed-off-by: Jo-Philipp Wich <>
5 years agofirewall: update to latest git HEAD
Jo-Philipp Wich [Thu, 26 Jul 2018 06:44:53 +0000 (08:44 +0200)]
firewall: update to latest git HEAD

aa8846b ubus: avoid dumping interface state with NULL message

Signed-off-by: Jo-Philipp Wich <>
5 years agoubus: update to latest git HEAD
John Crispin [Wed, 25 Jul 2018 10:15:45 +0000 (12:15 +0200)]
ubus: update to latest git HEAD

884be45 libubus: check for non-NULL data before running callbacks

Signed-off-by: John Crispin <>
5 years agolibubox: update to latest git HEAD
John Crispin [Wed, 25 Jul 2018 10:03:18 +0000 (12:03 +0200)]
libubox: update to latest git HEAD

c83a84a fix segfault when passed blobmsg attr is NULL

Signed-off-by: John Crispin <>
5 years agoipq40xx: move essedma patches into same range
John Crispin [Tue, 24 Jul 2018 14:04:44 +0000 (16:04 +0200)]
ipq40xx: move essedma patches into same range

Signed-off-by: John Crispin <>
5 years agoipq40xx: sync kernel config
John Crispin [Tue, 24 Jul 2018 12:34:34 +0000 (14:34 +0200)]
ipq40xx: sync kernel config

Signed-off-by: John Crispin <>
5 years agoipq40xx: use patches that were sent upstream
John Crispin [Tue, 24 Jul 2018 12:38:57 +0000 (14:38 +0200)]
ipq40xx: use patches that were sent upstream

Signed-off-by: John Crispin <>
5 years agoipq40xx: move dts file patches to end of series
John Crispin [Tue, 24 Jul 2018 14:02:20 +0000 (16:02 +0200)]
ipq40xx: move dts file patches to end of series

Signed-off-by: John Crispin <>
5 years agoipq40xx: cleanup USB support
John Crispin [Tue, 24 Jul 2018 12:34:01 +0000 (14:34 +0200)]
ipq40xx: cleanup USB support

remove the 2 USB PHY drivers and add a generic PHY driver instead

Signed-off-by: John Crispin <>
5 years agoipq40xx: drop no-op cpu_idle symbol patch
John Crispin [Tue, 24 Jul 2018 12:41:02 +0000 (14:41 +0200)]
ipq40xx: drop no-op cpu_idle symbol patch

Signed-off-by: John Crispin <>
5 years agoath79: fix OCEDO Raccoon
David Bauer [Fri, 20 Jul 2018 22:04:08 +0000 (00:04 +0200)]
ath79: fix OCEDO Raccoon

The OCEDO Raccoon only has one ethernet port, but currently uci sections
for WAN and LAN are created.

Additionally, newer versions of the devices U-Boot (units with SteelWRT)
set the kernel-cmdline and therefore overwrite the partition-layout.
We fix this by overwriting the cmdline supplied by the bootloader.

Signed-off-by: David Bauer <>
5 years agoramips: remove stale get_status_led call
Mathias Kresin [Mon, 23 Jul 2018 05:57:45 +0000 (07:57 +0200)]
ramips: remove stale get_status_led call

The get_status_led() function was removed due to the convertion to dts
alias based status led.

Since we don't need the boardname any longer, the include
isn't required any more.

Fixes: c9c4b2116c09 ("ramips: Use dts alias based status led")
Signed-off-by: Mathias Kresin <>
5 years agokernel: don't auto attach ubi on read error
Mathias Kresin [Sun, 8 Jul 2018 21:18:15 +0000 (23:18 +0200)]
kernel: don't auto attach ubi on read error

With a10a204aab26cc ("kernel: make ubi auto-attach check for a tar file
magic") the check for the magic was added without considering a failing
mtd_read(). If the read fails, no check is done and the mount code is
called straight away.

Failing with an error message for such cases seems to me the cleaner way,
as it would allow to spot hidden/workaround issues.

Signed-off-by: Mathias Kresin <>
5 years agokernel: handle bad blocks in ubi auto attach code
Mathias Kresin [Sat, 7 Jul 2018 23:47:28 +0000 (01:47 +0200)]
kernel: handle bad blocks in ubi auto attach code

The first block(s) of the ubi mtd device might be bad. We need to take
care on our own to skip the bad block(s) and read the next one(s).

Don't treat recoverable read errors as fatal and check for the UBI magic
if the data of a block could be recovered using ECC or similar.

Signed-off-by: Mathias Kresin <>
5 years agokernel: improve ubi auto attach code readability
Mathias Kresin [Sat, 7 Jul 2018 23:38:08 +0000 (01:38 +0200)]
kernel: improve ubi auto attach code readability

Move the put_mtd_device() called on multiple error conditions to a goto
label to use it later for more error conditions.

The early return on failed open of the mtd device and mismatching mtd
type allows to get rid of one level of indentation. By jumping to the
cleanup code, a refcount bug is fixed for the wrong flash type condition.

While at it, make clear that we only check for the UBI magic if the read
from flash was successful.

Signed-off-by: Mathias Kresin <>
5 years agoelfutils: Copy missing libraries to staging and packages
Ted Hess [Tue, 24 Jul 2018 18:32:20 +0000 (14:32 -0400)]
elfutils: Copy missing libraries to staging and packages

Newer shared libraries seem to have the package version as part of their name.

Signed-off-by: Ted Hess <>
5 years agoutils/curl: Disable libpsl
Daniel Engberg [Tue, 24 Jul 2018 11:59:30 +0000 (13:59 +0200)]
utils/curl: Disable libpsl

Disabled libpsl to fix build issue reported by buildbots

Package libcurl is missing dependencies for the following libraries:

Signed-off-by: Daniel Engberg <>
5 years agobuild: do not override CCACHE_DIR when ccache is disabled
Jo-Philipp Wich [Tue, 24 Jul 2018 13:23:05 +0000 (15:23 +0200)]
build: do not override CCACHE_DIR when ccache is disabled

Signed-off-by: Jo-Philipp Wich <>
5 years agobuild: fix gcc/g++ SetupHostCommand invocation
Jo-Philipp Wich [Tue, 24 Jul 2018 11:36:28 +0000 (13:36 +0200)]
build: fix gcc/g++ SetupHostCommand invocation

A missing comma caused the first command option to be considered part of
the error message.

Signed-off-by: Jo-Philipp Wich <>
5 years agoipq40xx: drop bus driver, its a no-op and only does lots of alloc/free
John Crispin [Tue, 24 Jul 2018 07:35:16 +0000 (09:35 +0200)]
ipq40xx: drop bus driver, its a no-op and only does lots of alloc/free

Signed-off-by: John Crispin <>
5 years agowireguard-tools: add wireguard_watchdog script
Aleksandr V. Piskunov [Sun, 1 Jul 2018 12:40:31 +0000 (15:40 +0300)]
wireguard-tools: add wireguard_watchdog script

This watchdog script tries to re-resolve hostnames for inactive WireGuard peers.
Use it for peers with a frequently changing dynamic IP.
persistent_keepalive must be set, recommended value is 25 seconds.
Run this script from cron every minute:
echo '* * * * * /usr/bin/wireguard_watchdog' >> /etc/crontabs/root

Signed-off-by: Aleksandr V. Piskunov <>
[bump the package release]
Signed-off-by: Kevin Darbyshire-Bryant <>
5 years agomac80211: backport and update patches for ath10k
Ansuel Smith [Sun, 8 Jul 2018 14:04:15 +0000 (16:04 +0200)]
mac80211: backport and update patches for ath10k

This commit refreshes and updates the VHT160 ath10k support fix patches
and adds a number of backports from ath-next:

 * 8ed05ed06fca ath10k: handle tdls peer events
 * 229329ff345f ath10k: wmi: modify svc bitmap parsing for wcn3990
 * 14d65775687c ath10k: advertise TDLS wider bandwidth support for 5GHz
 * bc64d05220f3 ath10k: debugfs support to get final TPC stats for 10.4 variants
 * 8b2d93dd2261 ath10k: Fix kernel panic while using worker (ath10k_sta_rc_update_wk)
 * 4b190675ad06 ath10k: fix kernel panic while reading tpc_stats
 * be8cce96f14d ath10k: add support to configure channel dwell time
 * f40105e67478 ath: add support to get the detected radar specifications
 * 6f6eb1bcbeff ath10k: DFS Host Confirmation
 * 260e629bbf44 ath10k: fix memory leak of tpc_stats
 * 38441fb6fcbb ath10k: support use of channel 173
 * 2e9bcd0d7324 ath10k: fix spectral scan for QCA9984 and QCA9888 chipsets

Signed-off-by: Ansuel Smith <>
[move backported patches in the 3xx number space, bring in upstream order,
 replace incomplete patch files with git format-patch ones, rewrite commit
 message, fix subject]
Signed-off-by: Jo-Philipp Wich <>
5 years agowireguard: bump to 0.0.20180718
Jason A. Donenfeld [Wed, 18 Jul 2018 23:36:33 +0000 (01:36 +0200)]
wireguard: bump to 0.0.20180718

80b41cd version: bump snapshot
fe5f0f6 recieve: disable NAPI busy polling
e863f40 device: destroy workqueue before freeing queue
81a2e7e wg-quick: allow link local default gateway
95951af receive: use gro call instead of plain call
d9501f1 receive: account for zero or negative budget
e80799b tools: only error on wg show if all interfaces failk

Signed-off-by: Jason A. Donenfeld <>
[Added commit log to commit description]
Signed-off-by: Kevin Darbyshire-Bryant <>
5 years agohostapd: remove unused struct hostapd_ubus_iface
Felix Fietkau [Thu, 19 Jul 2018 15:13:25 +0000 (17:13 +0200)]
hostapd: remove unused struct hostapd_ubus_iface

Signed-off-by: Felix Fietkau <>
5 years replace iremap when using GCC 8
Syrone Wong [Thu, 21 Jun 2018 15:08:11 +0000 (23:08 +0800)] replace iremap when using GCC 8

The original -iremap is replaced by -fmacro-prefix-map in GCC 8

Signed-off-by: Syrone Wong <>
5 years agotoolchain/gcc: add GCC 8.1.0
Syrone Wong [Thu, 21 Jun 2018 15:08:10 +0000 (23:08 +0800)]
toolchain/gcc: add GCC 8.1.0

Changes compared to GCC 7.x

001-revert_register_mode_search.patch dropped

The underlying issue is described at the end of

It is fixed by the upstream commit:

020-PR-libstdc-81797-Add-.NOTPARALLEL-to-include-Makefil.patch dropped due to already upstream

100-PR-rtl-optimization-83496.patch dropped due to already upstream

modified to fix ambiguous overloaded inform() call error

header: define UNKNOWN_LOCATION ((source_location) 0)

-        inform (0, "someone does not honour COPTS correctly, passed %d times",
-         honour_copts);
+        inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times",
+         honour_copts);

940-no-clobber-stamp-bits.patch dropped due to fixed upstream by another way
upstream commit:

950-cpp_file_path_translation.patch dropped, Both -fmacro-prefix-map and -ffile-prefix-map are added
to gcc 8.1.0, if I understand it correctly, we should use -fmacro-prefix-map
usage: -fmacro-prefix-map=@var{old}=@var{new}
upstream commit:

-iremap exists as a flag for a long time, for backward compatibility, I think we should keep the
variable name unchanged but change its value in for gcc 8.x and higher.

Compile and run tested on x86_64

Signed-off-by: Syrone Wong <>
5 years agokernel: backport a change to 4.9 which disables overly aggressive warnings on gcc 8
Felix Fietkau [Sun, 22 Jul 2018 15:05:09 +0000 (17:05 +0200)]
kernel: backport a change to 4.9 which disables overly aggressive warnings on gcc 8

Signed-off-by: Felix Fietkau <>
5 years agokernel: backport fixes for GCC 8 errors in syscall definitions
Felix Fietkau [Sun, 22 Jul 2018 14:52:44 +0000 (16:52 +0200)]
kernel: backport fixes for GCC 8 errors in syscall definitions

Signed-off-by: Felix Fietkau <>
5 years agobuild: do not alter global default package selection from profiles
Jo-Philipp Wich [Sat, 21 Jul 2018 18:47:10 +0000 (20:47 +0200)]
build: do not alter global default package selection from profiles

This partly reverts ca32373c951c651f4fe5d8f99ddeb8d4f20bbe3e which lets
profiles that suppress packages to alter the package selection for all
devices of the target when building with CONFIG_TARGET_PER_DEVICE_ROOTFS.

In particular, this caused the brcm47xx Edimax PS-1208MFG profile to
disable mtd, dropbear, firewall and other essential packages for all
brcm47xx/generic builds.

To solve this problem, prevent profiles from mangling the global
DEFAULT_PACKAGES selection and restrict the supression of negated
packages to the local PACKAGE variable list only.

Fixes ca32373c95 (" let profile remove from DEFAULT_PACKAGES")
Signed-off-by: Jo-Philipp Wich <>
5 years agoiproute2: tc: backport canonical cake support
Kevin Darbyshire-Bryant [Fri, 20 Jul 2018 11:47:35 +0000 (12:47 +0100)]
iproute2: tc: backport canonical cake support

iproute2's tc was updated to support the recently upstreamed cake qdisc.
Backport this canonical support from upstream into iproute2 v4.17

There is no kernel kmod/userspace tc ABI change in this release from the
previous package bump, so everyone can breath a sigh of relief.

This is largely a code style change, the exception to prove the rule:
option 'autorate_ingress' has been changed to 'autorate-ingress' to fit
in with upstream option naming expectations.

No openwrt package (e.g. sqm-scripts) has knowledge of
'autorate_ingress' thus only users who made their own scripts or used
it within the 'dangerous configuration' options of sqm-scripts will be

Signed-off-by: Kevin Darbyshire-Bryant <>
5 years agobuild: fix compile error when a package includes itself in PROVIDES
Felix Fietkau [Fri, 20 Jul 2018 08:40:43 +0000 (10:40 +0200)]
build: fix compile error when a package includes itself in PROVIDES

Signed-off-by: Felix Fietkau <>
5 years agoipq806x: dts: Remove device_type = "ethernet-phy"
Rosen Penev [Mon, 16 Jul 2018 18:17:08 +0000 (11:17 -0700)]
ipq806x: dts: Remove device_type = "ethernet-phy"

device_type is deprecated. Upstream doesn't seem to like it either.

Signed-off-by: Rosen Penev <>
5 years agoapm821xx: unify My Book Live Single + Duo images
Christian Lamparter [Mon, 16 Jul 2018 20:56:36 +0000 (22:56 +0200)]
apm821xx: unify My Book Live Single + Duo images

By takimata:
"Come to think of it, an MBL Single board boots up just fine on an
MBL Duo image, and the MBL Single board identifies completely
identical to the MBL Duo
(Board: Apollo-3G - APM82181 Board, 2*SATA, 1*USB).
I wonder if there is any downside to just using the MBL Duo firmware
on a MBL Single. I wonder if the two firmwares could even be unified."


Signed-off-by: Christian Lamparter <>
5 years agoramips: define common MikroTik RouterBOARD image recipe
Thibaut VARÈNE [Thu, 19 Jul 2018 16:06:21 +0000 (18:06 +0200)]
ramips: define common MikroTik RouterBOARD image recipe

All these devices share the exact same image format.

The usb3 kmod is added for the rbm11g, as the rbm11g has a mini-pcie
slot like its bigger sibling. The usb kmod is necessary for
usb-over-pcie support, which is mandatory for a lot of LTE modules.

Signed-off-by: Thibaut VARÈNE <>
5 years agolantiq: add support for FritzBox 7312
Johann Neuhauser [Thu, 17 May 2018 17:12:35 +0000 (19:12 +0200)]
lantiq: add support for FritzBox 7312

The FritzBox 7312 is also known as 1&1 WLAN-MODEM. The device is almost
the same as FB7330, but only one ETH-Port and no USB.

SoC: Lantiq Xway ARX188 PSB 50812 EL
RAM: 64MB DDR1 (Zentel A4S12D40FTP-G5)
Ethernet: Atheros 8030
Wireless: Atheros AR9227 b/g/n 2x2
DSL: Lantiq ADSL2+
DECT: Dialog SC14441
Buttons: WiFi, DECT
LEDs: Power/DSL, Fon, DECT, WLAN, Info

Power: GPIO#44 (active low)
Internet: GPIO#47 (active low)
DECT: GPIO#38 (active low)
WLAN: GPIO#37 (active low)
Info: GPIO#35 (active low)

The Fon LED is labeled as internet in avm gpl sources.

WLAN: GPIO#1 (active low)
DECT: GPIO#2 (active low)

GPIO#03: 25 MHz
GPIO#34: Reset (active low)
GPIO#39: Int

GPIO#21: reset (active low)


To install OpenWrt via Eva bootloader, within the first seconds after
power on a ftp connection need to be established to the FRITZ!Box at and the the following ftp commands need to be run:

  ftp> quote USER adam2
  ftp> quote PASS adam2
  ftp> binary
  ftp> debug
  ftp> passive
  ftp> quote MEDIA FLSH
  ftp> put /path/to/openwrt-lantiq-xway-avm_fritz7312-squashfs-sysupgrade.bin mtd1
  ftp> quote REBOOT

Signed-off-by: Johann Neuhauser <>
5 years agolantiq: etop: pass devicetree node to phy driver
Johann Neuhauser [Thu, 17 May 2018 17:12:35 +0000 (19:12 +0200)]
lantiq: etop: pass devicetree node to phy driver

Use of_mdiobus_register() to pass the ethernet phy node to the phy
drivers. This is needed for the at8030 phy driver which needs to know
the GPIO which is connected to the ar8030 reset pin.

This driver expects a child in gsw/etop node named "mdio-bus", which has
the ethernet phys defined:

&gsw {
phy-mode = "rmii";
phy-handle = <&phy0>;
mtd-mac-address = <&ath9k_cal 0xa91>;
mtd-mac-address-increment = <(-2)>;

mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;

phy0: ethernet-phy@0 {
reg = <0>;
reset-gpios = <&gpio 34 GPIO_ACTIVE_LOW>;

Fallback to mdiobus_register() if no mdio-bus child node exists. This
way we don't need to touch all xway dts files, for which we don't know
the actual address on the mdio bus.

Signed-off-by: Johann Neuhauser <>
5 years agobase-files: fix wrong sysctl parameter order
Luiz Angelo Daros de Luca [Tue, 17 Jul 2018 22:41:09 +0000 (19:41 -0300)]
base-files: fix wrong sysctl parameter order

Restarting service sysctl echos multiple errors like:

  sysctl: -e: No such file or directory

After the first filename, all remaining arguments are treated
as files.

Signed-off-by: Luiz Angelo Daros de Luca <>
5 years agoath79: fix TP-Link Archer C7 v2 wlan1 MAC address
Aleksandr V. Piskunov [Mon, 16 Jul 2018 18:14:50 +0000 (21:14 +0300)]
ath79: fix TP-Link Archer C7 v2 wlan1 MAC address

The mac address for the 2.4 wireless need to be decremented by one.

Correct MAC adress increments for this board are:
wlan0 (5GHz)   : -2
wlan1 (2.4GHz) : -1
eth1  (LAN)    :  0
eth0  (WAN)    :  1

Signed-off-by: Aleksandr V. Piskunov <>
5 years agohostapd: fix conflicts hell
Mathias Kresin [Wed, 11 Jul 2018 20:13:36 +0000 (22:13 +0200)]
hostapd: fix conflicts hell

Add each variant to the matching PROVIDERS variables after evaluating
the respective hostapd*, wpad* and wpa* variant.

Each package providing the same feature will automatically conflict with
all prior packages providing the same feature.

This way we can handle the conflicts automatically without introducing
recursive dependencies.

Signed-off-by: Mathias Kresin <>
5 years agohostapd: cleanup package definition
Mathias Kresin [Tue, 10 Jul 2018 19:17:33 +0000 (21:17 +0200)]
hostapd: cleanup package definition

Move common variables and/or values to the package (variant) default.
Add additional values in variant packages if necessary. Remove further
duplicates by introducing new templates.

same as the variables without the any prefix. No need to maintain both

Signed-off-by: Mathias Kresin <>
5 years agoigmpproxy: run in foreground for procd
Kevin Darbyshire-Bryant [Wed, 18 Jul 2018 16:51:59 +0000 (17:51 +0100)]
igmpproxy: run in foreground for procd

procd needs processes to stay in foreground to remain under its gaze and
control.  Failure to do so means service stop commands fail to actually
stop the process (procd doesn't think it's running 'cos the process has
exited already as part of its forking routing)

Signed-off-by: Kevin Darbyshire-Bryant <>
5 years agofirewall3: update to latest git HEAD
Hans Dedecker [Tue, 17 Jul 2018 20:12:57 +0000 (22:12 +0200)]
firewall3: update to latest git HEAD

d2bbeb7 firewall3: make reject types selectable by user

Signed-off-by: Hans Dedecker <>
5 years agodnsmasq: don't use network functions at boottime (FS#1542)
Hans Dedecker [Tue, 17 Jul 2018 11:42:17 +0000 (13:42 +0200)]
dnsmasq: don't use network functions at boottime (FS#1542)

As dnsmasq is started earlier than netifd usage of functions
at boottime will fail; therefore don't call at boottime the functions
which construct the dhcp pool/relay info.
As interface triggers are installed the dhcp pool/relay info will be
constructed when the interface gets reported as up by netifd.
At the same time also register interface triggers based on DHCP relay

Signed-off-by: Hans Dedecker <>
5 years agoppp: fix building pptp plugin
Jo-Philipp Wich [Tue, 17 Jul 2018 18:21:39 +0000 (20:21 +0200)]
ppp: fix building pptp plugin

The plugin needs to be built with -fPIC as well in order to be
linkable again.

Fixes 888a15ff83 ("ppp: add missing -fPIC to CFLAGS")
Fixes e7397eef69 ("ppp: compile with LTO enabled")
Signed-off-by: Jo-Philipp Wich <>
5 years agoscripts/ stringify exception
Yousong Zhou [Tue, 17 Jul 2018 17:05:53 +0000 (17:05 +0000)]
scripts/ stringify exception

Closes openwrt/openwrt#1163

Signed-off-by: Yousong Zhou <>
5 years agoopenvpn: increase procd termination timeout to 15s
Jo-Philipp Wich [Tue, 17 Jul 2018 14:01:46 +0000 (16:01 +0200)]
openvpn: increase procd termination timeout to 15s

Increase the termination timeout to 15s to let OpenVPN properly tear down
its connections, especially when weak links or complex down scripts are

Fixes FS#859.
Signed-off-by: Jo-Philipp Wich <>
5 years agomediatek: fix parallel build issues in image build code
Jo-Philipp Wich [Tue, 17 Jul 2018 12:40:04 +0000 (14:40 +0200)]
mediatek: fix parallel build issues in image build code

Drop the parallel-unsafe custom Build/dtb macro and use the .dtb artifacts
produced by the generic image build code.

Also remove unused .dtb references in the mt7623 subtarget.

Signed-off-by: Jo-Philipp Wich <>
5 years agobase-files: gracefully handle missing network.interface ubus ns
Jo-Philipp Wich [Tue, 17 Jul 2018 05:47:33 +0000 (07:47 +0200)]
base-files: gracefully handle missing network.interface ubus ns

When attempting to use any of the functions in while netifd is
not started yet, the ubus interface dump query will fail with "Not found",
yielding an empty response.

Subsequently, jsonfilter is invoked with an empty string instead of a valid
JSON document, causing it to emit a second "unexpected end of data" error.

This caused the dnsmasq init script to log the following errors during
early boot on some systems:

    procd: /etc/rc.d/S19dnsmasq: Command failed: Not found.
    procd: /etc/rc.d/S19dnsmasq: Failed to parse json data: unexpected end of data.

Fix the issue by allowing the ubus query to fail with "Not found" but still
logging other failures, and by passing an empty JSON object to jsonfilter
if the interface status cache is empty.

Signed-off-by: Jo-Philipp Wich <>
5 years agoar71xx: Move F9K1115v2 under ar71xx tiny target
Kin Chan [Mon, 5 Mar 2018 07:30:56 +0000 (07:30 +0000)]
ar71xx: Move F9K1115v2 under ar71xx tiny target

F9K1115v2 has a kernel partition size of 1408 kB.

Since kernel 4.9.x+ the kernel image for this device compiled had exceeded
the kernel partition size limit and thus failing size check.

The kernel image generated for this device
under ar71xx tiny target is 1329.67 kB < 1408 kB.

Signed-off-by: Kin Chan <>
5 years agolibrpc: add host build to install h files needed for nfs-kernel-server to get compiled
Peter Wagner [Tue, 3 Jul 2018 06:54:41 +0000 (08:54 +0200)]
librpc: add host build to install h files needed for nfs-kernel-server to get compiled

Signed-off-by: Peter Wagner <>
5 years agoramips: Use dts alias based status led
Chuanhong Guo [Mon, 16 Jul 2018 08:27:22 +0000 (16:27 +0800)]
ramips: Use dts alias based status led

Also fix several typos in led node name.

Signed-off-by: Chuanhong Guo <>
5 years agokernel: insmod phy-broadcom module during preinit
Steffen Förster [Sun, 8 Jul 2018 20:18:07 +0000 (22:18 +0200)]
kernel: insmod phy-broadcom module during preinit

Some HP Thin clients use the broadcom nextreme chip as integrated NIC.
It is connected via PCI express and will only be found automatically if
phy-broadcom is loaded before tg3. This small change makes the thin
client usable for Freifunk with gluon out of the box.

Signed-off-by: Steffen Förster <>
5 years agopopt: Replace dead upstream site with mirror
Daniel Engberg [Sat, 14 Jul 2018 21:05:29 +0000 (23:05 +0200)]
popt: Replace dead upstream site with mirror

We can safely assume by now that is dead and isn't coming back
so just add another mirror instead.

Signed-off-by: Daniel Engberg <>
5 years agopackage/utils/f2fs-tools: Update to 1.11.0
Daniel Engberg [Sat, 14 Jul 2018 20:52:35 +0000 (22:52 +0200)]
package/utils/f2fs-tools: Update to 1.11.0

Update f2fs-tools to 1.11.0

Signed-off-by: Daniel Engberg <>
5 years agopackage/utils/e2fsprogs: Update to 1.44.3
Daniel Engberg [Sat, 14 Jul 2018 20:35:34 +0000 (22:35 +0200)]
package/utils/e2fsprogs: Update to 1.44.3

Update e2fsprogs to 1.44.3
Enable threads
Enable LTO

Numbers on mips_24kc (a few packages):

Old --> New --> LTO and threads
e2fsprogs_*_mips_24kc.ipk: 173 --> 174 --> 154kbyte
libblkid_*_mips_24kc.ipk:  114 --> 114 --> 114kbyte
libext2fs_*_mips_24kc.ipk: 138 --> 139 --> 139kbyte

Signed-off-by: Daniel Engberg <>
5 years agoar71xx: add support for MikroTik RB931-2nD
Thibaut VARÈNE [Thu, 12 Jul 2018 11:43:36 +0000 (13:43 +0200)]
ar71xx: add support for MikroTik RB931-2nD

This patch adds support for the MikroTik RB931-2nD (hAP mini):

  * SoC: Qualcomm QCA9533 (650MHz)
  * RAM: 32MiB
  * Storage: 16MiB SPI NOR flash
  * Ethernet: 3x100M
  * Wireless: QCA9533 built-in, dual-chain 802.11b/g/n


1. Setup a DHCP/BOOTP Server with the following parameters:
   * DHCP-Option 66 (TFTP server name): pointing to a local TFTP
     server within the same subnet of the DHCP range
   * DHCP-Option 67 (Bootfile-Name): matching the initramfs filename
     of the to be booted image. The usable intramfs files are:
       - openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf
       - openwrt-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf
       - openwrt-ar71xx-mikrotik-rb-nor-flash-16M-initramfs-kernel.bin

2. Press the reset button on the board and keep that pressed.

3. Connect the board to your local network via its Internet port.

4. Release the button after the LEDs on the board are turned off.
   Now the board should load and start the initramfs image from
   the TFTP server.

5. Now connect the board via either of its LAN ports (2 or 3).

6. Upload the sysupgrade image to the board with scp:
     $ scp openwrt-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin root@

7. Log in to the running system listening on via ssh
   as root (without password):
     $ ssh root@

8. Flash the uploaded firmware file from the ssh session via the
   sysupgrade command:
     root@OpenWrt:~# sysupgrade /tmp/fw.bin

Signed-off-by: Thibaut VARÈNE <>
5 years agokernel: leds-apu2 remove boardname check
Lukas Mrtvy [Wed, 11 Jul 2018 08:22:27 +0000 (10:22 +0200)]
kernel: leds-apu2 remove boardname check

'In different versions of coreboot are different names of apu boardname.
No need to check boardname to load module.'

Signed-off-by: Lukas Mrtvy <>
5 years agobrcm63xx: initial support for Sky SR102 router
Andrius Štikonas [Sat, 14 Jul 2018 21:53:47 +0000 (21:53 +0000)]
brcm63xx: initial support for Sky SR102 router

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
SOC:      BCM63168 (BMIPS4350 V8.0 @400MHz)
Flash size: 16 MiB
RAM size:   128 MiB

Heavily based on patch for OpenWRT Chaos Chalmer.
Original patch and more info can be found at:

Known issues:
 - Wireless and ADSL modem are not working.

Signed-off-by: Andrius Štikonas <>
5 years agoapm821xx: attempt to fix sata access freezes
Christian Lamparter [Sat, 14 Jul 2018 15:21:56 +0000 (17:21 +0200)]
apm821xx: attempt to fix sata access freezes

The original vendor's driver programmed the dma controller's
AHB HPROT values to enable bufferable, privileged mode. This
along with the "same priorty for both channels" could very
well fix the freezes that have been reported on the forum by
@ticerex and @takimata.

Signed-off-by: Christian Lamparter <>
5 years agokmod-sched-cake: bump to 20180716
Kevin Darbyshire-Bryant [Sun, 15 Jul 2018 10:01:15 +0000 (11:01 +0100)]
kmod-sched-cake: bump to 20180716

Bump to the latest cake recipe.

This backports tc class support to kernel 4.9 and other than conditional
kernel compilation pre-processor macros represents the cake that has
gone upstream into kernel 4.19.  Loud cheer!

Fun may be had by changing cake tin classification for packets on
ingress. e.g.

tc filter add dev ifb4eth0 parent 800b: protocol ip u32 match \
ip dport 6981 0xffff action skbedit priority 800b:1

Where 800b: represents the filter handle for the ifb obtained by 'tc
qdisc' and the 1 from 800b:1 represents the cake tin number.  So the
above example puts all incoming packets destined for port 6981 into the
BULK (lowest priority) tin.

f39ab9a Obey tin_order for tc filter classifiers
1e2473f Clean up after latest backport.
82531d0 Reorder includes to fix out of tree compilation
52cbc00 Code style cleanup
6cdb496 Fix argument order for NL_SET_ERR_MSG_ATTR()
cab17b6 Remove duplicate call to qdisc_watchdog_init()
71c7991 Merge branch 'backport-classful'
32aa7fb Fix compilation on Linux 4.9
9f8fe7a Fix compilation on Linux 4.14
ceab7a3 Rework filter classification
aad5436 Fixed version of class stats
be1c549 Add cake-specific class stats
483399d Use tin_order for class dumps
80dc129 Add class dumping
0c8e6c1 Fix dropping when using filters
c220493 Add the minimum class ops
5ed54d2 Start implementing tc filter/class support

Signed-off-by: Kevin Darbyshire-Bryant <>
5 years agotools/e2fsprogs: Update to 1.44.3
Daniel Engberg [Sat, 14 Jul 2018 20:31:37 +0000 (22:31 +0200)]
tools/e2fsprogs: Update to 1.44.3

Update e2fsprogs to 1.44.3

Signed-off-by: Daniel Engberg <>
5 years agoapm821xx: fix usb-otg on 4.14
Christian Lamparter [Sat, 14 Jul 2018 15:21:55 +0000 (17:21 +0200)]
apm821xx: fix usb-otg on 4.14

Starting with 4.14, the "amcc,dwc-otg" needs to be used
in order to get the usb-otg to work.

Signed-off-by: Christian Lamparter <>
5 years agodropbear: close all active clients on shutdown
Christian Schoenebeck [Thu, 12 Jul 2018 02:36:03 +0000 (22:36 -0400)]
dropbear: close all active clients on shutdown

Override the default shutdown action (stop) and close all processes
of dropbear

Since commit 498fe85, the stop action only closes the process
that's listening for new connections, maintaining the ones with
existing clients.
This poses a problem when restarting or shutting-down a device,
because the connections with existing SSH clients, like OpenSSH,
are not properly closed, causing them to hang.

This situation can be avoided by closing all dropbear processes when
shutting-down the system, which closes properly the connections with
current clients.

Signed-off-by: Christian Schoenebeck <>
[Luis: Rework commit message]
Signed-off-by: Luis Araneda <>
5 years agomtd: improve check for TRX header being already fixed
Rafał Miłecki [Sun, 15 Jul 2018 21:23:42 +0000 (23:23 +0200)]
mtd: improve check for TRX header being already fixed

First of all lengths should be compared after checking all blocks for
being good/bad. It's because requested length may differ from a final
one if there were some bad blocks.

Secondly it makes sense to also compare crc32 since we already have a
new one calculated.

Signed-off-by: Rafał Miłecki <>
5 years agocurl: Update to 7.61.0
Daniel Engberg [Sat, 14 Jul 2018 20:26:42 +0000 (22:26 +0200)]
curl: Update to 7.61.0

Update curl to 7.61.0

Signed-off-by: Daniel Engberg <>
5 years agoodhcp6c: add noserverunicast config option for broken DHCPv6 servers
Hans Dedecker [Sun, 15 Jul 2018 19:53:25 +0000 (21:53 +0200)]
odhcp6c: add noserverunicast config option for broken DHCPv6 servers

Fix broken DHCPv6 servers which provide the server unicast option but
do not reply on DHCPv6 renew messages directed to the IPv6 address
contained in the server unicast option whihc results in broken IPv6

Signed-off-by: Hans Dedecker <>
5 years agomtd: support bad blocks within the mtd_fixtrx()
Rafał Miłecki [Sun, 15 Jul 2018 14:51:41 +0000 (16:51 +0200)]
mtd: support bad blocks within the mtd_fixtrx()

Reading MTD data with (p)read doesn't return any error when accessing
bad block. As the result, with current code, CRC32 covers "data" stored
in bad blocks.

That behavior doesn't match CFE's one (bootloader simply skips bad
blocks) and may result in:
1) Invalid CRC32
2) CFE refusing to boot firmware with a following error:
Boot program checksum is invalid

Fix that problem by checking every block before reading its content.

Signed-off-by: Rafał Miłecki <>
5 years agoinclude/ explicitly check for -f flag when using busybox time
Matthias Schiffer [Sat, 14 Jul 2018 13:44:47 +0000 (15:44 +0200)]
include/ explicitly check for -f flag when using busybox time

On Debian, busybox does have a time applet, but it does not support the -f
flag. Catch this in prereq check to give users to proper error message.

Signed-off-by: Matthias Schiffer <>
5 years agoinclude/ fix kernel rebuild on backport patch changes
Matthias Schiffer [Sat, 14 Jul 2018 11:07:34 +0000 (13:07 +0200)]
include/ fix kernel rebuild on backport patch changes

An incorrect variable name was referenced in KERNEL_FILE_DEPENDS, leading
to the omission of the backport-* patch dirs in the generation of the
prepared stamp name.

Signed-off-by: Matthias Schiffer <>
5 years agokernel: backport page fragment API changes from 4.10+ to 4.9
Felix Fietkau [Sat, 14 Jul 2018 09:38:28 +0000 (11:38 +0200)]
kernel: backport page fragment API changes from 4.10+ to 4.9

mt76 now relies on this API

Signed-off-by: Felix Fietkau <>
5 years agoppp: add missing -fPIC to CFLAGS
Felix Fietkau [Sat, 14 Jul 2018 08:59:52 +0000 (10:59 +0200)]
ppp: add missing -fPIC to CFLAGS

Fixes build error with LTO

Signed-off-by: Felix Fietkau <>
5 years agoramips: ethernet: disable fraglist support
Felix Fietkau [Sat, 14 Jul 2018 06:32:36 +0000 (08:32 +0200)]
ramips: ethernet: disable fraglist support

The code has some remaining issues that cause ethernet hangs, so
disable it for now until we can get it fixed

Signed-off-by: Felix Fietkau <>
5 years agoubus: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:42:40 +0000 (19:42 +0200)]
ubus: compile with LTO enabled

Reduces total .ipk size by about 1k

Signed-off-by: Felix Fietkau <>
5 years agoprocd: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:35:40 +0000 (19:35 +0200)]
procd: compile with LTO enabled

Reduces .ipk size on MIPS from 42k to 39k

Signed-off-by: Felix Fietkau <>
5 years agodropbear: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:28:54 +0000 (19:28 +0200)]
dropbear: compile with LTO enabled

Reduces size of the .ipk on MIPS from 87k to 84k

Signed-off-by: Felix Fietkau <>
5 years agofirewall: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:23:43 +0000 (19:23 +0200)]
firewall: compile with LTO enabled

Reduces .ipk size on MIPS from 41.6k to 41.1k

Signed-off-by: Felix Fietkau <>
5 years agoiw: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:21:08 +0000 (19:21 +0200)]
iw: compile with LTO enabled

Reduces .ipk size on MIPS from 34k to 33k

Signed-off-by: Felix Fietkau <>
5 years agoppp: compile with LTO enabled
Felix Fietkau [Wed, 11 Jul 2018 17:17:34 +0000 (19:17 +0200)]
ppp: compile with LTO enabled

Reduces .ipk size on MIPS from 98.5k to 98k

Signed-off-by: Felix Fietkau <>