openwrt/openwrt.git
3 years agomt76: update to 2020-07-22
Felix Fietkau [Mon, 22 Jun 2020 19:51:46 +0000 (21:51 +0200)]
mt76: update to 2020-07-22

7bc58ca2b375 mt76: add missing lock configuring coverage class
43febd452110 mt76: mt7615: fix lmac queue debugsfs entry
0b9975254694 mt76: mt7615: fix hw queue mapping
4058595e146e mt76: overwrite qid for non-bufferable mgmt frames
49c7131dd0c5 mt76: mt76x02: do not access uninitialized NAPI structs
f185d90ec51c update mt7915 firmware to the latest version
0ed6a335ebc2 mt76: mt7615: re-enable offloading of sequence number assignment
2a52eabbddc5 mt76: usb: rely on mt76_for_each_q_rx
90fc1d8614e1 mt76: mt7663: introduce ARP filter offload
b57223dd01b9 mt76: mt7615: fix up typo in Kconfig for MT7663U
ec4057d685c0 mt76: add script for generating single-sku device tree data
769b030de636 mt76: add functions for parsing rate power limits from DT
1d2aedb248d0 mt76: extend DT rate power limits to support 11ax devices
a3e17ff8e624 mt76: mt7615: implement support for using DT rate power limits
a48a4ae32d48 mt76: allow more channels, allowed in ETSI domain
869ba618ef54 mt76: fix include in pci.h
b1ddec840aa4 mt76: rely on register macros
d6d9a7ea428d mt76: add U-APSD support on AP side
ee13b78367db mt76: mt7615: fix EEPROM buffer size
82a94173b162 mt76: mt7915: add missing CONFIG_MAC80211_DEBUGFS
c0dbbd930d32 mt76: mt7615: add .set_tsf callback
84d54df76996 mt76: mt7915: add a fixed AC queue mapping
dacc2d29672d mt76: mt7915: add MU-MIMO support
1ce4660a0ea3 mt76: mt7915: use ieee80211_tx_queue_params to avoid open coded
53891242a682 mt76: mt7915: add support for DT rate power limits
b3a4d78914f6 mt76: mt7915: rework the flow of txpower setting
c6ea163c019b mt76: mt7915: directly read per-rate tx power from registers
8ae83adc73a8 mt76: mt7915: overwrite qid for non-bufferable mgmt frames
740b0bfdf279 mt76: mt76x2e: rename routines in pci.c
b5eee1b52234 mt76: mt7615: schedule tx tasklet and sta poll on mac tx free
72f34107248e mt76: mt7615: add support for accessing mapped registers via bus ops
46bc8a0b5347 mt76: mt7615: add support for accessing RF registers via MCU
882cec420609 mt76: mt7615: use full on-chip memory address for WF_PHY registers
b1ddb8e35ca2 mt76: vif_mask to struct mt76_phy
3a1ea7287eb2 mt76: add API for testmode support
d7467bc018e5 mt76: mt7615: implement testmode support
3ea5da1639fe add utility for using testmode support
6789a2db7246 mt7615: fix getting wideband RSSI in test mode
7941217ffe46 mt76: mt7915: remove unused parameters in mt7915_puts_rate_txpower()
13ab1d648684 mt76: mt7915: update HE capabilities
3f0e66dc25de mt76: mt76x2: fix pci suspend/resume on mt7612e
c605f2b6940b mt76: mt76x2u: enable HC-M7662BU1
ca2b797ee52d mt76: mt7915: avoid memcpy in rxv operation
dad3f93e8f6a mt76: mt7615: avoid polling in fw_own for mt7663
ec303bfad299 mt76: move mt76 workqueue in common code
0bf82270568a mt76: mt7615: add mt7615_pm_wake utility routine
091e9b5df6af mt76: mt7615: introduce mt7615_mutex_{acquire,release} utilities
e3850966d74c mt76: mt7615: wake device before accessing regmap in debugfs
e6dcb71d7992 mt76: mt7615: wake device before configuring hw keys
050f8cd9cbe7 mt76: mt7615: introduce pm_power_save delayed work
56779a6c7dec mt76: mt7615: wake device in mt7615_update_channel before access regmap
b0bcdd66ccaa mt76: mt7615: acquire driver_own before configuring device for suspend
58369fdce235 mt76: mt7615: wake device before performing freq scan
2c188db1f7c7 mt76: mt7615: add missing lock in mt7615_regd_notifier
6fdb20a025eb mt76: mt7615: run mt7615_mcu_set_wmm holding mt76 mutex
36a789c00e4f mt76: mt7615: run mt7615_mcu_set_roc holding mt76 mutex
b8cdce45c131 mt76: mt7615: wake device before pulling packets from mac80211 queues
82e8e0525d6c mt76: mt7615: wake device before pushing frames in mt7615_tx
65ccc40c14e1 mt76: mt7615: run mt7615_pm_wake in mt7615_mac_sta_{add,remove}
2107caf92e71 mt76: mt7615: check MT76_STATE_PM flag before accessing the device
28a2f5fa6eed mt76: mt7615: do not request {driver,fw}_own if already granted
94519eac69c3 mt76: mt7615: add runtime-pm knob in mt7615 debugfs
ccc90dafea66 mt76: mt7615: enable beacon hw filter for runtime-pm
29f2bebe1a1e mt76: mt7615: add idle-timeout knob in mt7615 debugfs
58057d1f232b mt76: mt7615: improve mt7615_driver_own reliability
a873b7c8e3de mt76: mt7663u: sync probe sampling with rate configuration
b469c59c616c mt76: mt7615: avoid scheduling runtime-pm during hw scan
f1ff52acb6a7 mt76: mt7615: reschedule ps work according to last activity
1f670a534451 mt76: mt7663u: fix memory leak in set key
afff00ad2b60 mt76: mt7663u: fix potential memory leak in mcu message handler
4c9309f47ddf mt76: mt7615: fix potential memory leak in mcu message handler
379445b4aa7f mt76: mt7915: potential array overflow in mt7915_mcu_tx_rate_report()
750797b61ba8 mt76: fix copy&paste error in mt76_testmode_cmd
f9a7a2f7dbc2 testmode: fix setting tx_power
1641aa201682 mt76: mt7615: fix mt7615_mcu_set_test_param set non-bool parameters
6838d002f9de mt76: mt7615: fix tx_frames setup
8c0a25d6a38c mt76: mt7615: take into account sdio bus configuring txwi
c0cbef79eb45 mt76: mt76u: add mt76_skb_adjust_pad utility routine
98412356c959 mt76: mt7615: sdio code must access rate/key regs in preocess context
fa16627d7e3a mt76: mt7615: introduce mt7663-usb-sdio-common module
bf88e70c7a68 mt76: introduce mt76_sdio module
aa97be8e02de mt76: mt7615: introduce mt7663s support
1eb8b7d689a3 mt76: testmode: fix tx_done accounting on enqueue failures
632ce698e8ee mt76: mt7615: fix antenna settings for test mode
4d2f622190b6 mt76: mt76s: move queue accounting in mt76s_tx_queue_skb
9a3723c8febc mt76: mt7915: fix potential memory leak in mcu message handler
88fa973f59c2 mt76: mt7615: fix possible memory leak in mt7615_mcu_wtbl_sta_add
2fff7d77befd mt76: mt76u: add missing release on skb in __mt76x02u_mcu_send_msg
b5df0fbb1847 mt7615: update firmware to version 20200629

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agokernel: unify CONFIG_GPIO_SYSFS in kernel configs
Felix Fietkau [Mon, 20 Jul 2020 15:45:59 +0000 (17:45 +0200)]
kernel: unify CONFIG_GPIO_SYSFS in kernel configs

Enable it for all platforms

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobuild: make prefix mapping of debug information optional
Felix Fietkau [Mon, 22 Jun 2020 19:44:37 +0000 (21:44 +0200)]
build: make prefix mapping of debug information optional

Remapping the local build path in debug information makes debugging
using ./scripts/remote-gdb harder, because files no longer refer to the full
path on the build host.

For local builds, debug information does not need to be reproducible,
since it will be stripped out of packages anyway.

For buildbot builds, it makes sense to keep debug information reproducible,
since the full path is not needed (nor desired) anywhere.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: make cfg80211 testmode support optional (and disabled by default)
Felix Fietkau [Wed, 10 Jun 2020 14:52:27 +0000 (16:52 +0200)]
mac80211: make cfg80211 testmode support optional (and disabled by default)

Testmode commands are typically only used for manufacturing or vendor specific
debugging features, so they should not be in the default image

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agoopenvpn: fix arguments passing to wrapped up and down scripts
Jo-Philipp Wich [Wed, 5 Aug 2020 07:25:41 +0000 (09:25 +0200)]
openvpn: fix arguments passing to wrapped up and down scripts

With the introduction of the generic OpenVPN hotplug mechanism, wrapped
--up and --down scripts got the wrong amount and order of arguments passed,
breaking existing configurations and functionality.

Fix this issue by passing the same amount of arguments in the same expected
order as if the scripts were executed by the OpenVPN daemon directly.

Ref: https://github.com/openwrt/openwrt/pull/1596#issuecomment-668935156
Fixes: 8fe9940db6 ("openvpn: add generic hotplug mechanism")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
3 years agoadd vfconfig
Jo-Philipp Wich [Thu, 23 Jul 2020 10:50:48 +0000 (12:50 +0200)]
add vfconfig

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
3 years agodsaconfig: introduce package for UCI configuration of VLAN filter rules
Jo-Philipp Wich [Tue, 7 Jul 2020 13:34:53 +0000 (15:34 +0200)]
dsaconfig: introduce package for UCI configuration of VLAN filter rules

This package provides the necessary files to translate `config dsa_vlan`
and `config dsa_port` sections  of `/etc/config/network` into appropriate
bridge vlan filter rules.

The approach of the configuration is to bridge all DSA ports into a logical
bridge device, called "switch0" by default, and to set VLAN port membership,
tagging state and PVID as specified by UCI on each port and on the switch
bridge device itself, allowing logical interfaces to reference port VLAN
groups by using "switch0.N" as ifname, where N denotes the VLAN ID.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
3 years agoramips: switch rt305x subtarget to kernel 5.4
Alexey Dobrovolsky [Wed, 5 Aug 2020 19:50:53 +0000 (22:50 +0300)]
ramips: switch rt305x subtarget to kernel 5.4

RT3x5x seems to work fine with kernel 5.4. Set the default kernel
version to 5.4 to bring this to a broader audience.

Since 4 of 6 targets are on kernel 5.4 now, invert the kernel
version setup logic in Makefile/target.mk files.

Tested on ZyXEL Keenetic.

Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>
[invert version setup logic]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: enable flashing WizFi630S via OEM firmware
Tobias Welz [Mon, 3 Aug 2020 19:28:31 +0000 (21:28 +0200)]
ramips: enable flashing WizFi630S via OEM firmware

WIZnet WizFi630s board name is written slightly different it its OEM
OpenWrt firmware. This causes an incompatibility warning during flashing
with sysupgrade. This patch is adding the vendor board name to the
supported devices list to avoid this warning. For initial flashing you
can use sysupgrade via command line or luci beside of TFTP.
Do not keep the OEM configuration during sysupgrade.

Signed-off-by: Tobias Welz <tw@wiznet.eu>
3 years agoipq806x: use qcom-ipq8064-v1.0.dtsi from upstream
Adrian Schmutzler [Tue, 14 Jul 2020 11:14:50 +0000 (13:14 +0200)]
ipq806x: use qcom-ipq8064-v1.0.dtsi from upstream

This uses upstream qcom-ipq8064-v1.0.dtsi and modifies it by patches
instead of keeping a local version. As a consequence:

- we use a part of the shared definitions there and update device
  DTS files accordingly
- we move additional stuff from our local v1.0.dtsi to the patch
- we drop partitions, LEDs and keys from the file as we will
  implement them differently anyway

Like with the previous patch, this follows the idea that a diff
from upstream might be easier to handle than a big file of our
own with different distribution pattern of properties.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoipq806x: use qcom-ipq8064.dtsi from upstream
Adrian Schmutzler [Fri, 3 Jul 2020 09:12:10 +0000 (11:12 +0200)]
ipq806x: use qcom-ipq8064.dtsi from upstream

Though a qcom-ipq8064.dtsi file exists upstream, we still do overwrite
it with a full version of our own in the ipq806x target. About half of
the contents of our file are upstream content, the other half are local
improvements.

To prevent us from having a lot of code maintained twice in parallel,
this adjusts the target to use the upstream qcom-ipq8064.dtsi. Our
local changes are arranged into three patches, the first pulling a
commit from upstream, the second doing a few small adjustments, and
the third adding all additional stuff.

This should get us the best of both worlds.

The property "ports-implemented" on sata@29000000 is moved to
2nd-level DTSI files as kernel defines it there as well.

While at, rename 080-ARM-dts-qcom-add-gpio-ranges-property.patch to
include the kernel version where it's added upstream.

Even though this might look more complicated in the first place,
the aim is to bring our files closer to upstream, so we can benefit
from changes directly and vice-versa. After all, this drop about
650 lines just copied from the upstream DTSI file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agouhttpd: update to the latest master
Rafał Miłecki [Wed, 5 Aug 2020 13:49:03 +0000 (15:49 +0200)]
uhttpd: update to the latest master

212f836 ubus: rename JSON-RPC format related functions
628341f ubus: use local "blob_buf" in uh_ubus_handle_request_object()
9d663e7 ubus: use BLOBMSG_TYPE_UNSPEC for "params" JSON attribute
77d345e ubus: drop unused "obj" arguments
8d9e1fc ubus: parse "call" method params only for relevant call

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agoramips: remove doublet entry in WizFi630S dts file
Tobias Welz [Mon, 3 Aug 2020 19:29:25 +0000 (21:29 +0200)]
ramips: remove doublet entry in WizFi630S dts file

&wmac entry in WIZnet WizFi630S dts file was existing two times.
This is removing one of them.

Signed-off-by: Tobias Welz <tw@wiznet.eu>
3 years agoramips: disable unused phy ports of WizFi630S
Tobias Welz [Mon, 3 Aug 2020 19:39:43 +0000 (21:39 +0200)]
ramips: disable unused phy ports of WizFi630S

WIZnet WizFi630S is using only 3 of the phy ports. The unused phy ports
draw unnecessarily power. This is disabling the unused phy ports.

Signed-off-by: Tobias Welz <tw@wiznet.eu>
3 years agobcm47xx: switch to kernel 5.4
Rafał Miłecki [Tue, 4 Aug 2020 13:49:59 +0000 (15:49 +0200)]
bcm47xx: switch to kernel 5.4

Switch, LEDs, USB, buttons, sysupgrade testedon BCM4706.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agoscripts: remove checkpatch.sh
Petr Štetiar [Tue, 4 Aug 2020 12:22:17 +0000 (14:22 +0200)]
scripts: remove checkpatch.sh

That file was added accidentally in v3 of the patch and I haven't
properly reviewed that patch before pushing it.

Fixes: 656b562aff36 ("scripts: Add Buildbot dump-target-info.pl script")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agobcm53xx: switch to kernel 5.4
Rafał Miłecki [Tue, 4 Aug 2020 05:05:47 +0000 (07:05 +0200)]
bcm53xx: switch to kernel 5.4

Switch, USB, WiFi, buttons tested on BCM47094.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobcm53xx: set HW_RANDOM_BCM2835=y
Rafał Miłecki [Tue, 4 Aug 2020 11:25:41 +0000 (13:25 +0200)]
bcm53xx: set HW_RANDOM_BCM2835=y

This enables Random Number Generator support on Northstar (described in
DT with brcm,bcm5301x-rng).

It's also a workaround for OpenWrt bug with kernel config causing:
Broadcom BCM2835/BCM63xx Random Number Generator support (HW_RANDOM_BCM2835) [Y/n/m/?] (NEW)

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobcm53xx: update kernel 5.4 DTS to upstream 5.9 state
Rafał Miłecki [Tue, 4 Aug 2020 08:31:11 +0000 (10:31 +0200)]
bcm53xx: update kernel 5.4 DTS to upstream 5.9 state

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobcm53xx: update kernel 5.4 config
Rafał Miłecki [Tue, 4 Aug 2020 08:53:10 +0000 (10:53 +0200)]
bcm53xx: update kernel 5.4 config

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agoscripts: Add Buildbot dump-target-info.pl script
Paul Spooren [Mon, 3 Aug 2020 17:31:43 +0000 (07:31 -1000)]
scripts: Add Buildbot dump-target-info.pl script

The script comes from buildbot.git[0] and is used to print available
targets and architectures, which are then build.

As the buildbot clones openwrt.git anyway, the script might as well live
here to be used for other cases as well, e.g. determining what
architectures are available when building Docker containers or show
developers an overview which architectures are used by which target.

It's called with either the parameter `architectures` or `targets`,
showing architectures followed by supported targets or targets, followed
by the supported architectures:

$ ./scripts/dump-target-info.pl architectures
aarch64_cortex-a53 bcm27xx/bcm2710 mediatek/mt7622 mvebu/cortexa53 sunxi/cortexa53
aarch64_cortex-a72 bcm27xx/bcm2711 mvebu/cortexa72
...

$ ./scripts/dump-target-info.pl targets
apm821xx/nand powerpc_464fp
apm821xx/sata powerpc_464fp
...

In the future the the script could be removed from the buildbot
repository and maintained only here.

Rename `dumpinfo.pl` to `dump-target-info.pl` to improve verbosity of
filename.

[0]: https://git.openwrt.org/?p=buildbot.git;a=blob;f=scripts/dumpinfo.pl;h=aa97f8d60379076a41b968402e9337cea824ece5;hb=HEAD

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoramips: add support for TP-Link RE200 v3
Richard Fröhning [Sun, 2 Aug 2020 14:22:50 +0000 (16:22 +0200)]
ramips: add support for TP-Link RE200 v3

TP-Link RE200 v3 is a wireless range extender with Ethernet and 2.4G and 5G
WiFi with internal antennas. It's based on MediaTek MT7628AN+MT7610EN like the v2.

Specifications
--------------

- MediaTek MT7628AN (580 Mhz)
- 64 MB of RAM
- 8 MB of FLASH
- 2T2R 2.4 GHz and 1T1R 5 GHz
- 1x 10/100 Mbps Ethernet
- 8x LED (GPIO-controlled), 2x button

Unverified:
- UART header on PCB (57600 8n1)

There are 2.4G and 5G LEDs in red and green which are controlled
separately.

MAC addresses
-------------

MAC address assignment has been done according to the RE200 v2.

The label MAC address matches the OpenWrt ethernet address.

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

Web Interface
-------------

It is possible to upgrade to OpenWrt via the web interface. Simply flash
the -factory.bin from OEM. In contrast to a stock firmware, this will not
overwrite U-Boot.

Recovery
--------

Unfortunately, this devices does not offer a recovery mode or a tftp
installation method. If the web interface upgrade fails, you have to open
your device and attach serial console.

The device has not been opened for adding support. However, it is expected
that the behavior is similar to the RE200 v2. Instructions for serial console
and recovery may be checked out in commit 6d6f36ae787c ("ramips: add support
for TP-Link RE200 v2") or on the device's Wiki page.

Signed-off-by: Richard Fröhning <misanthropos@gmx.de>
[adjust commit title/message, sort support list]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agowireguard: bump to 1.0.20200729
Jason A. Donenfeld [Mon, 3 Aug 2020 12:38:52 +0000 (14:38 +0200)]
wireguard: bump to 1.0.20200729

* compat: rhel 8.3 beta removed nf_nat_core.h
* compat: ipv6_dst_lookup_flow was ported to rhel 7.9 beta

This compat tag adds support for RHEL 8.3 beta and RHEL 7.9 beta, in addition
to RHEL 8.2 and RHEL 7.8. It also marks the first time that
<https://www.wireguard.com/build-status/> is all green for all RHEL kernels.
After quite a bit of trickery, we've finally got the RHEL kernels building
automatically.

* compat: allow override of depmod basedir

When building in an environment with a different modules install path, it's
not possible to override the depmod basedir flag by setting the DEPMODBASEDIR
environment variable.

* compat: add missing headers for ip_tunnel_parse_protocol

This fixes compilation with some unusual configurations.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
3 years agoramips: fix/tidy up 4M tplink-v2-image flash layouts
Adrian Schmutzler [Mon, 3 Aug 2020 10:02:48 +0000 (12:02 +0200)]
ramips: fix/tidy up 4M tplink-v2-image flash layouts

For the TP-Link 4M devices with tplink-v2-image recipe
(mktplinkfw2.c), there are two different flash layouts based
on the size of the (u)boot partition:

device         uboot    OEM firmware  OpenWrt (incl. config)
tl-wr840n-v5   0x20000  0x3c0000      0x3d0000
tl-wr841n-v14  0x10000  0x3d0000      0x3e0000

In both cases, the 0x10000 config partition is used for the firmware
partition as well due to the limited space available and since it's
recreated by the OEM firmware anyway.

However, the TFTP flashing process will only copy data up to the
size of the initial (OEM) firmware size. Therefore, while we can
use the bigger partition to have additional erase blocks on the
device, we have to limit the image sizes to the TFTP limits.

So far, only one layout definition has been set up in mktplinkfw2.c
for 4M mediatek devices. This adds a second one and assigns them
to the devices so the image sizes are correctly restrained.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokirkwood: get rid of BOARD_NAME and tidy up DEVICE_DTS
Adrian Schmutzler [Fri, 31 Jul 2020 11:50:37 +0000 (13:50 +0200)]
kirkwood: get rid of BOARD_NAME and tidy up DEVICE_DTS

Since most of the DTS file names follow a common scheme now, let's
update the automatically generated DEVICE_DTS value and get rid
of some DEVICE_DTS and all BOARD_NAME entries for individual devices.

This should specifically make the job easier for developers adding
new devices, as they are not tempted to copy over BOARD_NAME anymore.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agotoolchain/binutils: remove versions 2.29.1 and 2.31.1
Adrian Schmutzler [Wed, 29 Jul 2020 15:26:08 +0000 (17:26 +0200)]
toolchain/binutils: remove versions 2.29.1 and 2.31.1

We currently support four versions of binutils in parallel. Let's
just keep the latest two and drop the older ones before the next
one comes around.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agopackage: replace remaining occurrences of ifconfig with ip
Adrian Schmutzler [Thu, 30 Jul 2020 15:25:21 +0000 (17:25 +0200)]
package: replace remaining occurrences of ifconfig with ip

ifconfig is effectively deprecated for quite some time now. Let's
replace the remaining occurrences for packages by the
corresponding ip commands now.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agotarget: replace remaining occurrences of ifconfig with ip
Adrian Schmutzler [Thu, 30 Jul 2020 15:25:20 +0000 (17:25 +0200)]
target: replace remaining occurrences of ifconfig with ip

ifconfig is effectively deprecated for quite some time now. Let's
replace the remaining occurrences for our target setup by the
corresponding ip commands now.

Note that this does not touch ar71xx, as it will be dropped anyway,
and changing it would only make backports harder.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobuild: image: return sizes if check-size fails
Adrian Schmutzler [Wed, 29 Jul 2020 19:00:12 +0000 (21:00 +0200)]
build: image: return sizes if check-size fails

Instead of just printing a warning that an image is too big, also
print both actual size and limit in the string:

WARNING: Image file somename.bin is too big: 2096101 > 1048576

Since the kernel size is checked via the same function (if
KERNEL_SIZE is specified), this will also apply to the kernel
image size check.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoar71xx: restore support for boot console with arbitrary baud rates
Sungbo Eo [Sun, 12 Jan 2020 12:35:00 +0000 (21:35 +0900)]
ar71xx: restore support for boot console with arbitrary baud rates

Commit 1bfbf2de6df9 ("ar71xx: serial: core: add support for boot console
with arbitrary baud rates") added support for arbitrary baud rates which
enabled 250000 baud rate for Yun. But the patch was not ported to kernel
4.9, and since then the kernel set its baud rate to 9600. This commit ports
the patch to kernel 4.14, thereby restoring the serial console of Yun.

Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
3 years agoar71xx: enable ethernet LED of Arduino Yun
Sungbo Eo [Sun, 12 Jan 2020 12:35:00 +0000 (21:35 +0900)]
ar71xx: enable ethernet LED of Arduino Yun

Commit 05d73a2a7379 enabled GPIO on ethernet LED, but proper LED setup was
not added then. This commit fixes it by reverting the change on the LED.

Fixes: 05d73a2a7379 ("ar71xx: Arduino Yun board 'WLAN RST' button support")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
3 years agoar71xx: fix sysupgrade for Arduino Yun
Sungbo Eo [Sun, 12 Jan 2020 12:35:00 +0000 (21:35 +0900)]
ar71xx: fix sysupgrade for Arduino Yun

Commit bb46b635df48 changed its partition scheme, but sysupgrade image
validation still uses the old format. This commit fixes it so that
force flag is not needed for sysupgrade.

Fixes: bb46b635df48 ("ar71xx: move Arduino Yun to generic building code")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
3 years agoRevert "ar71xx: fix Arduino Yun enabling of level shifters outputs"
Sungbo Eo [Sun, 12 Jan 2020 12:33:53 +0000 (21:33 +0900)]
Revert "ar71xx: fix Arduino Yun enabling of level shifters outputs"

This reverts commit 077253dd666a30ae5231c3748222d4b5b138593d.

The output enable pins should be disabled by default, and only enabled when
used. Otherwise unwanted conflicts might occur between MCU and SoC pins.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
3 years agobuild: image: drop unused check-kernel-size recipe
Adrian Schmutzler [Wed, 29 Jul 2020 19:00:11 +0000 (21:00 +0200)]
build: image: drop unused check-kernel-size recipe

The recipe check-kernel-size is not used in the entire tree. Instead,
we already check the size of the kernel image in Device/Build/kernel
in image.mk via check-size function if KERNEL_SIZE is defined.

Therefore, drop the function. Using it would be redundant anyway.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoLICENSE: use updated GNU copy
Paul Spooren [Wed, 29 Jul 2020 09:32:28 +0000 (23:32 -1000)]
LICENSE: use updated GNU copy

The current LICENSE file contains some form feed (FF) characters instead
of recently popular line feed (LF) characters. Also update to the latest
address of the Free Software Foundation. Lastly center some captions, as
suggested by the official GNU LICENSE distribution[0].

Historical changes of GPL-2.0 LICENSE file are availalbe[1].

[0]: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
[1]: https://github.com/pombredanne/gpl-history

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agoscripts/checkpatch.pl: fix README.md file name after rename
Adrian Schmutzler [Sun, 2 Aug 2020 13:51:39 +0000 (15:51 +0200)]
scripts/checkpatch.pl: fix README.md file name after rename

checkpatch.pl uses a list of files to detect the root OpenWrt
directory. This includes README, which has been renamed to
README.md in the previous commit.

Update the file name in checkpatch.pl to prevent errors like the
following when running the script:

   Must be run from the top-level dir. of a OpenWrt tree

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoREADME: port to 21st century
Paul Spooren [Thu, 16 Jul 2020 08:19:37 +0000 (22:19 -1000)]
README: port to 21st century

The README is no longer important to only developers but also users.
Reflect that by adding valuable information for everyone new to OpenWrt!

Sunshine

Signed-off-by: Paul Spooren <mail@aparcar.org>
[remove trailing whitespace and empty line at EOF]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79/mikrotik: create shared device definitions for nor and nand
Adrian Schmutzler [Sat, 1 Aug 2020 15:39:33 +0000 (17:39 +0200)]
ath79/mikrotik: create shared device definitions for nor and nand

Move the image preparation and nand-utils package selection into
common device definitions for NOR/NAND devices.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoopenvpn: revise sample configuration
Magnus Kroken [Mon, 27 Jul 2020 18:34:49 +0000 (20:34 +0200)]
openvpn: revise sample configuration

Update the openvpn sample configurations to use modern options in favor
of deprecated ones, suggest more sane default settings and add some
warnings.

* Add tls_crypt and ncp_disable to the sample configuration
* Replace nsCertType with remote_cert_tls in client sample configuration
* Comment out "option compress", compression should not be preferred
* Advise 2048-bit Diffie-Hellman parameters by default
* Add warnings about compression and use of Blowfish (BF-CBC)

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
3 years agouboot-envtools: ath79: add support for the Nanostation M (XM)
Rui Salvaterra [Sun, 26 Jul 2020 19:04:31 +0000 (20:04 +0100)]
uboot-envtools: ath79: add support for the Nanostation M (XM)

Tested on an AirGrid M2 (AG‑HP‑2G16).

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agowireguard-tools: allow compiling with MIPS16 instructions
Rui Salvaterra [Fri, 24 Jul 2020 08:02:55 +0000 (09:02 +0100)]
wireguard-tools: allow compiling with MIPS16 instructions

The wg utility compiles and runs without issues in MIPS16 mode, despite setting
PKG_USE_MIPS16:=0 in the makefile. Let's remove this, allowing for a substantial
size reduction of the wg executable. Since wg is a just a configuration utility,
it shouldn't be performance-critical, as the crypto heavy-lifting is done on the
kernel side.

wg sizes for both modes:

MIPS32: 64309 bytes
MIPS16: 42501 bytes

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agoexfat: add out of tree module
Rosen Penev [Sun, 19 Jul 2020 04:29:58 +0000 (21:29 -0700)]
exfat: add out of tree module

>From an email conversation with the person responsible for upstreaming
the exFAT driver, it seems the staging one in kernel 5.4 is not so
good. Excerpts below.

Namjae Jeon:
Hm... exfat in 5.4 kernel  that we did crap shit long time ago is
contributed by someone who we don't know.
This version is unstable and low quality code. We have been improving
it continuously.
and staging version exfat is removed from linux 5.7 kernel.

linux exfat oot  version is a backport of exfat in linux 5.7 kernel to
support lower version kernel, and it is a real.
You can see the patch history fro linux-exfat-oot.
this version support timezone and boot sector verification feature newly.
and better filesystem structure and much clean code quality that
reviewed by high profile kernel developers. and add many bug fixes.
And this version is officially maintained by me and kernel guys.

I would not recommend to use staging exfat version.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agostaging: remove staging exfat driver
Rosen Penev [Sun, 19 Jul 2020 04:29:57 +0000 (21:29 -0700)]
staging: remove staging exfat driver

This will be replaced with the driver found in newer kernels.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years agokernel: fix missing TRANSPARENT_HUGEPAGE symbols
Stijn Tintel [Sat, 1 Aug 2020 13:29:24 +0000 (16:29 +0300)]
kernel: fix missing TRANSPARENT_HUGEPAGE symbols

Enabling KERNEL_TRANSPARENT_HUGEPAGE exposes 2 missing symbols:
* CONFIG_READ_ONLY_THP_FOR_FS
* TRANSPARENT_HUGEPAGE_ALWAYS
* TRANSPARENT_HUGEPAGE_MADVISE

The first one was added in 5.4, and is marked experimental there so just
disable it in the generic config.

For the latter two, we should not force the user to use either of them,
so add them as build-configurable kernel options.

Fixes: d1a8217d87bf ("kernel: clean-up build-configurable kernel config symbols")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agokernel: add missing config symbol
Stijn Tintel [Wed, 29 Jul 2020 20:57:41 +0000 (23:57 +0300)]
kernel: add missing config symbol

This symbol is exposed on ARM64 with EFI enabled in the kernel config.
Currently this happens only on ipq807x, but as there might be new ARM64
targets with EFI in the future it is better to add the symbol to the
generic config.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Jo-Philipp Wich <jo@mein.io>
3 years agokernel: add menuconfig entry for kernel CONFIG_CGROUP_NET_CLASSID
Daniel Golle [Fri, 31 Jul 2020 21:48:49 +0000 (22:48 +0100)]
kernel: add menuconfig entry for kernel CONFIG_CGROUP_NET_CLASSID

It was removed from target defaults though it didn't exist in the
build-systems kernel configuration options. Add it there.

Fixes: d1a8217d87 ("kernel: clean-up build-configurable kernel config symbols")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agomac80211: don't kill wireless daemon on teardown
David Bauer [Fri, 31 Jul 2020 17:52:03 +0000 (19:52 +0200)]
mac80211: don't kill wireless daemon on teardown

Don't kill the wireless daemon on teardown. hostapd as well as
wpa_supplicant are managed by procd which would detect the shutdown of
either process as a crash loop.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agohostapd: fix incorrect service name
David Bauer [Fri, 31 Jul 2020 17:51:51 +0000 (19:51 +0200)]
hostapd: fix incorrect service name

When retrieving the PID for hostapd and wpa_supplicant via ubus the
wrong service name is currently used. This leads to the following error
in the log:

netifd: radio0 (1409): WARNING (wireless_add_process):
executable path /usr/sbin/wpad does not match process  path (/proc/exe)

Fixing the service name retrieves the correct PID and therefore the
warning won't occur.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agogemini: Add swap partition to DNS-313
Linus Walleij [Fri, 17 Jul 2020 15:01:00 +0000 (17:01 +0200)]
gemini: Add swap partition to DNS-313

Sometimes when using the DNS-313 memory usage can peak and
with a simple swap partition we can avoid running into the
roof and invoking the OOM killer. Set this partition to
128MB (twice the size of the memory of the DNS-313).

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
3 years agoapm821xx: disable WNDR4700 5.4 image
Christian Lamparter [Fri, 31 Jul 2020 16:17:34 +0000 (18:17 +0200)]
apm821xx: disable WNDR4700 5.4 image

The compressed image that the buildbots are building is too large for
the netgear uboot and it crashes and soft-bricks the device.

| Uncompressing Kernel Image ...
| LZMA: uncompress or overwrite error 1 - must RESET board to recover

The whole target likely needs to be switched zImage which is a major
hassle due to powerpc's legacy bootwrapper setup as compared to ARM.
So for now, disable the device.

Reported-by: Wiktor Stasiak (FS#3258)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
3 years agokirkwood: use real model names for Linksys devices
Adrian Schmutzler [Fri, 12 Jun 2020 22:36:01 +0000 (00:36 +0200)]
kirkwood: use real model names for Linksys devices

This replaces the internal device names "Audi" and "Viper" with the
real model names, which a user would look for. This makes the
Linksys devices on this target consistent with the names recently
changed for mvebu based on the same idea.

As a consequence, the "viper" device definition is split into two
separate definitions with the correct names for both real models.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobase-files: mount bpffs at boot
Tony Ambardar [Wed, 22 Jul 2020 13:28:06 +0000 (06:28 -0700)]
base-files: mount bpffs at boot

Explicitly mount the BPF filesystem if available. This is used for pinning
eBPF programs and maps, making them accessible to other eBPF programs or
from userspace with the help of libbpf or bpftool.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
[daniel@makrotopia.org: bumped PKG_RELEASE]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agokernel: mips: restore missing MIPS32 cBPF JIT
Tony Ambardar [Thu, 23 Jul 2020 02:40:12 +0000 (19:40 -0700)]
kernel: mips: restore missing MIPS32 cBPF JIT

Kernel v5.1 included an eBPF JIT for MIPS32 kernels, but problems were
discovered [1] and the changes later reverted in kernel v5.5 with commits:

  * f8fffebdea75 ("MIPS: BPF: Disable MIPS32 eBPF JIT")
  * 36366e367ee9 ("MIPS: BPF: Restore MIPS32 cBPF JIT")

Only the first of these was backported to LTS kernel 5.4, leaving cBPF
programs without a JIT and introducing a performance regression for any
such users e.g. libpcap, tcpdump, etc.

Restore cBPF performance by backporting the second commit above:
  * 070-v5.5-MIPS-BPF-Restore-MIPS32-cBPF-JIT.patch

[1] https://lore.kernel.org/bpf/20191205182318.2761605-1-paulburton@kernel.org/

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
3 years agohostapd: reorganize config selection hierarchy for WPA3
Adrian Schmutzler [Wed, 29 Jul 2020 19:59:18 +0000 (21:59 +0200)]
hostapd: reorganize config selection hierarchy for WPA3

The current selection of DRIVER_MAKEOPTS and TARGET_LDFLAGS is
exceptionally hard to read. This tries to make things a little
easier by inverting the hierarchy of the conditions, so SSL_VARIANT
is checked first and LOCAL_VARIANT is checked second.

This exploits the fact that some of the previous conditions were
unnecessary, e.g. there is no hostapd-mesh*, so we don't need
to exclude this combination.

It also should make it a little easier to see which options are
actually switched by SSL_VARIANT and which by LOCAL_VARIANT.

The patch is supposed to be cosmetic.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agomvebu: fix alphabetic sorting in 02_network
Adrian Schmutzler [Fri, 31 Jul 2020 09:26:11 +0000 (11:26 +0200)]
mvebu: fix alphabetic sorting in 02_network

This has been overlooked when removing solidrun,clearfog-a1 entry.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agomvebu: increase compat version for SolidRun ClearFog Base
Adrian Schmutzler [Fri, 31 Jul 2020 09:21:34 +0000 (11:21 +0200)]
mvebu: increase compat version for SolidRun ClearFog Base

When changing the Pro variant to DSA, the ethernet interface rename
script was dropped by all devices to keep them in sync:

  be309bfd7445 ("mvebu: drop 06_set_iface_mac preinit script")

Therefore, network config will be broken after upgrade for the
Base variant as well. Increase the compat version and provide a
message to signal that to the users.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokirkwood: implement compatibility version for DSA migration
Adrian Schmutzler [Tue, 14 Jul 2020 14:18:10 +0000 (16:18 +0200)]
kirkwood: implement compatibility version for DSA migration

This implements the newly introduced compat-version to prevent
upgrade between swconfig and DSA for kirkwood.

Just define a compat version with minor increment and an appropriate
message for both image (in Makefile) and device (in base-files).

Since we never removed SUPPORTED_DEVICES for this target, we don't
have to add it back either.

Attention:

All users that already updated to the DSA versions in master will
receive the same incompatibility warning since their devices are still
"1.0" as far as fwtool can tell.
Those, and only those, can bypass the upgrade check by using force (-F)
without having to reset config again. In addition, the new version
string needs to be put into uci config manually, so the new fwtool
knows that it actually deals with a "1.1":

   uci set "system.@system[-1].compat_version=1.1"
   uci commit system

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agomvebu: implement compatibility version for DSA migration
Adrian Schmutzler [Tue, 14 Jul 2020 14:11:22 +0000 (16:11 +0200)]
mvebu: implement compatibility version for DSA migration

This implements the newly introduced compat-version to prevent
upgrade between swconfig and DSA for mvebu.

Just define a compat version with minor increment and an appropriate
message for both image (in Makefile) and device (in base-files).

Having taken care of sysupgrade, we can put back the SUPPORTED_DEVICES
that have been removed in previous patches to prevent broken config.

Attention:

All users that already updated to the DSA versions in master will
receive the same incompatibility warning since their devices are still
"1.0" as far as fwtool can tell.
Those, and only those, can bypass the upgrade check by using force (-F)
without having to reset config again. In addition, the new version
string needs to be put into uci config manually, so the new fwtool
knows that it actually deals with a "1.1":

   uci set "system.@system[-1].compat_version=1.1"
   uci commit system

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobase-files: fwtool: make compat_version backward compatible
Adrian Schmutzler [Thu, 9 Jul 2020 17:46:44 +0000 (19:46 +0200)]
base-files: fwtool: make compat_version backward compatible

So far, the compatibility mechanism only works if both device and
image are already updated to the new routines. This patch extends
the sysupgrade metadata and fwtool_check_image() to account for
"older" images as well:

The basic mechanism for older devices to check for image compatibility
is the supported_devices entry. This can be exploited by putting
a custom message into this variable of the metadata, so older FW
will produce a mismatch and print the message as it thinks it's the
list of supported devices. So, we have two cases:

device 1.0, image 1.0:
  The metadata will just contain supported_devices as before.

device 1.0, image 1.1:
  The metadata will contain:

  "new_supported_devices":["device_string1", "device_string2", ...],
  "supported_devices":["Image version 1.1 incompatible to device: ..."]

  If the device is "legacy", i.e. does not have the updated fwtool.sh,
  it will just fail with image check and print the content of
  supported_devices. If DEVICE_COMPAT_MESSAGE is set, this will be
  printed on old devices as well through the same mechanism. Otherwise
  a generic "Please check documentation ..." is appended.

  Upgrade can still be performed with -F like when
  SUPPORTED_DEVICES has been removed to prevent bricking.

  If the device has updated fwtool.sh (but is 1.0), it will just use
  the new_supported_devices instead, and work as intended (flashing
  with -n will work, flashing without will print the appropriate
  warning).

This mechanism should provide a fair tradeoff between simplicity
and functionality.

Since we touched a lot of fields in metadata, this also bumps
metadata_version to 1.1.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobase-files: fwtool: implement compatibility check for images
Adrian Schmutzler [Thu, 9 Jul 2020 17:34:09 +0000 (19:34 +0200)]
base-files: fwtool: implement compatibility check for images

We regularly encounter the situation that devices are subject to
changes that will make them incompatible to previous versions.
Removing SUPPORTED_DEVICES will not really be helpful in most of these
cases, as this only helps after a rename.

To solve this situation, this patchset introduces a compatibility
version for devices. In this patch, the actual checks are implemented
into fwtool_check_image():

If an incompatible change is introduced, one can increase either
the minor version (1.0->1.1) or the major version (1.0->2.0).

Minor version increment:
This will still allow sysupgrade, but require to reset config
(-n or SAVE_CONFIG=0). If sysupgrade is called without -n, a
corresponding message will be printed. If sysupgrade is called
with -n, it will just pass, with supported devices being checked
as usual. (Which will allow us to add back SUPPORTED_DEVICES for
many cases.)

Major version increment:
This is meant for potential (rare) cases where sysupgrade is
not possible at all, because it would break the device.
In this case, a warning will be printed, and -n won't help.

If image check fails because of one of the versions parts not
matching, the content of DEVICE_COMPAT_MESSAGE is printed in
addition to the generic message (if set).

For both cases, upgrade can still be forced with -F as usual.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobase-files: add support for compat_version on device
Adrian Schmutzler [Thu, 9 Jul 2020 17:24:11 +0000 (19:24 +0200)]
base-files: add support for compat_version on device

We regularly encounter the situation that devices are subject to
changes that will make them incompatible to previous versions.
Removing SUPPORTED_DEVICES will not really be helpful in most of these
cases, as this only helps after a rename.

To solve this situation, this patchset introduces a compatibility
version for devices. To complement the DEVICE_COMPAT_VERSION set
for the image to be flashed, this implements a compat_version on
the device, so it will have something to compare with the image.

The only viable way to achieve this seems to be via board.d files,
i.e. this is technically adding a compat version for the device's
config.

Like for the network setup, this will set up a command
ucidef_set_compat_version to set the compat_version in board.d.
This will then add a string to /etc/board.json, which will be
translated into uci system config by bin/config_generate.
By this, the compat_version, being a version of the config, will
also be exposed to the user.

As with DEVICE_COMPAT_VERSION, missing uci entry will be assumed
as compat_version "1.0", so we only need to add this if a device
needs to be bumped, e.g.

   ucidef_set_compat_version "1.1"

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobuild: add DEVICE_COMPAT_VERSION and DEVICE_COMPAT_MESSAGE
Adrian Schmutzler [Thu, 9 Jul 2020 17:14:45 +0000 (19:14 +0200)]
build: add DEVICE_COMPAT_VERSION and DEVICE_COMPAT_MESSAGE

We regularly encounter the situation that devices are subject to
changes that will make them incompatible to previous versions.
Removing SUPPORTED_DEVICES will not really be helpful in most of these
cases, as this only helps after a rename.

To solve this situation, this patchset introduces a compatibility
version for devices. It will be implemented via a per-device
Make variable DEVICE_COMPAT_VERSION, which will be set to 1.0
globally by default and then can be overwritten as needed.

Furthermore, a variable DEVICE_COMPAT_MESSAGE is added, where
a message to be displayed during sysupgrade may be specified
optionally.

This patch only implements the build variables and adds them
to the sysupgrade metadata, the evaluation will be addressed
in a subsequent patch.

To set it, one would just need to add the following to a device node:

define Device/somedevice
  ...
  DEVICE_COMPAT_VERSION := 1.1
  DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
endef

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: add support for JS76x8 series DEV boards
Robinson Wu [Fri, 17 Jul 2020 07:32:53 +0000 (15:32 +0800)]
ramips: add support for JS76x8 series DEV boards

This commit adds support for the Jotale JS76x8 series development boards.
These devices have the following specifications:

- SOC: MT7628AN/NN, MT7688AN, MT7628DAN
- RAM of MT7628AN/NN and MT7688AN: 64/128/256 MB (DDR2)
- RAM of MT7628DAN: 64 MB (DDR2)
- FLASH:8/16/32 MB (SPI NOR)
- Ethernet:3x 10/100 Mbps ethernet ports (MT76x8 built-in switch)
- WIFI:1x 2T2R 2.4 GHz Wi-Fi
- LEDs:1x system status green LED, 1x wifi green LED,
       3x ethernet green LED
- Buttons:1x reset button
- 1x microSD slot
- 4x USB 2.0 port
- 1x mini-usb debug UART
- 1x DC jack for main power (DC 5V)
- 1x TTL/RS232 UART
- 1x TTL/RS485 UART
- 13x GPIO header
- 1x audio codec(wm8960)

Installation via OpenWrt:

The original firmware is OpenWrt, so both LuCI and sysupgrade can be used.

Installation via U-boot web:

1. Power on board with reset button pressed, release it
   after wifi led start blinking.
2. Setup static IP 192.168.1.123/4 on your PC.
3. Go to 192.168.1.8 in browser and upload "sysupgrade" image.

Installation via U-boot tftp:
1. Connect to serial console at the mini usb, which has been connected to UART0
   on board (115200 8N1)
2. Setup static IP 192.168.1.123/4 on your PC.
3. Place openwrt-firmware.bin on your PC tftp server (192.168.1.123).
3. Connect one of LAN ports on board to your PC.
4. Start terminal software (e.g. screen /dev/ttyUSB0 115200) on PC.
5. Apply power to board.
6. Interrupt U-boot with keypress of "2".
7. At u-boot prompts:
   Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N) Y
   Input device IP (192.168.1.8) ==:192.168.1.8
   Input server IP (192.168.1.123) ==:192.168.1.123
   Input Linux Kernel filename (root_uImage) ==:openwrt-firmware.bin
8. board will download file from tftp server, write it to flash and reboot.

Signed-off-by: Robinson Wu <wurobinson@qq.com>
[add license to DTS files, fix state_default and reduce to the mimimum,
move phy0tpt trigger to DTS, drop ucidef_set_led_timer, fix network ports]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: limit 5GHz channels for RAVPower RP-WD009
David Bauer [Thu, 30 Jul 2020 20:33:53 +0000 (22:33 +0200)]
ramips: limit 5GHz channels for RAVPower RP-WD009

When selecting a channel below 100 on the 5GHz radio, the channel will
be detected as busy all the time.

Survey data from wlan1
frequency: 5240 MHz [in use]
channel active time: 165729 ms
channel busy time: 158704 ms
channel transmit time: 0 ms

Channels 100 and above work fine:

Survey data from wlan1
frequency: 5500 MHz
channel active time: 133000 ms
channel busy time: 21090 ms
channel transmit time: 0 ms

Limit the available channels, so users do not have the impression
their device is broken.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agotreewide: mark devices as BROKEN instead of commenting out
Petr Štetiar [Tue, 28 Jul 2020 18:47:35 +0000 (20:47 +0200)]
treewide: mark devices as BROKEN instead of commenting out

This adds the newly introduced BROKEN flag to a bunch of devices
that previously just had TARGET_DEVICES commented out. By this, we
can select them in make menuconfig when BROKEN developer config option
is selected, instead of having to edit the code.

In contrast to DEFAULT := n, this is meant to cover devices that
don't boot or don't compile at all.

ath25: np25g, wpe53g
  both disabled during kernel bump 3.18->4.4 without reason given
  f89a20a89aeb ("ath25: update kernel from 3.18 to 4.4")

bcm53xx: linksys-ea6300-v1, linksys-ea9200, linksys-ea9500
  broken due to insufficient/broken TRX support
  55ff15cfd509 ("bcm53xx: disable building Linksys EA6300 V1 image")
  cd0f9900a4cd ("bcm53xx: parepare for building more Linksys images")

bcm63xx: tplink-archer-c5-v2, tplink-archer-c9-v1
  disabled when kernel 5.4 support was added, probably broken
  50c6938b95a0 ("bcm53xx: add v5.4 support")

Signed-off-by: Petr Štetiar <ynezz@true.cz>
[limit to subset of devices, use BROKEN, adjust commit message/title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobuild: add option to mark devices as BROKEN
Adrian Schmutzler [Tue, 28 Jul 2020 18:47:34 +0000 (20:47 +0200)]
build: add option to mark devices as BROKEN

By specifying "BROKEN := 1" or "BROKEN := y" for a device, it will be
hidden (and deselected) by default. By that, it provides a stronger
option to "disable" a device beyond just using DEFAULT := n.

To make these devices visible, just enable the BROKEN option in
developer settings as already implemented for targets and packages.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agotreewide: use DEFAULT := n to disable non-broken devices
Petr Štetiar [Tue, 28 Jul 2020 18:47:33 +0000 (20:47 +0200)]
treewide: use DEFAULT := n to disable non-broken devices

This uses DEFAULT := n on a bunch of devices that previously were
"disabled" by commenting out TARGET_DEVICES. This will allow to
build them without having to modify the code, but they will not
be selected for default build or buildbots.

The change is applied to all devices that are not "broken", but suffer
from image site limitations or similar, or have been added in the past
but never confirmed to run on the device properly:

at91: at91-q5xr5:
  kernel image too big
  31aeae077482 ("at91: do not build image for at91-q5xr5")

bcm47xx: asus-rt-ac66u:
  disabled since it was added in 2015
  69aefc771fd8 ("brcm47xx: build images for Asus devices")

bcm47xx: netgear-wndr3400-vcna, netgear-wnr3500u, netgear-wnr3500-v2-vc
  added disabled in 2012, but never confirmed to work on devices
  5dec9dd3b200 ("brcm47xx: add code to generate images for some netgear
    devices")

bcm53xx: netgear-r8500
  added disabled: "start working on Netgear R8500"
  3b76c7cf0bdd ("bcm53xx: start working on Netgear R8500")

Signed-off-by: Petr Štetiar <ynezz@true.cz>
[limit to subset of devices, adjust commit message/title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: cosmetic fixes for partition node of D-Link DIR-825 B1
Adrian Schmutzler [Thu, 30 Jul 2020 12:29:45 +0000 (14:29 +0200)]
ath79: cosmetic fixes for partition node of D-Link DIR-825 B1

Make the node name match the reg property and remove the unused
DT label.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoprocd: update to git HEAD
Daniel Golle [Thu, 30 Jul 2020 16:16:53 +0000 (17:16 +0100)]
procd: update to git HEAD

 28be011 instance: make sure values are not inherited from previous runs
 2ae5cbc uxc: remove debugging left-over

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agokernel: clean-up build-configurable kernel config symbols
Daniel Golle [Thu, 30 Jul 2020 15:24:19 +0000 (16:24 +0100)]
kernel: clean-up build-configurable kernel config symbols

Don't explicitely disable options in target/linux/generic/config-* if
they are already controlled in config/Config-kernel.in.
Add a bunch of new symbols  and prepare defaults for using only unified
hierarchy (ie. cgroup2). Update symbol dependencies while at it

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agohostapd: improve TITLE for packages
Adrian Schmutzler [Thu, 30 Jul 2020 14:25:51 +0000 (16:25 +0200)]
hostapd: improve TITLE for packages

For a few packages, the current TITLE is too long, so it is not
displayed at all when running make menuconfig. Despite, there is
no indication of OpenSSL vs. wolfSSL in the titles.

Thus, this patch adjusts titles to be generally shorter, and adds
the SSL variant to it.

While at it, make things easier by creating a shared definition for
eapol-test like it's done already for all the other flavors.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agohostapd: update mesh DFS patches and add mesh HE support
Daniel Golle [Thu, 23 Jul 2020 17:34:00 +0000 (18:34 +0100)]
hostapd: update mesh DFS patches and add mesh HE support

Drop outdated and by now broken patchset originally supplied by
Peter Oh in August 2018 but never merged upstream.
Instead add the more promissing rework recently submitted by
Markus Theil who picked up Peter's patchset, fixed and completed it
and added support for HE (802.11ax) in mesh mode.

This is only compile tested and needs some real-life testing.

Fixes: FS#3214
Fixes: 167028b750 ("hostapd: Update to version 2.9 (2019-08-08)")
Fixes: 0a3ec87a66 ("hostapd: update to latest Git hostap_2_9-1238-gdd2daf0848ed")
Fixes: 017320ead3 ("hostapd: bring back mesh patches")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoath79: add support for gl-e750
Luochongjun [Sat, 11 Jul 2020 12:58:47 +0000 (20:58 +0800)]
ath79: add support for gl-e750

The gl-e750 is a portable travel router that gives you safe access to
the internet while traveling.

Specifications:
- SoC: Qualcomm Atheros AR9531 (650MHz)
- RAM: 128 MB DDR2
- Flash: 16 MB SPI NOR (W25Q128FVSG) + 128 MB SPI NAND (GD5F1GQ4UFYIG)
- Ethernet: 10/100: 1xLAN
- Wireless: QCA9531 2.4GHz (bgn) + QCA9887 5GHz (ac)
- USB: 1x USB 2.0 port
- Switch: 1x switch
- Button: 1x reset button
- OLED Screen: 128*64 px

MAC addresses based on vendor firmware:
LAN *:a0 art 0x0
2.4GHz *:a1 art 0x1002
5GHz *:a2 art calculated from art 0x0 + 2

Flash firmware:
Since openwrt's kernel already exceeds 2MB, upgrading from the official
version of GL-inet (v3.100) using the sysupgrade command will break the
kernel image. Users who are using version 3.100 can only upgrade via
uboot. The official guidance for GL-inet is as follows:
https://docs.gl-inet.com/en/3/troubleshooting/debrick/

In the future, GL-inet will modify the firmware to support the sysupgrade
command, so users will be able to upgrade directly with the sysupgrade
command in future releases.

OLED screen control:
OLED controller is connected to QCA9531 through serial port, and can send
instructions to OLED controller directly through serial port.
Refer to the links below for a list of supported instructions:
https://github.com/gl-inet/GL-E750-MCU-instruction

Signed-off-by: Luochongjun <luochongjun@gl-inet.com>
[fix alphabetic sorting in 10-fix-wifi-mac, drop check-kernel-size]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agotoolchain: add PKG_RELEASE if local files
Paul Spooren [Thu, 23 Jul 2020 20:20:57 +0000 (10:20 -1000)]
toolchain: add PKG_RELEASE if local files

The toolchain packages partly contain local code like patches and
configuration files. These files are not tracked via PKG_VERSION as this
variable only covers the upstream package version.

To allow versioning of the buildsystem, this commit adds PKG_RELEASE:=1
to all toolchain packages with local files. Whenever a local file is
changed the release must be increased.

This does not touch binutils and gcc for now, as these provide multiple
versions within one package.

Also update the copyright of touched files to 2020.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[exclude binutils/gcc from patch, adjust commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agolantiq: disable default build for devices with 4M flash
Adrian Schmutzler [Sat, 25 Jul 2020 18:29:15 +0000 (20:29 +0200)]
lantiq: disable default build for devices with 4M flash

It has been decided that the 19.07 release will be last one to include
4/32 devices.

This disables default build for all devices with 4M flash on lantiq.
Note that this will affect _all_ devices for amazonse ("ase") and
xway_legacy subtarget.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: disable default build for devices with 4M flash
Adrian Schmutzler [Sat, 25 Jul 2020 18:29:13 +0000 (20:29 +0200)]
ath79: disable default build for devices with 4M flash

It has been decided that the 19.07 release will be last one to include
4/32 devices.

This disables default build for the remaining devices with 4M flash
on ath79. Note that this will leave exactly one enabled device for
ath79/tiny subtarget, PQI Air-Pen, which was moved there due to
kernel size restrictions.

All 4M TP-Link devices have already been disabled in
8819faff47ff ("ath79: do not build TP-Link tiny images by default")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: reorganize common image definitions for Netgear
Adrian Schmutzler [Sat, 25 Jul 2020 18:29:12 +0000 (20:29 +0200)]
ath79: reorganize common image definitions for Netgear

Netgear currently has a special definition for tiny devices, which
is only used by two devices. Despite, it sets ups the IMAGE/default
definition individually for all devices, although there is actually
only one exception.

This merges the common parts into a single netgear_generic definition
(in contrast to netgear_ath79_nand), and adjusts the individual
definitions accordingly.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoprocd: update to git HEAD
Daniel Golle [Wed, 29 Jul 2020 09:33:19 +0000 (10:33 +0100)]
procd: update to git HEAD

 c3ca99f jail: serialize hook execution
 8ff8970 jail: add some remaining OCI features
 9d5fa0a uxc: behave more like a compliant OCI run-time
 1274033 uxc: fix create operation
 2d811a4 jail: add 'kill' method to container.%s object
 08133b8 uxc: use new container.%s kill ubus API

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agorockchip: enable rockchip-thermal
David Bauer [Tue, 28 Jul 2020 22:28:57 +0000 (00:28 +0200)]
rockchip: enable rockchip-thermal

Enable the rockchip-thermal driver to allow reading the temperature of
the SoC.

Tested on NanoPi R2S

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agorockchip: distribute net interrupts
David Bauer [Mon, 27 Jul 2020 21:13:02 +0000 (23:13 +0200)]
rockchip: distribute net interrupts

This adds a hotplug script for distributing interrupts of eth0 and eth1
across different cores. Otherwise the forwarding performance between
eth0 and eth1 is severely affected.

The existing SMP distribution mechanic in OpenWrt can't be used here, as
the actual device IRQ has to be moved to dedicated cores. In case of
eth1, this is in fact the USB3 controller.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoarm64: dts: rockchip: Add txpbl node for RK3399/RK3328
David Bauer [Mon, 27 Jul 2020 19:34:24 +0000 (21:34 +0200)]
arm64: dts: rockchip: Add txpbl node for RK3399/RK3328

Some rockchip SoCs like the RK3399 and RK3328 exhibit an issue
where tx checksumming does not work with packets larger than 1498.

The default Programmable Buffer Length for TX in these GMAC's is
not suitable for MTUs higher than 1498. The workaround is to disable
TX offloading with 'ethtool -K eth0 tx off rx off' causing performance
impacts as it disables hardware checksumming.

This patch sets snps,txpbl to 0x4 which is a safe number tested ok for
the most popular MTU value of 1500.

For reference, see https://lkml.org/lkml/2019/4/1/1382.

Signed-off-by: Carlos de Paula <me@carlosedp.com>
Link: https://lore.kernel.org/r/20200218221040.10955-1-me@carlosedp.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agorockchip: enable LAN LED configuration
David Bauer [Sun, 26 Jul 2020 17:12:03 +0000 (19:12 +0200)]
rockchip: enable LAN LED configuration

This enables the LEDs on the LAN interfaces.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agorockchip: add NanoPi R2S support
David Bauer [Thu, 16 Jul 2020 08:08:57 +0000 (10:08 +0200)]
rockchip: add NanoPi R2S support

Hardware
--------
RockChip RK3328 ARM64 (4 cores)
1GB DDR4 RAM
2x 1000 Base-T
3 LEDs (LAN / WAN / SYS)
1 Button (Reset)
Micro-SD slot
USB 2.0 Port

Installation
------------
Uncompress the OpenWrt sysupgrade and write it to a micro SD card using
dd.

MAC-address
-----------
The vendor code supports reading a MAC address from an EEPROM connected
via i2c0 of the SoC. The EEPROM (address 0x51) should contain the MAC
address in binary at offset 0xfa. However, my two units didn't come with
such an EEPROM soldered on. The EEPROM should be placed between the SoC
and the GPIO pins on the board. (U10)

Generating rendom MAC addresses works around this issue. Otherwise, all
boards running the same image have identical MAC addresses.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agorockchip: allow for multiple boot-scripts
David Bauer [Sat, 11 Jul 2020 12:02:23 +0000 (14:02 +0200)]
rockchip: allow for multiple boot-scripts

Add support for select a bootscript depending on the device built. This
is necessary, as the FriendlyARM NanoPi R2S needs a different bootcmd in
order to produce output on the debug UART.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agobase-files: add function for generating random MAC
David Bauer [Sat, 11 Jul 2020 11:48:40 +0000 (13:48 +0200)]
base-files: add function for generating random MAC

This adds a function for generating a valid random MAC address (unset MC
bit / set locally administered bit).

It is necessary for devices which do not have a MAC address programmed
by the manufacturer.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agouboot-rockchip: add NanoPi R2S support
David Bauer [Fri, 10 Jul 2020 15:38:36 +0000 (17:38 +0200)]
uboot-rockchip: add NanoPi R2S support

Add support for the FriendlyARM NanoPi R2S.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agouboot-rockchip: update to v2020.07
David Bauer [Fri, 10 Jul 2020 13:14:15 +0000 (15:14 +0200)]
uboot-rockchip: update to v2020.07

Update the U-Boot to version v2020.07. Also replace the Makefile rewrite
with a proper patch, explaining why this hack is needed.

Run-tested: FriendlyARM NanoPi R2S

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoatf-rockchip: update to 2.3
Lucian Cristian [Sun, 28 Jun 2020 18:40:06 +0000 (21:40 +0300)]
atf-rockchip: update to 2.3

also install the firmware for all the supported boards

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
[fix ATF blob path in uboot-rockchip]
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoarc770: update kernel version to 5.4
Adrian Schmutzler [Mon, 13 Apr 2020 10:33:52 +0000 (12:33 +0200)]
arc770: update kernel version to 5.4

Update config with make kernel_oldconfig and copy/refresh patch.

Add CONFIG_WATCHDOG_CORE=y to fix the following error as done for
several targets already:

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

Directly switch to kernel 5.4.

This patch is compile-tested only. However, the target is essentially
pure upstream with a single patch, and it has been reported that
kernel 5.4 has been run on this target successfully already.

Note that in my local tests building with all packages/kmods failed
since openvswitch selects libunwind, which doesn't build for arc with
the following error:

checking if we should build libunwind-ptrace... yes
checking if we should build libunwind-setjmp... yes
checking for build architecture... x86_64
checking for host architecture... arc
checking for target architecture... arc
checking for target operating system... linux-gnu
checking for ELF helper width... configure: error: Unknown ELF target: arc
make[3]: *** [Makefile:65: /data/openwrt/build_dir/target-arc_arc700_uClibc/
   libunwind-1.3.1/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1

Deselecting all kmod-openvswitch* packages will have the build run through.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agolantiq: fix cosmetic issues with partition offsets and sizes
Adrian Schmutzler [Sat, 25 Jul 2020 18:29:14 +0000 (20:29 +0200)]
lantiq: fix cosmetic issues with partition offsets and sizes

This fixes a few cosmetic issues with partition offset and size
that are inconsistent probably due to copy/pasting.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: add support for D-Link DIR-1960 A1
Josh Bendavid [Tue, 14 Jul 2020 15:39:21 +0000 (17:39 +0200)]
ramips: add support for D-Link DIR-1960 A1

This patch adds support for D-Link DIR-1960 A1. Given the similarity with
the DIR-1760/2660 A1, this patch also introduces a common DTSI which can
be shared with these devices, with support to be added in future commits.

Specifications:
* Board: AP-MTKH7-0002
* SoC: MediaTek MT7621AT
* RAM: 256 MB (DDR3)
* Flash: 128 MB (NAND)
* WiFi: MediaTek MT7615N (x2)
* Switch: 1 WAN, 4 LAN (Gigabit)
* Ports: 1 USB 3.0
* Buttons: Reset, WPS
* LEDs: Power (white/orange), Internet (white/orange), WiFi 2.4G (white),
        WiFi 5G (white), USB 3.0 (white)

Notes:
* WiFi 2.4G and WiFi 5G LEDs are wired directly to the wireless chips

Installation:
* D-Link Recovery GUI: power down the router, press and hold the reset
  button, then re-plug it. Keep the reset button pressed until the power
  LED starts flashing orange, manually assign a static IP address under
  the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1

* Some modern browsers may have problems flashing via the Recovery GUI,
  if that occurs consider uploading the firmware through cURL:

    curl -v -i -F "firmware=@file.bin" 192.168.0.1

MAC addresses:

lan   factory 0xe000     *:EB (label)
wan   factory 0xe006     *:EE
2.4   factory 0xe000 +1  *:EC
5.0   factory 0xe000 +2  *:ED

Seems like vendor didn't replace the dummy entrys in the calibration data.

Signed-off-by: Josh Bendavid <joshbendavid@gmail.com>
[fix whitespace issues, create patch to merge DIR-1960 first, move
special WiFi MAC settings to DTS, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoimx6: use device-tree compatible for board name
Adrian Schmutzler [Sat, 18 Jul 2020 12:59:48 +0000 (14:59 +0200)]
imx6: use device-tree compatible for board name

In imx6, we currently use the model from DTS to derive a board name
manually in /lib/imx6.sh.

However, if we have individual DTS files anyway, we can exploit
generic 02_sysinfo and use the compatible as board name directly.

While at it, remove the wildcards from /lib/upgrade/platform.sh as
these might make code shorter, but are quite unpleasant when grepping
for a specific device.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agolayerscape: harmonize device strings
Adrian Schmutzler [Mon, 20 Jul 2020 13:34:04 +0000 (15:34 +0200)]
layerscape: harmonize device strings

OpenWrt lately has harmonized device (definition) names to the
pattern vendor_model to improve overall consistency, also with
other values like the DTS compatible.

This patch applies that scheme to the layerscape target.

Since this (intentionally) creates a bigger overlap between DTS names,
compatible, and device definition name, it also moves DEVICE_DTS and
SUPPORTED_DEVICES definitions to the Device/Default blocks.

Apart from that, it also modifies several packages to use consistent
naming in order to keep the $(1) file references working.

While at it, remove one layer of complexity for the setup in
tfa-layerscape package.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agomvebu: only disable WRT1900AC v1 and WRT32X for buildbots
Adrian Schmutzler [Mon, 27 Jul 2020 09:05:25 +0000 (11:05 +0200)]
mvebu: only disable WRT1900AC v1 and WRT32X for buildbots

Use "DEFAULT := n" to only disable devices for buildbots, but
keep them available for manual build.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agomvebu: disable WRT1900AC v1 and WRT32X images for now
Jo-Philipp Wich [Sun, 26 Jul 2020 16:51:56 +0000 (18:51 +0200)]
mvebu: disable WRT1900AC v1 and WRT32X images for now

The kernel appears to have grown too large, breaking the build for the
entire target.

Disable the affected images for now until the situation is dealt with.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
3 years agofirewall: bump to version 2020-07-05
Yousong Zhou [Sat, 25 Jul 2020 03:08:29 +0000 (11:08 +0800)]
firewall: bump to version 2020-07-05

Changes since last source version

  e9b90df zones: apply tcp mss clamping also on ingress path
  050816a redirects: fix segmentation fault
  f62a52b treewide: replace unsafe string functions
  23cc543 improve reload logic
  9d7f49d redurects: add support to define multiple zones for dnat reflection rules
  f87d0b0 firewall3: defaults: fix uci flow_offloading option
  fe9602c rules: fix typo
  7cc2a84 defaults: robustify flow table detection.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
3 years agomediatek: mt7623: add full system image for UniElec U7623
David Woodhouse [Tue, 21 Jul 2020 18:19:40 +0000 (19:19 +0100)]
mediatek: mt7623: add full system image for UniElec U7623

This adds a full eMMC image including U-Boot, which means that the
kernel can inherit the true RAM size detected by the preloader.

As implemented in previous commits, sysupgrade to this image from
the legacy layout (and via that, from the vendor-installed image)
is supported.

Rename the legacy image for the 512MiB board, for clarity.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agomediatek: mt7623: rename gen_banana_pi_img.sh → gen_mtk_mmc_img.sh
David Woodhouse [Tue, 21 Jul 2020 18:14:18 +0000 (19:14 +0100)]
mediatek: mt7623: rename gen_banana_pi_img.sh → gen_mtk_mmc_img.sh

As I buy more hardware and continue to work on consolidation, This will
apply to a lot of MediaTek platforms; rename it accordingly.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agomediatek: mt7623: make gen_banana_pi_img.sh more generic
David Woodhouse [Tue, 21 Jul 2020 18:07:47 +0000 (19:07 +0100)]
mediatek: mt7623: make gen_banana_pi_img.sh more generic

This actually covers fairly much all the MediaTek platforms; they
only have different images because they don't include the preloader
and U-Boot, and rely on preinstalled stuff from the vendor.

So this script can slowly take over the world as we complete the
support for various other platforms, starting with UniElec U7623…

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agomediatek: mt7623: add scatter file for unbricking with SP Flash Tool
David Woodhouse [Tue, 21 Jul 2020 16:43:12 +0000 (17:43 +0100)]
mediatek: mt7623: add scatter file for unbricking with SP Flash Tool

Many MediaTek SoCs can be unbricked by using the SP Flash Tool from
http://spflashtool.com/ along with a "scatter list" file, which is
just a text file listing which image gets loaded where.

We use a trivial partition layout for the tool, with the whole eMMC
image as a single "partition", which means users just need to unzip
the sysupgrade image. Doing the real partition layout would be overly
complex and would require the individual partitions to be shipped
as artifacts — or users to extract them out of the sysupgrade image
just for the tool to put them adjacent to each other on the eMMC
anyway.

The tool does require a copy of the preloader in order to operate,
even when it isn't flashing the preloader to the eMMC boot region.
So drop that into the bin directory as an artifact too.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>