openwrt/staging/wigyori.git
4 years agokernel: kmod-serial-8250: fix linux 5.3 dependencies
Mathias Kresin [Mon, 16 Mar 2020 20:16:07 +0000 (21:16 +0100)]
kernel: kmod-serial-8250: fix linux 5.3 dependencies

Beginning with linux 5.3, kmod-serial-8250 uses functions provided by
serial_mctrl_gpio.ko if GPIO support is enabled.

Signed-off-by: Mathias Kresin <dev@kresin.me>
4 years agogeneric: make all phy drivers kernel 5.0 compatible
Mathias Kresin [Sun, 7 Jul 2019 09:15:05 +0000 (11:15 +0200)]
generic: make all phy drivers kernel 5.0 compatible

It adjusts the code to upstream changes from the commit 3c1bcc8614db
("net: ethernet: Convert phydev advertize and supported from u32 to link
 mode")

Signed-off-by: Mathias Kresin <dev@kresin.me>
4 years agolantiq: vgv7510kw22: fix missing wireless
Mathias Kresin [Sun, 15 Mar 2020 22:54:47 +0000 (23:54 +0100)]
lantiq: vgv7510kw22: fix missing wireless

For some reason pin 7 (gphy0_led1_pins) need to be set to output prior
to loading the PCI driver. Otherwise the wireless doesn't appear on the
PCI bus. Of course, it doesn't make much sense, since pin 7 is used to
drive the LAN1 led.

It can either be done by setting the pins function to GPHY or GPIO +
direction output. However, the pinctrl driver doesn't provide a way to
switch a pin to GPIO. It is done indirectly by the pinctrl driver at the
time a GPIO is requested (requesting a GPIO always resets the function
to GPIO).

Do it via pinmux driver, as it is always loaded first. Use the GPHY
function as it's the pins intended purpose for this board.

Fixes: FS#2895
Signed-off-by: Mathias Kresin <dev@kresin.me>
4 years agotreewide: remove maintainer variable from targets
Petr Štetiar [Wed, 11 Mar 2020 14:04:37 +0000 (15:04 +0100)]
treewide: remove maintainer variable from targets

There is no such role as target maintainer anymore, one should always
send corresponding changes for the review and anyone from the commiters
is allowed to merge them or eventually use the hand break and NACK them.

Lets make it clear, that it is solely a community doing the maintenance
tasks.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Piotr Dymacz <pepe2k@gmail.com>
4 years agoipq40xx: 5.4: fix ethernet driver
Robert Marko [Tue, 3 Mar 2020 19:19:31 +0000 (20:19 +0100)]
ipq40xx: 5.4: fix ethernet driver

In 5.4 kernel old u32 array way of setting network features was dropped and linkmode is now the only way.
So lets migrate the EDMA driver to support linkmode.
Also, old get/set settings API for ethtool is also dropped so lets convert to new ksettings API while at it as it demands linkmode.

Now, gigabit works properly as well as ethtool.
Previously you would get this in ethtool:
root@OpenWrt:/# ethtool eth1
Settings for eth1:
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x00000000 (0)

        Link detected: yes

Now, features are properly advertised:
root@OpenWrt:/# ethtool eth1
Settings for eth1:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: No
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 4
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x00000000 (0)

        Link detected: yes

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
4 years agoipq40xx: 5.4: fix networking PHY driver
Robert Marko [Tue, 3 Mar 2020 19:19:30 +0000 (20:19 +0100)]
ipq40xx: 5.4: fix networking PHY driver

In 5.4 kernel old u32 array way of setting network features was dropped and linkmode is now the only way.
So lets migrate the PHY driver to support linkmode.
Also, now in order for gigabit to work, PHY driver needs to advertise PHY_GBIT_FEATURES instead of PHY_BASIC_FEATURES

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
4 years agoipq40xx: 5.4: fix of_get_mac_address obsolete usage OOPs
Petr Štetiar [Mon, 16 Mar 2020 08:43:00 +0000 (09:43 +0100)]
ipq40xx: 5.4: fix of_get_mac_address obsolete usage OOPs

of_get_mac_address returns valid pointer or ERR_PTR since 5.2 via commit
d01f449c008a ("of_net: add NVMEM support to of_get_mac_address") so the
patch fixes following OOPs on nbg6617:

 Unable to handle kernel paging request at virtual address ffffffed
 CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.4.24 #0
 PC is at edma_axi_probe+0x444/0x1114
 LR is at bus_find_device+0x88/0x9c

Where the PC can be resolved to:

 >>> l *edma_axi_probe+0x444
 0xc067be5c is in edma_axi_probe (./include/linux/string.h:378).

 >>> l *edma_axi_probe+0x43f
 0xc067be57 is in edma_axi_probe (drivers/net/ethernet/qualcomm/essedma/edma_axi.c:936)

Which leads to the following code fragment:

 935  mac_addr = of_get_mac_address(pnp);
 936  if (mac_addr)
 937      memcpy(edma_netdev[idx_mac]->dev_addr, mac_addr, ETH_ALEN);

Where using mac_addr=0xffffffed (-ENODEV) as source address in memcpy()
is causing the OOPs.

Acked-by: John Crispin <john@phrozen.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agosunxi: add testing 5.4 kernel
Aleksander Jan Bajkowski [Mon, 9 Mar 2020 21:58:32 +0000 (22:58 +0100)]
sunxi: add testing 5.4 kernel

Add 5.4 as testing kernel.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years agosunxi: move common options from subtargets into target kconfig
Aleksander Jan Bajkowski [Tue, 10 Mar 2020 21:59:20 +0000 (22:59 +0100)]
sunxi: move common options from subtargets into target kconfig

These new options are common for all subtargets and can be moved into target kconfig.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years agosunxi: refresh config for all subtargets
Aleksander Jan Bajkowski [Tue, 10 Mar 2020 21:50:17 +0000 (22:50 +0100)]
sunxi: refresh config for all subtargets

This was done by executing these command for all subtargets:

$ time make -j9 kernel_oldconfig CONFIG_TARGET=subtarget

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years agosunxi: remove old symbols from 5.4 kconfig
Aleksander Jan Bajkowski [Tue, 10 Mar 2020 21:39:59 +0000 (22:39 +0100)]
sunxi: remove old symbols from 5.4 kconfig

These options only exist earlier kernel versions.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years agosunxi: remove options that are already in generic kconfig
Aleksander Jan Bajkowski [Tue, 10 Mar 2020 21:25:22 +0000 (22:25 +0100)]
sunxi: remove options that are already in generic kconfig

These options are already definied in generic 5.4 kconfig.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years agokernel: move disabled symbols into generic kconfig
Aleksander Jan Bajkowski [Mon, 9 Mar 2020 21:57:31 +0000 (22:57 +0100)]
kernel: move disabled symbols into generic kconfig

Move some disabled kconfig options found in sunxi kconfig into generic.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years agosunxi: make patches apply cleanly on 5.4
Aleksander Jan Bajkowski [Mon, 9 Mar 2020 21:56:07 +0000 (22:56 +0100)]
sunxi: make patches apply cleanly on 5.4

These patches are already in mainline 5.4 kernel:
* 010-v5.3-drivers-ata-ahci_sunxi-Increased-SATA-AHCI-DMA-TX-RX.patch
* 101-arm64-dts-allwinner-a64-Enable-A64-timer-workaround.patch

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years agosunxi: copy config and patches from 4.19 to 5.4
Aleksander Jan Bajkowski [Mon, 2 Mar 2020 18:32:34 +0000 (19:32 +0100)]
sunxi: copy config and patches from 4.19 to 5.4

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years agokernel: sort generic configuration
Aleksander Jan Bajkowski [Thu, 12 Mar 2020 22:40:51 +0000 (23:40 +0100)]
kernel: sort generic configuration

This was done by executing these commands:

$ ./scripts/kconfig.pl '+' target/linux/generic/config-4.19 /dev/null > target/linux/generic/config-4.19-new
$ mv target/linux/generic/config-4.19-new target/linux/generic/config-4.19

$ ./scripts/kconfig.pl '+' target/linux/generic/config-5.4 /dev/null > target/linux/generic/config-5.4-new
$ mv target/linux/generic/config-5.4-new target/linux/generic/config-5.4

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years agox86: switch to 5.4 kernel
Petr Štetiar [Wed, 11 Mar 2020 11:21:49 +0000 (12:21 +0100)]
x86: switch to 5.4 kernel

Seems to be working fine on apu2 and QEMU, it's 99.9% upstream stuff
anyway. Lets start wider userbase testing.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoimx6: switch to 5.4 kernel
Petr Štetiar [Wed, 11 Mar 2020 11:21:49 +0000 (12:21 +0100)]
imx6: switch to 5.4 kernel

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

Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agorpcd: fix respawn settings
Petr Štetiar [Thu, 5 Mar 2020 08:33:52 +0000 (09:33 +0100)]
rpcd: fix respawn settings

Commit 432ec292ccc8 ("rpcd: add respawn param") has introduced infinite
restarting of the service which could be reached over network. This is
not recommended security practice as it might give potential adversary
infinite number of tries in case there might be some issue in the rpcd
or its surrounding stack.

So lets remove the currently bogus `respawn_retry` variable (it wasn't
possible to override it anyway), reverting to the previous default max.
of 5 service restarts which could be now overriden via system's UCI
settings if desired.

Cc: Jo-Philip Wich <jow@mein.io>
Cc: Florian Eckert <fe@dev.tdt.de>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Fixes: 432ec292ccc8 ("rpcd: add respawn param")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agocurl: bump to 7.69.1
Hans Dedecker [Mon, 16 Mar 2020 20:26:33 +0000 (21:26 +0100)]
curl: bump to 7.69.1

For changes in 7.69.1; see https://curl.haxx.se/changes.html#7_69_1

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agobcm27xx: sync 5.4 patches with RPi Foundation
Álvaro Fernández Rojas [Mon, 16 Mar 2020 19:41:03 +0000 (20:41 +0100)]
bcm27xx: sync 5.4 patches with RPi Foundation

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agowwan: fix hotplug event handling
Rozhuk Ivan [Sat, 16 Nov 2019 02:11:10 +0000 (05:11 +0300)]
wwan: fix hotplug event handling

Hotplug manager send: "remove" -> "add" -> "bind" events,
script interpret bind as "not add" = "remove" and mark device
as unavailable.

Signed-off-by: Rozhuk Ivan <rozhuk.im@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
4 years agocomgt: fix hotplug event handling
Rozhuk Ivan [Sat, 16 Nov 2019 02:10:05 +0000 (05:10 +0300)]
comgt: fix hotplug event handling

Hotplug manager send: "remove" -> "add" -> "bind" events,
script interpret bind as "not add" = "remove" and mark device
as unavailable.

Signed-off-by: Rozhuk Ivan <rozhuk.im@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
4 years agonetifd: update to latest git HEAD
Hans Dedecker [Mon, 16 Mar 2020 19:56:30 +0000 (20:56 +0100)]
netifd: update to latest git HEAD

dbdef93 interface-ip: transfer prefix route ownership for deprecated ipv6addr to kernel

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agobcm27xx: switch to 5.4 kernel
Petr Štetiar [Mon, 16 Mar 2020 09:19:19 +0000 (10:19 +0100)]
bcm27xx: switch to 5.4 kernel

Been running it for a few days on RPi0W PMS sensor node and on RPi4.
Lets start wider userbase testing.

Cc: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoipq806x: read both WG2600HP MAC addresses from flash
Yanase Yuki [Mon, 16 Mar 2020 08:42:38 +0000 (17:42 +0900)]
ipq806x: read both WG2600HP MAC addresses from flash

WG2600HP has its WLAN MAC addresses at PRODUCTDATA 0xc and 0x12, so
use them both directly.

Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp>
[commit title/message clarification]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoipq806x: remove useless case within default case for upgrade
Adrian Schmutzler [Mon, 16 Mar 2020 15:34:07 +0000 (16:34 +0100)]
ipq806x: remove useless case within default case for upgrade

The default case will catch anything left, there is no need to
explicitly add any device to it.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agolibnftnl: bump to 1.1.5
Kevin Darbyshire-Bryant [Mon, 16 Mar 2020 09:07:36 +0000 (09:07 +0000)]
libnftnl: bump to 1.1.5

Solve missing references to nftnl_set_list_lookup_byname when building
iptables with Nftables support enabled (CONFIG_IPTABLES_NFTABLES)

Bump the ABI version to force everything to match.

/Users/kevin/wrt/staging_dir/toolchain-x86_64_gcc-9.2.0_musl/lib/gcc/x86_64-openwrt-linux-musl/9.2.0/../../../../x86_64-openwrt-linux-musl/bin/ld: xtables_nft_multi-nft-bridge.o: in function `nft_bridge_parse_lookup':
nft-bridge.c:(.text.nft_bridge_parse_lookup+0xcd): undefined reference to `nftnl_set_list_lookup_byname'
/Users/kevin/wrt/staging_dir/toolchain-x86_64_gcc-9.2.0_musl/lib/gcc/x86_64-openwrt-linux-musl/9.2.0/../../../../x86_64-openwrt-linux-musl/bin/ld: xtables_nft_multi-nft-cache.o: in function `nftnl_set_list_cb':
nft-cache.c:(.text.nftnl_set_list_cb+0x80): undefined reference to `nftnl_set_list_lookup_byname'
/Users/kevin/wrt/staging_dir/toolchain-x86_64_gcc-9.2.0_musl/lib/gcc/x86_64-openwrt-linux-musl/9.2.0/../../../../x86_64-openwrt-linux-musl/bin/ld: xtables_nft_multi-nft-cache.o: in function `fetch_set_cache':
nft-cache.c:(.text.fetch_set_cache+0x10a): undefined reference to `nftnl_set_list_lookup_byname'
collect2: error: ld returned 1 exit status
make[6]: *** [xtables-nft-multi] Error 1
make[5]: *** [all] Error 2
make[4]: *** [all-recursive] Error 1
make[3]: *** [all] Error 2
make[2]: *** [/Users/kevin/wrt/build_dir/target-x86_64_musl/linux-x86_64/iptables-1.8.4/.built] Error 2
make[2]: Leaving directory `/Users/kevin/wrt/package/network/utils/iptables'

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agokernel: make kmod-i2c-mux selected by dependent modules
Sungbo Eo [Mon, 16 Mar 2020 05:55:40 +0000 (14:55 +0900)]
kernel: make kmod-i2c-mux selected by dependent modules

Currently kmod-i2c-mux-* will not get into images unless kmod-i2c-mux is added
to DEVICE_PACKAGES as well. By changing the dependencies from "depends on" to
"select", we do not have the issue anymore.

Furthermore, we can remove most occurrences of the package from DEVICE_PACKAGES
and similar variables, as it is now pulled by dependent modules such as:
- kmod-i2c-mux-pca954x

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agooxnas: rework 02_network
Sungbo Eo [Sun, 15 Mar 2020 17:42:38 +0000 (02:42 +0900)]
oxnas: rework 02_network

Just like other targets do, introduce two setup functions for interfaces and
MAC addresses.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agooxnas: use dt-bindings macros for GPIO
Sungbo Eo [Sun, 15 Mar 2020 11:56:40 +0000 (20:56 +0900)]
oxnas: use dt-bindings macros for GPIO

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agooxnas: merge Pogoplug V3 DTS patches into one file
Sungbo Eo [Sun, 15 Mar 2020 11:44:05 +0000 (20:44 +0900)]
oxnas: merge Pogoplug V3 DTS patches into one file

As it seeems these patches are for OpenWrt and they are not going to be merged
to mainline, let's merge them to improve maintainability.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agooxnas: sort kernel configs
Sungbo Eo [Sun, 15 Mar 2020 11:31:30 +0000 (20:31 +0900)]
oxnas: sort kernel configs

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agooxnas: remove duplicate config options
Sungbo Eo [Sun, 15 Mar 2020 11:39:36 +0000 (20:39 +0900)]
oxnas: remove duplicate config options

Remove symbols already covered by generic and target kernel configs.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agooxnas: use AddDepends in modules.mk
Sungbo Eo [Sun, 15 Mar 2020 10:35:50 +0000 (19:35 +0900)]
oxnas: use AddDepends in modules.mk

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agooxnas: harmonize line breaks in ox820.mk
Sungbo Eo [Sun, 15 Mar 2020 10:33:43 +0000 (19:33 +0900)]
oxnas: harmonize line breaks in ox820.mk

Follow the guideline suggested in e417ff88f19b ("ramips: harmonize line breaks
in image Makefiles").

While at it, fix typos in the device title of Akitio MyCloud.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agolantiq: move mux for pins into subnodes
Mathias Kresin [Sun, 15 Mar 2020 20:26:23 +0000 (21:26 +0100)]
lantiq: move mux for pins into subnodes

The mux need to be defined in a subnode to be considered by the pinctrl
framework. These muxes aren't set as expected and might cause not
working subsystems.

Fixes: 8e7b573b7aa4 ("lantiq: dts: assign the PCI pins to the PCI controller node")
Fixes: dcb5e52209e5 ("lantiq: dts: assign the STP pins to the STP GPIO controller node")
Fixes: 660200e53d62 ("lantiq: dts: assign the GPHY LED pins to the Ethernet controller node")
Signed-off-by: Mathias Kresin <dev@kresin.me>
4 years agoiproute2: revert add libcap support, enabled in ip-full
Mathias Kresin [Thu, 5 Mar 2020 19:34:27 +0000 (20:34 +0100)]
iproute2: revert add libcap support, enabled in ip-full

This reverts commit a6da3f9ef746101b84a6f530f5a40de28341b69a.

The libcap isn't as optional as the commit messages suggests. A hard
dependency to the libcap package is added, which is only available in
the external packages feed. Therefore it is impossible to package
ip-full without having the external packages feed up and running, which
is a regression to the former behaviour.

Signed-off-by: Mathias Kresin <dev@kresin.me>
Acked-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agopkgconf: always retain -I and -L flags
Jo-Philipp Wich [Fri, 13 Mar 2020 14:54:50 +0000 (15:54 +0100)]
pkgconf: always retain -I and -L flags

The pkgconf fork filters -I and -L flag values from .pc files which match
pkgconf's builtin system directory value.

During configure, pkgconf derives the default system include and library
search path values from exec_prefix, which is set to staging_dir/host in
the host tool build phase.

Due to that, pkgconf will drop all -I and -L flags pointing to
staging_dir/host/include or staging_dir/host/lib, unless invoked with
--keep-system-cflags and --keep-system-libs respectively, breaking our
kernel libelf discovery / stack validation workarounds.

In order to inhibit the filtering, add --keep-system-cflags and
--keep-system-libs to our pkg-config shell wrapper.

Fixes: GH#2832
Fixes: 867298cf47 ("tools/pkg-config: Replace with pkgconf")
Ref: https://lists.infradead.org/pipermail/openwrt-devel/2020-March/022182.html
Ref: https://git.openwrt.org/fe43969336201f2cc7d103b68fd6e65989bee184
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Acked-by: Petr Štetiar <ynezz@true.cz>
4 years agoodhcpd: update to latest git HEAD
Hans Dedecker [Sun, 15 Mar 2020 19:06:12 +0000 (20:06 +0100)]
odhcpd: update to latest git HEAD

6594c6b ubus: use dhcpv6 ia assignment flag
a90cc2e dhcpv6-ia: avoid setting lifetime to infinite for static assignments
bb07fa4 dhcpv4: avoid setting lifetime to infinite for static assignments

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agoiptables: update to 1.8.4
Kevin Darbyshire-Bryant [Tue, 31 Dec 2019 10:55:50 +0000 (10:55 +0000)]
iptables: update to 1.8.4

Bump to iptable 1.8.4 and address packaging issue as mentioned in the
original bump/revert cycle.

"This reverts commit 10cbc896c0a26aecff37261450c21f29fb5b99db.
The updated iptables package does not build due to the following error
encountered on the buildbots:
    cp: cannot stat '.../iptables-1.8.4/ipkg-install/usr/lib/libiptc.so.*': No such file or directory

The changelog mentions "build: remove -Wl,--no-as-needed and libiptc.so" so
it appears as if further packaging changes are needed beyond a simple
version bump."

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoipq40xx: 5.4: enable NAND
Robert Marko [Sun, 15 Mar 2020 12:36:40 +0000 (13:36 +0100)]
ipq40xx: 5.4: enable NAND

Lets enable RAW NAND and Qcom NANDC drivers again in kernel 5.4.
They were dropped when 5.4 support was introduced due to upstream
changing the symbol names so refreshing was not enough.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
[cut long line in commit message, enabled BCH as well]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoath79: fix missing watchdog core dependency for hwmon-sch5627
David Bauer [Sun, 15 Mar 2020 02:36:16 +0000 (03:36 +0100)]
ath79: fix missing watchdog core dependency for hwmon-sch5627

Fixes following error uncovered while building ath79/tiny on 5.4:

 Package kmod-hwmon-sch5627 is missing dependencies for the following
 libraries:
 watchdog.ko

See the similar commit e546e6252bb1 ("malta: fix missing watchdog core
dependency for hwmon-sch5627") for a detailed explanation.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agomvebu: use generic diag.sh
Sungbo Eo [Wed, 11 Mar 2020 17:50:35 +0000 (02:50 +0900)]
mvebu: use generic diag.sh

This commit removes the target-specific diag.sh script. This way, the
generic one is used for the target, which uses DT-aliases to specify the
LEDs used.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Tested-by: Ansuel Smith <ansuelsmth@gmail.com> [wrt3200acm @ 5.4]
4 years agoath79: add correct phy-mode for QCA9563 boards
David Bauer [Sat, 14 Mar 2020 23:01:38 +0000 (00:01 +0100)]
ath79: add correct phy-mode for QCA9563 boards

The TP-Link RE450 as well as the UniFi AC series missed the phy-mode
property. Because of this, the incorrect MII phy-mode from the root dtsi
was used.

With Kernel 5.4, this leads to problems when used with a AR8033 PHY. The
bootloader seems to leave the fiber pages selected.

As there's not switch to copper pages happening in at803x_config_init
due to the incorrect phy-mode, the new at803x_read_status will interpret
the status of the SGMII side as the status of the copper side.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agoapm821xx: 4.14: remove kernel config and patches
Christian Lamparter [Sat, 7 Mar 2020 15:58:32 +0000 (16:58 +0100)]
apm821xx: 4.14: remove kernel config and patches

This patch removes the 4.14 kernel support from the apm821xx target.
The 4.19 kernel has been available and stable for a while and the 5.4
kernel support has been tested successfully on real hardware as well.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agobuild: fix kernel 5.4 on macos
Kevin Darbyshire-Bryant [Fri, 13 Mar 2020 17:56:40 +0000 (17:56 +0000)]
build: fix kernel 5.4 on macos

As part of the kernel build process there are utilities built to run on
the host system that expect linux kernel headers to be available.
Unfortunately macos/darwin doesn't have these headers.

vdso2c requires types.h so provide a minimal stub to satisfy it.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoath79: use downstream ag71xx for Kernel 5.4
David Bauer [Fri, 13 Mar 2020 00:07:39 +0000 (01:07 +0100)]
ath79: use downstream ag71xx for Kernel 5.4

The ag71xx driver from Linux 5.4 currently has various shortcomings
when used with OpenWrt compared to our downstream version.

For example, the upstream driver does not support modifying the ethernet
clock and configuring RGMII delays on the MAC side.

While we should certainly switch to the upstream driver, the amount of
necessary patches would make it cumbersome to work with. It's also
highly likely we won't be able to finish patching the upstream driver in
time for a Linux 5.4 release.

Tested on Siemens WS-AP3610.

CC: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoprocd: update to latest git HEAD
Daniel Golle [Fri, 13 Mar 2020 19:06:03 +0000 (20:06 +0100)]
procd: update to latest git HEAD

77a6782 jail: mount-bind /etc/resolv.conf for non-netns jails

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agobase-files: convert leading spaces to tabs in functions.sh
Adrian Schmutzler [Fri, 13 Mar 2020 14:51:30 +0000 (15:51 +0100)]
base-files: convert leading spaces to tabs in functions.sh

Use tabs for indent consistently.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agokernel: make kmod-i2c-core selected by dependent modules
Sungbo Eo [Thu, 5 Mar 2020 14:42:18 +0000 (23:42 +0900)]
kernel: make kmod-i2c-core selected by dependent modules

Currently kmod-i2c-* will not get into images unless kmod-i2c-core is added to
DEVICE_PACKAGES as well. By changing the dependencies from "depends on" to
"select", we do not have the issue anymore.

Furthermore, we can remove most occurrences of the package from DEVICE_PACKAGES
and similar variables, as it is now pulled by dependent modules such as:
- kmod-hwmon-lm75
- kmod-i2c-gpio
- kmod-i2c-gpio-custom
- kmod-i2c-mux
- kmod-i2c-ralink

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[do not touch ar71xx]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agokernel: make kmod-hwmon-core selected by dependent modules
Sungbo Eo [Thu, 5 Mar 2020 14:22:47 +0000 (23:22 +0900)]
kernel: make kmod-hwmon-core selected by dependent modules

Currently kmod-hwmon-* will not get into images unless kmod-hwmon-core is added
to DEVICE_PACKAGES as well. By changing the dependencies from "depends on" to
"select", we do not have the issue anymore.

Furthermore, we can remove most occurrences of the package from DEVICE_PACKAGES
and similar variables, as it is now pulled by dependent modules such as:
- kmod-hwmon-gpiofan
- kmod-hwmon-lm63
- kmod-hwmon-lm75
- kmod-hwmon-lm85
- kmod-hwmon-lm90

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[do not touch ar71xx, adjust line wrapping]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agolayerscape: add kmod-i2c-mux to DEVICE_PACKAGES for traverse-ls1043
Sungbo Eo [Wed, 11 Mar 2020 02:27:59 +0000 (11:27 +0900)]
layerscape: add kmod-i2c-mux to DEVICE_PACKAGES for traverse-ls1043

kmod-i2c-mux-pca954x will not get into images unless kmod-i2c-mux is added to
DEVICE_PACKAGES as well.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agoramips: add support for TOTOLINK A3
Sungbo Eo [Thu, 12 Mar 2020 19:19:32 +0000 (04:19 +0900)]
ramips: add support for TOTOLINK A3

TOTOLINK A3 is a clone of ipTIME A3. The only difference is the model name.

Specifications:
- SoC: MT7628AN
- RAM: DDR2 64MB
- Flash: SPI NOR 8MB
- WiFi:
  - 2.4GHz: SoC internal
  - 5GHz: MT7612EN
- Ethernet: 3x 10/100Mbps
  - Switch: SoC internal

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

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

Tested on device by JasonHCH <hsuan670629@gmail.com>

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agoath79: add support for TP-Link TL-WR740N v5
Jun Su [Tue, 3 Mar 2020 09:33:40 +0000 (17:33 +0800)]
ath79: add support for TP-Link TL-WR740N v5

This adds support for the TP-Link TL-WR740N v5, a clone of the
v4 only with a different TPLINK_HWID. It was already supported
in ar71xx as well.

Specifications:

SOC: Atheros AR9331
CPU: 400MHz
Flash: 4 MiB
RAM: 32 MiB
WLAN: Atheros AR9330 bgn
Ethernet: 5 ports (100M)

Flashing instructions:

- Flash factory image from OEM WebUI:
  openwrt-ath79-tiny-tplink_tl-wr740n-v5-squashfs-factory.bin
- Sysupgrade from ar71xx image:
  openwrt-ath79-tiny-tplink_tl-wr740n-v5-squashfs-sysupgrade.bin

Signed-off-by: Jun Su <howard0su@gmail.com>
[commit title/message facelift]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agokernel: ifb: set default numifbs to 0
Kevin Darbyshire-Bryant [Wed, 22 Jan 2020 22:03:56 +0000 (22:03 +0000)]
kernel: ifb: set default numifbs to 0

By default on module load, 2 ifb interfaces are created and typically
remain unused, cluttering 'ip link' outputs and generally confusing
things.  sqm-scripts for example, creates its own ifb interface/s
instead of using these 2 defaults ifbs.

Tell the ifb module to not create any default ifbs on load via the
numifbs parameter.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agotools/cmake: Update to 3.16.5
Yufei Miao [Wed, 11 Mar 2020 05:38:53 +0000 (13:38 +0800)]
tools/cmake: Update to 3.16.5

Update cmake to 3.16.5

Signed-off-by: Yufei Miao <myf@myf.cloud>
4 years agoprocd: actually wire-up netns support
Daniel Golle [Thu, 12 Mar 2020 19:53:36 +0000 (20:53 +0100)]
procd: actually wire-up netns support

When support for network namespaces was added to procd, adding the
corresponding jail flag in procd.sh was ommitted. Add it now.

Fixes: 97a03a4760 ("procd: update to latest git HEAD")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoath79: add back NAND symbols to NAND target
David Bauer [Thu, 12 Mar 2020 13:08:30 +0000 (14:08 +0100)]
ath79: add back NAND symbols to NAND target

The NAND config symbols were removed unintentionally while adding
support for Linux 5.4.

Add the respective symbols for v4.19 as well as v5.4.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agoimx6: add support for GW5907/GW5910/GW5912/GW5913
Tim Harvey [Wed, 11 Mar 2020 15:02:58 +0000 (08:02 -0700)]
imx6: add support for GW5907/GW5910/GW5912/GW5913

This patch adds support for GW5907/GW5910/GW5912/GW5913 IMX6 based boards
from the Gateworks Ventana Family[A]:
- backport upstream dt patches from 5.6 to 4.19 and 5.4
- add dtb's to ventana images
- add board-name and network config

A. https://www.gateworks.com/products/imx6-single-board-computer-gateworks-ventana-family

Flashing instructions for Ventana boards:

Using pre-flashed bootloader:
- Use appropriate ubi image depending on board NAND to flash via bootloader:
openwrt-imx6-ventana-squashfs-nand.ubi - 2KiB page size
openwrt-imx6-ventana-large-squashfs-nand.ubi - 4KiB page size
http://trac.gateworks.com/wiki/linux/ubi

Using Gateworks JTAG dongle:
- Use Gateworks mkimage_jtag script to create a JTAG image comprised of
pre-built bootloader and ubi image:
http://trac.gateworks.com/wiki/jtag_instructions

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
4 years agoimx6: remove unnecessary wildcard from board name matching
Tim Harvey [Tue, 10 Mar 2020 15:03:20 +0000 (08:03 -0700)]
imx6: remove unnecessary wildcard from board name matching

The wildcard used in the network config matching is not necessary
given the board names returned by imx6_board_detect() in lib/imx6.sh.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
4 years agolayerscape: sysupgrade: require metadata
Tomasz Maciej Nowak [Tue, 25 Feb 2020 19:07:41 +0000 (20:07 +0100)]
layerscape: sysupgrade: require metadata

Require the image metadata check so no invalid image could be fed to
sysupgrade without force option.

Cc: Mathew McBride <matt@traverse.com.au>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agolayerscape: ls10121frdm: add sysupgrade
Tomasz Maciej Nowak [Tue, 25 Feb 2020 19:07:40 +0000 (20:07 +0100)]
layerscape: ls10121frdm: add sysupgrade

Instead of dangerous rewriting full chip with firmware.bin image to
update OpenWrt, add sysupgrade image. This image will be used to update
kernel and rootfs, leaving bootloader intact and making recovery
possible, without resorting to external hardware tools.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agolayerscape: ls1012afrdm: introduce dynamic partitioning
Tomasz Maciej Nowak [Tue, 25 Feb 2020 19:07:39 +0000 (20:07 +0100)]
layerscape: ls1012afrdm: introduce dynamic partitioning

Combine fixed sizes of "kernel" and "rootfs" partitions into one
partition managed by OpenWrt splitter, it will allow better management
of chip capacity and less maintenance burden when compiled kernel image
will outgrow allocated size for kernel partition. This also changes kernel
image format, since splitter only manages kernel and rootfs partitions,
the dtb needs to be updated with the kernel, so for convenience, kernel is
packed to FIT image.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agolayerscape: ls1012afrdm: convert image to squashfs
Tomasz Maciej Nowak [Tue, 25 Feb 2020 19:07:38 +0000 (20:07 +0100)]
layerscape: ls1012afrdm: convert image to squashfs

This commit replaces UBIFS root partition with squashfs+overlay. It's
preparation for introducing dynamic partitioning.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agolayerscape: ls1012afrdm: add uncompressed initramfs
Tomasz Maciej Nowak [Tue, 25 Feb 2020 19:07:37 +0000 (20:07 +0100)]
layerscape: ls1012afrdm: add uncompressed initramfs

Uncompressing of initramfs image fails on board with U-Boot from "QorIQ
SDK (FSL Reference Distro) 2.0".

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agolayerscape: resurrect support for FRDM-LS1012A
Tomasz Maciej Nowak [Tue, 25 Feb 2020 19:07:36 +0000 (20:07 +0100)]
layerscape: resurrect support for FRDM-LS1012A

Re-add support for NXP FRDM-LS1012A, which mimics the flash layout of the
rest boards supported by LSDK.

0x000000000000-0x000000100000 : "bl2"
0x000000100000-0x000000500000 : "fip"
0x000000500000-0x000000600000 : "u-boot-env"
0x000000600000-0x000000a00000 : "reserved-1"
0x000000a00000-0x000000d00000 : "pfe"
0x000000d00000-0x000000f00000 : "reserved-2"
0x000000f00000-0x000001000000 : "dtb"
0x000001000000-0x000002000000 : "kernel"
0x000002000000-0x000004000000 : "ubifs"

Specification
SoC: LS1012A single core 800MHz
RAM: 512 MB DDR3
Flash: 64 MB QSPI NOR
Ethernet: 2x 10/100/1000 Mbps
Connectors: µUSB 3.0 OTG
            µUSB 2.0 (debugging & power input)
            2x 3.5mm jack for microphone & headphone (SGTL5000)
            Arduino Shield expansion with I2C, SPI, UART, and GPIO
            JTAG
LEDS: 3x (non-configurable)
Buttons: 1x (reset, non-configurable)

Be advised that erasing or writing 64MB flash takes some time to finish.
Do not reset the board until all operations end with success, otherwise
You'll need external tools to re-program the flash chip.

Installation
Follow the QSPI programing procedure for LS1012AFRWY board in
target/linux/layerscape/README, point 3.3.
Don't forget about updating U-Boot environment with MAC addresses of
ethernet interfaces, variable 'ethaddr' for eth0 and 'eth1addr' for eth1.

As the LSDK images do not support sysupgrade, nor do changes in this
commit, it's planed in upcoming submissions.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agokernel: 5.4: add unconfigured symbols
Tim Harvey [Mon, 9 Mar 2020 23:30:24 +0000 (16:30 -0700)]
kernel: 5.4: add unconfigured symbols

This patch adds a few symbols that I found that
need disabling in order to not break the build of octeontx

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
4 years agogeneric: 5.4: Add 4B_OPCODES flag to w25q256
Robert Marko [Tue, 10 Mar 2020 17:20:01 +0000 (18:20 +0100)]
generic: 5.4: Add 4B_OPCODES flag to w25q256

This patch backports the upstream patch that adds the 4B_OPCODES flag to w25q256 under 5.4 kernel.
This is needed for ipq40xx and ramips.

Signed-off-by: Robert Marko <robimarko@gmail.com>
4 years agogeneric: 4.19: Add 4B_OPCODES flag to w25q256
Robert Marko [Tue, 10 Mar 2020 17:17:02 +0000 (18:17 +0100)]
generic: 4.19: Add 4B_OPCODES flag to w25q256

This patch backports the upstream patch that adds the 4B_OPCODES flag to w25q256 under 4.19 kernel.
This is needed for ipq40xx and ramips.

Signed-off-by: Robert Marko <robimarko@gmail.com>
4 years agooxnas: switch to kernel 5.4 and remove kernel 4.14
Daniel Golle [Thu, 12 Mar 2020 09:25:21 +0000 (10:25 +0100)]
oxnas: switch to kernel 5.4 and remove kernel 4.14

Run-tested 5.4 on Shuttle KD20 for some days now, everything seems
fine so far. Let's have snapshot builds based on 5.4.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agox86: Remove kernel 4.14 support
Hauke Mehrtens [Sat, 29 Feb 2020 15:31:26 +0000 (16:31 +0100)]
x86: Remove kernel 4.14 support

This target was switched to kernel 4.19 more than 6 months ago in commit
f342ffd300da ("treewide: kernel: bump some targets to 4.19") and now
with kernel 5.4 support being added it gets harder to support kernel
4.14 in addition to kernel 4.19 and 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agotegra: Remove kernel 4.14 support
Hauke Mehrtens [Sat, 29 Feb 2020 15:52:57 +0000 (16:52 +0100)]
tegra: Remove kernel 4.14 support

This target was switched to kernel 4.19 more than 6 months ago in commit
f342ffd300da ("treewide: kernel: bump some targets to 4.19") and now
with kernel 5.4 support being added it gets harder to support kernel
4.14 in addition to kernel 4.19 and 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agosunxi: Remove kernel 4.14 support
Hauke Mehrtens [Sat, 29 Feb 2020 15:38:58 +0000 (16:38 +0100)]
sunxi: Remove kernel 4.14 support

This target was switched to kernel 4.19 more than 6 months ago in commit
f342ffd300da ("treewide: kernel: bump some targets to 4.19") and now
with kernel 5.4 support being added it gets harder to support kernel
4.14 in addition to kernel 4.19 and 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoocteon: Remove kernel 4.14 support
Hauke Mehrtens [Sat, 29 Feb 2020 15:52:36 +0000 (16:52 +0100)]
octeon: Remove kernel 4.14 support

This target was switched to kernel 4.19 more than 6 months ago in commit
f342ffd300da ("treewide: kernel: bump some targets to 4.19") and now
with kernel 5.4 support being added it gets harder to support kernel
4.14 in addition to kernel 4.19 and 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agomvebu: Remove kernel 4.14 support
Hauke Mehrtens [Sat, 29 Feb 2020 15:52:03 +0000 (16:52 +0100)]
mvebu: Remove kernel 4.14 support

This target was switched to kernel 4.19 more than 6 months ago in commit
f342ffd300da ("treewide: kernel: bump some targets to 4.19") and now
with kernel 5.4 support being added it gets harder to support kernel
4.14 in addition to kernel 4.19 and 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agompc85xx: Remove kernel 4.14 support
Hauke Mehrtens [Sat, 29 Feb 2020 15:50:56 +0000 (16:50 +0100)]
mpc85xx: Remove kernel 4.14 support

This target was switched to kernel 4.19 more than 6 months ago in commit
f342ffd300da ("treewide: kernel: bump some targets to 4.19") and now
with kernel 5.4 support being added it gets harder to support kernel
4.14 in addition to kernel 4.19 and 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agomalta: Remove kernel 4.14 support
Hauke Mehrtens [Sat, 29 Feb 2020 15:50:26 +0000 (16:50 +0100)]
malta: Remove kernel 4.14 support

This target was switched to kernel 4.19 more than 6 months ago in commit
f342ffd300da ("treewide: kernel: bump some targets to 4.19") and now
with kernel 5.4 support being added it gets harder to support kernel
4.14 in addition to kernel 4.19 and 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Yousong Zhou <yszhou4tech@gmail.com>
4 years agoipq40xx: Remove kernel 4.14 support
Hauke Mehrtens [Sat, 29 Feb 2020 15:36:21 +0000 (16:36 +0100)]
ipq40xx: Remove kernel 4.14 support

This target was switched to kernel 4.19 more than 6 months ago in commit
f342ffd300da ("treewide: kernel: bump some targets to 4.19") and now
with kernel 5.4 support being added it gets harder to support kernel
4.14 in addition to kernel 4.19 and 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoimx6: Remove kernel 4.14 support
Hauke Mehrtens [Sat, 29 Feb 2020 15:49:58 +0000 (16:49 +0100)]
imx6: Remove kernel 4.14 support

This target was switched to kernel 4.19 more than 6 months ago in commit
f342ffd300da ("treewide: kernel: bump some targets to 4.19") and now
with kernel 5.4 support being added it gets harder to support kernel
4.14 in addition to kernel 4.19 and 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agogemini: Remove kernel 4.14 support
Hauke Mehrtens [Sat, 29 Feb 2020 15:49:09 +0000 (16:49 +0100)]
gemini: Remove kernel 4.14 support

This target was switched to kernel 4.19 more than 6 months ago in commit
f342ffd300da ("treewide: kernel: bump some targets to 4.19") and now
with kernel 5.4 support being added it gets harder to support kernel
4.14 in addition to kernel 4.19 and 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoath79: Remove kernel 4.14 support
Hauke Mehrtens [Sat, 29 Feb 2020 15:34:31 +0000 (16:34 +0100)]
ath79: Remove kernel 4.14 support

This target was switched to kernel 4.19 more than 6 months ago in commit
f342ffd300da ("treewide: kernel: bump some targets to 4.19") and now
with kernel 5.4 support being added it gets harder to support kernel
4.14 in addition to kernel 4.19 and 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years agoarmvirt: Remove kernel 4.14 support
Hauke Mehrtens [Sat, 29 Feb 2020 15:48:33 +0000 (16:48 +0100)]
armvirt: Remove kernel 4.14 support

This target was switched to kernel 4.19 more than 6 months ago in commit
f342ffd300da ("treewide: kernel: bump some targets to 4.19") and now
with kernel 5.4 support being added it gets harder to support kernel
4.14 in addition to kernel 4.19 and 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Yousong Zhou <yszhou4tech@gmail.com>
4 years agokernel: make kmod-ata-core selected by dependent modules
Sungbo Eo [Thu, 5 Mar 2020 13:57:29 +0000 (22:57 +0900)]
kernel: make kmod-ata-core selected by dependent modules

Currently kmod-ata-* will not get into images unless kmod-ata-core is added to
DEVICE_PACKAGES as well. By changing the dependencies from "depends on" to
"select", we do not have the issue anymore.

Furthermore, we can remove most occurrences of the package from DEVICE_PACKAGES
and similar variables, as it is now pulled by dependent modules such as:
- kmod-ata-ahci
- kmod-ata-ahci-mtk
- kmod-ata-sunxi

While at it, use AddDepends/ata for kmod-ata-pdc202xx-old.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agoipq806x: replace ${} with $()
Sungbo Eo [Tue, 10 Mar 2020 04:43:18 +0000 (13:43 +0900)]
ipq806x: replace ${} with $()

${} and $() are exactly the same. Follow the convention of using $().

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agoipq40xx: replace ${} with $()
Sungbo Eo [Tue, 10 Mar 2020 04:42:57 +0000 (13:42 +0900)]
ipq40xx: replace ${} with $()

${} and $() are exactly the same. Follow the convention of using $().

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agosunxi: remove SUNXI_UBOOT from DEVICE_VARS
Sungbo Eo [Wed, 11 Mar 2020 01:35:48 +0000 (10:35 +0900)]
sunxi: remove SUNXI_UBOOT from DEVICE_VARS

All SUNXI_UBOOT usages were removed in e018c4d7ab8b ("uboot-sunxi: clean up,
switch to u-boot.mk"). Now drop the variable completely.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agooxnas: clean up DEVICE_VARS
Sungbo Eo [Mon, 9 Mar 2020 07:21:42 +0000 (16:21 +0900)]
oxnas: clean up DEVICE_VARS

DTS variable is not used in any device. Just drop it.
UBIFS_OPTS is not device-dependent here. Remove it from DEVICE_VARS.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agobuild: image: move IMAGE_SIZE to image.mk
Sungbo Eo [Mon, 9 Mar 2020 12:14:06 +0000 (21:14 +0900)]
build: image: move IMAGE_SIZE to image.mk

IMAGE_SIZE is widely used in many targets. Declare it in the default template to
clean up redundant code. This also prevents deriving IMAGE_SIZE unintentionally
from the previously defined device.

While at it, remove duplicate KERNEL_SIZE declaration.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years agoar71xx: fix port order on TP-Link Archer C60 v1/v2
Adrian Schmutzler [Wed, 11 Mar 2020 15:05:40 +0000 (16:05 +0100)]
ar71xx: fix port order on TP-Link Archer C60 v1/v2

The labels on the LAN ports of the TP-Link Archer C60 v1/v2 are
actually inverted compared to the ports of the internal switch.

Add this information to 02_network.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: fix port order on TP-Link Archer C60 v1/v2
Adrian Schmutzler [Wed, 11 Mar 2020 15:00:56 +0000 (16:00 +0100)]
ath79: fix port order on TP-Link Archer C60 v1/v2

The labels on the LAN ports of the TP-Link Archer C60 v1/v2 are
actually inverted compared to the ports of the internal switch.

Add this information to 02_network.

This is the same for to-be-supported v3 of this device.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoar71xx: remove wrong MAC address adjustment for Archer C60 v2
Adrian Schmutzler [Wed, 11 Mar 2020 14:52:41 +0000 (15:52 +0100)]
ar71xx: remove wrong MAC address adjustment for Archer C60 v2

The adjustment of the MAC address for Archer C60 v2 in 10_fix_wifi_mac
is broken since a "mac" partition is not set up for this device on
ar71xx. Instead, the MAC address is already patched correctly in
11-ath10k-caldata.

Remove the useless adjustment.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoar71xx: fix swapped LAN/WAN MAC address for Archer C60 v1/v2
Adrian Schmutzler [Wed, 11 Mar 2020 14:46:00 +0000 (15:46 +0100)]
ar71xx: fix swapped LAN/WAN MAC address for Archer C60 v1/v2

The MAC addresses for lan/wan are swapped compared to the vendor
firmware. This adjusts to vendor configuration, which is:

lan   *:7b   label
wan   *:7c   label+1
2.4g  *:7b   label
5g    *:7a   label-1

Only one address is stored in <&mac 0x8>, corresponding to the label.

This has been checked on revisions v1, v2 and v3.

Since ar71xx calculates the ath10k MAC address based on the ethernet
addresses, the number there is adjusted, too.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: fix swapped LAN/WAN MAC address for Archer C60 v1/v2
Adrian Schmutzler [Wed, 11 Mar 2020 14:37:34 +0000 (15:37 +0100)]
ath79: fix swapped LAN/WAN MAC address for Archer C60 v1/v2

The MAC addresses for lan/wan are swapped compared to the vendor
firmware. This adjusts to vendor configuration, which is:

lan   *:7b   label
wan   *:7c   label+1
2.4g  *:7b   label
5g    *:7a   label-1

Only one address is stored in <&mac 0x8>, corresponding to the label.

This has been checked on revisions v1, v2 and v3.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agomt76: update to the latest version
Felix Fietkau [Wed, 11 Mar 2020 12:33:23 +0000 (13:33 +0100)]
mt76: update to the latest version

a94e43f277e2 mt76: mt76x02: reset MCU timeout counter earlier in watchdog reset

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agoarmvirt: fix missing watchdog core dependency for hwmon-sch5627
Petr Štetiar [Thu, 5 Mar 2020 11:46:21 +0000 (12:46 +0100)]
armvirt: fix missing watchdog core dependency for hwmon-sch5627

Fixes following error uncovered while building armvirt/64 on 5.4:

 Package kmod-hwmon-sch5627 is missing dependencies for the following libraries:
 watchdog.ko

That dependency was introduced in upstream via 2d8c7ff52c24
("hwmon/sch56xx: Depend on watchdog for watchdog core functions") in
v3.5.

The issue emerged in 5.4 because the kconfig symbol CONFIG_WATCHDOG_CORE
is now a tristate value.  Previously it was a bool.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoar71xx/ath79: ew-dorin, fix the trigger level for WPS button
Catrinel Catrinescu [Wed, 11 Mar 2020 09:10:00 +0000 (10:10 +0100)]
ar71xx/ath79: ew-dorin, fix the trigger level for WPS button

Because the WPS button had the wrong trigger level,
the failsafe mode was triggered quite often,
after this commit:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=27f3f493de

Signed-off-by: Catrinel Catrinescu <cc@80211.de>
4 years agokernel: backport out-of-memory fix for non-Ethernet devices
Rafał Miłecki [Wed, 11 Mar 2020 07:39:29 +0000 (08:39 +0100)]
kernel: backport out-of-memory fix for non-Ethernet devices

Doing up & down on non-Ethernet devices (e.g. monitor mode interface)
was consuming memory.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
4 years agocurl: bump to 7.69.0
Hans Dedecker [Tue, 10 Mar 2020 21:08:36 +0000 (22:08 +0100)]
curl: bump to 7.69.0

For changes in 7.69.0; see https://curl.haxx.se/changes.html#7_69_0

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agoramips: add support for Ubiquiti UniFi nanoHD
David Bauer [Sun, 8 Mar 2020 20:39:19 +0000 (21:39 +0100)]
ramips: add support for Ubiquiti UniFi nanoHD

Hardware
--------
SoC:   MediaTek MT7621AT
WiFi:  MediaTek MT7603 bgn 2T2R
       MediaTek MT7615 ac  4T4R
Flash: 32M SPI (Macronix MX25L25635F)
RAM:   128M DDR3 (Winbond W631GG6KB)
LED:   Dome (Blue / White)
BTN:   Reset

Installation
------------

These instructions were written for firmware version v3.9.27.
Downgrade if necessary.

1. Copy the OpenWrt sysupgrade image to the devices /tmp folder
   via scp. On factory defaults, user and password is "ubnt" at
   192.168.1.20/24.

2. Write the bootselect flag. Otherwise, the device might boot from the
   wrong partition. Verify the mtd partition used in the command below
   is the one labled "bs" in /proc/mtd (as this might change in the
   future).

   > dd if=/dev/zero bs=1 count=1 of=/dev/mtd4

3. Write the OpenWrt sysupgrade to the mtd partitions labled
   "kernel0" and "kernel1".

   > dd if=/tmp/openwrt-sysupgrade.bin of=/dev/mtdblock6
   > dd if=/tmp/openwrt-sysupgrade.bin of=/dev/mtdblock7

4. Reboot or powercycle the device.

Signed-off-by: David Bauer <mail@david-bauer.net>