openwrt/staging/dedeckeh.git
3 years agoramips: add support for Netgear R6080
Alex Lewontin [Fri, 21 Feb 2020 20:56:44 +0000 (15:56 -0500)]
ramips: add support for Netgear R6080

This adds support for the Netgear R6080, aka Netgear AC1000.

The R6080 has almost the same hardware as the Netgear R6120,
aka Netgear AC1200, but it lacks the USB port, has only 8 MiB flash and
uses a different SERCOMM_HWID.

Specification:

SoC: MediaTek MT7628 (580 MHz)
Flash: 8 MiB
RAM: 64 MiB
Wireless: 2.4Ghz (builtin) and 5Ghz (MT7612E)
LAN speed: 10/100
LAN ports: 4
WAN speed: 10/100
WAN ports: 1
UART (57600 8N1) on PCB

Installation:

Flashing OpenWRT from stock firmware requires nmrpflash. Use an ethernet
cable to connect to LAN port 1 of the R6080, and power the R6080 off.
From the connected workstation, run
`nmrpflash -i eth0 -f openwrt-ramips-mt76x8-netgear_r6080-squashfs-factory.img`,
replacing eth0 with the appropriate interface (can be identified by
running `nmrpflash -L`). Then power on the R6080. After flashing has finished,
power cycle the R6080, and it will boot into OpenWRT. Once OpenWRT has been
installed, subsequent flashes can use the web interface and sysupgrade files.

Signed-off-by: Alex Lewontin <alex.c.lewontin@gmail.com>
[rebase and adjust for 5.4]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokernel: rename CONFIG_NETPRIO_CGROUP to CONFIG_CGROUP_NET_PRIO
Javier Marcet [Wed, 3 Jun 2020 12:01:37 +0000 (14:01 +0200)]
kernel: rename CONFIG_NETPRIO_CGROUP to CONFIG_CGROUP_NET_PRIO

This has been changed in kernel 3.14.

Signed-off-by: Javier Marcet <javier@marcet.info>
3 years agoath79: Fix ubnt_edgeswitch-8xp DEVICE_PACKAGES
Hauke Mehrtens [Wed, 13 May 2020 21:42:15 +0000 (23:42 +0200)]
ath79: Fix ubnt_edgeswitch-8xp DEVICE_PACKAGES

switch-bcm53xx-mdio does not exists, use kmod-switch-bcm53xx-mdio
instead.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Tobias Schramm <tobleminer@gmail.com>
3 years agomvebu: LS421DE: dts file improvements
Daniel González Cabanelas [Sun, 26 Apr 2020 20:20:24 +0000 (22:20 +0200)]
mvebu: LS421DE: dts file improvements

- Delete useless HDD presence inputs: they aren't buttons, and probably
  they are outputs in the stock firmware.
- Change the Function Button keycode: the current one isn't mapped by
  the kernel module.
- Use the recommended property names for the ethernet stuff.
- Add missing i2c pinmux.
- Minor cosmetic changes.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
3 years agolantiq: remove unused PHY drivers on xrx200
Aleksander Jan Bajkowski [Sat, 2 May 2020 16:26:29 +0000 (18:26 +0200)]
lantiq: remove unused PHY drivers on xrx200

All boards on xrx200 use builtin switch and there is no supported device
with external switch.
It was copy paste from xway subtarget and was added in commit 18b76c66fbfea0e21ff66c6df432fa109c5bbb43.

Save 20.3 kB flash memory.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
3 years agoramips: fix sd polling
Qin Wei [Sat, 16 May 2020 07:51:36 +0000 (15:51 +0800)]
ramips: fix sd polling

This is fixed in 18.06, it appears again in 19.07.
Currently mt7628 sdcard driver do not support polling mode which is for
the device do not have card-detect pin to detect sd card insert. Without
this patch, device will not detect sdcard is inserted. This patch is a
fix of that.

Signed-off-by: Qin Wei <support@vocore.io>
3 years agokernel: i2c-pxa: remove slave
Scott Roberts [Wed, 20 May 2020 19:28:39 +0000 (13:28 -0600)]
kernel: i2c-pxa: remove slave

Removing i2c pxa slave

The i2c-pxa is typically not use in slave mode. It does not make sense
to have slave mode enabled by default.
Having slave mode enabled prevents the i2c controller from being reset
if a real slave device such as an SFP is attached to the i2c-pxa bus and
locks it up.
Disable slave mode so that the i2c controller can be reset if the bus is
locked up.
If someone actually has a need for pxa slave mode this can be enabled in
kernel config.

Signed-off-by: Scott Roberts <ttocsr@gmail.com>
3 years agonetifd: replace timesvr with timesrv
Sukru Senli [Fri, 22 May 2020 14:33:04 +0000 (16:33 +0200)]
netifd: replace timesvr with timesrv

/lib/netifd/dhcp.script:
         Keep support for 'timesvr' while also supporting 'timesrv'
         Add log message indicating deprecation of 'timesvr'

Signed-off-by: Sukru Senli <sukru.senli@iopsys.eu>
3 years agouboot-kirkwood: enable sata in nsa310 uboot
Alberto Bursi [Fri, 22 May 2020 16:49:15 +0000 (18:49 +0200)]
uboot-kirkwood: enable sata in nsa310 uboot

the uboot of nsa310 cannot use the network chip
as it is a realtek on the PCIe lanes and not a
Marvell ethernet from the SoC.

Therefore tftp is not possible on this device
and the only way to install is by loading files
from a USB drive.
If the USB subsystem is dead there is no way to
install OpenWrt.
Enable sata support and commands so it can be
used as a fallback in case of USB issues.

Signed-off-by: Alberto Bursi <bobafetthotmail@gmail.com>
3 years agosunxi: add text referencing Allwinner H3 and H5 CPUs
Rogan Dawes [Wed, 27 May 2020 08:43:26 +0000 (10:43 +0200)]
sunxi: add text referencing Allwinner H3 and H5 CPUs

This makes it a little easier to figure out which options to choose.

Signed-off-by: Rogan Dawes <rogan@dawes.za.net>
3 years agobase-files: coreutil-sha256sum breaks status code
Huangbin Zhan [Thu, 4 Jun 2020 13:49:54 +0000 (21:49 +0800)]
base-files: coreutil-sha256sum breaks status code

With package "coreutil-sha256sum" installed "sysupgrade" fails to perform 'sha256sum -s' and instead returns 'invalid option -- 's''.
This is caused due to:
different syntax for a sha256sum status check ('sha256sum --status' with "coreutil-sha256sum")
'/usr/bin/sha256sum' being symlinked to '/usr/bin/gnu-sha256sum' (after installation of "coreutil-sha256sum")
"coreutil-sha256sum" package from the packages feed replaces the Busybox sha256sum
This patch restores for 'sysupgrade' the busybox call to its sha256sum applet.

Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
3 years agox86: Support Intel 10 Gigabit Ethernet Cards
Gregory L. Dietsche [Sun, 7 Jun 2020 04:30:23 +0000 (23:30 -0500)]
x86: Support Intel 10 Gigabit Ethernet Cards

Support Intel 10 Gigabit Ethernet Cards in x86/64 images by default.
This ensures that systems with cards such as the Intel x520 will work properly.

Signed-off-by: Gregory L. Dietsche <Gregory.Dietsche@cuw.edu>
3 years agoubox: add ALTERNATIVES
Huangbin Zhan [Wed, 3 Jun 2020 02:24:52 +0000 (10:24 +0800)]
ubox: add ALTERNATIVES

This avoids a conflict with the kmod util from the package feed.

Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
3 years agologger: enable alternatives support
Huangbin Zhan [Tue, 9 Jun 2020 23:11:08 +0000 (07:11 +0800)]
logger: enable alternatives support

Avoid conflict with busybox

Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
3 years agotarget/hack-5.4: platform/x86/pcengines: revert led simswich compromise
Florian Eckert [Fri, 27 Mar 2020 15:23:14 +0000 (16:23 +0100)]
target/hack-5.4: platform/x86/pcengines: revert led simswich compromise

With this change the LED subsystem is abused in the kernel to switch the
simswap. This change will be reverted, so we could use again the gpio
subsystem.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agokernel: add pcengines-apu2 module description
Florian Eckert [Tue, 2 Jul 2019 10:04:58 +0000 (12:04 +0200)]
kernel: add pcengines-apu2 module description

Add a module description for the new pcengnies-apu2 device driver.
This driver supports the front button and LEDs on the PC Engines
APUv2/APUv3 boards.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agokernel: add gpio-amd-fch module description
Florian Eckert [Tue, 2 Jul 2019 10:04:27 +0000 (12:04 +0200)]
kernel: add gpio-amd-fch module description

Add a module description for the new gpio-amd-fch device driver.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agokernel/leds-apu2: remove deprecated leds-apu2 driver
Florian Eckert [Mon, 30 Jul 2018 06:24:03 +0000 (08:24 +0200)]
kernel/leds-apu2: remove deprecated leds-apu2 driver

Remove leds-apu2 out of tree driver. There is a new upstream device gpio
and leds driver stack available for the APUv2 and APUv3 boards from pc
egnines. This new driver stack was add in kernel version 4.15.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agoath79: drop and consolidate redundant chosen/bootargs
Adrian Schmutzler [Thu, 25 Jun 2020 21:09:05 +0000 (23:09 +0200)]
ath79: drop and consolidate redundant chosen/bootargs

In ath79, for several SoCs the console bootargs are defined to the
very same value in every device's DTS. Consolidate these definitions
in the SoC dtsi files and drop further redundant definitions elsewhere.

The only device without any bootargs set has been OpenMesh OM5P-AC V2.
This will now inherit the setting from qca955x.dtsi

Note that while this tidies up master a lot, it might develop into a
frequent pitfall for backports.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: drop redundant chosen/bootargs
Adrian Schmutzler [Thu, 25 Jun 2020 20:31:40 +0000 (22:31 +0200)]
ramips: drop redundant chosen/bootargs

chosen/bootargs are defined to the same value in device DTS files
that is already set in the SoC DTSI. Remove the redundant definitions.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agomac80211: ath9k: enable MFP capability unconditionally
David Bauer [Thu, 25 Jun 2020 00:36:19 +0000 (02:36 +0200)]
mac80211: ath9k: enable MFP capability unconditionally

ath9k will already fallback on software-crypto for chipsets not
supporting IEEE802.11w (MFP). So advertising MFP is not dependent
on disabling HW crypto for all traffic entirely.

Tested on Sonicwall SonicPoint Ni (AR9132)

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoath79: add support for AVM FRITZ!WLAN Repeater DVB-C
Natalie Kagelmacher [Thu, 14 May 2020 08:44:21 +0000 (10:44 +0200)]
ath79: add support for AVM FRITZ!WLAN Repeater DVB-C

This commit adds support for the AVM FRITZ!WLAN Repeater DVB-C

SOC:   Qualcomm Atheros QCA9556
RAM:   64 MiB
FLASH: 16 MB SPI-NOR
WLAN:  QCA9556 3T3R 2.4 GHZ b/g/n and
       QCA9880 3T3R 5 GHz n/ac
ETH:   Atheros AR8033 1000 Base-T
DVB-C: EM28174 with MaxLinear MXL251 tuner
BTN:   WPS Button
LED:   Power, WLAN, TV, RSSI0-4

Tested and working:
 - Ethernet (correct MAC, gigabit, iperf3 about 200 Mbit/s)
 - 2.4 GHz Wi-Fi (correct MAC)
 - 5 GHz Wi-Fi (correct MAC)
 - WPS Button (tested using wifitoggle)
 - LEDs
 - Installation via EVA bootloader (FTP recovery)
 - OpenWrt sysupgrade (both CLI and LuCI)
 - Download of "urlader" (mtd0)

Not working:
 - Internal USB
 - DVB-C em28174+MxL251 (depends on internal USB)

Installation via EVA bootloader (FTP recovery):
Set NIC to 192.168.178.3/24 gateway 192.168.178.1 and power on the device,
connect to 192.168.178.1 through FTP and sign in with adam2/adam2:

ftp> quote USER adam2
ftp> quote PASS adam2
ftp> binary
ftp> debug
ftp> passive
ftp> quote MEDIA FLSH
ftp> put openwrt-sysupgrade.bin mtd1

Wait for "Transfer complete" together with the transfer details.
Wait two minutes to make sure flash is complete (just to be safe).

Then restart the device (power off and on) to boot into OpenWrt.
Revert your NIC settings to reach OpenWrt at 192.168.1.1

Signed-off-by: Natalie Kagelmacher <nataliek@pm.me>
[fixed sorting - removed change to other board -
prettified commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agodropbear: fix compilation for uClibc
Hans Dedecker [Wed, 24 Jun 2020 20:30:58 +0000 (22:30 +0200)]
dropbear: fix compilation for uClibc

Backport patches which fix compile issue for uClibc-ng :

dbrandom.c:174:8: warning: implicit declaration of function 'getrandom'; did you mean 'genrandom'? [-Wimplicit-function-declaration]
  ret = getrandom(buf, sizeof(buf), GRND_NONBLOCK);
        ^~~~~~~~~
        genrandom
dbrandom.c:174:36: error: 'GRND_NONBLOCK' undeclared (first use in this function); did you mean 'SOCK_NONBLOCK'?
  ret = getrandom(buf, sizeof(buf), GRND_NONBLOCK);
                                    ^~~~~~~~~~~~~
                                    SOCK_NONBLOCK

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agourandom-seed: update Makefile
Sungbo Eo [Sun, 23 Feb 2020 12:39:26 +0000 (21:39 +0900)]
urandom-seed: update Makefile

- update SPDX license identifier
- use https in URL
- use default PKG_BUILD_DIR

Suggested-by: Josef Schlehofer <josef.schlehofer@nic.cz>
Tested-by: Josef Schlehofer <josef.schlehofer@nic.cz>
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
3 years agofeeds: add freifunk feed
Sven Roederer [Mon, 11 May 2020 19:29:10 +0000 (21:29 +0200)]
feeds: add freifunk feed

Read the freifunk packages, that have been moved from the LuCI feed
into its own feed in January 2019.

Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
3 years agowireguard: bump to 1.0.20200623
Jason A. Donenfeld [Tue, 23 Jun 2020 22:18:06 +0000 (16:18 -0600)]
wireguard: bump to 1.0.20200623

* compat: drop centos 8.1 support as 8.2 is now out

Of note, as well, is that we now have both RHEL7 and RHEL8 in our CI at
<https://www.wireguard.com/build-status/>.

* Kbuild: remove -fvisibility=hidden from cflags

This fixes an issue when compiling wireguard as a module for ARM kernels in
THUMB2 mode without the JUMP11 workaround.

* noise: do not assign initiation time in if condition

Style fix.

* device: avoid circular netns references

Fixes a circular reference issue with network namespaces.

* netns: workaround bad 5.2.y backport

This works around a back backport in the 5.2.y series.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
3 years agomac80211: fix use of local variable
Leon M. George [Thu, 30 Apr 2020 08:26:36 +0000 (10:26 +0200)]
mac80211: fix use of local variable

mac80211_get_addr is called from mac80211_generate_mac, where the local variable
initialisation id="${macidx:-0}" suggests that macidx is not always defined.
Probably, idx was supposed to be used instead of $(($macidx + 1)).

Fixes: 4d99db168cf7 ("mac80211: try to get interface addresses from wiphy sysfs 'addresses' if no mask is set")
Signed-off-by: Leon M. George <leon@georgemail.eu>
3 years agobcm47xx: add support for NETGEAR R6200 V1
Edward Matijevic [Tue, 23 Jun 2020 19:50:04 +0000 (14:50 -0500)]
bcm47xx: add support for NETGEAR R6200 V1

This patch adds supports for the NETGEAR R6200 V1
This device is mainlined in Linux as of 5.4

Specification:
   - SOC: Broadcom BCM4718A1 (480 MHz)
   - Flash: 16MB (Macronix MX25L128)
   - RAM: 128MB DDR2
   - SWITCH: BCM53125
   - Ethernet: 5x GE (1 WAN + 4 LAN, Inverted order)
   - WLAN 2.4G: In SOC
   - WLAN 5GHz: miniPCIe card, BCM4352 (ID: 4360)
   - USB: 1x USB 2.0 port (Type A)
   - Buttons: Reset, WLAN, WPS
   - LED: Amber for Power, others need a workaround
   - UART: 1x UART on PCB

LED Issues: They are controlled by a 74HC164 via bit banging(GPIO 6/7)

Firmware Install Instructions
=============================
Using the device specific .chk, use that file to perform
a normal device upgrade in the OEM admin page.

Signed-off-by: Edward Matijevic <motolav@gmail.com>
3 years agobase-files: remove urandom-seed definition
Sungbo Eo [Sun, 23 Feb 2020 04:17:39 +0000 (13:17 +0900)]
base-files: remove urandom-seed definition

urandom-seed has a separate Makefile, we can safely remove the definition here.

Fixes: 27bfde9c9f78 ("base-files: move urandom seed bits into separate package")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
3 years agoramips: clean up Netgear R6120 code formatting
Alex Lewontin [Mon, 6 Apr 2020 16:07:07 +0000 (12:07 -0400)]
ramips: clean up Netgear R6120 code formatting

This commit performs minor janitorial work to clean up some code
formatting for the Netgear R6120.

Signed-off-by: Alex Lewontin <alex.c.lewontin@gmail.com>
3 years agoramips: move Netgear R6120 LED trigger to DTS
Alex Lewontin [Fri, 21 Feb 2020 20:58:12 +0000 (15:58 -0500)]
ramips: move Netgear R6120 LED trigger to DTS

This moves the trigger for the Netgear R6120's wlan2g_green LED from
base-files/etc/board.d/01_leds to the device-tree file.

This has been applied to R6120 based on findings for the very similar
Netgear R6080.

Signed-off-by: Alex Lewontin <alex.c.lewontin@gmail.com>
[merge case in 01_leds, slightly adjust commit message/title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agomvebu: consolidate DTS files
Adrian Schmutzler [Thu, 18 Jun 2020 09:26:00 +0000 (11:26 +0200)]
mvebu: consolidate DTS files

The DTS files in files-4.19 and files-5.4 are exactly identical
except for one file (armada-3720-uDPU.dts), which is only present
for 4.19, as it has been upstreamed before 5.4.

Since there is no point in maintaining all these identical files
twice, this patch moves them to the "files" directory, only keeping
the named exception to files-4.19.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoipq40xx: consolidate DTS files
Adrian Schmutzler [Thu, 18 Jun 2020 09:13:12 +0000 (11:13 +0200)]
ipq40xx: consolidate DTS files

The DTS files in files-4.19 and files-5.4 are exactly identical
except for one file (qcom-ipq4018-emr3500.dts), which is only
present for 5.4.

Since there is no point in maintaining all these identical files
twice, this patch moves them to the "files" directory.

If there ever was a new kernel with substantial DTS changes, a
new folder would need to be introduced anyway and could easily be
done.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoigmpproxy: remove some bashism
Sven Roederer [Wed, 25 Dec 2019 18:20:10 +0000 (19:20 +0100)]
igmpproxy: remove some bashism

"[[" is a bash extension for test. As the ash-implementation is not
fully compatible we drop its usage.
This follows up 3519bf4976b41c

As a result, we also need to move the and/or out of the test brackets.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
[squash from two patches, adjust commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agolibnetfilter-queue: fix package title and description
Catalin Patulea [Thu, 10 Oct 2019 02:40:15 +0000 (22:40 -0400)]
libnetfilter-queue: fix package title and description

The original text was copy/pasted from some other package.
Adjust the package title and description to match the description
on the publishers page.

Signed-off-by: Catalin Patulea <catalinp@google.com>
[slightly adjust content and commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agomvebu: fix default EU regdomain for Linksys WRT AC devices
Jose Olivera [Mon, 20 May 2019 13:10:56 +0000 (21:10 +0800)]
mvebu: fix default EU regdomain for Linksys WRT AC devices

The mwlwifi driver sets the default country code for EU (fi-
rmware region code 0x30) certified devices to FR (France),
not DE (Germany). Whilst this is a trivial fix, novice users
may not know how mwlwifi negatively reacts to a non-matching
country code and may leave the setting alone. Especially si-
nce it is under the advanced settings section in LuCI.

Relevant mwlwifi driver code:
https://github.com/kaloz/mwlwifi/commit/0a550312ddb5a9e00e8d602d5571598f25a78158

The mwlwifi driver readme states "Please don't change country
code and let mwlwifi set it for you." However, OpenWrt's current
behaviour does not adhere to this with its default, 'just flashed
from factory' setting for EU devices.

Signed-off-by: Jose Olivera <oliverajeo@gmail.com>
[rebase, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoarmvirt,x86: fix build breakage of crypto ccp module
Petr Štetiar [Tue, 23 Jun 2020 07:24:57 +0000 (09:24 +0200)]
armvirt,x86: fix build breakage of crypto ccp module

Upstream in commit f9f8f0c24203 ("crypto: ccp -- don't "select"
CONFIG_DMADEVICES") removed dependency on CONFIG_DMADEVICES symbol which
leads to build breakage of ccp crypto module, so fix this by adding that
symbol back in the kernel config.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agobcm63xx: AV4202N: add missing PCI pinmux
Daniel González Cabanelas [Sat, 20 Jun 2020 15:44:42 +0000 (17:44 +0200)]
bcm63xx: AV4202N: add missing PCI pinmux

The ADB P.DG AV4202N device has a wifi chipset connected via PCI. But the
PCI pinmux is missing and without it the wifi won't work properly.

Add the pinctrl_pci to enable the missing PCI pins for this device.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
3 years agokernel: bump 5.4 to 5.4.48
Petr Štetiar [Tue, 9 Jun 2020 12:18:25 +0000 (14:18 +0200)]
kernel: bump 5.4 to 5.4.48

Resolved merge conflict in the following patches:

 layerscape: 701-net-0213-dpaa2-eth-Add-CEETM-qdisc-support.patch
 ramips: 0013-owrt-hack-fix-mt7688-cache-issue.patch

Refreshed patches, removed upstreamed patch:

 bcm63xx: 020-v5.8-mtd-rawnand-brcmnand-fix-hamming-oob-layout.patch

Run tested: qemu-x86-64
Build tested: x86/64

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agoath79: image: fix initramfs for safeloader devices
Petr Štetiar [Wed, 17 Jun 2020 21:48:32 +0000 (23:48 +0200)]
ath79: image: fix initramfs for safeloader devices

Currently it's not possible to tftpboot initramfs image on archer-c7-v5
as the image contains tplink-v1-header which leads to:

 ath> bootm
 ## Booting image at 81000000 ...
 Bad Magic Number

as U-Boot expects uImage wrapped image. This is caused by following
inheritance issue:

  define Device/Init
    KERNEL_INITRAMFS = $$(KERNEL)

  define Device/tplink-v1
    KERNEL := kernel-bin | append-dtb | lzma
    KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-v1-header

  define Device/tplink-safeloader
    $(Device/tplink-v1)

  define Device/tplink-safeloader-uimage
    $(Device/tplink-safeloader)
    KERNEL := kernel-bin | append-dtb | lzma | uImageArcher lzma

  define Device/tplink_archer-c7-v5
    $(Device/tplink-safeloader-uimage)

where tplink-v1 defines KERNEL_INITRAMFS with tplink-v1-header and it's
then used by all devices inheriting from tplink-safeloader. Fix this by
overriding KERNEL_INITRAMFS to KERNEL variable again.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agodropbear: bump to 2020.79
Konstantin Demin [Sun, 21 Jun 2020 12:36:47 +0000 (15:36 +0300)]
dropbear: bump to 2020.79

- drop patches (applied upstream):
  * 010-backport-change-address-logging.patch
  * 020-backport-ed25519-support.patch
  * 021-backport-chacha20-poly1305-support.patch
- backport patches:
  * 010-backport-disable-toom-and-karatsuba.patch:
    reduce dropbear binary size (about ~8Kb).
- refresh patches.
- don't bother anymore with following config options
  because they are disabled in upstream too:
  * DROPBEAR_3DES
  * DROPBEAR_ENABLE_CBC_MODE
  * DROPBEAR_SHA1_96_HMAC
- explicitly disable DO_MOTD as it was before commit a1099ed:
  upstream has (accidentally) switched it to 0 in release 2019.77,
  but reverted back in release 2020.79.

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
3 years agolantiq: fritz7312: set maximum speed to 100 mbit on 5.4
Adrian Schmutzler [Thu, 18 Jun 2020 09:48:58 +0000 (11:48 +0200)]
lantiq: fritz7312: set maximum speed to 100 mbit on 5.4

The fritz 7312 does not support 1000 gbit. Advertising it makes it
worse. Some NIC will change to 1000 gibt and turn off and on again for
ever.

The previous patch in 36f628910b8b was only applied to the 4.19 file,
so let's just make it consistent with this patch.

Cc: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: fix input type for TP-Link TL-WR902AC v1 mode switch
Lech Perczak [Sat, 20 Jun 2020 16:16:11 +0000 (18:16 +0200)]
ath79: fix input type for TP-Link TL-WR902AC v1 mode switch

Inputs assigned to "mode select" switch on the side of the device
were missing linux,input-type property.
This would cause them do incorrectly generate EV_KEY events.
Fix this by setting the linux,input-type = <EV_SW> property on them.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
3 years agoramips: add support for ELECOM WRC-2533GST2
INAGAKI Hiroshi [Sat, 16 May 2020 08:39:26 +0000 (17:39 +0900)]
ramips: add support for ELECOM WRC-2533GST2

ELECOM WRC-2533GST2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based
on MT7621A.

Specification:

- SoC : MediaTek MT7621A
- RAM : DDR3 256 MiB
- Flash : SPI-NOR 32 MiB
- WLAN : 2.4/5 GHz 4T4R (2x MediaTek MT7615)
- Ethernet : 10/100/1000 Mbps x5
  - Switch : MediaTek MT7530 (SoC)
- LED/keys : 4x/6x (2x buttons, 1x slide-switch)
- UART : through-hole on PCB
  - J4: 3.3V, GND, TX, RX from ethernet port side
  - 57600n8
- Power : 12VDC, 1.5A

Flash instruction using factory image:

1. Boot WRC-2533GST2 normally
2. Access to "http://192.168.2.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt factory image and click apply ("適用") button
4. Wait ~150 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
3 years agoramips: add MT7615 wireless support for ELECOM WRC-GST devices
INAGAKI Hiroshi [Tue, 25 Jun 2019 13:20:44 +0000 (22:20 +0900)]
ramips: add MT7615 wireless support for ELECOM WRC-GST devices

ELECOM WRC-1900GST and WRC-2533GST have two MT7615 chips for 2.4/5 GHz
wireless.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[WRC-1900GST]
Acked-by: NOGUCHI Hiroshi <drvlabo@gmail.com>
3 years agoramips: increase SPI frequency for ELECOM WRC-GST devices
INAGAKI Hiroshi [Sat, 16 May 2020 06:14:18 +0000 (15:14 +0900)]
ramips: increase SPI frequency for ELECOM WRC-GST devices

Increase the SPI frequency for ELECOM WRC-1900GST and WRC-2533GST
to 40 MHz by updating the common DTSI file.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[WRC-1900GST]
Acked-by: NOGUCHI Hiroshi <drvlabo@gmail.com>
[split patch, adjust commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: add label-mac-device for ELECOM WRC-GST devices
INAGAKI Hiroshi [Sat, 16 May 2020 06:14:18 +0000 (15:14 +0900)]
ramips: add label-mac-device for ELECOM WRC-GST devices

Update the dtsi for ELECOM WRC-1900GST and WRC-2533GST to add
label-mac-device alias.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[WRC-1900GST]
Acked-by: NOGUCHI Hiroshi <drvlabo@gmail.com>
[split patch, adjust commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: add support for TP-Link CPE610 v2
Andrew Cameron [Thu, 18 Jun 2020 13:25:43 +0000 (08:25 -0500)]
ath79: add support for TP-Link CPE610 v2

TP-Link CPE610 v2 is an outdoor wireless CPE for 5 GHz with
one Ethernet port based on Atheros AR9344

Specifications:
 - 560/450/225 MHz (CPU/DDR/AHB)
 - 1x 10/100 Mbps Ethernet
 - 64 MB of DDR2 RAM
 - 8 MB of SPI-NOR Flash
 - 23dBi high-gain directional 2×2 MIMO antenna and a
   dedicated metal reflector
 - Power, LAN, WLAN5G green LEDs
 - 3x green RSSI LEDs

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

Signed-off-by: Andrew Cameron <apcameron@softhome.net>
3 years agoath79: add support for TP-Link TL-WA801ND v3/v4
Adrian Schmutzler [Tue, 16 Jun 2020 13:14:18 +0000 (15:14 +0200)]
ath79: add support for TP-Link TL-WA801ND v3/v4

This ports support for these devices from ar71xx.

Specification:

- System-On-Chip: Qualcomm Atheros QCA9533
- CPU/Speed: v3: 560 MHz, v4: 650 MHz
- Flash: 4096 KiB
- RAM: 32 MiB
- Ethernet: 1 port @ 100M
- Wireless: SoC-integrated: QCA9533 2.4GHz 802.11bgn

In contrast to the implementation in ar71xx (reset and WiFi button),
the device actually features reset and WPS buttons.

Flashing instructions:

Upload the ...-factory.bin file via OEM web interface.

TFTP Recovery:

1. Set PC to fixed IP address 192.168.0.66
2. Download *-factory.bin image and rename it to
   wa801ndv3_tp_recovery.bin
3. Start a tftp server with the image file in its root directory
4. Turn off the router
5. Press and hold Reset button
6. Turn on router with the reset button pressed and wait ~15 seconds
7. Release the reset button and after a short time
   the firmware should be transferred from the tftp server
8. Wait ~30 second to complete recovery.

TFTP recovery has only been tested with v3, and the Wiki states
that the procedure won't work for v4, which cannot be verified
or falsified at the moment.

Tested by Tim Ward (see forum):
https://forum.openwrt.org/t/ath79-support-for-tp-link-tl-wa901nd-v3-v4-v5/61246/13

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobcm63xx: DGND3700v1: fix port order
Daniel González Cabanelas [Sat, 23 May 2020 22:24:02 +0000 (00:24 +0200)]
bcm63xx: DGND3700v1: fix port order

Fix the switch LAN labels for the DGND3700v1/DGND3800B router,
the order is reversed.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
[cut out of bigger patch, adjust commit title/message accordingly]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobcm63xx: HG622: enable LAN LEDs
Daniel González Cabanelas [Wed, 17 Jun 2020 09:39:56 +0000 (11:39 +0200)]
bcm63xx: HG622: enable LAN LEDs

The Huawei Echolife HG622 has hardware controlled LAN LEDs.

Add the ephy led pinctrl to let the router show LAN activity on these
LEDs.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
3 years agoath79: set &eth1 status for TP-Link CPE devices in parent DTSI
Adrian Schmutzler [Thu, 18 Jun 2020 20:31:11 +0000 (22:31 +0200)]
ath79: set &eth1 status for TP-Link CPE devices in parent DTSI

The status is set to "okay" for all devices on ar9344, so just move
this to the parent DTSI.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agotoolchain: glibc ldd env path fixup
Chen Minqiang [Wed, 17 Apr 2019 12:00:49 +0000 (20:00 +0800)]
toolchain: glibc ldd env path fixup

This replace the shell script header of ldd
when it install to `/usr/bin/ldd` where
`#! /..../staging_dir/host/bin/bash`
should be
`#!/bin/sh`

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
3 years agobase-files: gpio switch: add named GPIO support
Kuan-Yi Li [Sat, 10 Aug 2019 19:23:28 +0000 (03:23 +0800)]
base-files: gpio switch: add named GPIO support

Previously, gpio_switch only accepts GPIO pin number as input. Once a
GPIO pin is exported and named by device tree, its pin state cannot be
configured and saved across reboots by UCI.

This patch adds support for named GPIO pins. Thus GPIO pin can be
exported by device tree with active high/low correctly configured,
having human-readable name in /sys/class/gpio/ is also now possible.

More importantly, GPIO pins which are referenced by name will be immune
from pin mapping breakage while unintentional pin number changes are
introduced by kernel or driver updates.

Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
3 years agomac80211: ath9k: enable adding wireless noise to kernel entropy pool
Alan Swanson [Sat, 7 Mar 2020 15:42:54 +0000 (15:42 +0000)]
mac80211: ath9k: enable adding wireless noise to kernel entropy pool

This option allows adding the ath9k ADC register output as a source
of randomness into the Linux entropy pool at sufficient quality
random data (at least 10 bits and up to 22 bits of min-entropy for
a 32-bit value).

Fixes FS#1444
Signed-off-by: Alan Swanson <reiver@improbability.net>
3 years agohostapd: fix compilation of wpa_supplicant
Karel Kočí [Tue, 16 Jun 2020 15:07:46 +0000 (17:07 +0200)]
hostapd: fix compilation of wpa_supplicant

Ubus patch as it seems have been broken by some rebase in the past as
the location of line that adds ubus object file was in condition for
CONFIG_MACSEC. That condition was adding object files that are not
touched by ubus patch. This means ubus.o does not have to be included in
that case. When it has to be and when build fails is when CONFIG_AP is
set. All files included in wpa_supplicant that are touched by this patch
are in this condition. This means that this is for sure the original
place for it.

Signed-off-by: Karel Kočí <karel.koci@nic.cz>
3 years agotoolchain: remove gcc libssp and use libc variant
Ian Cooper [Mon, 15 Jun 2020 21:14:04 +0000 (22:14 +0100)]
toolchain: remove gcc libssp and use libc variant

Removes the standalone implementation of stack smashing protection
in gcc's libssp in favour of the native implementation available
in glibc and uclibc. Musl libc already uses its native ssp, so this
patch does not affect musl-based toolchains.

Stack smashing protection configuration options are now uniform
across all supported libc variants.

This also makes kernel-level stack smashing protection available
for x86_64 and i386 builds using non-musl libc.

Signed-off-by: Ian Cooper <iancooper@hotmail.com>
3 years agocomgt-ncm: do not attempt to connect if the control device is invalid
Rozhuk Ivan [Sat, 24 Aug 2019 16:41:01 +0000 (19:41 +0300)]
comgt-ncm: do not attempt to connect if the control device is invalid

After a hardware reconnect, the control device might be unavailable and
attempting to interact with it will lead to hanging gcom calls, leaving
the protocol setup in an unrecoverable state.

Change the protocol handler to bail out early and notify netifd if the
control device is not defined or if the underlying device node does not
exist.

Also ensure that the "disconnect", "connect" and "setmode" commands are
actually defined before trying to invoke them.

Finally attempt to re-query the device manufacturer if it is unset in
the interface state in order to prevent UNUPPORTED_MODEM errors after
a modem hardware reconnect.

Signed-off-by: Rozhuk Ivan <rozhuk.im@gmail.com>
[reword subject and commit message]
Ref: https://github.com/openwrt/openwrt/pull/2352
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
3 years agoopenvpn: add generic hotplug mechanism
Florian Eckert [Fri, 30 Nov 2018 13:03:50 +0000 (14:03 +0100)]
openvpn: add generic hotplug mechanism

Pass a default --up and --down executable to each started OpenVPN instance
which triggers /etc/hotplug.d/openvpn/ scripts whenever an instance
goes up or down.

User-configured up and down scripts are invoked by the default shipped
01-user hotplug handler to ensure that existing setups continue to work
as before.

As a consequence of this change, the up, down and script_security OpenVPN
options are removed from the option file, since we're always passing them
via the command line, they do not need to get included into the generated
configuration.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
[reword commit message, move hotplug executable to /usr/libexec]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
3 years agoath79: define CONFIG_MFD_RB4XX_CPLD to fix build breakage
Hannu Nyman [Wed, 17 Jun 2020 17:11:06 +0000 (20:11 +0300)]
ath79: define CONFIG_MFD_RB4XX_CPLD to fix build breakage

Define the kernel config symbol CONFIG_MFD_RB4XX_CPLD=n
to fix build breakage on non-mikrotik targets.

The driver was added for all ath79, but the symbol was only
defined for mikrotik subtarget.

Fixes: fa70b3a4bbc6 ("ath79: add Mikrotik rb4xx series drivers")
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
[rearrange commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agouclient: uclient-fetch: add option to read POST data from file
Daniel Golle [Wed, 17 Jun 2020 15:37:19 +0000 (16:37 +0100)]
uclient: uclient-fetch: add option to read POST data from file

 c660986 uclient-fetch: add option to read POST data from file

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agolantiq: drop "CONFIG_HZ_100 is not set"
Adrian Schmutzler [Wed, 17 Jun 2020 12:23:51 +0000 (14:23 +0200)]
lantiq: drop "CONFIG_HZ_100 is not set"

CONFIG_HZ_100 is not set to "y" in generic config anymore since
3a761c90afc0 ("treewide: Don't diverge from upstream default HZ
settings on 4.19"), so we don't need to disable it anymore either.

This was the only remaining case in the entire tree.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agolantiq: switch to 5.4
Aleksander Jan Bajkowski [Sun, 14 Jun 2020 10:26:07 +0000 (12:26 +0200)]
lantiq: switch to 5.4

Runtime tested on BT Home Hub 5A and D-Link DWR-966.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
3 years agokernel: bump 5.4 to 5.4.46
Petr Štetiar [Fri, 12 Jun 2020 10:32:11 +0000 (12:32 +0200)]
kernel: bump 5.4 to 5.4.46

Refreshed patches.

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

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agomvebu: fix bootloader kernel commandline mangling
Petr Štetiar [Wed, 10 Jun 2020 14:01:06 +0000 (16:01 +0200)]
mvebu: fix bootloader kernel commandline mangling

Currently I'm unable to boot initramfs image with `console=ttyS0,115200`
kernel commandline as the kernel commandline mangling resets kernel
commandline if there is no `root=` option provided, efectively clearing
whatever I pass to the kernel, making the `root=` option mandatory.

So if the kernel commandline mangling is not appropriate just leave the
kernel commandline as it is.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
3 years agomediatek: mt7623: refresh kernel 5.4 config
Sungbo Eo [Fri, 29 May 2020 13:06:10 +0000 (22:06 +0900)]
mediatek: mt7623: refresh kernel 5.4 config

By running make kernel_oldconfig and selecting relevant options.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
3 years agobcm63xx: use the generic nand upgrade on Sercomm devices
Daniel González Cabanelas [Mon, 15 Jun 2020 22:09:33 +0000 (00:09 +0200)]
bcm63xx: use the generic nand upgrade on Sercomm devices

The Sercomm devices don't need the jffs2 cleanmarkers for the kernel
partition. With the stock firmware they are only added when the
bootloader partition is upgraded.

Furthermore, on the Sercomm H500-s, the specific cfe_jffs2_upgrade_tar
function causes OOB corruption. As a result of this, combined with the
nature of the mtdsplit driver, the upgrade procedure ends in a bricked
device.

Use the generic nand_do_upgrade provided by the OpenWrt common functions.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
3 years agomediatek: fix IPv4-only corner case and commit in 99-net-ps
Adrian Schmutzler [Tue, 16 Jun 2020 12:46:42 +0000 (14:46 +0200)]
mediatek: fix IPv4-only corner case and commit in 99-net-ps

The uci config section network.globals set up in /bin/config_generate
will only be created if /proc/sys/net/ipv6 exists.

Correspondingly, lacking IPv6 support, the command
uci set network.globals.packet_steering=1
will fail with "uci: Invalid argument" as the network.globals config
has not been set up.

Fix that by adding the setup there as well.

While at it, limit the uci commit to the network config file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: add support for the TP-Link WBS210 v1
Adrian Schmutzler [Wed, 15 Apr 2020 19:51:59 +0000 (21:51 +0200)]
ath79: add support for the TP-Link WBS210 v1

Specifications:
- SoC: Atheros AR9344
- RAM: 64MB
- Storage: 8 MB SPI NOR
- Wireless: 2.4GHz N based built into SoC
- Ethernet: 1x 10/100 Mbps with 24V POE IN, 1x 10/100 Mbps

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

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agotreewide: drop shebang from non-executable target files
Adrian Schmutzler [Sat, 6 Jun 2020 21:13:41 +0000 (23:13 +0200)]
treewide: drop shebang from non-executable target files

This drops the shebang from all target files for /lib and
/etc/uci-defaults folders, as these are sourced and the shebang
is useless.

While at it, fix the executable flag on a few of these files.

This does not touch ar71xx, as this target is just used for
backporting now and applying cosmetic changes would just complicate
things.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: add support for MikroTik RouterBOARD 493G (rb4xx series)
Christopher Hill [Tue, 26 May 2020 01:10:00 +0000 (21:10 -0400)]
ath79: add support for MikroTik RouterBOARD 493G (rb4xx series)

This patch adds support for the MikroTik RouterBOARD RB493G, ported
from the ar71xx target.

See https://routerboard.com/RB493G for details

Specification:
- SoC Qualcomm Atheros AR7161
- RAM: 256 MiB
- Storage: 128MiB NAND
- Ethernet: 9x 1000/100/10 Mbps
- USB 1x 2.0 / 1.0 type A
- PCIe: 3x Mini slot
- MicroSD slot

Working:
- Board/system detection
- Ethernet
- SPI
- NAND
- LEDs
- USB
- Sysupgrade

Enabled (but untested due to lack of hardware):
- PCIe - ath79_pci_irq struct has the slot/pin/IRQ mappings if needed

Installation methods:
- tftp boot initramfs image, scp then flash via "sysupgrade -n"
- nand boot existing OpenWrt, scp then flash via "sysupgrade -n"

Notes:
- initramfs image will not work if uncompressed image size over ~8.5Mb
- The "rb4xx" drivers have been enabled

Signed-off-by: Christopher Hill <ch6574@gmail.com>
3 years agoath79: add Mikrotik rb4xx series drivers
Christopher Hill [Tue, 26 May 2020 01:05:00 +0000 (21:05 -0400)]
ath79: add Mikrotik rb4xx series drivers

This adds 3 Mikrotik rb4xx series drivers as follows:

rb4xx-cpld: This is in the mfd subsystem, and is the parent CPLD device
that interfaces between the SoC SPI bus and its two children below.
rb4xx-gpio: This is the GPIO expander.
rb4xx-nand: This is the NAND driver.

The history of this code comes in three phases.

1. The first is a May 2015 attempt to push the equivalient ar71xx rb4xx
drivers upstream. See https://lore.kernel.org/patchwork/patch/940880/.

Module-author: Gabor Juhos <juhosg@openwrt.org>
Module-author: Imre Kaloz <kaloz@openwrt.org>
Module-author: Bert Vermeulen <bert@biot.com>

2. Next several ar71xx patches were applied bringing the code current.

commit 7bbf4117c6fe4b764d9d7c62fb2bcf6dd93bff2c
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
commit af79fdbe4af32a287798b579141204bda056b8aa
commit 889272d92db689fd9c910243635e44c9d8323095
commit e21cb649a235180563363b8af5ba8296b9ac0baa
commit 7c09fa4a7492ca436f2c94bd9a465b7c5bbeed6f
Signed-off-by: Felix Fietkau <nbd@nbd.name>
3. Finally a heavy refactor to split the driver into the three new
subsystems, and updated to work with the device tree configuration, plus
updates and review feedback incorporated

Reviewed-by: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: Christopher Hill <ch6574@gmail.com>
3 years agoath79: patch upstream Mikrotik rb4xx-spi driver to be device tree aware
Christopher Hill [Tue, 26 May 2020 01:00:00 +0000 (21:00 -0400)]
ath79: patch upstream Mikrotik rb4xx-spi driver to be device tree aware

Backport upstream patches that make drivers/spi/spi-rb4xx.c device tree
aware, plus a null pointer fix.

Signed-off-by: Christopher Hill <ch6574@gmail.com>
3 years agobcm63xx: a226m-fwb: fix linux partition offset
Daniel González Cabanelas [Mon, 15 Jun 2020 17:51:28 +0000 (19:51 +0200)]
bcm63xx: a226m-fwb: fix linux partition offset

The Pirelli A226M-FWB has a wrong linux partition offset, caused
by a copy-paste error. As of result of this, OpenWrt is currently
broken in this unit.

Fix it.

While at it, also use generic node names and fix the addresses
there as well.

Fixes: a27d59bb4274 ("brcm63xx: switch to new partition layout
specification")

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
[also fix/update node names, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: ag71xx: don't warn on RGMII_RXID and RGMII_TXID
David Bauer [Mon, 15 Jun 2020 18:41:06 +0000 (20:41 +0200)]
ath79: ag71xx: don't warn on RGMII_RXID and RGMII_TXID

Currently, ag71xx will trigger a warning when TX xor RX-Delay modes are
enabled.

Handle them identical to the already implemented RGMII modes, as they
are only different for the attached PHY.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoramips: fix IPv4-only corner case in 01_enable_packet_steering
Adrian Schmutzler [Thu, 11 Jun 2020 09:24:03 +0000 (11:24 +0200)]
ramips: fix IPv4-only corner case in 01_enable_packet_steering

The uci config section network.globals set up in /bin/config_generate
will only be created if /proc/sys/net/ipv6 exists.

Correspondingly, lacking IPv6 support, the command
uci set network.globals.packet_steering=1
will fail with "uci: Invalid argument" as the network.globals config
has not been set up.

Fix that by adding the setup there as well.

Fixes: dfd62e575c6c ("ramips: enable packet steering by default on mt7621")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoRevert "kirkwood: disable image for Linksys EA3500 (Audi)"
Pawel Dembicki [Thu, 30 Apr 2020 10:37:11 +0000 (12:37 +0200)]
Revert "kirkwood: disable image for Linksys EA3500 (Audi)"

This reverts commit d9ff49967145600ff4bbc0f4eecef11fd96f6b16.

At this moment kernel can be fitted in EA3500 image.

Tested by onefreeman (OpenWrt forum user)
Tested-by: Jacks <jack338c@gmail.com> (Github user @jack338c)
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
3 years agokirkwood: refresh kernel config
Pawel Dembicki [Sat, 2 May 2020 19:26:22 +0000 (21:26 +0200)]
kirkwood: refresh kernel config

It was made by running "make kernel_oldconfig".

Suggested-by: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokirkwood: move ext4 support to modules
Pawel Dembicki [Sun, 3 May 2020 19:52:21 +0000 (21:52 +0200)]
kirkwood: move ext4 support to modules

Ext4 support is built in kirkwood kernel.

This patch moves ext4 support to modules and enables it for devices
with SATA interface.

Reviewed-by: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[rebase]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokirkwood: move usb support to modules
Pawel Dembicki [Thu, 30 Apr 2020 10:34:41 +0000 (12:34 +0200)]
kirkwood: move usb support to modules

USB support built in kernel isn't required for booting.
This patch move USB support to modules.

CONFIG_USB_STORAGE is removed because it can be found in kmod-usb-storage
and all usb support for this targed is moved to kmods.

Tested-by: Cezary Jackiewicz <cezary@eko.one.pl> [nsa310]
Tested-by: Alberto Bursi <bobafetthotmail@gmail.com> [nsa325, ea4500]
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[keep CONFIG_SCSI]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agokirkwood: move mmc/sd features to modules
Pawel Dembicki [Thu, 30 Apr 2020 10:27:09 +0000 (12:27 +0200)]
kirkwood: move mmc/sd features to modules

All devices are using nand images. Built-in MMC/SD modules are not needed
anymore.

Run tested: pogo v4

Reviewed-by: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
3 years agokirkwood: move sata features to modules
Pawel Dembicki [Thu, 30 Apr 2020 10:18:24 +0000 (12:18 +0200)]
kirkwood: move sata features to modules

All devices are using nand images. Built-in SATA modules are not needed
anymore.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[only move CONFIG_SATA_MV]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Pawel Dembicki <paweldembicki@gmail.com> [pogo v4]
3 years agokirkwood: move led triggers to dts
Pawel Dembicki [Fri, 1 May 2020 19:16:58 +0000 (21:16 +0200)]
kirkwood: move led triggers to dts

This patch moves led trigger settings from 01_leds file to dts.

Now "linux,default-trigger" property is used.

Tested-by: Alberto Bursi <bobafetthotmail@gmail.com> [nsa310,nsa325]
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
3 years agoipq40xx: check kernel-size for NBG6617
David Bauer [Sun, 14 Jun 2020 11:10:00 +0000 (13:10 +0200)]
ipq40xx: check kernel-size for NBG6617

The ZyXEL NBG6617 has a separate kernel partition which is 4MiB large.

Add the kernel size to validate the kernel won't be bigger than this
fixed limit.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoipq40xx: add image size checks for several devices
David Bauer [Sun, 14 Jun 2020 11:09:14 +0000 (13:09 +0200)]
ipq40xx: add image size checks for several devices

This adds image size checks for various devies using an automatic
mtdsplit.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agomusl: use official release tar
Alexander Couzens [Fri, 22 May 2020 10:48:47 +0000 (12:48 +0200)]
musl: use official release tar

To prevent "wrong" musl packages which have a new version number
but the package still contains an old version, because
PKG_SOURCE_VERSION was unchanged.

Ref: musl ml https://www.openwall.com/lists/musl/2020/05/22/4

Reviewed-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
3 years agoiproute2: update to 5.7.0
Hans Dedecker [Sat, 13 Jun 2020 19:18:57 +0000 (21:18 +0200)]
iproute2: update to 5.7.0

Update iproute2 to latest stable 5.7.0; for the changes see https://lwn.net/Articles/822152/

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agohostapd: hostapd_set_psk_file: fix defaut value for mac
Johann Neuhauser [Mon, 8 Jun 2020 20:01:47 +0000 (22:01 +0200)]
hostapd: hostapd_set_psk_file: fix defaut value for mac

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

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Bringing up of station vlan fails if the optional mac entry isn't set.
The default mac "00:00:00:00:00:00", which should match all stations,
is mistakenly set to the non used variable "isolate". This results in
a wrong formatted .psk file which has to be "vlan_id mac key".

fixes: 5aa2ddd0: hostapd: add support for wifi-station and wifi-vlan sections

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
3 years agoipq40xx: use zImage for EX6100v2 and EX6150v2
David Bauer [Sat, 13 Jun 2020 14:57:53 +0000 (16:57 +0200)]
ipq40xx: use zImage for EX6100v2 and EX6150v2

The NETGEAR EX61500v2 and EX6150v2 U-Boot does not support booting LZMA
compressed images. Currently, they are using GZIP compressed kernels,
which results in ledd flash being available to the root and overlay
filesystems.

Using a zImage results in a smaller kernel and therefore increases
available space for rootfs and overlayfs.

Size reduced: ~1.1 MiB

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoipq40xx: disable DSA and Switchdev
DENG Qingfang [Sat, 30 May 2020 15:31:30 +0000 (23:31 +0800)]
ipq40xx: disable DSA and Switchdev

ipq40xx is still using swconfig based switch management. This might
change in he future, however disable the DSA and Switchdev support for
now.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
[rephrased commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoipq40xx: add support for EnGenius EMR3500
Yen-Ting-Shen [Fri, 1 Nov 2019 07:47:28 +0000 (15:47 +0800)]
ipq40xx: add support for EnGenius EMR3500

SOC:     IPQ4018 / QCA Dakota
CPU:     Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7
DRAM:    256 MiB
NOR:     32 MiB
ETH:     Qualcomm Atheros QCA8072 (2 ports)
USB:     1 x 2.0 (Host controller in the SoC)
WLAN1:   Qualcomm Atheros QCA4018 2.4GHz 802.11bgn 2:2x2
WLAN2:   Qualcomm Atheros QCA4018 5GHz 802.11a/n/ac 2:2x2
INPUT:   RESET Button
LEDS:    White, Blue, Red, Orange

Flash instruction:

From EnGenius firmware to OpenWrt firmware:

In Firmware Upgrade page, upgrade your openwrt-ipq40xx-generic-engenius_emr3500-squashfs-factory.bin directly.

From OpenWrt firmware to EnGenius firmware:

1. Setup a TFTP server on your computer and configure static IP to 192.168.99.8
   Put the EnGenius firmware in the TFTP server directory on your computer.
2. Power up EMR3500. Press 4 and then press any key to enter u-boot.
3. Download EnGenius firmware
   (IPQ40xx) # tftpboot 0x84000000 openwrt-ipq40xx-emr3500-nor-fw-s.img
4. Flash the firmware
   (IPQ40xx) # imgaddr=0x84000000 && source 0x84000000:script
5. Reboot
   (IPQ40xx) # reset

Signed-off-by: Yen-Ting-Shen <frank.shen@senao.com>
[squashed update patch, updated to 5.4, dropped BOARD_NAME,
migrated to SOC]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
3 years agoipq40xx: essedma: Disable TCP segmentation offload for IPv6
Sven Eckelmann [Tue, 9 Jun 2020 13:35:04 +0000 (15:35 +0200)]
ipq40xx: essedma: Disable TCP segmentation offload for IPv6

It was noticed that the the whole MAC can hang when transferring data from
one ar40xx port (WAN ports) to the CPU and from the CPU back to another
ar40xx port (LAN ports). The CPU was doing only NATing in that process.

Usually, the problem first starts with a simple data corruption:

  $ wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.4.0-amd64-netinst.iso -O /dev/null
  ...
  Connecting to saimei.ftp.acc.umu.se (saimei.ftp.acc.umu.se)|2001:6b0:19::138|:443... connected.
  ...
  Read  error at byte 48807936/352321536 (Decryption has failed.). Retrying.

But after a short while, the whole MAC will stop to react. No traffic can
be transported anymore from the CPU port from/to the AR40xx PHY/switch and
the MAC has to be resetted.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Acked-by: John Crispin <john@phrozen.org>
3 years agoramips: drop useless label-mac-device for RouterBOARD 750Gr3
Adrian Schmutzler [Sat, 13 Jun 2020 11:53:27 +0000 (13:53 +0200)]
ramips: drop useless label-mac-device for RouterBOARD 750Gr3

With the new driver, MAC addresses are not set up in DTS anymore,
and therefore label-mac-device will be useless there.

Setup is done properly in 02_network, so this just removes the
obsolete alias.

Fixes: 5e50515fa6b3 ("ramips/mt7621: mikrotik: don't use
mtd-mac-address in DTS")

Suggested-by: John Thomson <git@johnthomson.fastmail.com.au>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agobcm47xx: move device definitions to subfiles
Adrian Schmutzler [Sun, 7 Jun 2020 11:12:43 +0000 (13:12 +0200)]
bcm47xx: move device definitions to subfiles

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

Cc: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: fix port display for TRENDnet TEW-810DR
J. Scott Heppler [Fri, 12 Jun 2020 16:04:15 +0000 (18:04 +0200)]
ramips: fix port display for TRENDnet TEW-810DR

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

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

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

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

Installation:

Login to netgear webinterface and flash factory.img

Back to stock:

Use nmrpflash to revert stock image.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Acked-by: Hans Dedecker <dedeckeh@gmail.com>